@ophelio/sdk 0.5.1 → 0.6.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/README.md +27 -24
- package/dist/index.cjs +146 -41
- package/dist/index.d.cts +235 -30
- package/dist/index.d.mts +235 -30
- package/dist/index.mjs +146 -41
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -151,35 +151,38 @@ To page manually — for example to show `total_size` or build numbered pages
|
|
|
151
151
|
`page_size` defaults to 50 and is capped at 250. Because pagination is
|
|
152
152
|
offset-based, a row can be seen twice or skipped across a page boundary if the
|
|
153
153
|
collection is written to while you iterate. Paginated methods are marked
|
|
154
|
-
`(params?)` in the table below; every other list
|
|
155
|
-
|
|
156
|
-
`
|
|
154
|
+
`(params?)` in the table below; every other list returns a plain array.
|
|
155
|
+
|
|
156
|
+
On `members.listEntitlements` the page parameters compose with `type` and
|
|
157
|
+
`targets` rather than replacing them: the page is a window onto the
|
|
158
|
+
already-filtered result, and a page token is bound to the filters it was
|
|
159
|
+
issued under.
|
|
157
160
|
|
|
158
161
|
## API surface
|
|
159
162
|
|
|
160
163
|
Everything reachable with an API key is covered:
|
|
161
164
|
|
|
162
|
-
| Namespace | Methods
|
|
163
|
-
| ------------------------------- |
|
|
164
|
-
| `admit` | `check({ card, targets? })`
|
|
165
|
-
| `members` | `sync({ since?, targets? })`, `get(id)`, `listEntitlements(id, { type?, targets? })`, `update(id, ...)`, `remove(id)`, `setPrimary(id)`, `reissueCard(id, { note? })`
|
|
166
|
-
| `memberships` | `list(params?)`, `get(id)`, `create(...)`, `update(id, ...)`, `cancel(id, ...)`, `uncancel(id)`, `renew(id, ...)`, `upgrade(id, ...)`, `downgrade(id, ...)`, `listMembers(id)`, `addMember(id, ...)`, `listScheduledChanges(id, params?)`, `cancelScheduledChange(id, changeId)`, `listTransactions(id, params?)`, `listTermTransactions(id, termId, params?)`, `createTransaction(id, ...)` |
|
|
167
|
-
| `customers` | `list(params?)`, `get(id, params?)`, `create(...)`, `update(id, ...)`, `delete(id)`, `listMemberships(id, params?)` — `list`/`get` accept `view: 'full'` to include `membership_summary`
|
|
168
|
-
| `entitlements` | `redeem(...)`, `recordUsage(...)`, `list()`, `get(id)`, `create(...)`, `update(id, ...)`, `delete(id)`
|
|
169
|
-
| `plans` | `list()`, `get(id)`, `create(...)`, `update(id, ...)`, `delete(id)`, `listBillingOptions(id)`, `createBillingOption(id, ...)`, `listEntitlements(id)`, `createEntitlement(id, ...)`, `listPlanLinks(id)`, `createPlanLink(id, ...)`, `listPricingGroupMappings(id)`, `createPricingGroupMapping(id, ...)`
|
|
170
|
-
| `billingOptions` | `list()`, `get(id)`, `update(id, ...)`, `delete(id)`, `listSalesChannels(id)`, `createSalesChannelLink(id, ...)`
|
|
171
|
-
| `memberRoles` | `list()`, `get(id)`, `create(...)`, `update(id, ...)`, `delete(id)`
|
|
172
|
-
| `pricingGroups` | `list()`, `get(id)`, `create(...)`, `update(id, ...)`, `delete(id)`
|
|
173
|
-
| `salesChannels` | `list()`, `get(id)`, `create(...)`, `update(id, ...)`, `delete(id)`
|
|
174
|
-
| `targetCodes` | `list(params?)`, `get(id, params?)`, `create(...)`, `update(id, ...)`, `delete(id)` — `list`/`get` accept `view: 'full'` to include `plan_entitlement_count`; `update` takes `display_name` / `description` only, as `code` is immutable
|
|
175
|
-
| `calendars` | `list(params?)`, `get(id, params?)`, `create(...)`, `update(id, ...)`, `delete(id)`, `listRules(id, params?)`, `createRule(id, ...)` — `list`/`get` accept `view: 'full'` to include `plan_entitlement_count`
|
|
176
|
-
| `calendarRules` | `get(id)`, `update(id, ...)`, `delete(id)`
|
|
177
|
-
| `planEntitlements` | `get(id)`, `update(id, ...)`, `delete(id)`, `listAvailabilities(id, params?)`, `createAvailability(id, ...)`
|
|
178
|
-
| `planEntitlementAvailabilities` | `get(id)`, `update(id, ...)`, `delete(id)`
|
|
179
|
-
| `planLinks` | `delete(id)`
|
|
180
|
-
| `planPricingGroupMappings` | `delete(id)`
|
|
181
|
-
| `billingOptionSalesChannels` | `delete(id)`
|
|
182
|
-
| `webhookSubscriptions` | `list()`, `get(id)`, `create(...)`, `update(id, ...)`, `delete(id)`, `listDeliveries(id, params?)`
|
|
165
|
+
| Namespace | Methods |
|
|
166
|
+
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
167
|
+
| `admit` | `check({ card, targets? })` |
|
|
168
|
+
| `members` | `sync({ since?, targets? })`, `get(id)`, `listEntitlements(id, { page_size?, page_token?, type?, targets? })`, `update(id, ...)`, `remove(id)`, `setPrimary(id)`, `reissueCard(id, { note? })` |
|
|
169
|
+
| `memberships` | `list(params?)`, `get(id)`, `create(...)`, `update(id, ...)`, `cancel(id, ...)`, `uncancel(id)`, `renew(id, ...)`, `upgrade(id, ...)`, `downgrade(id, ...)`, `listMembers(id, params?)`, `addMember(id, ...)`, `listScheduledChanges(id, params?)`, `cancelScheduledChange(id, changeId)`, `listTransactions(id, params?)`, `listTermTransactions(id, termId, params?)`, `createTransaction(id, ...)` |
|
|
170
|
+
| `customers` | `list(params?)`, `get(id, params?)`, `create(...)`, `update(id, ...)`, `delete(id)`, `listMemberships(id, params?)` — `list`/`get` accept `view: 'full'` to include `membership_summary` |
|
|
171
|
+
| `entitlements` | `redeem(...)`, `recordUsage(...)`, `list(params?)`, `get(id)`, `create(...)`, `update(id, ...)`, `delete(id)` |
|
|
172
|
+
| `plans` | `list(params?)`, `get(id)`, `create(...)`, `update(id, ...)`, `delete(id)`, `listBillingOptions(id, params?)`, `createBillingOption(id, ...)`, `listEntitlements(id, params?)`, `createEntitlement(id, ...)`, `listPlanLinks(id, params?)`, `createPlanLink(id, ...)`, `listPricingGroupMappings(id, params?)`, `createPricingGroupMapping(id, ...)` |
|
|
173
|
+
| `billingOptions` | `list(params?)`, `get(id)`, `update(id, ...)`, `delete(id)`, `listSalesChannels(id, params?)`, `createSalesChannelLink(id, ...)` |
|
|
174
|
+
| `memberRoles` | `list(params?)`, `get(id)`, `create(...)`, `update(id, ...)`, `delete(id)` |
|
|
175
|
+
| `pricingGroups` | `list(params?)`, `get(id)`, `create(...)`, `update(id, ...)`, `delete(id)` |
|
|
176
|
+
| `salesChannels` | `list(params?)`, `get(id)`, `create(...)`, `update(id, ...)`, `delete(id)` |
|
|
177
|
+
| `targetCodes` | `list(params?)`, `get(id, params?)`, `create(...)`, `update(id, ...)`, `delete(id)` — `list`/`get` accept `view: 'full'` to include `plan_entitlement_count`; `update` takes `display_name` / `description` only, as `code` is immutable |
|
|
178
|
+
| `calendars` | `list(params?)`, `get(id, params?)`, `create(...)`, `update(id, ...)`, `delete(id)`, `listRules(id, params?)`, `createRule(id, ...)` — `list`/`get` accept `view: 'full'` to include `plan_entitlement_count` |
|
|
179
|
+
| `calendarRules` | `get(id)`, `update(id, ...)`, `delete(id)` |
|
|
180
|
+
| `planEntitlements` | `get(id)`, `update(id, ...)`, `delete(id)`, `listAvailabilities(id, params?)`, `createAvailability(id, ...)` |
|
|
181
|
+
| `planEntitlementAvailabilities` | `get(id)`, `update(id, ...)`, `delete(id)` |
|
|
182
|
+
| `planLinks` | `delete(id)` |
|
|
183
|
+
| `planPricingGroupMappings` | `delete(id)` |
|
|
184
|
+
| `billingOptionSalesChannels` | `delete(id)` |
|
|
185
|
+
| `webhookSubscriptions` | `list(params?)`, `get(id)`, `create(...)`, `update(id, ...)`, `delete(id)`, `listDeliveries(id, params?)` |
|
|
183
186
|
|
|
184
187
|
Every method accepts a trailing `options` argument: `{ signal?, headers? }`
|
|
185
188
|
(plus `idempotencyKey?` on the idempotency-keyed mutations: `memberships.create`
|
package/dist/index.cjs
CHANGED
|
@@ -293,13 +293,25 @@ var BillingOptionSalesChannelsResource = class extends APIResource {
|
|
|
293
293
|
//#endregion
|
|
294
294
|
//#region src/resources/billing-options.ts
|
|
295
295
|
var BillingOptionsResource = class extends APIResource {
|
|
296
|
-
|
|
297
|
-
|
|
296
|
+
/**
|
|
297
|
+
* Every billing option in the project, across all plans — plans multiplied
|
|
298
|
+
* by their options, so this is the largest of the configuration lists.
|
|
299
|
+
* Ordered by plan, then display name. Use `collect` or `paginate` to walk it,
|
|
300
|
+
* or read `total_size` off the first page for a count without loading rows.
|
|
301
|
+
*/
|
|
302
|
+
async list(params, options) {
|
|
303
|
+
const response = await this.transport.request({
|
|
298
304
|
method: "GET",
|
|
299
305
|
path: "/api/v1/billing-options",
|
|
306
|
+
query: pageQuery(params),
|
|
300
307
|
retryable: true,
|
|
301
308
|
options
|
|
302
|
-
})
|
|
309
|
+
});
|
|
310
|
+
return {
|
|
311
|
+
items: response.billing_options,
|
|
312
|
+
next_page_token: response.next_page_token,
|
|
313
|
+
total_size: response.total_size
|
|
314
|
+
};
|
|
303
315
|
}
|
|
304
316
|
get(id, options) {
|
|
305
317
|
return this.transport.request({
|
|
@@ -326,13 +338,24 @@ var BillingOptionsResource = class extends APIResource {
|
|
|
326
338
|
options
|
|
327
339
|
});
|
|
328
340
|
}
|
|
329
|
-
|
|
330
|
-
|
|
341
|
+
/**
|
|
342
|
+
* The sales channels a billing option is restricted to, in the order they
|
|
343
|
+
* were linked. No links at all means the billing option is available
|
|
344
|
+
* everywhere.
|
|
345
|
+
*/
|
|
346
|
+
async listSalesChannels(id, params, options) {
|
|
347
|
+
const response = await this.transport.request({
|
|
331
348
|
method: "GET",
|
|
332
349
|
path: `/api/v1/billing-options/${encodeURIComponent(id)}/sales-channels`,
|
|
350
|
+
query: pageQuery(params),
|
|
333
351
|
retryable: true,
|
|
334
352
|
options
|
|
335
|
-
})
|
|
353
|
+
});
|
|
354
|
+
return {
|
|
355
|
+
items: response.sales_channels,
|
|
356
|
+
next_page_token: response.next_page_token,
|
|
357
|
+
total_size: response.total_size
|
|
358
|
+
};
|
|
336
359
|
}
|
|
337
360
|
createSalesChannelLink(id, params, options) {
|
|
338
361
|
return this.transport.request({
|
|
@@ -592,13 +615,19 @@ var EntitlementsResource = class extends APIResource {
|
|
|
592
615
|
options: requestOptions
|
|
593
616
|
})).usage;
|
|
594
617
|
}
|
|
595
|
-
async list(options) {
|
|
596
|
-
|
|
618
|
+
async list(params, options) {
|
|
619
|
+
const response = await this.transport.request({
|
|
597
620
|
method: "GET",
|
|
598
621
|
path: "/api/v1/entitlements",
|
|
622
|
+
query: pageQuery(params),
|
|
599
623
|
retryable: true,
|
|
600
624
|
options
|
|
601
|
-
})
|
|
625
|
+
});
|
|
626
|
+
return {
|
|
627
|
+
items: response.entitlements,
|
|
628
|
+
next_page_token: response.next_page_token,
|
|
629
|
+
total_size: response.total_size
|
|
630
|
+
};
|
|
602
631
|
}
|
|
603
632
|
get(id, options) {
|
|
604
633
|
return this.transport.request({
|
|
@@ -638,13 +667,19 @@ var EntitlementsResource = class extends APIResource {
|
|
|
638
667
|
//#endregion
|
|
639
668
|
//#region src/resources/member-roles.ts
|
|
640
669
|
var MemberRolesResource = class extends APIResource {
|
|
641
|
-
async list(options) {
|
|
642
|
-
|
|
670
|
+
async list(params, options) {
|
|
671
|
+
const response = await this.transport.request({
|
|
643
672
|
method: "GET",
|
|
644
673
|
path: "/api/v1/member-roles",
|
|
674
|
+
query: pageQuery(params),
|
|
645
675
|
retryable: true,
|
|
646
676
|
options
|
|
647
|
-
})
|
|
677
|
+
});
|
|
678
|
+
return {
|
|
679
|
+
items: response.member_roles,
|
|
680
|
+
next_page_token: response.next_page_token,
|
|
681
|
+
total_size: response.total_size
|
|
682
|
+
};
|
|
648
683
|
}
|
|
649
684
|
get(id, options) {
|
|
650
685
|
return this.transport.request({
|
|
@@ -738,18 +773,29 @@ var MembersResource = class extends APIResource {
|
|
|
738
773
|
* Each entitlement carries `valid_on` and `valid_at` when something
|
|
739
774
|
* restricts it by date or by target; both list only what it matched, never
|
|
740
775
|
* what it failed.
|
|
776
|
+
*
|
|
777
|
+
* `page_size` / `page_token` window the already-filtered result, so they
|
|
778
|
+
* compose with `type` and `targets` rather than replacing them. A page token
|
|
779
|
+
* is bound to the filters it was issued under: change `type` or `targets`
|
|
780
|
+
* and the token is refused rather than returning misaligned rows.
|
|
741
781
|
*/
|
|
742
782
|
async listEntitlements(id, params = {}, options) {
|
|
743
|
-
|
|
783
|
+
const response = await this.transport.request({
|
|
744
784
|
method: "GET",
|
|
745
785
|
path: `/api/v1/members/${encodeURIComponent(id)}/entitlements`,
|
|
746
786
|
query: {
|
|
787
|
+
...pageQuery(params),
|
|
747
788
|
type: params.type,
|
|
748
789
|
targets: params.targets
|
|
749
790
|
},
|
|
750
791
|
retryable: true,
|
|
751
792
|
options
|
|
752
|
-
})
|
|
793
|
+
});
|
|
794
|
+
return {
|
|
795
|
+
items: response.entitlements,
|
|
796
|
+
next_page_token: response.next_page_token,
|
|
797
|
+
total_size: response.total_size
|
|
798
|
+
};
|
|
753
799
|
}
|
|
754
800
|
/**
|
|
755
801
|
* Updates a member's details. Accepts `name`, `date_of_birth` and `role`
|
|
@@ -902,13 +948,24 @@ var MembershipsResource = class extends APIResource {
|
|
|
902
948
|
options: requestOptions
|
|
903
949
|
});
|
|
904
950
|
}
|
|
905
|
-
|
|
906
|
-
|
|
951
|
+
/**
|
|
952
|
+
* The cardholders on a membership, primary first, then in the order they
|
|
953
|
+
* were added. Bounded by the plan's `max_party_size`, so the default page
|
|
954
|
+
* size covers a membership in one request.
|
|
955
|
+
*/
|
|
956
|
+
async listMembers(id, params, options) {
|
|
957
|
+
const response = await this.transport.request({
|
|
907
958
|
method: "GET",
|
|
908
959
|
path: `/api/v1/memberships/${encodeURIComponent(id)}/members`,
|
|
960
|
+
query: pageQuery(params),
|
|
909
961
|
retryable: true,
|
|
910
962
|
options
|
|
911
|
-
})
|
|
963
|
+
});
|
|
964
|
+
return {
|
|
965
|
+
items: response.members,
|
|
966
|
+
next_page_token: response.next_page_token,
|
|
967
|
+
total_size: response.total_size
|
|
968
|
+
};
|
|
912
969
|
}
|
|
913
970
|
/**
|
|
914
971
|
* Add a member to an existing membership, up to the plan's max party size.
|
|
@@ -1125,13 +1182,19 @@ var PlanPricingGroupMappingsResource = class extends APIResource {
|
|
|
1125
1182
|
//#endregion
|
|
1126
1183
|
//#region src/resources/plans.ts
|
|
1127
1184
|
var PlansResource = class extends APIResource {
|
|
1128
|
-
async list(options) {
|
|
1129
|
-
|
|
1185
|
+
async list(params, options) {
|
|
1186
|
+
const response = await this.transport.request({
|
|
1130
1187
|
method: "GET",
|
|
1131
1188
|
path: "/api/v1/plans",
|
|
1189
|
+
query: pageQuery(params),
|
|
1132
1190
|
retryable: true,
|
|
1133
1191
|
options
|
|
1134
|
-
})
|
|
1192
|
+
});
|
|
1193
|
+
return {
|
|
1194
|
+
items: response.plans,
|
|
1195
|
+
next_page_token: response.next_page_token,
|
|
1196
|
+
total_size: response.total_size
|
|
1197
|
+
};
|
|
1135
1198
|
}
|
|
1136
1199
|
get(id, options) {
|
|
1137
1200
|
return this.transport.request({
|
|
@@ -1141,21 +1204,33 @@ var PlansResource = class extends APIResource {
|
|
|
1141
1204
|
options
|
|
1142
1205
|
});
|
|
1143
1206
|
}
|
|
1144
|
-
async listBillingOptions(id, options) {
|
|
1145
|
-
|
|
1207
|
+
async listBillingOptions(id, params, options) {
|
|
1208
|
+
const response = await this.transport.request({
|
|
1146
1209
|
method: "GET",
|
|
1147
1210
|
path: `/api/v1/plans/${encodeURIComponent(id)}/billing-options`,
|
|
1211
|
+
query: pageQuery(params),
|
|
1148
1212
|
retryable: true,
|
|
1149
1213
|
options
|
|
1150
|
-
})
|
|
1214
|
+
});
|
|
1215
|
+
return {
|
|
1216
|
+
items: response.billing_options,
|
|
1217
|
+
next_page_token: response.next_page_token,
|
|
1218
|
+
total_size: response.total_size
|
|
1219
|
+
};
|
|
1151
1220
|
}
|
|
1152
|
-
async listEntitlements(id, options) {
|
|
1153
|
-
|
|
1221
|
+
async listEntitlements(id, params, options) {
|
|
1222
|
+
const response = await this.transport.request({
|
|
1154
1223
|
method: "GET",
|
|
1155
1224
|
path: `/api/v1/plans/${encodeURIComponent(id)}/entitlements`,
|
|
1225
|
+
query: pageQuery(params),
|
|
1156
1226
|
retryable: true,
|
|
1157
1227
|
options
|
|
1158
|
-
})
|
|
1228
|
+
});
|
|
1229
|
+
return {
|
|
1230
|
+
items: response.entitlements,
|
|
1231
|
+
next_page_token: response.next_page_token,
|
|
1232
|
+
total_size: response.total_size
|
|
1233
|
+
};
|
|
1159
1234
|
}
|
|
1160
1235
|
create(params, options) {
|
|
1161
1236
|
return this.transport.request({
|
|
@@ -1192,13 +1267,19 @@ var PlansResource = class extends APIResource {
|
|
|
1192
1267
|
options
|
|
1193
1268
|
});
|
|
1194
1269
|
}
|
|
1195
|
-
async listPlanLinks(id, options) {
|
|
1196
|
-
|
|
1270
|
+
async listPlanLinks(id, params, options) {
|
|
1271
|
+
const response = await this.transport.request({
|
|
1197
1272
|
method: "GET",
|
|
1198
1273
|
path: `/api/v1/plans/${encodeURIComponent(id)}/plan-links`,
|
|
1274
|
+
query: pageQuery(params),
|
|
1199
1275
|
retryable: true,
|
|
1200
1276
|
options
|
|
1201
|
-
})
|
|
1277
|
+
});
|
|
1278
|
+
return {
|
|
1279
|
+
items: response.plan_links,
|
|
1280
|
+
next_page_token: response.next_page_token,
|
|
1281
|
+
total_size: response.total_size
|
|
1282
|
+
};
|
|
1202
1283
|
}
|
|
1203
1284
|
createPlanLink(id, params, options) {
|
|
1204
1285
|
return this.transport.request({
|
|
@@ -1218,13 +1299,19 @@ var PlansResource = class extends APIResource {
|
|
|
1218
1299
|
options
|
|
1219
1300
|
});
|
|
1220
1301
|
}
|
|
1221
|
-
async listPricingGroupMappings(id, options) {
|
|
1222
|
-
|
|
1302
|
+
async listPricingGroupMappings(id, params, options) {
|
|
1303
|
+
const response = await this.transport.request({
|
|
1223
1304
|
method: "GET",
|
|
1224
1305
|
path: `/api/v1/plans/${encodeURIComponent(id)}/pricing-group-mappings`,
|
|
1306
|
+
query: pageQuery(params),
|
|
1225
1307
|
retryable: true,
|
|
1226
1308
|
options
|
|
1227
|
-
})
|
|
1309
|
+
});
|
|
1310
|
+
return {
|
|
1311
|
+
items: response.pricing_group_mappings,
|
|
1312
|
+
next_page_token: response.next_page_token,
|
|
1313
|
+
total_size: response.total_size
|
|
1314
|
+
};
|
|
1228
1315
|
}
|
|
1229
1316
|
createPricingGroupMapping(id, params, options) {
|
|
1230
1317
|
return this.transport.request({
|
|
@@ -1239,13 +1326,19 @@ var PlansResource = class extends APIResource {
|
|
|
1239
1326
|
//#endregion
|
|
1240
1327
|
//#region src/resources/pricing-groups.ts
|
|
1241
1328
|
var PricingGroupsResource = class extends APIResource {
|
|
1242
|
-
async list(options) {
|
|
1243
|
-
|
|
1329
|
+
async list(params, options) {
|
|
1330
|
+
const response = await this.transport.request({
|
|
1244
1331
|
method: "GET",
|
|
1245
1332
|
path: "/api/v1/pricing-groups",
|
|
1333
|
+
query: pageQuery(params),
|
|
1246
1334
|
retryable: true,
|
|
1247
1335
|
options
|
|
1248
|
-
})
|
|
1336
|
+
});
|
|
1337
|
+
return {
|
|
1338
|
+
items: response.pricing_groups,
|
|
1339
|
+
next_page_token: response.next_page_token,
|
|
1340
|
+
total_size: response.total_size
|
|
1341
|
+
};
|
|
1249
1342
|
}
|
|
1250
1343
|
get(id, options) {
|
|
1251
1344
|
return this.transport.request({
|
|
@@ -1285,13 +1378,19 @@ var PricingGroupsResource = class extends APIResource {
|
|
|
1285
1378
|
//#endregion
|
|
1286
1379
|
//#region src/resources/sales-channels.ts
|
|
1287
1380
|
var SalesChannelsResource = class extends APIResource {
|
|
1288
|
-
async list(options) {
|
|
1289
|
-
|
|
1381
|
+
async list(params, options) {
|
|
1382
|
+
const response = await this.transport.request({
|
|
1290
1383
|
method: "GET",
|
|
1291
1384
|
path: "/api/v1/sales-channels",
|
|
1385
|
+
query: pageQuery(params),
|
|
1292
1386
|
retryable: true,
|
|
1293
1387
|
options
|
|
1294
|
-
})
|
|
1388
|
+
});
|
|
1389
|
+
return {
|
|
1390
|
+
items: response.sales_channels,
|
|
1391
|
+
next_page_token: response.next_page_token,
|
|
1392
|
+
total_size: response.total_size
|
|
1393
|
+
};
|
|
1295
1394
|
}
|
|
1296
1395
|
get(id, options) {
|
|
1297
1396
|
return this.transport.request({
|
|
@@ -1410,13 +1509,19 @@ var TargetCodesResource = class extends APIResource {
|
|
|
1410
1509
|
//#endregion
|
|
1411
1510
|
//#region src/resources/webhook-subscriptions.ts
|
|
1412
1511
|
var WebhookSubscriptionsResource = class extends APIResource {
|
|
1413
|
-
async list(options) {
|
|
1414
|
-
|
|
1512
|
+
async list(params, options) {
|
|
1513
|
+
const response = await this.transport.request({
|
|
1415
1514
|
method: "GET",
|
|
1416
1515
|
path: "/api/v1/webhook-subscriptions",
|
|
1516
|
+
query: pageQuery(params),
|
|
1417
1517
|
retryable: true,
|
|
1418
1518
|
options
|
|
1419
|
-
})
|
|
1519
|
+
});
|
|
1520
|
+
return {
|
|
1521
|
+
items: response.webhook_subscriptions,
|
|
1522
|
+
next_page_token: response.next_page_token,
|
|
1523
|
+
total_size: response.total_size
|
|
1524
|
+
};
|
|
1420
1525
|
}
|
|
1421
1526
|
get(id, options) {
|
|
1422
1527
|
return this.transport.request({
|