@sentdm/sentdm 0.7.1 → 0.14.0
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 +125 -0
- package/README.md +71 -34
- package/client.d.mts +49 -21
- package/client.d.mts.map +1 -1
- package/client.d.ts +49 -21
- package/client.d.ts.map +1 -1
- package/client.js +59 -38
- package/client.js.map +1 -1
- package/client.mjs +59 -38
- package/client.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +0 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +0 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +7 -1
- package/resources/contacts.d.mts +243 -49
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +243 -49
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +112 -15
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +112 -15
- package/resources/contacts.mjs.map +1 -1
- package/resources/index.d.mts +8 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -1
- package/resources/index.mjs.map +1 -1
- package/resources/me.d.mts +269 -0
- package/resources/me.d.mts.map +1 -0
- package/resources/me.d.ts +269 -0
- package/resources/me.d.ts.map +1 -0
- package/resources/me.js +40 -0
- package/resources/me.js.map +1 -0
- package/resources/me.mjs +36 -0
- package/resources/me.mjs.map +1 -0
- package/resources/messages.d.mts +239 -133
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +239 -133
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +42 -50
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +42 -50
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +70 -0
- package/resources/numbers.d.mts.map +1 -0
- package/resources/numbers.d.ts +70 -0
- package/resources/numbers.d.ts.map +1 -0
- package/resources/numbers.js +36 -0
- package/resources/numbers.js.map +1 -0
- package/resources/numbers.mjs +32 -0
- package/resources/numbers.mjs.map +1 -0
- package/resources/profiles/campaigns.d.mts +339 -0
- package/resources/profiles/campaigns.d.mts.map +1 -0
- package/resources/profiles/campaigns.d.ts +339 -0
- package/resources/profiles/campaigns.d.ts.map +1 -0
- package/resources/profiles/campaigns.js +148 -0
- package/resources/profiles/campaigns.js.map +1 -0
- package/resources/profiles/campaigns.mjs +144 -0
- package/resources/profiles/campaigns.mjs.map +1 -0
- package/resources/profiles/index.d.mts +3 -0
- package/resources/profiles/index.d.mts.map +1 -0
- package/resources/profiles/index.d.ts +3 -0
- package/resources/profiles/index.d.ts.map +1 -0
- package/resources/profiles/index.js +9 -0
- package/resources/profiles/index.js.map +1 -0
- package/resources/profiles/index.mjs +4 -0
- package/resources/profiles/index.mjs.map +1 -0
- package/resources/profiles/profiles.d.mts +967 -0
- package/resources/profiles/profiles.d.mts.map +1 -0
- package/resources/profiles/profiles.d.ts +967 -0
- package/resources/profiles/profiles.d.ts.map +1 -0
- package/resources/profiles/profiles.js +227 -0
- package/resources/profiles/profiles.js.map +1 -0
- package/resources/profiles/profiles.mjs +222 -0
- package/resources/profiles/profiles.mjs.map +1 -0
- package/resources/profiles.d.mts +2 -0
- package/resources/profiles.d.mts.map +1 -0
- package/resources/profiles.d.ts +2 -0
- package/resources/profiles.d.ts.map +1 -0
- package/resources/profiles.js +6 -0
- package/resources/profiles.js.map +1 -0
- package/resources/profiles.mjs +3 -0
- package/resources/profiles.mjs.map +1 -0
- package/resources/templates.d.mts +327 -191
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +327 -191
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +80 -35
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +80 -35
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +251 -0
- package/resources/users.d.mts.map +1 -0
- package/resources/users.d.ts +251 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +124 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +120 -0
- package/resources/users.mjs.map +1 -0
- package/resources/webhooks.d.mts +639 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +639 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +237 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +233 -0
- package/resources/webhooks.mjs.map +1 -0
- package/src/client.ts +235 -79
- package/src/internal/utils/log.ts +0 -1
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/contacts.ts +335 -57
- package/src/resources/index.ts +81 -12
- package/src/resources/me.ts +333 -0
- package/src/resources/messages.ts +306 -147
- package/src/resources/numbers.ts +102 -0
- package/src/resources/profiles/campaigns.ts +501 -0
- package/src/resources/profiles/index.ts +38 -0
- package/src/resources/profiles/profiles.ts +1302 -0
- package/src/resources/profiles.ts +3 -0
- package/src/resources/templates.ts +424 -202
- package/src/resources/users.ts +366 -0
- package/src/resources/webhooks.ts +923 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/number-lookup.d.mts +0 -59
- package/resources/number-lookup.d.mts.map +0 -1
- package/resources/number-lookup.d.ts +0 -59
- package/resources/number-lookup.d.ts.map +0 -1
- package/resources/number-lookup.js +0 -17
- package/resources/number-lookup.js.map +0 -1
- package/resources/number-lookup.mjs +0 -13
- package/resources/number-lookup.mjs.map +0 -1
- package/src/resources/number-lookup.ts +0 -80
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Webhooks = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Configure webhook endpoints for real-time event delivery
|
|
10
|
+
*/
|
|
11
|
+
class Webhooks extends resource_1.APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new webhook endpoint for the authenticated customer.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const apiResponseWebhook = await client.webhooks.create();
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(params, options) {
|
|
21
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
22
|
+
return this._client.post('/v3/webhooks', {
|
|
23
|
+
body,
|
|
24
|
+
...options,
|
|
25
|
+
headers: (0, headers_1.buildHeaders)([
|
|
26
|
+
{
|
|
27
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
28
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
29
|
+
},
|
|
30
|
+
options?.headers,
|
|
31
|
+
]),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Retrieves a single webhook by ID for the authenticated customer.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const apiResponseWebhook = await client.webhooks.retrieve(
|
|
40
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
41
|
+
* );
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
retrieve(id, params = {}, options) {
|
|
45
|
+
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
46
|
+
return this._client.get((0, path_1.path) `/v3/webhooks/${id}`, {
|
|
47
|
+
...options,
|
|
48
|
+
headers: (0, headers_1.buildHeaders)([
|
|
49
|
+
{ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
50
|
+
options?.headers,
|
|
51
|
+
]),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Updates an existing webhook for the authenticated customer.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const apiResponseWebhook = await client.webhooks.update(
|
|
60
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
update(id, params, options) {
|
|
65
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
66
|
+
return this._client.put((0, path_1.path) `/v3/webhooks/${id}`, {
|
|
67
|
+
body,
|
|
68
|
+
...options,
|
|
69
|
+
headers: (0, headers_1.buildHeaders)([
|
|
70
|
+
{
|
|
71
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
72
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
73
|
+
},
|
|
74
|
+
options?.headers,
|
|
75
|
+
]),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Retrieves a paginated list of webhooks for the authenticated customer.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```ts
|
|
83
|
+
* const webhooks = await client.webhooks.list({
|
|
84
|
+
* page: 0,
|
|
85
|
+
* page_size: 0,
|
|
86
|
+
* });
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
list(params, options) {
|
|
90
|
+
const { 'x-profile-id': xProfileID, ...query } = params;
|
|
91
|
+
return this._client.get('/v3/webhooks', {
|
|
92
|
+
query,
|
|
93
|
+
...options,
|
|
94
|
+
headers: (0, headers_1.buildHeaders)([
|
|
95
|
+
{ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
96
|
+
options?.headers,
|
|
97
|
+
]),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Deletes a webhook for the authenticated customer.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* await client.webhooks.delete(
|
|
106
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
107
|
+
* );
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
delete(id, params = {}, options) {
|
|
111
|
+
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
112
|
+
return this._client.delete((0, path_1.path) `/v3/webhooks/${id}`, {
|
|
113
|
+
...options,
|
|
114
|
+
headers: (0, headers_1.buildHeaders)([
|
|
115
|
+
{ Accept: '*/*', ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
116
|
+
options?.headers,
|
|
117
|
+
]),
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Retrieves all available webhook event types that can be subscribed to.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```ts
|
|
125
|
+
* const response = await client.webhooks.listEventTypes();
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
listEventTypes(params = {}, options) {
|
|
129
|
+
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
130
|
+
return this._client.get('/v3/webhooks/event-types', {
|
|
131
|
+
...options,
|
|
132
|
+
headers: (0, headers_1.buildHeaders)([
|
|
133
|
+
{ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
134
|
+
options?.headers,
|
|
135
|
+
]),
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Retrieves a paginated list of delivery events for the specified webhook.
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```ts
|
|
143
|
+
* const response = await client.webhooks.listEvents(
|
|
144
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
145
|
+
* { page: 0, page_size: 0 },
|
|
146
|
+
* );
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
listEvents(id, params, options) {
|
|
150
|
+
const { 'x-profile-id': xProfileID, ...query } = params;
|
|
151
|
+
return this._client.get((0, path_1.path) `/v3/webhooks/${id}/events`, {
|
|
152
|
+
query,
|
|
153
|
+
...options,
|
|
154
|
+
headers: (0, headers_1.buildHeaders)([
|
|
155
|
+
{ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
156
|
+
options?.headers,
|
|
157
|
+
]),
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Generates a new signing secret for the specified webhook. The old secret is
|
|
162
|
+
* immediately invalidated.
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```ts
|
|
166
|
+
* const response = await client.webhooks.rotateSecret(
|
|
167
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
168
|
+
* { body: {} },
|
|
169
|
+
* );
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
rotateSecret(id, params, options) {
|
|
173
|
+
const { body, 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID } = params;
|
|
174
|
+
return this._client.post((0, path_1.path) `/v3/webhooks/${id}/rotate-secret`, {
|
|
175
|
+
body: body,
|
|
176
|
+
...options,
|
|
177
|
+
headers: (0, headers_1.buildHeaders)([
|
|
178
|
+
{
|
|
179
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
180
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
181
|
+
},
|
|
182
|
+
options?.headers,
|
|
183
|
+
]),
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Sends a test event to the specified webhook endpoint to verify connectivity.
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* ```ts
|
|
191
|
+
* const response = await client.webhooks.test(
|
|
192
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
193
|
+
* );
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
test(id, params, options) {
|
|
197
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
198
|
+
return this._client.post((0, path_1.path) `/v3/webhooks/${id}/test`, {
|
|
199
|
+
body,
|
|
200
|
+
...options,
|
|
201
|
+
headers: (0, headers_1.buildHeaders)([
|
|
202
|
+
{
|
|
203
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
204
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
205
|
+
},
|
|
206
|
+
options?.headers,
|
|
207
|
+
]),
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Activates or deactivates a webhook for the authenticated customer.
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* ```ts
|
|
215
|
+
* const apiResponseWebhook =
|
|
216
|
+
* await client.webhooks.toggleStatus(
|
|
217
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
218
|
+
* );
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
toggleStatus(id, params, options) {
|
|
222
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
223
|
+
return this._client.patch((0, path_1.path) `/v3/webhooks/${id}/toggle-status`, {
|
|
224
|
+
body,
|
|
225
|
+
...options,
|
|
226
|
+
headers: (0, headers_1.buildHeaders)([
|
|
227
|
+
{
|
|
228
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
229
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
230
|
+
},
|
|
231
|
+
options?.headers,
|
|
232
|
+
]),
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
exports.Webhooks = Webhooks;
|
|
237
|
+
//# sourceMappingURL=webhooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;OAOG;IACH,MAAM,CAAC,MAA2B,EAAE,OAAwB;QAC1D,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC1F,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC/E,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAA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,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACrE;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAhQD,4BAgQC"}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Configure webhook endpoints for real-time event delivery
|
|
7
|
+
*/
|
|
8
|
+
export class Webhooks extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new webhook endpoint for the authenticated customer.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const apiResponseWebhook = await client.webhooks.create();
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
create(params, options) {
|
|
18
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
19
|
+
return this._client.post('/v3/webhooks', {
|
|
20
|
+
body,
|
|
21
|
+
...options,
|
|
22
|
+
headers: buildHeaders([
|
|
23
|
+
{
|
|
24
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
25
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
26
|
+
},
|
|
27
|
+
options?.headers,
|
|
28
|
+
]),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves a single webhook by ID for the authenticated customer.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const apiResponseWebhook = await client.webhooks.retrieve(
|
|
37
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
retrieve(id, params = {}, options) {
|
|
42
|
+
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
43
|
+
return this._client.get(path `/v3/webhooks/${id}`, {
|
|
44
|
+
...options,
|
|
45
|
+
headers: buildHeaders([
|
|
46
|
+
{ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
47
|
+
options?.headers,
|
|
48
|
+
]),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Updates an existing webhook for the authenticated customer.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const apiResponseWebhook = await client.webhooks.update(
|
|
57
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
58
|
+
* );
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
update(id, params, options) {
|
|
62
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
63
|
+
return this._client.put(path `/v3/webhooks/${id}`, {
|
|
64
|
+
body,
|
|
65
|
+
...options,
|
|
66
|
+
headers: buildHeaders([
|
|
67
|
+
{
|
|
68
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
69
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
70
|
+
},
|
|
71
|
+
options?.headers,
|
|
72
|
+
]),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Retrieves a paginated list of webhooks for the authenticated customer.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const webhooks = await client.webhooks.list({
|
|
81
|
+
* page: 0,
|
|
82
|
+
* page_size: 0,
|
|
83
|
+
* });
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
list(params, options) {
|
|
87
|
+
const { 'x-profile-id': xProfileID, ...query } = params;
|
|
88
|
+
return this._client.get('/v3/webhooks', {
|
|
89
|
+
query,
|
|
90
|
+
...options,
|
|
91
|
+
headers: buildHeaders([
|
|
92
|
+
{ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
93
|
+
options?.headers,
|
|
94
|
+
]),
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Deletes a webhook for the authenticated customer.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```ts
|
|
102
|
+
* await client.webhooks.delete(
|
|
103
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
104
|
+
* );
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
delete(id, params = {}, options) {
|
|
108
|
+
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
109
|
+
return this._client.delete(path `/v3/webhooks/${id}`, {
|
|
110
|
+
...options,
|
|
111
|
+
headers: buildHeaders([
|
|
112
|
+
{ Accept: '*/*', ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
113
|
+
options?.headers,
|
|
114
|
+
]),
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Retrieves all available webhook event types that can be subscribed to.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* const response = await client.webhooks.listEventTypes();
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
listEventTypes(params = {}, options) {
|
|
126
|
+
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
127
|
+
return this._client.get('/v3/webhooks/event-types', {
|
|
128
|
+
...options,
|
|
129
|
+
headers: buildHeaders([
|
|
130
|
+
{ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
131
|
+
options?.headers,
|
|
132
|
+
]),
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Retrieves a paginated list of delivery events for the specified webhook.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```ts
|
|
140
|
+
* const response = await client.webhooks.listEvents(
|
|
141
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
142
|
+
* { page: 0, page_size: 0 },
|
|
143
|
+
* );
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
listEvents(id, params, options) {
|
|
147
|
+
const { 'x-profile-id': xProfileID, ...query } = params;
|
|
148
|
+
return this._client.get(path `/v3/webhooks/${id}/events`, {
|
|
149
|
+
query,
|
|
150
|
+
...options,
|
|
151
|
+
headers: buildHeaders([
|
|
152
|
+
{ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
153
|
+
options?.headers,
|
|
154
|
+
]),
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Generates a new signing secret for the specified webhook. The old secret is
|
|
159
|
+
* immediately invalidated.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```ts
|
|
163
|
+
* const response = await client.webhooks.rotateSecret(
|
|
164
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
165
|
+
* { body: {} },
|
|
166
|
+
* );
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
169
|
+
rotateSecret(id, params, options) {
|
|
170
|
+
const { body, 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID } = params;
|
|
171
|
+
return this._client.post(path `/v3/webhooks/${id}/rotate-secret`, {
|
|
172
|
+
body: body,
|
|
173
|
+
...options,
|
|
174
|
+
headers: buildHeaders([
|
|
175
|
+
{
|
|
176
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
177
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
178
|
+
},
|
|
179
|
+
options?.headers,
|
|
180
|
+
]),
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Sends a test event to the specified webhook endpoint to verify connectivity.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```ts
|
|
188
|
+
* const response = await client.webhooks.test(
|
|
189
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
190
|
+
* );
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
test(id, params, options) {
|
|
194
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
195
|
+
return this._client.post(path `/v3/webhooks/${id}/test`, {
|
|
196
|
+
body,
|
|
197
|
+
...options,
|
|
198
|
+
headers: buildHeaders([
|
|
199
|
+
{
|
|
200
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
201
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
202
|
+
},
|
|
203
|
+
options?.headers,
|
|
204
|
+
]),
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Activates or deactivates a webhook for the authenticated customer.
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* ```ts
|
|
212
|
+
* const apiResponseWebhook =
|
|
213
|
+
* await client.webhooks.toggleStatus(
|
|
214
|
+
* 'd4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8',
|
|
215
|
+
* );
|
|
216
|
+
* ```
|
|
217
|
+
*/
|
|
218
|
+
toggleStatus(id, params, options) {
|
|
219
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
220
|
+
return this._client.patch(path `/v3/webhooks/${id}/toggle-status`, {
|
|
221
|
+
body,
|
|
222
|
+
...options,
|
|
223
|
+
headers: buildHeaders([
|
|
224
|
+
{
|
|
225
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
226
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
227
|
+
},
|
|
228
|
+
options?.headers,
|
|
229
|
+
]),
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
//# sourceMappingURL=webhooks.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.mjs","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;OAOG;IACH,MAAM,CAAC,MAA2B,EAAE,OAAwB;QAC1D,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC1F,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC/E,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACrE;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CACN,EAAU,EACV,SAAmD,EAAE,EACrD,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACpD,OAAO,IAAI,CAA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