diff --git a/README.md b/README.md index 5955238..0404da2 100644 --- a/README.md +++ b/README.md @@ -933,6 +933,7 @@ const webhook = await method.webhooks.create({ type: 'payment.update', url: 'https://api.example.app/webhook', auth_token: 'md7UqcTSmvXCBzPORDwOkE', + hmac_secret: 'bd7UscLSmvEXazTOQDwOKW', }); ``` diff --git a/package-lock.json b/package-lock.json index 0abc8e5..4537d32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "method-node", - "version": "1.2.4", + "version": "1.2.5", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 9235219..94a861b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "method-node", - "version": "1.2.4", + "version": "1.2.5", "description": "Node.js library for the Method API", "main": "dist/index.ts", "module": "dist/index.mjs", diff --git a/src/resources/Entity/Connect.ts b/src/resources/Entity/Connect.ts index f2225e4..8d646e5 100644 --- a/src/resources/Entity/Connect.ts +++ b/src/resources/Entity/Connect.ts @@ -14,10 +14,12 @@ export const AccountExpandableFields = { latest_verification_session: 'latest_verification_session', } as const; -type AccountExpandableField = typeof AccountExpandableFields[keyof typeof AccountExpandableFields]; +type AccountFieldKey = typeof AccountExpandableFields[keyof typeof AccountExpandableFields]; + +export type ExpandField = 'accounts' | `accounts.${AccountFieldKey}`; export interface IExpandableOpts { - expand?: AccountExpandableField[]; + expand?: ExpandField[]; } export interface IConnectListOpts extends IResourceListOpts, IExpandableOpts {} diff --git a/src/resources/Webhook/index.ts b/src/resources/Webhook/index.ts index cdc5a43..f854de8 100644 --- a/src/resources/Webhook/index.ts +++ b/src/resources/Webhook/index.ts @@ -82,6 +82,7 @@ export interface IWebhookCreateOpts { type: TWebhookTypes; url: string; auth_token?: string; + hmac_secret?: string; metadata?: {}; expand_event?: boolean; };