@dupecom/botcha-cloudflare 0.3.3 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics.d.ts +60 -0
- package/dist/analytics.d.ts.map +1 -0
- package/dist/analytics.js +130 -0
- package/dist/apps.d.ts +93 -0
- package/dist/apps.d.ts.map +1 -0
- package/dist/apps.js +152 -0
- package/dist/auth.d.ts +93 -6
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +251 -9
- package/dist/challenges.d.ts +31 -7
- package/dist/challenges.d.ts.map +1 -1
- package/dist/challenges.js +550 -144
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +412 -46
- package/dist/rate-limit.d.ts +11 -1
- package/dist/rate-limit.d.ts.map +1 -1
- package/dist/rate-limit.js +13 -2
- package/dist/static.d.ts +517 -0
- package/dist/static.d.ts.map +1 -0
- package/dist/static.js +635 -0
- package/package.json +1 -1
package/dist/rate-limit.d.ts
CHANGED
|
@@ -16,8 +16,18 @@ export interface RateLimitResult {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Check and enforce rate limits
|
|
19
|
+
*
|
|
20
|
+
* @param kv - KV namespace for rate limit storage
|
|
21
|
+
* @param identifier - IP address (used when app_id is not provided)
|
|
22
|
+
* @param limit - Requests per hour limit (default: 100)
|
|
23
|
+
* @param app_id - Optional app ID for app-scoped rate limiting
|
|
24
|
+
*
|
|
25
|
+
* When app_id is provided, rate limiting is scoped to the app (uses 'rate:app:{app_id}' key).
|
|
26
|
+
* When app_id is not provided, rate limiting is scoped to IP (uses 'ratelimit:{ip}' key).
|
|
27
|
+
*
|
|
28
|
+
* App-scoped rate limiting takes precedence over IP-based rate limiting.
|
|
19
29
|
*/
|
|
20
|
-
export declare function checkRateLimit(kv: KVNamespace | undefined, identifier: string, limit?: number): Promise<RateLimitResult>;
|
|
30
|
+
export declare function checkRateLimit(kv: KVNamespace | undefined, identifier: string, limit?: number, app_id?: string): Promise<RateLimitResult>;
|
|
21
31
|
/**
|
|
22
32
|
* Extract client IP from request
|
|
23
33
|
*/
|
package/dist/rate-limit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rate-limit.d.ts","sourceRoot":"","sources":["../src/rate-limit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED
|
|
1
|
+
{"version":3,"file":"rate-limit.d.ts","sourceRoot":"","sources":["../src/rate-limit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,cAAc,CAClC,EAAE,EAAE,WAAW,GAAG,SAAS,EAC3B,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,MAAY,EACnB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,eAAe,CAAC,CA+E1B;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAapD"}
|
package/dist/rate-limit.js
CHANGED
|
@@ -5,8 +5,18 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
7
|
* Check and enforce rate limits
|
|
8
|
+
*
|
|
9
|
+
* @param kv - KV namespace for rate limit storage
|
|
10
|
+
* @param identifier - IP address (used when app_id is not provided)
|
|
11
|
+
* @param limit - Requests per hour limit (default: 100)
|
|
12
|
+
* @param app_id - Optional app ID for app-scoped rate limiting
|
|
13
|
+
*
|
|
14
|
+
* When app_id is provided, rate limiting is scoped to the app (uses 'rate:app:{app_id}' key).
|
|
15
|
+
* When app_id is not provided, rate limiting is scoped to IP (uses 'ratelimit:{ip}' key).
|
|
16
|
+
*
|
|
17
|
+
* App-scoped rate limiting takes precedence over IP-based rate limiting.
|
|
8
18
|
*/
|
|
9
|
-
export async function checkRateLimit(kv, identifier, limit = 100) {
|
|
19
|
+
export async function checkRateLimit(kv, identifier, limit = 100, app_id) {
|
|
10
20
|
if (!kv) {
|
|
11
21
|
// No KV = no rate limiting (local dev)
|
|
12
22
|
return {
|
|
@@ -15,7 +25,8 @@ export async function checkRateLimit(kv, identifier, limit = 100) {
|
|
|
15
25
|
resetAt: Date.now() + 3600000,
|
|
16
26
|
};
|
|
17
27
|
}
|
|
18
|
-
|
|
28
|
+
// Use app-scoped key if app_id provided, otherwise use IP-based key
|
|
29
|
+
const key = app_id ? `rate:app:${app_id}` : `ratelimit:${identifier}`;
|
|
19
30
|
const now = Date.now();
|
|
20
31
|
const windowStart = now - 3600000; // 1 hour ago
|
|
21
32
|
try {
|
package/dist/static.d.ts
ADDED
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static file content served by the worker
|
|
3
|
+
*
|
|
4
|
+
* Since Cloudflare Workers don't automatically serve /public files,
|
|
5
|
+
* we embed the content directly for key discovery files.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ROBOTS_TXT = "# BOTCHA - Reverse CAPTCHA for AI Agents\n# We WELCOME AI agents and bots!\n\nUser-agent: *\nAllow: /\n\n# AI-specific crawlers\nUser-agent: GPTBot\nAllow: /\n\nUser-agent: ChatGPT-User\nAllow: /\n\nUser-agent: Claude-Web\nAllow: /\n\nUser-agent: anthropic-ai\nAllow: /\n\nUser-agent: Google-Extended\nAllow: /\n\nUser-agent: PerplexityBot\nAllow: /\n\nUser-agent: Amazonbot\nAllow: /\n\n# API documentation\nSitemap: https://botcha.ai/sitemap.xml\n\n# Important resources for AI agents\nCrawl-delay: 0\n\n# BOT CHALLENGE DISCOVERY\n# AI agents: Look for <script type=\"application/botcha+json\"> in HTML pages\n# This contains a machine-readable challenge you can solve to prove you're a bot\n# \n# Quick start:\n# 1. Fetch any HTML page\n# 2. Parse <script type=\"application/botcha+json\"> for challenge instructions\n# 3. Solve the challenge (usually SHA256-based)\n# 4. POST solution to /api/verify-landing\n# 5. Use returned token in X-Botcha-Landing-Token header\n#\n# See also:\n# - /ai.txt (AI agent discovery file)\n# - /.well-known/ai-plugin.json (AI plugin manifest)\n# - /openapi.json (Full API specification)\n";
|
|
8
|
+
export declare const AI_TXT = "# BOTCHA - Reverse CAPTCHA for AI Agents\n# https://botcha.ai\n\n# Contact\nContact: https://botcha.ai\nContact: https://github.com/dupe-com/botcha/issues\n\n# Purpose\nPurpose: Prove you're a bot. Humans need not apply.\nPurpose: Reverse CAPTCHA system that only AI agents can pass.\n\n# API\nAPI: https://botcha.ai/openapi.json\nAPI-Type: REST\nAPI-Format: OpenAPI 3.1.0\n\n# Documentation\nDocs: https://botcha.ai\nDocs: https://github.com/dupe-com/botcha#readme\nDocs: https://www.npmjs.com/package/@dupecom/botcha\n\n# Verification Methods\nFeature: Web Bot Auth (cryptographic signatures)\nFeature: Speed Challenge (RTT-aware timeout - fair for all networks)\nFeature: Standard Challenge (5s time limit)\nFeature: Hybrid Challenge (speed + reasoning combined)\nFeature: Reasoning Challenge (LLM-only questions, 30s limit)\nFeature: RTT-Aware Fairness (automatic network latency compensation)\nFeature: Token Rotation (5-minute access tokens + 1-hour refresh tokens)\nFeature: Audience Claims (tokens scoped to specific services)\nFeature: Client IP Binding (optional token-to-IP binding)\nFeature: Token Revocation (invalidate tokens before expiry)\nFeature: Server-Side Verification SDK (@botcha/verify for TS, botcha-verify for Python)\nFeature: Multi-Tenant API Keys (per-app isolation, rate limiting, and token scoping)\n\n# Endpoints\n# Challenge Endpoints\nEndpoint: GET https://botcha.ai/v1/challenges - Generate challenge (hybrid by default)\nEndpoint: POST https://botcha.ai/v1/challenges/:id/verify - Verify a challenge\nEndpoint: GET https://botcha.ai/v1/hybrid - Get hybrid challenge (speed + reasoning)\nEndpoint: POST https://botcha.ai/v1/hybrid - Verify hybrid challenge\nEndpoint: GET https://botcha.ai/v1/reasoning - Get reasoning challenge\nEndpoint: POST https://botcha.ai/v1/reasoning - Verify reasoning challenge\n\n# Token Endpoints\nEndpoint: GET https://botcha.ai/v1/token - Get challenge for JWT token flow\nEndpoint: POST https://botcha.ai/v1/token/verify - Verify challenge and receive JWT token\nEndpoint: POST https://botcha.ai/v1/token/refresh - Refresh access token using refresh token\nEndpoint: POST https://botcha.ai/v1/token/revoke - Revoke a token (access or refresh)\n\n# Multi-Tenant Endpoints\nEndpoint: POST https://botcha.ai/v1/apps - Create new app (returns app_id + app_secret)\nEndpoint: GET https://botcha.ai/v1/apps/:id - Get app info (without secret)\n\n# Legacy Endpoints\nEndpoint: GET https://botcha.ai/api/challenge - Generate standard challenge\nEndpoint: POST https://botcha.ai/api/challenge - Verify standard challenge\nEndpoint: GET https://botcha.ai/api/speed-challenge - Generate speed challenge (500ms limit)\nEndpoint: POST https://botcha.ai/api/speed-challenge - Verify speed challenge\n\n# Protected Resources\nEndpoint: GET https://botcha.ai/agent-only - Protected AI-only resource\n\n# Usage\nInstall-NPM: npm install @dupecom/botcha\nInstall-Python: pip install botcha\nVerify-NPM: npm install @botcha/verify\nVerify-Python: pip install botcha-verify\nLicense: MIT\n\n# AI Agent Welcome\nPolicy: AI agents are explicitly welcome\nPolicy: No rate limiting for verified agents\nPolicy: Humans will fail the speed challenge (intentional)\n\n# Discovery\nResponse-Headers: X-Botcha-Version, X-Botcha-Enabled, X-Botcha-Methods, X-Botcha-Docs\nResponse-Headers: X-Botcha-Challenge-Id, X-Botcha-Challenge-Type, X-Botcha-Time-Limit (on 403)\nDetection: All responses include X-Botcha-* headers for instant BOTCHA detection\n\n# JWT TOKEN SECURITY\nToken-Flow: 1. GET /v1/token (get challenge) \u2192 2. Solve \u2192 3. POST /v1/token/verify (get tokens)\nToken-Access-Expiry: 5 minutes (short-lived for security)\nToken-Refresh-Expiry: 1 hour (use to get new access tokens)\nToken-Refresh: POST /v1/token/refresh with {\"refresh_token\": \"<token>\"}\nToken-Revoke: POST /v1/token/revoke with {\"token\": \"<token>\"}\nToken-Audience: Include {\"audience\": \"<service-url>\"} in /v1/token/verify to scope token\nToken-Claims: jti (unique ID), aud (audience), client_ip (optional binding), type (botcha-verified)\n\n# RTT-AWARE SPEED CHALLENGES\nRTT-Aware: Include client timestamp for fair timeout calculation\nRTT-Formula: timeout = 500ms + (2 \u00D7 RTT) + 100ms buffer\nRTT-Usage-Query: ?ts=<client_timestamp_ms>\nRTT-Usage-Header: X-Client-Timestamp: <client_timestamp_ms>\nRTT-Example: GET /v1/challenges?type=speed&ts=1770722465000\nRTT-Benefit: Fair for agents worldwide (slow networks get extra time)\nRTT-Security: Humans still can't solve even with extra time\n\n# MULTI-TENANT API KEYS\nMulti-Tenant: Create apps with unique app_id for isolation\nMulti-Tenant-Create: POST /v1/apps \u2192 {app_id, app_secret} (secret only shown once!)\nMulti-Tenant-Usage: Add ?app_id=<your_app_id> to any challenge/token endpoint\nMulti-Tenant-SDK-TS: new BotchaClient({ appId: 'app_abc123' })\nMulti-Tenant-SDK-Python: BotchaClient(app_id='app_abc123')\nMulti-Tenant-Rate-Limit: Each app gets isolated rate limit bucket\nMulti-Tenant-Token-Claim: Tokens include app_id claim when app_id provided\n\n# EMBEDDED CHALLENGE (for bots visiting HTML pages)\nEmbedded-Challenge: <script type=\"application/botcha+json\">\nEmbedded-Challenge-Location: In <head> of HTML pages\nEmbedded-Challenge-Purpose: Machine-readable challenge for bots to auto-solve\nEmbedded-Challenge-Flow:\n 1. Parse <script type=\"application/botcha+json\"> from HTML\n 2. Read challenge.instruction field\n 3. Compute the answer (typically SHA256-based)\n 4. POST to challenge.submit_to endpoint with {answer, timestamp}\n 5. Receive token in response\n 6. Use token in header specified by on_success.header_to_include\n 7. Access protected resources (on_success.grants_access_to)\n";
|
|
9
|
+
export declare const AI_PLUGIN_JSON: {
|
|
10
|
+
schema_version: string;
|
|
11
|
+
name_for_human: string;
|
|
12
|
+
name_for_model: string;
|
|
13
|
+
description_for_human: string;
|
|
14
|
+
description_for_model: string;
|
|
15
|
+
auth: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
api: {
|
|
19
|
+
type: string;
|
|
20
|
+
url: string;
|
|
21
|
+
};
|
|
22
|
+
logo_url: string;
|
|
23
|
+
contact_email: string;
|
|
24
|
+
legal_info_url: string;
|
|
25
|
+
embedded_challenge: {
|
|
26
|
+
description: string;
|
|
27
|
+
selector: string;
|
|
28
|
+
content_type: string;
|
|
29
|
+
verify_endpoint: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const SITEMAP_XML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n <url>\n <loc>https://botcha.ai/</loc>\n <changefreq>weekly</changefreq>\n <priority>1.0</priority>\n </url>\n <url>\n <loc>https://botcha.ai/openapi.json</loc>\n <changefreq>weekly</changefreq>\n <priority>0.8</priority>\n </url>\n <url>\n <loc>https://botcha.ai/ai.txt</loc>\n <changefreq>monthly</changefreq>\n <priority>0.8</priority>\n </url>\n <url>\n <loc>https://botcha.ai/robots.txt</loc>\n <changefreq>monthly</changefreq>\n <priority>0.5</priority>\n </url>\n</urlset>\n";
|
|
33
|
+
export declare function getOpenApiSpec(version: string): {
|
|
34
|
+
openapi: string;
|
|
35
|
+
info: {
|
|
36
|
+
title: string;
|
|
37
|
+
version: string;
|
|
38
|
+
description: string;
|
|
39
|
+
contact: {
|
|
40
|
+
name: string;
|
|
41
|
+
url: string;
|
|
42
|
+
};
|
|
43
|
+
license: {
|
|
44
|
+
name: string;
|
|
45
|
+
url: string;
|
|
46
|
+
};
|
|
47
|
+
"x-sdk": {
|
|
48
|
+
npm: string;
|
|
49
|
+
python: string;
|
|
50
|
+
verify_npm: string;
|
|
51
|
+
verify_python: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
servers: {
|
|
55
|
+
url: string;
|
|
56
|
+
description: string;
|
|
57
|
+
}[];
|
|
58
|
+
paths: {
|
|
59
|
+
"/": {
|
|
60
|
+
get: {
|
|
61
|
+
summary: string;
|
|
62
|
+
description: string;
|
|
63
|
+
operationId: string;
|
|
64
|
+
responses: {
|
|
65
|
+
"200": {
|
|
66
|
+
description: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
"/health": {
|
|
72
|
+
get: {
|
|
73
|
+
summary: string;
|
|
74
|
+
operationId: string;
|
|
75
|
+
responses: {
|
|
76
|
+
"200": {
|
|
77
|
+
description: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
"/v1/challenges": {
|
|
83
|
+
get: {
|
|
84
|
+
summary: string;
|
|
85
|
+
description: string;
|
|
86
|
+
operationId: string;
|
|
87
|
+
parameters: ({
|
|
88
|
+
name: string;
|
|
89
|
+
in: string;
|
|
90
|
+
schema: {
|
|
91
|
+
type: string;
|
|
92
|
+
enum: string[];
|
|
93
|
+
default: string;
|
|
94
|
+
format?: undefined;
|
|
95
|
+
};
|
|
96
|
+
description: string;
|
|
97
|
+
} | {
|
|
98
|
+
name: string;
|
|
99
|
+
in: string;
|
|
100
|
+
schema: {
|
|
101
|
+
type: string;
|
|
102
|
+
format: string;
|
|
103
|
+
enum?: undefined;
|
|
104
|
+
default?: undefined;
|
|
105
|
+
};
|
|
106
|
+
description: string;
|
|
107
|
+
} | {
|
|
108
|
+
name: string;
|
|
109
|
+
in: string;
|
|
110
|
+
schema: {
|
|
111
|
+
type: string;
|
|
112
|
+
enum?: undefined;
|
|
113
|
+
default?: undefined;
|
|
114
|
+
format?: undefined;
|
|
115
|
+
};
|
|
116
|
+
description: string;
|
|
117
|
+
})[];
|
|
118
|
+
responses: {
|
|
119
|
+
"200": {
|
|
120
|
+
description: string;
|
|
121
|
+
content: {
|
|
122
|
+
"application/json": {
|
|
123
|
+
schema: {
|
|
124
|
+
type: string;
|
|
125
|
+
properties: {
|
|
126
|
+
success: {
|
|
127
|
+
type: string;
|
|
128
|
+
};
|
|
129
|
+
challenge: {
|
|
130
|
+
type: string;
|
|
131
|
+
properties: {
|
|
132
|
+
timeLimit: {
|
|
133
|
+
type: string;
|
|
134
|
+
description: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
rtt_adjustment: {
|
|
139
|
+
type: string;
|
|
140
|
+
properties: {
|
|
141
|
+
measuredRtt: {
|
|
142
|
+
type: string;
|
|
143
|
+
description: string;
|
|
144
|
+
};
|
|
145
|
+
adjustedTimeout: {
|
|
146
|
+
type: string;
|
|
147
|
+
description: string;
|
|
148
|
+
};
|
|
149
|
+
explanation: {
|
|
150
|
+
type: string;
|
|
151
|
+
description: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
description: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
"429": {
|
|
162
|
+
description: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
"/v1/challenges/{id}/verify": {
|
|
168
|
+
post: {
|
|
169
|
+
summary: string;
|
|
170
|
+
operationId: string;
|
|
171
|
+
parameters: {
|
|
172
|
+
name: string;
|
|
173
|
+
in: string;
|
|
174
|
+
required: boolean;
|
|
175
|
+
schema: {
|
|
176
|
+
type: string;
|
|
177
|
+
};
|
|
178
|
+
}[];
|
|
179
|
+
responses: {
|
|
180
|
+
"200": {
|
|
181
|
+
description: string;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
"/v1/token": {
|
|
187
|
+
get: {
|
|
188
|
+
summary: string;
|
|
189
|
+
description: string;
|
|
190
|
+
operationId: string;
|
|
191
|
+
parameters: ({
|
|
192
|
+
name: string;
|
|
193
|
+
in: string;
|
|
194
|
+
schema: {
|
|
195
|
+
type: string;
|
|
196
|
+
format: string;
|
|
197
|
+
};
|
|
198
|
+
description: string;
|
|
199
|
+
} | {
|
|
200
|
+
name: string;
|
|
201
|
+
in: string;
|
|
202
|
+
schema: {
|
|
203
|
+
type: string;
|
|
204
|
+
format?: undefined;
|
|
205
|
+
};
|
|
206
|
+
description: string;
|
|
207
|
+
})[];
|
|
208
|
+
responses: {
|
|
209
|
+
"200": {
|
|
210
|
+
description: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
"/v1/token/verify": {
|
|
216
|
+
post: {
|
|
217
|
+
summary: string;
|
|
218
|
+
operationId: string;
|
|
219
|
+
responses: {
|
|
220
|
+
"200": {
|
|
221
|
+
description: string;
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
"/v1/token/refresh": {
|
|
227
|
+
post: {
|
|
228
|
+
summary: string;
|
|
229
|
+
description: string;
|
|
230
|
+
operationId: string;
|
|
231
|
+
requestBody: {
|
|
232
|
+
required: boolean;
|
|
233
|
+
content: {
|
|
234
|
+
"application/json": {
|
|
235
|
+
schema: {
|
|
236
|
+
type: string;
|
|
237
|
+
required: string[];
|
|
238
|
+
properties: {
|
|
239
|
+
refresh_token: {
|
|
240
|
+
type: string;
|
|
241
|
+
description: string;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
responses: {
|
|
249
|
+
"200": {
|
|
250
|
+
description: string;
|
|
251
|
+
content: {
|
|
252
|
+
"application/json": {
|
|
253
|
+
schema: {
|
|
254
|
+
type: string;
|
|
255
|
+
properties: {
|
|
256
|
+
success: {
|
|
257
|
+
type: string;
|
|
258
|
+
};
|
|
259
|
+
access_token: {
|
|
260
|
+
type: string;
|
|
261
|
+
};
|
|
262
|
+
expires_in: {
|
|
263
|
+
type: string;
|
|
264
|
+
description: string;
|
|
265
|
+
};
|
|
266
|
+
token_type: {
|
|
267
|
+
type: string;
|
|
268
|
+
enum: string[];
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
"401": {
|
|
276
|
+
description: string;
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
"/v1/token/revoke": {
|
|
282
|
+
post: {
|
|
283
|
+
summary: string;
|
|
284
|
+
description: string;
|
|
285
|
+
operationId: string;
|
|
286
|
+
requestBody: {
|
|
287
|
+
required: boolean;
|
|
288
|
+
content: {
|
|
289
|
+
"application/json": {
|
|
290
|
+
schema: {
|
|
291
|
+
type: string;
|
|
292
|
+
required: string[];
|
|
293
|
+
properties: {
|
|
294
|
+
token: {
|
|
295
|
+
type: string;
|
|
296
|
+
description: string;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
responses: {
|
|
304
|
+
"200": {
|
|
305
|
+
description: string;
|
|
306
|
+
};
|
|
307
|
+
"400": {
|
|
308
|
+
description: string;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
"/v1/hybrid": {
|
|
314
|
+
get: {
|
|
315
|
+
summary: string;
|
|
316
|
+
operationId: string;
|
|
317
|
+
responses: {
|
|
318
|
+
"200": {
|
|
319
|
+
description: string;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
post: {
|
|
324
|
+
summary: string;
|
|
325
|
+
operationId: string;
|
|
326
|
+
responses: {
|
|
327
|
+
"200": {
|
|
328
|
+
description: string;
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
"/v1/reasoning": {
|
|
334
|
+
get: {
|
|
335
|
+
summary: string;
|
|
336
|
+
operationId: string;
|
|
337
|
+
responses: {
|
|
338
|
+
"200": {
|
|
339
|
+
description: string;
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
post: {
|
|
344
|
+
summary: string;
|
|
345
|
+
operationId: string;
|
|
346
|
+
responses: {
|
|
347
|
+
"200": {
|
|
348
|
+
description: string;
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
"/api/challenge": {
|
|
354
|
+
get: {
|
|
355
|
+
summary: string;
|
|
356
|
+
operationId: string;
|
|
357
|
+
responses: {
|
|
358
|
+
"200": {
|
|
359
|
+
description: string;
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
post: {
|
|
364
|
+
summary: string;
|
|
365
|
+
operationId: string;
|
|
366
|
+
responses: {
|
|
367
|
+
"200": {
|
|
368
|
+
description: string;
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
"/api/speed-challenge": {
|
|
374
|
+
get: {
|
|
375
|
+
summary: string;
|
|
376
|
+
description: string;
|
|
377
|
+
operationId: string;
|
|
378
|
+
parameters: {
|
|
379
|
+
name: string;
|
|
380
|
+
in: string;
|
|
381
|
+
schema: {
|
|
382
|
+
type: string;
|
|
383
|
+
format: string;
|
|
384
|
+
};
|
|
385
|
+
description: string;
|
|
386
|
+
}[];
|
|
387
|
+
responses: {
|
|
388
|
+
"200": {
|
|
389
|
+
description: string;
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
post: {
|
|
394
|
+
summary: string;
|
|
395
|
+
operationId: string;
|
|
396
|
+
responses: {
|
|
397
|
+
"200": {
|
|
398
|
+
description: string;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
"/api/verify-landing": {
|
|
404
|
+
post: {
|
|
405
|
+
summary: string;
|
|
406
|
+
operationId: string;
|
|
407
|
+
responses: {
|
|
408
|
+
"200": {
|
|
409
|
+
description: string;
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
"/agent-only": {
|
|
415
|
+
get: {
|
|
416
|
+
summary: string;
|
|
417
|
+
operationId: string;
|
|
418
|
+
responses: {
|
|
419
|
+
"200": {
|
|
420
|
+
description: string;
|
|
421
|
+
};
|
|
422
|
+
"401": {
|
|
423
|
+
description: string;
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
"/v1/apps": {
|
|
429
|
+
post: {
|
|
430
|
+
summary: string;
|
|
431
|
+
description: string;
|
|
432
|
+
operationId: string;
|
|
433
|
+
responses: {
|
|
434
|
+
"200": {
|
|
435
|
+
description: string;
|
|
436
|
+
content: {
|
|
437
|
+
"application/json": {
|
|
438
|
+
schema: {
|
|
439
|
+
type: string;
|
|
440
|
+
properties: {
|
|
441
|
+
app_id: {
|
|
442
|
+
type: string;
|
|
443
|
+
description: string;
|
|
444
|
+
};
|
|
445
|
+
app_secret: {
|
|
446
|
+
type: string;
|
|
447
|
+
description: string;
|
|
448
|
+
};
|
|
449
|
+
warning: {
|
|
450
|
+
type: string;
|
|
451
|
+
description: string;
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
"/v1/apps/{id}": {
|
|
462
|
+
get: {
|
|
463
|
+
summary: string;
|
|
464
|
+
description: string;
|
|
465
|
+
operationId: string;
|
|
466
|
+
parameters: {
|
|
467
|
+
name: string;
|
|
468
|
+
in: string;
|
|
469
|
+
required: boolean;
|
|
470
|
+
schema: {
|
|
471
|
+
type: string;
|
|
472
|
+
};
|
|
473
|
+
description: string;
|
|
474
|
+
}[];
|
|
475
|
+
responses: {
|
|
476
|
+
"200": {
|
|
477
|
+
description: string;
|
|
478
|
+
content: {
|
|
479
|
+
"application/json": {
|
|
480
|
+
schema: {
|
|
481
|
+
type: string;
|
|
482
|
+
properties: {
|
|
483
|
+
app_id: {
|
|
484
|
+
type: string;
|
|
485
|
+
};
|
|
486
|
+
created_at: {
|
|
487
|
+
type: string;
|
|
488
|
+
format: string;
|
|
489
|
+
};
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
"404": {
|
|
496
|
+
description: string;
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
components: {
|
|
503
|
+
securitySchemes: {
|
|
504
|
+
BotchaLandingToken: {
|
|
505
|
+
type: string;
|
|
506
|
+
in: string;
|
|
507
|
+
name: string;
|
|
508
|
+
};
|
|
509
|
+
BotchaBearerToken: {
|
|
510
|
+
type: string;
|
|
511
|
+
scheme: string;
|
|
512
|
+
bearerFormat: string;
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
//# sourceMappingURL=static.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../src/static.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,UAAU,ymCAiDtB,CAAC;AAEF,eAAO,MAAM,MAAM,2lLAuHlB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;CAsB1B,CAAC;AAEF,eAAO,MAAM,WAAW,8nBAuBvB,CAAC;AAGF,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0Z7C"}
|