@devries-cameron20 / composio-1 / commits / 57557fc54
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

docs(webhooks): render the webhook payload reference (PLEN-2793) (#3910)

## Summary Implements the docs half of **PLEN-2793** — renders a typed public reference for the payloads Composio delivers to customer webhook URLs, under **API Reference → Webhook Events**. Pairs with platform PR ComposioHQ/platform#11389, which generates the spec. ## What's here - **`docs/public/openapi-webhooks.json`** — the generated OpenAPI **3.1** spec (top-level `webhooks`: `composio.trigger.message`, `composio.connected_account.expired`, `composio.trigger.disabled`), produced from the webhook payload Zod schemas in Apollo (SSOT). Finishes the earlier untracked WIP: adds the missing `trigger.disabled` event and reuses shared schemas as `$ref` (`WebhookEventEnvelope`, `ConnectedAccountDetailed`). - **`docs/lib/openapi.ts`** — adds the spec as a **second input** to the v3.1 reference source. Fumadocs (`fumadocs-openapi`) renders the `webhooks` block natively; operations group under the "Webhook Events" tag at `api-reference/webhook-events/*`. - **`webhook-events/index.mdx`** — landing page listing the three events, cross-linked to the Webhook Subscriptions API and signature verification. ## Why a separate 3.1 spec `webhooks` is a 3.1-only top-level field; the main `openapi.json` is 3.0. A separate file keeps the main spec (and its sync pipeline) untouched and avoids the docs' union-normalisation pass. See the platform PR for the full rationale. ## Verified locally - [x] `bun scripts/validate-links.ts` — **0 errors** (the generated `handle_composio_*` webhook pages resolve; no collision with the hand-authored `index.mdx`) - [x] `bun test tests/static/` — 33 pass / 0 fail - [x] `bun run types:check` — clean ## Notes - Setup, subscription, and signature-verification docs already exist (`setting-up-triggers/*`) and are cross-linked, not rewritten. - Follow-up (optional): auto-sync the webhooks spec from Apollo on prod deploy (currently committed by hand), mirroring the main-spec `docs-update-data` pipeline. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: jkomyno <alberto@composio.dev>

Anshu Garg committed Jul 27, 2026 at 22:17 UTC 57557fc54bf1429c71eb41f7b911760ac6de2091
12 files changed +9168 -276
.github/workflows/docs-update-data.yml
+5 -4
@@ -91,14 +91,14 @@ jobs:
91 id: changes
92 run: |
93 cd ..
94 - git add -N docs/public/data/ docs/public/openapi.json docs/public/openapi-v3.json docs/content/reference/api-reference/ docs/content/reference/v3/api-reference/ docs/content/toolkits/meta-tools/ 2>/dev/null || true
95 - if git diff --quiet docs/public/data/ docs/public/openapi.json docs/public/openapi-v3.json docs/content/reference/api-reference/ docs/content/reference/v3/api-reference/ docs/content/toolkits/meta-tools/ 2>/dev/null; then
94 + git add -N docs/public/data/ docs/public/openapi.json docs/public/openapi-v3.json docs/public/openapi-webhooks.json docs/content/reference/api-reference/ docs/content/reference/v3/api-reference/ docs/content/toolkits/meta-tools/ 2>/dev/null || true
95 + if git diff --quiet docs/public/data/ docs/public/openapi.json docs/public/openapi-v3.json docs/public/openapi-webhooks.json docs/content/reference/api-reference/ docs/content/reference/v3/api-reference/ docs/content/toolkits/meta-tools/ 2>/dev/null; then
96 echo "has_changes=false" >> "$GITHUB_OUTPUT"
97 echo "No changes detected"
98 else
99 echo "has_changes=true" >> "$GITHUB_OUTPUT"
100 echo "Changes detected:"
101 - git diff --stat docs/public/data/ docs/public/openapi.json docs/public/openapi-v3.json docs/content/reference/api-reference/ docs/content/reference/v3/api-reference/ docs/content/toolkits/meta-tools/ 2>/dev/null || true
101 + git diff --stat docs/public/data/ docs/public/openapi.json docs/public/openapi-v3.json docs/public/openapi-webhooks.json docs/content/reference/api-reference/ docs/content/reference/v3/api-reference/ docs/content/toolkits/meta-tools/ 2>/dev/null || true
102 fi
103
104 - name: Create Pull Request
@@ -115,7 +115,7 @@ jobs:
115
116 ## What changed
117 - **Toolkit catalog** (`docs/public/data/toolkits.json`, `toolkits-list.json`) — refreshed list of available toolkits, auth schemes, and tools from the backend API
118 - - **OpenAPI specs** (`docs/public/openapi.json`, `docs/public/openapi-v3.json`) — latest v3.1 and v3.0 API specifications fetched from production
118 + - **OpenAPI specs** (`docs/public/openapi.json`, `docs/public/openapi-v3.json`, `docs/public/openapi-webhooks.json`) — latest v3.1 and v3.0 API specifications plus the webhook-events spec, fetched from production
119 - **API reference pages** (`docs/content/reference/api-reference/`, `docs/content/reference/v3/api-reference/`) — regenerated index pages for both API versions
120 - **Meta tools reference** (`docs/public/data/meta-tools.json`, `docs/content/toolkits/meta-tools/*.mdx`) — updated meta tool schemas and reference docs
121 branch: docs/auto-update-data
@@ -124,6 +124,7 @@ jobs:
124 docs/public/data/
125 docs/public/openapi.json
126 docs/public/openapi-v3.json
127 + docs/public/openapi-webhooks.json
128 docs/content/reference/api-reference/
129 docs/content/reference/v3/api-reference/
130 docs/content/toolkits/meta-tools/
docs/api-overviews/webhook-events.mdx new
+3
@@ -0,0 +1,3 @@
1 +Webhook events delivered by the Composio platform to your registered endpoints.
2 +
3 +Configure your webhook subscriptions via the [Webhook Subscriptions API](/reference/api-reference/webhook-subscriptions/postWebhookSubscriptions), and verify signatures as described in [Verifying signatures](/docs/setting-up-triggers/subscribing-to-events#verifying-signatures).
docs/app/llms.mdx/[[...slug]]/route.ts
+142 -95
@@ -356,7 +356,7 @@ function generateCurl(
356 }
357
358 // Convert OpenAPI page to comprehensive markdown
359 -async function openapiPageToMarkdown(
359 +export async function openapiPageToMarkdown(
360 page: { url: string; data: OpenAPIPageData }
361 ): Promise<string> {
362 const { title, description } = page.data;
@@ -366,6 +366,7 @@ async function openapiPageToMarkdown(
366 const processed = await openapi.getSchema(props.document);
367 const spec = processed.dereferenced;
368 const paths = spec.paths as Record<string, Record<string, OpenAPIOperation>> | undefined;
369 + const webhooks = spec.webhooks as Record<string, Record<string, OpenAPIOperation>> | undefined;
370 const securitySchemes = (spec.components as Record<string, unknown>)?.securitySchemes as Record<string, OpenAPISecurityScheme> | undefined;
371 const servers = spec.servers as Array<{ url: string; description?: string }> | undefined;
372 const baseUrl = servers?.[0]?.url || 'https://backend.composio.dev';
@@ -377,124 +378,170 @@ async function openapiPageToMarkdown(
378 lines.push(description, '');
379 }
380
380 - // Process operations
381 - if (props.operations && paths) {
382 - for (const op of props.operations) {
383 - const pathData = paths[op.path];
384 - if (!pathData) continue;
381 + const selectedOperations: Array<{
382 + method: string;
383 + name: string;
384 + operation: OpenAPIOperation;
385 + isWebhook: boolean;
386 + }> = [];
387 +
388 + for (const op of props.operations ?? []) {
389 + const operation = paths?.[op.path]?.[op.method.toLowerCase()];
390 + if (operation) {
391 + selectedOperations.push({
392 + method: op.method,
393 + name: op.path,
394 + operation,
395 + isWebhook: false,
396 + });
397 + }
398 + }
399
386 - const operation = pathData[op.method];
387 - if (!operation) continue;
400 + for (const webhook of props.webhooks ?? []) {
401 + const operation = webhooks?.[webhook.name]?.[webhook.method.toLowerCase()];
402 + if (operation) {
403 + selectedOperations.push({
404 + method: webhook.method,
405 + name: webhook.name,
406 + operation,
407 + isWebhook: true,
408 + });
409 + }
410 + }
411
389 - lines.push('---', '');
390 - lines.push(`## ${op.method.toUpperCase()} \`${op.path}\``, '');
391 - lines.push(`**Endpoint:** \`${baseUrl}${op.path}\``, '');
412 + // Process API operations and webhook deliveries through the same schema
413 + // renderer. Fumadocs exposes them as separate page-prop collections.
414 + for (const selected of selectedOperations) {
415 + const { method, name, operation, isWebhook } = selected;
416 + lines.push('---', '');
417 + lines.push(`## ${method.toUpperCase()} \`${name}\``, '');
418 + if (isWebhook) {
419 + lines.push(`**Event type:** \`${name}\``, '');
420 + } else {
421 + lines.push(`**Endpoint:** \`${baseUrl}${name}\``, '');
422 + }
423
393 - if (operation.summary) {
394 - lines.push(`**Summary:** ${operation.summary}`, '');
395 - }
424 + if (operation.summary) {
425 + lines.push(`**Summary:** ${operation.summary}`, '');
426 + }
427
397 - if (operation.description) {
398 - lines.push(operation.description, '');
399 - }
428 + if (operation.description) {
429 + lines.push(operation.description, '');
430 + }
431
401 - // Authentication
402 - const security = operation.security;
403 - if (security && security.length > 0 && securitySchemes) {
404 - lines.push('### Authentication', '');
405 - const authMethods: string[] = [];
406 - for (const secReq of security) {
407 - for (const schemeName of Object.keys(secReq)) {
408 - const scheme = securitySchemes[schemeName];
409 - if (scheme) {
410 - if (scheme.type === 'apiKey') {
411 - authMethods.push(`**${schemeName}** - API Key in \`${scheme.in}\` header \`${scheme.name}\``);
412 - } else if (scheme.type === 'http' && scheme.scheme === 'bearer') {
413 - authMethods.push(`**${schemeName}** - Bearer token in Authorization header`);
414 - } else {
415 - authMethods.push(`**${schemeName}** - ${scheme.type}`);
416 - }
432 + // Authentication
433 + const security = operation.security;
434 + if (security && security.length > 0 && securitySchemes) {
435 + lines.push('### Authentication', '');
436 + const authMethods: string[] = [];
437 + for (const secReq of security) {
438 + for (const schemeName of Object.keys(secReq)) {
439 + const scheme = securitySchemes[schemeName];
440 + if (scheme) {
441 + if (scheme.type === 'apiKey') {
442 + authMethods.push(
443 + `**${schemeName}** - API Key in \`${scheme.in}\` header \`${scheme.name}\``
444 + );
445 + } else if (scheme.type === 'http' && scheme.scheme === 'bearer') {
446 + authMethods.push(`**${schemeName}** - Bearer token in Authorization header`);
447 + } else {
448 + authMethods.push(`**${schemeName}** - ${scheme.type}`);
449 }
450 }
451 }
420 - lines.push(authMethods.join(' OR '), '');
452 }
453 + lines.push(authMethods.join(' OR '), '');
454 + }
455
423 - // Path Parameters
424 - const pathParams = operation.parameters?.filter(p => p.in === 'path') || [];
425 - if (pathParams.length > 0) {
426 - lines.push('### Path Parameters', '');
427 - for (const param of pathParams) {
428 - const typeStr = getTypeString(param.schema || { type: 'string' });
429 - lines.push(`- \`${param.name}\` (${typeStr}) *(required)*: ${param.description || ''}`);
430 - }
431 - lines.push('');
456 + // Path Parameters
457 + const pathParams = operation.parameters?.filter(p => p.in === 'path') || [];
458 + if (pathParams.length > 0) {
459 + lines.push('### Path Parameters', '');
460 + for (const param of pathParams) {
461 + const typeStr = getTypeString(param.schema || { type: 'string' });
462 + lines.push(`- \`${param.name}\` (${typeStr}) *(required)*: ${param.description || ''}`);
463 + }
464 + lines.push('');
465 + }
466 +
467 + // Query Parameters
468 + const queryParams = operation.parameters?.filter(p => p.in === 'query') || [];
469 + if (queryParams.length > 0) {
470 + lines.push('### Query Parameters', '');
471 + for (const param of queryParams) {
472 + const typeStr = getTypeString(param.schema || { type: 'string' });
473 + const reqMark = param.required ? ' *(required)*' : '';
474 + lines.push(`- \`${param.name}\` (${typeStr})${reqMark}: ${param.description || ''}`);
475 }
476 + lines.push('');
477 + }
478
434 - // Query Parameters
435 - const queryParams = operation.parameters?.filter(p => p.in === 'query') || [];
436 - if (queryParams.length > 0) {
437 - lines.push('### Query Parameters', '');
438 - for (const param of queryParams) {
439 - const typeStr = getTypeString(param.schema || { type: 'string' });
440 - const reqMark = param.required ? ' *(required)*' : '';
441 - lines.push(`- \`${param.name}\` (${typeStr})${reqMark}: ${param.description || ''}`);
442 - }
443 - lines.push('');
479 + // Webhook delivery headers
480 + const headerParams = operation.parameters?.filter(p => p.in === 'header') || [];
481 + if (isWebhook && headerParams.length > 0) {
482 + lines.push('### Delivery Headers', '');
483 + for (const param of headerParams) {
484 + const typeStr = getTypeString(param.schema || { type: 'string' });
485 + const reqMark = param.required ? ' *(required)*' : '';
486 + lines.push(`- \`${param.name}\` (${typeStr})${reqMark}: ${param.description || ''}`);
487 }
488 + lines.push('');
489 + }
490
446 - // Request Body
447 - if (operation.requestBody?.content?.['application/json']) {
448 - lines.push('### Request Body', '');
449 - if (operation.requestBody.description) {
450 - lines.push(operation.requestBody.description, '');
451 - }
452 - const schema = operation.requestBody.content['application/json'].schema;
453 - if (schema) {
454 - lines.push('**Schema:**', '');
455 - lines.push(...renderSchema(schema));
456 - lines.push('');
491 + // Request Body
492 + if (operation.requestBody?.content?.['application/json']) {
493 + lines.push('### Request Body', '');
494 + if (operation.requestBody.description) {
495 + lines.push(operation.requestBody.description, '');
496 + }
497 + const schema = operation.requestBody.content['application/json'].schema;
498 + if (schema) {
499 + lines.push('**Schema:**', '');
500 + lines.push(...renderSchema(schema));
501 + lines.push('');
502
458 - // Example
459 - const example = operation.requestBody.content['application/json'].example ?? generateSampleValue(schema);
460 - lines.push('**Example:**', '');
461 - lines.push('```json');
462 - lines.push(JSON.stringify(example, null, 2));
463 - lines.push('```', '');
464 - }
503 + // Example
504 + const example =
505 + operation.requestBody.content['application/json'].example ?? generateSampleValue(schema);
506 + lines.push('**Example:**', '');
507 + lines.push('```json');
508 + lines.push(JSON.stringify(example, null, 2));
509 + lines.push('```', '');
510 }
511 + }
512 +
513 + // Responses
514 + if (operation.responses) {
515 + lines.push('### Responses', '');
516
467 - // Responses
468 - if (operation.responses) {
469 - lines.push('### Responses', '');
470 -
471 - for (const [status, response] of Object.entries(operation.responses)) {
472 - lines.push(`#### ${status} - ${response.description || ''}`, '');
473 -
474 - const jsonContent = response.content?.['application/json'];
475 - if (jsonContent?.schema) {
476 - lines.push('**Response Schema:**', '');
477 - lines.push(...renderSchema(jsonContent.schema));
478 - lines.push('');
479 -
480 - // Only show example for success responses
481 - if (status.startsWith('2')) {
482 - const example = jsonContent.example ?? generateSampleValue(jsonContent.schema);
483 - if (example && Object.keys(example as object).length > 0) {
484 - lines.push('**Example Response:**', '');
485 - lines.push('```json');
486 - lines.push(JSON.stringify(example, null, 2));
487 - lines.push('```', '');
488 - }
517 + for (const [status, response] of Object.entries(operation.responses)) {
518 + lines.push(`#### ${status} - ${response.description || ''}`, '');
519 +
520 + const jsonContent = response.content?.['application/json'];
521 + if (jsonContent?.schema) {
522 + lines.push('**Response Schema:**', '');
523 + lines.push(...renderSchema(jsonContent.schema));
524 + lines.push('');
525 +
526 + // Only show example for success responses
527 + if (status.startsWith('2')) {
528 + const example = jsonContent.example ?? generateSampleValue(jsonContent.schema);
529 + if (example && Object.keys(example as object).length > 0) {
530 + lines.push('**Example Response:**', '');
531 + lines.push('```json');
532 + lines.push(JSON.stringify(example, null, 2));
533 + lines.push('```', '');
534 }
535 }
536 }
537 }
538 + }
539
494 - // cURL Example
540 + // Webhook operations describe inbound deliveries rather than API calls.
541 + if (!isWebhook) {
542 lines.push('### Example cURL Request', '');
543 lines.push('```bash');
497 - lines.push(generateCurl(op.method, op.path, baseUrl, operation.parameters, operation.requestBody));
544 + lines.push(generateCurl(method, name, baseUrl, operation.parameters, operation.requestBody));
545 lines.push('```', '');
546 }
547 }
docs/content/reference/api-reference/webhook-events/index.mdx new
+27
@@ -0,0 +1,27 @@
1 +---
2 +title: Webhook Events
3 +description: "Events delivered by Composio to your registered webhook endpoints"
4 +---
5 +
6 +{/* Auto-generated from openapi-webhooks.json. Edit the overview at api-overviews/webhook-events.mdx, not this file. */}
7 +
8 +Webhook events delivered by the Composio platform to your registered endpoints.
9 +
10 +Configure your webhook subscriptions via the [Webhook Subscriptions API](/reference/api-reference/webhook-subscriptions/postWebhookSubscriptions), and verify signatures as described in [Verifying signatures](/docs/setting-up-triggers/subscribing-to-events#verifying-signatures).
11 +
12 +## Events
13 +
14 +| Event | Description |
15 +|-------|-------------|
16 +| `composio.trigger.message` | [Trigger message](/reference/api-reference/webhook-events/composio_trigger_message) |
17 +| `composio.connected_account.expired` | [Connection expired](/reference/api-reference/webhook-events/composio_connected_account_expired) |
18 +| `composio.trigger.disabled` | [Trigger disabled](/reference/api-reference/webhook-events/composio_trigger_disabled) |
19 +
20 +## Legacy payloads (deprecated)
21 +
22 +Older subscriptions may still receive these payload formats. The event type is unchanged — only the payload shape differs, selected by the subscription's version. You can upgrade an existing subscription at any time by updating its `version` — see [Update a webhook subscription](/reference/api-reference/webhook-subscriptions/patchWebhookSubscriptionsById). New integrations should use the current events above.
23 +
24 +| Event | Version | Description |
25 +|-------|---------|-------------|
26 +| `composio.trigger.message` | V2 | [Trigger message (V2)](/reference/api-reference/webhook-events/composio_trigger_message_v2) |
27 +| `composio.trigger.message` | V1 | [Trigger message (V1)](/reference/api-reference/webhook-events/composio_trigger_message_v1) |
docs/lib/openapi.ts
+8 -2
@@ -1,9 +1,15 @@
1 import { join } from 'path';
2 import { createOpenAPI } from 'fumadocs-openapi/server';
3
4 -// v3.1 (latest) — clean operationIds, default API reference
4 +// v3.1 (latest) — clean operationIds, default API reference.
5 +// The webhook-events spec (openapi-webhooks.json) is a separate OpenAPI 3.1
6 +// document whose top-level `webhooks` block documents the payloads Composio
7 +// delivers to customer webhook URLs; it renders under the "Webhook Events" tag.
8 export const openapi = createOpenAPI({
6 - input: [join(process.cwd(), 'public/openapi.json')],
9 + input: [
10 + join(process.cwd(), 'public/openapi.json'),
11 + join(process.cwd(), 'public/openapi-webhooks.json'),
12 + ],
13 proxyUrl: '/api/proxy',
14 });
15
docs/next.config.mjs
+10 -5
@@ -5,6 +5,11 @@ import { withEve } from 'eve/next';
5
6 const __dirname = dirname(fileURLToPath(import.meta.url));
7 const withMDX = createMDX();
8 +const OPENAPI_SPEC_FILES = [
9 + './public/openapi.json',
10 + './public/openapi-v3.json',
11 + './public/openapi-webhooks.json',
12 +];
13
14 /** @type {import('next').NextConfig} */
15 const config = {
@@ -28,11 +33,11 @@ const config = {
33 // (it works at build time only because `public/` exists at the project root).
34 // Explicitly trace the specs into every route that may resolve them at runtime.
35 outputFileTracingIncludes: {
31 - '/reference/**': ['./public/openapi.json', './public/openapi-v3.json'],
32 - '/reference/v3/**': ['./public/openapi.json', './public/openapi-v3.json'],
33 - '/llms.mdx/**': ['./public/openapi.json', './public/openapi-v3.json'],
34 - '/llms-full.txt/**': ['./public/openapi.json', './public/openapi-v3.json'],
35 - '/llms.txt/**': ['./public/openapi.json', './public/openapi-v3.json'],
36 + '/reference/**': [...OPENAPI_SPEC_FILES],
37 + '/reference/v3/**': [...OPENAPI_SPEC_FILES],
38 + '/llms.mdx/**': [...OPENAPI_SPEC_FILES],
39 + '/llms-full.txt/**': [...OPENAPI_SPEC_FILES],
40 + '/llms.txt/**': [...OPENAPI_SPEC_FILES],
41 },
42 images: {
43 // Enable modern image formats for better compression
docs/public/openapi-webhooks.json new
+8139
@@ -0,0 +1,8139 @@
1 +{
2 + "openapi": "3.1.0",
3 + "info": {
4 + "title": "Composio Webhook Events",
5 + "version": "1.0.0",
6 + "description": "Payloads Composio delivers to your registered webhook endpoints. Composio POSTs these to the URL on your webhook subscription. For signature verification and delivery headers, see the Verifying webhooks guide."
7 + },
8 + "tags": [
9 + {
10 + "name": "Webhook Events",
11 + "description": "Events delivered by Composio to your registered webhook endpoints"
12 + }
13 + ],
14 + "components": {
15 + "schemas": {},
16 + "parameters": {}
17 + },
18 + "paths": {},
19 + "webhooks": {
20 + "composio.trigger.message": {
21 + "post": {
22 + "operationId": "composio_trigger_message",
23 + "tags": [
24 + "Webhook Events"
25 + ],
26 + "summary": "Trigger message",
27 + "description": "Fired when a trigger receives data from an external service.",
28 + "parameters": [
29 + {
30 + "schema": {
31 + "type": "string",
32 + "description": "Unique message ID, stable across delivery retries. Use it as an idempotency key."
33 + },
34 + "required": true,
35 + "description": "Unique message ID, stable across delivery retries. Use it as an idempotency key.",
36 + "name": "webhook-id",
37 + "in": "header"
38 + },
39 + {
40 + "schema": {
41 + "type": "string",
42 + "description": "Unix timestamp (seconds) of this delivery attempt."
43 + },
44 + "required": true,
45 + "description": "Unix timestamp (seconds) of this delivery attempt.",
46 + "name": "webhook-timestamp",
47 + "in": "header"
48 + },
49 + {
50 + "schema": {
51 + "type": "string",
52 + "description": "Base64 HMAC-SHA256 signature, formatted `v1,<signature>`, over `${webhook-id}.${webhook-timestamp}.${raw_body}`."
53 + },
54 + "required": true,
55 + "description": "Base64 HMAC-SHA256 signature, formatted `v1,<signature>`, over `${webhook-id}.${webhook-timestamp}.${raw_body}`.",
56 + "name": "webhook-signature",
57 + "in": "header"
58 + },
59 + {
60 + "schema": {
61 + "type": "string",
62 + "description": "Payload version for this subscription (for example `V3`)."
63 + },
64 + "required": true,
65 + "description": "Payload version for this subscription (for example `V3`).",
66 + "name": "x-composio-webhook-version",
67 + "in": "header"
68 + },
69 + {
70 + "schema": {
71 + "type": "string",
72 + "description": "Attempt number for this delivery, starting at `1` and incrementing on each retry. The payload and `webhook-id` are identical across attempts, so use `webhook-id` for idempotency rather than this value."
73 + },
74 + "required": true,
75 + "description": "Attempt number for this delivery, starting at `1` and incrementing on each retry. The payload and `webhook-id` are identical across attempts, so use `webhook-id` for idempotency rather than this value.",
76 + "name": "x-composio-delivery-attempt",
77 + "in": "header"
78 + }
79 + ],
80 + "requestBody": {
81 + "required": true,
82 + "content": {
83 + "application/json": {
84 + "schema": {
85 + "type": "object",
86 + "properties": {
87 + "id": {
88 + "type": "string",
89 + "pattern": "^msg_[0-9a-f-]{36}$",
90 + "description": "Unique event id (msg_<uuid>). Also sent as the `webhook-id` header and stable across delivery retries — use it for idempotency."
91 + },
92 + "timestamp": {
93 + "type": "string",
94 + "format": "date-time",
95 + "description": "ISO 8601 timestamp of when the event was created."
96 + },
97 + "type": {
98 + "type": "string",
99 + "enum": [
100 + "composio.trigger.message"
101 + ]
102 + },
103 + "metadata": {
104 + "type": "object",
105 + "properties": {
106 + "log_id": {
107 + "type": "string",
108 + "description": "ID of the execution log."
109 + },
110 + "trigger_slug": {
111 + "type": "string",
112 + "description": "The trigger that fired (for example GITHUB_COMMIT_EVENT)."
113 + },
114 + "trigger_id": {
115 + "type": "string",
116 + "description": "ID of the trigger instance."
117 + },
118 + "connected_account_id": {
119 + "type": "string",
120 + "description": "ID of the connected account the trigger belongs to."
121 + },
122 + "auth_config_id": {
123 + "type": "string",
124 + "description": "ID of the auth config."
125 + },
126 + "user_id": {
127 + "type": [
128 + "string",
129 + "null"
130 + ],
131 + "description": "ID of the user for this connection, or null if not set."
132 + }
133 + },
134 + "required": [
135 + "log_id",
136 + "trigger_slug",
137 + "trigger_id",
138 + "connected_account_id",
139 + "auth_config_id",
140 + "user_id"
141 + ]
142 + },
143 + "data": {
144 + "type": "object",
145 + "additionalProperties": {},
146 + "description": "The trigger event payload. Its shape depends on the trigger — see that trigger's documentation."
147 + }
148 + },
149 + "required": [
150 + "id",
151 + "timestamp",
152 + "type",
153 + "metadata",
154 + "data"
155 + ]
156 + },
157 + "example": {
158 + "id": "msg_2f1c9e4a-3b6d-4a1e-9c2f-7d8e5a6b4c31",
159 + "type": "composio.trigger.message",
160 + "timestamp": "2026-01-15T10:30:00Z",
161 + "metadata": {
162 + "log_id": "log_abc123",
163 + "trigger_slug": "GITHUB_COMMIT_EVENT",
164 + "trigger_id": "ti_xyz789",
165 + "connected_account_id": "ca_def456",
166 + "auth_config_id": "ac_xyz789",
167 + "user_id": "user-123"
168 + },
169 + "data": {
170 + "commit_sha": "a1b2c3d",
171 + "message": "fix: resolve null pointer",
172 + "author": "jane"
173 + }
174 + }
175 + }
176 + }
177 + },
178 + "responses": {
179 + "200": {
180 + "description": "Return any 2xx status to acknowledge receipt. Non-2xx responses are retried."
181 + }
182 + }
183 + }
184 + },
185 + "composio.trigger.message.v2": {
186 + "post": {
187 + "operationId": "composio_trigger_message_v2",
188 + "tags": [
189 + "Webhook Events"
190 + ],
191 + "summary": "Trigger message (V2)",
192 + "description": "The V2 trigger payload format. New integrations should use V3.",
193 + "deprecated": true,
194 + "parameters": [
195 + {
196 + "schema": {
197 + "type": "string",
198 + "description": "Unique message ID, stable across delivery retries. Use it as an idempotency key."
199 + },
200 + "required": true,
201 + "description": "Unique message ID, stable across delivery retries. Use it as an idempotency key.",
202 + "name": "webhook-id",
203 + "in": "header"
204 + },
205 + {
206 + "schema": {
207 + "type": "string",
208 + "description": "Unix timestamp (seconds) of this delivery attempt."
209 + },
210 + "required": true,
211 + "description": "Unix timestamp (seconds) of this delivery attempt.",
212 + "name": "webhook-timestamp",
213 + "in": "header"
214 + },
215 + {
216 + "schema": {
217 + "type": "string",
218 + "description": "Base64 HMAC-SHA256 signature, formatted `v1,<signature>`, over `${webhook-id}.${webhook-timestamp}.${raw_body}`."
219 + },
220 + "required": true,
221 + "description": "Base64 HMAC-SHA256 signature, formatted `v1,<signature>`, over `${webhook-id}.${webhook-timestamp}.${raw_body}`.",
222 + "name": "webhook-signature",
223 + "in": "header"
224 + },
225 + {
226 + "schema": {
227 + "type": "string",
228 + "description": "Payload version for this subscription (for example `V3`)."
229 + },
230 + "required": true,
231 + "description": "Payload version for this subscription (for example `V3`).",
232 + "name": "x-composio-webhook-version",
233 + "in": "header"
234 + },
235 + {
236 + "schema": {
237 + "type": "string",
238 + "description": "Attempt number for this delivery, starting at `1` and incrementing on each retry. The payload and `webhook-id` are identical across attempts, so use `webhook-id` for idempotency rather than this value."
239 + },
240 + "required": true,
241 + "description": "Attempt number for this delivery, starting at `1` and incrementing on each retry. The payload and `webhook-id` are identical across attempts, so use `webhook-id` for idempotency rather than this value.",
242 + "name": "x-composio-delivery-attempt",
243 + "in": "header"
244 + }
245 + ],
246 + "requestBody": {
247 + "required": true,
248 + "content": {
249 + "application/json": {
250 + "schema": {
251 + "type": "object",
252 + "properties": {
253 + "type": {
254 + "type": "string",
255 + "description": "The trigger that fired (for example github_commit_event)."
256 + },
257 + "timestamp": {
258 + "type": "string",
259 + "format": "date-time",
260 + "description": "ISO 8601 timestamp of when the event was created."
261 + },
262 + "log_id": {
263 + "type": "string",
264 + "description": "ID of the execution log."
265 + },
266 + "data": {
267 + "allOf": [
268 + {
269 + "type": "object",
270 + "additionalProperties": {}
271 + },
272 + {
273 + "type": "object",
274 + "properties": {
275 + "connection_id": {
276 + "type": "string",
277 + "format": "uuid",
278 + "description": "UUID of the connected account."
279 + },
280 + "connection_nano_id": {
281 + "type": "string",
282 + "description": "ID of the connected account."
283 + },
284 + "trigger_nano_id": {
285 + "type": "string",
286 + "description": "ID of the trigger instance."
287 + },
288 + "trigger_id": {
289 + "type": "string",
290 + "format": "uuid",
291 + "description": "UUID of the trigger instance."
292 + },
293 + "user_id": {
294 + "type": [
295 + "string",
296 + "null"
297 + ],
298 + "description": "ID of the user for this connection, or null if not set."
299 + }
300 + },
301 + "required": [
302 + "connection_id",
303 + "connection_nano_id",
304 + "trigger_nano_id",
305 + "trigger_id",
306 + "user_id"
307 + ]
308 + }
309 + ],
310 + "description": "The trigger event payload, plus connection identifiers."
311 + }
312 + },
313 + "required": [
314 + "type",
315 + "timestamp",
316 + "log_id",
317 + "data"
318 + ]
319 + },
320 + "example": {
321 + "type": "github_commit_event",
322 + "timestamp": "2026-01-15T10:30:00Z",
323 + "log_id": "log_abc123",
324 + "data": {
325 + "commit_sha": "a1b2c3d",
326 + "message": "fix: resolve null pointer",
327 + "author": "jane",
328 + "connection_id": "d3547de1-d1f2-4344-b4c2-6d1e5a7b8c9d",
329 + "connection_nano_id": "ca_def456",
330 + "trigger_nano_id": "ti_xyz789",
331 + "trigger_id": "5727dbbb-3b26-4abe-aec6-181a7b2c3d4e",
332 + "user_id": "user-123"
333 + }
334 + }
335 + }
336 + }
337 + },
338 + "responses": {
339 + "200": {
340 + "description": "Return any 2xx status to acknowledge receipt. Non-2xx responses are retried."
341 + }
342 + }
343 + }
344 + },
345 + "composio.trigger.message.v1": {
346 + "post": {
347 + "operationId": "composio_trigger_message_v1",
348 + "tags": [
349 + "Webhook Events"
350 + ],
351 + "summary": "Trigger message (V1)",
352 + "description": "The V1 trigger payload format. New integrations should use V3.",
353 + "deprecated": true,
354 + "parameters": [
355 + {
356 + "schema": {
357 + "type": "string",
358 + "description": "Unique message ID, stable across delivery retries. Use it as an idempotency key."
359 + },
360 + "required": true,
361 + "description": "Unique message ID, stable across delivery retries. Use it as an idempotency key.",
362 + "name": "webhook-id",
363 + "in": "header"
364 + },
365 + {
366 + "schema": {
367 + "type": "string",
368 + "description": "Unix timestamp (seconds) of this delivery attempt."
369 + },
370 + "required": true,
371 + "description": "Unix timestamp (seconds) of this delivery attempt.",
372 + "name": "webhook-timestamp",
373 + "in": "header"
374 + },
375 + {
376 + "schema": {
377 + "type": "string",
378 + "description": "Base64 HMAC-SHA256 signature, formatted `v1,<signature>`, over `${webhook-id}.${webhook-timestamp}.${raw_body}`."
379 + },
380 + "required": true,
381 + "description": "Base64 HMAC-SHA256 signature, formatted `v1,<signature>`, over `${webhook-id}.${webhook-timestamp}.${raw_body}`.",
382 + "name": "webhook-signature",
383 + "in": "header"
384 + },
385 + {
386 + "schema": {
387 + "type": "string",
388 + "description": "Payload version for this subscription (for example `V3`)."
389 + },
390 + "required": true,
391 + "description": "Payload version for this subscription (for example `V3`).",
392 + "name": "x-composio-webhook-version",
393 + "in": "header"
394 + },
395 + {
396 + "schema": {
397 + "type": "string",
398 + "description": "Attempt number for this delivery, starting at `1` and incrementing on each retry. The payload and `webhook-id` are identical across attempts, so use `webhook-id` for idempotency rather than this value."
399 + },
400 + "required": true,
401 + "description": "Attempt number for this delivery, starting at `1` and incrementing on each retry. The payload and `webhook-id` are identical across attempts, so use `webhook-id` for idempotency rather than this value.",
402 + "name": "x-composio-delivery-attempt",
403 + "in": "header"
404 + }
405 + ],
406 + "requestBody": {
407 + "required": true,
408 + "content": {
409 + "application/json": {
410 + "schema": {
411 + "type": "object",
412 + "properties": {
413 + "trigger_name": {
414 + "type": "string",
415 + "description": "The trigger that fired (for example github_commit_event)."
416 + },
417 + "connection_id": {
418 + "type": "string",
419 + "format": "uuid",
420 + "description": "UUID of the connected account."
421 + },
422 + "trigger_id": {
423 + "type": "string",
424 + "format": "uuid",
425 + "description": "UUID of the trigger instance."
426 + },
427 + "payload": {
428 + "type": "object",
429 + "additionalProperties": {},
430 + "description": "The trigger event payload."
431 + },
432 + "log_id": {
433 + "type": "string",
434 + "description": "ID of the execution log."
435 + }
436 + },
437 + "required": [
438 + "trigger_name",
439 + "connection_id",
440 + "trigger_id",
441 + "payload",
442 + "log_id"
443 + ]
444 + },
445 + "example": {
446 + "trigger_name": "github_commit_event",
447 + "connection_id": "d3547de1-d1f2-4344-b4c2-6d1e5a7b8c9d",
448 + "trigger_id": "5727dbbb-3b26-4abe-aec6-181a7b2c3d4e",
449 + "payload": {
450 + "commit_sha": "a1b2c3d",
451 + "message": "fix: resolve null pointer",
452 + "author": "jane"
453 + },
454 + "log_id": "log_abc123"
455 + }
456 + }
457 + }
458 + },
459 + "responses": {
460 + "200": {
461 + "description": "Return any 2xx status to acknowledge receipt. Non-2xx responses are retried."
462 + }
463 + }
464 + }
465 + },
466 + "composio.connected_account.expired": {
467 + "post": {
468 + "operationId": "composio_connected_account_expired",
469 + "tags": [
470 + "Webhook Events"
471 + ],
472 + "summary": "Connection expired",
473 + "description": "Fired when a connected account expires and needs re-authentication.",
474 + "parameters": [
475 + {
476 + "schema": {
477 + "type": "string",
478 + "description": "Unique message ID, stable across delivery retries. Use it as an idempotency key."
479 + },
480 + "required": true,
481 + "description": "Unique message ID, stable across delivery retries. Use it as an idempotency key.",
482 + "name": "webhook-id",
483 + "in": "header"
484 + },
485 + {
486 + "schema": {
487 + "type": "string",
488 + "description": "Unix timestamp (seconds) of this delivery attempt."
489 + },
490 + "required": true,
491 + "description": "Unix timestamp (seconds) of this delivery attempt.",
492 + "name": "webhook-timestamp",
493 + "in": "header"
494 + },
495 + {
496 + "schema": {
497 + "type": "string",
498 + "description": "Base64 HMAC-SHA256 signature, formatted `v1,<signature>`, over `${webhook-id}.${webhook-timestamp}.${raw_body}`."
499 + },
500 + "required": true,
501 + "description": "Base64 HMAC-SHA256 signature, formatted `v1,<signature>`, over `${webhook-id}.${webhook-timestamp}.${raw_body}`.",
502 + "name": "webhook-signature",
503 + "in": "header"
504 + },
505 + {
506 + "schema": {
507 + "type": "string",
508 + "description": "Payload version for this subscription (for example `V3`)."
509 + },
510 + "required": true,
511 + "description": "Payload version for this subscription (for example `V3`).",
512 + "name": "x-composio-webhook-version",
513 + "in": "header"
514 + },
515 + {
516 + "schema": {
517 + "type": "string",
518 + "description": "Attempt number for this delivery, starting at `1` and incrementing on each retry. The payload and `webhook-id` are identical across attempts, so use `webhook-id` for idempotency rather than this value."
519 + },
520 + "required": true,
521 + "description": "Attempt number for this delivery, starting at `1` and incrementing on each retry. The payload and `webhook-id` are identical across attempts, so use `webhook-id` for idempotency rather than this value.",
522 + "name": "x-composio-delivery-attempt",
523 + "in": "header"
524 + }
525 + ],
526 + "requestBody": {
527 + "required": true,
528 + "content": {
529 + "application/json": {
530 + "schema": {
531 + "type": "object",
532 + "properties": {
533 + "id": {
534 + "type": "string",
535 + "pattern": "^msg_[0-9a-f-]{36}$",
536 + "description": "Unique event id (msg_<uuid>). Also sent as the `webhook-id` header and stable across delivery retries — use it for idempotency."
537 + },
538 + "timestamp": {
539 + "type": "string",
540 + "format": "date-time",
541 + "description": "ISO 8601 timestamp of when the event was created."
542 + },
543 + "type": {
544 + "type": "string",
545 + "enum": [
546 + "composio.connected_account.expired"
547 + ]
548 + },
549 + "data": {
550 + "type": "object",
551 + "properties": {
552 + "toolkit": {
553 + "type": "object",
554 + "properties": {
555 + "slug": {
556 + "type": "string",
557 + "description": "The slug of the toolkit"
558 + }
559 + },
560 + "required": [
561 + "slug"
562 + ]
563 + },
564 + "auth_config": {
565 + "type": "object",
566 + "properties": {
567 + "id": {
568 + "type": "string",
569 + "format": "authConfigId",
570 + "description": "The id of the auth config"
571 + },
572 + "auth_scheme": {
573 + "type": "string",
574 + "enum": [
575 + "OAUTH2",
576 + "OAUTH1",
577 + "API_KEY",
578 + "BASIC",
579 + "BILLCOM_AUTH",
580 + "BEARER_TOKEN",
581 + "GOOGLE_SERVICE_ACCOUNT",
582 + "NO_AUTH",
583 + "BASIC_WITH_JWT",
584 + "CALCOM_AUTH",
585 + "SERVICE_ACCOUNT",
586 + "SAML",
587 + "DCR_OAUTH",
588 + "S2S_OAUTH2"
589 + ],
590 + "description": "the authScheme is part of the connection state use it there",
591 + "deprecated": true
592 + },
593 + "is_composio_managed": {
594 + "type": "boolean",
595 + "description": "Whether the auth config is managed by Composio"
596 + },
597 + "is_disabled": {
598 + "type": "boolean",
599 + "description": "Whether the auth config is disabled"
600 + }
601 + },
602 + "required": [
603 + "id",
604 + "auth_scheme",
605 + "is_composio_managed",
606 + "is_disabled"
607 + ]
608 + },
609 + "id": {
610 + "type": "string",
611 + "format": "connectedAccountId",
612 + "description": "The id of the connection"
613 + },
614 + "word_id": {
615 + "type": [
616 + "string",
617 + "null"
618 + ],
619 + "description": "A short, token-friendly identifier for multi-account disambiguation, typically toolkit-prefixed with 1-2 words (e.g., \"gmail_red-castle\")"
620 + },
621 + "alias": {
622 + "type": [
623 + "string",
624 + "null"
625 + ],
626 + "description": "A user-defined alias for the connected account"
627 + },
628 + "user_id": {
629 + "type": "string",
630 + "description": "This is deprecated, we will not be providing userId from this api anymore, you will only be able to read via userId not get it back",
631 + "deprecated": true
632 + },
633 + "status": {
634 + "type": "string",
635 + "enum": [
636 + "INITIALIZING",
637 + "INITIATED",
638 + "ACTIVE",
639 + "FAILED",
640 + "EXPIRED",
641 + "INACTIVE",
642 + "REVOKED"
643 + ],
644 + "description": "The status of the connection"
645 + },
646 + "experimental": {
647 + "type": "object",
648 + "properties": {
649 + "account_type": {
650 + "type": "string",
651 + "enum": [
652 + "PRIVATE",
653 + "SHARED"
654 + ],
655 + "description": "Sharing model for this connected account. PRIVATE is usable only by the owning user_id. SHARED is reachable from a tool-router session only when explicitly pinned in the session config.",
656 + "x-experimental": true
657 + },
658 + "acl_config_for_shared": {
659 + "type": "object",
660 + "properties": {
661 + "allow_all_users": {
662 + "type": "boolean"
663 + },
664 + "allowed_user_ids": {
665 + "type": "array",
666 + "items": {
667 + "type": "string"
668 + }
669 + },
670 + "not_allowed_user_ids": {
671 + "type": "array",
672 + "items": {
673 + "type": "string"
674 + }
675 + }
676 + },
677 + "required": [
678 + "allow_all_users",
679 + "allowed_user_ids",
680 + "not_allowed_user_ids"
681 + ],
682 + "description": "Access control for SHARED connections. Visible only to the connection creator and project/org API key callers; non-creator cookie callers receive the response without this block.",
683 + "x-experimental": true
684 + }
685 + },
686 + "required": [
687 + "account_type"
688 + ],
689 + "description": "Experimental features - not stable, may be modified or removed in future versions.",
690 + "x-experimental": true
691 + },
692 + "created_at": {
693 + "type": "string",
694 + "description": "The created at of the connection"
695 + },
696 + "updated_at": {
697 + "type": "string",
698 + "description": "The updated at of the connection"
699 + },
700 + "state": {
701 + "oneOf": [
702 + {
703 + "type": "object",
704 + "properties": {
705 + "authScheme": {
706 + "type": "string",
707 + "enum": [
708 + "OAUTH1"
709 + ]
710 + },
711 + "val": {
712 + "oneOf": [
713 + {
714 + "type": "object",
715 + "properties": {
716 + "subdomain": {
717 + "type": "string"
718 + },
719 + "your-domain": {
720 + "type": "string"
721 + },
722 + "region": {
723 + "type": "string"
724 + },
725 + "shop": {
726 + "type": "string"
727 + },
728 + "account_url": {
729 + "type": "string"
730 + },
731 + "COMPANYDOMAIN": {
732 + "type": "string"
733 + },
734 + "extension": {
735 + "type": "string"
736 + },
737 + "form_api_base_url": {
738 + "type": "string"
739 + },
740 + "instanceEndpoint": {
741 + "type": "string"
742 + },
743 + "api_url": {
744 + "type": "string"
745 + },
746 + "borneo_dashboard_url": {
747 + "type": "string"
748 + },
749 + "proxy_username": {
750 + "type": "string"
751 + },
752 + "proxy_password": {
753 + "type": "string"
754 + },
755 + "domain": {
756 + "type": "string"
757 + },
758 + "version": {
759 + "type": "string"
760 + },
761 + "dc": {
762 + "type": "string"
763 + },
764 + "site_name": {
765 + "type": "string"
766 + },
767 + "instanceName": {
768 + "type": "string"
769 + },
770 + "account_id": {
771 + "type": "string"
772 + },
773 + "your_server": {
774 + "type": "string"
775 + },
776 + "server_location": {
777 + "type": "string"
778 + },
779 + "base_url": {
780 + "type": "string"
781 + },
782 + "status": {
783 + "type": "string",
784 + "enum": [
785 + "INITIALIZING"
786 + ]
787 + }
788 + },
789 + "required": [
790 + "status"
791 + ],
792 + "additionalProperties": {}
793 + },
794 + {
795 + "type": "object",
796 + "properties": {
797 + "subdomain": {
798 + "type": "string"
799 + },
800 + "your-domain": {
801 + "type": "string"
802 + },
803 + "region": {
804 + "type": "string"
805 + },
806 + "shop": {
807 + "type": "string"
808 + },
809 + "account_url": {
810 + "type": "string"
811 + },
812 + "COMPANYDOMAIN": {
813 + "type": "string"
814 + },
815 + "extension": {
816 + "type": "string"
817 + },
818 + "form_api_base_url": {
819 + "type": "string"
820 + },
821 + "instanceEndpoint": {
822 + "type": "string"
823 + },
824 + "api_url": {
825 + "type": "string"
826 + },
827 + "borneo_dashboard_url": {
828 + "type": "string"
829 + },
830 + "proxy_username": {
831 + "type": "string"
832 + },
833 + "proxy_password": {
834 + "type": "string"
835 + },
836 + "domain": {
837 + "type": "string"
838 + },
839 + "version": {
840 + "type": "string"
841 + },
842 + "dc": {
843 + "type": "string"
844 + },
845 + "site_name": {
846 + "type": "string"
847 + },
848 + "instanceName": {
849 + "type": "string"
850 + },
851 + "account_id": {
852 + "type": "string"
853 + },
854 + "your_server": {
855 + "type": "string"
856 + },
857 + "server_location": {
858 + "type": "string"
859 + },
860 + "base_url": {
861 + "type": "string"
862 + },
863 + "status": {
864 + "type": "string",
865 + "enum": [
866 + "INITIATED"
867 + ]
868 + },
869 + "oauth_token": {
870 + "type": "string"
871 + },
872 + "authUri": {
873 + "type": "string"
874 + },
875 + "oauth_token_secret": {
876 + "type": "string"
877 + },
878 + "redirectUrl": {
879 + "type": "string"
880 + },
881 + "callbackUrl": {
882 + "type": "string"
883 + }
884 + },
885 + "required": [
886 + "status",
887 + "oauth_token",
888 + "authUri",
889 + "oauth_token_secret",
890 + "redirectUrl"
891 + ],
892 + "additionalProperties": {}
893 + },
894 + {
895 + "type": "object",
896 + "properties": {
897 + "subdomain": {
898 + "type": "string"
899 + },
900 + "your-domain": {
901 + "type": "string"
902 + },
903 + "region": {
904 + "type": "string"
905 + },
906 + "shop": {
907 + "type": "string"
908 + },
909 + "account_url": {
910 + "type": "string"
911 + },
912 + "COMPANYDOMAIN": {
913 + "type": "string"
914 + },
915 + "extension": {
916 + "type": "string"
917 + },
918 + "form_api_base_url": {
919 + "type": "string"
920 + },
921 + "instanceEndpoint": {
922 + "type": "string"
923 + },
924 + "api_url": {
925 + "type": "string"
926 + },
927 + "borneo_dashboard_url": {
928 + "type": "string"
929 + },
930 + "proxy_username": {
931 + "type": "string"
932 + },
933 + "proxy_password": {
934 + "type": "string"
935 + },
936 + "domain": {
937 + "type": "string"
938 + },
939 + "version": {
940 + "type": "string"
941 + },
942 + "dc": {
943 + "type": "string"
944 + },
945 + "site_name": {
946 + "type": "string"
947 + },
948 + "instanceName": {
949 + "type": "string"
950 + },
951 + "account_id": {
952 + "type": "string"
953 + },
954 + "your_server": {
955 + "type": "string"
956 + },
957 + "server_location": {
958 + "type": "string"
959 + },
960 + "base_url": {
961 + "type": "string"
962 + },
963 + "status": {
964 + "type": "string",
965 + "enum": [
966 + "ACTIVE"
967 + ]
968 + },
969 + "oauth_token": {
970 + "type": "string"
971 + },
972 + "oauth_token_secret": {
973 + "type": "string"
974 + },
975 + "oauth_verifier": {
976 + "type": "string"
977 + },
978 + "consumer_key": {
979 + "type": "string"
980 + },
981 + "redirectUrl": {
982 + "type": "string"
983 + },
984 + "callback_url": {
985 + "type": "string"
986 + }
987 + },
988 + "required": [
989 + "status",
990 + "oauth_token",
991 + "oauth_token_secret"
992 + ],
993 + "additionalProperties": {}
994 + },
995 + {
996 + "type": "object",
997 + "properties": {
998 + "subdomain": {
999 + "type": "string"
1000 + },
1001 + "your-domain": {
1002 + "type": "string"
1003 + },
1004 + "region": {
1005 + "type": "string"
1006 + },
1007 + "shop": {
1008 + "type": "string"
1009 + },
1010 + "account_url": {
1011 + "type": "string"
1012 + },
1013 + "COMPANYDOMAIN": {
1014 + "type": "string"
1015 + },
1016 + "extension": {
1017 + "type": "string"
1018 + },
1019 + "form_api_base_url": {
1020 + "type": "string"
1021 + },
1022 + "instanceEndpoint": {
1023 + "type": "string"
1024 + },
1025 + "api_url": {
1026 + "type": "string"
1027 + },
1028 + "borneo_dashboard_url": {
1029 + "type": "string"
1030 + },
1031 + "proxy_username": {
1032 + "type": "string"
1033 + },
1034 + "proxy_password": {
1035 + "type": "string"
1036 + },
1037 + "domain": {
1038 + "type": "string"
1039 + },
1040 + "version": {
1041 + "type": "string"
1042 + },
1043 + "dc": {
1044 + "type": "string"
1045 + },
1046 + "site_name": {
1047 + "type": "string"
1048 + },
1049 + "instanceName": {
1050 + "type": "string"
1051 + },
1052 + "account_id": {
1053 + "type": "string"
1054 + },
1055 + "your_server": {
1056 + "type": "string"
1057 + },
1058 + "server_location": {
1059 + "type": "string"
1060 + },
1061 + "base_url": {
1062 + "type": "string"
1063 + },
1064 + "status": {
1065 + "type": "string",
1066 + "enum": [
1067 + "FAILED"
1068 + ]
1069 + },
1070 + "error": {
1071 + "type": "string"
1072 + },
1073 + "error_description": {
1074 + "type": "string"
1075 + }
1076 + },
1077 + "required": [
1078 + "status"
1079 + ],
1080 + "additionalProperties": {}
1081 + },
1082 + {
1083 + "type": "object",
1084 + "properties": {
1085 + "subdomain": {
1086 + "type": "string"
1087 + },
1088 + "your-domain": {
1089 + "type": "string"
1090 + },
1091 + "region": {
1092 + "type": "string"
1093 + },
1094 + "shop": {
1095 + "type": "string"
1096 + },
1097 + "account_url": {
1098 + "type": "string"
1099 + },
1100 + "COMPANYDOMAIN": {
1101 + "type": "string"
1102 + },
1103 + "extension": {
1104 + "type": "string"
1105 + },
1106 + "form_api_base_url": {
1107 + "type": "string"
1108 + },
1109 + "instanceEndpoint": {
1110 + "type": "string"
1111 + },
1112 + "api_url": {
1113 + "type": "string"
1114 + },
1115 + "borneo_dashboard_url": {
1116 + "type": "string"
1117 + },
1118 + "proxy_username": {
1119 + "type": "string"
1120 + },
1121 + "proxy_password": {
1122 + "type": "string"
1123 + },
1124 + "domain": {
1125 + "type": "string"
1126 + },
1127 + "version": {
1128 + "type": "string"
1129 + },
1130 + "dc": {
1131 + "type": "string"
1132 + },
1133 + "site_name": {
1134 + "type": "string"
1135 + },
1136 + "instanceName": {
1137 + "type": "string"
1138 + },
1139 + "account_id": {
1140 + "type": "string"
1141 + },
1142 + "your_server": {
1143 + "type": "string"
1144 + },
1145 + "server_location": {
1146 + "type": "string"
1147 + },
1148 + "base_url": {
1149 + "type": "string"
1150 + },
1151 + "status": {
1152 + "type": "string",
1153 + "enum": [
1154 + "EXPIRED"
1155 + ]
1156 + },
1157 + "expired_at": {
1158 + "type": "string"
1159 + }
1160 + },
1161 + "required": [
1162 + "status"
1163 + ],
1164 + "additionalProperties": {}
1165 + },
1166 + {
1167 + "type": "object",
1168 + "properties": {
1169 + "subdomain": {
1170 + "type": "string"
1171 + },
1172 + "your-domain": {
1173 + "type": "string"
1174 + },
1175 + "region": {
1176 + "type": "string"
1177 + },
1178 + "shop": {
1179 + "type": "string"
1180 + },
1181 + "account_url": {
1182 + "type": "string"
1183 + },
1184 + "COMPANYDOMAIN": {
1185 + "type": "string"
1186 + },
1187 + "extension": {
1188 + "type": "string"
1189 + },
1190 + "form_api_base_url": {
1191 + "type": "string"
1192 + },
1193 + "instanceEndpoint": {
1194 + "type": "string"
1195 + },
1196 + "api_url": {
1197 + "type": "string"
1198 + },
1199 + "borneo_dashboard_url": {
1200 + "type": "string"
1201 + },
1202 + "proxy_username": {
1203 + "type": "string"
1204 + },
1205 + "proxy_password": {
1206 + "type": "string"
1207 + },
1208 + "domain": {
1209 + "type": "string"
1210 + },
1211 + "version": {
1212 + "type": "string"
1213 + },
1214 + "dc": {
1215 + "type": "string"
1216 + },
1217 + "site_name": {
1218 + "type": "string"
1219 + },
1220 + "instanceName": {
1221 + "type": "string"
1222 + },
1223 + "account_id": {
1224 + "type": "string"
1225 + },
1226 + "your_server": {
1227 + "type": "string"
1228 + },
1229 + "server_location": {
1230 + "type": "string"
1231 + },
1232 + "base_url": {
1233 + "type": "string"
1234 + },
1235 + "status": {
1236 + "type": "string",
1237 + "enum": [
1238 + "INACTIVE"
1239 + ]
1240 + },
1241 + "oauth_token": {
1242 + "type": "string"
1243 + },
1244 + "oauth_token_secret": {
1245 + "type": "string"
1246 + },
1247 + "oauth_verifier": {
1248 + "type": "string"
1249 + },
1250 + "consumer_key": {
1251 + "type": "string"
1252 + },
1253 + "redirectUrl": {
1254 + "type": "string"
1255 + },
1256 + "callback_url": {
1257 + "type": "string"
1258 + }
1259 + },
1260 + "required": [
1261 + "status",
1262 + "oauth_token",
1263 + "oauth_token_secret"
1264 + ],
1265 + "additionalProperties": {}
1266 + }
1267 + ]
1268 + }
1269 + },
1270 + "required": [
1271 + "authScheme",
1272 + "val"
1273 + ]
1274 + },
1275 + {
1276 + "type": "object",
1277 + "properties": {
1278 + "authScheme": {
1279 + "type": "string",
1280 + "enum": [
1281 + "OAUTH2"
1282 + ]
1283 + },
1284 + "val": {
1285 + "oneOf": [
1286 + {
1287 + "type": "object",
1288 + "properties": {
1289 + "subdomain": {
1290 + "type": "string"
1291 + },
1292 + "your-domain": {
1293 + "type": "string"
1294 + },
1295 + "region": {
1296 + "type": "string"
1297 + },
1298 + "shop": {
1299 + "type": "string"
1300 + },
1301 + "account_url": {
1302 + "type": "string"
1303 + },
1304 + "COMPANYDOMAIN": {
1305 + "type": "string"
1306 + },
1307 + "extension": {
1308 + "type": "string"
1309 + },
1310 + "form_api_base_url": {
1311 + "type": "string"
1312 + },
1313 + "instanceEndpoint": {
1314 + "type": "string"
1315 + },
1316 + "api_url": {
1317 + "type": "string"
1318 + },
1319 + "borneo_dashboard_url": {
1320 + "type": "string"
1321 + },
1322 + "proxy_username": {
1323 + "type": "string"
1324 + },
1325 + "proxy_password": {
1326 + "type": "string"
1327 + },
1328 + "domain": {
1329 + "type": "string"
1330 + },
1331 + "version": {
1332 + "type": "string"
1333 + },
1334 + "dc": {
1335 + "type": "string"
1336 + },
1337 + "site_name": {
1338 + "type": "string"
1339 + },
1340 + "instanceName": {
1341 + "type": "string"
1342 + },
1343 + "account_id": {
1344 + "type": "string"
1345 + },
1346 + "your_server": {
1347 + "type": "string"
1348 + },
1349 + "server_location": {
1350 + "type": "string"
1351 + },
1352 + "base_url": {
1353 + "type": "string"
1354 + },
1355 + "status": {
1356 + "type": "string",
1357 + "enum": [
1358 + "INITIALIZING"
1359 + ]
1360 + },
1361 + "state_prefix": {
1362 + "type": "string",
1363 + "maxLength": 40,
1364 + "description": "The oauth2 state prefix for the connection"
1365 + },
1366 + "long_redirect_url": {
1367 + "type": "boolean",
1368 + "description": "Whether to return the redirect url without shortening"
1369 + }
1370 + },
1371 + "required": [
1372 + "status"
1373 + ],
1374 + "additionalProperties": {}
1375 + },
1376 + {
1377 + "type": "object",
1378 + "properties": {
1379 + "subdomain": {
1380 + "type": "string"
1381 + },
1382 + "your-domain": {
1383 + "type": "string"
1384 + },
1385 + "region": {
1386 + "type": "string"
1387 + },
1388 + "shop": {
1389 + "type": "string"
1390 + },
1391 + "account_url": {
1392 + "type": "string"
1393 + },
1394 + "COMPANYDOMAIN": {
1395 + "type": "string"
1396 + },
1397 + "extension": {
1398 + "type": "string"
1399 + },
1400 + "form_api_base_url": {
1401 + "type": "string"
1402 + },
1403 + "instanceEndpoint": {
1404 + "type": "string"
1405 + },
1406 + "api_url": {
1407 + "type": "string"
1408 + },
1409 + "borneo_dashboard_url": {
1410 + "type": "string"
1411 + },
1412 + "proxy_username": {
1413 + "type": "string"
1414 + },
1415 + "proxy_password": {
1416 + "type": "string"
1417 + },
1418 + "domain": {
1419 + "type": "string"
1420 + },
1421 + "version": {
1422 + "type": "string"
1423 + },
1424 + "dc": {
1425 + "type": "string"
1426 + },
1427 + "site_name": {
1428 + "type": "string"
1429 + },
1430 + "instanceName": {
1431 + "type": "string"
1432 + },
1433 + "account_id": {
1434 + "type": "string"
1435 + },
1436 + "your_server": {
1437 + "type": "string"
1438 + },
1439 + "server_location": {
1440 + "type": "string"
1441 + },
1442 + "base_url": {
1443 + "type": "string"
1444 + },
1445 + "status": {
1446 + "type": "string",
1447 + "enum": [
1448 + "INITIATED"
1449 + ]
1450 + },
1451 + "state_prefix": {
1452 + "type": "string",
1453 + "maxLength": 40,
1454 + "description": "The oauth2 state prefix for the connection"
1455 + },
1456 + "long_redirect_url": {
1457 + "type": "boolean",
1458 + "description": "Whether to return the redirect url without shortening"
1459 + },
1460 + "code_verifier": {
1461 + "type": "string"
1462 + },
1463 + "redirectUrl": {
1464 + "type": "string"
1465 + },
1466 + "callback_url": {
1467 + "type": "string"
1468 + },
1469 + "finalRedirectUri": {
1470 + "type": "string"
1471 + },
1472 + "webhook_signature": {
1473 + "type": "string"
1474 + }
1475 + },
1476 + "required": [
1477 + "status",
1478 + "redirectUrl"
1479 + ],
1480 + "additionalProperties": {}
1481 + },
1482 + {
1483 + "type": "object",
1484 + "properties": {
1485 + "subdomain": {
1486 + "type": "string"
1487 + },
1488 + "your-domain": {
1489 + "type": "string"
1490 + },
1491 + "region": {
1492 + "type": "string"
1493 + },
1494 + "shop": {
1495 + "type": "string"
1496 + },
1497 + "account_url": {
1498 + "type": "string"
1499 + },
1500 + "COMPANYDOMAIN": {
1501 + "type": "string"
1502 + },
1503 + "extension": {
1504 + "type": "string"
1505 + },
1506 + "form_api_base_url": {
1507 + "type": "string"
1508 + },
1509 + "instanceEndpoint": {
1510 + "type": "string"
1511 + },
1512 + "api_url": {
1513 + "type": "string"
1514 + },
1515 + "borneo_dashboard_url": {
1516 + "type": "string"
1517 + },
1518 + "proxy_username": {
1519 + "type": "string"
1520 + },
1521 + "proxy_password": {
1522 + "type": "string"
1523 + },
1524 + "domain": {
1525 + "type": "string"
1526 + },
1527 + "version": {
1528 + "type": "string"
1529 + },
1530 + "dc": {
1531 + "type": "string"
1532 + },
1533 + "site_name": {
1534 + "type": "string"
1535 + },
1536 + "instanceName": {
1537 + "type": "string"
1538 + },
1539 + "account_id": {
1540 + "type": "string"
1541 + },
1542 + "your_server": {
1543 + "type": "string"
1544 + },
1545 + "server_location": {
1546 + "type": "string"
1547 + },
1548 + "base_url": {
1549 + "type": "string"
1550 + },
1551 + "status": {
1552 + "type": "string",
1553 + "enum": [
1554 + "ACTIVE"
1555 + ]
1556 + },
1557 + "state_prefix": {
1558 + "type": "string",
1559 + "maxLength": 40,
1560 + "description": "The oauth2 state prefix for the connection"
1561 + },
1562 + "long_redirect_url": {
1563 + "type": "boolean",
1564 + "description": "Whether to return the redirect url without shortening"
1565 + },
1566 + "access_token": {
1567 + "type": "string"
1568 + },
1569 + "id_token": {
1570 + "type": "string"
1571 + },
1572 + "token_type": {
1573 + "type": "string"
1574 + },
1575 + "refresh_token": {
1576 + "type": [
1577 + "string",
1578 + "null"
1579 + ]
1580 + },
1581 + "expires_in": {
1582 + "anyOf": [
1583 + {
1584 + "type": "number"
1585 + },
1586 + {
1587 + "type": "string"
1588 + },
1589 + {
1590 + "type": "null"
1591 + }
1592 + ]
1593 + },
1594 + "scope": {
1595 + "anyOf": [
1596 + {
1597 + "type": "string"
1598 + },
1599 + {
1600 + "type": "array",
1601 + "items": {
1602 + "type": "string"
1603 + }
1604 + },
1605 + {
1606 + "type": "null"
1607 + }
1608 + ]
1609 + },
1610 + "webhook_signature": {
1611 + "type": "string"
1612 + },
1613 + "authed_user": {
1614 + "type": "object",
1615 + "properties": {
1616 + "access_token": {
1617 + "type": "string"
1618 + },
1619 + "scope": {
1620 + "type": "string"
1621 + }
1622 + },
1623 + "description": "for slack user scopes"
1624 + },
1625 + "extra_token_data": {
1626 + "type": "object",
1627 + "additionalProperties": {}
1628 + }
1629 + },
1630 + "required": [
1631 + "status",
1632 + "access_token"
1633 + ],
1634 + "additionalProperties": {}
1635 + },
1636 + {
1637 + "type": "object",
1638 + "properties": {
1639 + "subdomain": {
1640 + "type": "string"
1641 + },
1642 + "your-domain": {
1643 + "type": "string"
1644 + },
1645 + "region": {
1646 + "type": "string"
1647 + },
1648 + "shop": {
1649 + "type": "string"
1650 + },
1651 + "account_url": {
1652 + "type": "string"
1653 + },
1654 + "COMPANYDOMAIN": {
1655 + "type": "string"
1656 + },
1657 + "extension": {
1658 + "type": "string"
1659 + },
1660 + "form_api_base_url": {
1661 + "type": "string"
1662 + },
1663 + "instanceEndpoint": {
1664 + "type": "string"
1665 + },
1666 + "api_url": {
1667 + "type": "string"
1668 + },
1669 + "borneo_dashboard_url": {
1670 + "type": "string"
1671 + },
1672 + "proxy_username": {
1673 + "type": "string"
1674 + },
1675 + "proxy_password": {
1676 + "type": "string"
1677 + },
1678 + "domain": {
1679 + "type": "string"
1680 + },
1681 + "version": {
1682 + "type": "string"
1683 + },
1684 + "dc": {
1685 + "type": "string"
1686 + },
1687 + "site_name": {
1688 + "type": "string"
1689 + },
1690 + "instanceName": {
1691 + "type": "string"
1692 + },
1693 + "account_id": {
1694 + "type": "string"
1695 + },
1696 + "your_server": {
1697 + "type": "string"
1698 + },
1699 + "server_location": {
1700 + "type": "string"
1701 + },
1702 + "base_url": {
1703 + "type": "string"
1704 + },
1705 + "status": {
1706 + "type": "string",
1707 + "enum": [
1708 + "INACTIVE"
1709 + ]
1710 + },
1711 + "state_prefix": {
1712 + "type": "string",
1713 + "maxLength": 40,
1714 + "description": "The oauth2 state prefix for the connection"
1715 + },
1716 + "long_redirect_url": {
1717 + "type": "boolean",
1718 + "description": "Whether to return the redirect url without shortening"
1719 + },
1720 + "access_token": {
1721 + "type": "string"
1722 + },
1723 + "id_token": {
1724 + "type": "string"
1725 + },
1726 + "token_type": {
1727 + "type": "string"
1728 + },
1729 + "refresh_token": {
1730 + "type": [
1731 + "string",
1732 + "null"
1733 + ]
1734 + },
1735 + "expires_in": {
1736 + "anyOf": [
1737 + {
1738 + "type": "number"
1739 + },
1740 + {
1741 + "type": "string"
1742 + },
1743 + {
1744 + "type": "null"
1745 + }
1746 + ]
1747 + },
1748 + "scope": {
1749 + "anyOf": [
1750 + {
1751 + "type": "string"
1752 + },
1753 + {
1754 + "type": "array",
1755 + "items": {
1756 + "type": "string"
1757 + }
1758 + },
1759 + {
1760 + "type": "null"
1761 + }
1762 + ]
1763 + },
1764 + "webhook_signature": {
1765 + "type": "string"
1766 + },
1767 + "authed_user": {
1768 + "type": "object",
1769 + "properties": {
1770 + "access_token": {
1771 + "type": "string"
1772 + },
1773 + "scope": {
1774 + "type": "string"
1775 + }
1776 + },
1777 + "description": "for slack user scopes"
1778 + },
1779 + "extra_token_data": {
1780 + "type": "object",
1781 + "additionalProperties": {}
1782 + }
1783 + },
1784 + "required": [
1785 + "status",
1786 + "access_token"
1787 + ],
1788 + "additionalProperties": {}
1789 + },
1790 + {
1791 + "type": "object",
1792 + "properties": {
1793 + "subdomain": {
1794 + "type": "string"
1795 + },
1796 + "your-domain": {
1797 + "type": "string"
1798 + },
1799 + "region": {
1800 + "type": "string"
1801 + },
1802 + "shop": {
1803 + "type": "string"
1804 + },
1805 + "account_url": {
1806 + "type": "string"
1807 + },
1808 + "COMPANYDOMAIN": {
1809 + "type": "string"
1810 + },
1811 + "extension": {
1812 + "type": "string"
1813 + },
1814 + "form_api_base_url": {
1815 + "type": "string"
1816 + },
1817 + "instanceEndpoint": {
1818 + "type": "string"
1819 + },
1820 + "api_url": {
1821 + "type": "string"
1822 + },
1823 + "borneo_dashboard_url": {
1824 + "type": "string"
1825 + },
1826 + "proxy_username": {
1827 + "type": "string"
1828 + },
1829 + "proxy_password": {
1830 + "type": "string"
1831 + },
1832 + "domain": {
1833 + "type": "string"
1834 + },
1835 + "version": {
1836 + "type": "string"
1837 + },
1838 + "dc": {
1839 + "type": "string"
1840 + },
1841 + "site_name": {
1842 + "type": "string"
1843 + },
1844 + "instanceName": {
1845 + "type": "string"
1846 + },
1847 + "account_id": {
1848 + "type": "string"
1849 + },
1850 + "your_server": {
1851 + "type": "string"
1852 + },
1853 + "server_location": {
1854 + "type": "string"
1855 + },
1856 + "base_url": {
1857 + "type": "string"
1858 + },
1859 + "status": {
1860 + "type": "string",
1861 + "enum": [
1862 + "FAILED"
1863 + ]
1864 + },
1865 + "state_prefix": {
1866 + "type": "string",
1867 + "maxLength": 40,
1868 + "description": "The oauth2 state prefix for the connection"
1869 + },
1870 + "long_redirect_url": {
1871 + "type": "boolean",
1872 + "description": "Whether to return the redirect url without shortening"
1873 + },
1874 + "error": {
1875 + "type": "string"
1876 + },
1877 + "error_description": {
1878 + "type": "string"
1879 + }
1880 + },
1881 + "required": [
1882 + "status"
1883 + ],
1884 + "additionalProperties": {}
1885 + },
1886 + {
1887 + "type": "object",
1888 + "properties": {
1889 + "subdomain": {
1890 + "type": "string"
1891 + },
1892 + "your-domain": {
1893 + "type": "string"
1894 + },
1895 + "region": {
1896 + "type": "string"
1897 + },
1898 + "shop": {
1899 + "type": "string"
1900 + },
1901 + "account_url": {
1902 + "type": "string"
1903 + },
1904 + "COMPANYDOMAIN": {
1905 + "type": "string"
1906 + },
1907 + "extension": {
1908 + "type": "string"
1909 + },
1910 + "form_api_base_url": {
1911 + "type": "string"
1912 + },
1913 + "instanceEndpoint": {
1914 + "type": "string"
1915 + },
1916 + "api_url": {
1917 + "type": "string"
1918 + },
1919 + "borneo_dashboard_url": {
1920 + "type": "string"
1921 + },
1922 + "proxy_username": {
1923 + "type": "string"
1924 + },
1925 + "proxy_password": {
1926 + "type": "string"
1927 + },
1928 + "domain": {
1929 + "type": "string"
1930 + },
1931 + "version": {
1932 + "type": "string"
1933 + },
1934 + "dc": {
1935 + "type": "string"
1936 + },
1937 + "site_name": {
1938 + "type": "string"
1939 + },
1940 + "instanceName": {
1941 + "type": "string"
1942 + },
1943 + "account_id": {
1944 + "type": "string"
1945 + },
1946 + "your_server": {
1947 + "type": "string"
1948 + },
1949 + "server_location": {
1950 + "type": "string"
1951 + },
1952 + "base_url": {
1953 + "type": "string"
1954 + },
1955 + "status": {
1956 + "type": "string",
1957 + "enum": [
1958 + "EXPIRED"
1959 + ]
1960 + },
1961 + "state_prefix": {
1962 + "type": "string",
1963 + "maxLength": 40,
1964 + "description": "The oauth2 state prefix for the connection"
1965 + },
1966 + "long_redirect_url": {
1967 + "type": "boolean",
1968 + "description": "Whether to return the redirect url without shortening"
1969 + },
1970 + "expired_at": {
1971 + "type": "string"
1972 + }
1973 + },
1974 + "required": [
1975 + "status"
1976 + ],
1977 + "additionalProperties": {}
1978 + },
1979 + {
1980 + "type": "object",
1981 + "properties": {
1982 + "subdomain": {
1983 + "type": "string"
1984 + },
1985 + "your-domain": {
1986 + "type": "string"
1987 + },
1988 + "region": {
1989 + "type": "string"
1990 + },
1991 + "shop": {
1992 + "type": "string"
1993 + },
1994 + "account_url": {
1995 + "type": "string"
1996 + },
1997 + "COMPANYDOMAIN": {
1998 + "type": "string"
1999 + },
2000 + "extension": {
2001 + "type": "string"
2002 + },
2003 + "form_api_base_url": {
2004 + "type": "string"
2005 + },
2006 + "instanceEndpoint": {
2007 + "type": "string"
2008 + },
2009 + "api_url": {
2010 + "type": "string"
2011 + },
2012 + "borneo_dashboard_url": {
2013 + "type": "string"
2014 + },
2015 + "proxy_username": {
2016 + "type": "string"
2017 + },
2018 + "proxy_password": {
2019 + "type": "string"
2020 + },
2021 + "domain": {
2022 + "type": "string"
2023 + },
2024 + "version": {
2025 + "type": "string"
2026 + },
2027 + "dc": {
2028 + "type": "string"
2029 + },
2030 + "site_name": {
2031 + "type": "string"
2032 + },
2033 + "instanceName": {
2034 + "type": "string"
2035 + },
2036 + "account_id": {
2037 + "type": "string"
2038 + },
2039 + "your_server": {
2040 + "type": "string"
2041 + },
2042 + "server_location": {
2043 + "type": "string"
2044 + },
2045 + "base_url": {
2046 + "type": "string"
2047 + },
2048 + "status": {
2049 + "type": "string",
2050 + "enum": [
2051 + "REVOKED"
2052 + ]
2053 + },
2054 + "state_prefix": {
2055 + "type": "string",
2056 + "maxLength": 40,
2057 + "description": "The oauth2 state prefix for the connection"
2058 + },
2059 + "long_redirect_url": {
2060 + "type": "boolean",
2061 + "description": "Whether to return the redirect url without shortening"
2062 + },
2063 + "revoked_at": {
2064 + "type": "string"
2065 + }
2066 + },
2067 + "required": [
2068 + "status"
2069 + ],
2070 + "additionalProperties": {}
2071 + }
2072 + ]
2073 + }
2074 + },
2075 + "required": [
2076 + "authScheme",
2077 + "val"
2078 + ]
2079 + },
2080 + {
2081 + "type": "object",
2082 + "properties": {
2083 + "authScheme": {
2084 + "type": "string",
2085 + "enum": [
2086 + "API_KEY"
2087 + ]
2088 + },
2089 + "val": {
2090 + "oneOf": [
2091 + {
2092 + "type": "object",
2093 + "properties": {
2094 + "subdomain": {
2095 + "type": "string"
2096 + },
2097 + "your-domain": {
2098 + "type": "string"
2099 + },
2100 + "region": {
2101 + "type": "string"
2102 + },
2103 + "shop": {
2104 + "type": "string"
2105 + },
2106 + "account_url": {
2107 + "type": "string"
2108 + },
2109 + "COMPANYDOMAIN": {
2110 + "type": "string"
2111 + },
2112 + "extension": {
2113 + "type": "string"
2114 + },
2115 + "form_api_base_url": {
2116 + "type": "string"
2117 + },
2118 + "instanceEndpoint": {
2119 + "type": "string"
2120 + },
2121 + "api_url": {
2122 + "type": "string"
2123 + },
2124 + "borneo_dashboard_url": {
2125 + "type": "string"
2126 + },
2127 + "proxy_username": {
2128 + "type": "string"
2129 + },
2130 + "proxy_password": {
2131 + "type": "string"
2132 + },
2133 + "domain": {
2134 + "type": "string"
2135 + },
2136 + "version": {
2137 + "type": "string"
2138 + },
2139 + "dc": {
2140 + "type": "string"
2141 + },
2142 + "site_name": {
2143 + "type": "string"
2144 + },
2145 + "instanceName": {
2146 + "type": "string"
2147 + },
2148 + "account_id": {
2149 + "type": "string"
2150 + },
2151 + "your_server": {
2152 + "type": "string"
2153 + },
2154 + "server_location": {
2155 + "type": "string"
2156 + },
2157 + "base_url": {
2158 + "type": "string"
2159 + },
2160 + "status": {
2161 + "type": "string",
2162 + "enum": [
2163 + "INITIALIZING"
2164 + ]
2165 + }
2166 + },
2167 + "required": [
2168 + "status"
2169 + ],
2170 + "additionalProperties": {}
2171 + },
2172 + {
2173 + "type": "object",
2174 + "properties": {
2175 + "subdomain": {
2176 + "type": "string"
2177 + },
2178 + "your-domain": {
2179 + "type": "string"
2180 + },
2181 + "region": {
2182 + "type": "string"
2183 + },
2184 + "shop": {
2185 + "type": "string"
2186 + },
2187 + "account_url": {
2188 + "type": "string"
2189 + },
2190 + "COMPANYDOMAIN": {
2191 + "type": "string"
2192 + },
2193 + "extension": {
2194 + "type": "string"
2195 + },
2196 + "form_api_base_url": {
2197 + "type": "string"
2198 + },
2199 + "instanceEndpoint": {
2200 + "type": "string"
2201 + },
2202 + "api_url": {
2203 + "type": "string"
2204 + },
2205 + "borneo_dashboard_url": {
2206 + "type": "string"
2207 + },
2208 + "proxy_username": {
2209 + "type": "string"
2210 + },
2211 + "proxy_password": {
2212 + "type": "string"
2213 + },
2214 + "domain": {
2215 + "type": "string"
2216 + },
2217 + "version": {
2218 + "type": "string"
2219 + },
2220 + "dc": {
2221 + "type": "string"
2222 + },
2223 + "site_name": {
2224 + "type": "string"
2225 + },
2226 + "instanceName": {
2227 + "type": "string"
2228 + },
2229 + "account_id": {
2230 + "type": "string"
2231 + },
2232 + "your_server": {
2233 + "type": "string"
2234 + },
2235 + "server_location": {
2236 + "type": "string"
2237 + },
2238 + "base_url": {
2239 + "type": "string"
2240 + },
2241 + "status": {
2242 + "type": "string",
2243 + "enum": [
2244 + "INITIATED"
2245 + ]
2246 + }
2247 + },
2248 + "required": [
2249 + "status"
2250 + ],
2251 + "additionalProperties": {}
2252 + },
2253 + {
2254 + "type": "object",
2255 + "properties": {
2256 + "subdomain": {
2257 + "type": "string"
2258 + },
2259 + "your-domain": {
2260 + "type": "string"
2261 + },
2262 + "region": {
2263 + "type": "string"
2264 + },
2265 + "shop": {
2266 + "type": "string"
2267 + },
2268 + "account_url": {
2269 + "type": "string"
2270 + },
2271 + "COMPANYDOMAIN": {
2272 + "type": "string"
2273 + },
2274 + "extension": {
2275 + "type": "string"
2276 + },
2277 + "form_api_base_url": {
2278 + "type": "string"
2279 + },
2280 + "instanceEndpoint": {
2281 + "type": "string"
2282 + },
2283 + "api_url": {
2284 + "type": "string"
2285 + },
2286 + "borneo_dashboard_url": {
2287 + "type": "string"
2288 + },
2289 + "proxy_username": {
2290 + "type": "string"
2291 + },
2292 + "proxy_password": {
2293 + "type": "string"
2294 + },
2295 + "domain": {
2296 + "type": "string"
2297 + },
2298 + "version": {
2299 + "type": "string"
2300 + },
2301 + "dc": {
2302 + "type": "string"
2303 + },
2304 + "site_name": {
2305 + "type": "string"
2306 + },
2307 + "instanceName": {
2308 + "type": "string"
2309 + },
2310 + "account_id": {
2311 + "type": "string"
2312 + },
2313 + "your_server": {
2314 + "type": "string"
2315 + },
2316 + "server_location": {
2317 + "type": "string"
2318 + },
2319 + "base_url": {
2320 + "type": "string"
2321 + },
2322 + "status": {
2323 + "type": "string",
2324 + "enum": [
2325 + "ACTIVE"
2326 + ]
2327 + },
2328 + "generic_api_key": {
2329 + "type": "string"
2330 + },
2331 + "api_key": {
2332 + "type": "string"
2333 + },
2334 + "bearer_token": {
2335 + "type": "string"
2336 + },
2337 + "basic_encoded": {
2338 + "type": "string"
2339 + }
2340 + },
2341 + "required": [
2342 + "status"
2343 + ],
2344 + "additionalProperties": {}
2345 + },
2346 + {
2347 + "type": "object",
2348 + "properties": {
2349 + "subdomain": {
2350 + "type": "string"
2351 + },
2352 + "your-domain": {
2353 + "type": "string"
2354 + },
2355 + "region": {
2356 + "type": "string"
2357 + },
2358 + "shop": {
2359 + "type": "string"
2360 + },
2361 + "account_url": {
2362 + "type": "string"
2363 + },
2364 + "COMPANYDOMAIN": {
2365 + "type": "string"
2366 + },
2367 + "extension": {
2368 + "type": "string"
2369 + },
2370 + "form_api_base_url": {
2371 + "type": "string"
2372 + },
2373 + "instanceEndpoint": {
2374 + "type": "string"
2375 + },
2376 + "api_url": {
2377 + "type": "string"
2378 + },
2379 + "borneo_dashboard_url": {
2380 + "type": "string"
2381 + },
2382 + "proxy_username": {
2383 + "type": "string"
2384 + },
2385 + "proxy_password": {
2386 + "type": "string"
2387 + },
2388 + "domain": {
2389 + "type": "string"
2390 + },
2391 + "version": {
2392 + "type": "string"
2393 + },
2394 + "dc": {
2395 + "type": "string"
2396 + },
2397 + "site_name": {
2398 + "type": "string"
2399 + },
2400 + "instanceName": {
2401 + "type": "string"
2402 + },
2403 + "account_id": {
2404 + "type": "string"
2405 + },
2406 + "your_server": {
2407 + "type": "string"
2408 + },
2409 + "server_location": {
2410 + "type": "string"
2411 + },
2412 + "base_url": {
2413 + "type": "string"
2414 + },
2415 + "status": {
2416 + "type": "string",
2417 + "enum": [
2418 + "INACTIVE"
2419 + ]
2420 + },
2421 + "generic_api_key": {
2422 + "type": "string"
2423 + },
2424 + "api_key": {
2425 + "type": "string"
2426 + },
2427 + "bearer_token": {
2428 + "type": "string"
2429 + },
2430 + "basic_encoded": {
2431 + "type": "string"
2432 + }
2433 + },
2434 + "required": [
2435 + "status"
2436 + ],
2437 + "additionalProperties": {}
2438 + }
2439 + ]
2440 + }
2441 + },
2442 + "required": [
2443 + "authScheme",
2444 + "val"
2445 + ]
2446 + },
2447 + {
2448 + "type": "object",
2449 + "properties": {
2450 + "authScheme": {
2451 + "type": "string",
2452 + "enum": [
2453 + "BASIC"
2454 + ]
2455 + },
2456 + "val": {
2457 + "oneOf": [
2458 + {
2459 + "type": "object",
2460 + "properties": {
2461 + "subdomain": {
2462 + "type": "string"
2463 + },
2464 + "your-domain": {
2465 + "type": "string"
2466 + },
2467 + "region": {
2468 + "type": "string"
2469 + },
2470 + "shop": {
2471 + "type": "string"
2472 + },
2473 + "account_url": {
2474 + "type": "string"
2475 + },
2476 + "COMPANYDOMAIN": {
2477 + "type": "string"
2478 + },
2479 + "extension": {
2480 + "type": "string"
2481 + },
2482 + "form_api_base_url": {
2483 + "type": "string"
2484 + },
2485 + "instanceEndpoint": {
2486 + "type": "string"
2487 + },
2488 + "api_url": {
2489 + "type": "string"
2490 + },
2491 + "borneo_dashboard_url": {
2492 + "type": "string"
2493 + },
2494 + "proxy_username": {
2495 + "type": "string"
2496 + },
2497 + "proxy_password": {
2498 + "type": "string"
2499 + },
2500 + "domain": {
2501 + "type": "string"
2502 + },
2503 + "version": {
2504 + "type": "string"
2505 + },
2506 + "dc": {
2507 + "type": "string"
2508 + },
2509 + "site_name": {
2510 + "type": "string"
2511 + },
2512 + "instanceName": {
2513 + "type": "string"
2514 + },
2515 + "account_id": {
2516 + "type": "string"
2517 + },
2518 + "your_server": {
2519 + "type": "string"
2520 + },
2521 + "server_location": {
2522 + "type": "string"
2523 + },
2524 + "base_url": {
2525 + "type": "string"
2526 + },
2527 + "status": {
2528 + "type": "string",
2529 + "enum": [
2530 + "INITIALIZING"
2531 + ]
2532 + }
2533 + },
2534 + "required": [
2535 + "status"
2536 + ],
2537 + "additionalProperties": {}
2538 + },
2539 + {
2540 + "type": "object",
2541 + "properties": {
2542 + "subdomain": {
2543 + "type": "string"
2544 + },
2545 + "your-domain": {
2546 + "type": "string"
2547 + },
2548 + "region": {
2549 + "type": "string"
2550 + },
2551 + "shop": {
2552 + "type": "string"
2553 + },
2554 + "account_url": {
2555 + "type": "string"
2556 + },
2557 + "COMPANYDOMAIN": {
2558 + "type": "string"
2559 + },
2560 + "extension": {
2561 + "type": "string"
2562 + },
2563 + "form_api_base_url": {
2564 + "type": "string"
2565 + },
2566 + "instanceEndpoint": {
2567 + "type": "string"
2568 + },
2569 + "api_url": {
2570 + "type": "string"
2571 + },
2572 + "borneo_dashboard_url": {
2573 + "type": "string"
2574 + },
2575 + "proxy_username": {
2576 + "type": "string"
2577 + },
2578 + "proxy_password": {
2579 + "type": "string"
2580 + },
2581 + "domain": {
2582 + "type": "string"
2583 + },
2584 + "version": {
2585 + "type": "string"
2586 + },
2587 + "dc": {
2588 + "type": "string"
2589 + },
2590 + "site_name": {
2591 + "type": "string"
2592 + },
2593 + "instanceName": {
2594 + "type": "string"
2595 + },
2596 + "account_id": {
2597 + "type": "string"
2598 + },
2599 + "your_server": {
2600 + "type": "string"
2601 + },
2602 + "server_location": {
2603 + "type": "string"
2604 + },
2605 + "base_url": {
2606 + "type": "string"
2607 + },
2608 + "status": {
2609 + "type": "string",
2610 + "enum": [
2611 + "INITIATED"
2612 + ]
2613 + }
2614 + },
2615 + "required": [
2616 + "status"
2617 + ],
2618 + "additionalProperties": {}
2619 + },
2620 + {
2621 + "type": "object",
2622 + "properties": {
2623 + "subdomain": {
2624 + "type": "string"
2625 + },
2626 + "your-domain": {
2627 + "type": "string"
2628 + },
2629 + "region": {
2630 + "type": "string"
2631 + },
2632 + "shop": {
2633 + "type": "string"
2634 + },
2635 + "account_url": {
2636 + "type": "string"
2637 + },
2638 + "COMPANYDOMAIN": {
2639 + "type": "string"
2640 + },
2641 + "extension": {
2642 + "type": "string"
2643 + },
2644 + "form_api_base_url": {
2645 + "type": "string"
2646 + },
2647 + "instanceEndpoint": {
2648 + "type": "string"
2649 + },
2650 + "api_url": {
2651 + "type": "string"
2652 + },
2653 + "borneo_dashboard_url": {
2654 + "type": "string"
2655 + },
2656 + "proxy_username": {
2657 + "type": "string"
2658 + },
2659 + "proxy_password": {
2660 + "type": "string"
2661 + },
2662 + "domain": {
2663 + "type": "string"
2664 + },
2665 + "version": {
2666 + "type": "string"
2667 + },
2668 + "dc": {
2669 + "type": "string"
2670 + },
2671 + "site_name": {
2672 + "type": "string"
2673 + },
2674 + "instanceName": {
2675 + "type": "string"
2676 + },
2677 + "account_id": {
2678 + "type": "string"
2679 + },
2680 + "your_server": {
2681 + "type": "string"
2682 + },
2683 + "server_location": {
2684 + "type": "string"
2685 + },
2686 + "base_url": {
2687 + "type": "string"
2688 + },
2689 + "status": {
2690 + "type": "string",
2691 + "enum": [
2692 + "ACTIVE"
2693 + ]
2694 + },
2695 + "username": {
2696 + "type": "string"
2697 + },
2698 + "password": {
2699 + "type": "string"
2700 + }
2701 + },
2702 + "required": [
2703 + "status",
2704 + "username"
2705 + ],
2706 + "additionalProperties": {}
2707 + },
2708 + {
2709 + "type": "object",
2710 + "properties": {
2711 + "subdomain": {
2712 + "type": "string"
2713 + },
2714 + "your-domain": {
2715 + "type": "string"
2716 + },
2717 + "region": {
2718 + "type": "string"
2719 + },
2720 + "shop": {
2721 + "type": "string"
2722 + },
2723 + "account_url": {
2724 + "type": "string"
2725 + },
2726 + "COMPANYDOMAIN": {
2727 + "type": "string"
2728 + },
2729 + "extension": {
2730 + "type": "string"
2731 + },
2732 + "form_api_base_url": {
2733 + "type": "string"
2734 + },
2735 + "instanceEndpoint": {
2736 + "type": "string"
2737 + },
2738 + "api_url": {
2739 + "type": "string"
2740 + },
2741 + "borneo_dashboard_url": {
2742 + "type": "string"
2743 + },
2744 + "proxy_username": {
2745 + "type": "string"
2746 + },
2747 + "proxy_password": {
2748 + "type": "string"
2749 + },
2750 + "domain": {
2751 + "type": "string"
2752 + },
2753 + "version": {
2754 + "type": "string"
2755 + },
2756 + "dc": {
2757 + "type": "string"
2758 + },
2759 + "site_name": {
2760 + "type": "string"
2761 + },
2762 + "instanceName": {
2763 + "type": "string"
2764 + },
2765 + "account_id": {
2766 + "type": "string"
2767 + },
2768 + "your_server": {
2769 + "type": "string"
2770 + },
2771 + "server_location": {
2772 + "type": "string"
2773 + },
2774 + "base_url": {
2775 + "type": "string"
2776 + },
2777 + "status": {
2778 + "type": "string",
2779 + "enum": [
2780 + "INACTIVE"
2781 + ]
2782 + },
2783 + "username": {
2784 + "type": "string"
2785 + },
2786 + "password": {
2787 + "type": "string"
2788 + }
2789 + },
2790 + "required": [
2791 + "status",
2792 + "username"
2793 + ],
2794 + "additionalProperties": {}
2795 + }
2796 + ]
2797 + }
2798 + },
2799 + "required": [
2800 + "authScheme",
2801 + "val"
2802 + ]
2803 + },
2804 + {
2805 + "type": "object",
2806 + "properties": {
2807 + "authScheme": {
2808 + "type": "string",
2809 + "enum": [
2810 + "BEARER_TOKEN"
2811 + ]
2812 + },
2813 + "val": {
2814 + "oneOf": [
2815 + {
2816 + "type": "object",
2817 + "properties": {
2818 + "subdomain": {
2819 + "type": "string"
2820 + },
2821 + "your-domain": {
2822 + "type": "string"
2823 + },
2824 + "region": {
2825 + "type": "string"
2826 + },
2827 + "shop": {
2828 + "type": "string"
2829 + },
2830 + "account_url": {
2831 + "type": "string"
2832 + },
2833 + "COMPANYDOMAIN": {
2834 + "type": "string"
2835 + },
2836 + "extension": {
2837 + "type": "string"
2838 + },
2839 + "form_api_base_url": {
2840 + "type": "string"
2841 + },
2842 + "instanceEndpoint": {
2843 + "type": "string"
2844 + },
2845 + "api_url": {
2846 + "type": "string"
2847 + },
2848 + "borneo_dashboard_url": {
2849 + "type": "string"
2850 + },
2851 + "proxy_username": {
2852 + "type": "string"
2853 + },
2854 + "proxy_password": {
2855 + "type": "string"
2856 + },
2857 + "domain": {
2858 + "type": "string"
2859 + },
2860 + "version": {
2861 + "type": "string"
2862 + },
2863 + "dc": {
2864 + "type": "string"
2865 + },
2866 + "site_name": {
2867 + "type": "string"
2868 + },
2869 + "instanceName": {
2870 + "type": "string"
2871 + },
2872 + "account_id": {
2873 + "type": "string"
2874 + },
2875 + "your_server": {
2876 + "type": "string"
2877 + },
2878 + "server_location": {
2879 + "type": "string"
2880 + },
2881 + "base_url": {
2882 + "type": "string"
2883 + },
2884 + "status": {
2885 + "type": "string",
2886 + "enum": [
2887 + "INITIALIZING"
2888 + ]
2889 + }
2890 + },
2891 + "required": [
2892 + "status"
2893 + ],
2894 + "additionalProperties": {}
2895 + },
2896 + {
2897 + "type": "object",
2898 + "properties": {
2899 + "subdomain": {
2900 + "type": "string"
2901 + },
2902 + "your-domain": {
2903 + "type": "string"
2904 + },
2905 + "region": {
2906 + "type": "string"
2907 + },
2908 + "shop": {
2909 + "type": "string"
2910 + },
2911 + "account_url": {
2912 + "type": "string"
2913 + },
2914 + "COMPANYDOMAIN": {
2915 + "type": "string"
2916 + },
2917 + "extension": {
2918 + "type": "string"
2919 + },
2920 + "form_api_base_url": {
2921 + "type": "string"
2922 + },
2923 + "instanceEndpoint": {
2924 + "type": "string"
2925 + },
2926 + "api_url": {
2927 + "type": "string"
2928 + },
2929 + "borneo_dashboard_url": {
2930 + "type": "string"
2931 + },
2932 + "proxy_username": {
2933 + "type": "string"
2934 + },
2935 + "proxy_password": {
2936 + "type": "string"
2937 + },
2938 + "domain": {
2939 + "type": "string"
2940 + },
2941 + "version": {
2942 + "type": "string"
2943 + },
2944 + "dc": {
2945 + "type": "string"
2946 + },
2947 + "site_name": {
2948 + "type": "string"
2949 + },
2950 + "instanceName": {
2951 + "type": "string"
2952 + },
2953 + "account_id": {
2954 + "type": "string"
2955 + },
2956 + "your_server": {
2957 + "type": "string"
2958 + },
2959 + "server_location": {
2960 + "type": "string"
2961 + },
2962 + "base_url": {
2963 + "type": "string"
2964 + },
2965 + "status": {
2966 + "type": "string",
2967 + "enum": [
2968 + "INITIATED"
2969 + ]
2970 + }
2971 + },
2972 + "required": [
2973 + "status"
2974 + ],
2975 + "additionalProperties": {}
2976 + },
2977 + {
2978 + "type": "object",
2979 + "properties": {
2980 + "subdomain": {
2981 + "type": "string"
2982 + },
2983 + "your-domain": {
2984 + "type": "string"
2985 + },
2986 + "region": {
2987 + "type": "string"
2988 + },
2989 + "shop": {
2990 + "type": "string"
2991 + },
2992 + "account_url": {
2993 + "type": "string"
2994 + },
2995 + "COMPANYDOMAIN": {
2996 + "type": "string"
2997 + },
2998 + "extension": {
2999 + "type": "string"
3000 + },
3001 + "form_api_base_url": {
3002 + "type": "string"
3003 + },
3004 + "instanceEndpoint": {
3005 + "type": "string"
3006 + },
3007 + "api_url": {
3008 + "type": "string"
3009 + },
3010 + "borneo_dashboard_url": {
3011 + "type": "string"
3012 + },
3013 + "proxy_username": {
3014 + "type": "string"
3015 + },
3016 + "proxy_password": {
3017 + "type": "string"
3018 + },
3019 + "domain": {
3020 + "type": "string"
3021 + },
3022 + "version": {
3023 + "type": "string"
3024 + },
3025 + "dc": {
3026 + "type": "string"
3027 + },
3028 + "site_name": {
3029 + "type": "string"
3030 + },
3031 + "instanceName": {
3032 + "type": "string"
3033 + },
3034 + "account_id": {
3035 + "type": "string"
3036 + },
3037 + "your_server": {
3038 + "type": "string"
3039 + },
3040 + "server_location": {
3041 + "type": "string"
3042 + },
3043 + "base_url": {
3044 + "type": "string"
3045 + },
3046 + "status": {
3047 + "type": "string",
3048 + "enum": [
3049 + "ACTIVE"
3050 + ]
3051 + },
3052 + "token": {
3053 + "type": "string"
3054 + }
3055 + },
3056 + "required": [
3057 + "status",
3058 + "token"
3059 + ],
3060 + "additionalProperties": {}
3061 + },
3062 + {
3063 + "type": "object",
3064 + "properties": {
3065 + "subdomain": {
3066 + "type": "string"
3067 + },
3068 + "your-domain": {
3069 + "type": "string"
3070 + },
3071 + "region": {
3072 + "type": "string"
3073 + },
3074 + "shop": {
3075 + "type": "string"
3076 + },
3077 + "account_url": {
3078 + "type": "string"
3079 + },
3080 + "COMPANYDOMAIN": {
3081 + "type": "string"
3082 + },
3083 + "extension": {
3084 + "type": "string"
3085 + },
3086 + "form_api_base_url": {
3087 + "type": "string"
3088 + },
3089 + "instanceEndpoint": {
3090 + "type": "string"
3091 + },
3092 + "api_url": {
3093 + "type": "string"
3094 + },
3095 + "borneo_dashboard_url": {
3096 + "type": "string"
3097 + },
3098 + "proxy_username": {
3099 + "type": "string"
3100 + },
3101 + "proxy_password": {
3102 + "type": "string"
3103 + },
3104 + "domain": {
3105 + "type": "string"
3106 + },
3107 + "version": {
3108 + "type": "string"
3109 + },
3110 + "dc": {
3111 + "type": "string"
3112 + },
3113 + "site_name": {
3114 + "type": "string"
3115 + },
3116 + "instanceName": {
3117 + "type": "string"
3118 + },
3119 + "account_id": {
3120 + "type": "string"
3121 + },
3122 + "your_server": {
3123 + "type": "string"
3124 + },
3125 + "server_location": {
3126 + "type": "string"
3127 + },
3128 + "base_url": {
3129 + "type": "string"
3130 + },
3131 + "status": {
3132 + "type": "string",
3133 + "enum": [
3134 + "INACTIVE"
3135 + ]
3136 + },
3137 + "token": {
3138 + "type": "string"
3139 + }
3140 + },
3141 + "required": [
3142 + "status",
3143 + "token"
3144 + ],
3145 + "additionalProperties": {}
3146 + }
3147 + ]
3148 + }
3149 + },
3150 + "required": [
3151 + "authScheme",
3152 + "val"
3153 + ]
3154 + },
3155 + {
3156 + "type": "object",
3157 + "properties": {
3158 + "authScheme": {
3159 + "type": "string",
3160 + "enum": [
3161 + "GOOGLE_SERVICE_ACCOUNT"
3162 + ]
3163 + },
3164 + "val": {
3165 + "oneOf": [
3166 + {
3167 + "type": "object",
3168 + "properties": {
3169 + "subdomain": {
3170 + "type": "string"
3171 + },
3172 + "your-domain": {
3173 + "type": "string"
3174 + },
3175 + "region": {
3176 + "type": "string"
3177 + },
3178 + "shop": {
3179 + "type": "string"
3180 + },
3181 + "account_url": {
3182 + "type": "string"
3183 + },
3184 + "COMPANYDOMAIN": {
3185 + "type": "string"
3186 + },
3187 + "extension": {
3188 + "type": "string"
3189 + },
3190 + "form_api_base_url": {
3191 + "type": "string"
3192 + },
3193 + "instanceEndpoint": {
3194 + "type": "string"
3195 + },
3196 + "api_url": {
3197 + "type": "string"
3198 + },
3199 + "borneo_dashboard_url": {
3200 + "type": "string"
3201 + },
3202 + "proxy_username": {
3203 + "type": "string"
3204 + },
3205 + "proxy_password": {
3206 + "type": "string"
3207 + },
3208 + "domain": {
3209 + "type": "string"
3210 + },
3211 + "version": {
3212 + "type": "string"
3213 + },
3214 + "dc": {
3215 + "type": "string"
3216 + },
3217 + "site_name": {
3218 + "type": "string"
3219 + },
3220 + "instanceName": {
3221 + "type": "string"
3222 + },
3223 + "account_id": {
3224 + "type": "string"
3225 + },
3226 + "your_server": {
3227 + "type": "string"
3228 + },
3229 + "server_location": {
3230 + "type": "string"
3231 + },
3232 + "base_url": {
3233 + "type": "string"
3234 + },
3235 + "status": {
3236 + "type": "string",
3237 + "enum": [
3238 + "INITIALIZING"
3239 + ]
3240 + }
3241 + },
3242 + "required": [
3243 + "status"
3244 + ],
3245 + "additionalProperties": {}
3246 + },
3247 + {
3248 + "type": "object",
3249 + "properties": {
3250 + "subdomain": {
3251 + "type": "string"
3252 + },
3253 + "your-domain": {
3254 + "type": "string"
3255 + },
3256 + "region": {
3257 + "type": "string"
3258 + },
3259 + "shop": {
3260 + "type": "string"
3261 + },
3262 + "account_url": {
3263 + "type": "string"
3264 + },
3265 + "COMPANYDOMAIN": {
3266 + "type": "string"
3267 + },
3268 + "extension": {
3269 + "type": "string"
3270 + },
3271 + "form_api_base_url": {
3272 + "type": "string"
3273 + },
3274 + "instanceEndpoint": {
3275 + "type": "string"
3276 + },
3277 + "api_url": {
3278 + "type": "string"
3279 + },
3280 + "borneo_dashboard_url": {
3281 + "type": "string"
3282 + },
3283 + "proxy_username": {
3284 + "type": "string"
3285 + },
3286 + "proxy_password": {
3287 + "type": "string"
3288 + },
3289 + "domain": {
3290 + "type": "string"
3291 + },
3292 + "version": {
3293 + "type": "string"
3294 + },
3295 + "dc": {
3296 + "type": "string"
3297 + },
3298 + "site_name": {
3299 + "type": "string"
3300 + },
3301 + "instanceName": {
3302 + "type": "string"
3303 + },
3304 + "account_id": {
3305 + "type": "string"
3306 + },
3307 + "your_server": {
3308 + "type": "string"
3309 + },
3310 + "server_location": {
3311 + "type": "string"
3312 + },
3313 + "base_url": {
3314 + "type": "string"
3315 + },
3316 + "status": {
3317 + "type": "string",
3318 + "enum": [
3319 + "INITIATED"
3320 + ]
3321 + },
3322 + "redirectUrl": {
3323 + "type": "string"
3324 + },
3325 + "composio_link_redirect_url": {
3326 + "type": "string"
3327 + }
3328 + },
3329 + "required": [
3330 + "status",
3331 + "redirectUrl"
3332 + ],
3333 + "additionalProperties": {}
3334 + },
3335 + {
3336 + "type": "object",
3337 + "properties": {
3338 + "subdomain": {
3339 + "type": "string"
3340 + },
3341 + "your-domain": {
3342 + "type": "string"
3343 + },
3344 + "region": {
3345 + "type": "string"
3346 + },
3347 + "shop": {
3348 + "type": "string"
3349 + },
3350 + "account_url": {
3351 + "type": "string"
3352 + },
3353 + "COMPANYDOMAIN": {
3354 + "type": "string"
3355 + },
3356 + "extension": {
3357 + "type": "string"
3358 + },
3359 + "form_api_base_url": {
3360 + "type": "string"
3361 + },
3362 + "instanceEndpoint": {
3363 + "type": "string"
3364 + },
3365 + "api_url": {
3366 + "type": "string"
3367 + },
3368 + "borneo_dashboard_url": {
3369 + "type": "string"
3370 + },
3371 + "proxy_username": {
3372 + "type": "string"
3373 + },
3374 + "proxy_password": {
3375 + "type": "string"
3376 + },
3377 + "domain": {
3378 + "type": "string"
3379 + },
3380 + "version": {
3381 + "type": "string"
3382 + },
3383 + "dc": {
3384 + "type": "string"
3385 + },
3386 + "site_name": {
3387 + "type": "string"
3388 + },
3389 + "instanceName": {
3390 + "type": "string"
3391 + },
3392 + "account_id": {
3393 + "type": "string"
3394 + },
3395 + "your_server": {
3396 + "type": "string"
3397 + },
3398 + "server_location": {
3399 + "type": "string"
3400 + },
3401 + "base_url": {
3402 + "type": "string"
3403 + },
3404 + "status": {
3405 + "type": "string",
3406 + "enum": [
3407 + "ACTIVE"
3408 + ]
3409 + },
3410 + "credentials_json": {
3411 + "type": "string"
3412 + }
3413 + },
3414 + "required": [
3415 + "status",
3416 + "credentials_json"
3417 + ],
3418 + "additionalProperties": {}
3419 + },
3420 + {
3421 + "type": "object",
3422 + "properties": {
3423 + "subdomain": {
3424 + "type": "string"
3425 + },
3426 + "your-domain": {
3427 + "type": "string"
3428 + },
3429 + "region": {
3430 + "type": "string"
3431 + },
3432 + "shop": {
3433 + "type": "string"
3434 + },
3435 + "account_url": {
3436 + "type": "string"
3437 + },
3438 + "COMPANYDOMAIN": {
3439 + "type": "string"
3440 + },
3441 + "extension": {
3442 + "type": "string"
3443 + },
3444 + "form_api_base_url": {
3445 + "type": "string"
3446 + },
3447 + "instanceEndpoint": {
3448 + "type": "string"
3449 + },
3450 + "api_url": {
3451 + "type": "string"
3452 + },
3453 + "borneo_dashboard_url": {
3454 + "type": "string"
3455 + },
3456 + "proxy_username": {
3457 + "type": "string"
3458 + },
3459 + "proxy_password": {
3460 + "type": "string"
3461 + },
3462 + "domain": {
3463 + "type": "string"
3464 + },
3465 + "version": {
3466 + "type": "string"
3467 + },
3468 + "dc": {
3469 + "type": "string"
3470 + },
3471 + "site_name": {
3472 + "type": "string"
3473 + },
3474 + "instanceName": {
3475 + "type": "string"
3476 + },
3477 + "account_id": {
3478 + "type": "string"
3479 + },
3480 + "your_server": {
3481 + "type": "string"
3482 + },
3483 + "server_location": {
3484 + "type": "string"
3485 + },
3486 + "base_url": {
3487 + "type": "string"
3488 + },
3489 + "status": {
3490 + "type": "string",
3491 + "enum": [
3492 + "INACTIVE"
3493 + ]
3494 + },
3495 + "credentials_json": {
3496 + "type": "string"
3497 + }
3498 + },
3499 + "required": [
3500 + "status",
3501 + "credentials_json"
3502 + ],
3503 + "additionalProperties": {}
3504 + }
3505 + ]
3506 + }
3507 + },
3508 + "required": [
3509 + "authScheme",
3510 + "val"
3511 + ]
3512 + },
3513 + {
3514 + "type": "object",
3515 + "properties": {
3516 + "authScheme": {
3517 + "type": "string",
3518 + "enum": [
3519 + "NO_AUTH"
3520 + ]
3521 + },
3522 + "val": {
3523 + "oneOf": [
3524 + {
3525 + "type": "object",
3526 + "properties": {
3527 + "subdomain": {
3528 + "type": "string"
3529 + },
3530 + "your-domain": {
3531 + "type": "string"
3532 + },
3533 + "region": {
3534 + "type": "string"
3535 + },
3536 + "shop": {
3537 + "type": "string"
3538 + },
3539 + "account_url": {
3540 + "type": "string"
3541 + },
3542 + "COMPANYDOMAIN": {
3543 + "type": "string"
3544 + },
3545 + "extension": {
3546 + "type": "string"
3547 + },
3548 + "form_api_base_url": {
3549 + "type": "string"
3550 + },
3551 + "instanceEndpoint": {
3552 + "type": "string"
3553 + },
3554 + "api_url": {
3555 + "type": "string"
3556 + },
3557 + "borneo_dashboard_url": {
3558 + "type": "string"
3559 + },
3560 + "proxy_username": {
3561 + "type": "string"
3562 + },
3563 + "proxy_password": {
3564 + "type": "string"
3565 + },
3566 + "domain": {
3567 + "type": "string"
3568 + },
3569 + "version": {
3570 + "type": "string"
3571 + },
3572 + "dc": {
3573 + "type": "string"
3574 + },
3575 + "site_name": {
3576 + "type": "string"
3577 + },
3578 + "instanceName": {
3579 + "type": "string"
3580 + },
3581 + "account_id": {
3582 + "type": "string"
3583 + },
3584 + "your_server": {
3585 + "type": "string"
3586 + },
3587 + "server_location": {
3588 + "type": "string"
3589 + },
3590 + "base_url": {
3591 + "type": "string"
3592 + },
3593 + "status": {
3594 + "type": "string",
3595 + "enum": [
3596 + "INITIALIZING"
3597 + ]
3598 + }
3599 + },
3600 + "required": [
3601 + "status"
3602 + ],
3603 + "additionalProperties": {}
3604 + },
3605 + {
3606 + "type": "object",
3607 + "properties": {
3608 + "subdomain": {
3609 + "type": "string"
3610 + },
3611 + "your-domain": {
3612 + "type": "string"
3613 + },
3614 + "region": {
3615 + "type": "string"
3616 + },
3617 + "shop": {
3618 + "type": "string"
3619 + },
3620 + "account_url": {
3621 + "type": "string"
3622 + },
3623 + "COMPANYDOMAIN": {
3624 + "type": "string"
3625 + },
3626 + "extension": {
3627 + "type": "string"
3628 + },
3629 + "form_api_base_url": {
3630 + "type": "string"
3631 + },
3632 + "instanceEndpoint": {
3633 + "type": "string"
3634 + },
3635 + "api_url": {
3636 + "type": "string"
3637 + },
3638 + "borneo_dashboard_url": {
3639 + "type": "string"
3640 + },
3641 + "proxy_username": {
3642 + "type": "string"
3643 + },
3644 + "proxy_password": {
3645 + "type": "string"
3646 + },
3647 + "domain": {
3648 + "type": "string"
3649 + },
3650 + "version": {
3651 + "type": "string"
3652 + },
3653 + "dc": {
3654 + "type": "string"
3655 + },
3656 + "site_name": {
3657 + "type": "string"
3658 + },
3659 + "instanceName": {
3660 + "type": "string"
3661 + },
3662 + "account_id": {
3663 + "type": "string"
3664 + },
3665 + "your_server": {
3666 + "type": "string"
3667 + },
3668 + "server_location": {
3669 + "type": "string"
3670 + },
3671 + "base_url": {
3672 + "type": "string"
3673 + },
3674 + "status": {
3675 + "type": "string",
3676 + "enum": [
3677 + "INITIATED"
3678 + ]
3679 + }
3680 + },
3681 + "required": [
3682 + "status"
3683 + ],
3684 + "additionalProperties": {}
3685 + },
3686 + {
3687 + "type": "object",
3688 + "properties": {
3689 + "subdomain": {
3690 + "type": "string"
3691 + },
3692 + "your-domain": {
3693 + "type": "string"
3694 + },
3695 + "region": {
3696 + "type": "string"
3697 + },
3698 + "shop": {
3699 + "type": "string"
3700 + },
3701 + "account_url": {
3702 + "type": "string"
3703 + },
3704 + "COMPANYDOMAIN": {
3705 + "type": "string"
3706 + },
3707 + "extension": {
3708 + "type": "string"
3709 + },
3710 + "form_api_base_url": {
3711 + "type": "string"
3712 + },
3713 + "instanceEndpoint": {
3714 + "type": "string"
3715 + },
3716 + "api_url": {
3717 + "type": "string"
3718 + },
3719 + "borneo_dashboard_url": {
3720 + "type": "string"
3721 + },
3722 + "proxy_username": {
3723 + "type": "string"
3724 + },
3725 + "proxy_password": {
3726 + "type": "string"
3727 + },
3728 + "domain": {
3729 + "type": "string"
3730 + },
3731 + "version": {
3732 + "type": "string"
3733 + },
3734 + "dc": {
3735 + "type": "string"
3736 + },
3737 + "site_name": {
3738 + "type": "string"
3739 + },
3740 + "instanceName": {
3741 + "type": "string"
3742 + },
3743 + "account_id": {
3744 + "type": "string"
3745 + },
3746 + "your_server": {
3747 + "type": "string"
3748 + },
3749 + "server_location": {
3750 + "type": "string"
3751 + },
3752 + "base_url": {
3753 + "type": "string"
3754 + },
3755 + "status": {
3756 + "type": "string",
3757 + "enum": [
3758 + "ACTIVE"
3759 + ]
3760 + }
3761 + },
3762 + "required": [
3763 + "status"
3764 + ],
3765 + "additionalProperties": {}
3766 + },
3767 + {
3768 + "type": "object",
3769 + "properties": {
3770 + "subdomain": {
3771 + "type": "string"
3772 + },
3773 + "your-domain": {
3774 + "type": "string"
3775 + },
3776 + "region": {
3777 + "type": "string"
3778 + },
3779 + "shop": {
3780 + "type": "string"
3781 + },
3782 + "account_url": {
3783 + "type": "string"
3784 + },
3785 + "COMPANYDOMAIN": {
3786 + "type": "string"
3787 + },
3788 + "extension": {
3789 + "type": "string"
3790 + },
3791 + "form_api_base_url": {
3792 + "type": "string"
3793 + },
3794 + "instanceEndpoint": {
3795 + "type": "string"
3796 + },
3797 + "api_url": {
3798 + "type": "string"
3799 + },
3800 + "borneo_dashboard_url": {
3801 + "type": "string"
3802 + },
3803 + "proxy_username": {
3804 + "type": "string"
3805 + },
3806 + "proxy_password": {
3807 + "type": "string"
3808 + },
3809 + "domain": {
3810 + "type": "string"
3811 + },
3812 + "version": {
3813 + "type": "string"
3814 + },
3815 + "dc": {
3816 + "type": "string"
3817 + },
3818 + "site_name": {
3819 + "type": "string"
3820 + },
3821 + "instanceName": {
3822 + "type": "string"
3823 + },
3824 + "account_id": {
3825 + "type": "string"
3826 + },
3827 + "your_server": {
3828 + "type": "string"
3829 + },
3830 + "server_location": {
3831 + "type": "string"
3832 + },
3833 + "base_url": {
3834 + "type": "string"
3835 + },
3836 + "status": {
3837 + "type": "string",
3838 + "enum": [
3839 + "INACTIVE"
3840 + ]
3841 + }
3842 + },
3843 + "required": [
3844 + "status"
3845 + ],
3846 + "additionalProperties": {}
3847 + },
3848 + {
3849 + "type": "object",
3850 + "properties": {
3851 + "subdomain": {
3852 + "type": "string"
3853 + },
3854 + "your-domain": {
3855 + "type": "string"
3856 + },
3857 + "region": {
3858 + "type": "string"
3859 + },
3860 + "shop": {
3861 + "type": "string"
3862 + },
3863 + "account_url": {
3864 + "type": "string"
3865 + },
3866 + "COMPANYDOMAIN": {
3867 + "type": "string"
3868 + },
3869 + "extension": {
3870 + "type": "string"
3871 + },
3872 + "form_api_base_url": {
3873 + "type": "string"
3874 + },
3875 + "instanceEndpoint": {
3876 + "type": "string"
3877 + },
3878 + "api_url": {
3879 + "type": "string"
3880 + },
3881 + "borneo_dashboard_url": {
3882 + "type": "string"
3883 + },
3884 + "proxy_username": {
3885 + "type": "string"
3886 + },
3887 + "proxy_password": {
3888 + "type": "string"
3889 + },
3890 + "domain": {
3891 + "type": "string"
3892 + },
3893 + "version": {
3894 + "type": "string"
3895 + },
3896 + "dc": {
3897 + "type": "string"
3898 + },
3899 + "site_name": {
3900 + "type": "string"
3901 + },
3902 + "instanceName": {
3903 + "type": "string"
3904 + },
3905 + "account_id": {
3906 + "type": "string"
3907 + },
3908 + "your_server": {
3909 + "type": "string"
3910 + },
3911 + "server_location": {
3912 + "type": "string"
3913 + },
3914 + "base_url": {
3915 + "type": "string"
3916 + },
3917 + "status": {
3918 + "type": "string",
3919 + "enum": [
3920 + "FAILED"
3921 + ]
3922 + },
3923 + "error": {
3924 + "type": "string"
3925 + },
3926 + "error_description": {
3927 + "type": "string"
3928 + }
3929 + },
3930 + "required": [
3931 + "status"
3932 + ],
3933 + "additionalProperties": {}
3934 + },
3935 + {
3936 + "type": "object",
3937 + "properties": {
3938 + "subdomain": {
3939 + "type": "string"
3940 + },
3941 + "your-domain": {
3942 + "type": "string"
3943 + },
3944 + "region": {
3945 + "type": "string"
3946 + },
3947 + "shop": {
3948 + "type": "string"
3949 + },
3950 + "account_url": {
3951 + "type": "string"
3952 + },
3953 + "COMPANYDOMAIN": {
3954 + "type": "string"
3955 + },
3956 + "extension": {
3957 + "type": "string"
3958 + },
3959 + "form_api_base_url": {
3960 + "type": "string"
3961 + },
3962 + "instanceEndpoint": {
3963 + "type": "string"
3964 + },
3965 + "api_url": {
3966 + "type": "string"
3967 + },
3968 + "borneo_dashboard_url": {
3969 + "type": "string"
3970 + },
3971 + "proxy_username": {
3972 + "type": "string"
3973 + },
3974 + "proxy_password": {
3975 + "type": "string"
3976 + },
3977 + "domain": {
3978 + "type": "string"
3979 + },
3980 + "version": {
3981 + "type": "string"
3982 + },
3983 + "dc": {
3984 + "type": "string"
3985 + },
3986 + "site_name": {
3987 + "type": "string"
3988 + },
3989 + "instanceName": {
3990 + "type": "string"
3991 + },
3992 + "account_id": {
3993 + "type": "string"
3994 + },
3995 + "your_server": {
3996 + "type": "string"
3997 + },
3998 + "server_location": {
3999 + "type": "string"
4000 + },
4001 + "base_url": {
4002 + "type": "string"
4003 + },
4004 + "status": {
4005 + "type": "string",
4006 + "enum": [
4007 + "EXPIRED"
4008 + ]
4009 + },
4010 + "expired_at": {
4011 + "type": "string"
4012 + }
4013 + },
4014 + "required": [
4015 + "status"
4016 + ],
4017 + "additionalProperties": {}
4018 + }
4019 + ]
4020 + }
4021 + },
4022 + "required": [
4023 + "authScheme",
4024 + "val"
4025 + ]
4026 + },
4027 + {
4028 + "type": "object",
4029 + "properties": {
4030 + "authScheme": {
4031 + "type": "string",
4032 + "enum": [
4033 + "CALCOM_AUTH"
4034 + ]
4035 + },
4036 + "val": {
4037 + "oneOf": [
4038 + {
4039 + "type": "object",
4040 + "properties": {
4041 + "subdomain": {
4042 + "type": "string"
4043 + },
4044 + "your-domain": {
4045 + "type": "string"
4046 + },
4047 + "region": {
4048 + "type": "string"
4049 + },
4050 + "shop": {
4051 + "type": "string"
4052 + },
4053 + "account_url": {
4054 + "type": "string"
4055 + },
4056 + "COMPANYDOMAIN": {
4057 + "type": "string"
4058 + },
4059 + "extension": {
4060 + "type": "string"
4061 + },
4062 + "form_api_base_url": {
4063 + "type": "string"
4064 + },
4065 + "instanceEndpoint": {
4066 + "type": "string"
4067 + },
4068 + "api_url": {
4069 + "type": "string"
4070 + },
4071 + "borneo_dashboard_url": {
4072 + "type": "string"
4073 + },
4074 + "proxy_username": {
4075 + "type": "string"
4076 + },
4077 + "proxy_password": {
4078 + "type": "string"
4079 + },
4080 + "domain": {
4081 + "type": "string"
4082 + },
4083 + "version": {
4084 + "type": "string"
4085 + },
4086 + "dc": {
4087 + "type": "string"
4088 + },
4089 + "site_name": {
4090 + "type": "string"
4091 + },
4092 + "instanceName": {
4093 + "type": "string"
4094 + },
4095 + "account_id": {
4096 + "type": "string"
4097 + },
4098 + "your_server": {
4099 + "type": "string"
4100 + },
4101 + "server_location": {
4102 + "type": "string"
4103 + },
4104 + "base_url": {
4105 + "type": "string"
4106 + },
4107 + "status": {
4108 + "type": "string",
4109 + "enum": [
4110 + "INITIALIZING"
4111 + ]
4112 + }
4113 + },
4114 + "required": [
4115 + "status"
4116 + ],
4117 + "additionalProperties": {}
4118 + },
4119 + {
4120 + "type": "object",
4121 + "properties": {
4122 + "subdomain": {
4123 + "type": "string"
4124 + },
4125 + "your-domain": {
4126 + "type": "string"
4127 + },
4128 + "region": {
4129 + "type": "string"
4130 + },
4131 + "shop": {
4132 + "type": "string"
4133 + },
4134 + "account_url": {
4135 + "type": "string"
4136 + },
4137 + "COMPANYDOMAIN": {
4138 + "type": "string"
4139 + },
4140 + "extension": {
4141 + "type": "string"
4142 + },
4143 + "form_api_base_url": {
4144 + "type": "string"
4145 + },
4146 + "instanceEndpoint": {
4147 + "type": "string"
4148 + },
4149 + "api_url": {
4150 + "type": "string"
4151 + },
4152 + "borneo_dashboard_url": {
4153 + "type": "string"
4154 + },
4155 + "proxy_username": {
4156 + "type": "string"
4157 + },
4158 + "proxy_password": {
4159 + "type": "string"
4160 + },
4161 + "domain": {
4162 + "type": "string"
4163 + },
4164 + "version": {
4165 + "type": "string"
4166 + },
4167 + "dc": {
4168 + "type": "string"
4169 + },
4170 + "site_name": {
4171 + "type": "string"
4172 + },
4173 + "instanceName": {
4174 + "type": "string"
4175 + },
4176 + "account_id": {
4177 + "type": "string"
4178 + },
4179 + "your_server": {
4180 + "type": "string"
4181 + },
4182 + "server_location": {
4183 + "type": "string"
4184 + },
4185 + "base_url": {
4186 + "type": "string"
4187 + },
4188 + "status": {
4189 + "type": "string",
4190 + "enum": [
4191 + "INITIATED"
4192 + ]
4193 + }
4194 + },
4195 + "required": [
4196 + "status"
4197 + ],
4198 + "additionalProperties": {}
4199 + },
4200 + {
4201 + "type": "object",
4202 + "properties": {
4203 + "subdomain": {
4204 + "type": "string"
4205 + },
4206 + "your-domain": {
4207 + "type": "string"
4208 + },
4209 + "region": {
4210 + "type": "string"
4211 + },
4212 + "shop": {
4213 + "type": "string"
4214 + },
4215 + "account_url": {
4216 + "type": "string"
4217 + },
4218 + "COMPANYDOMAIN": {
4219 + "type": "string"
4220 + },
4221 + "extension": {
4222 + "type": "string"
4223 + },
4224 + "form_api_base_url": {
4225 + "type": "string"
4226 + },
4227 + "instanceEndpoint": {
4228 + "type": "string"
4229 + },
4230 + "api_url": {
4231 + "type": "string"
4232 + },
4233 + "borneo_dashboard_url": {
4234 + "type": "string"
4235 + },
4236 + "proxy_username": {
4237 + "type": "string"
4238 + },
4239 + "proxy_password": {
4240 + "type": "string"
4241 + },
4242 + "domain": {
4243 + "type": "string"
4244 + },
4245 + "version": {
4246 + "type": "string"
4247 + },
4248 + "dc": {
4249 + "type": "string"
4250 + },
4251 + "site_name": {
4252 + "type": "string"
4253 + },
4254 + "instanceName": {
4255 + "type": "string"
4256 + },
4257 + "account_id": {
4258 + "type": "string"
4259 + },
4260 + "your_server": {
4261 + "type": "string"
4262 + },
4263 + "server_location": {
4264 + "type": "string"
4265 + },
4266 + "base_url": {
4267 + "type": "string"
4268 + },
4269 + "status": {
4270 + "type": "string",
4271 + "enum": [
4272 + "ACTIVE"
4273 + ]
4274 + }
4275 + },
4276 + "required": [
4277 + "status"
4278 + ],
4279 + "additionalProperties": {}
4280 + },
4281 + {
4282 + "type": "object",
4283 + "properties": {
4284 + "subdomain": {
4285 + "type": "string"
4286 + },
4287 + "your-domain": {
4288 + "type": "string"
4289 + },
4290 + "region": {
4291 + "type": "string"
4292 + },
4293 + "shop": {
4294 + "type": "string"
4295 + },
4296 + "account_url": {
4297 + "type": "string"
4298 + },
4299 + "COMPANYDOMAIN": {
4300 + "type": "string"
4301 + },
4302 + "extension": {
4303 + "type": "string"
4304 + },
4305 + "form_api_base_url": {
4306 + "type": "string"
4307 + },
4308 + "instanceEndpoint": {
4309 + "type": "string"
4310 + },
4311 + "api_url": {
4312 + "type": "string"
4313 + },
4314 + "borneo_dashboard_url": {
4315 + "type": "string"
4316 + },
4317 + "proxy_username": {
4318 + "type": "string"
4319 + },
4320 + "proxy_password": {
4321 + "type": "string"
4322 + },
4323 + "domain": {
4324 + "type": "string"
4325 + },
4326 + "version": {
4327 + "type": "string"
4328 + },
4329 + "dc": {
4330 + "type": "string"
4331 + },
4332 + "site_name": {
4333 + "type": "string"
4334 + },
4335 + "instanceName": {
4336 + "type": "string"
4337 + },
4338 + "account_id": {
4339 + "type": "string"
4340 + },
4341 + "your_server": {
4342 + "type": "string"
4343 + },
4344 + "server_location": {
4345 + "type": "string"
4346 + },
4347 + "base_url": {
4348 + "type": "string"
4349 + },
4350 + "status": {
4351 + "type": "string",
4352 + "enum": [
4353 + "INACTIVE"
4354 + ]
4355 + }
4356 + },
4357 + "required": [
4358 + "status"
4359 + ],
4360 + "additionalProperties": {}
4361 + },
4362 + {
4363 + "type": "object",
4364 + "properties": {
4365 + "subdomain": {
4366 + "type": "string"
4367 + },
4368 + "your-domain": {
4369 + "type": "string"
4370 + },
4371 + "region": {
4372 + "type": "string"
4373 + },
4374 + "shop": {
4375 + "type": "string"
4376 + },
4377 + "account_url": {
4378 + "type": "string"
4379 + },
4380 + "COMPANYDOMAIN": {
4381 + "type": "string"
4382 + },
4383 + "extension": {
4384 + "type": "string"
4385 + },
4386 + "form_api_base_url": {
4387 + "type": "string"
4388 + },
4389 + "instanceEndpoint": {
4390 + "type": "string"
4391 + },
4392 + "api_url": {
4393 + "type": "string"
4394 + },
4395 + "borneo_dashboard_url": {
4396 + "type": "string"
4397 + },
4398 + "proxy_username": {
4399 + "type": "string"
4400 + },
4401 + "proxy_password": {
4402 + "type": "string"
4403 + },
4404 + "domain": {
4405 + "type": "string"
4406 + },
4407 + "version": {
4408 + "type": "string"
4409 + },
4410 + "dc": {
4411 + "type": "string"
4412 + },
4413 + "site_name": {
4414 + "type": "string"
4415 + },
4416 + "instanceName": {
4417 + "type": "string"
4418 + },
4419 + "account_id": {
4420 + "type": "string"
4421 + },
4422 + "your_server": {
4423 + "type": "string"
4424 + },
4425 + "server_location": {
4426 + "type": "string"
4427 + },
4428 + "base_url": {
4429 + "type": "string"
4430 + },
4431 + "status": {
4432 + "type": "string",
4433 + "enum": [
4434 + "FAILED"
4435 + ]
4436 + },
4437 + "error": {
4438 + "type": "string"
4439 + },
4440 + "error_description": {
4441 + "type": "string"
4442 + }
4443 + },
4444 + "required": [
4445 + "status"
4446 + ],
4447 + "additionalProperties": {}
4448 + },
4449 + {
4450 + "type": "object",
4451 + "properties": {
4452 + "subdomain": {
4453 + "type": "string"
4454 + },
4455 + "your-domain": {
4456 + "type": "string"
4457 + },
4458 + "region": {
4459 + "type": "string"
4460 + },
4461 + "shop": {
4462 + "type": "string"
4463 + },
4464 + "account_url": {
4465 + "type": "string"
4466 + },
4467 + "COMPANYDOMAIN": {
4468 + "type": "string"
4469 + },
4470 + "extension": {
4471 + "type": "string"
4472 + },
4473 + "form_api_base_url": {
4474 + "type": "string"
4475 + },
4476 + "instanceEndpoint": {
4477 + "type": "string"
4478 + },
4479 + "api_url": {
4480 + "type": "string"
4481 + },
4482 + "borneo_dashboard_url": {
4483 + "type": "string"
4484 + },
4485 + "proxy_username": {
4486 + "type": "string"
4487 + },
4488 + "proxy_password": {
4489 + "type": "string"
4490 + },
4491 + "domain": {
4492 + "type": "string"
4493 + },
4494 + "version": {
4495 + "type": "string"
4496 + },
4497 + "dc": {
4498 + "type": "string"
4499 + },
4500 + "site_name": {
4501 + "type": "string"
4502 + },
4503 + "instanceName": {
4504 + "type": "string"
4505 + },
4506 + "account_id": {
4507 + "type": "string"
4508 + },
4509 + "your_server": {
4510 + "type": "string"
4511 + },
4512 + "server_location": {
4513 + "type": "string"
4514 + },
4515 + "base_url": {
4516 + "type": "string"
4517 + },
4518 + "status": {
4519 + "type": "string",
4520 + "enum": [
4521 + "EXPIRED"
4522 + ]
4523 + },
4524 + "expired_at": {
4525 + "type": "string"
4526 + }
4527 + },
4528 + "required": [
4529 + "status"
4530 + ],
4531 + "additionalProperties": {}
4532 + }
4533 + ]
4534 + }
4535 + },
4536 + "required": [
4537 + "authScheme",
4538 + "val"
4539 + ]
4540 + },
4541 + {
4542 + "type": "object",
4543 + "properties": {
4544 + "authScheme": {
4545 + "type": "string",
4546 + "enum": [
4547 + "BILLCOM_AUTH"
4548 + ]
4549 + },
4550 + "val": {
4551 + "oneOf": [
4552 + {
4553 + "type": "object",
4554 + "properties": {
4555 + "subdomain": {
4556 + "type": "string"
4557 + },
4558 + "your-domain": {
4559 + "type": "string"
4560 + },
4561 + "region": {
4562 + "type": "string"
4563 + },
4564 + "shop": {
4565 + "type": "string"
4566 + },
4567 + "account_url": {
4568 + "type": "string"
4569 + },
4570 + "COMPANYDOMAIN": {
4571 + "type": "string"
4572 + },
4573 + "extension": {
4574 + "type": "string"
4575 + },
4576 + "form_api_base_url": {
4577 + "type": "string"
4578 + },
4579 + "instanceEndpoint": {
4580 + "type": "string"
4581 + },
4582 + "api_url": {
4583 + "type": "string"
4584 + },
4585 + "borneo_dashboard_url": {
4586 + "type": "string"
4587 + },
4588 + "proxy_username": {
4589 + "type": "string"
4590 + },
4591 + "proxy_password": {
4592 + "type": "string"
4593 + },
4594 + "domain": {
4595 + "type": "string"
4596 + },
4597 + "version": {
4598 + "type": "string"
4599 + },
4600 + "dc": {
4601 + "type": "string"
4602 + },
4603 + "site_name": {
4604 + "type": "string"
4605 + },
4606 + "instanceName": {
4607 + "type": "string"
4608 + },
4609 + "account_id": {
4610 + "type": "string"
4611 + },
4612 + "your_server": {
4613 + "type": "string"
4614 + },
4615 + "server_location": {
4616 + "type": "string"
4617 + },
4618 + "base_url": {
4619 + "type": "string"
4620 + },
4621 + "status": {
4622 + "type": "string",
4623 + "enum": [
4624 + "INITIALIZING"
4625 + ]
4626 + }
4627 + },
4628 + "required": [
4629 + "status"
4630 + ],
4631 + "additionalProperties": {}
4632 + },
4633 + {
4634 + "type": "object",
4635 + "properties": {
4636 + "subdomain": {
4637 + "type": "string"
4638 + },
4639 + "your-domain": {
4640 + "type": "string"
4641 + },
4642 + "region": {
4643 + "type": "string"
4644 + },
4645 + "shop": {
4646 + "type": "string"
4647 + },
4648 + "account_url": {
4649 + "type": "string"
4650 + },
4651 + "COMPANYDOMAIN": {
4652 + "type": "string"
4653 + },
4654 + "extension": {
4655 + "type": "string"
4656 + },
4657 + "form_api_base_url": {
4658 + "type": "string"
4659 + },
4660 + "instanceEndpoint": {
4661 + "type": "string"
4662 + },
4663 + "api_url": {
4664 + "type": "string"
4665 + },
4666 + "borneo_dashboard_url": {
4667 + "type": "string"
4668 + },
4669 + "proxy_username": {
4670 + "type": "string"
4671 + },
4672 + "proxy_password": {
4673 + "type": "string"
4674 + },
4675 + "domain": {
4676 + "type": "string"
4677 + },
4678 + "version": {
4679 + "type": "string"
4680 + },
4681 + "dc": {
4682 + "type": "string"
4683 + },
4684 + "site_name": {
4685 + "type": "string"
4686 + },
4687 + "instanceName": {
4688 + "type": "string"
4689 + },
4690 + "account_id": {
4691 + "type": "string"
4692 + },
4693 + "your_server": {
4694 + "type": "string"
4695 + },
4696 + "server_location": {
4697 + "type": "string"
4698 + },
4699 + "base_url": {
4700 + "type": "string"
4701 + },
4702 + "status": {
4703 + "type": "string",
4704 + "enum": [
4705 + "INITIATED"
4706 + ]
4707 + },
4708 + "redirectUrl": {
4709 + "type": "string"
4710 + }
4711 + },
4712 + "required": [
4713 + "status",
4714 + "redirectUrl"
4715 + ],
4716 + "additionalProperties": {}
4717 + },
4718 + {
4719 + "type": "object",
4720 + "properties": {
4721 + "subdomain": {
4722 + "type": "string"
4723 + },
4724 + "your-domain": {
4725 + "type": "string"
4726 + },
4727 + "region": {
4728 + "type": "string"
4729 + },
4730 + "shop": {
4731 + "type": "string"
4732 + },
4733 + "account_url": {
4734 + "type": "string"
4735 + },
4736 + "COMPANYDOMAIN": {
4737 + "type": "string"
4738 + },
4739 + "extension": {
4740 + "type": "string"
4741 + },
4742 + "form_api_base_url": {
4743 + "type": "string"
4744 + },
4745 + "instanceEndpoint": {
4746 + "type": "string"
4747 + },
4748 + "api_url": {
4749 + "type": "string"
4750 + },
4751 + "borneo_dashboard_url": {
4752 + "type": "string"
4753 + },
4754 + "proxy_username": {
4755 + "type": "string"
4756 + },
4757 + "proxy_password": {
4758 + "type": "string"
4759 + },
4760 + "domain": {
4761 + "type": "string"
4762 + },
4763 + "version": {
4764 + "type": "string"
4765 + },
4766 + "dc": {
4767 + "type": "string"
4768 + },
4769 + "site_name": {
4770 + "type": "string"
4771 + },
4772 + "instanceName": {
4773 + "type": "string"
4774 + },
4775 + "account_id": {
4776 + "type": "string"
4777 + },
4778 + "your_server": {
4779 + "type": "string"
4780 + },
4781 + "server_location": {
4782 + "type": "string"
4783 + },
4784 + "base_url": {
4785 + "type": "string"
4786 + },
4787 + "status": {
4788 + "type": "string",
4789 + "enum": [
4790 + "ACTIVE"
4791 + ]
4792 + },
4793 + "sessionId": {
4794 + "type": "string"
4795 + },
4796 + "devKey": {
4797 + "type": "string"
4798 + }
4799 + },
4800 + "required": [
4801 + "status",
4802 + "sessionId",
4803 + "devKey"
4804 + ],
4805 + "additionalProperties": {}
4806 + },
4807 + {
4808 + "type": "object",
4809 + "properties": {
4810 + "subdomain": {
4811 + "type": "string"
4812 + },
4813 + "your-domain": {
4814 + "type": "string"
4815 + },
4816 + "region": {
4817 + "type": "string"
4818 + },
4819 + "shop": {
4820 + "type": "string"
4821 + },
4822 + "account_url": {
4823 + "type": "string"
4824 + },
4825 + "COMPANYDOMAIN": {
4826 + "type": "string"
4827 + },
4828 + "extension": {
4829 + "type": "string"
4830 + },
4831 + "form_api_base_url": {
4832 + "type": "string"
4833 + },
4834 + "instanceEndpoint": {
4835 + "type": "string"
4836 + },
4837 + "api_url": {
4838 + "type": "string"
4839 + },
4840 + "borneo_dashboard_url": {
4841 + "type": "string"
4842 + },
4843 + "proxy_username": {
4844 + "type": "string"
4845 + },
4846 + "proxy_password": {
4847 + "type": "string"
4848 + },
4849 + "domain": {
4850 + "type": "string"
4851 + },
4852 + "version": {
4853 + "type": "string"
4854 + },
4855 + "dc": {
4856 + "type": "string"
4857 + },
4858 + "site_name": {
4859 + "type": "string"
4860 + },
4861 + "instanceName": {
4862 + "type": "string"
4863 + },
4864 + "account_id": {
4865 + "type": "string"
4866 + },
4867 + "your_server": {
4868 + "type": "string"
4869 + },
4870 + "server_location": {
4871 + "type": "string"
4872 + },
4873 + "base_url": {
4874 + "type": "string"
4875 + },
4876 + "status": {
4877 + "type": "string",
4878 + "enum": [
4879 + "INACTIVE"
4880 + ]
4881 + },
4882 + "sessionId": {
4883 + "type": "string"
4884 + },
4885 + "devKey": {
4886 + "type": "string"
4887 + }
4888 + },
4889 + "required": [
4890 + "status",
4891 + "sessionId",
4892 + "devKey"
4893 + ],
4894 + "additionalProperties": {}
4895 + },
4896 + {
4897 + "type": "object",
4898 + "properties": {
4899 + "subdomain": {
4900 + "type": "string"
4901 + },
4902 + "your-domain": {
4903 + "type": "string"
4904 + },
4905 + "region": {
4906 + "type": "string"
4907 + },
4908 + "shop": {
4909 + "type": "string"
4910 + },
4911 + "account_url": {
4912 + "type": "string"
4913 + },
4914 + "COMPANYDOMAIN": {
4915 + "type": "string"
4916 + },
4917 + "extension": {
4918 + "type": "string"
4919 + },
4920 + "form_api_base_url": {
4921 + "type": "string"
4922 + },
4923 + "instanceEndpoint": {
4924 + "type": "string"
4925 + },
4926 + "api_url": {
4927 + "type": "string"
4928 + },
4929 + "borneo_dashboard_url": {
4930 + "type": "string"
4931 + },
4932 + "proxy_username": {
4933 + "type": "string"
4934 + },
4935 + "proxy_password": {
4936 + "type": "string"
4937 + },
4938 + "domain": {
4939 + "type": "string"
4940 + },
4941 + "version": {
4942 + "type": "string"
4943 + },
4944 + "dc": {
4945 + "type": "string"
4946 + },
4947 + "site_name": {
4948 + "type": "string"
4949 + },
4950 + "instanceName": {
4951 + "type": "string"
4952 + },
4953 + "account_id": {
4954 + "type": "string"
4955 + },
4956 + "your_server": {
4957 + "type": "string"
4958 + },
4959 + "server_location": {
4960 + "type": "string"
4961 + },
4962 + "base_url": {
4963 + "type": "string"
4964 + },
4965 + "status": {
4966 + "type": "string",
4967 + "enum": [
4968 + "FAILED"
4969 + ]
4970 + },
4971 + "error": {
4972 + "type": "string"
4973 + },
4974 + "error_description": {
4975 + "type": "string"
4976 + }
4977 + },
4978 + "required": [
4979 + "status"
4980 + ],
4981 + "additionalProperties": {}
4982 + },
4983 + {
4984 + "type": "object",
4985 + "properties": {
4986 + "subdomain": {
4987 + "type": "string"
4988 + },
4989 + "your-domain": {
4990 + "type": "string"
4991 + },
4992 + "region": {
4993 + "type": "string"
4994 + },
4995 + "shop": {
4996 + "type": "string"
4997 + },
4998 + "account_url": {
4999 + "type": "string"

This file is too large to show in full.

docs/scripts/fetch-openapi.mjs
+356 -168
@@ -1,38 +1,184 @@
1 /**
2 * Fetches and filters the OpenAPI specs for fumadocs.
3 - * Outputs two separate spec files:
4 - * - public/openapi.json (v3.1 — latest, clean operationIds)
5 - * - public/openapi-v3.json (v3.0)
3 + *
4 + * Heads-up: "3.1" is overloaded below. The first two are OpenAPI 3.0.0
5 + * DOCUMENTS that happen to describe different COMPOSIO API versions; the third
6 + * is an OpenAPI 3.1.0 document (a format version, not an API version).
7 + *
8 + * Outputs three spec files:
9 + * - public/openapi.json Composio API v3.1, as an OpenAPI 3.0.0 doc
10 + * (latest; operationIds cleaned)
11 + * - public/openapi-v3.json Composio API v3.0, as an OpenAPI 3.0.0 doc
12 + * - public/openapi-webhooks.json webhook event payloads, as an OpenAPI 3.1.0
13 + * doc. The format bump is the whole reason
14 + * this is a separate file: the top-level
15 + * `webhooks` object does not exist in 3.0, so
16 + * these cannot live in openapi.json.
17 *
18 * Run: bun run scripts/fetch-openapi.mjs
19 */
20
21 import { writeFileSync } from 'node:fs';
11 -import { fileURLToPath } from 'node:url';
22 import { dirname, join } from 'node:path';
13 -import { PRODUCTION_BASE_URL, PRODUCTION_API_V3_URL, PRODUCTION_API_V31_URL } from './production-api.mjs';
23 +import { fileURLToPath } from 'node:url';
24 +import { z } from 'zod';
25 +import { fetchWithRetry } from './fetch-with-retry';
26 +import {
27 + PRODUCTION_BASE_URL,
28 + PRODUCTION_API_V3_URL,
29 + PRODUCTION_API_V31_URL,
30 +} from './production-api.mjs';
31
32 const OPENAPI_V3_URL = process.env.OPENAPI_SPEC_URL || `${PRODUCTION_API_V3_URL}/openapi.json`;
16 -const OPENAPI_V31_URL = process.env.OPENAPI_V31_SPEC_URL || `${PRODUCTION_API_V31_URL}/openapi.json`;
33 +const OPENAPI_V31_URL =
34 + process.env.OPENAPI_V31_SPEC_URL || `${PRODUCTION_API_V31_URL}/openapi.json`;
35 +const OPENAPI_WEBHOOKS_URL =
36 + process.env.OPENAPI_WEBHOOKS_SPEC_URL || `${PRODUCTION_API_V31_URL}/openapi-webhooks.json`;
37 +const SCRIPT_DIRECTORY = dirname(fileURLToPath(import.meta.url));
38 +const HTTP_METHODS = ['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'];
39
40 // Tags to ignore (internal/admin)
19 -const IGNORED_TAGS = [
20 - 'CLI',
21 - 'Admin',
22 - 'Profiling',
23 - 'User',
24 - 'x-internal',
25 -];
26 -
27 -async function fetchSpec(url) {
41 +const IGNORED_TAGS = new Set(['CLI', 'Admin', 'Profiling', 'User', 'x-internal']);
42 +
43 +const NonEmptyStringSchema = z.string().trim().min(1);
44 +const JsonObjectSchema = z.object({}).passthrough();
45 +const TagSchema = z
46 + .object({
47 + name: NonEmptyStringSchema,
48 + description: z.string().optional(),
49 + })
50 + .passthrough();
51 +const OperationSchema = z
52 + .object({
53 + tags: z.array(NonEmptyStringSchema).optional(),
54 + operationId: NonEmptyStringSchema.optional(),
55 + security: z.array(z.record(z.string(), z.unknown())).optional(),
56 + 'x-internal': z.boolean().optional(),
57 + })
58 + .passthrough();
59 +const PathItemSchema = z
60 + .object({
61 + get: OperationSchema.optional(),
62 + put: OperationSchema.optional(),
63 + post: OperationSchema.optional(),
64 + delete: OperationSchema.optional(),
65 + options: OperationSchema.optional(),
66 + head: OperationSchema.optional(),
67 + patch: OperationSchema.optional(),
68 + trace: OperationSchema.optional(),
69 + })
70 + .passthrough();
71 +const OpenApiDocumentSchema = z
72 + .object({
73 + openapi: NonEmptyStringSchema,
74 + paths: z.record(z.string(), PathItemSchema),
75 + tags: z.array(TagSchema).optional(),
76 + components: z
77 + .object({
78 + securitySchemes: z.record(z.string(), z.unknown()).optional(),
79 + })
80 + .passthrough()
81 + .optional(),
82 + })
83 + .passthrough();
84 +
85 +const JsonRequestBodySchema = z
86 + .object({
87 + content: z
88 + .object({
89 + 'application/json': z
90 + .object({
91 + schema: JsonObjectSchema,
92 + })
93 + .passthrough(),
94 + })
95 + .passthrough(),
96 + })
97 + .passthrough();
98 +const WebhookOperationSchema = OperationSchema.extend({
99 + operationId: NonEmptyStringSchema,
100 + tags: z.array(NonEmptyStringSchema).min(1),
101 + requestBody: JsonRequestBodySchema,
102 +});
103 +const WebhookItemSchema = z
104 + .object({
105 + post: WebhookOperationSchema,
106 + })
107 + .passthrough();
108 +const WebhookDocumentSchema = z
109 + .object({
110 + openapi: z.string().refine(version => version.startsWith('3.1'), {
111 + error: 'Expected an OpenAPI 3.1 document',
112 + }),
113 + tags: z.array(TagSchema).min(1),
114 + webhooks: z
115 + .record(NonEmptyStringSchema, WebhookItemSchema)
116 + .refine(webhooks => Object.keys(webhooks).length > 0, {
117 + error: 'Expected at least one webhook event',
118 + }),
119 + })
120 + .passthrough()
121 + .superRefine((document, context) => {
122 + const declaredTags = new Set(document.tags.map(tag => tag.name));
123 + const operationIds = new Set();
124 +
125 + for (const [eventName, item] of Object.entries(document.webhooks)) {
126 + for (const tag of item.post.tags) {
127 + if (!declaredTags.has(tag)) {
128 + context.addIssue({
129 + code: 'custom',
130 + path: ['webhooks', eventName, 'post', 'tags'],
131 + message: `Tag "${tag}" is not declared in document.tags`,
132 + });
133 + }
134 + }
135 +
136 + if (operationIds.has(item.post.operationId)) {
137 + context.addIssue({
138 + code: 'custom',
139 + path: ['webhooks', eventName, 'post', 'operationId'],
140 + message: `Duplicate operationId "${item.post.operationId}"`,
141 + });
142 + }
143 + operationIds.add(item.post.operationId);
144 + }
145 + });
146 +
147 +async function fetchJson(url) {
148 console.log(`Fetching OpenAPI spec from ${url}...`);
29 - const response = await fetch(url);
149 + const response = await fetchWithRetry(url);
150 if (!response.ok) {
151 throw new Error(`Failed to fetch ${url}: ${response.status}`);
152 }
153 return response.json();
154 }
155
156 +function formatZodError(error) {
157 + return error.issues
158 + .map(issue => `${issue.path.join('.') || 'document'}: ${issue.message}`)
159 + .join('; ');
160 +}
161 +
162 +function parseDocument(schema, payload, label) {
163 + const parsed = schema.safeParse(payload);
164 + if (!parsed.success) {
165 + throw new Error(`Invalid ${label}: ${formatZodError(parsed.error)}`);
166 + }
167 +
168 + // Zod confirms the boundary; the clone preserves the upstream document's key
169 + // order instead of serializing Zod's schema-key order into generated files.
170 + return structuredClone(payload);
171 +}
172 +
173 +function forEachOperation(paths, callback) {
174 + for (const pathItem of Object.values(paths)) {
175 + for (const method of HTTP_METHODS) {
176 + const operation = pathItem[method];
177 + if (operation) callback(operation);
178 + }
179 + }
180 +}
181 +
182 /**
183 * Filter paths: remove ignored/internal tags, keep first tag only.
184 */
@@ -40,32 +186,28 @@ function filterPaths(paths) {
186 const filteredPaths = {};
187 let removedCount = 0;
188
43 - for (const [path, methods] of Object.entries(paths)) {
44 - const filteredMethods = {};
189 + for (const [path, pathItem] of Object.entries(paths)) {
190 + const filteredPathItem = { ...pathItem };
191
46 - for (const [method, operation] of Object.entries(methods)) {
47 - const tags = operation.tags || [];
48 - const hasValidTag = tags.some(tag => !IGNORED_TAGS.includes(tag));
192 + for (const method of HTTP_METHODS) {
193 + const operation = pathItem[method];
194 + if (!operation) continue;
195
50 - if (!hasValidTag && tags.length > 0) {
51 - removedCount++;
52 - continue;
53 - }
196 + const tags = operation.tags ?? [];
197 + const isInternal = operation['x-internal'] === true || tags.includes('x-internal');
198 + const hasOnlyIgnoredTags = tags.length > 0 && tags.every(tag => IGNORED_TAGS.has(tag));
199
55 - if (operation['x-internal'] === true || tags.includes('x-internal')) {
200 + if (isInternal || hasOnlyIgnoredTags) {
201 + delete filteredPathItem[method];
202 removedCount++;
57 - continue;
203 + } else if (tags.length > 1) {
204 + filteredPathItem[method] = { ...operation, tags: [tags[0]] };
205 }
59 -
60 - if (tags.length > 1) {
61 - operation.tags = [tags[0]];
62 - }
63 -
64 - filteredMethods[method] = operation;
206 }
207
67 - if (Object.keys(filteredMethods).length > 0) {
68 - filteredPaths[path] = filteredMethods;
208 + const hasOperation = HTTP_METHODS.some(method => filteredPathItem[method]);
209 + if (hasOperation || filteredPathItem.$ref) {
210 + filteredPaths[path] = filteredPathItem;
211 }
212 }
213
@@ -76,18 +218,113 @@ function filterPaths(paths) {
218 * Strip version prefixes from operationIds (e.g. getV3_1Tools → getTools).
219 */
220 function cleanOperationIds(paths) {
79 - for (const methods of Object.values(paths)) {
80 - for (const operation of Object.values(methods)) {
81 - if (operation.operationId) {
82 - // Remove V3_1, V3_0, etc. prefixes from operationId
83 - operation.operationId = operation.operationId.replace(/V\d+_\d+/g, '');
221 + forEachOperation(paths, operation => {
222 + if (operation.operationId) {
223 + operation.operationId = operation.operationId.replace(/V\d+_\d+/g, '');
224 + }
225 + });
226 +}
227 +
228 +function mergePropertySchemas(existing, incoming) {
229 + if (!existing) return structuredClone(incoming);
230 +
231 + const merged = structuredClone(existing);
232 + if (existing.enum && incoming.enum) {
233 + merged.enum = [...new Set([...existing.enum, ...incoming.enum])];
234 + }
235 + if (existing.properties && incoming.properties) {
236 + merged.properties = { ...existing.properties };
237 + for (const [key, value] of Object.entries(incoming.properties)) {
238 + merged.properties[key] = mergePropertySchemas(merged.properties[key], value);
239 + }
240 + }
241 + return merged;
242 +}
243 +
244 +function visitObjects(value, visitor, parentKey = '') {
245 + if (Array.isArray(value)) {
246 + for (const item of value) visitObjects(item, visitor, parentKey);
247 + return;
248 + }
249 + if (!value || typeof value !== 'object') return;
250 +
251 + visitor(value, parentKey);
252 + for (const [key, child] of Object.entries(value)) {
253 + visitObjects(child, visitor, key);
254 + }
255 +}
256 +
257 +function normalizeLargeObjectUnions(spec) {
258 + visitObjects(spec, schema => {
259 + for (const unionKey of ['anyOf', 'oneOf']) {
260 + const variants = schema[unionKey];
261 + if (!Array.isArray(variants) || variants.length <= 5) continue;
262 +
263 + const objectSchemas = variants.filter(
264 + variant => variant?.type === 'object' && variant.properties
265 + );
266 + const mostlyObjects =
267 + objectSchemas.length > 5 && objectSchemas.length >= variants.length * 0.8;
268 + if (!mostlyObjects) continue;
269 +
270 + const mergedProperties = {};
271 + for (const objectSchema of objectSchemas) {
272 + for (const [name, property] of Object.entries(objectSchema.properties)) {
273 + mergedProperties[name] = mergePropertySchemas(mergedProperties[name], property);
274 + }
275 + }
276 +
277 + const universallyRequired = [
278 + ...new Set(objectSchemas.flatMap(objectSchema => objectSchema.required ?? [])),
279 + ].filter(name => objectSchemas.every(objectSchema => objectSchema.required?.includes(name)));
280 +
281 + delete schema[unionKey];
282 + schema.type = 'object';
283 + schema.properties = mergedProperties;
284 + schema.additionalProperties = true;
285 + if (universallyRequired.length > 0) {
286 + schema.required = universallyRequired;
287 + }
288 + }
289 + });
290 +}
291 +
292 +function fixNullableWithoutType(spec) {
293 + visitObjects(spec, (schema, parentKey) => {
294 + const needsType =
295 + schema.nullable === true &&
296 + !schema.type &&
297 + !schema.$ref &&
298 + !schema.oneOf &&
299 + !schema.anyOf &&
300 + !schema.allOf;
301 + if (needsType) {
302 + if (parentKey === 'additionalProperties') {
303 + delete schema.nullable;
304 + } else if (Array.isArray(schema.example)) {
305 + schema.type = 'array';
306 + } else {
307 + schema.type = 'object';
308 }
309 }
310 + });
311 +}
312 +
313 +function removeCookieAuthentication(spec) {
314 + if (spec.components?.securitySchemes?.CookieAuth) {
315 + delete spec.components.securitySchemes.CookieAuth;
316 }
317 +
318 + forEachOperation(spec.paths, operation => {
319 + if (!operation.security) return;
320 +
321 + operation.security = operation.security.filter(requirement => !('CookieAuth' in requirement));
322 + if (operation.security.length === 0) delete operation.security;
323 + });
324 }
325
326 /**
90 - * Post-process a spec: remove CookieAuth, normalize unions, fix nullable.
327 + * Post-process a spec: pin production, hide internal API, and normalize schemas.
328 */
329 function postProcessSpec(spec) {
330 // Pin the server to production. The published docs must always show the
@@ -100,146 +337,97 @@ function postProcessSpec(spec) {
337 description: 'PRODUCTION API',
338 },
339 ];
103 -
104 - // Filter tags list
340 if (spec.tags) {
106 - spec.tags = spec.tags.filter(tag => !IGNORED_TAGS.includes(tag.name));
341 + spec.tags = spec.tags.filter(tag => !IGNORED_TAGS.has(tag.name));
342 }
343
109 - // Remove CookieAuth from security schemes
110 - if (spec.components?.securitySchemes?.CookieAuth) {
111 - delete spec.components.securitySchemes.CookieAuth;
112 - }
344 + removeCookieAuthentication(spec);
345 + normalizeLargeObjectUnions(spec);
346 + fixNullableWithoutType(spec);
347 +}
348
114 - // Remove CookieAuth from all endpoint security arrays
115 - for (const methods of Object.values(spec.paths)) {
116 - for (const operation of Object.values(methods)) {
117 - if (operation.security) {
118 - operation.security = operation.security.filter(sec => !('CookieAuth' in sec));
119 - if (operation.security.length === 0) {
120 - delete operation.security;
121 - }
122 - }
123 - }
124 - }
349 +export function prepareApiSpec(payload, apiVersion) {
350 + const spec = parseDocument(
351 + OpenApiDocumentSchema,
352 + payload,
353 + `Composio API v${apiVersion} OpenAPI document`
354 + );
355 + const { filteredPaths, removedCount } = filterPaths(spec.paths);
356 + spec.paths = filteredPaths;
357
126 - // Normalize overly complex anyOf/oneOf schemas
127 - const mergePropertySchemas = (existing, incoming) => {
128 - if (!existing) return JSON.parse(JSON.stringify(incoming));
129 - const merged = JSON.parse(JSON.stringify(existing));
130 - if (existing.enum && incoming.enum) {
131 - merged.enum = [...new Set([...existing.enum, ...incoming.enum])];
132 - }
133 - if (existing.properties && incoming.properties) {
134 - merged.properties = { ...existing.properties };
135 - for (const [key, val] of Object.entries(incoming.properties)) {
136 - merged.properties[key] = mergePropertySchemas(merged.properties[key], val);
137 - }
138 - }
139 - return merged;
140 - };
358 + cleanOperationIds(spec.paths);
359 + forEachOperation(spec.paths, operation => {
360 + operation['x-api-version'] = apiVersion;
361 + });
362 + postProcessSpec(spec);
363
142 - const normalizeUnionSchemas = (obj) => {
143 - if (!obj || typeof obj !== 'object') return;
144 - for (const unionKey of ['anyOf', 'oneOf']) {
145 - if (obj[unionKey] && Array.isArray(obj[unionKey]) && obj[unionKey].length > 5) {
146 - const objectSchemas = obj[unionKey].filter(s => s.type === 'object' && s.properties);
147 - if (objectSchemas.length > 5 && objectSchemas.length >= obj[unionKey].length * 0.8) {
148 - const mergedProperties = {};
149 - const allRequired = new Set();
150 - for (const schema of objectSchemas) {
151 - for (const [propName, propSchema] of Object.entries(schema.properties || {})) {
152 - mergedProperties[propName] = mergePropertySchemas(mergedProperties[propName], propSchema);
153 - }
154 - if (schema.required) {
155 - for (const req of schema.required) allRequired.add(req);
156 - }
157 - }
158 - const universallyRequired = [...allRequired].filter(req =>
159 - objectSchemas.every(s => s.required && s.required.includes(req))
160 - );
161 - delete obj[unionKey];
162 - obj.type = 'object';
163 - obj.properties = mergedProperties;
164 - if (universallyRequired.length > 0) obj.required = universallyRequired;
165 - obj.additionalProperties = true;
166 - }
167 - }
168 - }
169 - for (const val of Object.values(obj)) {
170 - if (Array.isArray(val)) val.forEach(item => normalizeUnionSchemas(item));
171 - else normalizeUnionSchemas(val);
172 - }
173 - };
174 - normalizeUnionSchemas(spec);
364 + return { spec, removedCount };
365 +}
366
176 - // Fix invalid OpenAPI 3.0: "nullable: true" without "type"
177 - const fixNullableWithoutType = (obj, parentKey = '') => {
178 - if (!obj || typeof obj !== 'object') return;
179 - if (obj.nullable === true && !obj.type && !obj.$ref && !obj.oneOf && !obj.anyOf && !obj.allOf) {
180 - if (parentKey === 'additionalProperties') {
181 - delete obj.nullable;
182 - } else if (obj.example && typeof obj.example === 'object' && !Array.isArray(obj.example)) {
183 - obj.type = 'object';
184 - } else if (obj.example && Array.isArray(obj.example)) {
185 - obj.type = 'array';
186 - } else {
187 - obj.type = 'object';
188 - }
189 - }
190 - for (const [key, val] of Object.entries(obj)) {
191 - if (Array.isArray(val)) val.forEach(item => fixNullableWithoutType(item, key));
192 - else fixNullableWithoutType(val, key);
193 - }
194 - };
195 - fixNullableWithoutType(spec);
367 +function writeJson(filename, value) {
368 + const outputPath = join(SCRIPT_DIRECTORY, '../public', filename);
369 + writeFileSync(outputPath, JSON.stringify(value, null, 2));
370 + console.log(`Written ${filename} to ${outputPath}`);
371 }
372
198 -async function fetchAndFilterSpec() {
199 - // Fetch both specs in parallel
200 - const [v3Raw, v31Raw] = await Promise.all([
201 - fetchSpec(OPENAPI_V3_URL),
202 - fetchSpec(OPENAPI_V31_URL),
373 +async function fetchAndFilterSpecs() {
374 + const [v3Payload, v31Payload] = await Promise.all([
375 + fetchJson(OPENAPI_V3_URL),
376 + fetchJson(OPENAPI_V31_URL),
377 ]);
378 + const v31 = prepareApiSpec(v31Payload, '3.1');
379 + const v3 = prepareApiSpec(v3Payload, '3.0');
380
205 - // --- v3.1 spec (latest, default) ---
206 - const v31Spec = JSON.parse(JSON.stringify(v31Raw));
207 - const v31Filtered = filterPaths(v31Spec.paths);
208 - v31Spec.paths = v31Filtered.filteredPaths;
209 - // Clean operationIds: getV3_1Tools → getTools (so URLs are clean)
210 - cleanOperationIds(v31Spec.paths);
211 - // Annotate all operations with version
212 - for (const methods of Object.values(v31Spec.paths)) {
213 - for (const op of Object.values(methods)) {
214 - op['x-api-version'] = '3.1';
215 - }
216 - }
217 - postProcessSpec(v31Spec);
218 - console.log(`v3.1: ${Object.keys(v31Spec.paths).length} paths`);
219 -
220 - // --- v3.0 spec ---
221 - const v3Spec = JSON.parse(JSON.stringify(v3Raw));
222 - const v3Filtered = filterPaths(v3Spec.paths);
223 - v3Spec.paths = v3Filtered.filteredPaths;
224 - cleanOperationIds(v3Spec.paths);
225 - for (const methods of Object.values(v3Spec.paths)) {
226 - for (const op of Object.values(methods)) {
227 - op['x-api-version'] = '3.0';
228 - }
229 - }
230 - postProcessSpec(v3Spec);
231 - console.log(`v3.0: ${Object.keys(v3Spec.paths).length} paths`);
381 + console.log(
382 + `v3.1: ${Object.keys(v31.spec.paths).length} paths (${v31.removedCount} operations removed)`
383 + );
384 + console.log(
385 + `v3.0: ${Object.keys(v3.spec.paths).length} paths (${v3.removedCount} operations removed)`
386 + );
387 +
388 + writeJson('openapi.json', v31.spec);
389 + writeJson('openapi-v3.json', v3.spec);
390 +}
391
233 - // Write both spec files
234 - const __dirname = dirname(fileURLToPath(import.meta.url));
392 +/**
393 + * Fetch the standalone webhook-events spec and write it verbatim.
394 + *
395 + * It's a separate OpenAPI 3.1 document keyed on `webhooks` (not `paths`), so it
396 + * skips the path filtering, server pinning, and union normalization above — none
397 + * of which apply. Fetched live from production like openapi.json.
398 + *
399 + * A fetch or schema failure leaves the committed snapshot untouched. This keeps
400 + * a transient or malformed production response from deleting generated pages.
401 + */
402 +export function writeWebhookSnapshot(payload, outputPath, sourceUrl = OPENAPI_WEBHOOKS_URL) {
403 + const parsed = WebhookDocumentSchema.safeParse(payload);
404 + if (!parsed.success) {
405 + console.warn(
406 + `WARN: refusing to write webhooks spec from ${sourceUrl} — ${formatZodError(parsed.error)}. Keeping existing ${outputPath}.`
407 + );
408 + return false;
409 + }
410
236 - const v31Path = join(__dirname, '../public/openapi.json');
237 - writeFileSync(v31Path, JSON.stringify(v31Spec, null, 2));
238 - console.log(`Written v3.1 spec to ${v31Path}`);
411 + const eventCount = Object.keys(parsed.data.webhooks).length;
412 + writeFileSync(outputPath, JSON.stringify(payload, null, 2));
413 + console.log(`Written webhooks spec to ${outputPath} (${eventCount} events)`);
414 + return true;
415 +}
416
240 - const v3Path = join(__dirname, '../public/openapi-v3.json');
241 - writeFileSync(v3Path, JSON.stringify(v3Spec, null, 2));
242 - console.log(`Written v3.0 spec to ${v3Path}`);
417 +async function fetchAndWriteWebhookSpec() {
418 + const outputPath = join(SCRIPT_DIRECTORY, '../public/openapi-webhooks.json');
419 + try {
420 + const payload = await fetchJson(OPENAPI_WEBHOOKS_URL);
421 + writeWebhookSnapshot(payload, outputPath);
422 + } catch (err) {
423 + const message = err instanceof Error ? err.message : String(err);
424 + console.warn(
425 + `WARN: could not fetch webhooks spec from ${OPENAPI_WEBHOOKS_URL}: ${message}. Keeping existing ${outputPath}.`
426 + );
427 + }
428 }
429
245 -fetchAndFilterSpec().catch(console.error);
430 +if (import.meta.main) {
431 + // Independent fetches with independent error handling; run them concurrently.
432 + await Promise.all([fetchAndFilterSpecs().catch(console.error), fetchAndWriteWebhookSpec()]);
433 +}
docs/scripts/generate-api-index.ts
+141 -1
@@ -108,6 +108,134 @@ function activeTagSlugs(opsByTag: Record<string, OperationEntry[]>): Set<string>
108 return active;
109 }
110
111 +interface WebhookSpec {
112 + tags?: { name: string; description?: string }[];
113 + webhooks?: Record<string, Record<string, OpenAPIOperation>>;
114 +}
115 +
116 +function loadWebhookSpec(): WebhookSpec | null {
117 + const specPath = join(process.cwd(), 'public/openapi-webhooks.json');
118 + if (!existsSync(specPath)) return null;
119 + return JSON.parse(readFileSync(specPath, 'utf-8'));
120 +}
121 +
122 +/**
123 + * Tag slugs contributed by the separate webhook-events spec (PLEN-2793). Its
124 + * operations live under the OpenAPI 3.1 `webhooks` block (not `paths`) and its
125 + * tag ("Webhook Events") is absent from openapi.json — so without folding these
126 + * into the active set, `removeStaleTagIndexes` would recursively delete the
127 + * hand-authored `webhook-events` overview folder on the next docs data run.
128 + */
129 +function webhookTagSlugs(spec: WebhookSpec | null): Set<string> {
130 + const slugs = new Set<string>();
131 + if (!spec) return slugs;
132 +
133 + for (const item of Object.values(spec.webhooks ?? {})) {
134 + for (const operation of Object.values(item)) {
135 + for (const tag of operation.tags ?? []) {
136 + slugs.add(slugify(tag));
137 + }
138 + }
139 + }
140 + return slugs;
141 +}
142 +
143 +/**
144 + * Generates the Webhook Events overview page from the webhooks spec.
145 + *
146 + * The event list MUST be derived, not hand-maintained: adding an event to the
147 + * Apollo registry would otherwise leave it off this page, and removing one would
148 + * leave a link to a page Fumadocs no longer builds (a 404). Prose lives in
149 + * `api-overviews/webhook-events.mdx`; everything below it is generated.
150 + *
151 + * Individual event pages are rendered by Fumadocs straight from the spec, so
152 + * this page only needs the index tables.
153 + */
154 +function generateWebhookEventsIndex(spec: WebhookSpec | null, outputDir: string) {
155 + if (!spec) return;
156 +
157 + const entries = Object.entries(spec.webhooks ?? {});
158 + if (entries.length === 0) return;
159 +
160 + const operationTags = new Set(
161 + entries.flatMap(([, item]) => item.post?.tags ?? []),
162 + );
163 + if (operationTags.size !== 1) {
164 + throw new Error(
165 + `Expected webhook operations to share exactly one tag, found: ${[...operationTags].join(', ') || 'none'}`,
166 + );
167 + }
168 +
169 + const [operationTag] = operationTags;
170 + const tag = spec.tags?.find(candidate => candidate.name === operationTag);
171 + if (!tag) {
172 + throw new Error(`Webhook operation tag "${operationTag}" is not declared in spec.tags`);
173 + }
174 + const tagSlug = slugify(tag.name);
175 +
176 + const current: string[] = [];
177 + const legacy: string[] = [];
178 +
179 + for (const [key, item] of entries) {
180 + const operation = item.post;
181 + if (!operation?.operationId) continue;
182 +
183 + const href = `/reference/api-reference/${tagSlug}/${operation.operationId}`;
184 + const label = operation.summary ?? key;
185 +
186 + if (operation.deprecated !== true) {
187 + current.push(`| \`${key}\` | [${label}](${href}) |`);
188 + continue;
189 + }
190 +
191 + // Legacy payloads are keyed `<event>.<version>` so each format gets its own
192 + // page — but `composio.trigger.message.v2` is NOT an event type anyone ever
193 + // receives. Split the synthetic key back apart so the table shows the real
194 + // event plus the payload version it applies to.
195 + const versioned = /^(.*)\.(v\d+)$/.exec(key);
196 + const event = versioned ? versioned[1] : key;
197 + const version = versioned ? versioned[2].toUpperCase() : '—';
198 + legacy.push(`| \`${event}\` | ${version} | [${label}](${href}) |`);
199 + }
200 +
201 + const overview = readOverview(tagSlug);
202 + const body = overview ?? tag?.description ?? '';
203 +
204 + const legacySection =
205 + legacy.length > 0
206 + ? `
207 +
208 +## Legacy payloads (deprecated)
209 +
210 +Older subscriptions may still receive these payload formats. The event type is unchanged — only the payload shape differs, selected by the subscription's version. You can upgrade an existing subscription at any time by updating its \`version\` — see [Update a webhook subscription](/reference/api-reference/webhook-subscriptions/patchWebhookSubscriptionsById). New integrations should use the current events above.
211 +
212 +| Event | Version | Description |
213 +|-------|---------|-------------|
214 +${legacy.join('\n')}`
215 + : '';
216 +
217 + const content = `---
218 +title: ${tag?.name ?? 'Webhook Events'}
219 +description: "${tag?.description ?? ''}"
220 +---
221 +
222 +{/* Auto-generated from openapi-webhooks.json. Edit the overview at api-overviews/${tagSlug}.mdx, not this file. */}
223 +
224 +${body}
225 +
226 +## Events
227 +
228 +| Event | Description |
229 +|-------|-------------|
230 +${current.join('\n')}${legacySection}
231 +`;
232 +
233 + const folderPath = join(outputDir, tagSlug);
234 + mkdirSync(folderPath, { recursive: true });
235 + writeFileSync(join(folderPath, 'index.mdx'), content);
236 + console.log(`Generated: ${tagSlug}/index.mdx (${current.length} events, ${legacy.length} legacy)`);
237 +}
238 +
239 function removeStaleTagIndexes(baseDir: string, activeSlugs: Set<string>) {
240 if (!existsSync(baseDir)) return;
241
@@ -146,13 +274,25 @@ function generateIndexPages() {
274 }
275
276 const outputDir = join(process.cwd(), 'content/reference/api-reference');
277 + const webhookSpec = loadWebhookSpec();
278
150 - removeStaleTagIndexes(outputDir, activeTagSlugs(v31Ops));
279 + // `Webhook Events` is tagged only in openapi-webhooks.json, so it never appears
280 + // in the openapi.json-derived active set. Without folding it in, the section is
281 + // recursively deleted on every run (and immediately regenerated below) — and if
282 + // that ordering ever changed, the docs would silently lose the whole section.
283 + removeStaleTagIndexes(
284 + outputDir,
285 + new Set([...activeTagSlugs(v31Ops), ...webhookTagSlugs(webhookSpec)]),
286 + );
287 removeStaleTagIndexes(
288 join(process.cwd(), 'content/reference/v3/api-reference'),
289 activeTagSlugs(v3Ops),
290 );
291
292 + // Webhook events come from a separate 3.1 spec, so they're generated here
293 + // rather than in the tag loop below (which iterates openapi.json operations).
294 + generateWebhookEventsIndex(webhookSpec, outputDir);
295 +
296 // Get all unique tag names
297 const allTags = new Set([...Object.keys(v31Ops), ...Object.keys(v3Ops)]);
298
docs/tests/static/api-deprecation.test.tsx
+53 -1
@@ -50,6 +50,26 @@ function createSpec(version: "v3.1" | "v3") {
50 };
51 }
52
53 +function createWebhookSpec() {
54 + return {
55 + openapi: "3.1.0",
56 + tags: [
57 + { name: "Unrelated Tag", description: "Declared first on purpose" },
58 + { name: "Webhook Events", description: "Webhook event payloads" },
59 + ],
60 + paths: {},
61 + webhooks: {
62 + "composio.test.event": {
63 + post: {
64 + tags: ["Webhook Events"],
65 + summary: "Test event",
66 + operationId: "composio_test_event",
67 + },
68 + },
69 + },
70 + };
71 +}
72 +
73 function parseEndpoints(content: string): SerializedEndpoint[] {
74 const prefix = "<ApiEndpointsTable endpoints={";
75 const start = content.indexOf(prefix);
@@ -81,7 +101,7 @@ function expectedEndpoints(hrefPrefix: string): SerializedEndpoint[] {
101 ];
102 }
103
84 -async function generateFixture(): Promise<string> {
104 +async function generateFixture(options?: { webhookSpec?: ReturnType<typeof createWebhookSpec> }): Promise<string> {
105 const fixtureDir = await mkdtemp(join(tmpdir(), "composio-api-index-"));
106 fixtureDirectories.push(fixtureDir);
107
@@ -94,6 +114,12 @@ async function generateFixture(): Promise<string> {
114 join(fixtureDir, "public/openapi-v3.json"),
115 JSON.stringify(createSpec("v3")),
116 );
117 + if (options?.webhookSpec) {
118 + await writeFile(
119 + join(fixtureDir, "public/openapi-webhooks.json"),
120 + JSON.stringify(options.webhookSpec),
121 + );
122 + }
123
124 const process = Bun.spawn([Bun.argv[0], GENERATOR_PATH], {
125 cwd: fixtureDir,
@@ -321,3 +347,29 @@ describe("deprecated API endpoints", () => {
347 expect(html.match(/>Legacy<\/span>/g)).toHaveLength(1);
348 });
349 });
350 +
351 +describe("webhook API index", () => {
352 + test("routes the index from the operation tag instead of tag declaration order", async () => {
353 + const fixtureDir = await generateFixture({ webhookSpec: createWebhookSpec() });
354 + const content = await readFile(
355 + join(
356 + fixtureDir,
357 + "content/reference/api-reference/webhook-events/index.mdx",
358 + ),
359 + "utf-8",
360 + );
361 +
362 + expect(content).toContain("title: Webhook Events");
363 + expect(content).toContain(
364 + "[Test event](/reference/api-reference/webhook-events/composio_test_event)",
365 + );
366 + expect(
367 + await Bun.file(
368 + join(
369 + fixtureDir,
370 + "content/reference/api-reference/unrelated-tag/index.mdx",
371 + ),
372 + ).exists(),
373 + ).toBe(false);
374 + });
375 +});
docs/tests/static/llms-openapi.test.ts new
+146
@@ -0,0 +1,146 @@
1 +import { beforeAll, describe, expect, mock, test } from "bun:test";
2 +
3 +let dereferencedSpec: Record<string, unknown> = {};
4 +
5 +mock.module("@/lib/source", () => ({
6 + source: {},
7 + getReferenceSource: async () => ({}),
8 + examplesSource: {},
9 + toolkitsSource: {},
10 + changelogEntries: [],
11 + slugToDate: () => null,
12 + formatDate: () => "",
13 + getLLMText: async () => "",
14 + mdxToCleanMarkdown: async () => "",
15 +}));
16 +mock.module("@/lib/openapi", () => ({
17 + openapi: {
18 + getSchema: async () => ({ dereferenced: dereferencedSpec }),
19 + },
20 +}));
21 +mock.module("next/navigation", () => ({
22 + notFound: () => {
23 + throw new Error("not found");
24 + },
25 + usePathname: () => "/reference/api-reference/tasks",
26 +}));
27 +mock.module("@/lib/toolkit-data", () => ({
28 + getAllToolkits: async () => [],
29 + getToolkitBySlug: async () => null,
30 +}));
31 +mock.module("@/lib/meta-tools-data", () => ({
32 + getAllMetaTools: async () => [],
33 + getMetaToolBySlug: async () => null,
34 +}));
35 +mock.module("@/lib/toolkit-schema", () => ({
36 + processSchema: (schema: unknown) => schema,
37 + toolFromApi: (tool: unknown) => tool,
38 +}));
39 +
40 +let openapiPageToMarkdown: typeof import("../../app/llms.mdx/[[...slug]]/route").openapiPageToMarkdown;
41 +
42 +beforeAll(async () => {
43 + ({ openapiPageToMarkdown } = await import(
44 + "../../app/llms.mdx/[[...slug]]/route"
45 + ));
46 +});
47 +
48 +describe("LLM OpenAPI markdown", () => {
49 + test("continues to render API operations with endpoint and cURL details", async () => {
50 + dereferencedSpec = {
51 + paths: {
52 + "/v3.1/test": {
53 + get: {
54 + summary: "Get test",
55 + responses: {
56 + 200: { description: "Success" },
57 + },
58 + },
59 + },
60 + },
61 + servers: [{ url: "https://backend.example.com" }],
62 + };
63 +
64 + const markdown = await openapiPageToMarkdown({
65 + url: "/reference/api-reference/test/getTest",
66 + data: {
67 + title: "Get test",
68 + getAPIPageProps: () => ({
69 + document: "/openapi.json",
70 + operations: [{ path: "/v3.1/test", method: "GET" }],
71 + }),
72 + },
73 + });
74 +
75 + expect(markdown).toContain("**Endpoint:** `https://backend.example.com/v3.1/test`");
76 + expect(markdown).toContain("### Example cURL Request");
77 + expect(markdown).toContain(
78 + 'curl -X GET "https://backend.example.com/v3.1/test"',
79 + );
80 + });
81 +
82 + test("renders webhook delivery headers and payload schema", async () => {
83 + dereferencedSpec = {
84 + openapi: "3.1.0",
85 + webhooks: {
86 + "composio.test.event": {
87 + post: {
88 + summary: "Test event",
89 + parameters: [
90 + {
91 + name: "webhook-id",
92 + in: "header",
93 + required: true,
94 + description: "Stable delivery identifier.",
95 + schema: { type: "string" },
96 + },
97 + ],
98 + requestBody: {
99 + content: {
100 + "application/json": {
101 + schema: {
102 + type: "object",
103 + required: ["id"],
104 + properties: {
105 + id: {
106 + type: "string",
107 + description: "Unique event identifier.",
108 + },
109 + },
110 + },
111 + example: { id: "msg_test" },
112 + },
113 + },
114 + },
115 + responses: {
116 + 200: { description: "Delivery accepted" },
117 + },
118 + },
119 + },
120 + },
121 + };
122 +
123 + const markdown = await openapiPageToMarkdown({
124 + url: "/reference/api-reference/webhook-events/composio_test_event",
125 + data: {
126 + title: "Test event",
127 + getAPIPageProps: () => ({
128 + document: "/openapi-webhooks.json",
129 + webhooks: [{ name: "composio.test.event", method: "post" }],
130 + }),
131 + },
132 + });
133 +
134 + expect(markdown).toContain("## POST `composio.test.event`");
135 + expect(markdown).toContain("### Delivery Headers");
136 + expect(markdown).toContain(
137 + "- `webhook-id` (string) *(required)*: Stable delivery identifier.",
138 + );
139 + expect(markdown).toContain("### Request Body");
140 + expect(markdown).toContain(
141 + "- `id` (string) *(required)*: Unique event identifier.",
142 + );
143 + expect(markdown).toContain('"id": "msg_test"');
144 + expect(markdown).not.toContain("### Example cURL Request");
145 + });
146 +});
docs/tests/static/webhook-openapi.test.ts new
+138
@@ -0,0 +1,138 @@
1 +import { afterEach, describe, expect, spyOn, test } from 'bun:test';
2 +import { mkdtemp, readFile, rm, writeFile } from 'fs/promises';
3 +import { tmpdir } from 'os';
4 +import { join } from 'path';
5 +import { prepareApiSpec, writeWebhookSnapshot } from '../../scripts/fetch-openapi.mjs';
6 +
7 +const fixtureDirectories: string[] = [];
8 +
9 +function createWebhookSpec() {
10 + return {
11 + openapi: '3.1.0',
12 + tags: [{ name: 'Webhook Events' }],
13 + webhooks: {
14 + 'composio.test.event': {
15 + post: {
16 + operationId: 'composio_test_event',
17 + tags: ['Webhook Events'],
18 + requestBody: {
19 + content: {
20 + 'application/json': {
21 + schema: {
22 + type: 'object',
23 + properties: { id: { type: 'string' } },
24 + },
25 + },
26 + },
27 + },
28 + },
29 + },
30 + },
31 + };
32 +}
33 +
34 +function createApiSpec() {
35 + return {
36 + openapi: '3.0.0',
37 + info: { title: 'Fixture', version: '1.0.0' },
38 + tags: [{ name: 'Public' }, { name: 'x-internal' }],
39 + paths: {
40 + '/visible': {
41 + parameters: [{ name: 'request-id', in: 'header' }],
42 + get: {
43 + tags: ['Public', 'Secondary'],
44 + operationId: 'getV3_1Visible',
45 + security: [{ CookieAuth: [] }, { ApiKeyAuth: [] }],
46 + responses: {
47 + 200: {
48 + content: {
49 + 'application/json': {
50 + schema: { nullable: true },
51 + },
52 + },
53 + },
54 + },
55 + },
56 + },
57 + '/internal': {
58 + post: {
59 + tags: ['x-internal'],
60 + operationId: 'postV3_1Internal',
61 + },
62 + },
63 + },
64 + components: {
65 + securitySchemes: {
66 + CookieAuth: { type: 'apiKey' },
67 + ApiKeyAuth: { type: 'apiKey' },
68 + },
69 + },
70 + };
71 +}
72 +
73 +afterEach(async () => {
74 + await Promise.all(fixtureDirectories.splice(0).map(path => rm(path, { recursive: true })));
75 +});
76 +
77 +describe('webhook OpenAPI snapshot validation', () => {
78 + test('writes a valid webhook document', async () => {
79 + const fixtureDir = await mkdtemp(join(tmpdir(), 'composio-webhook-openapi-'));
80 + fixtureDirectories.push(fixtureDir);
81 + const outputPath = join(fixtureDir, 'openapi-webhooks.json');
82 +
83 + expect(writeWebhookSnapshot(createWebhookSpec(), outputPath)).toBe(true);
84 + expect(JSON.parse(await readFile(outputPath, 'utf-8'))).toEqual(createWebhookSpec());
85 + });
86 +
87 + test('keeps the last-good snapshot when a webhook entry is incomplete', async () => {
88 + const fixtureDir = await mkdtemp(join(tmpdir(), 'composio-webhook-openapi-'));
89 + fixtureDirectories.push(fixtureDir);
90 + const outputPath = join(fixtureDir, 'openapi-webhooks.json');
91 + const lastGoodSnapshot = JSON.stringify(createWebhookSpec(), null, 2);
92 + await writeFile(outputPath, lastGoodSnapshot);
93 +
94 + const warning = spyOn(console, 'warn').mockImplementation(() => {});
95 + const written = writeWebhookSnapshot(
96 + {
97 + openapi: '3.1.0',
98 + tags: [{ name: 'Webhook Events' }],
99 + webhooks: { 'composio.test.event': {} },
100 + },
101 + outputPath,
102 + 'https://example.com/openapi-webhooks.json'
103 + );
104 +
105 + expect(written).toBe(false);
106 + expect(await readFile(outputPath, 'utf-8')).toBe(lastGoodSnapshot);
107 + expect(warning).toHaveBeenCalledWith(
108 + expect.stringContaining('webhooks.composio.test.event.post')
109 + );
110 + warning.mockRestore();
111 + });
112 +});
113 +
114 +describe('REST OpenAPI processing', () => {
115 + test('parses, filters, and normalizes without mutating the response', () => {
116 + const payload = createApiSpec();
117 + const { spec, removedCount } = prepareApiSpec(payload, '3.1');
118 + const operation = spec.paths['/visible'].get;
119 +
120 + expect(removedCount).toBe(1);
121 + expect(Object.keys(spec.paths)).toEqual(['/visible']);
122 + expect(spec.paths['/visible'].parameters).toEqual(payload.paths['/visible'].parameters);
123 + expect(operation.tags).toEqual(['Public']);
124 + expect(operation.operationId).toBe('getVisible');
125 + expect(operation['x-api-version']).toBe('3.1');
126 + expect(operation.security).toEqual([{ ApiKeyAuth: [] }]);
127 + expect(operation.responses[200].content['application/json'].schema.type).toBe('object');
128 + expect(spec.tags).toEqual([{ name: 'Public' }]);
129 + expect(spec.components.securitySchemes.CookieAuth).toBeUndefined();
130 + expect(spec.servers).toEqual([
131 + {
132 + url: 'https://backend.composio.dev',
133 + description: 'PRODUCTION API',
134 + },
135 + ]);
136 + expect(payload.paths['/visible'].get.operationId).toBe('getV3_1Visible');
137 + });
138 +});