@epilot/sdk 2.13.2 → 2.14.1
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/message-runtime.json +1 -1
- package/definitions/message.json +146 -1
- package/definitions/targeting-runtime.json +1 -1
- package/definitions/targeting.json +291 -0
- package/definitions/webhooks.json +8 -7
- 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.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/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.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-governance.cjs +6 -6
- package/dist/apis/data-governance.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/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/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.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 +8 -8
- package/dist/apis/message.d.cts +2 -2
- package/dist/apis/message.d.ts +2 -2
- package/dist/apis/message.js +2 -2
- 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/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +8 -8
- package/dist/apis/targeting.d.cts +2 -2
- package/dist/apis/targeting.d.ts +2 -2
- package/dist/apis/targeting.js +2 -2
- 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/chunk-2ESIGECW.js +14 -0
- package/dist/chunk-JM63KEFZ.cjs +14 -0
- package/dist/{chunk-CRUXTTHI.js → chunk-OJLX6U66.js} +5 -5
- package/dist/{chunk-GHPSNA2U.cjs → chunk-SNERI3PK.cjs} +5 -5
- package/dist/chunk-UH24GU2Z.js +14 -0
- package/dist/chunk-W3SPZ6V5.cjs +14 -0
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/js-yaml-DLCVPJ7G.js +0 -0
- package/dist/message-663RPFCZ.js +7 -0
- package/dist/message-CEJ6VDZ6.cjs +7 -0
- package/dist/{message-runtime-XOQ5EJN6.js → message-runtime-5AUGENW3.js} +1 -1
- package/dist/{message-runtime-JSZCNCNU.cjs → message-runtime-5Z3POFZV.cjs} +2 -2
- package/dist/{message.d-B5UuSqgw.d.cts → message.d-VMmPsZVq.d.cts} +317 -4
- package/dist/{message.d-B5UuSqgw.d.ts → message.d-VMmPsZVq.d.ts} +317 -4
- package/dist/targeting-A2X6X7BF.js +7 -0
- package/dist/targeting-CSGKITGV.cjs +7 -0
- package/dist/{targeting-runtime-X3DQ527N.cjs → targeting-runtime-HWL6PLJF.cjs} +2 -2
- package/dist/{targeting-runtime-QI7322HB.js → targeting-runtime-L5RGDNSH.js} +1 -1
- package/dist/{targeting.d-Bq3onSes.d.cts → targeting.d-DaK3kwZg.d.cts} +286 -1
- package/dist/{targeting.d-Bq3onSes.d.ts → targeting.d-DaK3kwZg.d.ts} +286 -1
- package/dist/{webhooks-762WMLN2.cjs → webhooks-PNLMQFE2.cjs} +1 -1
- package/dist/{webhooks-5VDXUDDB.js → webhooks-QYVT2NUP.js} +1 -1
- package/dist/{webhooks.d-B6v_xmSD.d.ts → webhooks.d-DqOEzFsp.d.cts} +18 -14
- package/dist/{webhooks.d-B6v_xmSD.d.cts → webhooks.d-DqOEzFsp.d.ts} +18 -14
- package/docs/message.md +97 -9
- package/docs/targeting.md +192 -0
- package/docs/webhooks.md +10 -7
- package/package.json +11 -12
- package/definitions/focus-pocus-runtime.json +0 -1
- package/definitions/focus-pocus.json +0 -757
- package/dist/chunk-7ILTRJDQ.cjs +0 -14
- package/dist/chunk-DUHAG5CO.cjs +0 -14
- package/dist/chunk-FAZ63FEX.js +0 -14
- package/dist/chunk-H3NMCCSA.js +0 -14
- package/dist/message-6IFCB7GH.js +0 -7
- package/dist/message-7LNAFKKV.cjs +0 -7
- package/dist/targeting-4YMBBPDW.cjs +0 -7
- package/dist/targeting-VCENULF6.js +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./chunk-YPSWSI3M.js";
|
|
2
2
|
|
|
3
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- [`testOAuth`](#testoauth)\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- [`TestOAuthResponse`](#testoauthresponse)\n- [`ReplayRequest`](#replayrequest)\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### `testOAuth`\n\nTest OAuth connection\n\n`POST /v1/webhooks/configs/{configId}/test-oauth`\n\n```ts\nconst { data } = await client.testOAuth({\n configId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "success": true,\n "expires_in": 3600,\n "token_type": "Bearer",\n "message": "OAuth token exchange successful"\n}\n```\n\n</details>\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 reapply_transform: false\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 "original_payload": "string",\n "retry_attempt": 0,\n "can_reapply_transform": true,\n "can_reapply_transform_reason": "available"\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 {\n configId: \'example\',\n eventId: \'example\',\n },\n {\n reapply_transform: false\n },\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 "original_payload": "string",\n "retry_attempt": 0,\n "can_reapply_transform": true,\n "can_reapply_transform_reason": "available"\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 original_payload?: string\n retry_attempt?: number\n can_reapply_transform?: boolean\n can_reapply_transform_reason?: "available" | "no_transform_configured" | "no_original_source"\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" | "length_equals" | "length_not_equals" | "length_greater_than" | "length_less_than" | "length_greater_than_or_equals" | "length_less_than_or_equals"\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" | "length_equals" | "length_not_equals" | "length_greater_than" | "length_less_than" | "length_greater_than_or_equals" | "length_less_than_or_equals"\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 eventVersion?: string\n url?: string\n creationTime?: string\n updatedTime?: 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 apply_changesets?: 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 deliveryMode?: "json_base64" | "binary_multipart"\n multipartConfig?: {\n fileFieldName?: string\n fileFieldStrategy?: "single" | "multi"\n fileSource?: string\n extraFields?: Record<string, string>\n }\n retryPolicy?: {\n enabled: boolean\n maxAttempts?: number\n }\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 apply_changesets?: 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 original_payload?: string\n retry_attempt?: number\n can_reapply_transform?: boolean\n can_reapply_transform_reason?: "available" | "no_transform_configured" | "no_original_source"\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### `TestOAuthResponse`\n\n```ts\ntype TestOAuthResponse = {\n success: boolean\n expires_in?: number\n token_type?: string\n message: string\n}\n```\n\n### `ReplayRequest`\n\n```ts\ntype ReplayRequest = {\n reapply_transform?: boolean\n}\n```\n\n### `BatchReplayRequest`\n\n```ts\ntype BatchReplayRequest = {\n eventIds: string[]\n reapply_transform?: boolean\n}\n```\n';
|
|
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- [`testOAuth`](#testoauth)\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- [`TestOAuthResponse`](#testoauthresponse)\n- [`ReplayRequest`](#replayrequest)\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### `testOAuth`\n\nTest OAuth connection\n\n`POST /v1/webhooks/configs/{configId}/test-oauth`\n\n```ts\nconst { data } = await client.testOAuth({\n configId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "success": true,\n "expires_in": 3600,\n "token_type": "Bearer",\n "message": "OAuth token exchange successful"\n}\n```\n\n</details>\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 reapply_transform: false\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 "original_payload": "string",\n "retry_attempt": 0,\n "can_reapply_transform": true,\n "can_reapply_transform_reason": "available"\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 {\n configId: \'example\',\n eventId: \'example\',\n },\n {\n reapply_transform: false\n },\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 "original_payload": "string",\n "retry_attempt": 0,\n "can_reapply_transform": true,\n "can_reapply_transform_reason": "available"\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 original_payload?: string\n retry_attempt?: number\n can_reapply_transform?: boolean\n can_reapply_transform_reason?: "available" | "no_transform_configured" | "no_original_source"\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. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload \u2014 the two forms are mutually exclusive.\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" | "length_equals" | "length_not_equals" | "length_greater_than" | "length_less_than" | "length_greater_than_or_equals" | "length_less_than_or_equals"\n values?: string[]\n field_type?: "string" | "number" | "boolean" | "date" | "datetime"\n is_array_field?: boolean\n repeatable_item_op?: boolean\n jsonata_expression?: string\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" | "length_equals" | "length_not_equals" | "length_greater_than" | "length_less_than" | "length_greater_than_or_equals" | "length_less_than_or_equals"\n values?: string[]\n field_type?: "string" | "number" | "boolean" | "date" | "datetime"\n is_array_field?: boolean\n repeatable_item_op?: boolean\n jsonata_expression?: string\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 eventVersion?: string\n url?: string\n creationTime?: string\n updatedTime?: 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 apply_changesets?: 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 deliveryMode?: "json_base64" | "binary_multipart"\n multipartConfig?: {\n fileFieldName?: string\n fileFieldStrategy?: "single" | "multi"\n fileSource?: string\n extraFields?: Record<string, string>\n }\n retryPolicy?: {\n enabled: boolean\n maxAttempts?: number\n }\n filterConditions?: {\n conditions?: Array<{\n field?: { ... }\n operation?: { ... }\n values?: { ... }\n field_type?: { ... }\n is_array_field?: { ... }\n repeatable_item_op?: { ... }\n jsonata_expression?: { ... }\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 apply_changesets?: 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 original_payload?: string\n retry_attempt?: number\n can_reapply_transform?: boolean\n can_reapply_transform_reason?: "available" | "no_transform_configured" | "no_original_source"\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### `TestOAuthResponse`\n\n```ts\ntype TestOAuthResponse = {\n success: boolean\n expires_in?: number\n token_type?: string\n message: string\n}\n```\n\n### `ReplayRequest`\n\n```ts\ntype ReplayRequest = {\n reapply_transform?: boolean\n}\n```\n\n### `BatchReplayRequest`\n\n```ts\ntype BatchReplayRequest = {\n eventIds: string[]\n reapply_transform?: boolean\n}\n```\n';
|
|
5
5
|
export {
|
|
6
6
|
webhooks_default as default
|
|
7
7
|
};
|
|
@@ -472,17 +472,17 @@ declare namespace Components {
|
|
|
472
472
|
event_id: string;
|
|
473
473
|
}
|
|
474
474
|
/**
|
|
475
|
-
* A condition that must be met for the webhook to fire.
|
|
475
|
+
* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive.
|
|
476
476
|
*/
|
|
477
477
|
export interface WebhookCondition {
|
|
478
478
|
/**
|
|
479
|
-
* Dot-notation path to the field in the event payload (e.g. "entity.status", "entity.line_items")
|
|
479
|
+
* Dot-notation path to the field in the event payload (e.g. "entity.status", "entity.line_items"). Supports array indices in either spelling, which resolve identically: "meter_readings.1.file_id" or "meter_readings[1].file_id".
|
|
480
480
|
*/
|
|
481
|
-
field
|
|
481
|
+
field?: string;
|
|
482
482
|
/**
|
|
483
483
|
* Comparison operator. The length_* operations compare the item count of the field value (an array yields its length, a missing or null field yields 0, and any single non-array value yields 1) against values[0], which must be a non-negative integer.
|
|
484
484
|
*/
|
|
485
|
-
operation
|
|
485
|
+
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" | "length_equals" | "length_not_equals" | "length_greater_than" | "length_less_than" | "length_greater_than_or_equals" | "length_less_than_or_equals";
|
|
486
486
|
/**
|
|
487
487
|
* Values to compare against (not required for is_empty/is_not_empty)
|
|
488
488
|
*/
|
|
@@ -499,22 +499,26 @@ declare namespace Components {
|
|
|
499
499
|
* When true, evaluates conditions per-item in repeatable array fields
|
|
500
500
|
*/
|
|
501
501
|
repeatable_item_op?: boolean;
|
|
502
|
+
/**
|
|
503
|
+
* JSONata expression evaluated against the event payload; the condition passes when the result is truthy per JSONata $boolean semantics. Mutually exclusive with field/operation.
|
|
504
|
+
*/
|
|
505
|
+
jsonata_expression?: string;
|
|
502
506
|
}
|
|
503
507
|
/**
|
|
504
508
|
* A group of conditions with a logical operator. Multiple conditions are AND-ed by default.
|
|
505
509
|
*/
|
|
506
510
|
export interface WebhookConditionGroup {
|
|
507
511
|
conditions?: [
|
|
508
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
509
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
510
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
511
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
512
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
513
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
514
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
515
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
516
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
517
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?
|
|
512
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
513
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
514
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
515
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
516
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
517
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
518
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
519
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
520
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
521
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?
|
|
518
522
|
];
|
|
519
523
|
logical_operator?: "AND" | "OR";
|
|
520
524
|
}
|
|
@@ -472,17 +472,17 @@ declare namespace Components {
|
|
|
472
472
|
event_id: string;
|
|
473
473
|
}
|
|
474
474
|
/**
|
|
475
|
-
* A condition that must be met for the webhook to fire.
|
|
475
|
+
* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive.
|
|
476
476
|
*/
|
|
477
477
|
export interface WebhookCondition {
|
|
478
478
|
/**
|
|
479
|
-
* Dot-notation path to the field in the event payload (e.g. "entity.status", "entity.line_items")
|
|
479
|
+
* Dot-notation path to the field in the event payload (e.g. "entity.status", "entity.line_items"). Supports array indices in either spelling, which resolve identically: "meter_readings.1.file_id" or "meter_readings[1].file_id".
|
|
480
480
|
*/
|
|
481
|
-
field
|
|
481
|
+
field?: string;
|
|
482
482
|
/**
|
|
483
483
|
* Comparison operator. The length_* operations compare the item count of the field value (an array yields its length, a missing or null field yields 0, and any single non-array value yields 1) against values[0], which must be a non-negative integer.
|
|
484
484
|
*/
|
|
485
|
-
operation
|
|
485
|
+
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" | "length_equals" | "length_not_equals" | "length_greater_than" | "length_less_than" | "length_greater_than_or_equals" | "length_less_than_or_equals";
|
|
486
486
|
/**
|
|
487
487
|
* Values to compare against (not required for is_empty/is_not_empty)
|
|
488
488
|
*/
|
|
@@ -499,22 +499,26 @@ declare namespace Components {
|
|
|
499
499
|
* When true, evaluates conditions per-item in repeatable array fields
|
|
500
500
|
*/
|
|
501
501
|
repeatable_item_op?: boolean;
|
|
502
|
+
/**
|
|
503
|
+
* JSONata expression evaluated against the event payload; the condition passes when the result is truthy per JSONata $boolean semantics. Mutually exclusive with field/operation.
|
|
504
|
+
*/
|
|
505
|
+
jsonata_expression?: string;
|
|
502
506
|
}
|
|
503
507
|
/**
|
|
504
508
|
* A group of conditions with a logical operator. Multiple conditions are AND-ed by default.
|
|
505
509
|
*/
|
|
506
510
|
export interface WebhookConditionGroup {
|
|
507
511
|
conditions?: [
|
|
508
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
509
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
510
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
511
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
512
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
513
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
514
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
515
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
516
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?,
|
|
517
|
-
/* A condition that must be met for the webhook to fire. */ WebhookCondition?
|
|
512
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
513
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
514
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
515
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
516
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
517
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
518
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
519
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
520
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?,
|
|
521
|
+
/* A condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload — the two forms are mutually exclusive. */ WebhookCondition?
|
|
518
522
|
];
|
|
519
523
|
logical_operator?: "AND" | "OR";
|
|
520
524
|
}
|
package/docs/message.md
CHANGED
|
@@ -46,6 +46,7 @@ const { data } = await messageClient.sendMessage(...)
|
|
|
46
46
|
- [`searchThreads`](#searchthreads)
|
|
47
47
|
- [`searchThreadsV2`](#searchthreadsv2)
|
|
48
48
|
- [`searchIds`](#searchids)
|
|
49
|
+
- [`getAssigneeWorkload`](#getassigneeworkload)
|
|
49
50
|
- [`updateThread`](#updatethread)
|
|
50
51
|
- [`deleteThread`](#deletethread)
|
|
51
52
|
- [`moveThread`](#movethread)
|
|
@@ -96,6 +97,9 @@ const { data } = await messageClient.sendMessage(...)
|
|
|
96
97
|
- [`SearchParamsV2`](#searchparamsv2)
|
|
97
98
|
- [`SearchParams`](#searchparams)
|
|
98
99
|
- [`SearchIDParams`](#searchidparams)
|
|
100
|
+
- [`AssigneeWorkloadParams`](#assigneeworkloadparams)
|
|
101
|
+
- [`AssigneeWorkload`](#assigneeworkload)
|
|
102
|
+
- [`AssigneeWorkloadResults`](#assigneeworkloadresults)
|
|
99
103
|
- [`ReadMessagePayload`](#readmessagepayload)
|
|
100
104
|
- [`ReadingScope`](#readingscope)
|
|
101
105
|
- [`ThreadTimeline`](#threadtimeline)
|
|
@@ -157,6 +161,7 @@ const { data } = await client.updateMessage()
|
|
|
157
161
|
"_updated_at": "2021-02-10T09:14:31.990Z",
|
|
158
162
|
"message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
|
|
159
163
|
"sender": "206801",
|
|
164
|
+
"updated_by": "206801",
|
|
160
165
|
"subject": "Request for solar panel price",
|
|
161
166
|
"html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
|
|
162
167
|
"text": "We at ABC GmbH would like to request a price quote for the solar panel.",
|
|
@@ -210,7 +215,8 @@ const { data } = await client.updateMessage()
|
|
|
210
215
|
"may_be_signature_attachment": true,
|
|
211
216
|
"cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",
|
|
212
217
|
"inline": false,
|
|
213
|
-
"send_as_link": false
|
|
218
|
+
"send_as_link": false,
|
|
219
|
+
"save_to_entity": true
|
|
214
220
|
}
|
|
215
221
|
]
|
|
216
222
|
},
|
|
@@ -254,6 +260,7 @@ const { data } = await client.getMessage({
|
|
|
254
260
|
"_updated_at": "2021-02-10T09:14:31.990Z",
|
|
255
261
|
"message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
|
|
256
262
|
"sender": "206801",
|
|
263
|
+
"updated_by": "206801",
|
|
257
264
|
"subject": "Request for solar panel price",
|
|
258
265
|
"html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
|
|
259
266
|
"text": "We at ABC GmbH would like to request a price quote for the solar panel.",
|
|
@@ -307,7 +314,8 @@ const { data } = await client.getMessage({
|
|
|
307
314
|
"may_be_signature_attachment": true,
|
|
308
315
|
"cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",
|
|
309
316
|
"inline": false,
|
|
310
|
-
"send_as_link": false
|
|
317
|
+
"send_as_link": false,
|
|
318
|
+
"save_to_entity": true
|
|
311
319
|
}
|
|
312
320
|
]
|
|
313
321
|
},
|
|
@@ -394,6 +402,7 @@ const { data } = await client.searchMessages(
|
|
|
394
402
|
"_updated_at": "2021-02-10T09:14:31.990Z",
|
|
395
403
|
"message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
|
|
396
404
|
"sender": "206801",
|
|
405
|
+
"updated_by": "206801",
|
|
397
406
|
"subject": "Request for solar panel price",
|
|
398
407
|
"html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
|
|
399
408
|
"text": "We at ABC GmbH would like to request a price quote for the solar panel.",
|
|
@@ -447,7 +456,8 @@ const { data } = await client.searchMessages(
|
|
|
447
456
|
"may_be_signature_attachment": true,
|
|
448
457
|
"cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",
|
|
449
458
|
"inline": false,
|
|
450
|
-
"send_as_link": false
|
|
459
|
+
"send_as_link": false,
|
|
460
|
+
"save_to_entity": true
|
|
451
461
|
}
|
|
452
462
|
]
|
|
453
463
|
},
|
|
@@ -723,6 +733,39 @@ const { data } = await client.searchIds(
|
|
|
723
733
|
|
|
724
734
|
---
|
|
725
735
|
|
|
736
|
+
### `getAssigneeWorkload`
|
|
737
|
+
|
|
738
|
+
Return the open-thread workload for a set of user ids.
|
|
739
|
+
|
|
740
|
+
`POST /v2/message/threads:workload`
|
|
741
|
+
|
|
742
|
+
```ts
|
|
743
|
+
const { data } = await client.getAssigneeWorkload(
|
|
744
|
+
null,
|
|
745
|
+
{
|
|
746
|
+
user_ids: ['11000902', '11001053']
|
|
747
|
+
},
|
|
748
|
+
)
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
<details>
|
|
752
|
+
<summary>Response</summary>
|
|
753
|
+
|
|
754
|
+
```json
|
|
755
|
+
{
|
|
756
|
+
"workloads": [
|
|
757
|
+
{
|
|
758
|
+
"user_id": "11000902",
|
|
759
|
+
"open_threads": 2
|
|
760
|
+
}
|
|
761
|
+
]
|
|
762
|
+
}
|
|
763
|
+
```
|
|
764
|
+
|
|
765
|
+
</details>
|
|
766
|
+
|
|
767
|
+
---
|
|
768
|
+
|
|
726
769
|
### `updateThread`
|
|
727
770
|
|
|
728
771
|
Modify thread metadata
|
|
@@ -752,6 +795,7 @@ const { data } = await client.updateThread()
|
|
|
752
795
|
"latest_message": {
|
|
753
796
|
"message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
|
|
754
797
|
"sender": "206801",
|
|
798
|
+
"updated_by": "206801",
|
|
755
799
|
"subject": "Request for solar panel price",
|
|
756
800
|
"html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
|
|
757
801
|
"text": "We at ABC GmbH would like to request a price quote for the solar panel.",
|
|
@@ -792,6 +836,7 @@ const { data } = await client.updateThread()
|
|
|
792
836
|
"latest_trash_message": {
|
|
793
837
|
"message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
|
|
794
838
|
"sender": "206801",
|
|
839
|
+
"updated_by": "206801",
|
|
795
840
|
"subject": "Request for solar panel price",
|
|
796
841
|
"html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
|
|
797
842
|
"text": "We at ABC GmbH would like to request a price quote for the solar panel.",
|
|
@@ -922,7 +967,7 @@ const { data } = await client.getThreadTimeline({
|
|
|
922
967
|
"user_id": "123",
|
|
923
968
|
"organization_id": "456"
|
|
924
969
|
},
|
|
925
|
-
"timestamp": "2024-01-01T00:00:
|
|
970
|
+
"timestamp": "2024-01-01T00:00:00.000Z"
|
|
926
971
|
}
|
|
927
972
|
]
|
|
928
973
|
}
|
|
@@ -1423,6 +1468,7 @@ const { data } = await client.createDraft(
|
|
|
1423
1468
|
"_updated_at": "2021-02-10T09:14:31.990Z",
|
|
1424
1469
|
"message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
|
|
1425
1470
|
"sender": "206801",
|
|
1471
|
+
"updated_by": "206801",
|
|
1426
1472
|
"subject": "Request for solar panel price",
|
|
1427
1473
|
"html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
|
|
1428
1474
|
"text": "We at ABC GmbH would like to request a price quote for the solar panel.",
|
|
@@ -1476,7 +1522,8 @@ const { data } = await client.createDraft(
|
|
|
1476
1522
|
"may_be_signature_attachment": true,
|
|
1477
1523
|
"cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",
|
|
1478
1524
|
"inline": false,
|
|
1479
|
-
"send_as_link": false
|
|
1525
|
+
"send_as_link": false,
|
|
1526
|
+
"save_to_entity": true
|
|
1480
1527
|
}
|
|
1481
1528
|
]
|
|
1482
1529
|
},
|
|
@@ -1518,6 +1565,7 @@ const { data } = await client.sendDraft()
|
|
|
1518
1565
|
"_updated_at": "2021-02-10T09:14:31.990Z",
|
|
1519
1566
|
"message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
|
|
1520
1567
|
"sender": "206801",
|
|
1568
|
+
"updated_by": "206801",
|
|
1521
1569
|
"subject": "Request for solar panel price",
|
|
1522
1570
|
"html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
|
|
1523
1571
|
"text": "We at ABC GmbH would like to request a price quote for the solar panel.",
|
|
@@ -1571,7 +1619,8 @@ const { data } = await client.sendDraft()
|
|
|
1571
1619
|
"may_be_signature_attachment": true,
|
|
1572
1620
|
"cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",
|
|
1573
1621
|
"inline": false,
|
|
1574
|
-
"send_as_link": false
|
|
1622
|
+
"send_as_link": false,
|
|
1623
|
+
"save_to_entity": true
|
|
1575
1624
|
}
|
|
1576
1625
|
]
|
|
1577
1626
|
},
|
|
@@ -1622,6 +1671,7 @@ const { data } = await client.getMessageV2({
|
|
|
1622
1671
|
"_updated_at": "2021-02-10T09:14:31.990Z",
|
|
1623
1672
|
"message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
|
|
1624
1673
|
"sender": "206801",
|
|
1674
|
+
"updated_by": "206801",
|
|
1625
1675
|
"subject": "Request for solar panel price",
|
|
1626
1676
|
"html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
|
|
1627
1677
|
"text": "We at ABC GmbH would like to request a price quote for the solar panel.",
|
|
@@ -1675,7 +1725,8 @@ const { data } = await client.getMessageV2({
|
|
|
1675
1725
|
"may_be_signature_attachment": true,
|
|
1676
1726
|
"cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",
|
|
1677
1727
|
"inline": false,
|
|
1678
|
-
"send_as_link": false
|
|
1728
|
+
"send_as_link": false,
|
|
1729
|
+
"save_to_entity": true
|
|
1679
1730
|
}
|
|
1680
1731
|
]
|
|
1681
1732
|
},
|
|
@@ -1738,6 +1789,7 @@ type Thread = {
|
|
|
1738
1789
|
latest_message?: {
|
|
1739
1790
|
message_id?: string
|
|
1740
1791
|
sender?: string
|
|
1792
|
+
updated_by?: string
|
|
1741
1793
|
subject: string
|
|
1742
1794
|
html?: string
|
|
1743
1795
|
text?: string
|
|
@@ -1790,6 +1842,7 @@ type Thread = {
|
|
|
1790
1842
|
latest_trash_message?: {
|
|
1791
1843
|
message_id?: string
|
|
1792
1844
|
sender?: string
|
|
1845
|
+
updated_by?: string
|
|
1793
1846
|
subject: string
|
|
1794
1847
|
html?: string
|
|
1795
1848
|
text?: string
|
|
@@ -1828,8 +1881,6 @@ type Thread = {
|
|
|
1828
1881
|
send_status?: { ... }
|
|
1829
1882
|
send_error?: { ... }
|
|
1830
1883
|
}>
|
|
1831
|
-
file?: {
|
|
1832
|
-
$relation?: { ... }
|
|
1833
1884
|
// ...
|
|
1834
1885
|
}
|
|
1835
1886
|
```
|
|
@@ -1840,6 +1891,7 @@ type Thread = {
|
|
|
1840
1891
|
type Message = {
|
|
1841
1892
|
message_id?: string
|
|
1842
1893
|
sender?: string
|
|
1894
|
+
updated_by?: string
|
|
1843
1895
|
subject: string
|
|
1844
1896
|
html?: string
|
|
1845
1897
|
text?: string
|
|
@@ -1887,6 +1939,7 @@ type Message = {
|
|
|
1887
1939
|
cid?: { ... }
|
|
1888
1940
|
inline?: { ... }
|
|
1889
1941
|
send_as_link?: { ... }
|
|
1942
|
+
save_to_entity?: { ... }
|
|
1890
1943
|
}>
|
|
1891
1944
|
}
|
|
1892
1945
|
references?: string
|
|
@@ -1912,6 +1965,7 @@ type MessageV2 = {
|
|
|
1912
1965
|
_updated_at: string // date-time
|
|
1913
1966
|
message_id?: string
|
|
1914
1967
|
sender?: string
|
|
1968
|
+
updated_by?: string
|
|
1915
1969
|
subject: string
|
|
1916
1970
|
html?: string
|
|
1917
1971
|
text?: string
|
|
@@ -1959,6 +2013,7 @@ type MessageV2 = {
|
|
|
1959
2013
|
cid?: { ... }
|
|
1960
2014
|
inline?: { ... }
|
|
1961
2015
|
send_as_link?: { ... }
|
|
2016
|
+
save_to_entity?: { ... }
|
|
1962
2017
|
}>
|
|
1963
2018
|
}
|
|
1964
2019
|
references?: string
|
|
@@ -1997,6 +2052,7 @@ type AttachmentsRelation = {
|
|
|
1997
2052
|
cid?: string
|
|
1998
2053
|
inline?: boolean
|
|
1999
2054
|
send_as_link?: boolean
|
|
2055
|
+
save_to_entity?: boolean
|
|
2000
2056
|
}>
|
|
2001
2057
|
}
|
|
2002
2058
|
```
|
|
@@ -2012,6 +2068,7 @@ type File = {
|
|
|
2012
2068
|
cid?: string
|
|
2013
2069
|
inline?: boolean
|
|
2014
2070
|
send_as_link?: boolean
|
|
2071
|
+
save_to_entity?: boolean
|
|
2015
2072
|
}
|
|
2016
2073
|
```
|
|
2017
2074
|
|
|
@@ -2020,6 +2077,7 @@ type File = {
|
|
|
2020
2077
|
```ts
|
|
2021
2078
|
type MessageRequestParams = {
|
|
2022
2079
|
complete_thread?: boolean
|
|
2080
|
+
mark_thread_as_read?: boolean
|
|
2023
2081
|
thread?: {
|
|
2024
2082
|
topic: string
|
|
2025
2083
|
assigned_to?: string[]
|
|
@@ -2072,9 +2130,11 @@ type MessageRequestParams = {
|
|
|
2072
2130
|
cid?: { ... }
|
|
2073
2131
|
inline?: { ... }
|
|
2074
2132
|
send_as_link?: { ... }
|
|
2133
|
+
save_to_entity?: { ... }
|
|
2075
2134
|
}>
|
|
2076
2135
|
}
|
|
2077
2136
|
template_id?: string
|
|
2137
|
+
source?: "manual" | "automation" | "workflow" | "partner" | "bulk" | "system"
|
|
2078
2138
|
}
|
|
2079
2139
|
```
|
|
2080
2140
|
|
|
@@ -2113,6 +2173,34 @@ type SearchIDParams = {
|
|
|
2113
2173
|
}
|
|
2114
2174
|
```
|
|
2115
2175
|
|
|
2176
|
+
### `AssigneeWorkloadParams`
|
|
2177
|
+
|
|
2178
|
+
```ts
|
|
2179
|
+
type AssigneeWorkloadParams = {
|
|
2180
|
+
user_ids: string[]
|
|
2181
|
+
}
|
|
2182
|
+
```
|
|
2183
|
+
|
|
2184
|
+
### `AssigneeWorkload`
|
|
2185
|
+
|
|
2186
|
+
```ts
|
|
2187
|
+
type AssigneeWorkload = {
|
|
2188
|
+
user_id: string
|
|
2189
|
+
open_threads: number
|
|
2190
|
+
}
|
|
2191
|
+
```
|
|
2192
|
+
|
|
2193
|
+
### `AssigneeWorkloadResults`
|
|
2194
|
+
|
|
2195
|
+
```ts
|
|
2196
|
+
type AssigneeWorkloadResults = {
|
|
2197
|
+
workloads: Array<{
|
|
2198
|
+
user_id: string
|
|
2199
|
+
open_threads: number
|
|
2200
|
+
}>
|
|
2201
|
+
}
|
|
2202
|
+
```
|
|
2203
|
+
|
|
2116
2204
|
### `ReadMessagePayload`
|
|
2117
2205
|
|
|
2118
2206
|
```ts
|