Skip to content

Commit 3a61fcc

Browse files
authored
feat(tem): add filters on list webhooks events endpoint (#1313)
1 parent 803b182 commit 3a61fcc

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

packages/clients/src/api/tem/v1alpha1/api.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,18 @@ export class API extends ParentAPI {
404404
method: 'GET',
405405
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/webhooks/${validatePathParam('webhookId', request.webhookId)}/events`,
406406
urlParams: urlParams(
407+
['domain_id', request.domainId],
408+
['email_id', request.emailId],
409+
['event_types', request.eventTypes],
407410
['order_by', request.orderBy],
411+
['organization_id', request.organizationId],
408412
['page', request.page],
409413
[
410414
'page_size',
411415
request.pageSize ?? this.client.settings.defaultPageSize,
412416
],
417+
['project_id', request.projectId],
418+
['statuses', request.statuses],
413419
),
414420
},
415421
unmarshalListWebhookEventsResponse,

packages/clients/src/api/tem/v1alpha1/marshalling.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ const unmarshalWebhookEvent = (data: unknown): WebhookEvent => {
306306
return {
307307
createdAt: unmarshalDate(data.created_at),
308308
data: data.data,
309+
domainId: data.domain_id,
309310
emailId: data.email_id,
310311
id: data.id,
311312
organizationId: data.organization_id,

packages/clients/src/api/tem/v1alpha1/types.gen.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ export interface WebhookEvent {
269269
organizationId: string
270270
/** ID of the Webhook Event Project. */
271271
projectId: string
272+
/** ID of the webhook event domain. */
273+
domainId: string
272274
/** Type of the Webhook Event. */
273275
type: WebhookEventType
274276
/** Status of the Webhook Event. */
@@ -531,6 +533,18 @@ export type ListWebhookEventsRequest = {
531533
page?: number
532534
/** Requested page size. Value must be between 1 and 100. */
533535
pageSize?: number
536+
/** ID of the email linked to the events. */
537+
emailId?: string
538+
/** List of event types linked to the events. */
539+
eventTypes?: WebhookEventType[]
540+
/** List of event statuses. */
541+
statuses?: WebhookEventStatus[]
542+
/** ID of the webhook Project. */
543+
projectId?: string
544+
/** ID of the webhook Organization. */
545+
organizationId?: string
546+
/** ID of the domain to watch for triggering events. */
547+
domainId?: string
534548
}
535549

536550
export interface ListWebhookEventsResponse {

0 commit comments

Comments
 (0)