dodopayments 2.32.0 → 2.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/bin/migration-config.json +17 -17
- package/client.d.mts +15 -15
- package/client.d.mts.map +1 -1
- package/client.d.ts +15 -15
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/addons.d.mts +4 -4
- package/resources/addons.d.mts.map +1 -1
- package/resources/addons.d.ts +4 -4
- package/resources/addons.d.ts.map +1 -1
- package/resources/addons.js +6 -6
- package/resources/addons.js.map +1 -1
- package/resources/addons.mjs +6 -6
- package/resources/addons.mjs.map +1 -1
- package/resources/brands.d.mts +1 -1
- package/resources/brands.d.mts.map +1 -1
- package/resources/brands.d.ts +1 -1
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.js +3 -3
- package/resources/brands.js.map +1 -1
- package/resources/brands.mjs +3 -3
- package/resources/brands.mjs.map +1 -1
- package/resources/credit-entitlements/balances.d.mts +69 -69
- package/resources/credit-entitlements/balances.d.mts.map +1 -1
- package/resources/credit-entitlements/balances.d.ts +69 -69
- package/resources/credit-entitlements/balances.d.ts.map +1 -1
- package/resources/credit-entitlements/balances.js +41 -41
- package/resources/credit-entitlements/balances.js.map +1 -1
- package/resources/credit-entitlements/balances.mjs +41 -41
- package/resources/credit-entitlements/balances.mjs.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.d.mts +38 -38
- package/resources/credit-entitlements/credit-entitlements.d.mts.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.d.ts +38 -38
- package/resources/credit-entitlements/credit-entitlements.d.ts.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.js +40 -40
- package/resources/credit-entitlements/credit-entitlements.js.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.mjs +40 -40
- package/resources/credit-entitlements/credit-entitlements.mjs.map +1 -1
- package/resources/credit-entitlements/index.d.mts +2 -2
- package/resources/credit-entitlements/index.d.mts.map +1 -1
- package/resources/credit-entitlements/index.d.ts +2 -2
- package/resources/credit-entitlements/index.d.ts.map +1 -1
- package/resources/customers/customers.d.mts +23 -23
- package/resources/customers/customers.d.mts.map +1 -1
- package/resources/customers/customers.d.ts +23 -23
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +16 -16
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +16 -16
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.mts +1 -1
- package/resources/customers/index.d.mts.map +1 -1
- package/resources/customers/index.d.ts +1 -1
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/wallets/index.d.mts +1 -1
- package/resources/customers/wallets/index.d.mts.map +1 -1
- package/resources/customers/wallets/index.d.ts +1 -1
- package/resources/customers/wallets/index.d.ts.map +1 -1
- package/resources/customers/wallets/ledger-entries.d.mts +8 -8
- package/resources/customers/wallets/ledger-entries.d.mts.map +1 -1
- package/resources/customers/wallets/ledger-entries.d.ts +8 -8
- package/resources/customers/wallets/ledger-entries.d.ts.map +1 -1
- package/resources/customers/wallets/ledger-entries.js +3 -3
- package/resources/customers/wallets/ledger-entries.js.map +1 -1
- package/resources/customers/wallets/ledger-entries.mjs +3 -3
- package/resources/customers/wallets/ledger-entries.mjs.map +1 -1
- package/resources/customers/wallets/wallets.d.mts +1 -1
- package/resources/customers/wallets/wallets.d.mts.map +1 -1
- package/resources/customers/wallets/wallets.d.ts +1 -1
- package/resources/customers/wallets/wallets.d.ts.map +1 -1
- package/resources/discounts.d.mts +27 -27
- package/resources/discounts.d.mts.map +1 -1
- package/resources/discounts.d.ts +27 -27
- package/resources/discounts.d.ts.map +1 -1
- package/resources/discounts.js +15 -15
- package/resources/discounts.js.map +1 -1
- package/resources/discounts.mjs +15 -15
- package/resources/discounts.mjs.map +1 -1
- package/resources/disputes.d.mts +1 -1
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +1 -1
- package/resources/disputes.d.ts.map +1 -1
- package/resources/disputes.js +3 -3
- package/resources/disputes.js.map +1 -1
- package/resources/disputes.mjs +3 -3
- package/resources/disputes.mjs.map +1 -1
- package/resources/entitlements/entitlements.d.mts +15 -15
- package/resources/entitlements/entitlements.d.mts.map +1 -1
- package/resources/entitlements/entitlements.d.ts +15 -15
- package/resources/entitlements/entitlements.d.ts.map +1 -1
- package/resources/entitlements/entitlements.js +15 -15
- package/resources/entitlements/entitlements.js.map +1 -1
- package/resources/entitlements/entitlements.mjs +15 -15
- package/resources/entitlements/entitlements.mjs.map +1 -1
- package/resources/entitlements/files.d.mts +4 -4
- package/resources/entitlements/files.d.mts.map +1 -1
- package/resources/entitlements/files.d.ts +4 -4
- package/resources/entitlements/files.d.ts.map +1 -1
- package/resources/entitlements/files.js +6 -6
- package/resources/entitlements/files.js.map +1 -1
- package/resources/entitlements/files.mjs +6 -6
- package/resources/entitlements/files.mjs.map +1 -1
- package/resources/entitlements/index.d.mts +1 -1
- package/resources/entitlements/index.d.mts.map +1 -1
- package/resources/entitlements/index.d.ts +1 -1
- package/resources/entitlements/index.d.ts.map +1 -1
- package/resources/index.d.mts +15 -15
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +15 -15
- package/resources/index.d.ts.map +1 -1
- package/resources/invoices/payments.d.mts +1 -1
- package/resources/invoices/payments.d.ts +1 -1
- package/resources/invoices/payments.js +4 -4
- package/resources/invoices/payments.mjs +4 -4
- package/resources/license-key-instances.d.mts +14 -14
- package/resources/license-key-instances.d.mts.map +1 -1
- package/resources/license-key-instances.d.ts +14 -14
- package/resources/license-key-instances.d.ts.map +1 -1
- package/resources/license-key-instances.js +12 -12
- package/resources/license-key-instances.js.map +1 -1
- package/resources/license-key-instances.mjs +12 -12
- package/resources/license-key-instances.mjs.map +1 -1
- package/resources/license-keys.d.mts +38 -38
- package/resources/license-keys.d.mts.map +1 -1
- package/resources/license-keys.d.ts +38 -38
- package/resources/license-keys.d.ts.map +1 -1
- package/resources/license-keys.js +16 -16
- package/resources/license-keys.js.map +1 -1
- package/resources/license-keys.mjs +16 -16
- package/resources/license-keys.mjs.map +1 -1
- package/resources/meters.d.mts +8 -8
- package/resources/meters.d.mts.map +1 -1
- package/resources/meters.d.ts +8 -8
- package/resources/meters.d.ts.map +1 -1
- package/resources/meters.js +3 -3
- package/resources/meters.js.map +1 -1
- package/resources/meters.mjs +3 -3
- package/resources/meters.mjs.map +1 -1
- package/resources/payments.d.mts +32 -32
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +32 -32
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +6 -6
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +6 -6
- package/resources/payments.mjs.map +1 -1
- package/resources/product-collections/groups/groups.d.mts +9 -9
- package/resources/product-collections/groups/groups.d.mts.map +1 -1
- package/resources/product-collections/groups/groups.d.ts +9 -9
- package/resources/product-collections/groups/groups.d.ts.map +1 -1
- package/resources/product-collections/groups/groups.js +7 -7
- package/resources/product-collections/groups/groups.js.map +1 -1
- package/resources/product-collections/groups/groups.mjs +7 -7
- package/resources/product-collections/groups/groups.mjs.map +1 -1
- package/resources/product-collections/groups/index.d.mts +2 -2
- package/resources/product-collections/groups/index.d.ts +2 -2
- package/resources/product-collections/groups/items.d.mts +12 -12
- package/resources/product-collections/groups/items.d.mts.map +1 -1
- package/resources/product-collections/groups/items.d.ts +12 -12
- package/resources/product-collections/groups/items.d.ts.map +1 -1
- package/resources/product-collections/groups/items.js +7 -7
- package/resources/product-collections/groups/items.js.map +1 -1
- package/resources/product-collections/groups/items.mjs +7 -7
- package/resources/product-collections/groups/items.mjs.map +1 -1
- package/resources/product-collections/index.d.mts +2 -2
- package/resources/product-collections/index.d.mts.map +1 -1
- package/resources/product-collections/index.d.ts +2 -2
- package/resources/product-collections/index.d.ts.map +1 -1
- package/resources/product-collections/product-collections.d.mts +15 -15
- package/resources/product-collections/product-collections.d.mts.map +1 -1
- package/resources/product-collections/product-collections.d.ts +15 -15
- package/resources/product-collections/product-collections.d.ts.map +1 -1
- package/resources/product-collections/product-collections.js +11 -11
- package/resources/product-collections/product-collections.js.map +1 -1
- package/resources/product-collections/product-collections.mjs +11 -11
- package/resources/product-collections/product-collections.mjs.map +1 -1
- package/resources/products/index.d.mts +2 -2
- package/resources/products/index.d.mts.map +1 -1
- package/resources/products/index.d.ts +2 -2
- package/resources/products/index.d.ts.map +1 -1
- package/resources/products/products.d.mts +21 -21
- package/resources/products/products.d.mts.map +1 -1
- package/resources/products/products.d.ts +21 -21
- package/resources/products/products.d.ts.map +1 -1
- package/resources/products/products.js +6 -6
- package/resources/products/products.js.map +1 -1
- package/resources/products/products.mjs +6 -6
- package/resources/products/products.mjs.map +1 -1
- package/resources/products/short-links.d.mts +11 -11
- package/resources/products/short-links.d.mts.map +1 -1
- package/resources/products/short-links.d.ts +11 -11
- package/resources/products/short-links.d.ts.map +1 -1
- package/resources/products/short-links.js +6 -6
- package/resources/products/short-links.js.map +1 -1
- package/resources/products/short-links.mjs +6 -6
- package/resources/products/short-links.mjs.map +1 -1
- package/resources/refunds.d.mts +24 -24
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +24 -24
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +6 -6
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +6 -6
- package/resources/refunds.mjs.map +1 -1
- package/resources/subscriptions.d.mts +86 -86
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +86 -86
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +23 -23
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +23 -23
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/usage-events.d.mts +61 -61
- package/resources/usage-events.d.mts.map +1 -1
- package/resources/usage-events.d.ts +61 -61
- package/resources/usage-events.d.ts.map +1 -1
- package/resources/usage-events.js +56 -56
- package/resources/usage-events.js.map +1 -1
- package/resources/usage-events.mjs +56 -56
- package/resources/usage-events.mjs.map +1 -1
- package/resources/webhooks/index.d.mts +1 -1
- package/resources/webhooks/index.d.mts.map +1 -1
- package/resources/webhooks/index.d.ts +1 -1
- package/resources/webhooks/index.d.ts.map +1 -1
- package/resources/webhooks/webhooks.d.mts +12 -12
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +12 -12
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js +15 -15
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs +15 -15
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/src/client.ts +18 -18
- package/src/resources/addons.ts +13 -13
- package/src/resources/brands.ts +4 -4
- package/src/resources/credit-entitlements/balances.ts +91 -91
- package/src/resources/credit-entitlements/credit-entitlements.ts +55 -55
- package/src/resources/credit-entitlements/index.ts +3 -3
- package/src/resources/customers/customers.ts +49 -49
- package/src/resources/customers/index.ts +1 -1
- package/src/resources/customers/wallets/index.ts +1 -1
- package/src/resources/customers/wallets/ledger-entries.ts +16 -16
- package/src/resources/customers/wallets/wallets.ts +1 -1
- package/src/resources/discounts.ts +43 -43
- package/src/resources/disputes.ts +4 -4
- package/src/resources/entitlements/entitlements.ts +36 -36
- package/src/resources/entitlements/files.ts +7 -7
- package/src/resources/entitlements/index.ts +1 -1
- package/src/resources/index.ts +18 -18
- package/src/resources/invoices/payments.ts +4 -4
- package/src/resources/license-key-instances.ts +25 -25
- package/src/resources/license-keys.ts +48 -48
- package/src/resources/meters.ts +15 -15
- package/src/resources/payments.ts +59 -59
- package/src/resources/product-collections/groups/groups.ts +16 -16
- package/src/resources/product-collections/groups/index.ts +2 -2
- package/src/resources/product-collections/groups/items.ts +19 -19
- package/src/resources/product-collections/index.ts +2 -2
- package/src/resources/product-collections/product-collections.ts +32 -32
- package/src/resources/products/index.ts +2 -2
- package/src/resources/products/products.ts +33 -33
- package/src/resources/products/short-links.ts +20 -20
- package/src/resources/refunds.ts +36 -36
- package/src/resources/subscriptions.ts +130 -130
- package/src/resources/usage-events.ts +64 -64
- package/src/resources/webhooks/index.ts +1 -1
- package/src/resources/webhooks/webhooks.ts +24 -24
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -12,37 +12,47 @@ import { path } from '../internal/utils/path';
|
|
|
12
12
|
|
|
13
13
|
export class UsageEvents extends APIResource {
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
* endpoint is useful for:
|
|
17
|
-
*
|
|
18
|
-
* - Debugging specific event ingestion issues
|
|
19
|
-
* - Retrieving event details for customer support
|
|
20
|
-
* - Validating that events were processed correctly
|
|
21
|
-
* - Getting the complete metadata for an event
|
|
22
|
-
*
|
|
23
|
-
* ## Event ID Format:
|
|
24
|
-
*
|
|
25
|
-
* The event ID should be the same value that was provided during event ingestion
|
|
26
|
-
* via the `/events/ingest` endpoint. Event IDs are case-sensitive and must match
|
|
27
|
-
* exactly.
|
|
15
|
+
* This endpoint allows you to ingest custom events that can be used for:
|
|
28
16
|
*
|
|
29
|
-
*
|
|
17
|
+
* - Usage-based billing and metering
|
|
18
|
+
* - Analytics and reporting
|
|
19
|
+
* - Customer behavior tracking
|
|
30
20
|
*
|
|
31
|
-
*
|
|
21
|
+
* ## Important Notes:
|
|
32
22
|
*
|
|
33
|
-
* -
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
23
|
+
* - **Duplicate Prevention**:
|
|
24
|
+
* - Duplicate `event_id` values within the same request are rejected (entire
|
|
25
|
+
* request fails)
|
|
26
|
+
* - Subsequent requests with existing `event_id` values are ignored (idempotent
|
|
27
|
+
* behavior)
|
|
28
|
+
* - **Rate Limiting**: Maximum 1000 events per request
|
|
29
|
+
* - **Time Validation**: Events with timestamps older than 1 hour or more than 5
|
|
30
|
+
* minutes in the future will be rejected
|
|
31
|
+
* - **Metadata Limits**: Maximum 50 key-value pairs per event, keys max 100 chars,
|
|
32
|
+
* values max 500 chars
|
|
37
33
|
*
|
|
38
34
|
* ## Example Usage:
|
|
39
35
|
*
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
36
|
+
* ```json
|
|
37
|
+
* {
|
|
38
|
+
* "events": [
|
|
39
|
+
* {
|
|
40
|
+
* "event_id": "api_call_12345",
|
|
41
|
+
* "customer_id": "cus_abc123",
|
|
42
|
+
* "event_name": "api_request",
|
|
43
|
+
* "timestamp": "2024-01-15T10:30:00Z",
|
|
44
|
+
* "metadata": {
|
|
45
|
+
* "endpoint": "/api/v1/users",
|
|
46
|
+
* "method": "GET",
|
|
47
|
+
* "tokens_used": "150"
|
|
48
|
+
* }
|
|
49
|
+
* }
|
|
50
|
+
* ]
|
|
51
|
+
* }
|
|
42
52
|
* ```
|
|
43
53
|
*/
|
|
44
|
-
|
|
45
|
-
return this._client.
|
|
54
|
+
ingest(body: UsageEventIngestParams, options?: RequestOptions): APIPromise<UsageEventIngestResponse> {
|
|
55
|
+
return this._client.post('/events/ingest', { body, ...options });
|
|
46
56
|
}
|
|
47
57
|
|
|
48
58
|
/**
|
|
@@ -88,47 +98,37 @@ export class UsageEvents extends APIResource {
|
|
|
88
98
|
}
|
|
89
99
|
|
|
90
100
|
/**
|
|
91
|
-
*
|
|
101
|
+
* Fetch detailed information about a single event using its unique event ID. This
|
|
102
|
+
* endpoint is useful for:
|
|
92
103
|
*
|
|
93
|
-
* -
|
|
94
|
-
* -
|
|
95
|
-
* -
|
|
104
|
+
* - Debugging specific event ingestion issues
|
|
105
|
+
* - Retrieving event details for customer support
|
|
106
|
+
* - Validating that events were processed correctly
|
|
107
|
+
* - Getting the complete metadata for an event
|
|
96
108
|
*
|
|
97
|
-
* ##
|
|
109
|
+
* ## Event ID Format:
|
|
98
110
|
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
* -
|
|
108
|
-
*
|
|
111
|
+
* The event ID should be the same value that was provided during event ingestion
|
|
112
|
+
* via the `/events/ingest` endpoint. Event IDs are case-sensitive and must match
|
|
113
|
+
* exactly.
|
|
114
|
+
*
|
|
115
|
+
* ## Response Details:
|
|
116
|
+
*
|
|
117
|
+
* The response includes all event data including:
|
|
118
|
+
*
|
|
119
|
+
* - Complete metadata key-value pairs
|
|
120
|
+
* - Original timestamp (preserved from ingestion)
|
|
121
|
+
* - Customer and business association
|
|
122
|
+
* - Event name and processing information
|
|
109
123
|
*
|
|
110
124
|
* ## Example Usage:
|
|
111
125
|
*
|
|
112
|
-
* ```
|
|
113
|
-
*
|
|
114
|
-
* "events": [
|
|
115
|
-
* {
|
|
116
|
-
* "event_id": "api_call_12345",
|
|
117
|
-
* "customer_id": "cus_abc123",
|
|
118
|
-
* "event_name": "api_request",
|
|
119
|
-
* "timestamp": "2024-01-15T10:30:00Z",
|
|
120
|
-
* "metadata": {
|
|
121
|
-
* "endpoint": "/api/v1/users",
|
|
122
|
-
* "method": "GET",
|
|
123
|
-
* "tokens_used": "150"
|
|
124
|
-
* }
|
|
125
|
-
* }
|
|
126
|
-
* ]
|
|
127
|
-
* }
|
|
126
|
+
* ```text
|
|
127
|
+
* GET /events/api_call_12345
|
|
128
128
|
* ```
|
|
129
129
|
*/
|
|
130
|
-
|
|
131
|
-
return this._client.
|
|
130
|
+
retrieve(eventID: string, options?: RequestOptions): APIPromise<Event> {
|
|
131
|
+
return this._client.get(path`/events/${eventID}`, options);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
@@ -185,6 +185,13 @@ export interface UsageEventIngestResponse {
|
|
|
185
185
|
ingested_count: number;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
export interface UsageEventIngestParams {
|
|
189
|
+
/**
|
|
190
|
+
* List of events to be pushed
|
|
191
|
+
*/
|
|
192
|
+
events: Array<EventInput>;
|
|
193
|
+
}
|
|
194
|
+
|
|
188
195
|
export interface UsageEventListParams extends DefaultPageNumberPaginationParams {
|
|
189
196
|
/**
|
|
190
197
|
* Filter events by customer ID
|
|
@@ -214,20 +221,13 @@ export interface UsageEventListParams extends DefaultPageNumberPaginationParams
|
|
|
214
221
|
start?: string;
|
|
215
222
|
}
|
|
216
223
|
|
|
217
|
-
export interface UsageEventIngestParams {
|
|
218
|
-
/**
|
|
219
|
-
* List of events to be pushed
|
|
220
|
-
*/
|
|
221
|
-
events: Array<EventInput>;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
224
|
export declare namespace UsageEvents {
|
|
225
225
|
export {
|
|
226
226
|
type Event as Event,
|
|
227
227
|
type EventInput as EventInput,
|
|
228
228
|
type UsageEventIngestResponse as UsageEventIngestResponse,
|
|
229
229
|
type EventsDefaultPageNumberPagination as EventsDefaultPageNumberPagination,
|
|
230
|
-
type UsageEventListParams as UsageEventListParams,
|
|
231
230
|
type UsageEventIngestParams as UsageEventIngestParams,
|
|
231
|
+
type UsageEventListParams as UsageEventListParams,
|
|
232
232
|
};
|
|
233
233
|
}
|
|
@@ -46,8 +46,8 @@ export {
|
|
|
46
46
|
type SubscriptionUpdatedWebhookEvent,
|
|
47
47
|
type UnsafeUnwrapWebhookEvent,
|
|
48
48
|
type UnwrapWebhookEvent,
|
|
49
|
+
type WebhookListParams,
|
|
49
50
|
type WebhookCreateParams,
|
|
50
51
|
type WebhookUpdateParams,
|
|
51
|
-
type WebhookListParams,
|
|
52
52
|
type WebhookDetailsCursorPagePagination,
|
|
53
53
|
} from './webhooks';
|
|
@@ -21,6 +21,16 @@ import { path } from '../../internal/utils/path';
|
|
|
21
21
|
export class Webhooks extends APIResource {
|
|
22
22
|
headers: HeadersAPI.Headers = new HeadersAPI.Headers(this._client);
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* List all webhooks
|
|
26
|
+
*/
|
|
27
|
+
list(
|
|
28
|
+
query: WebhookListParams | null | undefined = {},
|
|
29
|
+
options?: RequestOptions,
|
|
30
|
+
): PagePromise<WebhookDetailsCursorPagePagination, WebhookDetails> {
|
|
31
|
+
return this._client.getAPIList('/webhooks', CursorPagePagination<WebhookDetails>, { query, ...options });
|
|
32
|
+
}
|
|
33
|
+
|
|
24
34
|
/**
|
|
25
35
|
* Create a new webhook
|
|
26
36
|
*/
|
|
@@ -35,23 +45,6 @@ export class Webhooks extends APIResource {
|
|
|
35
45
|
return this._client.get(path`/webhooks/${webhookID}`, options);
|
|
36
46
|
}
|
|
37
47
|
|
|
38
|
-
/**
|
|
39
|
-
* Patch a webhook by id
|
|
40
|
-
*/
|
|
41
|
-
update(webhookID: string, body: WebhookUpdateParams, options?: RequestOptions): APIPromise<WebhookDetails> {
|
|
42
|
-
return this._client.patch(path`/webhooks/${webhookID}`, { body, ...options });
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* List all webhooks
|
|
47
|
-
*/
|
|
48
|
-
list(
|
|
49
|
-
query: WebhookListParams | null | undefined = {},
|
|
50
|
-
options?: RequestOptions,
|
|
51
|
-
): PagePromise<WebhookDetailsCursorPagePagination, WebhookDetails> {
|
|
52
|
-
return this._client.getAPIList('/webhooks', CursorPagePagination<WebhookDetails>, { query, ...options });
|
|
53
|
-
}
|
|
54
|
-
|
|
55
48
|
/**
|
|
56
49
|
* Delete a webhook by id
|
|
57
50
|
*/
|
|
@@ -62,6 +55,13 @@ export class Webhooks extends APIResource {
|
|
|
62
55
|
});
|
|
63
56
|
}
|
|
64
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Patch a webhook by id
|
|
60
|
+
*/
|
|
61
|
+
update(webhookID: string, body: WebhookUpdateParams, options?: RequestOptions): APIPromise<WebhookDetails> {
|
|
62
|
+
return this._client.patch(path`/webhooks/${webhookID}`, { body, ...options });
|
|
63
|
+
}
|
|
64
|
+
|
|
65
65
|
/**
|
|
66
66
|
* Get webhook secret by id
|
|
67
67
|
*/
|
|
@@ -69,10 +69,6 @@ export class Webhooks extends APIResource {
|
|
|
69
69
|
return this._client.get(path`/webhooks/${webhookID}/secret`, options);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
unsafeUnwrap(body: string): UnsafeUnwrapWebhookEvent {
|
|
73
|
-
return JSON.parse(body) as UnsafeUnwrapWebhookEvent;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
72
|
unwrap(
|
|
77
73
|
body: string,
|
|
78
74
|
{ headers, key }: { headers: Record<string, string>; key?: string },
|
|
@@ -85,6 +81,10 @@ export class Webhooks extends APIResource {
|
|
|
85
81
|
}
|
|
86
82
|
return JSON.parse(body) as UnwrapWebhookEvent;
|
|
87
83
|
}
|
|
84
|
+
|
|
85
|
+
unsafeUnwrap(body: string): UnsafeUnwrapWebhookEvent {
|
|
86
|
+
return JSON.parse(body) as UnsafeUnwrapWebhookEvent;
|
|
87
|
+
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
export type WebhookDetailsCursorPagePagination = CursorPagePagination<WebhookDetails>;
|
|
@@ -2072,6 +2072,8 @@ export type UnwrapWebhookEvent =
|
|
|
2072
2072
|
| SubscriptionRenewedWebhookEvent
|
|
2073
2073
|
| SubscriptionUpdatedWebhookEvent;
|
|
2074
2074
|
|
|
2075
|
+
export interface WebhookListParams extends CursorPagePaginationParams {}
|
|
2076
|
+
|
|
2075
2077
|
export interface WebhookCreateParams {
|
|
2076
2078
|
/**
|
|
2077
2079
|
* Url of the webhook
|
|
@@ -2146,8 +2148,6 @@ export interface WebhookUpdateParams {
|
|
|
2146
2148
|
url?: string | null;
|
|
2147
2149
|
}
|
|
2148
2150
|
|
|
2149
|
-
export interface WebhookListParams extends CursorPagePaginationParams {}
|
|
2150
|
-
|
|
2151
2151
|
Webhooks.Headers = Headers;
|
|
2152
2152
|
|
|
2153
2153
|
export declare namespace Webhooks {
|
|
@@ -2196,9 +2196,9 @@ export declare namespace Webhooks {
|
|
|
2196
2196
|
type UnsafeUnwrapWebhookEvent as UnsafeUnwrapWebhookEvent,
|
|
2197
2197
|
type UnwrapWebhookEvent as UnwrapWebhookEvent,
|
|
2198
2198
|
type WebhookDetailsCursorPagePagination as WebhookDetailsCursorPagePagination,
|
|
2199
|
+
type WebhookListParams as WebhookListParams,
|
|
2199
2200
|
type WebhookCreateParams as WebhookCreateParams,
|
|
2200
2201
|
type WebhookUpdateParams as WebhookUpdateParams,
|
|
2201
|
-
type WebhookListParams as WebhookListParams,
|
|
2202
2202
|
};
|
|
2203
2203
|
|
|
2204
2204
|
export {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.32.
|
|
1
|
+
export const VERSION = '2.32.2'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.32.
|
|
1
|
+
export declare const VERSION = "2.32.2";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.32.
|
|
1
|
+
export declare const VERSION = "2.32.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.32.
|
|
1
|
+
export const VERSION = '2.32.2'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|