@ophelio/sdk 0.5.1 → 0.6.1
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 +151 -42
- package/dist/index.d.cts +242 -32
- package/dist/index.d.mts +242 -32
- package/dist/index.mjs +151 -42
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1219,6 +1219,16 @@ interface components {
|
|
|
1219
1219
|
update_time: string;
|
|
1220
1220
|
};
|
|
1221
1221
|
ListPlansResponse: {
|
|
1222
|
+
/**
|
|
1223
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
1224
|
+
* @example
|
|
1225
|
+
*/
|
|
1226
|
+
next_page_token: string;
|
|
1227
|
+
/**
|
|
1228
|
+
* @description Total number of results across all pages.
|
|
1229
|
+
* @example 42
|
|
1230
|
+
*/
|
|
1231
|
+
total_size: number;
|
|
1222
1232
|
plans: components["schemas"]["Plan"][];
|
|
1223
1233
|
};
|
|
1224
1234
|
ErrorDetail: {
|
|
@@ -1267,7 +1277,17 @@ interface components {
|
|
|
1267
1277
|
create_time: string; /** Format: date-time */
|
|
1268
1278
|
update_time: string;
|
|
1269
1279
|
};
|
|
1270
|
-
|
|
1280
|
+
ListPlanBillingOptionsResponse: {
|
|
1281
|
+
/**
|
|
1282
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
1283
|
+
* @example
|
|
1284
|
+
*/
|
|
1285
|
+
next_page_token: string;
|
|
1286
|
+
/**
|
|
1287
|
+
* @description Total number of results across all pages.
|
|
1288
|
+
* @example 42
|
|
1289
|
+
*/
|
|
1290
|
+
total_size: number;
|
|
1271
1291
|
billing_options: components["schemas"]["BillingOption"][];
|
|
1272
1292
|
};
|
|
1273
1293
|
CreateBillingOptionForPlanDto: {
|
|
@@ -1297,6 +1317,16 @@ interface components {
|
|
|
1297
1317
|
update_time: string;
|
|
1298
1318
|
};
|
|
1299
1319
|
ListPlanLinksResponse: {
|
|
1320
|
+
/**
|
|
1321
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
1322
|
+
* @example
|
|
1323
|
+
*/
|
|
1324
|
+
next_page_token: string;
|
|
1325
|
+
/**
|
|
1326
|
+
* @description Total number of results across all pages.
|
|
1327
|
+
* @example 42
|
|
1328
|
+
*/
|
|
1329
|
+
total_size: number;
|
|
1300
1330
|
plan_links: components["schemas"]["PlanLinkView"][];
|
|
1301
1331
|
};
|
|
1302
1332
|
CreatePlanLinkDto: {
|
|
@@ -1347,6 +1377,16 @@ interface components {
|
|
|
1347
1377
|
entitlement: components["schemas"]["PlanEntitlementDefinition"] | null;
|
|
1348
1378
|
};
|
|
1349
1379
|
ListPlanEntitlementsResponse: {
|
|
1380
|
+
/**
|
|
1381
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
1382
|
+
* @example
|
|
1383
|
+
*/
|
|
1384
|
+
next_page_token: string;
|
|
1385
|
+
/**
|
|
1386
|
+
* @description Total number of results across all pages.
|
|
1387
|
+
* @example 42
|
|
1388
|
+
*/
|
|
1389
|
+
total_size: number;
|
|
1350
1390
|
entitlements: components["schemas"]["PlanEntitlement"][];
|
|
1351
1391
|
};
|
|
1352
1392
|
CreatePlanEntitlementDto: {
|
|
@@ -1376,12 +1416,35 @@ interface components {
|
|
|
1376
1416
|
pricing_group: components["schemas"]["MappingPricingGroup"] | null;
|
|
1377
1417
|
};
|
|
1378
1418
|
ListPlanPricingGroupMappingsResponse: {
|
|
1419
|
+
/**
|
|
1420
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
1421
|
+
* @example
|
|
1422
|
+
*/
|
|
1423
|
+
next_page_token: string;
|
|
1424
|
+
/**
|
|
1425
|
+
* @description Total number of results across all pages.
|
|
1426
|
+
* @example 42
|
|
1427
|
+
*/
|
|
1428
|
+
total_size: number;
|
|
1379
1429
|
pricing_group_mappings: components["schemas"]["PlanPricingGroupMapping"][];
|
|
1380
1430
|
};
|
|
1381
1431
|
CreatePlanPricingGroupMappingDto: {
|
|
1382
1432
|
/** Format: uuid */member_role_id: string; /** Format: uuid */
|
|
1383
1433
|
pricing_group_id: string;
|
|
1384
1434
|
};
|
|
1435
|
+
ListBillingOptionsResponse: {
|
|
1436
|
+
/**
|
|
1437
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
1438
|
+
* @example
|
|
1439
|
+
*/
|
|
1440
|
+
next_page_token: string;
|
|
1441
|
+
/**
|
|
1442
|
+
* @description Total number of results across all pages.
|
|
1443
|
+
* @example 42
|
|
1444
|
+
*/
|
|
1445
|
+
total_size: number;
|
|
1446
|
+
billing_options: components["schemas"]["BillingOption"][];
|
|
1447
|
+
};
|
|
1385
1448
|
UpdateBillingOptionDto: {
|
|
1386
1449
|
display_name?: string;
|
|
1387
1450
|
description?: string | null; /** @enum {string} */
|
|
@@ -1399,6 +1462,16 @@ interface components {
|
|
|
1399
1462
|
sales_channel: components["schemas"]["SalesChannelSummary"] | null;
|
|
1400
1463
|
};
|
|
1401
1464
|
ListBillingOptionSalesChannelsResponse: {
|
|
1465
|
+
/**
|
|
1466
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
1467
|
+
* @example
|
|
1468
|
+
*/
|
|
1469
|
+
next_page_token: string;
|
|
1470
|
+
/**
|
|
1471
|
+
* @description Total number of results across all pages.
|
|
1472
|
+
* @example 42
|
|
1473
|
+
*/
|
|
1474
|
+
total_size: number;
|
|
1402
1475
|
sales_channels: components["schemas"]["BillingOptionSalesChannel"][];
|
|
1403
1476
|
};
|
|
1404
1477
|
CreateBillingOptionSalesChannelDto: {
|
|
@@ -1414,6 +1487,16 @@ interface components {
|
|
|
1414
1487
|
update_time: string;
|
|
1415
1488
|
};
|
|
1416
1489
|
ListSalesChannelsResponse: {
|
|
1490
|
+
/**
|
|
1491
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
1492
|
+
* @example
|
|
1493
|
+
*/
|
|
1494
|
+
next_page_token: string;
|
|
1495
|
+
/**
|
|
1496
|
+
* @description Total number of results across all pages.
|
|
1497
|
+
* @example 42
|
|
1498
|
+
*/
|
|
1499
|
+
total_size: number;
|
|
1417
1500
|
sales_channels: components["schemas"]["SalesChannel"][];
|
|
1418
1501
|
};
|
|
1419
1502
|
CreateSalesChannelDto: {
|
|
@@ -1493,6 +1576,16 @@ interface components {
|
|
|
1493
1576
|
update_time: string;
|
|
1494
1577
|
};
|
|
1495
1578
|
ListEntitlementsResponse: {
|
|
1579
|
+
/**
|
|
1580
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
1581
|
+
* @example
|
|
1582
|
+
*/
|
|
1583
|
+
next_page_token: string;
|
|
1584
|
+
/**
|
|
1585
|
+
* @description Total number of results across all pages.
|
|
1586
|
+
* @example 42
|
|
1587
|
+
*/
|
|
1588
|
+
total_size: number;
|
|
1496
1589
|
entitlements: components["schemas"]["Entitlement"][];
|
|
1497
1590
|
};
|
|
1498
1591
|
RedeemEntitlementDto: {
|
|
@@ -1625,6 +1718,16 @@ interface components {
|
|
|
1625
1718
|
membership: components["schemas"]["MemberMembershipSummary"] | null;
|
|
1626
1719
|
};
|
|
1627
1720
|
ListMemberEntitlementsResponse: {
|
|
1721
|
+
/**
|
|
1722
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
1723
|
+
* @example
|
|
1724
|
+
*/
|
|
1725
|
+
next_page_token: string;
|
|
1726
|
+
/**
|
|
1727
|
+
* @description Total number of results across all pages.
|
|
1728
|
+
* @example 42
|
|
1729
|
+
*/
|
|
1730
|
+
total_size: number;
|
|
1628
1731
|
entitlements: components["schemas"]["MemberEntitlement"][];
|
|
1629
1732
|
};
|
|
1630
1733
|
UpdateMemberDto: {
|
|
@@ -1710,6 +1813,16 @@ interface components {
|
|
|
1710
1813
|
update_time: string;
|
|
1711
1814
|
};
|
|
1712
1815
|
ListMemberRolesResponse: {
|
|
1816
|
+
/**
|
|
1817
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
1818
|
+
* @example
|
|
1819
|
+
*/
|
|
1820
|
+
next_page_token: string;
|
|
1821
|
+
/**
|
|
1822
|
+
* @description Total number of results across all pages.
|
|
1823
|
+
* @example 42
|
|
1824
|
+
*/
|
|
1825
|
+
total_size: number;
|
|
1713
1826
|
member_roles: components["schemas"]["MemberRole"][];
|
|
1714
1827
|
};
|
|
1715
1828
|
CreateMemberRoleDto: {
|
|
@@ -1736,6 +1849,16 @@ interface components {
|
|
|
1736
1849
|
update_time: string;
|
|
1737
1850
|
};
|
|
1738
1851
|
ListWebhookSubscriptionsResponse: {
|
|
1852
|
+
/**
|
|
1853
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
1854
|
+
* @example
|
|
1855
|
+
*/
|
|
1856
|
+
next_page_token: string;
|
|
1857
|
+
/**
|
|
1858
|
+
* @description Total number of results across all pages.
|
|
1859
|
+
* @example 42
|
|
1860
|
+
*/
|
|
1861
|
+
total_size: number;
|
|
1739
1862
|
webhook_subscriptions: components["schemas"]["WebhookSubscription"][];
|
|
1740
1863
|
};
|
|
1741
1864
|
WebhookDelivery: {
|
|
@@ -1784,6 +1907,16 @@ interface components {
|
|
|
1784
1907
|
update_time: string;
|
|
1785
1908
|
};
|
|
1786
1909
|
ListPricingGroupsResponse: {
|
|
1910
|
+
/**
|
|
1911
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
1912
|
+
* @example
|
|
1913
|
+
*/
|
|
1914
|
+
next_page_token: string;
|
|
1915
|
+
/**
|
|
1916
|
+
* @description Total number of results across all pages.
|
|
1917
|
+
* @example 42
|
|
1918
|
+
*/
|
|
1919
|
+
total_size: number;
|
|
1787
1920
|
pricing_groups: components["schemas"]["PricingGroup"][];
|
|
1788
1921
|
};
|
|
1789
1922
|
CreatePricingGroupDto: {
|
|
@@ -1974,6 +2107,16 @@ interface components {
|
|
|
1974
2107
|
memberships: components["schemas"]["Membership"][];
|
|
1975
2108
|
};
|
|
1976
2109
|
ListMembershipMembersResponse: {
|
|
2110
|
+
/**
|
|
2111
|
+
* @description Opaque token for the next page; empty string on the last page.
|
|
2112
|
+
* @example
|
|
2113
|
+
*/
|
|
2114
|
+
next_page_token: string;
|
|
2115
|
+
/**
|
|
2116
|
+
* @description Total number of results across all pages.
|
|
2117
|
+
* @example 42
|
|
2118
|
+
*/
|
|
2119
|
+
total_size: number;
|
|
1977
2120
|
members: components["schemas"]["Member"][];
|
|
1978
2121
|
};
|
|
1979
2122
|
AddMemberDto: {
|
|
@@ -2477,7 +2620,10 @@ interface operations {
|
|
|
2477
2620
|
};
|
|
2478
2621
|
PlansController_list: {
|
|
2479
2622
|
parameters: {
|
|
2480
|
-
query?:
|
|
2623
|
+
query?: {
|
|
2624
|
+
page_size?: number;
|
|
2625
|
+
page_token?: string;
|
|
2626
|
+
};
|
|
2481
2627
|
header?: never;
|
|
2482
2628
|
path?: never;
|
|
2483
2629
|
cookie?: never;
|
|
@@ -2604,7 +2750,10 @@ interface operations {
|
|
|
2604
2750
|
};
|
|
2605
2751
|
PlansController_listBillingOptions: {
|
|
2606
2752
|
parameters: {
|
|
2607
|
-
query?:
|
|
2753
|
+
query?: {
|
|
2754
|
+
page_size?: number;
|
|
2755
|
+
page_token?: string;
|
|
2756
|
+
};
|
|
2608
2757
|
header?: never;
|
|
2609
2758
|
path?: never;
|
|
2610
2759
|
cookie?: never;
|
|
@@ -2616,7 +2765,7 @@ interface operations {
|
|
|
2616
2765
|
[name: string]: unknown;
|
|
2617
2766
|
};
|
|
2618
2767
|
content: {
|
|
2619
|
-
"application/json": components["schemas"]["
|
|
2768
|
+
"application/json": components["schemas"]["ListPlanBillingOptionsResponse"];
|
|
2620
2769
|
};
|
|
2621
2770
|
};
|
|
2622
2771
|
404: {
|
|
@@ -2662,7 +2811,10 @@ interface operations {
|
|
|
2662
2811
|
};
|
|
2663
2812
|
PlansController_listPlanLinks: {
|
|
2664
2813
|
parameters: {
|
|
2665
|
-
query?:
|
|
2814
|
+
query?: {
|
|
2815
|
+
page_size?: number;
|
|
2816
|
+
page_token?: string;
|
|
2817
|
+
};
|
|
2666
2818
|
header?: never;
|
|
2667
2819
|
path?: never;
|
|
2668
2820
|
cookie?: never;
|
|
@@ -2720,7 +2872,10 @@ interface operations {
|
|
|
2720
2872
|
};
|
|
2721
2873
|
PlansController_listEntitlements: {
|
|
2722
2874
|
parameters: {
|
|
2723
|
-
query?:
|
|
2875
|
+
query?: {
|
|
2876
|
+
page_size?: number;
|
|
2877
|
+
page_token?: string;
|
|
2878
|
+
};
|
|
2724
2879
|
header?: never;
|
|
2725
2880
|
path?: never;
|
|
2726
2881
|
cookie?: never;
|
|
@@ -2778,7 +2933,10 @@ interface operations {
|
|
|
2778
2933
|
};
|
|
2779
2934
|
PlansController_listPricingGroupMappings: {
|
|
2780
2935
|
parameters: {
|
|
2781
|
-
query?:
|
|
2936
|
+
query?: {
|
|
2937
|
+
page_size?: number;
|
|
2938
|
+
page_token?: string;
|
|
2939
|
+
};
|
|
2782
2940
|
header?: never;
|
|
2783
2941
|
path?: never;
|
|
2784
2942
|
cookie?: never;
|
|
@@ -2836,7 +2994,10 @@ interface operations {
|
|
|
2836
2994
|
};
|
|
2837
2995
|
BillingOptionsController_list: {
|
|
2838
2996
|
parameters: {
|
|
2839
|
-
query?:
|
|
2997
|
+
query?: {
|
|
2998
|
+
page_size?: number;
|
|
2999
|
+
page_token?: string;
|
|
3000
|
+
};
|
|
2840
3001
|
header?: never;
|
|
2841
3002
|
path?: never;
|
|
2842
3003
|
cookie?: never;
|
|
@@ -2940,7 +3101,10 @@ interface operations {
|
|
|
2940
3101
|
};
|
|
2941
3102
|
BillingOptionsController_listSalesChannels: {
|
|
2942
3103
|
parameters: {
|
|
2943
|
-
query?:
|
|
3104
|
+
query?: {
|
|
3105
|
+
page_size?: number;
|
|
3106
|
+
page_token?: string;
|
|
3107
|
+
};
|
|
2944
3108
|
header?: never;
|
|
2945
3109
|
path?: never;
|
|
2946
3110
|
cookie?: never;
|
|
@@ -3025,7 +3189,10 @@ interface operations {
|
|
|
3025
3189
|
};
|
|
3026
3190
|
SalesChannelsController_list: {
|
|
3027
3191
|
parameters: {
|
|
3028
|
-
query?:
|
|
3192
|
+
query?: {
|
|
3193
|
+
page_size?: number;
|
|
3194
|
+
page_token?: string;
|
|
3195
|
+
};
|
|
3029
3196
|
header?: never;
|
|
3030
3197
|
path?: never;
|
|
3031
3198
|
cookie?: never;
|
|
@@ -3469,7 +3636,10 @@ interface operations {
|
|
|
3469
3636
|
};
|
|
3470
3637
|
EntitlementsController_list: {
|
|
3471
3638
|
parameters: {
|
|
3472
|
-
query?:
|
|
3639
|
+
query?: {
|
|
3640
|
+
page_size?: number;
|
|
3641
|
+
page_token?: string;
|
|
3642
|
+
};
|
|
3473
3643
|
header?: never;
|
|
3474
3644
|
path?: never;
|
|
3475
3645
|
cookie?: never;
|
|
@@ -3801,6 +3971,8 @@ interface operations {
|
|
|
3801
3971
|
parameters: {
|
|
3802
3972
|
query?: {
|
|
3803
3973
|
/** @description Registered target codes the request is being made at, sent comma-separated (`?targets=venue_a,coffee_shop`). Codes are matched exactly; an unregistered code is refused. Omit for no target context; send it empty to name no targets. */targets?: string[];
|
|
3974
|
+
page_size?: number;
|
|
3975
|
+
page_token?: string;
|
|
3804
3976
|
type?: "discount" | "early_access" | "free_entry" | "guest_pass";
|
|
3805
3977
|
};
|
|
3806
3978
|
header?: never;
|
|
@@ -4106,7 +4278,10 @@ interface operations {
|
|
|
4106
4278
|
};
|
|
4107
4279
|
MemberRolesController_list: {
|
|
4108
4280
|
parameters: {
|
|
4109
|
-
query?:
|
|
4281
|
+
query?: {
|
|
4282
|
+
page_size?: number;
|
|
4283
|
+
page_token?: string;
|
|
4284
|
+
};
|
|
4110
4285
|
header?: never;
|
|
4111
4286
|
path?: never;
|
|
4112
4287
|
cookie?: never;
|
|
@@ -4233,7 +4408,10 @@ interface operations {
|
|
|
4233
4408
|
};
|
|
4234
4409
|
WebhookSubscriptionsController_list: {
|
|
4235
4410
|
parameters: {
|
|
4236
|
-
query?:
|
|
4411
|
+
query?: {
|
|
4412
|
+
page_size?: number;
|
|
4413
|
+
page_token?: string;
|
|
4414
|
+
};
|
|
4237
4415
|
header?: never;
|
|
4238
4416
|
path?: never;
|
|
4239
4417
|
cookie?: never;
|
|
@@ -4390,7 +4568,10 @@ interface operations {
|
|
|
4390
4568
|
};
|
|
4391
4569
|
PricingGroupsController_list: {
|
|
4392
4570
|
parameters: {
|
|
4393
|
-
query?:
|
|
4571
|
+
query?: {
|
|
4572
|
+
page_size?: number;
|
|
4573
|
+
page_token?: string;
|
|
4574
|
+
};
|
|
4394
4575
|
header?: never;
|
|
4395
4576
|
path?: never;
|
|
4396
4577
|
cookie?: never;
|
|
@@ -4965,7 +5146,10 @@ interface operations {
|
|
|
4965
5146
|
};
|
|
4966
5147
|
MembershipsController_listMembers: {
|
|
4967
5148
|
parameters: {
|
|
4968
|
-
query?:
|
|
5149
|
+
query?: {
|
|
5150
|
+
page_size?: number;
|
|
5151
|
+
page_token?: string;
|
|
5152
|
+
};
|
|
4969
5153
|
header?: never;
|
|
4970
5154
|
path?: never;
|
|
4971
5155
|
cookie?: never;
|
|
@@ -5675,6 +5859,7 @@ type BillingOptionSalesChannel = Schemas['BillingOptionSalesChannel'];
|
|
|
5675
5859
|
type WebhookSubscription = Schemas['WebhookSubscription'];
|
|
5676
5860
|
type WebhookDelivery = Schemas['WebhookDelivery'];
|
|
5677
5861
|
type ScheduledChange = Schemas['MembershipScheduledChangeResponseDto'];
|
|
5862
|
+
type ScheduledChangeStatus = ScheduledChange['status'];
|
|
5678
5863
|
type PlanChangeResult = Schemas['PlanChangeResponseDto'];
|
|
5679
5864
|
type MemberSyncResponse = Schemas['MemberSyncResponse'];
|
|
5680
5865
|
type RedeemEntitlementResponse = Schemas['RedeemEntitlementResponseDto'];
|
|
@@ -5774,11 +5959,22 @@ declare class BillingOptionSalesChannelsResource extends APIResource {
|
|
|
5774
5959
|
//#endregion
|
|
5775
5960
|
//#region src/resources/billing-options.d.ts
|
|
5776
5961
|
declare class BillingOptionsResource extends APIResource {
|
|
5777
|
-
|
|
5962
|
+
/**
|
|
5963
|
+
* Every billing option in the project, across all plans — plans multiplied
|
|
5964
|
+
* by their options, so this is the largest of the configuration lists.
|
|
5965
|
+
* Ordered by plan, then display name. Use `collect` or `paginate` to walk it,
|
|
5966
|
+
* or read `total_size` off the first page for a count without loading rows.
|
|
5967
|
+
*/
|
|
5968
|
+
list(params?: PageParams, options?: RequestOptions): Promise<Page<BillingOption>>;
|
|
5778
5969
|
get(id: string, options?: RequestOptions): Promise<BillingOption>;
|
|
5779
5970
|
update(id: string, params: UpdateBillingOptionParams, options?: RequestOptions): Promise<BillingOption>;
|
|
5780
5971
|
delete(id: string, options?: RequestOptions): Promise<void>;
|
|
5781
|
-
|
|
5972
|
+
/**
|
|
5973
|
+
* The sales channels a billing option is restricted to, in the order they
|
|
5974
|
+
* were linked. No links at all means the billing option is available
|
|
5975
|
+
* everywhere.
|
|
5976
|
+
*/
|
|
5977
|
+
listSalesChannels(id: string, params?: PageParams, options?: RequestOptions): Promise<Page<BillingOptionSalesChannel>>;
|
|
5782
5978
|
createSalesChannelLink(id: string, params: CreateBillingOptionSalesChannelParams, options?: RequestOptions): Promise<BillingOptionSalesChannel>;
|
|
5783
5979
|
}
|
|
5784
5980
|
//#endregion
|
|
@@ -5867,7 +6063,7 @@ declare class EntitlementsResource extends APIResource {
|
|
|
5867
6063
|
* is refused rather than silently returning the original row.
|
|
5868
6064
|
*/
|
|
5869
6065
|
recordUsage(params: RecordUsageParams, options?: IdempotentRequestOptions): Promise<EntitlementUsage[]>;
|
|
5870
|
-
list(options?: RequestOptions): Promise<Entitlement
|
|
6066
|
+
list(params?: PageParams, options?: RequestOptions): Promise<Page<Entitlement>>;
|
|
5871
6067
|
get(id: string, options?: RequestOptions): Promise<Entitlement>;
|
|
5872
6068
|
create(params: CreateEntitlementParams, options?: RequestOptions): Promise<Entitlement>;
|
|
5873
6069
|
update(id: string, params: UpdateEntitlementParams, options?: RequestOptions): Promise<Entitlement>;
|
|
@@ -5876,7 +6072,7 @@ declare class EntitlementsResource extends APIResource {
|
|
|
5876
6072
|
//#endregion
|
|
5877
6073
|
//#region src/resources/member-roles.d.ts
|
|
5878
6074
|
declare class MemberRolesResource extends APIResource {
|
|
5879
|
-
list(options?: RequestOptions): Promise<MemberRole
|
|
6075
|
+
list(params?: PageParams, options?: RequestOptions): Promise<Page<MemberRole>>;
|
|
5880
6076
|
get(id: string, options?: RequestOptions): Promise<MemberRole>;
|
|
5881
6077
|
create(params: CreateMemberRoleParams, options?: RequestOptions): Promise<MemberRole>;
|
|
5882
6078
|
update(id: string, params: UpdateMemberRoleParams, options?: RequestOptions): Promise<MemberRole>;
|
|
@@ -5924,11 +6120,16 @@ declare class MembersResource extends APIResource {
|
|
|
5924
6120
|
* Each entitlement carries `valid_on` and `valid_at` when something
|
|
5925
6121
|
* restricts it by date or by target; both list only what it matched, never
|
|
5926
6122
|
* what it failed.
|
|
6123
|
+
*
|
|
6124
|
+
* `page_size` / `page_token` window the already-filtered result, so they
|
|
6125
|
+
* compose with `type` and `targets` rather than replacing them. A page token
|
|
6126
|
+
* is bound to the filters it was issued under: change `type` or `targets`
|
|
6127
|
+
* and the token is refused rather than returning misaligned rows.
|
|
5927
6128
|
*/
|
|
5928
|
-
listEntitlements(id: string, params?: {
|
|
6129
|
+
listEntitlements(id: string, params?: PageParams & {
|
|
5929
6130
|
type?: EntitlementType;
|
|
5930
6131
|
targets?: string[];
|
|
5931
|
-
}, options?: RequestOptions): Promise<MemberEntitlement
|
|
6132
|
+
}, options?: RequestOptions): Promise<Page<MemberEntitlement>>;
|
|
5932
6133
|
/**
|
|
5933
6134
|
* Updates a member's details. Accepts `name`, `date_of_birth` and `role`
|
|
5934
6135
|
* (a member-role code). To reassign the primary member use `setPrimary`;
|
|
@@ -5974,7 +6175,12 @@ declare class MembershipsResource extends APIResource {
|
|
|
5974
6175
|
* transaction once and does not advance dunning twice.
|
|
5975
6176
|
*/
|
|
5976
6177
|
createTransaction(id: string, params: CreateTransactionParams, options?: IdempotentRequestOptions): Promise<Transaction>;
|
|
5977
|
-
|
|
6178
|
+
/**
|
|
6179
|
+
* The cardholders on a membership, primary first, then in the order they
|
|
6180
|
+
* were added. Bounded by the plan's `max_party_size`, so the default page
|
|
6181
|
+
* size covers a membership in one request.
|
|
6182
|
+
*/
|
|
6183
|
+
listMembers(id: string, params?: PageParams, options?: RequestOptions): Promise<Page<Member>>;
|
|
5978
6184
|
/**
|
|
5979
6185
|
* Add a member to an existing membership, up to the plan's max party size.
|
|
5980
6186
|
* `role` is a member-role code; an optional `email` links the member to a
|
|
@@ -5995,8 +6201,12 @@ declare class MembershipsResource extends APIResource {
|
|
|
5995
6201
|
upgrade(id: string, params: PlanChangeParams, options?: RequestOptions): Promise<PlanChangeResult>;
|
|
5996
6202
|
/** Mirror of upgrade towards a linked lower plan. */
|
|
5997
6203
|
downgrade(id: string, params: PlanChangeParams, options?: RequestOptions): Promise<PlanChangeResult>;
|
|
6204
|
+
/**
|
|
6205
|
+
* Lists scheduled changes. `status` accepts one status, several, or `all`;
|
|
6206
|
+
* omit it to return every status.
|
|
6207
|
+
*/
|
|
5998
6208
|
listScheduledChanges(id: string, params?: PageParams & {
|
|
5999
|
-
status?: 'all'
|
|
6209
|
+
status?: 'all' | ScheduledChangeStatus | Array<'all' | ScheduledChangeStatus>;
|
|
6000
6210
|
}, options?: RequestOptions): Promise<Page<ScheduledChange>>;
|
|
6001
6211
|
cancelScheduledChange(id: string, changeId: string, options?: RequestOptions): Promise<void>;
|
|
6002
6212
|
listTermTransactions(id: string, termId: string, params?: PageParams, options?: RequestOptions): Promise<Page<Transaction>>;
|
|
@@ -6043,24 +6253,24 @@ declare class PlanPricingGroupMappingsResource extends APIResource {
|
|
|
6043
6253
|
//#endregion
|
|
6044
6254
|
//#region src/resources/plans.d.ts
|
|
6045
6255
|
declare class PlansResource extends APIResource {
|
|
6046
|
-
list(options?: RequestOptions): Promise<Plan
|
|
6256
|
+
list(params?: PageParams, options?: RequestOptions): Promise<Page<Plan>>;
|
|
6047
6257
|
get(id: string, options?: RequestOptions): Promise<Plan>;
|
|
6048
|
-
listBillingOptions(id: string, options?: RequestOptions): Promise<BillingOption
|
|
6049
|
-
listEntitlements(id: string, options?: RequestOptions): Promise<PlanEntitlement
|
|
6258
|
+
listBillingOptions(id: string, params?: PageParams, options?: RequestOptions): Promise<Page<BillingOption>>;
|
|
6259
|
+
listEntitlements(id: string, params?: PageParams, options?: RequestOptions): Promise<Page<PlanEntitlement>>;
|
|
6050
6260
|
create(params: CreatePlanParams, options?: RequestOptions): Promise<Plan>;
|
|
6051
6261
|
update(id: string, params: UpdatePlanParams, options?: RequestOptions): Promise<Plan>;
|
|
6052
6262
|
delete(id: string, options?: RequestOptions): Promise<void>;
|
|
6053
6263
|
createBillingOption(id: string, params: CreateBillingOptionParams, options?: RequestOptions): Promise<BillingOption>;
|
|
6054
|
-
listPlanLinks(id: string, options?: RequestOptions): Promise<PlanLinkView
|
|
6264
|
+
listPlanLinks(id: string, params?: PageParams, options?: RequestOptions): Promise<Page<PlanLinkView>>;
|
|
6055
6265
|
createPlanLink(id: string, params: CreatePlanLinkParams, options?: RequestOptions): Promise<PlanLink>;
|
|
6056
6266
|
createEntitlement(id: string, params: CreatePlanEntitlementParams, options?: RequestOptions): Promise<PlanEntitlement>;
|
|
6057
|
-
listPricingGroupMappings(id: string, options?: RequestOptions): Promise<PlanPricingGroupMapping
|
|
6267
|
+
listPricingGroupMappings(id: string, params?: PageParams, options?: RequestOptions): Promise<Page<PlanPricingGroupMapping>>;
|
|
6058
6268
|
createPricingGroupMapping(id: string, params: CreatePlanPricingGroupMappingParams, options?: RequestOptions): Promise<PlanPricingGroupMapping>;
|
|
6059
6269
|
}
|
|
6060
6270
|
//#endregion
|
|
6061
6271
|
//#region src/resources/pricing-groups.d.ts
|
|
6062
6272
|
declare class PricingGroupsResource extends APIResource {
|
|
6063
|
-
list(options?: RequestOptions): Promise<PricingGroup
|
|
6273
|
+
list(params?: PageParams, options?: RequestOptions): Promise<Page<PricingGroup>>;
|
|
6064
6274
|
get(id: string, options?: RequestOptions): Promise<PricingGroup>;
|
|
6065
6275
|
create(params: CreatePricingGroupParams, options?: RequestOptions): Promise<PricingGroup>;
|
|
6066
6276
|
update(id: string, params: UpdatePricingGroupParams, options?: RequestOptions): Promise<PricingGroup>;
|
|
@@ -6069,7 +6279,7 @@ declare class PricingGroupsResource extends APIResource {
|
|
|
6069
6279
|
//#endregion
|
|
6070
6280
|
//#region src/resources/sales-channels.d.ts
|
|
6071
6281
|
declare class SalesChannelsResource extends APIResource {
|
|
6072
|
-
list(options?: RequestOptions): Promise<SalesChannel
|
|
6282
|
+
list(params?: PageParams, options?: RequestOptions): Promise<Page<SalesChannel>>;
|
|
6073
6283
|
get(id: string, options?: RequestOptions): Promise<SalesChannel>;
|
|
6074
6284
|
create(params: CreateSalesChannelParams, options?: RequestOptions): Promise<SalesChannel>;
|
|
6075
6285
|
update(id: string, params: UpdateSalesChannelParams, options?: RequestOptions): Promise<SalesChannel>;
|
|
@@ -6114,7 +6324,7 @@ declare class TargetCodesResource extends APIResource {
|
|
|
6114
6324
|
//#endregion
|
|
6115
6325
|
//#region src/resources/webhook-subscriptions.d.ts
|
|
6116
6326
|
declare class WebhookSubscriptionsResource extends APIResource {
|
|
6117
|
-
list(options?: RequestOptions): Promise<WebhookSubscription
|
|
6327
|
+
list(params?: PageParams, options?: RequestOptions): Promise<Page<WebhookSubscription>>;
|
|
6118
6328
|
get(id: string, options?: RequestOptions): Promise<WebhookSubscription>;
|
|
6119
6329
|
listDeliveries(id: string, params?: PageParams, options?: RequestOptions): Promise<Page<WebhookDelivery>>;
|
|
6120
6330
|
/** The HMAC signing secret is only returned on creation — store it then. */
|
|
@@ -6274,4 +6484,4 @@ declare function paginate<T>(fetchPage: (params: PageParams) => Promise<Page<T>>
|
|
|
6274
6484
|
*/
|
|
6275
6485
|
declare function collect<T>(fetchPage: (params: PageParams) => Promise<Page<T>>, params?: PageParams): Promise<T[]>;
|
|
6276
6486
|
//#endregion
|
|
6277
|
-
export { AddMemberParams, AdmitResult, AlreadyExistsError, BillingOption, BillingOptionSalesChannel, Calendar, CalendarRule, CalendarView, CancelMembershipParams, CreateBillingOptionParams, CreateBillingOptionSalesChannelParams, CreateCalendarParams, CreateCalendarRuleParams, CreateCustomerParams, CreateEntitlementParams, CreateMemberRoleParams, CreateMembershipParams, CreatePlanEntitlementAvailabilityParams, CreatePlanEntitlementParams, CreatePlanLinkParams, CreatePlanParams, CreatePlanPricingGroupMappingParams, CreatePricingGroupParams, CreateSalesChannelParams, CreateTargetCodeParams, CreateTransactionParams, CreateWebhookSubscriptionParams, Customer, CustomerMembershipSummary, CustomerView, DEFAULT_BASE_URL, Entitlement, EntitlementType, EntitlementUsage, type IdempotentRequestOptions, InternalError, InvalidArgumentError, Member, MemberEntitlement, MemberRole, MemberSyncResponse, Membership, MembershipTerm, NotFoundError, Ophelio, OphelioConnectionError, OphelioError, type OphelioOptions, OphelioTimeoutError, type OphelioWebhookEvent, Page, PageParams, PermissionDeniedError, Plan, PlanChangeParams, PlanChangeResult, PlanEntitlement, PlanEntitlementAvailability, PlanLink, PlanLinkView, PlanPricingGroupMapping, PricingGroup, RecordUsageParams, RedeemEntitlementParams, RedeemEntitlementResponse, ReissueCardParams, RenewMembershipParams, type RequestOptions, ResourceExhaustedError, SalesChannel, ScheduledChange, SyncMember, TargetCode, TargetCodeView, Transaction, UnauthenticatedError, UnavailableError, UnimplementedError, UpdateBillingOptionParams, UpdateCalendarParams, UpdateCalendarRuleParams, UpdateCustomerParams, UpdateEntitlementParams, UpdateMemberParams, UpdateMemberRoleParams, UpdateMembershipParams, UpdatePlanEntitlementAvailabilityParams, UpdatePlanEntitlementParams, UpdatePlanParams, UpdatePricingGroupParams, UpdateSalesChannelParams, UpdateTargetCodeParams, UpdateWebhookSubscriptionParams, WEBHOOK_EVENT_CODES, WebhookDelivery, type WebhookEventCode, WebhookSignatureVerificationError, WebhookSubscription, collect, type components, constructEvent, type operations, paginate, type paths, verifyWebhookSignature };
|
|
6487
|
+
export { AddMemberParams, AdmitResult, AlreadyExistsError, BillingOption, BillingOptionSalesChannel, Calendar, CalendarRule, CalendarView, CancelMembershipParams, CreateBillingOptionParams, CreateBillingOptionSalesChannelParams, CreateCalendarParams, CreateCalendarRuleParams, CreateCustomerParams, CreateEntitlementParams, CreateMemberRoleParams, CreateMembershipParams, CreatePlanEntitlementAvailabilityParams, CreatePlanEntitlementParams, CreatePlanLinkParams, CreatePlanParams, CreatePlanPricingGroupMappingParams, CreatePricingGroupParams, CreateSalesChannelParams, CreateTargetCodeParams, CreateTransactionParams, CreateWebhookSubscriptionParams, Customer, CustomerMembershipSummary, CustomerView, DEFAULT_BASE_URL, Entitlement, EntitlementType, EntitlementUsage, type IdempotentRequestOptions, InternalError, InvalidArgumentError, Member, MemberEntitlement, MemberRole, MemberSyncResponse, Membership, MembershipTerm, NotFoundError, Ophelio, OphelioConnectionError, OphelioError, type OphelioOptions, OphelioTimeoutError, type OphelioWebhookEvent, Page, PageParams, PermissionDeniedError, Plan, PlanChangeParams, PlanChangeResult, PlanEntitlement, PlanEntitlementAvailability, PlanLink, PlanLinkView, PlanPricingGroupMapping, PricingGroup, RecordUsageParams, RedeemEntitlementParams, RedeemEntitlementResponse, ReissueCardParams, RenewMembershipParams, type RequestOptions, ResourceExhaustedError, SalesChannel, ScheduledChange, ScheduledChangeStatus, SyncMember, TargetCode, TargetCodeView, Transaction, UnauthenticatedError, UnavailableError, UnimplementedError, UpdateBillingOptionParams, UpdateCalendarParams, UpdateCalendarRuleParams, UpdateCustomerParams, UpdateEntitlementParams, UpdateMemberParams, UpdateMemberRoleParams, UpdateMembershipParams, UpdatePlanEntitlementAvailabilityParams, UpdatePlanEntitlementParams, UpdatePlanParams, UpdatePricingGroupParams, UpdateSalesChannelParams, UpdateTargetCodeParams, UpdateWebhookSubscriptionParams, WEBHOOK_EVENT_CODES, WebhookDelivery, type WebhookEventCode, WebhookSignatureVerificationError, WebhookSubscription, collect, type components, constructEvent, type operations, paginate, type paths, verifyWebhookSignature };
|