@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
|
@@ -9,13 +9,16 @@ export {
|
|
|
9
9
|
type CustomerImportResponse,
|
|
10
10
|
type CustomerListResourcesResponse,
|
|
11
11
|
type CustomerRetrieveEntitlementsResponse,
|
|
12
|
+
type CustomerRetrieveParams,
|
|
12
13
|
type CustomerUpdateParams,
|
|
13
14
|
type CustomerListParams,
|
|
15
|
+
type CustomerArchiveParams,
|
|
14
16
|
type CustomerCheckEntitlementParams,
|
|
15
17
|
type CustomerImportParams,
|
|
16
18
|
type CustomerListResourcesParams,
|
|
17
19
|
type CustomerProvisionParams,
|
|
18
20
|
type CustomerRetrieveEntitlementsParams,
|
|
21
|
+
type CustomerUnarchiveParams,
|
|
19
22
|
type CustomerListResponsesMyCursorIDPage,
|
|
20
23
|
type CustomerListResourcesResponsesMyCursorIDPage,
|
|
21
24
|
} from './customers';
|
|
@@ -29,7 +32,11 @@ export {
|
|
|
29
32
|
type IntegrationUnlinkParams,
|
|
30
33
|
type IntegrationListResponsesMyCursorIDPage,
|
|
31
34
|
} from './integrations';
|
|
32
|
-
export {
|
|
35
|
+
export {
|
|
36
|
+
PaymentMethod,
|
|
37
|
+
type PaymentMethodAttachParams,
|
|
38
|
+
type PaymentMethodDetachParams,
|
|
39
|
+
} from './payment-method';
|
|
33
40
|
export {
|
|
34
41
|
PromotionalEntitlements,
|
|
35
42
|
type PromotionalEntitlementCreateResponse,
|
|
@@ -4,123 +4,124 @@ import { APIResource } from '../../../core/resource';
|
|
|
4
4
|
import * as CustomersAPI from './customers';
|
|
5
5
|
import { APIPromise } from '../../../core/api-promise';
|
|
6
6
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
|
|
7
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
7
8
|
import { RequestOptions } from '../../../internal/request-options';
|
|
8
9
|
import { path } from '../../../internal/utils/path';
|
|
9
10
|
|
|
10
11
|
export class Integrations extends APIResource {
|
|
11
12
|
/**
|
|
12
13
|
* Retrieves a specific integration for a customer by integration ID.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const customerIntegrationResponse =
|
|
17
|
-
* await client.v1.customers.integrations.retrieve(
|
|
18
|
-
* 'integrationId',
|
|
19
|
-
* { id: 'id' },
|
|
20
|
-
* );
|
|
21
|
-
* ```
|
|
22
14
|
*/
|
|
23
15
|
retrieve(
|
|
24
16
|
integrationID: string,
|
|
25
17
|
params: IntegrationRetrieveParams,
|
|
26
18
|
options?: RequestOptions,
|
|
27
19
|
): APIPromise<CustomersAPI.CustomerIntegrationResponse> {
|
|
28
|
-
const { id } = params;
|
|
29
|
-
return this._client.get(path`/api/v1/customers/${id}/integrations/${integrationID}`,
|
|
20
|
+
const { id, 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params;
|
|
21
|
+
return this._client.get(path`/api/v1/customers/${id}/integrations/${integrationID}`, {
|
|
22
|
+
...options,
|
|
23
|
+
headers: buildHeaders([
|
|
24
|
+
{
|
|
25
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
26
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
27
|
+
},
|
|
28
|
+
options?.headers,
|
|
29
|
+
]),
|
|
30
|
+
});
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* Updates a customer's integration link, such as changing the synced external
|
|
34
35
|
* entity ID.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* const customerIntegrationResponse =
|
|
39
|
-
* await client.v1.customers.integrations.update(
|
|
40
|
-
* 'integrationId',
|
|
41
|
-
* { id: 'id', syncedEntityId: 'syncedEntityId' },
|
|
42
|
-
* );
|
|
43
|
-
* ```
|
|
44
36
|
*/
|
|
45
37
|
update(
|
|
46
38
|
integrationID: string,
|
|
47
39
|
params: IntegrationUpdateParams,
|
|
48
40
|
options?: RequestOptions,
|
|
49
41
|
): APIPromise<CustomersAPI.CustomerIntegrationResponse> {
|
|
50
|
-
const { id, ...body } = params;
|
|
42
|
+
const { id, 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
51
43
|
return this._client.patch(path`/api/v1/customers/${id}/integrations/${integrationID}`, {
|
|
52
44
|
body,
|
|
53
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
|
+
]),
|
|
54
53
|
});
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
/**
|
|
58
57
|
* Retrieves a paginated list of a customer's external integrations (billing, CRM,
|
|
59
58
|
* etc.).
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```ts
|
|
63
|
-
* // Automatically fetches more pages as needed.
|
|
64
|
-
* for await (const integrationListResponse of client.v1.customers.integrations.list(
|
|
65
|
-
* 'x',
|
|
66
|
-
* )) {
|
|
67
|
-
* // ...
|
|
68
|
-
* }
|
|
69
|
-
* ```
|
|
70
59
|
*/
|
|
71
60
|
list(
|
|
72
61
|
id: string,
|
|
73
|
-
|
|
62
|
+
params: IntegrationListParams | null | undefined = {},
|
|
74
63
|
options?: RequestOptions,
|
|
75
64
|
): PagePromise<IntegrationListResponsesMyCursorIDPage, IntegrationListResponse> {
|
|
65
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
76
66
|
return this._client.getAPIList(
|
|
77
67
|
path`/api/v1/customers/${id}/integrations`,
|
|
78
68
|
MyCursorIDPage<IntegrationListResponse>,
|
|
79
|
-
{
|
|
69
|
+
{
|
|
70
|
+
query,
|
|
71
|
+
...options,
|
|
72
|
+
headers: buildHeaders([
|
|
73
|
+
{
|
|
74
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
75
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
76
|
+
},
|
|
77
|
+
options?.headers,
|
|
78
|
+
]),
|
|
79
|
+
},
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* Links a customer to an external integration by specifying the vendor and
|
|
85
85
|
* external entity ID.
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* ```ts
|
|
89
|
-
* const customerIntegrationResponse =
|
|
90
|
-
* await client.v1.customers.integrations.link('x', {
|
|
91
|
-
* id: 'id',
|
|
92
|
-
* syncedEntityId: 'syncedEntityId',
|
|
93
|
-
* vendorIdentifier: 'AUTH0',
|
|
94
|
-
* });
|
|
95
|
-
* ```
|
|
96
86
|
*/
|
|
97
87
|
link(
|
|
98
88
|
id: string,
|
|
99
|
-
|
|
89
|
+
params: IntegrationLinkParams,
|
|
100
90
|
options?: RequestOptions,
|
|
101
91
|
): APIPromise<CustomersAPI.CustomerIntegrationResponse> {
|
|
102
|
-
|
|
92
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
93
|
+
return this._client.post(path`/api/v1/customers/${id}/integrations`, {
|
|
94
|
+
body,
|
|
95
|
+
...options,
|
|
96
|
+
headers: buildHeaders([
|
|
97
|
+
{
|
|
98
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
99
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
100
|
+
},
|
|
101
|
+
options?.headers,
|
|
102
|
+
]),
|
|
103
|
+
});
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
/**
|
|
106
107
|
* Removes the link between a customer and an external integration.
|
|
107
|
-
*
|
|
108
|
-
* @example
|
|
109
|
-
* ```ts
|
|
110
|
-
* const customerIntegrationResponse =
|
|
111
|
-
* await client.v1.customers.integrations.unlink(
|
|
112
|
-
* 'integrationId',
|
|
113
|
-
* { id: 'id' },
|
|
114
|
-
* );
|
|
115
|
-
* ```
|
|
116
108
|
*/
|
|
117
109
|
unlink(
|
|
118
110
|
integrationID: string,
|
|
119
111
|
params: IntegrationUnlinkParams,
|
|
120
112
|
options?: RequestOptions,
|
|
121
113
|
): APIPromise<CustomersAPI.CustomerIntegrationResponse> {
|
|
122
|
-
const { id } = params;
|
|
123
|
-
return this._client.delete(path`/api/v1/customers/${id}/integrations/${integrationID}`,
|
|
114
|
+
const { id, 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params;
|
|
115
|
+
return this._client.delete(path`/api/v1/customers/${id}/integrations/${integrationID}`, {
|
|
116
|
+
...options,
|
|
117
|
+
headers: buildHeaders([
|
|
118
|
+
{
|
|
119
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
120
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
121
|
+
},
|
|
122
|
+
options?.headers,
|
|
123
|
+
]),
|
|
124
|
+
});
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
|
|
@@ -218,9 +219,22 @@ export namespace IntegrationListResponse {
|
|
|
218
219
|
|
|
219
220
|
export interface IntegrationRetrieveParams {
|
|
220
221
|
/**
|
|
221
|
-
* Customer slug
|
|
222
|
+
* Path param: Customer slug
|
|
222
223
|
*/
|
|
223
224
|
id: string;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
228
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
229
|
+
*/
|
|
230
|
+
'X-ACCOUNT-ID'?: string;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
234
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
235
|
+
* intrinsic to the key).
|
|
236
|
+
*/
|
|
237
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
224
238
|
}
|
|
225
239
|
|
|
226
240
|
export interface IntegrationUpdateParams {
|
|
@@ -233,12 +247,25 @@ export interface IntegrationUpdateParams {
|
|
|
233
247
|
* Body param: Synced entity id
|
|
234
248
|
*/
|
|
235
249
|
syncedEntityId: string | null;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
253
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
254
|
+
*/
|
|
255
|
+
'X-ACCOUNT-ID'?: string;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
259
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
260
|
+
* intrinsic to the key).
|
|
261
|
+
*/
|
|
262
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
236
263
|
}
|
|
237
264
|
|
|
238
265
|
export interface IntegrationListParams extends MyCursorIDPageParams {
|
|
239
266
|
/**
|
|
240
|
-
* Filter by vendor identifier. Supports comma-separated values for
|
|
241
|
-
* vendors (e.g., STRIPE,HUBSPOT)
|
|
267
|
+
* Query param: Filter by vendor identifier. Supports comma-separated values for
|
|
268
|
+
* multiple vendors (e.g., STRIPE,HUBSPOT)
|
|
242
269
|
*/
|
|
243
270
|
vendorIdentifier?: Array<
|
|
244
271
|
| 'AUTH0'
|
|
@@ -254,21 +281,34 @@ export interface IntegrationListParams extends MyCursorIDPageParams {
|
|
|
254
281
|
| 'RECEIVED'
|
|
255
282
|
| 'PREQUEL'
|
|
256
283
|
>;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
287
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
288
|
+
*/
|
|
289
|
+
'X-ACCOUNT-ID'?: string;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
293
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
294
|
+
* intrinsic to the key).
|
|
295
|
+
*/
|
|
296
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
257
297
|
}
|
|
258
298
|
|
|
259
299
|
export interface IntegrationLinkParams {
|
|
260
300
|
/**
|
|
261
|
-
* Integration details
|
|
301
|
+
* Body param: Integration details
|
|
262
302
|
*/
|
|
263
303
|
id: string;
|
|
264
304
|
|
|
265
305
|
/**
|
|
266
|
-
* Synced entity id
|
|
306
|
+
* Body param: Synced entity id
|
|
267
307
|
*/
|
|
268
308
|
syncedEntityId: string;
|
|
269
309
|
|
|
270
310
|
/**
|
|
271
|
-
* The vendor identifier of integration
|
|
311
|
+
* Body param: The vendor identifier of integration
|
|
272
312
|
*/
|
|
273
313
|
vendorIdentifier:
|
|
274
314
|
| 'AUTH0'
|
|
@@ -283,13 +323,39 @@ export interface IntegrationLinkParams {
|
|
|
283
323
|
| 'APP_STORE'
|
|
284
324
|
| 'RECEIVED'
|
|
285
325
|
| 'PREQUEL';
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
329
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
330
|
+
*/
|
|
331
|
+
'X-ACCOUNT-ID'?: string;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
335
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
336
|
+
* intrinsic to the key).
|
|
337
|
+
*/
|
|
338
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
286
339
|
}
|
|
287
340
|
|
|
288
341
|
export interface IntegrationUnlinkParams {
|
|
289
342
|
/**
|
|
290
|
-
* Customer slug
|
|
343
|
+
* Path param: Customer slug
|
|
291
344
|
*/
|
|
292
345
|
id: string;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
349
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
350
|
+
*/
|
|
351
|
+
'X-ACCOUNT-ID'?: string;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
355
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
356
|
+
* intrinsic to the key).
|
|
357
|
+
*/
|
|
358
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
293
359
|
}
|
|
294
360
|
|
|
295
361
|
export declare namespace Integrations {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as CustomersAPI from './customers';
|
|
5
5
|
import { APIPromise } from '../../../core/api-promise';
|
|
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,53 +14,62 @@ export class PaymentMethod extends APIResource {
|
|
|
13
14
|
/**
|
|
14
15
|
* Attaches a payment method to a customer for billing. Required for paid
|
|
15
16
|
* subscriptions when integrated with a billing provider.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* const customerResponse =
|
|
20
|
-
* await client.v1.customers.paymentMethod.attach('x', {
|
|
21
|
-
* integrationId: 'integrationId',
|
|
22
|
-
* paymentMethodId: 'paymentMethodId',
|
|
23
|
-
* vendorIdentifier: 'AUTH0',
|
|
24
|
-
* });
|
|
25
|
-
* ```
|
|
26
17
|
*/
|
|
27
18
|
attach(
|
|
28
19
|
id: string,
|
|
29
|
-
|
|
20
|
+
params: PaymentMethodAttachParams,
|
|
30
21
|
options?: RequestOptions,
|
|
31
22
|
): APIPromise<CustomersAPI.CustomerResponse> {
|
|
32
|
-
|
|
23
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
24
|
+
return this._client.post(path`/api/v1/customers/${id}/payment-method`, {
|
|
25
|
+
body,
|
|
26
|
+
...options,
|
|
27
|
+
headers: buildHeaders([
|
|
28
|
+
{
|
|
29
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
30
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
31
|
+
},
|
|
32
|
+
options?.headers,
|
|
33
|
+
]),
|
|
34
|
+
});
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
/**
|
|
36
38
|
* Removes the payment method from a customer. Ensure active paid subscriptions
|
|
37
39
|
* have an alternative payment method.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* const customerResponse =
|
|
42
|
-
* await client.v1.customers.paymentMethod.detach('x');
|
|
43
|
-
* ```
|
|
44
40
|
*/
|
|
45
|
-
detach(
|
|
46
|
-
|
|
41
|
+
detach(
|
|
42
|
+
id: string,
|
|
43
|
+
params: PaymentMethodDetachParams | null | undefined = {},
|
|
44
|
+
options?: RequestOptions,
|
|
45
|
+
): APIPromise<CustomersAPI.CustomerResponse> {
|
|
46
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
47
|
+
return this._client.delete(path`/api/v1/customers/${id}/payment-method`, {
|
|
48
|
+
...options,
|
|
49
|
+
headers: buildHeaders([
|
|
50
|
+
{
|
|
51
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
52
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
53
|
+
},
|
|
54
|
+
options?.headers,
|
|
55
|
+
]),
|
|
56
|
+
});
|
|
47
57
|
}
|
|
48
58
|
}
|
|
49
59
|
|
|
50
60
|
export interface PaymentMethodAttachParams {
|
|
51
61
|
/**
|
|
52
|
-
* Integration details
|
|
62
|
+
* Body param: Integration details
|
|
53
63
|
*/
|
|
54
64
|
integrationId: string;
|
|
55
65
|
|
|
56
66
|
/**
|
|
57
|
-
* Billing provider payment method id
|
|
67
|
+
* Body param: Billing provider payment method id
|
|
58
68
|
*/
|
|
59
69
|
paymentMethodId: string;
|
|
60
70
|
|
|
61
71
|
/**
|
|
62
|
-
* The vendor identifier of integration
|
|
72
|
+
* Body param: The vendor identifier of integration
|
|
63
73
|
*/
|
|
64
74
|
vendorIdentifier:
|
|
65
75
|
| 'AUTH0'
|
|
@@ -76,7 +86,7 @@ export interface PaymentMethodAttachParams {
|
|
|
76
86
|
| 'PREQUEL';
|
|
77
87
|
|
|
78
88
|
/**
|
|
79
|
-
* Customers selected currency
|
|
89
|
+
* Body param: Customers selected currency
|
|
80
90
|
*/
|
|
81
91
|
billingCurrency?:
|
|
82
92
|
| 'usd'
|
|
@@ -196,8 +206,39 @@ export interface PaymentMethodAttachParams {
|
|
|
196
206
|
| 'xof'
|
|
197
207
|
| 'xpf'
|
|
198
208
|
| null;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
212
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
213
|
+
*/
|
|
214
|
+
'X-ACCOUNT-ID'?: string;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
218
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
219
|
+
* intrinsic to the key).
|
|
220
|
+
*/
|
|
221
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface PaymentMethodDetachParams {
|
|
225
|
+
/**
|
|
226
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
227
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
228
|
+
*/
|
|
229
|
+
'X-ACCOUNT-ID'?: string;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
233
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
234
|
+
* key).
|
|
235
|
+
*/
|
|
236
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
199
237
|
}
|
|
200
238
|
|
|
201
239
|
export declare namespace PaymentMethod {
|
|
202
|
-
export {
|
|
240
|
+
export {
|
|
241
|
+
type PaymentMethodAttachParams as PaymentMethodAttachParams,
|
|
242
|
+
type PaymentMethodDetachParams as PaymentMethodDetachParams,
|
|
243
|
+
};
|
|
203
244
|
}
|
|
@@ -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,92 +14,72 @@ export class PromotionalEntitlements extends APIResource {
|
|
|
13
14
|
/**
|
|
14
15
|
* Grants promotional entitlements to a customer, providing feature access outside
|
|
15
16
|
* their subscription. Entitlements can be time-limited or permanent.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* const promotionalEntitlement =
|
|
20
|
-
* await client.v1.customers.promotionalEntitlements.create(
|
|
21
|
-
* 'x',
|
|
22
|
-
* {
|
|
23
|
-
* promotionalEntitlements: [
|
|
24
|
-
* {
|
|
25
|
-
* customEndDate: '2019-12-27T18:11:19.117Z',
|
|
26
|
-
* enumValues: ['string'],
|
|
27
|
-
* featureId: 'featureId',
|
|
28
|
-
* hasSoftLimit: true,
|
|
29
|
-
* hasUnlimitedUsage: true,
|
|
30
|
-
* isVisible: true,
|
|
31
|
-
* monthlyResetPeriodConfiguration: {
|
|
32
|
-
* accordingTo: 'SubscriptionStart',
|
|
33
|
-
* },
|
|
34
|
-
* period: '1 week',
|
|
35
|
-
* resetPeriod: 'YEAR',
|
|
36
|
-
* usageLimit: -9007199254740991,
|
|
37
|
-
* weeklyResetPeriodConfiguration: {
|
|
38
|
-
* accordingTo: 'SubscriptionStart',
|
|
39
|
-
* },
|
|
40
|
-
* yearlyResetPeriodConfiguration: {
|
|
41
|
-
* accordingTo: 'SubscriptionStart',
|
|
42
|
-
* },
|
|
43
|
-
* },
|
|
44
|
-
* ],
|
|
45
|
-
* },
|
|
46
|
-
* );
|
|
47
|
-
* ```
|
|
48
17
|
*/
|
|
49
18
|
create(
|
|
50
19
|
id: string,
|
|
51
|
-
|
|
20
|
+
params: PromotionalEntitlementCreateParams,
|
|
52
21
|
options?: RequestOptions,
|
|
53
22
|
): APIPromise<PromotionalEntitlementCreateResponse> {
|
|
54
|
-
|
|
23
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
24
|
+
return this._client.post(path`/api/v1/customers/${id}/promotional-entitlements`, {
|
|
25
|
+
body,
|
|
26
|
+
...options,
|
|
27
|
+
headers: buildHeaders([
|
|
28
|
+
{
|
|
29
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
30
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
31
|
+
},
|
|
32
|
+
options?.headers,
|
|
33
|
+
]),
|
|
34
|
+
});
|
|
55
35
|
}
|
|
56
36
|
|
|
57
37
|
/**
|
|
58
38
|
* Retrieves a paginated list of a customer's promotional entitlements.
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```ts
|
|
62
|
-
* // Automatically fetches more pages as needed.
|
|
63
|
-
* for await (const promotionalEntitlementListResponse of client.v1.customers.promotionalEntitlements.list(
|
|
64
|
-
* 'x',
|
|
65
|
-
* )) {
|
|
66
|
-
* // ...
|
|
67
|
-
* }
|
|
68
|
-
* ```
|
|
69
39
|
*/
|
|
70
40
|
list(
|
|
71
41
|
id: string,
|
|
72
|
-
|
|
42
|
+
params: PromotionalEntitlementListParams | null | undefined = {},
|
|
73
43
|
options?: RequestOptions,
|
|
74
44
|
): PagePromise<PromotionalEntitlementListResponsesMyCursorIDPage, PromotionalEntitlementListResponse> {
|
|
45
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
75
46
|
return this._client.getAPIList(
|
|
76
47
|
path`/api/v1/customers/${id}/promotional-entitlements`,
|
|
77
48
|
MyCursorIDPage<PromotionalEntitlementListResponse>,
|
|
78
|
-
{
|
|
49
|
+
{
|
|
50
|
+
query,
|
|
51
|
+
...options,
|
|
52
|
+
headers: buildHeaders([
|
|
53
|
+
{
|
|
54
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
55
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
56
|
+
},
|
|
57
|
+
options?.headers,
|
|
58
|
+
]),
|
|
59
|
+
},
|
|
79
60
|
);
|
|
80
61
|
}
|
|
81
62
|
|
|
82
63
|
/**
|
|
83
64
|
* Revokes a previously granted promotional entitlement from a customer for a
|
|
84
65
|
* specific feature.
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```ts
|
|
88
|
-
* const response =
|
|
89
|
-
* await client.v1.customers.promotionalEntitlements.revoke(
|
|
90
|
-
* 'featureId',
|
|
91
|
-
* { id: 'id' },
|
|
92
|
-
* );
|
|
93
|
-
* ```
|
|
94
66
|
*/
|
|
95
67
|
revoke(
|
|
96
68
|
featureID: string,
|
|
97
69
|
params: PromotionalEntitlementRevokeParams,
|
|
98
70
|
options?: RequestOptions,
|
|
99
71
|
): APIPromise<PromotionalEntitlementRevokeResponse> {
|
|
100
|
-
const { id } = params;
|
|
101
|
-
return this._client.delete(path`/api/v1/customers/${id}/promotional-entitlements/${featureID}`,
|
|
72
|
+
const { id, 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params;
|
|
73
|
+
return this._client.delete(path`/api/v1/customers/${id}/promotional-entitlements/${featureID}`, {
|
|
74
|
+
...options,
|
|
75
|
+
headers: buildHeaders([
|
|
76
|
+
{
|
|
77
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
78
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
79
|
+
},
|
|
80
|
+
options?.headers,
|
|
81
|
+
]),
|
|
82
|
+
});
|
|
102
83
|
}
|
|
103
84
|
}
|
|
104
85
|
|
|
@@ -545,9 +526,22 @@ export namespace PromotionalEntitlementRevokeResponse {
|
|
|
545
526
|
|
|
546
527
|
export interface PromotionalEntitlementCreateParams {
|
|
547
528
|
/**
|
|
548
|
-
* Promotional entitlements to grant
|
|
529
|
+
* Body param: Promotional entitlements to grant
|
|
549
530
|
*/
|
|
550
531
|
promotionalEntitlements: Array<PromotionalEntitlementCreateParams.PromotionalEntitlement>;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
535
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
536
|
+
*/
|
|
537
|
+
'X-ACCOUNT-ID'?: string;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
541
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
542
|
+
* intrinsic to the key).
|
|
543
|
+
*/
|
|
544
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
551
545
|
}
|
|
552
546
|
|
|
553
547
|
export namespace PromotionalEntitlementCreateParams {
|
|
@@ -665,15 +659,28 @@ export namespace PromotionalEntitlementCreateParams {
|
|
|
665
659
|
|
|
666
660
|
export interface PromotionalEntitlementListParams extends MyCursorIDPageParams {
|
|
667
661
|
/**
|
|
668
|
-
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
662
|
+
* Query param: Filter by creation date using range operators: gt, gte, lt, lte
|
|
669
663
|
*/
|
|
670
664
|
createdAt?: PromotionalEntitlementListParams.CreatedAt;
|
|
671
665
|
|
|
672
666
|
/**
|
|
673
|
-
* Filter by promotional entitlement status. Supports comma-separated
|
|
674
|
-
* multiple statuses
|
|
667
|
+
* Query param: Filter by promotional entitlement status. Supports comma-separated
|
|
668
|
+
* values for multiple statuses
|
|
675
669
|
*/
|
|
676
670
|
status?: Array<'Active' | 'Expired' | 'Paused'>;
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
674
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
675
|
+
*/
|
|
676
|
+
'X-ACCOUNT-ID'?: string;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
680
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
681
|
+
* intrinsic to the key).
|
|
682
|
+
*/
|
|
683
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
677
684
|
}
|
|
678
685
|
|
|
679
686
|
export namespace PromotionalEntitlementListParams {
|
|
@@ -705,9 +712,22 @@ export namespace PromotionalEntitlementListParams {
|
|
|
705
712
|
|
|
706
713
|
export interface PromotionalEntitlementRevokeParams {
|
|
707
714
|
/**
|
|
708
|
-
* The unique identifier of the customer
|
|
715
|
+
* Path param: The unique identifier of the customer
|
|
709
716
|
*/
|
|
710
717
|
id: string;
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
721
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
722
|
+
*/
|
|
723
|
+
'X-ACCOUNT-ID'?: string;
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
727
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
728
|
+
* intrinsic to the key).
|
|
729
|
+
*/
|
|
730
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
711
731
|
}
|
|
712
732
|
|
|
713
733
|
export declare namespace PromotionalEntitlements {
|