@epilot/sdk 2.1.4 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/app.json +18 -6
- package/definitions/webhooks.json +111 -2
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.d.cts +2 -2
- package/dist/apis/app.d.ts +2 -2
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-management.cjs +6 -6
- package/dist/apis/data-management.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/erp-integration.cjs +6 -6
- package/dist/apis/erp-integration.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.d.cts +2 -2
- package/dist/apis/webhooks.d.ts +2 -2
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/app-5KSVSKDU.js +7 -0
- package/dist/app-PL3IOROO.cjs +7 -0
- package/dist/{app.d-BXy_QUym.d.cts → app.d-u7Dq42kU.d.cts} +6 -2
- package/dist/{app.d-BXy_QUym.d.ts → app.d-u7Dq42kU.d.ts} +6 -2
- package/dist/{chunk-5HXHGSD5.cjs → chunk-DDMVRJDZ.cjs} +2 -2
- package/dist/{chunk-YW6UBO24.js → chunk-EQYWNVI2.js} +2 -2
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/webhooks-H3RT33BF.cjs +7 -0
- package/dist/webhooks-RTOU3MS5.js +7 -0
- package/dist/{webhooks.d-CUNJrltY.d.ts → webhooks.d-pLHIL_io.d.cts} +61 -5
- package/dist/{webhooks.d-CUNJrltY.d.cts → webhooks.d-pLHIL_io.d.ts} +61 -5
- package/docs/app.md +24 -10
- package/docs/webhooks.md +54 -3
- package/package.json +1 -1
- package/dist/app-IKHWU222.cjs +0 -7
- package/dist/app-VLM3SWKA.js +0 -7
- package/dist/webhooks-I7JWU34X.cjs +0 -7
- package/dist/webhooks-WPLEHVPX.js +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
+
|
|
3
|
+
// src/docs/webhooks.json
|
|
4
|
+
var webhooks_default = '# Webhooks\n\n- **Base URL:** `https://webhooks.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/webhooks](https://docs.epilot.io/api/webhooks)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.webhooks.getPublicKey(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/webhooks\'\n\nconst webhooksClient = getClient()\nauthorize(webhooksClient, () => \'<token>\')\nconst { data } = await webhooksClient.getPublicKey(...)\n```\n\n## Operations\n\n**webhooks**\n- [`getPublicKey`](#getpublickey)\n- [`getConfiguredEvents`](#getconfiguredevents)\n- [`getConfigs`](#getconfigs)\n- [`createConfig`](#createconfig)\n- [`getConfig`](#getconfig)\n- [`updateConfig`](#updateconfig)\n- [`deleteConfig`](#deleteconfig)\n- [`triggerWebhook`](#triggerwebhook)\n- [`batchReplayEvents`](#batchreplayevents)\n- [`getEventById`](#geteventbyid)\n- [`replayEvent`](#replayevent)\n- [`getWebhookExample`](#getwebhookexample)\n\n**Events**\n- [`getWebhookEventsV2`](#getwebhookeventsv2)\n\n**Schemas**\n- [`PublicKeyResponse`](#publickeyresponse)\n- [`SearchOptions`](#searchoptions)\n- [`EventListResponse`](#eventlistresponse)\n- [`HttpMethod`](#httpmethod)\n- [`AuthType`](#authtype)\n- [`Filter`](#filter)\n- [`WebhookCondition`](#webhookcondition)\n- [`WebhookConditionGroup`](#webhookconditiongroup)\n- [`Auth`](#auth)\n- [`BasicAuthConfig`](#basicauthconfig)\n- [`OAuthConfig`](#oauthconfig)\n- [`ApiKeyConfig`](#apikeyconfig)\n- [`WebhookConfig`](#webhookconfig)\n- [`EventConfigResp`](#eventconfigresp)\n- [`EventConfigEntry`](#eventconfigentry)\n- [`ErrorResp`](#errorresp)\n- [`TriggerWebhookResp`](#triggerwebhookresp)\n- [`PayloadConfiguration`](#payloadconfiguration)\n- [`CustomHeader`](#customheader)\n- [`CustomOAuthParameter`](#customoauthparameter)\n- [`Metadata`](#metadata)\n- [`ExecutionPayload`](#executionpayload)\n- [`WebhookEvent`](#webhookevent)\n- [`ExampleRequest`](#examplerequest)\n- [`ExampleResponse`](#exampleresponse)\n- [`BatchReplayRequest`](#batchreplayrequest)\n\n### `getPublicKey`\n\nReturns the platform-level Ed25519 public key used to verify\nasymmetric (v1a) webhook signatures. This endpoint is unauthenticated since the public key is not a secret, but the orgId parameter is requ\n\n`GET /v1/webhooks/.well-known/public-key`\n\n```ts\nconst { data } = await client.getPublicKey({\n orgId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "public_key": "-----BEGIN PUBLIC KEY-----\\nMCowBQYDK2VwAyEA...\\n-----END PUBLIC KEY-----\\n",\n "algorithm": "ed25519",\n "issuer": "epilot"\n}\n```\n\n</details>\n\n---\n\n### `getConfiguredEvents`\n\nRetrieve events that can trigger webhooks\n\n`GET /v1/webhooks/configured-events`\n\n```ts\nconst { data } = await client.getConfiguredEvents()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "eventName": "customer_request_created",\n "eventLabel": "Customer Request Created"\n }\n]\n```\n\n</details>\n\n---\n\n### `getConfigs`\n\nSearch Webhook Client Configs\n\n`GET /v1/webhooks/configs`\n\n```ts\nconst { data } = await client.getConfigs({\n eventName: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n }\n]\n```\n\n</details>\n\n---\n\n### `createConfig`\n\nCreate Webhook Client Config\n\n`POST /v1/webhooks/configs`\n\n```ts\nconst { data } = await client.createConfig(\n null,\n {\n eventName: \'CustomerRequest_Created\',\n url: \'https://my-partner-service.api.com\',\n httpMethod: \'POST\',\n enabled: true,\n auth: {\n authType: \'BASIC\',\n basicAuthConfig: {\n username: \'secretUsername\',\n password: \'secret7825@!\'\n }\n },\n filter: {\n keyToFilter: \'customer_request.productId\',\n supportedValues: [\'2324245\', \'5253642\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n}\n```\n\n</details>\n\n---\n\n### `getConfig`\n\nGet webhook config by id\n\n`GET /v1/webhooks/configs/{configId}`\n\n```ts\nconst { data } = await client.getConfig({\n configId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n}\n```\n\n</details>\n\n---\n\n### `updateConfig`\n\nUpdate Webhook Client Config\n\n`PUT /v1/webhooks/configs/{configId}`\n\n```ts\nconst { data } = await client.updateConfig(\n {\n configId: \'example\',\n },\n {\n eventName: \'CustomerRequest_Created\',\n url: \'https://my-partner-service.api.com\',\n httpMethod: \'POST\',\n enabled: true,\n auth: {\n authType: \'BASIC\',\n basicAuthConfig: {\n username: \'secretUsername\',\n password: \'secret7825@!\'\n }\n },\n filter: {\n keyToFilter: \'customer_request.productId\',\n supportedValues: [\'2324245\', \'5253642\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n}\n```\n\n</details>\n\n---\n\n### `deleteConfig`\n\nDelete Webhook Client Config\n\n`DELETE /v1/webhooks/configs/{configId}`\n\n```ts\nconst { data } = await client.deleteConfig({\n configId: \'example\',\n})\n```\n\n---\n\n### `triggerWebhook`\n\ntriggers a webhook event either async or sync\n\n`POST /v1/webhooks/configs/{configId}/trigger`\n\n```ts\nconst { data } = await client.triggerWebhook(\n {\n sync: true,\n configId: \'example\',\n },\n {\n metadata: {\n action: \'Manual triggered by user with id 123456\',\n origin: \'string\',\n creation_timestamp: \'string\',\n webhook_id: \'string\',\n webhook_name: \'string\',\n automation_name: \'string\',\n organization_id: \'string\',\n user_id: \'string\',\n correlation_id: \'string\',\n execution_id: \'string\',\n action_id: \'string\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status_code": "string",\n "message": "string",\n "body": {},\n "code": "string",\n "status": "succeeded",\n "start_date": "string",\n "end_date": "string",\n "event_id": "string"\n}\n```\n\n</details>\n\n---\n\n### `batchReplayEvents`\n\nReplay a batch of webhook events\n\n`POST /v1/webhooks/configs/{configId}/events/replay-batch`\n\n```ts\nconst { data } = await client.batchReplayEvents(\n {\n configId: \'example\',\n },\n {\n eventIds: [\'2f1b7cf8-ff55-4359-966f-e56f39a52c94\', \'48c984bf-466b-470b-b743-d07cea168243\']\n },\n)\n```\n\n---\n\n### `getEventById`\n\nGet a webhook event by its id\n\n`GET /v1/webhooks/configs/{configId}/events/{eventId}`\n\n```ts\nconst { data } = await client.getEventById({\n configId: \'example\',\n eventId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_id": "string",\n "org_id": "string",\n "webhook_config_id": "string",\n "url": "string",\n "created_at": "2021-04-27T12:01:13.000Z",\n "event_name": "string",\n "http_response": {\n "status_code": 0,\n "message": "string",\n "body": {},\n "code": "string"\n },\n "metadata": {\n "action": "Manual triggered by user with id 123456",\n "origin": "string",\n "creation_timestamp": "string",\n "webhook_id": "string",\n "webhook_name": "string",\n "automation_name": "string",\n "organization_id": "string",\n "user_id": "string",\n "correlation_id": "string",\n "execution_id": "string",\n "action_id": "string"\n },\n "status": "succeeded",\n "http_method": "GET",\n "payload": "string"\n}\n```\n\n</details>\n\n---\n\n### `replayEvent`\n\nReplay a webhook event\n\n`POST /v1/webhooks/configs/{configId}/events/{eventId}/replay`\n\n```ts\nconst { data } = await client.replayEvent({\n configId: \'example\',\n eventId: \'example\',\n})\n```\n\n---\n\n### `getWebhookExample`\n\nGenerate an example payload for a webhook configuration based on trigger type\n\n`POST /v1/webhooks/configs/{configId}/example`\n\n```ts\nconst { data } = await client.getWebhookExample(\n {\n configId: \'example\',\n },\n {\n automation_id: \'automation_123\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "metadata": {\n "action": "Manual triggered by user with id 123456",\n "origin": "string",\n "creation_timestamp": "string",\n "webhook_id": "string",\n "webhook_name": "string",\n "automation_name": "string",\n "organization_id": "string",\n "user_id": "string",\n "correlation_id": "string",\n "execution_id": "string",\n "action_id": "string"\n },\n "entity": {},\n "relations": [\n {}\n ]\n}\n```\n\n</details>\n\n---\n\n### `getWebhookEventsV2`\n\nList webhook events and filter them by status, timestamp, etc.\n\n`POST /v2/webhooks/configs/{configId}/events`\n\n```ts\nconst { data } = await client.getWebhookEventsV2(\n {\n configId: \'example\',\n },\n {\n limit: 25,\n cursor: {\n created_at: \'2025-10-31T12:34:56Z\',\n event_id: \'evt_1234567890abcdef\'\n },\n timestamp: {\n from: \'2025-10-01T00:00:00Z\',\n to: \'2025-10-31T23:59:59Z\'\n },\n event_id: \'evt_1234567890abcdef\',\n status: \'succeeded\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "data": [\n {\n "event_id": "string",\n "org_id": "string",\n "webhook_config_id": "string",\n "url": "string",\n "created_at": "2021-04-27T12:01:13.000Z",\n "event_name": "string",\n "http_response": {\n "status_code": 0,\n "message": "string",\n "body": {},\n "code": "string"\n },\n "metadata": {\n "action": "Manual triggered by user with id 123456",\n "origin": "string",\n "creation_timestamp": "string",\n "webhook_id": "string",\n "webhook_name": "string",\n "automation_name": "string",\n "organization_id": "string",\n "user_id": "string",\n "correlation_id": "string",\n "execution_id": "string",\n "action_id": "string"\n },\n "status": "succeeded",\n "http_method": "GET",\n "payload": "string"\n }\n ],\n "next_cursor": {\n "created_at": "2025-10-31T12:34:56Z",\n "event_id": "evt_1234567890abcdef"\n },\n "has_more": true\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `PublicKeyResponse`\n\n```ts\ntype PublicKeyResponse = {\n public_key: string\n algorithm: string\n issuer?: string\n}\n```\n\n### `SearchOptions`\n\n```ts\ntype SearchOptions = {\n limit?: number\n cursor?: {\n created_at?: string // date-time\n event_id?: string\n }\n timestamp?: {\n from?: string // date-time\n to?: string // date-time\n }\n event_id?: string\n status?: "succeeded" | "failed" | "skipped"\n}\n```\n\n### `EventListResponse`\n\n```ts\ntype EventListResponse = {\n data?: Array<{\n event_id: string\n org_id: string\n webhook_config_id: string\n url?: string\n created_at?: string\n event_name?: string\n http_response?: {\n status_code?: { ... }\n message?: { ... }\n body?: { ... }\n code?: { ... }\n }\n metadata?: {\n action?: { ... }\n origin?: { ... }\n creation_timestamp?: { ... }\n webhook_id?: { ... }\n webhook_name?: { ... }\n automation_name?: { ... }\n organization_id: { ... }\n user_id?: { ... }\n correlation_id?: { ... }\n execution_id?: { ... }\n action_id?: { ... }\n }\n status?: "succeeded" | "failed" | "in_progress" | "skipped"\n http_method?: "GET" | "POST" | "PUT"\n payload?: string\n }>\n next_cursor?: {\n created_at?: string // date-time\n event_id?: string\n }\n has_more?: boolean\n}\n```\n\n### `HttpMethod`\n\n```ts\ntype HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n```\n\n### `AuthType`\n\n```ts\ntype AuthType = "BASIC" | "OAUTH_CLIENT_CREDENTIALS" | "API_KEY" | "NONE"\n```\n\n### `Filter`\n\n```ts\ntype Filter = {\n keyToFilter: string\n supportedValues: string[]\n}\n```\n\n### `WebhookCondition`\n\nA condition that must be met for the webhook to fire.\n\n```ts\ntype WebhookCondition = {\n field: string\n operation: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n values?: string[]\n field_type?: "string" | "number" | "boolean" | "date" | "datetime"\n is_array_field?: boolean\n repeatable_item_op?: boolean\n}\n```\n\n### `WebhookConditionGroup`\n\nA group of conditions with a logical operator. Multiple conditions are AND-ed by default.\n\n```ts\ntype WebhookConditionGroup = {\n conditions?: Array<{\n field: string\n operation: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n values?: string[]\n field_type?: "string" | "number" | "boolean" | "date" | "datetime"\n is_array_field?: boolean\n repeatable_item_op?: boolean\n }>\n logical_operator?: "AND" | "OR"\n}\n```\n\n### `Auth`\n\n```ts\ntype Auth = {\n authType: "BASIC" | "OAUTH_CLIENT_CREDENTIALS" | "API_KEY" | "NONE"\n basicAuthConfig?: {\n username: string\n password?: string\n passwordIsEnvVar?: boolean\n }\n oauthConfig?: {\n clientId: string\n clientSecret?: string\n clientSecretIsEnvVar?: boolean\n endpoint: string\n httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n customParameterList?: Array<{\n type: { ... }\n key: { ... }\n value: { ... }\n }>\n }\n apiKeyConfig?: {\n keyName: string\n keyValue?: string\n keyValueIsEnvVar?: boolean\n }\n}\n```\n\n### `BasicAuthConfig`\n\nTo be sent only if authType is BASIC\n\n```ts\ntype BasicAuthConfig = {\n username: string\n password?: string\n passwordIsEnvVar?: boolean\n}\n```\n\n### `OAuthConfig`\n\nTo be sent only if authType is OAUTH_CLIENT_CREDENTIALS\n\n```ts\ntype OAuthConfig = {\n clientId: string\n clientSecret?: string\n clientSecretIsEnvVar?: boolean\n endpoint: string\n httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n customParameterList?: Array<{\n type: "body" | "query" | "header"\n key: string\n value: string\n }>\n}\n```\n\n### `ApiKeyConfig`\n\nTo be sent only if authType is API_KEY\n\n```ts\ntype ApiKeyConfig = {\n keyName: string\n keyValue?: string\n keyValueIsEnvVar?: boolean\n}\n```\n\n### `WebhookConfig`\n\n```ts\ntype WebhookConfig = {\n id?: string\n name: string\n eventName: string\n url?: string\n creationTime?: string\n httpMethod?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n enabled?: boolean\n auth?: {\n authType: "BASIC" | "OAUTH_CLIENT_CREDENTIALS" | "API_KEY" | "NONE"\n basicAuthConfig?: {\n username: { ... }\n password?: { ... }\n passwordIsEnvVar?: { ... }\n }\n oauthConfig?: {\n clientId: { ... }\n clientSecret?: { ... }\n clientSecretIsEnvVar?: { ... }\n endpoint: { ... }\n httpMethod: { ... }\n customParameterList?: { ... }\n }\n apiKeyConfig?: {\n keyName: { ... }\n keyValue?: { ... }\n keyValueIsEnvVar?: { ... }\n }\n }\n filter?: {\n keyToFilter: string\n supportedValues: string[]\n }\n payloadConfiguration?: {\n hydrate_entity?: boolean\n include_relations?: boolean\n include_activity?: boolean\n include_changed_attributes?: boolean\n custom_headers?: Record<string, string>\n }\n enableStaticIP?: boolean\n protected?: boolean\n secureProxy?: {\n integration_id: string // uuid\n use_case_slug: string\n }\n status?: "active" | "inactive" | "incomplete"\n jsonataExpression?: string\n filterConditions?: {\n conditions?: Array<{\n field: { ... }\n operation: { ... }\n values?: { ... }\n field_type?: { ... }\n is_array_field?: { ... }\n repeatable_item_op?: { ... }\n }>\n logical_operator?: "AND" | "OR"\n }\n _manifest?: string // uuid[]\n signingSecret?: string\n}\n```\n\n### `EventConfigResp`\n\n```ts\ntype EventConfigResp = Array<{\n eventName?: string\n eventLabel?: string\n}>\n```\n\n### `EventConfigEntry`\n\n```ts\ntype EventConfigEntry = {\n eventName?: string\n eventLabel?: string\n}\n```\n\n### `ErrorResp`\n\n```ts\ntype ErrorResp = {\n message?: string\n}\n```\n\n### `TriggerWebhookResp`\n\n```ts\ntype TriggerWebhookResp = {\n status_code?: string\n message?: string\n body?: object\n code?: string\n status?: "succeeded" | "failed"\n start_date?: string\n end_date?: string\n event_id: string\n}\n```\n\n### `PayloadConfiguration`\n\nConfiguration for the webhook payload\n\n```ts\ntype PayloadConfiguration = {\n hydrate_entity?: boolean\n include_relations?: boolean\n include_activity?: boolean\n include_changed_attributes?: boolean\n custom_headers?: Record<string, string>\n}\n```\n\n### `CustomHeader`\n\nObject representing custom headers as key-value pairs.\n\n```ts\ntype CustomHeader = Record<string, string>\n```\n\n### `CustomOAuthParameter`\n\nCustom key/value pair of either type body, query or header\n\n```ts\ntype CustomOAuthParameter = {\n type: "body" | "query" | "header"\n key: string\n value: string\n}\n```\n\n### `Metadata`\n\nContains the metadata about the configured event\n\n```ts\ntype Metadata = {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n}\n```\n\n### `ExecutionPayload`\n\nPayload for triggering a webhook\n\n```ts\ntype ExecutionPayload = {\n metadata: {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n }\n}\n```\n\n### `WebhookEvent`\n\n```ts\ntype WebhookEvent = {\n event_id: string\n org_id: string\n webhook_config_id: string\n url?: string\n created_at?: string\n event_name?: string\n http_response?: {\n status_code?: number\n message?: string\n body?: object\n code?: string\n }\n metadata?: {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n }\n status?: "succeeded" | "failed" | "in_progress" | "skipped"\n http_method?: "GET" | "POST" | "PUT"\n payload?: string\n}\n```\n\n### `ExampleRequest`\n\n```ts\ntype ExampleRequest = {\n automation_id?: string\n}\n```\n\n### `ExampleResponse`\n\n```ts\ntype ExampleResponse = {\n metadata?: {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n }\n entity?: Record<string, unknown>\n relations?: Record<string, unknown>[]\n}\n```\n\n### `BatchReplayRequest`\n\n```ts\ntype BatchReplayRequest = {\n eventIds: string[]\n}\n```\n';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.default = webhooks_default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./chunk-YPSWSI3M.js";
|
|
2
|
+
|
|
3
|
+
// src/docs/webhooks.json
|
|
4
|
+
var webhooks_default = '# Webhooks\n\n- **Base URL:** `https://webhooks.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/webhooks](https://docs.epilot.io/api/webhooks)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.webhooks.getPublicKey(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/webhooks\'\n\nconst webhooksClient = getClient()\nauthorize(webhooksClient, () => \'<token>\')\nconst { data } = await webhooksClient.getPublicKey(...)\n```\n\n## Operations\n\n**webhooks**\n- [`getPublicKey`](#getpublickey)\n- [`getConfiguredEvents`](#getconfiguredevents)\n- [`getConfigs`](#getconfigs)\n- [`createConfig`](#createconfig)\n- [`getConfig`](#getconfig)\n- [`updateConfig`](#updateconfig)\n- [`deleteConfig`](#deleteconfig)\n- [`triggerWebhook`](#triggerwebhook)\n- [`batchReplayEvents`](#batchreplayevents)\n- [`getEventById`](#geteventbyid)\n- [`replayEvent`](#replayevent)\n- [`getWebhookExample`](#getwebhookexample)\n\n**Events**\n- [`getWebhookEventsV2`](#getwebhookeventsv2)\n\n**Schemas**\n- [`PublicKeyResponse`](#publickeyresponse)\n- [`SearchOptions`](#searchoptions)\n- [`EventListResponse`](#eventlistresponse)\n- [`HttpMethod`](#httpmethod)\n- [`AuthType`](#authtype)\n- [`Filter`](#filter)\n- [`WebhookCondition`](#webhookcondition)\n- [`WebhookConditionGroup`](#webhookconditiongroup)\n- [`Auth`](#auth)\n- [`BasicAuthConfig`](#basicauthconfig)\n- [`OAuthConfig`](#oauthconfig)\n- [`ApiKeyConfig`](#apikeyconfig)\n- [`WebhookConfig`](#webhookconfig)\n- [`EventConfigResp`](#eventconfigresp)\n- [`EventConfigEntry`](#eventconfigentry)\n- [`ErrorResp`](#errorresp)\n- [`TriggerWebhookResp`](#triggerwebhookresp)\n- [`PayloadConfiguration`](#payloadconfiguration)\n- [`CustomHeader`](#customheader)\n- [`CustomOAuthParameter`](#customoauthparameter)\n- [`Metadata`](#metadata)\n- [`ExecutionPayload`](#executionpayload)\n- [`WebhookEvent`](#webhookevent)\n- [`ExampleRequest`](#examplerequest)\n- [`ExampleResponse`](#exampleresponse)\n- [`BatchReplayRequest`](#batchreplayrequest)\n\n### `getPublicKey`\n\nReturns the platform-level Ed25519 public key used to verify\nasymmetric (v1a) webhook signatures. This endpoint is unauthenticated since the public key is not a secret, but the orgId parameter is requ\n\n`GET /v1/webhooks/.well-known/public-key`\n\n```ts\nconst { data } = await client.getPublicKey({\n orgId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "public_key": "-----BEGIN PUBLIC KEY-----\\nMCowBQYDK2VwAyEA...\\n-----END PUBLIC KEY-----\\n",\n "algorithm": "ed25519",\n "issuer": "epilot"\n}\n```\n\n</details>\n\n---\n\n### `getConfiguredEvents`\n\nRetrieve events that can trigger webhooks\n\n`GET /v1/webhooks/configured-events`\n\n```ts\nconst { data } = await client.getConfiguredEvents()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "eventName": "customer_request_created",\n "eventLabel": "Customer Request Created"\n }\n]\n```\n\n</details>\n\n---\n\n### `getConfigs`\n\nSearch Webhook Client Configs\n\n`GET /v1/webhooks/configs`\n\n```ts\nconst { data } = await client.getConfigs({\n eventName: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n }\n]\n```\n\n</details>\n\n---\n\n### `createConfig`\n\nCreate Webhook Client Config\n\n`POST /v1/webhooks/configs`\n\n```ts\nconst { data } = await client.createConfig(\n null,\n {\n eventName: \'CustomerRequest_Created\',\n url: \'https://my-partner-service.api.com\',\n httpMethod: \'POST\',\n enabled: true,\n auth: {\n authType: \'BASIC\',\n basicAuthConfig: {\n username: \'secretUsername\',\n password: \'secret7825@!\'\n }\n },\n filter: {\n keyToFilter: \'customer_request.productId\',\n supportedValues: [\'2324245\', \'5253642\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n}\n```\n\n</details>\n\n---\n\n### `getConfig`\n\nGet webhook config by id\n\n`GET /v1/webhooks/configs/{configId}`\n\n```ts\nconst { data } = await client.getConfig({\n configId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n}\n```\n\n</details>\n\n---\n\n### `updateConfig`\n\nUpdate Webhook Client Config\n\n`PUT /v1/webhooks/configs/{configId}`\n\n```ts\nconst { data } = await client.updateConfig(\n {\n configId: \'example\',\n },\n {\n eventName: \'CustomerRequest_Created\',\n url: \'https://my-partner-service.api.com\',\n httpMethod: \'POST\',\n enabled: true,\n auth: {\n authType: \'BASIC\',\n basicAuthConfig: {\n username: \'secretUsername\',\n password: \'secret7825@!\'\n }\n },\n filter: {\n keyToFilter: \'customer_request.productId\',\n supportedValues: [\'2324245\', \'5253642\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n}\n```\n\n</details>\n\n---\n\n### `deleteConfig`\n\nDelete Webhook Client Config\n\n`DELETE /v1/webhooks/configs/{configId}`\n\n```ts\nconst { data } = await client.deleteConfig({\n configId: \'example\',\n})\n```\n\n---\n\n### `triggerWebhook`\n\ntriggers a webhook event either async or sync\n\n`POST /v1/webhooks/configs/{configId}/trigger`\n\n```ts\nconst { data } = await client.triggerWebhook(\n {\n sync: true,\n configId: \'example\',\n },\n {\n metadata: {\n action: \'Manual triggered by user with id 123456\',\n origin: \'string\',\n creation_timestamp: \'string\',\n webhook_id: \'string\',\n webhook_name: \'string\',\n automation_name: \'string\',\n organization_id: \'string\',\n user_id: \'string\',\n correlation_id: \'string\',\n execution_id: \'string\',\n action_id: \'string\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status_code": "string",\n "message": "string",\n "body": {},\n "code": "string",\n "status": "succeeded",\n "start_date": "string",\n "end_date": "string",\n "event_id": "string"\n}\n```\n\n</details>\n\n---\n\n### `batchReplayEvents`\n\nReplay a batch of webhook events\n\n`POST /v1/webhooks/configs/{configId}/events/replay-batch`\n\n```ts\nconst { data } = await client.batchReplayEvents(\n {\n configId: \'example\',\n },\n {\n eventIds: [\'2f1b7cf8-ff55-4359-966f-e56f39a52c94\', \'48c984bf-466b-470b-b743-d07cea168243\']\n },\n)\n```\n\n---\n\n### `getEventById`\n\nGet a webhook event by its id\n\n`GET /v1/webhooks/configs/{configId}/events/{eventId}`\n\n```ts\nconst { data } = await client.getEventById({\n configId: \'example\',\n eventId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_id": "string",\n "org_id": "string",\n "webhook_config_id": "string",\n "url": "string",\n "created_at": "2021-04-27T12:01:13.000Z",\n "event_name": "string",\n "http_response": {\n "status_code": 0,\n "message": "string",\n "body": {},\n "code": "string"\n },\n "metadata": {\n "action": "Manual triggered by user with id 123456",\n "origin": "string",\n "creation_timestamp": "string",\n "webhook_id": "string",\n "webhook_name": "string",\n "automation_name": "string",\n "organization_id": "string",\n "user_id": "string",\n "correlation_id": "string",\n "execution_id": "string",\n "action_id": "string"\n },\n "status": "succeeded",\n "http_method": "GET",\n "payload": "string"\n}\n```\n\n</details>\n\n---\n\n### `replayEvent`\n\nReplay a webhook event\n\n`POST /v1/webhooks/configs/{configId}/events/{eventId}/replay`\n\n```ts\nconst { data } = await client.replayEvent({\n configId: \'example\',\n eventId: \'example\',\n})\n```\n\n---\n\n### `getWebhookExample`\n\nGenerate an example payload for a webhook configuration based on trigger type\n\n`POST /v1/webhooks/configs/{configId}/example`\n\n```ts\nconst { data } = await client.getWebhookExample(\n {\n configId: \'example\',\n },\n {\n automation_id: \'automation_123\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "metadata": {\n "action": "Manual triggered by user with id 123456",\n "origin": "string",\n "creation_timestamp": "string",\n "webhook_id": "string",\n "webhook_name": "string",\n "automation_name": "string",\n "organization_id": "string",\n "user_id": "string",\n "correlation_id": "string",\n "execution_id": "string",\n "action_id": "string"\n },\n "entity": {},\n "relations": [\n {}\n ]\n}\n```\n\n</details>\n\n---\n\n### `getWebhookEventsV2`\n\nList webhook events and filter them by status, timestamp, etc.\n\n`POST /v2/webhooks/configs/{configId}/events`\n\n```ts\nconst { data } = await client.getWebhookEventsV2(\n {\n configId: \'example\',\n },\n {\n limit: 25,\n cursor: {\n created_at: \'2025-10-31T12:34:56Z\',\n event_id: \'evt_1234567890abcdef\'\n },\n timestamp: {\n from: \'2025-10-01T00:00:00Z\',\n to: \'2025-10-31T23:59:59Z\'\n },\n event_id: \'evt_1234567890abcdef\',\n status: \'succeeded\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "data": [\n {\n "event_id": "string",\n "org_id": "string",\n "webhook_config_id": "string",\n "url": "string",\n "created_at": "2021-04-27T12:01:13.000Z",\n "event_name": "string",\n "http_response": {\n "status_code": 0,\n "message": "string",\n "body": {},\n "code": "string"\n },\n "metadata": {\n "action": "Manual triggered by user with id 123456",\n "origin": "string",\n "creation_timestamp": "string",\n "webhook_id": "string",\n "webhook_name": "string",\n "automation_name": "string",\n "organization_id": "string",\n "user_id": "string",\n "correlation_id": "string",\n "execution_id": "string",\n "action_id": "string"\n },\n "status": "succeeded",\n "http_method": "GET",\n "payload": "string"\n }\n ],\n "next_cursor": {\n "created_at": "2025-10-31T12:34:56Z",\n "event_id": "evt_1234567890abcdef"\n },\n "has_more": true\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `PublicKeyResponse`\n\n```ts\ntype PublicKeyResponse = {\n public_key: string\n algorithm: string\n issuer?: string\n}\n```\n\n### `SearchOptions`\n\n```ts\ntype SearchOptions = {\n limit?: number\n cursor?: {\n created_at?: string // date-time\n event_id?: string\n }\n timestamp?: {\n from?: string // date-time\n to?: string // date-time\n }\n event_id?: string\n status?: "succeeded" | "failed" | "skipped"\n}\n```\n\n### `EventListResponse`\n\n```ts\ntype EventListResponse = {\n data?: Array<{\n event_id: string\n org_id: string\n webhook_config_id: string\n url?: string\n created_at?: string\n event_name?: string\n http_response?: {\n status_code?: { ... }\n message?: { ... }\n body?: { ... }\n code?: { ... }\n }\n metadata?: {\n action?: { ... }\n origin?: { ... }\n creation_timestamp?: { ... }\n webhook_id?: { ... }\n webhook_name?: { ... }\n automation_name?: { ... }\n organization_id: { ... }\n user_id?: { ... }\n correlation_id?: { ... }\n execution_id?: { ... }\n action_id?: { ... }\n }\n status?: "succeeded" | "failed" | "in_progress" | "skipped"\n http_method?: "GET" | "POST" | "PUT"\n payload?: string\n }>\n next_cursor?: {\n created_at?: string // date-time\n event_id?: string\n }\n has_more?: boolean\n}\n```\n\n### `HttpMethod`\n\n```ts\ntype HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n```\n\n### `AuthType`\n\n```ts\ntype AuthType = "BASIC" | "OAUTH_CLIENT_CREDENTIALS" | "API_KEY" | "NONE"\n```\n\n### `Filter`\n\n```ts\ntype Filter = {\n keyToFilter: string\n supportedValues: string[]\n}\n```\n\n### `WebhookCondition`\n\nA condition that must be met for the webhook to fire.\n\n```ts\ntype WebhookCondition = {\n field: string\n operation: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n values?: string[]\n field_type?: "string" | "number" | "boolean" | "date" | "datetime"\n is_array_field?: boolean\n repeatable_item_op?: boolean\n}\n```\n\n### `WebhookConditionGroup`\n\nA group of conditions with a logical operator. Multiple conditions are AND-ed by default.\n\n```ts\ntype WebhookConditionGroup = {\n conditions?: Array<{\n field: string\n operation: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n values?: string[]\n field_type?: "string" | "number" | "boolean" | "date" | "datetime"\n is_array_field?: boolean\n repeatable_item_op?: boolean\n }>\n logical_operator?: "AND" | "OR"\n}\n```\n\n### `Auth`\n\n```ts\ntype Auth = {\n authType: "BASIC" | "OAUTH_CLIENT_CREDENTIALS" | "API_KEY" | "NONE"\n basicAuthConfig?: {\n username: string\n password?: string\n passwordIsEnvVar?: boolean\n }\n oauthConfig?: {\n clientId: string\n clientSecret?: string\n clientSecretIsEnvVar?: boolean\n endpoint: string\n httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n customParameterList?: Array<{\n type: { ... }\n key: { ... }\n value: { ... }\n }>\n }\n apiKeyConfig?: {\n keyName: string\n keyValue?: string\n keyValueIsEnvVar?: boolean\n }\n}\n```\n\n### `BasicAuthConfig`\n\nTo be sent only if authType is BASIC\n\n```ts\ntype BasicAuthConfig = {\n username: string\n password?: string\n passwordIsEnvVar?: boolean\n}\n```\n\n### `OAuthConfig`\n\nTo be sent only if authType is OAUTH_CLIENT_CREDENTIALS\n\n```ts\ntype OAuthConfig = {\n clientId: string\n clientSecret?: string\n clientSecretIsEnvVar?: boolean\n endpoint: string\n httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n customParameterList?: Array<{\n type: "body" | "query" | "header"\n key: string\n value: string\n }>\n}\n```\n\n### `ApiKeyConfig`\n\nTo be sent only if authType is API_KEY\n\n```ts\ntype ApiKeyConfig = {\n keyName: string\n keyValue?: string\n keyValueIsEnvVar?: boolean\n}\n```\n\n### `WebhookConfig`\n\n```ts\ntype WebhookConfig = {\n id?: string\n name: string\n eventName: string\n url?: string\n creationTime?: string\n httpMethod?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n enabled?: boolean\n auth?: {\n authType: "BASIC" | "OAUTH_CLIENT_CREDENTIALS" | "API_KEY" | "NONE"\n basicAuthConfig?: {\n username: { ... }\n password?: { ... }\n passwordIsEnvVar?: { ... }\n }\n oauthConfig?: {\n clientId: { ... }\n clientSecret?: { ... }\n clientSecretIsEnvVar?: { ... }\n endpoint: { ... }\n httpMethod: { ... }\n customParameterList?: { ... }\n }\n apiKeyConfig?: {\n keyName: { ... }\n keyValue?: { ... }\n keyValueIsEnvVar?: { ... }\n }\n }\n filter?: {\n keyToFilter: string\n supportedValues: string[]\n }\n payloadConfiguration?: {\n hydrate_entity?: boolean\n include_relations?: boolean\n include_activity?: boolean\n include_changed_attributes?: boolean\n custom_headers?: Record<string, string>\n }\n enableStaticIP?: boolean\n protected?: boolean\n secureProxy?: {\n integration_id: string // uuid\n use_case_slug: string\n }\n status?: "active" | "inactive" | "incomplete"\n jsonataExpression?: string\n filterConditions?: {\n conditions?: Array<{\n field: { ... }\n operation: { ... }\n values?: { ... }\n field_type?: { ... }\n is_array_field?: { ... }\n repeatable_item_op?: { ... }\n }>\n logical_operator?: "AND" | "OR"\n }\n _manifest?: string // uuid[]\n signingSecret?: string\n}\n```\n\n### `EventConfigResp`\n\n```ts\ntype EventConfigResp = Array<{\n eventName?: string\n eventLabel?: string\n}>\n```\n\n### `EventConfigEntry`\n\n```ts\ntype EventConfigEntry = {\n eventName?: string\n eventLabel?: string\n}\n```\n\n### `ErrorResp`\n\n```ts\ntype ErrorResp = {\n message?: string\n}\n```\n\n### `TriggerWebhookResp`\n\n```ts\ntype TriggerWebhookResp = {\n status_code?: string\n message?: string\n body?: object\n code?: string\n status?: "succeeded" | "failed"\n start_date?: string\n end_date?: string\n event_id: string\n}\n```\n\n### `PayloadConfiguration`\n\nConfiguration for the webhook payload\n\n```ts\ntype PayloadConfiguration = {\n hydrate_entity?: boolean\n include_relations?: boolean\n include_activity?: boolean\n include_changed_attributes?: boolean\n custom_headers?: Record<string, string>\n}\n```\n\n### `CustomHeader`\n\nObject representing custom headers as key-value pairs.\n\n```ts\ntype CustomHeader = Record<string, string>\n```\n\n### `CustomOAuthParameter`\n\nCustom key/value pair of either type body, query or header\n\n```ts\ntype CustomOAuthParameter = {\n type: "body" | "query" | "header"\n key: string\n value: string\n}\n```\n\n### `Metadata`\n\nContains the metadata about the configured event\n\n```ts\ntype Metadata = {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n}\n```\n\n### `ExecutionPayload`\n\nPayload for triggering a webhook\n\n```ts\ntype ExecutionPayload = {\n metadata: {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n }\n}\n```\n\n### `WebhookEvent`\n\n```ts\ntype WebhookEvent = {\n event_id: string\n org_id: string\n webhook_config_id: string\n url?: string\n created_at?: string\n event_name?: string\n http_response?: {\n status_code?: number\n message?: string\n body?: object\n code?: string\n }\n metadata?: {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n }\n status?: "succeeded" | "failed" | "in_progress" | "skipped"\n http_method?: "GET" | "POST" | "PUT"\n payload?: string\n}\n```\n\n### `ExampleRequest`\n\n```ts\ntype ExampleRequest = {\n automation_id?: string\n}\n```\n\n### `ExampleResponse`\n\n```ts\ntype ExampleResponse = {\n metadata?: {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n }\n entity?: Record<string, unknown>\n relations?: Record<string, unknown>[]\n}\n```\n\n### `BatchReplayRequest`\n\n```ts\ntype BatchReplayRequest = {\n eventIds: string[]\n}\n```\n';
|
|
5
|
+
export {
|
|
6
|
+
webhooks_default as default
|
|
7
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { OpenAPIClient, Parameters, AxiosRequestConfig, OperationResponse, UnknownParamsObject } from 'openapi-client-axios';
|
|
2
2
|
|
|
3
3
|
/* Auto-copied from webhooks-client */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
|
|
6
4
|
|
|
7
5
|
|
|
8
6
|
declare namespace Components {
|
|
@@ -401,7 +399,7 @@ declare namespace Components {
|
|
|
401
399
|
* example:
|
|
402
400
|
* succeeded
|
|
403
401
|
*/
|
|
404
|
-
status?: "succeeded" | "failed";
|
|
402
|
+
status?: "succeeded" | "failed" | "skipped";
|
|
405
403
|
}
|
|
406
404
|
export interface TriggerWebhookResp {
|
|
407
405
|
status_code?: string;
|
|
@@ -415,6 +413,50 @@ declare namespace Components {
|
|
|
415
413
|
end_date?: string;
|
|
416
414
|
event_id: string;
|
|
417
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* A condition that must be met for the webhook to fire.
|
|
418
|
+
*/
|
|
419
|
+
export interface WebhookCondition {
|
|
420
|
+
/**
|
|
421
|
+
* Dot-notation path to the field in the event payload (e.g. "entity.status", "entity.line_items")
|
|
422
|
+
*/
|
|
423
|
+
field: string;
|
|
424
|
+
operation: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty";
|
|
425
|
+
/**
|
|
426
|
+
* Values to compare against (not required for is_empty/is_not_empty)
|
|
427
|
+
*/
|
|
428
|
+
values?: string[];
|
|
429
|
+
/**
|
|
430
|
+
* Type hint for the field (affects comparison logic)
|
|
431
|
+
*/
|
|
432
|
+
field_type?: "string" | "number" | "boolean" | "date" | "datetime";
|
|
433
|
+
/**
|
|
434
|
+
* Whether the target field is an array (repeatable)
|
|
435
|
+
*/
|
|
436
|
+
is_array_field?: boolean;
|
|
437
|
+
/**
|
|
438
|
+
* When true, evaluates conditions per-item in repeatable array fields
|
|
439
|
+
*/
|
|
440
|
+
repeatable_item_op?: boolean;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* A group of conditions with a logical operator. Multiple conditions are AND-ed by default.
|
|
444
|
+
*/
|
|
445
|
+
export interface WebhookConditionGroup {
|
|
446
|
+
conditions?: [
|
|
447
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
448
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
449
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
450
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
451
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
452
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
453
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
454
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
455
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
456
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?
|
|
457
|
+
];
|
|
458
|
+
logical_operator?: "AND" | "OR";
|
|
459
|
+
}
|
|
418
460
|
/**
|
|
419
461
|
* example:
|
|
420
462
|
* {
|
|
@@ -455,11 +497,23 @@ declare namespace Components {
|
|
|
455
497
|
filter?: Filter;
|
|
456
498
|
payloadConfiguration?: /* Configuration for the webhook payload */ PayloadConfiguration;
|
|
457
499
|
enableStaticIP?: boolean;
|
|
500
|
+
/**
|
|
501
|
+
* When true, indicates this webhook configuration is protected and should not be modified without explicit intent.
|
|
502
|
+
*/
|
|
503
|
+
protected?: boolean;
|
|
504
|
+
/**
|
|
505
|
+
* Routes webhook requests through a secure VPC proxy (ERP integration service). When set, takes precedence over enableStaticIP.
|
|
506
|
+
*/
|
|
507
|
+
secureProxy?: {
|
|
508
|
+
integration_id: string; // uuid
|
|
509
|
+
use_case_slug: string;
|
|
510
|
+
};
|
|
458
511
|
status?: "active" | "inactive" | "incomplete";
|
|
459
512
|
/**
|
|
460
513
|
* JSONata expression to transform the payload
|
|
461
514
|
*/
|
|
462
515
|
jsonataExpression?: string;
|
|
516
|
+
filterConditions?: /* A group of conditions with a logical operator. Multiple conditions are AND-ed by default. */ WebhookConditionGroup;
|
|
463
517
|
/**
|
|
464
518
|
* Manifest ID used to create/update the webhook resource
|
|
465
519
|
*/
|
|
@@ -495,7 +549,7 @@ declare namespace Components {
|
|
|
495
549
|
code?: string;
|
|
496
550
|
};
|
|
497
551
|
metadata?: /* Contains the metadata about the configured event */ Metadata;
|
|
498
|
-
status?: "succeeded" | "failed" | "in_progress";
|
|
552
|
+
status?: "succeeded" | "failed" | "in_progress" | "skipped";
|
|
499
553
|
http_method?: "GET" | "POST" | "PUT";
|
|
500
554
|
/**
|
|
501
555
|
* stringified payload of the webhook request
|
|
@@ -1194,7 +1248,9 @@ type PayloadConfiguration = Components.Schemas.PayloadConfiguration;
|
|
|
1194
1248
|
type PublicKeyResponse = Components.Schemas.PublicKeyResponse;
|
|
1195
1249
|
type SearchOptions = Components.Schemas.SearchOptions;
|
|
1196
1250
|
type TriggerWebhookResp = Components.Schemas.TriggerWebhookResp;
|
|
1251
|
+
type WebhookCondition = Components.Schemas.WebhookCondition;
|
|
1252
|
+
type WebhookConditionGroup = Components.Schemas.WebhookConditionGroup;
|
|
1197
1253
|
type WebhookConfig = Components.Schemas.WebhookConfig;
|
|
1198
1254
|
type WebhookEvent = Components.Schemas.WebhookEvent;
|
|
1199
1255
|
|
|
1200
|
-
export { type ApiKeyConfig as A, type BasicAuthConfig as B, type Client as C, type ErrorResp as E, type Filter as F, type HttpMethod as H, type Metadata as M, type OperationMethods as O, Paths as P, type SearchOptions as S, type TriggerWebhookResp as T, type
|
|
1256
|
+
export { type ApiKeyConfig as A, type BasicAuthConfig as B, type Client as C, type ErrorResp as E, type Filter as F, type HttpMethod as H, type Metadata as M, type OperationMethods as O, Paths as P, type SearchOptions as S, type TriggerWebhookResp as T, type WebhookCondition as W, Components as a, type PathsDictionary as b, type Auth as c, type AuthType as d, type BatchReplayRequest as e, type CustomHeader as f, type CustomOAuthParameter as g, type EventConfigEntry as h, type EventConfigResp as i, type EventListResponse as j, type ExampleRequest as k, type ExampleResponse as l, type ExecutionPayload as m, type OAuthConfig as n, type PayloadConfiguration as o, type PublicKeyResponse as p, type WebhookConditionGroup as q, type WebhookConfig as r, type WebhookEvent as s };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { OpenAPIClient, Parameters, AxiosRequestConfig, OperationResponse, UnknownParamsObject } from 'openapi-client-axios';
|
|
2
2
|
|
|
3
3
|
/* Auto-copied from webhooks-client */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
|
|
6
4
|
|
|
7
5
|
|
|
8
6
|
declare namespace Components {
|
|
@@ -401,7 +399,7 @@ declare namespace Components {
|
|
|
401
399
|
* example:
|
|
402
400
|
* succeeded
|
|
403
401
|
*/
|
|
404
|
-
status?: "succeeded" | "failed";
|
|
402
|
+
status?: "succeeded" | "failed" | "skipped";
|
|
405
403
|
}
|
|
406
404
|
export interface TriggerWebhookResp {
|
|
407
405
|
status_code?: string;
|
|
@@ -415,6 +413,50 @@ declare namespace Components {
|
|
|
415
413
|
end_date?: string;
|
|
416
414
|
event_id: string;
|
|
417
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* A condition that must be met for the webhook to fire.
|
|
418
|
+
*/
|
|
419
|
+
export interface WebhookCondition {
|
|
420
|
+
/**
|
|
421
|
+
* Dot-notation path to the field in the event payload (e.g. "entity.status", "entity.line_items")
|
|
422
|
+
*/
|
|
423
|
+
field: string;
|
|
424
|
+
operation: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty";
|
|
425
|
+
/**
|
|
426
|
+
* Values to compare against (not required for is_empty/is_not_empty)
|
|
427
|
+
*/
|
|
428
|
+
values?: string[];
|
|
429
|
+
/**
|
|
430
|
+
* Type hint for the field (affects comparison logic)
|
|
431
|
+
*/
|
|
432
|
+
field_type?: "string" | "number" | "boolean" | "date" | "datetime";
|
|
433
|
+
/**
|
|
434
|
+
* Whether the target field is an array (repeatable)
|
|
435
|
+
*/
|
|
436
|
+
is_array_field?: boolean;
|
|
437
|
+
/**
|
|
438
|
+
* When true, evaluates conditions per-item in repeatable array fields
|
|
439
|
+
*/
|
|
440
|
+
repeatable_item_op?: boolean;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* A group of conditions with a logical operator. Multiple conditions are AND-ed by default.
|
|
444
|
+
*/
|
|
445
|
+
export interface WebhookConditionGroup {
|
|
446
|
+
conditions?: [
|
|
447
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
448
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
449
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
450
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
451
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
452
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
453
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
454
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
455
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
456
|
+
/* A condition that must be met for the webhook to fire. */ WebhookCondition?
|
|
457
|
+
];
|
|
458
|
+
logical_operator?: "AND" | "OR";
|
|
459
|
+
}
|
|
418
460
|
/**
|
|
419
461
|
* example:
|
|
420
462
|
* {
|
|
@@ -455,11 +497,23 @@ declare namespace Components {
|
|
|
455
497
|
filter?: Filter;
|
|
456
498
|
payloadConfiguration?: /* Configuration for the webhook payload */ PayloadConfiguration;
|
|
457
499
|
enableStaticIP?: boolean;
|
|
500
|
+
/**
|
|
501
|
+
* When true, indicates this webhook configuration is protected and should not be modified without explicit intent.
|
|
502
|
+
*/
|
|
503
|
+
protected?: boolean;
|
|
504
|
+
/**
|
|
505
|
+
* Routes webhook requests through a secure VPC proxy (ERP integration service). When set, takes precedence over enableStaticIP.
|
|
506
|
+
*/
|
|
507
|
+
secureProxy?: {
|
|
508
|
+
integration_id: string; // uuid
|
|
509
|
+
use_case_slug: string;
|
|
510
|
+
};
|
|
458
511
|
status?: "active" | "inactive" | "incomplete";
|
|
459
512
|
/**
|
|
460
513
|
* JSONata expression to transform the payload
|
|
461
514
|
*/
|
|
462
515
|
jsonataExpression?: string;
|
|
516
|
+
filterConditions?: /* A group of conditions with a logical operator. Multiple conditions are AND-ed by default. */ WebhookConditionGroup;
|
|
463
517
|
/**
|
|
464
518
|
* Manifest ID used to create/update the webhook resource
|
|
465
519
|
*/
|
|
@@ -495,7 +549,7 @@ declare namespace Components {
|
|
|
495
549
|
code?: string;
|
|
496
550
|
};
|
|
497
551
|
metadata?: /* Contains the metadata about the configured event */ Metadata;
|
|
498
|
-
status?: "succeeded" | "failed" | "in_progress";
|
|
552
|
+
status?: "succeeded" | "failed" | "in_progress" | "skipped";
|
|
499
553
|
http_method?: "GET" | "POST" | "PUT";
|
|
500
554
|
/**
|
|
501
555
|
* stringified payload of the webhook request
|
|
@@ -1194,7 +1248,9 @@ type PayloadConfiguration = Components.Schemas.PayloadConfiguration;
|
|
|
1194
1248
|
type PublicKeyResponse = Components.Schemas.PublicKeyResponse;
|
|
1195
1249
|
type SearchOptions = Components.Schemas.SearchOptions;
|
|
1196
1250
|
type TriggerWebhookResp = Components.Schemas.TriggerWebhookResp;
|
|
1251
|
+
type WebhookCondition = Components.Schemas.WebhookCondition;
|
|
1252
|
+
type WebhookConditionGroup = Components.Schemas.WebhookConditionGroup;
|
|
1197
1253
|
type WebhookConfig = Components.Schemas.WebhookConfig;
|
|
1198
1254
|
type WebhookEvent = Components.Schemas.WebhookEvent;
|
|
1199
1255
|
|
|
1200
|
-
export { type ApiKeyConfig as A, type BasicAuthConfig as B, type Client as C, type ErrorResp as E, type Filter as F, type HttpMethod as H, type Metadata as M, type OperationMethods as O, Paths as P, type SearchOptions as S, type TriggerWebhookResp as T, type
|
|
1256
|
+
export { type ApiKeyConfig as A, type BasicAuthConfig as B, type Client as C, type ErrorResp as E, type Filter as F, type HttpMethod as H, type Metadata as M, type OperationMethods as O, Paths as P, type SearchOptions as S, type TriggerWebhookResp as T, type WebhookCondition as W, Components as a, type PathsDictionary as b, type Auth as c, type AuthType as d, type BatchReplayRequest as e, type CustomHeader as f, type CustomOAuthParameter as g, type EventConfigEntry as h, type EventConfigResp as i, type EventListResponse as j, type ExampleRequest as k, type ExampleResponse as l, type ExecutionPayload as m, type OAuthConfig as n, type PayloadConfiguration as o, type PublicKeyResponse as p, type WebhookConditionGroup as q, type WebhookConfig as r, type WebhookEvent as s };
|
package/docs/app.md
CHANGED
|
@@ -399,7 +399,8 @@ const { data } = await client.getPublicConfiguration({
|
|
|
399
399
|
},
|
|
400
400
|
"blueprint_ref": {
|
|
401
401
|
"manifest_id": "string",
|
|
402
|
-
"job_id": "string"
|
|
402
|
+
"job_id": "string",
|
|
403
|
+
"source_blueprint_file": "string"
|
|
403
404
|
},
|
|
404
405
|
"latest_version": "string",
|
|
405
406
|
"public": true,
|
|
@@ -519,7 +520,8 @@ const { data } = await client.getConfiguration({
|
|
|
519
520
|
},
|
|
520
521
|
"blueprint_ref": {
|
|
521
522
|
"manifest_id": "string",
|
|
522
|
-
"job_id": "string"
|
|
523
|
+
"job_id": "string",
|
|
524
|
+
"source_blueprint_file": "string"
|
|
523
525
|
},
|
|
524
526
|
"version_audit": {
|
|
525
527
|
"created_at": "string",
|
|
@@ -877,7 +879,8 @@ const { data } = await client.listVersions({
|
|
|
877
879
|
},
|
|
878
880
|
"blueprint_ref": {
|
|
879
881
|
"manifest_id": "string",
|
|
880
|
-
"job_id": "string"
|
|
882
|
+
"job_id": "string",
|
|
883
|
+
"source_blueprint_file": "string"
|
|
881
884
|
},
|
|
882
885
|
"version_audit": {
|
|
883
886
|
"created_at": "string",
|
|
@@ -992,7 +995,8 @@ const { data } = await client.getVersion({
|
|
|
992
995
|
},
|
|
993
996
|
"blueprint_ref": {
|
|
994
997
|
"manifest_id": "string",
|
|
995
|
-
"job_id": "string"
|
|
998
|
+
"job_id": "string",
|
|
999
|
+
"source_blueprint_file": "string"
|
|
996
1000
|
},
|
|
997
1001
|
"version_audit": {
|
|
998
1002
|
"created_at": "string",
|
|
@@ -1328,7 +1332,8 @@ const { data } = await client.listInstallations({
|
|
|
1328
1332
|
"role": "string",
|
|
1329
1333
|
"blueprint_ref": {
|
|
1330
1334
|
"manifest_id": "string",
|
|
1331
|
-
"job_id": "string"
|
|
1335
|
+
"job_id": "string",
|
|
1336
|
+
"source_blueprint_file": "string"
|
|
1332
1337
|
},
|
|
1333
1338
|
"installation_audit": {
|
|
1334
1339
|
"created_at": "string",
|
|
@@ -1407,7 +1412,8 @@ const { data } = await client.getInstallation({
|
|
|
1407
1412
|
"role": "string",
|
|
1408
1413
|
"blueprint_ref": {
|
|
1409
1414
|
"manifest_id": "string",
|
|
1410
|
-
"job_id": "string"
|
|
1415
|
+
"job_id": "string",
|
|
1416
|
+
"source_blueprint_file": "string"
|
|
1411
1417
|
},
|
|
1412
1418
|
"installation_audit": {
|
|
1413
1419
|
"created_at": "string",
|
|
@@ -1496,7 +1502,8 @@ const { data } = await client.install(
|
|
|
1496
1502
|
"role": "string",
|
|
1497
1503
|
"blueprint_ref": {
|
|
1498
1504
|
"manifest_id": "string",
|
|
1499
|
-
"job_id": "string"
|
|
1505
|
+
"job_id": "string",
|
|
1506
|
+
"source_blueprint_file": "string"
|
|
1500
1507
|
},
|
|
1501
1508
|
"installation_audit": {
|
|
1502
1509
|
"created_at": "string",
|
|
@@ -1614,7 +1621,8 @@ const { data } = await client.promoteVersion({
|
|
|
1614
1621
|
"role": "string",
|
|
1615
1622
|
"blueprint_ref": {
|
|
1616
1623
|
"manifest_id": "string",
|
|
1617
|
-
"job_id": "string"
|
|
1624
|
+
"job_id": "string",
|
|
1625
|
+
"source_blueprint_file": "string"
|
|
1618
1626
|
},
|
|
1619
1627
|
"installation_audit": {
|
|
1620
1628
|
"created_at": "string",
|
|
@@ -1888,7 +1896,7 @@ type PortalBlockComponent = {
|
|
|
1888
1896
|
app_url?: { ... }
|
|
1889
1897
|
zip_url?: { ... }
|
|
1890
1898
|
override_url?: { ... }
|
|
1891
|
-
|
|
1899
|
+
supported_surfaces?: { ... }
|
|
1892
1900
|
}
|
|
1893
1901
|
}
|
|
1894
1902
|
}
|
|
@@ -2721,7 +2729,7 @@ type PortalBlockSurfaceConfig = {
|
|
|
2721
2729
|
app_url?: string
|
|
2722
2730
|
zip_url?: string
|
|
2723
2731
|
override_url?: string
|
|
2724
|
-
|
|
2732
|
+
supported_surfaces?: "main" | "footer_inline" | "footer_left_absolute" | "footer_right_absolute"[]
|
|
2725
2733
|
}
|
|
2726
2734
|
```
|
|
2727
2735
|
|
|
@@ -2907,6 +2915,7 @@ type ConfigurationVersion = {
|
|
|
2907
2915
|
blueprint_ref?: {
|
|
2908
2916
|
manifest_id?: string
|
|
2909
2917
|
job_id?: string
|
|
2918
|
+
source_blueprint_file?: string
|
|
2910
2919
|
}
|
|
2911
2920
|
version_audit: {
|
|
2912
2921
|
created_at?: string
|
|
@@ -2936,6 +2945,7 @@ type Grants = Array<{
|
|
|
2936
2945
|
type BlueprintRef = {
|
|
2937
2946
|
manifest_id?: string
|
|
2938
2947
|
job_id?: string
|
|
2948
|
+
source_blueprint_file?: string
|
|
2939
2949
|
}
|
|
2940
2950
|
```
|
|
2941
2951
|
|
|
@@ -2982,6 +2992,7 @@ type Installation = {
|
|
|
2982
2992
|
blueprint_ref?: {
|
|
2983
2993
|
manifest_id?: string
|
|
2984
2994
|
job_id?: string
|
|
2995
|
+
source_blueprint_file?: string
|
|
2985
2996
|
}
|
|
2986
2997
|
installation_audit?: {
|
|
2987
2998
|
created_at?: string
|
|
@@ -3053,6 +3064,7 @@ type PublicConfiguration = {
|
|
|
3053
3064
|
blueprint_ref?: {
|
|
3054
3065
|
manifest_id?: string
|
|
3055
3066
|
job_id?: string
|
|
3067
|
+
source_blueprint_file?: string
|
|
3056
3068
|
}
|
|
3057
3069
|
latest_version?: string
|
|
3058
3070
|
public?: boolean
|
|
@@ -3081,6 +3093,7 @@ type PublicConfiguration = {
|
|
|
3081
3093
|
blueprint_ref?: {
|
|
3082
3094
|
manifest_id?: { ... }
|
|
3083
3095
|
job_id?: { ... }
|
|
3096
|
+
source_blueprint_file?: { ... }
|
|
3084
3097
|
}
|
|
3085
3098
|
version_audit: {
|
|
3086
3099
|
created_at?: { ... }
|
|
@@ -3173,6 +3186,7 @@ type Configuration = {
|
|
|
3173
3186
|
blueprint_ref?: {
|
|
3174
3187
|
manifest_id?: string
|
|
3175
3188
|
job_id?: string
|
|
3189
|
+
source_blueprint_file?: string
|
|
3176
3190
|
}
|
|
3177
3191
|
version_audit: {
|
|
3178
3192
|
created_at?: string
|
package/docs/webhooks.md
CHANGED
|
@@ -48,6 +48,8 @@ const { data } = await webhooksClient.getPublicKey(...)
|
|
|
48
48
|
- [`HttpMethod`](#httpmethod)
|
|
49
49
|
- [`AuthType`](#authtype)
|
|
50
50
|
- [`Filter`](#filter)
|
|
51
|
+
- [`WebhookCondition`](#webhookcondition)
|
|
52
|
+
- [`WebhookConditionGroup`](#webhookconditiongroup)
|
|
51
53
|
- [`Auth`](#auth)
|
|
52
54
|
- [`BasicAuthConfig`](#basicauthconfig)
|
|
53
55
|
- [`OAuthConfig`](#oauthconfig)
|
|
@@ -614,7 +616,7 @@ type SearchOptions = {
|
|
|
614
616
|
to?: string // date-time
|
|
615
617
|
}
|
|
616
618
|
event_id?: string
|
|
617
|
-
status?: "succeeded" | "failed"
|
|
619
|
+
status?: "succeeded" | "failed" | "skipped"
|
|
618
620
|
}
|
|
619
621
|
```
|
|
620
622
|
|
|
@@ -648,7 +650,7 @@ type EventListResponse = {
|
|
|
648
650
|
execution_id?: { ... }
|
|
649
651
|
action_id?: { ... }
|
|
650
652
|
}
|
|
651
|
-
status?: "succeeded" | "failed" | "in_progress"
|
|
653
|
+
status?: "succeeded" | "failed" | "in_progress" | "skipped"
|
|
652
654
|
http_method?: "GET" | "POST" | "PUT"
|
|
653
655
|
payload?: string
|
|
654
656
|
}>
|
|
@@ -681,6 +683,39 @@ type Filter = {
|
|
|
681
683
|
}
|
|
682
684
|
```
|
|
683
685
|
|
|
686
|
+
### `WebhookCondition`
|
|
687
|
+
|
|
688
|
+
A condition that must be met for the webhook to fire.
|
|
689
|
+
|
|
690
|
+
```ts
|
|
691
|
+
type WebhookCondition = {
|
|
692
|
+
field: string
|
|
693
|
+
operation: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"
|
|
694
|
+
values?: string[]
|
|
695
|
+
field_type?: "string" | "number" | "boolean" | "date" | "datetime"
|
|
696
|
+
is_array_field?: boolean
|
|
697
|
+
repeatable_item_op?: boolean
|
|
698
|
+
}
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
### `WebhookConditionGroup`
|
|
702
|
+
|
|
703
|
+
A group of conditions with a logical operator. Multiple conditions are AND-ed by default.
|
|
704
|
+
|
|
705
|
+
```ts
|
|
706
|
+
type WebhookConditionGroup = {
|
|
707
|
+
conditions?: Array<{
|
|
708
|
+
field: string
|
|
709
|
+
operation: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"
|
|
710
|
+
values?: string[]
|
|
711
|
+
field_type?: "string" | "number" | "boolean" | "date" | "datetime"
|
|
712
|
+
is_array_field?: boolean
|
|
713
|
+
repeatable_item_op?: boolean
|
|
714
|
+
}>
|
|
715
|
+
logical_operator?: "AND" | "OR"
|
|
716
|
+
}
|
|
717
|
+
```
|
|
718
|
+
|
|
684
719
|
### `Auth`
|
|
685
720
|
|
|
686
721
|
```ts
|
|
@@ -798,8 +833,24 @@ type WebhookConfig = {
|
|
|
798
833
|
custom_headers?: Record<string, string>
|
|
799
834
|
}
|
|
800
835
|
enableStaticIP?: boolean
|
|
836
|
+
protected?: boolean
|
|
837
|
+
secureProxy?: {
|
|
838
|
+
integration_id: string // uuid
|
|
839
|
+
use_case_slug: string
|
|
840
|
+
}
|
|
801
841
|
status?: "active" | "inactive" | "incomplete"
|
|
802
842
|
jsonataExpression?: string
|
|
843
|
+
filterConditions?: {
|
|
844
|
+
conditions?: Array<{
|
|
845
|
+
field: { ... }
|
|
846
|
+
operation: { ... }
|
|
847
|
+
values?: { ... }
|
|
848
|
+
field_type?: { ... }
|
|
849
|
+
is_array_field?: { ... }
|
|
850
|
+
repeatable_item_op?: { ... }
|
|
851
|
+
}>
|
|
852
|
+
logical_operator?: "AND" | "OR"
|
|
853
|
+
}
|
|
803
854
|
_manifest?: string // uuid[]
|
|
804
855
|
signingSecret?: string
|
|
805
856
|
}
|
|
@@ -951,7 +1002,7 @@ type WebhookEvent = {
|
|
|
951
1002
|
execution_id?: string
|
|
952
1003
|
action_id?: string
|
|
953
1004
|
}
|
|
954
|
-
status?: "succeeded" | "failed" | "in_progress"
|
|
1005
|
+
status?: "succeeded" | "failed" | "in_progress" | "skipped"
|
|
955
1006
|
http_method?: "GET" | "POST" | "PUT"
|
|
956
1007
|
payload?: string
|
|
957
1008
|
}
|