Class: InboundWebhooksClient
@kortexya/reasoninglayer / InboundWebhooksClient
Class: InboundWebhooksClient
Section titled “Class: InboundWebhooksClient”Defined in: src/resources/inbound-webhooks.ts:29
Signed inbound webhook registrations of the caller’s tenant and their signing credentials.
Remarks
Section titled “Remarks”Every mutation is a held request: it requires an Idempotency-Key,
replays a committed outcome for 7 days, and answers 409 idempotency_request_in_progress (with Retry-After) while another request
under the same key holds its lease. Reconcile an unconfirmed outcome with
client.vocabulary.getRequestOutcome. No read returns a secret, a key or a
ciphertext: credentials are fingerprints and validity intervals.
Methods
Section titled “Methods”addCredential()
Section titled “addCredential()”addCredential(
slug,request,idempotencyKey,requestOptions?):Promise<VocabularyWebhookCredentialAnswer>
Defined in: src/resources/inbound-webhooks.ts:43
Add a signing credential to a webhook; its secret is sealed in the vault.
Parameters
Section titled “Parameters”string
The slug path identifier.
request
Section titled “request”VocabularyAddWebhookCredentialRequest
The request body.
idempotencyKey
Section titled “idempotencyKey”string
Stable caller-owned key reused for an identical retry.
requestOptions?
Section titled “requestOptions?”Cancellation and transport options.
Returns
Section titled “Returns”Promise<VocabularyWebhookCredentialAnswer>
The native result with camelCase schema keys; its replayed is true when the engine answered a committed request under the same key.
Throws
Section titled “Throws”When the engine answers a coded vocabulary refusal (its closed code).
Throws
Section titled “Throws”For any other refusal (400, 403, 404, 409, 422, 428, 503); errorBodyCode reads a coded body.
Remarks
Section titled “Remarks”Uses POST /api/v1/webhooks/{slug}/credentials. Completeness and continuation are preserved; this client does not infer admission.
Example
Section titled “Example”`await client.inboundWebhooks.addCredential(slug, request, idempotencyKey);`deleteWebhook()
Section titled “deleteWebhook()”deleteWebhook(
slug,changeReason,idempotencyKey,requestOptions?):Promise<VocabularyWebhook>
Defined in: src/resources/inbound-webhooks.ts:69
Remove a webhook registration, its credentials and their vault records.
Parameters
Section titled “Parameters”string
The slug path identifier.
changeReason
Section titled “changeReason”string
Why the hook is removed
idempotencyKey
Section titled “idempotencyKey”string
Stable caller-owned key reused for an identical retry.
requestOptions?
Section titled “requestOptions?”Cancellation and transport options.
Returns
Section titled “Returns”Promise<VocabularyWebhook>
The native result with camelCase schema keys; its replayed is true when the engine answered a committed request under the same key.
Throws
Section titled “Throws”When the engine answers a coded vocabulary refusal (its closed code).
Throws
Section titled “Throws”For any other refusal (400, 403, 404, 409, 422, 428, 503); errorBodyCode reads a coded body.
Remarks
Section titled “Remarks”Uses DELETE /api/v1/webhooks/{slug}. Completeness and continuation are preserved; this client does not infer admission.
Example
Section titled “Example”`await client.inboundWebhooks.deleteWebhook(slug, changeReason, idempotencyKey);`endCredential()
Section titled “endCredential()”endCredential(
slug,ordinal,request,idempotencyKey,requestOptions?):Promise<VocabularyWebhookCredentialAnswer>
Defined in: src/resources/inbound-webhooks.ts:96
End a signing credential of a webhook.
Parameters
Section titled “Parameters”string
The slug path identifier.
ordinal
Section titled “ordinal”number
The ordinal path identifier.
request
Section titled “request”VocabularyEndWebhookCredentialRequest
The request body.
idempotencyKey
Section titled “idempotencyKey”string
Stable caller-owned key reused for an identical retry.
requestOptions?
Section titled “requestOptions?”Cancellation and transport options.
Returns
Section titled “Returns”Promise<VocabularyWebhookCredentialAnswer>
The native result with camelCase schema keys; its replayed is true when the engine answered a committed request under the same key.
Throws
Section titled “Throws”When the engine answers a coded vocabulary refusal (its closed code).
Throws
Section titled “Throws”For any other refusal (400, 403, 404, 409, 422, 428, 503); errorBodyCode reads a coded body.
Remarks
Section titled “Remarks”Uses POST /api/v1/webhooks/{slug}/credentials/{ordinal}/end. Completeness and continuation are preserved; this client does not infer admission.
Example
Section titled “Example”`await client.inboundWebhooks.endCredential(slug, ordinal, request, idempotencyKey);`getWebhook()
Section titled “getWebhook()”getWebhook(
slug,requestOptions?):Promise<VocabularyWebhook>
Defined in: src/resources/inbound-webhooks.ts:122
Read a webhook registration and its credentials’ fingerprints and intervals.
Parameters
Section titled “Parameters”string
The slug path identifier.
requestOptions?
Section titled “requestOptions?”Cancellation and transport options.
Returns
Section titled “Returns”Promise<VocabularyWebhook>
The native result with camelCase schema keys.
Throws
Section titled “Throws”When the engine answers a coded vocabulary refusal (its closed code).
Throws
Section titled “Throws”For any other refusal (403, 404); errorBodyCode reads a coded body.
Remarks
Section titled “Remarks”Uses GET /api/v1/webhooks/{slug}. Completeness and continuation are preserved; this client does not infer admission.
Example
Section titled “Example”`await client.inboundWebhooks.getWebhook(slug);`putWebhook()
Section titled “putWebhook()”putWebhook(
slug,request,idempotencyKey,requestOptions?):Promise<VocabularyWebhook>
Defined in: src/resources/inbound-webhooks.ts:139
Register or replace a signed inbound webhook of the tenant.
Parameters
Section titled “Parameters”string
The slug path identifier.
request
Section titled “request”The request body.
idempotencyKey
Section titled “idempotencyKey”string
Stable caller-owned key reused for an identical retry.
requestOptions?
Section titled “requestOptions?”Cancellation and transport options.
Returns
Section titled “Returns”Promise<VocabularyWebhook>
The native result with camelCase schema keys; its replayed is true when the engine answered a committed request under the same key.
Throws
Section titled “Throws”When the engine answers a coded vocabulary refusal (its closed code).
Throws
Section titled “Throws”For any other refusal (400, 403, 409, 422, 428, 503); errorBodyCode reads a coded body.
Remarks
Section titled “Remarks”Uses PUT /api/v1/webhooks/{slug}. Completeness and continuation are preserved; this client does not infer admission.
Example
Section titled “Example”`await client.inboundWebhooks.putWebhook(slug, request, idempotencyKey);`