release: WRNexusJS 0.4.0

This commit is contained in:
2026-07-27 12:42:18 +05:30
parent 8b728a3e5d
commit 30e5721e84
250 changed files with 10065 additions and 3923 deletions
+55 -19
View File
@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: WRNexus Managed CAPTCHA API
version: 0.3.6
version: 0.4.0
servers:
- url: https://captcha.example.com
paths:
@@ -18,14 +18,49 @@ paths:
properties:
siteKey: { type: string }
action: { type: string }
type: { type: string, enum: [number, alpha, alphanumeric, calculation, image, honeypot, timing, not-robot] }
type:
{
type: string,
enum:
[
number,
alpha,
alphanumeric,
calculation,
image,
honeypot,
timing,
not-robot,
],
}
presentation: { type: string, enum: [visual, audio, invisible] }
difficulty: { type: string, enum: [easy, normal, hard] }
disturbance: { type: integer, minimum: 25, maximum: 75, default: 50 }
imageStyle:
type: string
default: random
enum: [random, classic, collision, snow, corrosion, spiderweb, cross-shadow, split, split2, cut, darts, distortion, stitch, striped, wave, grid-noise, scribble, pixel, broken-lines]
enum:
[
random,
classic,
collision,
snow,
corrosion,
spiderweb,
cross-shadow,
split,
split2,
cut,
darts,
distortion,
stitch,
striped,
wave,
grid-noise,
scribble,
pixel,
broken-lines,
]
allowedStyles:
oneOf:
- { type: string, description: Comma-separated renderer names }
@@ -39,13 +74,13 @@ paths:
randomizeStyle: { type: boolean, default: false }
locale: { type: string }
responses:
'201':
"201":
description: Challenge created
content:
application/json:
schema: { $ref: '#/components/schemas/Challenge' }
'403': { description: Invalid site key or hostname }
'429': { description: Project quota exceeded }
schema: { $ref: "#/components/schemas/Challenge" }
"403": { description: Invalid site key or hostname }
"429": { description: Project quota exceeded }
/v1/solve:
post:
summary: Solve a public challenge and receive a temporary response token
@@ -64,12 +99,12 @@ paths:
honeypot: { type: string }
timingToken: { type: string }
responses:
'200':
"200":
description: Challenge solved
content:
application/json:
schema: { $ref: '#/components/schemas/Verification' }
'400': { description: Challenge rejected }
schema: { $ref: "#/components/schemas/Verification" }
"400": { description: Challenge rejected }
/v1/verify:
post:
summary: Verify and consume a response token on the application server
@@ -87,19 +122,19 @@ paths:
hostname: { type: string }
sessionId: { type: string }
responses:
'200':
"200":
description: Token accepted and consumed
content:
application/json:
schema: { $ref: '#/components/schemas/Verification' }
'400': { description: Token invalid, expired, mismatched, or already used }
'401': { description: Invalid project secret }
schema: { $ref: "#/components/schemas/Verification" }
"400": { description: Token invalid, expired, mismatched, or already used }
"401": { description: Invalid project secret }
/v1/projects:
get:
summary: List projects
security: [{ adminToken: [] }]
responses:
'200': { description: Project list without secrets }
"200": { description: Project list without secrets }
post:
summary: Create a project and return keys once
security: [{ adminToken: [] }]
@@ -115,7 +150,7 @@ paths:
allowedHostnames: { type: array, items: { type: string } }
monthlyQuota: { type: integer, minimum: 1 }
responses:
'201': { description: Project and initial keys }
"201": { description: Project and initial keys }
/v1/projects/{id}/rotate-secret:
post:
summary: Rotate a project verification secret
@@ -126,8 +161,8 @@ paths:
required: true
schema: { type: string }
responses:
'200': { description: New secret returned once }
'404': { description: Project not found }
"200": { description: New secret returned once }
"404": { description: Project not found }
components:
securitySchemes:
projectSecret:
@@ -139,7 +174,8 @@ components:
schemas:
Challenge:
type: object
required: [id, provider, type, presentation, action, prompt, createdAt, expiresAt, responseField]
required:
[id, provider, type, presentation, action, prompt, createdAt, expiresAt, responseField]
properties:
id: { type: string }
provider: { type: string }