@stigg/typescript 0.1.0-beta.20 → 0.1.0-beta.22
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 +16 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/v1/addons/addons.d.mts +145 -94
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +145 -94
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +110 -76
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +110 -76
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts +62 -36
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts +62 -36
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/entitlements.js +49 -39
- package/resources/v1/addons/entitlements.js.map +1 -1
- package/resources/v1/addons/entitlements.mjs +49 -39
- package/resources/v1/addons/entitlements.mjs.map +1 -1
- package/resources/v1/addons/index.d.mts +2 -2
- package/resources/v1/addons/index.d.mts.map +1 -1
- package/resources/v1/addons/index.d.ts +2 -2
- package/resources/v1/addons/index.d.ts.map +1 -1
- package/resources/v1/addons/index.js.map +1 -1
- package/resources/v1/addons/index.mjs.map +1 -1
- package/resources/v1/coupons.d.mts +81 -57
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +81 -57
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +60 -45
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +60 -45
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/credits/credits.d.mts +60 -52
- package/resources/v1/credits/credits.d.mts.map +1 -1
- package/resources/v1/credits/credits.d.ts +60 -52
- package/resources/v1/credits/credits.d.ts.map +1 -1
- package/resources/v1/credits/credits.js +36 -30
- package/resources/v1/credits/credits.js.map +1 -1
- package/resources/v1/credits/credits.mjs +36 -30
- package/resources/v1/credits/credits.mjs.map +1 -1
- package/resources/v1/credits/custom-currencies.d.mts +98 -74
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
- package/resources/v1/credits/custom-currencies.d.ts +98 -74
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
- package/resources/v1/credits/custom-currencies.js +76 -61
- package/resources/v1/credits/custom-currencies.js.map +1 -1
- package/resources/v1/credits/custom-currencies.mjs +76 -61
- package/resources/v1/credits/custom-currencies.mjs.map +1 -1
- package/resources/v1/credits/grants.d.mts +63 -54
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +63 -54
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/credits/grants.js +35 -33
- package/resources/v1/credits/grants.js.map +1 -1
- package/resources/v1/credits/grants.mjs +35 -33
- package/resources/v1/credits/grants.mjs.map +1 -1
- package/resources/v1/credits/index.d.mts +2 -2
- package/resources/v1/credits/index.d.mts.map +1 -1
- package/resources/v1/credits/index.d.ts +2 -2
- package/resources/v1/credits/index.d.ts.map +1 -1
- package/resources/v1/credits/index.js.map +1 -1
- package/resources/v1/credits/index.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +167 -127
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +167 -127
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +124 -96
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +124 -96
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +2 -2
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +2 -2
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +66 -58
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +66 -58
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/integrations.js +57 -56
- package/resources/v1/customers/integrations.js.map +1 -1
- package/resources/v1/customers/integrations.mjs +57 -56
- package/resources/v1/customers/integrations.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +33 -25
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +33 -25
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +26 -20
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +26 -20
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +42 -60
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +42 -60
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.js +38 -57
- package/resources/v1/customers/promotional-entitlements.js.map +1 -1
- package/resources/v1/customers/promotional-entitlements.mjs +38 -57
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
- package/resources/v1/events/data-export/data-export.d.mts +29 -21
- package/resources/v1/events/data-export/data-export.d.mts.map +1 -1
- package/resources/v1/events/data-export/data-export.d.ts +29 -21
- package/resources/v1/events/data-export/data-export.d.ts.map +1 -1
- package/resources/v1/events/data-export/data-export.js +27 -18
- package/resources/v1/events/data-export/data-export.js.map +1 -1
- package/resources/v1/events/data-export/data-export.mjs +27 -18
- package/resources/v1/events/data-export/data-export.mjs.map +1 -1
- package/resources/v1/events/data-export/destinations.d.mts +29 -22
- package/resources/v1/events/data-export/destinations.d.mts.map +1 -1
- package/resources/v1/events/data-export/destinations.d.ts +29 -22
- package/resources/v1/events/data-export/destinations.d.ts.map +1 -1
- package/resources/v1/events/data-export/destinations.js +26 -21
- package/resources/v1/events/data-export/destinations.js.map +1 -1
- package/resources/v1/events/data-export/destinations.mjs +26 -21
- package/resources/v1/events/data-export/destinations.mjs.map +1 -1
- package/resources/v1/events/data-export/index.d.mts +1 -1
- package/resources/v1/events/data-export/index.d.mts.map +1 -1
- package/resources/v1/events/data-export/index.d.ts +1 -1
- package/resources/v1/events/data-export/index.d.ts.map +1 -1
- package/resources/v1/events/data-export/index.js.map +1 -1
- package/resources/v1/events/data-export/index.mjs.map +1 -1
- package/resources/v1/events/events.d.mts +13 -19
- package/resources/v1/events/events.d.mts.map +1 -1
- package/resources/v1/events/events.d.ts +13 -19
- package/resources/v1/events/events.d.ts.map +1 -1
- package/resources/v1/events/events.js +14 -19
- package/resources/v1/events/events.js.map +1 -1
- package/resources/v1/events/events.mjs +14 -19
- package/resources/v1/events/events.mjs.map +1 -1
- package/resources/v1/events/index.d.mts +0 -1
- package/resources/v1/events/index.d.mts.map +1 -1
- package/resources/v1/events/index.d.ts +0 -1
- package/resources/v1/events/index.d.ts.map +1 -1
- package/resources/v1/events/index.js +3 -5
- package/resources/v1/events/index.js.map +1 -1
- package/resources/v1/events/index.mjs +0 -1
- package/resources/v1/events/index.mjs.map +1 -1
- package/resources/v1/features.d.mts +109 -74
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +109 -74
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/features.js +72 -54
- package/resources/v1/features.js.map +1 -1
- package/resources/v1/features.mjs +72 -54
- package/resources/v1/features.mjs.map +1 -1
- package/resources/v1/index.d.mts +7 -7
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +7 -7
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +62 -36
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts +62 -36
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/entitlements.js +49 -39
- package/resources/v1/plans/entitlements.js.map +1 -1
- package/resources/v1/plans/entitlements.mjs +49 -39
- package/resources/v1/plans/entitlements.mjs.map +1 -1
- package/resources/v1/plans/index.d.mts +2 -2
- package/resources/v1/plans/index.d.mts.map +1 -1
- package/resources/v1/plans/index.d.ts +2 -2
- package/resources/v1/plans/index.d.ts.map +1 -1
- package/resources/v1/plans/index.js.map +1 -1
- package/resources/v1/plans/index.mjs.map +1 -1
- package/resources/v1/plans/plans.d.mts +159 -106
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +159 -106
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +127 -89
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +127 -89
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +97 -66
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +97 -66
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.js +73 -54
- package/resources/v1/products.js.map +1 -1
- package/resources/v1/products.mjs +73 -54
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +29 -19
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +29 -19
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +25 -20
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +25 -20
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/index.d.mts +4 -4
- package/resources/v1/subscriptions/index.d.mts.map +1 -1
- package/resources/v1/subscriptions/index.d.ts +4 -4
- package/resources/v1/subscriptions/index.d.ts.map +1 -1
- package/resources/v1/subscriptions/index.js.map +1 -1
- package/resources/v1/subscriptions/index.mjs +1 -1
- package/resources/v1/subscriptions/index.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts +15 -8
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts +15 -8
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.js +13 -8
- package/resources/v1/subscriptions/invoice.js.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs +13 -8
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +244 -161
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +244 -161
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +126 -100
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +128 -102
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +29 -17
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts +29 -17
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- package/resources/v1/subscriptions/usage.js +26 -17
- package/resources/v1/subscriptions/usage.js.map +1 -1
- package/resources/v1/subscriptions/usage.mjs +26 -17
- package/resources/v1/subscriptions/usage.mjs.map +1 -1
- package/resources/v1/usage.d.mts +24 -26
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +24 -26
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +26 -28
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +26 -28
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +14 -14
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +14 -14
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1-beta/customers/assignments.d.mts +242 -0
- package/resources/v1-beta/customers/assignments.d.mts.map +1 -0
- package/resources/v1-beta/customers/assignments.d.ts +242 -0
- package/resources/v1-beta/customers/assignments.d.ts.map +1 -0
- package/resources/v1-beta/customers/assignments.js +84 -0
- package/resources/v1-beta/customers/assignments.js.map +1 -0
- package/resources/v1-beta/customers/assignments.mjs +80 -0
- package/resources/v1-beta/customers/assignments.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/customers.d.mts +1 -1
- package/resources/v1-beta/customers/customers.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/customers.d.ts +1 -1
- package/resources/v1-beta/customers/customers.d.ts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/customers.js +2 -2
- package/resources/v1-beta/customers/customers.js.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/customers.mjs +1 -1
- package/resources/v1-beta/customers/customers.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entities.d.mts +94 -47
- package/resources/v1-beta/customers/entities.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entities.d.ts +94 -47
- package/resources/v1-beta/customers/entities.d.ts.map +1 -0
- package/resources/v1-beta/customers/entities.js +150 -0
- package/resources/v1-beta/customers/entities.js.map +1 -0
- package/resources/v1-beta/customers/entities.mjs +146 -0
- package/resources/v1-beta/customers/entities.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entitlements.d.mts +27 -16
- package/resources/v1-beta/customers/entitlements.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entitlements.d.ts +27 -16
- package/resources/v1-beta/customers/entitlements.d.ts.map +1 -0
- package/resources/v1-beta/customers/entitlements.js +36 -0
- package/resources/v1-beta/customers/entitlements.js.map +1 -0
- package/resources/v1-beta/customers/entitlements.mjs +32 -0
- package/resources/v1-beta/customers/entitlements.mjs.map +1 -0
- package/resources/v1-beta/customers/index.d.mts.map +1 -0
- package/resources/v1-beta/customers/index.d.ts.map +1 -0
- package/resources/v1-beta/customers/index.js.map +1 -0
- package/resources/v1-beta/customers/index.mjs.map +1 -0
- package/resources/v1-beta/customers.d.mts.map +1 -0
- package/resources/v1-beta/customers.d.ts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers.js +1 -1
- package/resources/v1-beta/customers.js.map +1 -0
- package/resources/v1-beta/customers.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/entity-types.d.mts +44 -23
- package/resources/v1-beta/entity-types.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/entity-types.d.ts +44 -23
- package/resources/v1-beta/entity-types.d.ts.map +1 -0
- package/resources/v1-beta/entity-types.js +75 -0
- package/resources/v1-beta/entity-types.js.map +1 -0
- package/resources/v1-beta/entity-types.mjs +71 -0
- package/resources/v1-beta/entity-types.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/index.d.mts +1 -1
- package/resources/v1-beta/index.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/index.d.ts +1 -1
- package/resources/v1-beta/index.d.ts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/index.js +3 -3
- package/resources/v1-beta/index.js.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/index.mjs +1 -1
- package/resources/v1-beta/index.mjs.map +1 -0
- package/resources/{v1/events/beta/beta.d.mts → v1-beta/v1-beta.d.mts} +4 -4
- package/resources/v1-beta/v1-beta.d.mts.map +1 -0
- package/resources/{v1/events/beta/beta.d.ts → v1-beta/v1-beta.d.ts} +4 -4
- package/resources/v1-beta/v1-beta.d.ts.map +1 -0
- package/resources/{v1/events/beta/beta.js → v1-beta/v1-beta.js} +8 -8
- package/resources/v1-beta/v1-beta.js.map +1 -0
- package/resources/{v1/events/beta/beta.mjs → v1-beta/v1-beta.mjs} +5 -5
- package/resources/v1-beta/v1-beta.mjs.map +1 -0
- package/resources/v1-beta.d.mts +2 -0
- package/resources/v1-beta.d.mts.map +1 -0
- package/resources/v1-beta.d.ts +2 -0
- package/resources/v1-beta.d.ts.map +1 -0
- package/resources/{v1/events/beta.js → v1-beta.js} +3 -3
- package/resources/v1-beta.js.map +1 -0
- package/resources/{v1/events/beta.mjs → v1-beta.mjs} +2 -2
- package/resources/v1-beta.mjs.map +1 -0
- package/src/client.ts +5 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/v1/addons/addons.ts +293 -105
- package/src/resources/v1/addons/entitlements.ts +123 -41
- package/src/resources/v1/addons/index.ts +5 -0
- package/src/resources/v1/coupons.ts +158 -63
- package/src/resources/v1/credits/credits.ts +103 -50
- package/src/resources/v1/credits/custom-currencies.ts +191 -82
- package/src/resources/v1/credits/grants.ts +104 -54
- package/src/resources/v1/credits/index.ts +4 -0
- package/src/resources/v1/customers/customers.ts +324 -140
- package/src/resources/v1/customers/index.ts +8 -1
- package/src/resources/v1/customers/integrations.ts +129 -63
- package/src/resources/v1/customers/payment-method.ts +66 -25
- package/src/resources/v1/customers/promotional-entitlements.ts +82 -62
- package/src/resources/v1/events/data-export/data-export.ts +58 -21
- package/src/resources/v1/events/data-export/destinations.ts +61 -23
- package/src/resources/v1/events/data-export/index.ts +1 -0
- package/src/resources/v1/events/events.ts +28 -22
- package/src/resources/v1/events/index.ts +0 -1
- package/src/resources/v1/features.ts +209 -82
- package/src/resources/v1/index.ts +19 -0
- package/src/resources/v1/plans/entitlements.ts +123 -41
- package/src/resources/v1/plans/index.ts +5 -0
- package/src/resources/v1/plans/plans.ts +321 -119
- package/src/resources/v1/products.ts +193 -74
- package/src/resources/v1/subscriptions/future-update.ts +68 -21
- package/src/resources/v1/subscriptions/index.ts +9 -2
- package/src/resources/v1/subscriptions/invoice.ts +36 -9
- package/src/resources/v1/subscriptions/subscriptions.ts +417 -173
- package/src/resources/v1/subscriptions/usage.ts +61 -18
- package/src/resources/v1/usage.ts +53 -29
- package/src/resources/v1/v1.ts +38 -0
- package/src/resources/v1-beta/customers/assignments.ts +328 -0
- package/src/resources/{v1/events/beta → v1-beta}/customers/customers.ts +1 -1
- package/src/resources/{v1/events/beta → v1-beta}/customers/entities.ts +165 -54
- package/src/resources/{v1/events/beta → v1-beta}/customers/entitlements.ts +43 -18
- package/src/resources/{v1/events/beta → v1-beta}/entity-types.ts +70 -25
- package/src/resources/{v1/events/beta → v1-beta}/index.ts +1 -1
- package/src/resources/{v1/events/beta/beta.ts → v1-beta/v1-beta.ts} +5 -5
- package/src/resources/{v1/events/beta.ts → v1-beta.ts} +1 -1
- 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
- package/resources/v1/events/beta/beta.d.mts.map +0 -1
- package/resources/v1/events/beta/beta.d.ts.map +0 -1
- package/resources/v1/events/beta/beta.js.map +0 -1
- package/resources/v1/events/beta/beta.mjs.map +0 -1
- package/resources/v1/events/beta/customers/assignments.d.mts +0 -178
- package/resources/v1/events/beta/customers/assignments.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/assignments.d.ts +0 -178
- package/resources/v1/events/beta/customers/assignments.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/assignments.js +0 -62
- package/resources/v1/events/beta/customers/assignments.js.map +0 -1
- package/resources/v1/events/beta/customers/assignments.mjs +0 -58
- package/resources/v1/events/beta/customers/assignments.mjs.map +0 -1
- package/resources/v1/events/beta/customers/customers.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/customers.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/customers.js.map +0 -1
- package/resources/v1/events/beta/customers/customers.mjs.map +0 -1
- package/resources/v1/events/beta/customers/entities.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/entities.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/entities.js +0 -105
- package/resources/v1/events/beta/customers/entities.js.map +0 -1
- package/resources/v1/events/beta/customers/entities.mjs +0 -101
- package/resources/v1/events/beta/customers/entities.mjs.map +0 -1
- package/resources/v1/events/beta/customers/entitlements.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/entitlements.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/entitlements.js +0 -26
- package/resources/v1/events/beta/customers/entitlements.js.map +0 -1
- package/resources/v1/events/beta/customers/entitlements.mjs +0 -22
- package/resources/v1/events/beta/customers/entitlements.mjs.map +0 -1
- package/resources/v1/events/beta/customers/index.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/index.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/index.js.map +0 -1
- package/resources/v1/events/beta/customers/index.mjs.map +0 -1
- package/resources/v1/events/beta/customers.d.mts.map +0 -1
- package/resources/v1/events/beta/customers.d.ts.map +0 -1
- package/resources/v1/events/beta/customers.js.map +0 -1
- package/resources/v1/events/beta/customers.mjs.map +0 -1
- package/resources/v1/events/beta/entity-types.d.mts.map +0 -1
- package/resources/v1/events/beta/entity-types.d.ts.map +0 -1
- package/resources/v1/events/beta/entity-types.js +0 -56
- package/resources/v1/events/beta/entity-types.js.map +0 -1
- package/resources/v1/events/beta/entity-types.mjs +0 -52
- package/resources/v1/events/beta/entity-types.mjs.map +0 -1
- package/resources/v1/events/beta/index.d.mts.map +0 -1
- package/resources/v1/events/beta/index.d.ts.map +0 -1
- package/resources/v1/events/beta/index.js.map +0 -1
- package/resources/v1/events/beta/index.mjs.map +0 -1
- package/resources/v1/events/beta.d.mts +0 -2
- package/resources/v1/events/beta.d.mts.map +0 -1
- package/resources/v1/events/beta.d.ts +0 -2
- package/resources/v1/events/beta.d.ts.map +0 -1
- package/resources/v1/events/beta.js.map +0 -1
- package/resources/v1/events/beta.mjs.map +0 -1
- package/src/resources/v1/events/beta/customers/assignments.ts +0 -228
- /package/resources/{v1/events/beta → v1-beta}/customers/index.d.mts +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers/index.d.ts +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers/index.js +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers/index.mjs +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers.d.mts +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers.d.ts +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers.mjs +0 -0
- /package/src/resources/{v1/events/beta → v1-beta}/customers/index.ts +0 -0
- /package/src/resources/{v1/events/beta → v1-beta}/customers.ts +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
|
5
5
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
7
8
|
import { path } from '../../internal/utils/path';
|
|
8
9
|
|
|
@@ -13,98 +14,128 @@ export class Products extends APIResource {
|
|
|
13
14
|
/**
|
|
14
15
|
* Archives a product, preventing new subscriptions. All plans and addons are
|
|
15
16
|
* archived.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
*/
|
|
18
|
+
archiveProduct(
|
|
19
|
+
id: string,
|
|
20
|
+
params: ProductArchiveProductParams | null | undefined = {},
|
|
21
|
+
options?: RequestOptions,
|
|
22
|
+
): APIPromise<Product> {
|
|
23
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
24
|
+
return this._client.post(path`/api/v1/products/${id}/archive`, {
|
|
25
|
+
...options,
|
|
26
|
+
headers: buildHeaders([
|
|
27
|
+
{
|
|
28
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
29
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
30
|
+
},
|
|
31
|
+
options?.headers,
|
|
32
|
+
]),
|
|
33
|
+
});
|
|
26
34
|
}
|
|
27
35
|
|
|
28
36
|
/**
|
|
29
37
|
* Creates a new product.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
*/
|
|
39
|
+
createProduct(params: ProductCreateProductParams, options?: RequestOptions): APIPromise<Product> {
|
|
40
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
41
|
+
return this._client.post('/api/v1/products', {
|
|
42
|
+
body,
|
|
43
|
+
...options,
|
|
44
|
+
headers: buildHeaders([
|
|
45
|
+
{
|
|
46
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
47
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
48
|
+
},
|
|
49
|
+
options?.headers,
|
|
50
|
+
]),
|
|
51
|
+
});
|
|
41
52
|
}
|
|
42
53
|
|
|
43
54
|
/**
|
|
44
55
|
* Duplicates an existing product, including its plans, addons, and configuration.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```ts
|
|
48
|
-
* const product = await client.v1.products.duplicateProduct(
|
|
49
|
-
* 'x',
|
|
50
|
-
* { targetId: 'targetId' },
|
|
51
|
-
* );
|
|
52
|
-
* ```
|
|
53
56
|
*/
|
|
54
57
|
duplicateProduct(
|
|
55
58
|
id: string,
|
|
56
|
-
|
|
59
|
+
params: ProductDuplicateProductParams,
|
|
57
60
|
options?: RequestOptions,
|
|
58
61
|
): APIPromise<Product> {
|
|
59
|
-
|
|
62
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
63
|
+
return this._client.post(path`/api/v1/products/${id}/duplicate`, {
|
|
64
|
+
body,
|
|
65
|
+
...options,
|
|
66
|
+
headers: buildHeaders([
|
|
67
|
+
{
|
|
68
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
69
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
70
|
+
},
|
|
71
|
+
options?.headers,
|
|
72
|
+
]),
|
|
73
|
+
});
|
|
60
74
|
}
|
|
61
75
|
|
|
62
76
|
/**
|
|
63
77
|
* Retrieves a paginated list of products in the environment.
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* ```ts
|
|
67
|
-
* // Automatically fetches more pages as needed.
|
|
68
|
-
* for await (const productListProductsResponse of client.v1.products.listProducts()) {
|
|
69
|
-
* // ...
|
|
70
|
-
* }
|
|
71
|
-
* ```
|
|
72
78
|
*/
|
|
73
79
|
listProducts(
|
|
74
|
-
|
|
80
|
+
params: ProductListProductsParams | null | undefined = {},
|
|
75
81
|
options?: RequestOptions,
|
|
76
82
|
): PagePromise<ProductListProductsResponsesMyCursorIDPage, ProductListProductsResponse> {
|
|
83
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
77
84
|
return this._client.getAPIList('/api/v1/products', MyCursorIDPage<ProductListProductsResponse>, {
|
|
78
85
|
query,
|
|
79
86
|
...options,
|
|
87
|
+
headers: buildHeaders([
|
|
88
|
+
{
|
|
89
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
90
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
91
|
+
},
|
|
92
|
+
options?.headers,
|
|
93
|
+
]),
|
|
80
94
|
});
|
|
81
95
|
}
|
|
82
96
|
|
|
83
97
|
/**
|
|
84
98
|
* Restores an archived product, allowing new subscriptions to be created.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
99
|
+
*/
|
|
100
|
+
unarchiveProduct(
|
|
101
|
+
id: string,
|
|
102
|
+
params: ProductUnarchiveProductParams | null | undefined = {},
|
|
103
|
+
options?: RequestOptions,
|
|
104
|
+
): APIPromise<Product> {
|
|
105
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
106
|
+
return this._client.post(path`/api/v1/products/${id}/unarchive`, {
|
|
107
|
+
...options,
|
|
108
|
+
headers: buildHeaders([
|
|
109
|
+
{
|
|
110
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
111
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
112
|
+
},
|
|
113
|
+
options?.headers,
|
|
114
|
+
]),
|
|
115
|
+
});
|
|
95
116
|
}
|
|
96
117
|
|
|
97
118
|
/**
|
|
98
119
|
* Updates an existing product's properties such as display name, description, and
|
|
99
120
|
* metadata.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return this._client.patch(path`/api/v1/products/${id}`, {
|
|
121
|
+
*/
|
|
122
|
+
updateProduct(
|
|
123
|
+
id: string,
|
|
124
|
+
params: ProductUpdateProductParams,
|
|
125
|
+
options?: RequestOptions,
|
|
126
|
+
): APIPromise<Product> {
|
|
127
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
128
|
+
return this._client.patch(path`/api/v1/products/${id}`, {
|
|
129
|
+
body,
|
|
130
|
+
...options,
|
|
131
|
+
headers: buildHeaders([
|
|
132
|
+
{
|
|
133
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
134
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
135
|
+
},
|
|
136
|
+
options?.headers,
|
|
137
|
+
]),
|
|
138
|
+
});
|
|
108
139
|
}
|
|
109
140
|
}
|
|
110
141
|
|
|
@@ -298,65 +329,120 @@ export namespace ProductListProductsResponse {
|
|
|
298
329
|
}
|
|
299
330
|
}
|
|
300
331
|
|
|
332
|
+
export interface ProductArchiveProductParams {
|
|
333
|
+
/**
|
|
334
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
335
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
336
|
+
*/
|
|
337
|
+
'X-ACCOUNT-ID'?: string;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
341
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
342
|
+
* key).
|
|
343
|
+
*/
|
|
344
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
345
|
+
}
|
|
346
|
+
|
|
301
347
|
export interface ProductCreateProductParams {
|
|
302
348
|
/**
|
|
303
|
-
* The unique identifier for the entity
|
|
349
|
+
* Body param: The unique identifier for the entity
|
|
304
350
|
*/
|
|
305
351
|
id: string;
|
|
306
352
|
|
|
307
353
|
/**
|
|
308
|
-
* Display name of the product
|
|
354
|
+
* Body param: Display name of the product
|
|
309
355
|
*/
|
|
310
356
|
displayName: string;
|
|
311
357
|
|
|
312
358
|
/**
|
|
313
|
-
* Description of the product
|
|
359
|
+
* Body param: Description of the product
|
|
314
360
|
*/
|
|
315
361
|
description?: string | null;
|
|
316
362
|
|
|
317
363
|
/**
|
|
318
|
-
* Additional metadata for the product
|
|
364
|
+
* Body param: Additional metadata for the product
|
|
319
365
|
*/
|
|
320
366
|
metadata?: { [key: string]: string } | null;
|
|
321
367
|
|
|
322
368
|
/**
|
|
323
|
-
* Indicates if multiple subscriptions to this product are allowed
|
|
369
|
+
* Body param: Indicates if multiple subscriptions to this product are allowed
|
|
324
370
|
*/
|
|
325
371
|
multipleSubscriptions?: boolean;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
375
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
376
|
+
*/
|
|
377
|
+
'X-ACCOUNT-ID'?: string;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
381
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
382
|
+
* intrinsic to the key).
|
|
383
|
+
*/
|
|
384
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
326
385
|
}
|
|
327
386
|
|
|
328
387
|
export interface ProductDuplicateProductParams {
|
|
329
388
|
/**
|
|
330
|
-
* The unique identifier for the entity
|
|
389
|
+
* Body param: The unique identifier for the entity
|
|
331
390
|
*/
|
|
332
391
|
targetId: string;
|
|
333
392
|
|
|
334
393
|
/**
|
|
335
|
-
* Description of the product
|
|
394
|
+
* Body param: Description of the product
|
|
336
395
|
*/
|
|
337
396
|
description?: string | null;
|
|
338
397
|
|
|
339
398
|
/**
|
|
340
|
-
* Display name of the product
|
|
399
|
+
* Body param: Display name of the product
|
|
341
400
|
*/
|
|
342
401
|
displayName?: string;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
405
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
406
|
+
*/
|
|
407
|
+
'X-ACCOUNT-ID'?: string;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
411
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
412
|
+
* intrinsic to the key).
|
|
413
|
+
*/
|
|
414
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
343
415
|
}
|
|
344
416
|
|
|
345
417
|
export interface ProductListProductsParams extends MyCursorIDPageParams {
|
|
346
418
|
/**
|
|
347
|
-
* Filter by entity ID
|
|
419
|
+
* Query param: Filter by entity ID
|
|
348
420
|
*/
|
|
349
421
|
id?: string;
|
|
350
422
|
|
|
351
423
|
/**
|
|
352
|
-
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
424
|
+
* Query param: Filter by creation date using range operators: gt, gte, lt, lte
|
|
353
425
|
*/
|
|
354
426
|
createdAt?: ProductListProductsParams.CreatedAt;
|
|
355
427
|
|
|
356
428
|
/**
|
|
357
|
-
* Filter by product status. Supports comma-separated values for
|
|
429
|
+
* Query param: Filter by product status. Supports comma-separated values for
|
|
430
|
+
* multiple statuses
|
|
358
431
|
*/
|
|
359
432
|
status?: Array<'PUBLISHED' | 'ARCHIVED'>;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
436
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
437
|
+
*/
|
|
438
|
+
'X-ACCOUNT-ID'?: string;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
442
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
443
|
+
* intrinsic to the key).
|
|
444
|
+
*/
|
|
445
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
360
446
|
}
|
|
361
447
|
|
|
362
448
|
export namespace ProductListProductsParams {
|
|
@@ -386,33 +472,64 @@ export namespace ProductListProductsParams {
|
|
|
386
472
|
}
|
|
387
473
|
}
|
|
388
474
|
|
|
475
|
+
export interface ProductUnarchiveProductParams {
|
|
476
|
+
/**
|
|
477
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
478
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
479
|
+
*/
|
|
480
|
+
'X-ACCOUNT-ID'?: string;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
484
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
485
|
+
* key).
|
|
486
|
+
*/
|
|
487
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
488
|
+
}
|
|
489
|
+
|
|
389
490
|
export interface ProductUpdateProductParams {
|
|
390
491
|
/**
|
|
391
|
-
* Description of the product
|
|
492
|
+
* Body param: Description of the product
|
|
392
493
|
*/
|
|
393
494
|
description?: string | null;
|
|
394
495
|
|
|
395
496
|
/**
|
|
396
|
-
* Display name of the product
|
|
497
|
+
* Body param: Display name of the product
|
|
397
498
|
*/
|
|
398
499
|
displayName?: string;
|
|
399
500
|
|
|
400
501
|
/**
|
|
401
|
-
* Additional metadata for the product
|
|
502
|
+
* Body param: Additional metadata for the product
|
|
402
503
|
*/
|
|
403
504
|
metadata?: { [key: string]: string } | null;
|
|
404
505
|
|
|
405
506
|
/**
|
|
406
|
-
* Indicates if multiple subscriptions to this product are allowed
|
|
507
|
+
* Body param: Indicates if multiple subscriptions to this product are allowed
|
|
407
508
|
*/
|
|
408
509
|
multipleSubscriptions?: boolean;
|
|
409
510
|
|
|
511
|
+
/**
|
|
512
|
+
* Body param
|
|
513
|
+
*/
|
|
410
514
|
productSettings?: ProductUpdateProductParams.ProductSettings;
|
|
411
515
|
|
|
412
516
|
/**
|
|
413
|
-
* Rule defining when usage resets upon subscription update.
|
|
517
|
+
* Body param: Rule defining when usage resets upon subscription update.
|
|
414
518
|
*/
|
|
415
519
|
usageResetCutoffRule?: ProductUpdateProductParams.UsageResetCutoffRule;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
523
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
524
|
+
*/
|
|
525
|
+
'X-ACCOUNT-ID'?: string;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
529
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
530
|
+
* intrinsic to the key).
|
|
531
|
+
*/
|
|
532
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
416
533
|
}
|
|
417
534
|
|
|
418
535
|
export namespace ProductUpdateProductParams {
|
|
@@ -465,9 +582,11 @@ export declare namespace Products {
|
|
|
465
582
|
type Product as Product,
|
|
466
583
|
type ProductListProductsResponse as ProductListProductsResponse,
|
|
467
584
|
type ProductListProductsResponsesMyCursorIDPage as ProductListProductsResponsesMyCursorIDPage,
|
|
585
|
+
type ProductArchiveProductParams as ProductArchiveProductParams,
|
|
468
586
|
type ProductCreateProductParams as ProductCreateProductParams,
|
|
469
587
|
type ProductDuplicateProductParams as ProductDuplicateProductParams,
|
|
470
588
|
type ProductListProductsParams as ProductListProductsParams,
|
|
589
|
+
type ProductUnarchiveProductParams as ProductUnarchiveProductParams,
|
|
471
590
|
type ProductUpdateProductParams as ProductUpdateProductParams,
|
|
472
591
|
};
|
|
473
592
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
5
6
|
import { RequestOptions } from '../../../internal/request-options';
|
|
6
7
|
import { path } from '../../../internal/utils/path';
|
|
7
8
|
|
|
@@ -11,33 +12,45 @@ import { path } from '../../../internal/utils/path';
|
|
|
11
12
|
export class FutureUpdate extends APIResource {
|
|
12
13
|
/**
|
|
13
14
|
* Cancels a subscription update that is pending payment completion.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```ts
|
|
17
|
-
* const cancelSubscription =
|
|
18
|
-
* await client.v1.subscriptions.futureUpdate.cancelPendingPayment(
|
|
19
|
-
* 'x',
|
|
20
|
-
* );
|
|
21
|
-
* ```
|
|
22
15
|
*/
|
|
23
|
-
cancelPendingPayment(
|
|
24
|
-
|
|
16
|
+
cancelPendingPayment(
|
|
17
|
+
id: string,
|
|
18
|
+
params: FutureUpdateCancelPendingPaymentParams | null | undefined = {},
|
|
19
|
+
options?: RequestOptions,
|
|
20
|
+
): APIPromise<CancelSubscription> {
|
|
21
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
22
|
+
return this._client.delete(path`/api/v1/subscriptions/${id}/future-update/pending-payment`, {
|
|
23
|
+
...options,
|
|
24
|
+
headers: buildHeaders([
|
|
25
|
+
{
|
|
26
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
27
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
28
|
+
},
|
|
29
|
+
options?.headers,
|
|
30
|
+
]),
|
|
31
|
+
});
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
/**
|
|
28
35
|
* Cancels a scheduled subscription update, such as a future downgrade or plan
|
|
29
36
|
* change.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const cancelSubscription =
|
|
34
|
-
* await client.v1.subscriptions.futureUpdate.cancelSchedule(
|
|
35
|
-
* 'x',
|
|
36
|
-
* );
|
|
37
|
-
* ```
|
|
38
37
|
*/
|
|
39
|
-
cancelSchedule(
|
|
40
|
-
|
|
38
|
+
cancelSchedule(
|
|
39
|
+
id: string,
|
|
40
|
+
params: FutureUpdateCancelScheduleParams | null | undefined = {},
|
|
41
|
+
options?: RequestOptions,
|
|
42
|
+
): APIPromise<CancelSubscription> {
|
|
43
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
44
|
+
return this._client.delete(path`/api/v1/subscriptions/${id}/future-update/schedule`, {
|
|
45
|
+
...options,
|
|
46
|
+
headers: buildHeaders([
|
|
47
|
+
{
|
|
48
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
49
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
50
|
+
},
|
|
51
|
+
options?.headers,
|
|
52
|
+
]),
|
|
53
|
+
});
|
|
41
54
|
}
|
|
42
55
|
}
|
|
43
56
|
|
|
@@ -57,6 +70,40 @@ export namespace CancelSubscription {
|
|
|
57
70
|
}
|
|
58
71
|
}
|
|
59
72
|
|
|
73
|
+
export interface FutureUpdateCancelPendingPaymentParams {
|
|
74
|
+
/**
|
|
75
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
76
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
77
|
+
*/
|
|
78
|
+
'X-ACCOUNT-ID'?: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
82
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
83
|
+
* key).
|
|
84
|
+
*/
|
|
85
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface FutureUpdateCancelScheduleParams {
|
|
89
|
+
/**
|
|
90
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
91
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
92
|
+
*/
|
|
93
|
+
'X-ACCOUNT-ID'?: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
97
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
98
|
+
* key).
|
|
99
|
+
*/
|
|
100
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
60
103
|
export declare namespace FutureUpdate {
|
|
61
|
-
export {
|
|
104
|
+
export {
|
|
105
|
+
type CancelSubscription as CancelSubscription,
|
|
106
|
+
type FutureUpdateCancelPendingPaymentParams as FutureUpdateCancelPendingPaymentParams,
|
|
107
|
+
type FutureUpdateCancelScheduleParams as FutureUpdateCancelScheduleParams,
|
|
108
|
+
};
|
|
62
109
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
4
|
-
|
|
3
|
+
export {
|
|
4
|
+
FutureUpdate,
|
|
5
|
+
type CancelSubscription,
|
|
6
|
+
type FutureUpdateCancelPendingPaymentParams,
|
|
7
|
+
type FutureUpdateCancelScheduleParams,
|
|
8
|
+
} from './future-update';
|
|
9
|
+
export { Invoice, type InvoiceMarkAsPaidResponse, type InvoiceMarkAsPaidParams } from './invoice';
|
|
5
10
|
export {
|
|
6
11
|
Subscriptions,
|
|
7
12
|
type Subscription,
|
|
@@ -9,6 +14,7 @@ export {
|
|
|
9
14
|
type SubscriptionImportResponse,
|
|
10
15
|
type SubscriptionPreviewResponse,
|
|
11
16
|
type SubscriptionProvisionResponse,
|
|
17
|
+
type SubscriptionRetrieveParams,
|
|
12
18
|
type SubscriptionUpdateParams,
|
|
13
19
|
type SubscriptionListParams,
|
|
14
20
|
type SubscriptionCancelParams,
|
|
@@ -25,4 +31,5 @@ export {
|
|
|
25
31
|
type UsageChargeUsageResponse,
|
|
26
32
|
type UsageSyncResponse,
|
|
27
33
|
type UsageChargeUsageParams,
|
|
34
|
+
type UsageSyncParams,
|
|
28
35
|
} from './usage';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
5
6
|
import { RequestOptions } from '../../../internal/request-options';
|
|
6
7
|
import { path } from '../../../internal/utils/path';
|
|
7
8
|
|
|
@@ -12,15 +13,23 @@ export class Invoice extends APIResource {
|
|
|
12
13
|
/**
|
|
13
14
|
* Marks the latest invoice of a subscription as paid in the billing provider. The
|
|
14
15
|
* invoice must exist and have an OPEN status.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```ts
|
|
18
|
-
* const response =
|
|
19
|
-
* await client.v1.subscriptions.invoice.markAsPaid('x');
|
|
20
|
-
* ```
|
|
21
16
|
*/
|
|
22
|
-
markAsPaid(
|
|
23
|
-
|
|
17
|
+
markAsPaid(
|
|
18
|
+
id: string,
|
|
19
|
+
params: InvoiceMarkAsPaidParams | null | undefined = {},
|
|
20
|
+
options?: RequestOptions,
|
|
21
|
+
): APIPromise<InvoiceMarkAsPaidResponse> {
|
|
22
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
23
|
+
return this._client.post(path`/api/v1/subscriptions/${id}/invoice/paid`, {
|
|
24
|
+
...options,
|
|
25
|
+
headers: buildHeaders([
|
|
26
|
+
{
|
|
27
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
28
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
29
|
+
},
|
|
30
|
+
options?.headers,
|
|
31
|
+
]),
|
|
32
|
+
});
|
|
24
33
|
}
|
|
25
34
|
}
|
|
26
35
|
|
|
@@ -46,6 +55,24 @@ export namespace InvoiceMarkAsPaidResponse {
|
|
|
46
55
|
}
|
|
47
56
|
}
|
|
48
57
|
|
|
58
|
+
export interface InvoiceMarkAsPaidParams {
|
|
59
|
+
/**
|
|
60
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
61
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
62
|
+
*/
|
|
63
|
+
'X-ACCOUNT-ID'?: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
67
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
68
|
+
* key).
|
|
69
|
+
*/
|
|
70
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
49
73
|
export declare namespace Invoice {
|
|
50
|
-
export {
|
|
74
|
+
export {
|
|
75
|
+
type InvoiceMarkAsPaidResponse as InvoiceMarkAsPaidResponse,
|
|
76
|
+
type InvoiceMarkAsPaidParams as InvoiceMarkAsPaidParams,
|
|
77
|
+
};
|
|
51
78
|
}
|