Skip to content
Docs
Reference

BackstageClient.webhookEndpoints

BackstageClient.webhookEndpoints in @ticketlayer/backstage.

@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#

ParameterTypeDescription
request{ accountId: string; description?: string | null; eventTypes?: string[]; url: string; }-
request.accountIdstring-
request.description?string | null-
request.eventTypes?string[]Example [ "order.confirmed", "ticket.issued" ]
request.url?stringFormat: 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#

ParameterType
endpointIdstring
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#

ParameterType
endpointIdstring
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#

ParameterType
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#

ParameterType
endpointIdstring
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#

ParameterTypeDescription
endpointIdstring-
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?stringFormat: 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