BackstageClient.webhookEndpoints
BackstageClient.webhookEndpoints in @ticketlayer/backstage.
@ticketlayer/backstage / BackstageClient / webhookEndpoints
webhookEndpoints: {
create: (request: {
accountId: string;
description?: string | null;
eventTypes?: string[];
url: string;
}, requestOptions?: RequestOptions) => Promise<{
endpoint: {
accountId: string;
createdAt: string;
description: string | null;
eventTypes: string[];
id: string;
source: string;
status: "disabled" | "enabled" | "auto_disabled";
updatedAt: string;
url: string;
version: string;
};
secret: string;
}>;
delete: (endpointId: string, requestOptions?: RequestOptions) => Promise<boolean>;
get: (endpointId: string, requestOptions?: RequestOptions) => Promise<{
accountId: string;
createdAt: string;
description: string | null;
eventTypes: string[];
id: string;
source: string;
status: "disabled" | "enabled" | "auto_disabled";
updatedAt: string;
url: string;
version: string;
}>;
list: (options?: {
accountId?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string;
createdAt: string;
description: string | null;
eventTypes: string[];
id: string;
source: string;
status: "disabled" | "enabled" | "auto_disabled";
updatedAt: string;
url: string;
version: string;
}[]>;
test: (endpointId: string, requestOptions?: RequestOptions) => Promise<any>;
update: (endpointId: string, request: {
description?: string | null;
eventTypes?: string[];
status?: "disabled" | "enabled";
url?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string;
createdAt: string;
description: string | null;
eventTypes: string[];
id: string;
source: string;
status: "disabled" | "enabled" | "auto_disabled";
updatedAt: string;
url: string;
version: string;
}>;
};Defined in: client.ts:10439
Webhook Endpoints methods
create()#
create: (request: {
accountId: string;
description?: string | null;
eventTypes?: string[];
url: string;
}, requestOptions?: RequestOptions) => Promise<{
endpoint: {
accountId: string;
createdAt: string;
description: string | null;
eventTypes: string[];
id: string;
source: string;
status: "disabled" | "enabled" | "auto_disabled";
updatedAt: string;
url: string;
version: string;
};
secret: string;
}>;Create a webhook endpoint
Register a URL to receive signed POSTs for the chosen public event types. The signing secret is returned ONCE in this response and is never retrievable again.
Parameters#
| Parameter | Type | Description |
|---|---|---|
request | { accountId: string; description?: string | null; eventTypes?: string[]; url: string; } | - |
request.accountId | string | - |
request.description? | string | null | - |
request.eventTypes? | string[] | Example [ "order.confirmed", "ticket.issued" ] |
request.url? | string | Format: uri Example https://hooks.example.com/tl |
requestOptions? | RequestOptions | - |
Returns#
Promise<{
endpoint: {
accountId: string;
createdAt: string;
description: string | null;
eventTypes: string[];
id: string;
source: string;
status: "disabled" | "enabled" | "auto_disabled";
updatedAt: string;
url: string;
version: string;
};
secret: string;
}>
Operation Id#
createWebhookEndpoint
delete()#
delete: (endpointId: string, requestOptions?: RequestOptions) => Promise<boolean>;Delete a webhook endpoint
Parameters#
| Parameter | Type |
|---|---|
endpointId | string |
requestOptions? | RequestOptions |
Returns#
Promise<boolean>
Operation Id#
deleteWebhookEndpoint
get()#
get: (endpointId: string, requestOptions?: RequestOptions) => Promise<{
accountId: string;
createdAt: string;
description: string | null;
eventTypes: string[];
id: string;
source: string;
status: "disabled" | "enabled" | "auto_disabled";
updatedAt: string;
url: string;
version: string;
}>;Get a webhook endpoint
Parameters#
| Parameter | Type |
|---|---|
endpointId | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string;
createdAt: string;
description: string | null;
eventTypes: string[];
id: string;
source: string;
status: "disabled" | "enabled" | "auto_disabled";
updatedAt: string;
url: string;
version: string;
}>
Operation Id#
getWebhookEndpoint
list()#
list: (options?: {
accountId?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string;
createdAt: string;
description: string | null;
eventTypes: string[];
id: string;
source: string;
status: "disabled" | "enabled" | "auto_disabled";
updatedAt: string;
url: string;
version: string;
}[]>;List webhook endpoints
Parameters#
| Parameter | Type |
|---|---|
options? | { accountId?: string; } |
options.accountId? | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string;
createdAt: string;
description: string | null;
eventTypes: string[];
id: string;
source: string;
status: "disabled" | "enabled" | "auto_disabled";
updatedAt: string;
url: string;
version: string;
}[]>
Operation Id#
listWebhookEndpoints
test()#
test: (endpointId: string, requestOptions?: RequestOptions) => Promise<any>;Send a test delivery Enqueue a sample signed delivery to the endpoint to verify connectivity.
Parameters#
| Parameter | Type |
|---|---|
endpointId | string |
requestOptions? | RequestOptions |
Returns#
Promise<any>
Operation Id#
testWebhookEndpoint
update()#
update: (endpointId: string, request: {
description?: string | null;
eventTypes?: string[];
status?: "disabled" | "enabled";
url?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string;
createdAt: string;
description: string | null;
eventTypes: string[];
id: string;
source: string;
status: "disabled" | "enabled" | "auto_disabled";
updatedAt: string;
url: string;
version: string;
}>;Update a webhook endpoint
Parameters#
| Parameter | Type | Description |
|---|---|---|
endpointId | string | - |
request | { description?: string | null; eventTypes?: string[]; status?: "disabled" | "enabled"; url?: string; } | - |
request.description? | string | null | - |
request.eventTypes? | string[] | Example [ "order.confirmed", "ticket.issued" ] |
request.status? | "disabled" | "enabled" | |
request.url? | string | Format: uri |
requestOptions? | RequestOptions | - |
Returns#
Promise<{
accountId: string;
createdAt: string;
description: string | null;
eventTypes: string[];
id: string;
source: string;
status: "disabled" | "enabled" | "auto_disabled";
updatedAt: string;
url: string;
version: string;
}>
Operation Id#
updateWebhookEndpoint