Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "resend",
"version": "6.3.0-canary.2",
"version": "6.3.0-canary.3",
"description": "Node.js library for the Resend API",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface CreateWebhookRequestOptions extends PostOptions {}
export interface CreateWebhookResponseSuccess {
object: 'webhook';
id: string;
signing_secret: string;
}

export type CreateWebhookResponse =
Expand Down
1 change: 1 addition & 0 deletions src/webhooks/interfaces/get-webhook.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface GetWebhookResponseSuccess {
status: string;
endpoint: string;
events: string[] | null;
signing_secret: string;
}

export type GetWebhookResponse =
Expand Down
4 changes: 4 additions & 0 deletions src/webhooks/webhooks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ describe('Webhooks', () => {
const response: CreateWebhookResponseSuccess = {
object: 'webhook',
id: '430eed87-632a-4ea6-90db-0aace67ec228',
signing_secret: 'whsec_test_secret_key_123',
};

fetchMock.mockOnce(JSON.stringify(response), {
Expand All @@ -68,6 +69,7 @@ describe('Webhooks', () => {
"data": {
"id": "430eed87-632a-4ea6-90db-0aace67ec228",
"object": "webhook",
"signing_secret": "whsec_test_secret_key_123",
},
"error": null,
}
Expand Down Expand Up @@ -117,6 +119,7 @@ describe('Webhooks', () => {
status: 'enabled',
endpoint: 'https://example.com/webhook',
events: ['email.sent', 'email.delivered'],
signing_secret: 'whsec_test_secret_key_123',
};

fetchMock.mockOnce(JSON.stringify(response), {
Expand All @@ -140,6 +143,7 @@ describe('Webhooks', () => {
],
"id": "430eed87-632a-4ea6-90db-0aace67ec228",
"object": "webhook",
"signing_secret": "whsec_test_secret_key_123",
"status": "enabled",
},
"error": null,
Expand Down
Loading