Skip to content

Class: InboundWebhooksClient

@kortexya/reasoninglayer


@kortexya/reasoninglayer / InboundWebhooksClient

Defined in: src/resources/inbound-webhooks.ts:29

Signed inbound webhook registrations of the caller’s tenant and their signing credentials.

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.

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.

string

The slug path identifier.

VocabularyAddWebhookCredentialRequest

The request body.

string

Stable caller-owned key reused for an identical retry.

RequestOptions

Cancellation and transport options.

Promise<VocabularyWebhookCredentialAnswer>

The native result with camelCase schema keys; its replayed is true when the engine answered a committed request under the same key.

When the engine answers a coded vocabulary refusal (its closed code).

For any other refusal (400, 403, 404, 409, 422, 428, 503); errorBodyCode reads a coded body.

Uses POST /api/v1/webhooks/{slug}/credentials. Completeness and continuation are preserved; this client does not infer admission.

`await client.inboundWebhooks.addCredential(slug, request, idempotencyKey);`

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.

string

The slug path identifier.

string

Why the hook is removed

string

Stable caller-owned key reused for an identical retry.

RequestOptions

Cancellation and transport options.

Promise<VocabularyWebhook>

The native result with camelCase schema keys; its replayed is true when the engine answered a committed request under the same key.

When the engine answers a coded vocabulary refusal (its closed code).

For any other refusal (400, 403, 404, 409, 422, 428, 503); errorBodyCode reads a coded body.

Uses DELETE /api/v1/webhooks/{slug}. Completeness and continuation are preserved; this client does not infer admission.

`await client.inboundWebhooks.deleteWebhook(slug, changeReason, idempotencyKey);`

endCredential(slug, ordinal, request, idempotencyKey, requestOptions?): Promise<VocabularyWebhookCredentialAnswer>

Defined in: src/resources/inbound-webhooks.ts:96

End a signing credential of a webhook.

string

The slug path identifier.

number

The ordinal path identifier.

VocabularyEndWebhookCredentialRequest

The request body.

string

Stable caller-owned key reused for an identical retry.

RequestOptions

Cancellation and transport options.

Promise<VocabularyWebhookCredentialAnswer>

The native result with camelCase schema keys; its replayed is true when the engine answered a committed request under the same key.

When the engine answers a coded vocabulary refusal (its closed code).

For any other refusal (400, 403, 404, 409, 422, 428, 503); errorBodyCode reads a coded body.

Uses POST /api/v1/webhooks/{slug}/credentials/{ordinal}/end. Completeness and continuation are preserved; this client does not infer admission.

`await client.inboundWebhooks.endCredential(slug, ordinal, request, idempotencyKey);`

getWebhook(slug, requestOptions?): Promise<VocabularyWebhook>

Defined in: src/resources/inbound-webhooks.ts:122

Read a webhook registration and its credentials’ fingerprints and intervals.

string

The slug path identifier.

RequestOptions

Cancellation and transport options.

Promise<VocabularyWebhook>

The native result with camelCase schema keys.

When the engine answers a coded vocabulary refusal (its closed code).

For any other refusal (403, 404); errorBodyCode reads a coded body.

Uses GET /api/v1/webhooks/{slug}. Completeness and continuation are preserved; this client does not infer admission.

`await client.inboundWebhooks.getWebhook(slug);`

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.

string

The slug path identifier.

VocabularyPutWebhookRequest

The request body.

string

Stable caller-owned key reused for an identical retry.

RequestOptions

Cancellation and transport options.

Promise<VocabularyWebhook>

The native result with camelCase schema keys; its replayed is true when the engine answered a committed request under the same key.

When the engine answers a coded vocabulary refusal (its closed code).

For any other refusal (400, 403, 409, 422, 428, 503); errorBodyCode reads a coded body.

Uses PUT /api/v1/webhooks/{slug}. Completeness and continuation are preserved; this client does not infer admission.

`await client.inboundWebhooks.putWebhook(slug, request, idempotencyKey);`