docs/classes/management.SDK.HooksClient.html
get secrets(): SecretsClient
new HooksClient(options: BaseClientOptions): HooksClient
list(
request?: ListHooksRequestParameters,
requestOptions?: HooksClient.RequestOptions,
): Promise<Page<Hook, ListHooksOffsetPaginatedResponseContent>>
Retrieve all hooks. Accepts a list of fields to include or exclude in the result.
OptionalrequestOptions: HooksClient.RequestOptionsRequest-specific configuration.
Management.TooManyRequestsError
await client.hooks.list({ page: 1, per_page: 1, include_totals: true, enabled: true, fields: "fields", triggerId: "credentials-exchange" })Copy
create(
request: CreateHookRequestContent,
requestOptions?: HooksClient.RequestOptions,
): HttpResponsePromise<CreateHookResponseContent>
Create a new hook.
OptionalrequestOptions: HooksClient.RequestOptionsRequest-specific configuration.
Management.TooManyRequestsError
await client.hooks.create({ name: "name", script: "script", triggerId: "credentials-exchange" })Copy
get(
id: string,
request?: GetHookRequestParameters,
requestOptions?: HooksClient.RequestOptions,
): HttpResponsePromise<GetHookResponseContent>
Retrieve a hook by its ID. Accepts a list of fields to include in the result.
ID of the hook to retrieve.
OptionalrequestOptions: HooksClient.RequestOptionsRequest-specific configuration.
Management.TooManyRequestsError
await client.hooks.get("id", { fields: "fields" })Copy
delete(
id: string,
requestOptions?: HooksClient.RequestOptions,
): HttpResponsePromise<void>
Delete a hook.
ID of the hook to delete.
OptionalrequestOptions: HooksClient.RequestOptionsRequest-specific configuration.
Management.TooManyRequestsError
await client.hooks.delete("id")Copy
update(
id: string,
request?: UpdateHookRequestContent,
requestOptions?: HooksClient.RequestOptions,
): HttpResponsePromise<UpdateHookResponseContent>
Update an existing hook.
ID of the hook to update.
OptionalrequestOptions: HooksClient.RequestOptionsRequest-specific configuration.
Management.TooManyRequestsError
await client.hooks.update("id")Copy
Protected Readonly_options_options: NormalizedClientOptionsWithAuth<BaseClientOptions>
Protected_secrets_secrets: SecretsClient | undefined
Member Visibility
ThemeOSLightDark
Accessors secrets Constructors constructor Methods listcreategetdeleteupdate Properties _options_secrets