@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
|
@@ -11,6 +11,7 @@ const payment_method_1 = require("./payment-method.js");
|
|
|
11
11
|
const PromotionalEntitlementsAPI = tslib_1.__importStar(require("./promotional-entitlements.js"));
|
|
12
12
|
const promotional_entitlements_1 = require("./promotional-entitlements.js");
|
|
13
13
|
const pagination_1 = require("../../../core/pagination.js");
|
|
14
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
14
15
|
const path_1 = require("../../../internal/utils/path.js");
|
|
15
16
|
class Customers extends resource_1.APIResource {
|
|
16
17
|
constructor() {
|
|
@@ -22,61 +23,71 @@ class Customers extends resource_1.APIResource {
|
|
|
22
23
|
/**
|
|
23
24
|
* Retrieves a customer by their unique identifier, including billing information
|
|
24
25
|
* and subscription status.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const customerResponse = await client.v1.customers.retrieve(
|
|
29
|
-
* 'x',
|
|
30
|
-
* );
|
|
31
|
-
* ```
|
|
32
26
|
*/
|
|
33
|
-
retrieve(id, options) {
|
|
34
|
-
|
|
27
|
+
retrieve(id, params = {}, options) {
|
|
28
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
29
|
+
return this._client.get((0, path_1.path) `/api/v1/customers/${id}`, {
|
|
30
|
+
...options,
|
|
31
|
+
headers: (0, headers_1.buildHeaders)([
|
|
32
|
+
{
|
|
33
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
34
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
35
|
+
},
|
|
36
|
+
options?.headers,
|
|
37
|
+
]),
|
|
38
|
+
});
|
|
35
39
|
}
|
|
36
40
|
/**
|
|
37
41
|
* Updates an existing customer's properties such as name, email, and billing
|
|
38
42
|
* information.
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* ```ts
|
|
42
|
-
* const customerResponse = await client.v1.customers.update(
|
|
43
|
-
* 'x',
|
|
44
|
-
* );
|
|
45
|
-
* ```
|
|
46
43
|
*/
|
|
47
|
-
update(id,
|
|
48
|
-
|
|
44
|
+
update(id, params, options) {
|
|
45
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
46
|
+
return this._client.patch((0, path_1.path) `/api/v1/customers/${id}`, {
|
|
47
|
+
body,
|
|
48
|
+
...options,
|
|
49
|
+
headers: (0, headers_1.buildHeaders)([
|
|
50
|
+
{
|
|
51
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
52
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
53
|
+
},
|
|
54
|
+
options?.headers,
|
|
55
|
+
]),
|
|
56
|
+
});
|
|
49
57
|
}
|
|
50
58
|
/**
|
|
51
59
|
* Retrieves a paginated list of customers in the environment.
|
|
52
|
-
*
|
|
53
|
-
* @example
|
|
54
|
-
* ```ts
|
|
55
|
-
* // Automatically fetches more pages as needed.
|
|
56
|
-
* for await (const customerListResponse of client.v1.customers.list()) {
|
|
57
|
-
* // ...
|
|
58
|
-
* }
|
|
59
|
-
* ```
|
|
60
60
|
*/
|
|
61
|
-
list(
|
|
61
|
+
list(params = {}, options) {
|
|
62
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
62
63
|
return this._client.getAPIList('/api/v1/customers', (pagination_1.MyCursorIDPage), {
|
|
63
64
|
query,
|
|
64
65
|
...options,
|
|
66
|
+
headers: (0, headers_1.buildHeaders)([
|
|
67
|
+
{
|
|
68
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
69
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
70
|
+
},
|
|
71
|
+
options?.headers,
|
|
72
|
+
]),
|
|
65
73
|
});
|
|
66
74
|
}
|
|
67
75
|
/**
|
|
68
76
|
* Archives a customer, preventing new subscriptions. Optionally cancels existing
|
|
69
77
|
* subscriptions.
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```ts
|
|
73
|
-
* const customerResponse = await client.v1.customers.archive(
|
|
74
|
-
* 'x',
|
|
75
|
-
* );
|
|
76
|
-
* ```
|
|
77
78
|
*/
|
|
78
|
-
archive(id, options) {
|
|
79
|
-
|
|
79
|
+
archive(id, params = {}, options) {
|
|
80
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
81
|
+
return this._client.post((0, path_1.path) `/api/v1/customers/${id}/archive`, {
|
|
82
|
+
...options,
|
|
83
|
+
headers: (0, headers_1.buildHeaders)([
|
|
84
|
+
{
|
|
85
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
86
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
87
|
+
},
|
|
88
|
+
options?.headers,
|
|
89
|
+
]),
|
|
90
|
+
});
|
|
80
91
|
}
|
|
81
92
|
/**
|
|
82
93
|
* Checks a single entitlement (feature or credit) for a customer or resource.
|
|
@@ -87,65 +98,73 @@ class Customers extends resource_1.APIResource {
|
|
|
87
98
|
* mechanisms, and low-latency guarantees. It is not recommended for hot-path
|
|
88
99
|
* entitlement checks. For production use, consider using the Stigg Node Server SDK
|
|
89
100
|
* with caching or the Sidecar for low-latency cached responses.
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* ```ts
|
|
93
|
-
* const response = await client.v1.customers.checkEntitlement(
|
|
94
|
-
* 'x',
|
|
95
|
-
* );
|
|
96
|
-
* ```
|
|
97
101
|
*/
|
|
98
|
-
checkEntitlement(id,
|
|
99
|
-
|
|
102
|
+
checkEntitlement(id, params = {}, options) {
|
|
103
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
104
|
+
return this._client.get((0, path_1.path) `/api/v1/customers/${id}/entitlements/check`, {
|
|
105
|
+
query,
|
|
106
|
+
...options,
|
|
107
|
+
headers: (0, headers_1.buildHeaders)([
|
|
108
|
+
{
|
|
109
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
110
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
111
|
+
},
|
|
112
|
+
options?.headers,
|
|
113
|
+
]),
|
|
114
|
+
});
|
|
100
115
|
}
|
|
101
116
|
/**
|
|
102
117
|
* Imports multiple customers in bulk. Used for migrating customer data from
|
|
103
118
|
* external systems.
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```ts
|
|
107
|
-
* const response = await client.v1.customers.import({
|
|
108
|
-
* customers: [
|
|
109
|
-
* {
|
|
110
|
-
* id: 'id',
|
|
111
|
-
* email: 'dev@stainless.com',
|
|
112
|
-
* name: 'name',
|
|
113
|
-
* },
|
|
114
|
-
* ],
|
|
115
|
-
* });
|
|
116
|
-
* ```
|
|
117
119
|
*/
|
|
118
|
-
import(
|
|
119
|
-
|
|
120
|
+
import(params, options) {
|
|
121
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
122
|
+
return this._client.post('/api/v1/customers/import', {
|
|
123
|
+
body,
|
|
124
|
+
...options,
|
|
125
|
+
headers: (0, headers_1.buildHeaders)([
|
|
126
|
+
{
|
|
127
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
128
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
129
|
+
},
|
|
130
|
+
options?.headers,
|
|
131
|
+
]),
|
|
132
|
+
});
|
|
120
133
|
}
|
|
121
134
|
/**
|
|
122
135
|
* Retrieves a paginated list of resources within the same customer.
|
|
123
|
-
*
|
|
124
|
-
* @example
|
|
125
|
-
* ```ts
|
|
126
|
-
* // Automatically fetches more pages as needed.
|
|
127
|
-
* for await (const customerListResourcesResponse of client.v1.customers.listResources(
|
|
128
|
-
* 'x',
|
|
129
|
-
* )) {
|
|
130
|
-
* // ...
|
|
131
|
-
* }
|
|
132
|
-
* ```
|
|
133
136
|
*/
|
|
134
|
-
listResources(id,
|
|
135
|
-
|
|
137
|
+
listResources(id, params = {}, options) {
|
|
138
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
139
|
+
return this._client.getAPIList((0, path_1.path) `/api/v1/customers/${id}/resources`, (pagination_1.MyCursorIDPage), {
|
|
140
|
+
query,
|
|
141
|
+
...options,
|
|
142
|
+
headers: (0, headers_1.buildHeaders)([
|
|
143
|
+
{
|
|
144
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
145
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
146
|
+
},
|
|
147
|
+
options?.headers,
|
|
148
|
+
]),
|
|
149
|
+
});
|
|
136
150
|
}
|
|
137
151
|
/**
|
|
138
152
|
* Creates a new customer and optionally provisions an initial subscription in a
|
|
139
153
|
* single operation.
|
|
140
|
-
*
|
|
141
|
-
* @example
|
|
142
|
-
* ```ts
|
|
143
|
-
* const customerResponse =
|
|
144
|
-
* await client.v1.customers.provision({ id: 'id' });
|
|
145
|
-
* ```
|
|
146
154
|
*/
|
|
147
|
-
provision(
|
|
148
|
-
|
|
155
|
+
provision(params, options) {
|
|
156
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
157
|
+
return this._client.post('/api/v1/customers', {
|
|
158
|
+
body,
|
|
159
|
+
...options,
|
|
160
|
+
headers: (0, headers_1.buildHeaders)([
|
|
161
|
+
{
|
|
162
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
163
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
164
|
+
},
|
|
165
|
+
options?.headers,
|
|
166
|
+
]),
|
|
167
|
+
});
|
|
149
168
|
}
|
|
150
169
|
/**
|
|
151
170
|
* Retrieves the effective entitlements for a customer or resource, including
|
|
@@ -155,27 +174,36 @@ class Customers extends resource_1.APIResource {
|
|
|
155
174
|
* mechanisms, and low-latency guarantees. It is not recommended for hot-path
|
|
156
175
|
* entitlement checks. For production use, consider using the Stigg Node Server SDK
|
|
157
176
|
* with caching or the Sidecar for low-latency cached responses.
|
|
158
|
-
*
|
|
159
|
-
* @example
|
|
160
|
-
* ```ts
|
|
161
|
-
* const response =
|
|
162
|
-
* await client.v1.customers.retrieveEntitlements('x');
|
|
163
|
-
* ```
|
|
164
177
|
*/
|
|
165
|
-
retrieveEntitlements(id,
|
|
166
|
-
|
|
178
|
+
retrieveEntitlements(id, params = {}, options) {
|
|
179
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
180
|
+
return this._client.get((0, path_1.path) `/api/v1/customers/${id}/entitlements`, {
|
|
181
|
+
query,
|
|
182
|
+
...options,
|
|
183
|
+
headers: (0, headers_1.buildHeaders)([
|
|
184
|
+
{
|
|
185
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
186
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
187
|
+
},
|
|
188
|
+
options?.headers,
|
|
189
|
+
]),
|
|
190
|
+
});
|
|
167
191
|
}
|
|
168
192
|
/**
|
|
169
193
|
* Restores an archived customer, allowing them to create new subscriptions again.
|
|
170
|
-
*
|
|
171
|
-
* @example
|
|
172
|
-
* ```ts
|
|
173
|
-
* const customerResponse =
|
|
174
|
-
* await client.v1.customers.unarchive('x');
|
|
175
|
-
* ```
|
|
176
194
|
*/
|
|
177
|
-
unarchive(id, options) {
|
|
178
|
-
|
|
195
|
+
unarchive(id, params = {}, options) {
|
|
196
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
197
|
+
return this._client.post((0, path_1.path) `/api/v1/customers/${id}/unarchive`, {
|
|
198
|
+
...options,
|
|
199
|
+
headers: (0, headers_1.buildHeaders)([
|
|
200
|
+
{
|
|
201
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
202
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
203
|
+
},
|
|
204
|
+
options?.headers,
|
|
205
|
+
]),
|
|
206
|
+
});
|
|
179
207
|
}
|
|
180
208
|
}
|
|
181
209
|
exports.Customers = Customers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customers.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/customers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,2EAAkD;AAClD,oDASwB;AACxB,8EAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"customers.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/customers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,2EAAkD;AAClD,oDASwB;AACxB,8EAAqD;AACrD,wDAAuG;AACvG,kGAAyE;AACzE,4EASoC;AAEpC,4DAAkG;AAClG,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,SAAU,SAAQ,sBAAW;IAA1C;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjG,4BAAuB,GACrB,IAAI,0BAA0B,CAAC,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmO9F,CAAC;IAjOC;;;OAGG;IACH,QAAQ,CACN,EAAU,EACV,SAAoD,EAAE,EACtD,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,EAAE,EAAE,EAAE;YACrD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE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AC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,SAAS,CACP,EAAU,EACV,SAAqD,EAAE,EACvD,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,qBAAqB,EAAE,YAAY,EAAE;YAChE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAvOD,8BAuOC;AAugGD,SAAS,CAAC,aAAa,GAAG,8BAAa,CAAC;AACxC,SAAS,CAAC,uBAAuB,GAAG,kDAAuB,CAAC;AAC5D,SAAS,CAAC,YAAY,GAAG,2BAAY,CAAC"}
|
|
@@ -7,6 +7,7 @@ import { PaymentMethod } from "./payment-method.mjs";
|
|
|
7
7
|
import * as PromotionalEntitlementsAPI from "./promotional-entitlements.mjs";
|
|
8
8
|
import { PromotionalEntitlements, } from "./promotional-entitlements.mjs";
|
|
9
9
|
import { MyCursorIDPage } from "../../../core/pagination.mjs";
|
|
10
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
10
11
|
import { path } from "../../../internal/utils/path.mjs";
|
|
11
12
|
export class Customers extends APIResource {
|
|
12
13
|
constructor() {
|
|
@@ -18,61 +19,71 @@ export class Customers extends APIResource {
|
|
|
18
19
|
/**
|
|
19
20
|
* Retrieves a customer by their unique identifier, including billing information
|
|
20
21
|
* and subscription status.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* const customerResponse = await client.v1.customers.retrieve(
|
|
25
|
-
* 'x',
|
|
26
|
-
* );
|
|
27
|
-
* ```
|
|
28
22
|
*/
|
|
29
|
-
retrieve(id, options) {
|
|
30
|
-
|
|
23
|
+
retrieve(id, params = {}, options) {
|
|
24
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
25
|
+
return this._client.get(path `/api/v1/customers/${id}`, {
|
|
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
|
+
});
|
|
31
35
|
}
|
|
32
36
|
/**
|
|
33
37
|
* Updates an existing customer's properties such as name, email, and billing
|
|
34
38
|
* information.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* const customerResponse = await client.v1.customers.update(
|
|
39
|
-
* 'x',
|
|
40
|
-
* );
|
|
41
|
-
* ```
|
|
42
39
|
*/
|
|
43
|
-
update(id,
|
|
44
|
-
|
|
40
|
+
update(id, params, options) {
|
|
41
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
42
|
+
return this._client.patch(path `/api/v1/customers/${id}`, {
|
|
43
|
+
body,
|
|
44
|
+
...options,
|
|
45
|
+
headers: buildHeaders([
|
|
46
|
+
{
|
|
47
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
48
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
49
|
+
},
|
|
50
|
+
options?.headers,
|
|
51
|
+
]),
|
|
52
|
+
});
|
|
45
53
|
}
|
|
46
54
|
/**
|
|
47
55
|
* Retrieves a paginated list of customers in the environment.
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* // Automatically fetches more pages as needed.
|
|
52
|
-
* for await (const customerListResponse of client.v1.customers.list()) {
|
|
53
|
-
* // ...
|
|
54
|
-
* }
|
|
55
|
-
* ```
|
|
56
56
|
*/
|
|
57
|
-
list(
|
|
57
|
+
list(params = {}, options) {
|
|
58
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
58
59
|
return this._client.getAPIList('/api/v1/customers', (MyCursorIDPage), {
|
|
59
60
|
query,
|
|
60
61
|
...options,
|
|
62
|
+
headers: buildHeaders([
|
|
63
|
+
{
|
|
64
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
65
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
66
|
+
},
|
|
67
|
+
options?.headers,
|
|
68
|
+
]),
|
|
61
69
|
});
|
|
62
70
|
}
|
|
63
71
|
/**
|
|
64
72
|
* Archives a customer, preventing new subscriptions. Optionally cancels existing
|
|
65
73
|
* subscriptions.
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```ts
|
|
69
|
-
* const customerResponse = await client.v1.customers.archive(
|
|
70
|
-
* 'x',
|
|
71
|
-
* );
|
|
72
|
-
* ```
|
|
73
74
|
*/
|
|
74
|
-
archive(id, options) {
|
|
75
|
-
|
|
75
|
+
archive(id, params = {}, options) {
|
|
76
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
77
|
+
return this._client.post(path `/api/v1/customers/${id}/archive`, {
|
|
78
|
+
...options,
|
|
79
|
+
headers: buildHeaders([
|
|
80
|
+
{
|
|
81
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
82
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
83
|
+
},
|
|
84
|
+
options?.headers,
|
|
85
|
+
]),
|
|
86
|
+
});
|
|
76
87
|
}
|
|
77
88
|
/**
|
|
78
89
|
* Checks a single entitlement (feature or credit) for a customer or resource.
|
|
@@ -83,65 +94,73 @@ export class Customers extends APIResource {
|
|
|
83
94
|
* mechanisms, and low-latency guarantees. It is not recommended for hot-path
|
|
84
95
|
* entitlement checks. For production use, consider using the Stigg Node Server SDK
|
|
85
96
|
* with caching or the Sidecar for low-latency cached responses.
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* ```ts
|
|
89
|
-
* const response = await client.v1.customers.checkEntitlement(
|
|
90
|
-
* 'x',
|
|
91
|
-
* );
|
|
92
|
-
* ```
|
|
93
97
|
*/
|
|
94
|
-
checkEntitlement(id,
|
|
95
|
-
|
|
98
|
+
checkEntitlement(id, params = {}, options) {
|
|
99
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
100
|
+
return this._client.get(path `/api/v1/customers/${id}/entitlements/check`, {
|
|
101
|
+
query,
|
|
102
|
+
...options,
|
|
103
|
+
headers: buildHeaders([
|
|
104
|
+
{
|
|
105
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
106
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
107
|
+
},
|
|
108
|
+
options?.headers,
|
|
109
|
+
]),
|
|
110
|
+
});
|
|
96
111
|
}
|
|
97
112
|
/**
|
|
98
113
|
* Imports multiple customers in bulk. Used for migrating customer data from
|
|
99
114
|
* external systems.
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```ts
|
|
103
|
-
* const response = await client.v1.customers.import({
|
|
104
|
-
* customers: [
|
|
105
|
-
* {
|
|
106
|
-
* id: 'id',
|
|
107
|
-
* email: 'dev@stainless.com',
|
|
108
|
-
* name: 'name',
|
|
109
|
-
* },
|
|
110
|
-
* ],
|
|
111
|
-
* });
|
|
112
|
-
* ```
|
|
113
115
|
*/
|
|
114
|
-
import(
|
|
115
|
-
|
|
116
|
+
import(params, options) {
|
|
117
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
118
|
+
return this._client.post('/api/v1/customers/import', {
|
|
119
|
+
body,
|
|
120
|
+
...options,
|
|
121
|
+
headers: buildHeaders([
|
|
122
|
+
{
|
|
123
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
124
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
125
|
+
},
|
|
126
|
+
options?.headers,
|
|
127
|
+
]),
|
|
128
|
+
});
|
|
116
129
|
}
|
|
117
130
|
/**
|
|
118
131
|
* Retrieves a paginated list of resources within the same customer.
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* ```ts
|
|
122
|
-
* // Automatically fetches more pages as needed.
|
|
123
|
-
* for await (const customerListResourcesResponse of client.v1.customers.listResources(
|
|
124
|
-
* 'x',
|
|
125
|
-
* )) {
|
|
126
|
-
* // ...
|
|
127
|
-
* }
|
|
128
|
-
* ```
|
|
129
132
|
*/
|
|
130
|
-
listResources(id,
|
|
131
|
-
|
|
133
|
+
listResources(id, params = {}, options) {
|
|
134
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
135
|
+
return this._client.getAPIList(path `/api/v1/customers/${id}/resources`, (MyCursorIDPage), {
|
|
136
|
+
query,
|
|
137
|
+
...options,
|
|
138
|
+
headers: buildHeaders([
|
|
139
|
+
{
|
|
140
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
141
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
142
|
+
},
|
|
143
|
+
options?.headers,
|
|
144
|
+
]),
|
|
145
|
+
});
|
|
132
146
|
}
|
|
133
147
|
/**
|
|
134
148
|
* Creates a new customer and optionally provisions an initial subscription in a
|
|
135
149
|
* single operation.
|
|
136
|
-
*
|
|
137
|
-
* @example
|
|
138
|
-
* ```ts
|
|
139
|
-
* const customerResponse =
|
|
140
|
-
* await client.v1.customers.provision({ id: 'id' });
|
|
141
|
-
* ```
|
|
142
150
|
*/
|
|
143
|
-
provision(
|
|
144
|
-
|
|
151
|
+
provision(params, options) {
|
|
152
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
153
|
+
return this._client.post('/api/v1/customers', {
|
|
154
|
+
body,
|
|
155
|
+
...options,
|
|
156
|
+
headers: buildHeaders([
|
|
157
|
+
{
|
|
158
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
159
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
160
|
+
},
|
|
161
|
+
options?.headers,
|
|
162
|
+
]),
|
|
163
|
+
});
|
|
145
164
|
}
|
|
146
165
|
/**
|
|
147
166
|
* Retrieves the effective entitlements for a customer or resource, including
|
|
@@ -151,27 +170,36 @@ export class Customers extends APIResource {
|
|
|
151
170
|
* mechanisms, and low-latency guarantees. It is not recommended for hot-path
|
|
152
171
|
* entitlement checks. For production use, consider using the Stigg Node Server SDK
|
|
153
172
|
* with caching or the Sidecar for low-latency cached responses.
|
|
154
|
-
*
|
|
155
|
-
* @example
|
|
156
|
-
* ```ts
|
|
157
|
-
* const response =
|
|
158
|
-
* await client.v1.customers.retrieveEntitlements('x');
|
|
159
|
-
* ```
|
|
160
173
|
*/
|
|
161
|
-
retrieveEntitlements(id,
|
|
162
|
-
|
|
174
|
+
retrieveEntitlements(id, params = {}, options) {
|
|
175
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
176
|
+
return this._client.get(path `/api/v1/customers/${id}/entitlements`, {
|
|
177
|
+
query,
|
|
178
|
+
...options,
|
|
179
|
+
headers: buildHeaders([
|
|
180
|
+
{
|
|
181
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
182
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
183
|
+
},
|
|
184
|
+
options?.headers,
|
|
185
|
+
]),
|
|
186
|
+
});
|
|
163
187
|
}
|
|
164
188
|
/**
|
|
165
189
|
* Restores an archived customer, allowing them to create new subscriptions again.
|
|
166
|
-
*
|
|
167
|
-
* @example
|
|
168
|
-
* ```ts
|
|
169
|
-
* const customerResponse =
|
|
170
|
-
* await client.v1.customers.unarchive('x');
|
|
171
|
-
* ```
|
|
172
190
|
*/
|
|
173
|
-
unarchive(id, options) {
|
|
174
|
-
|
|
191
|
+
unarchive(id, params = {}, options) {
|
|
192
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
193
|
+
return this._client.post(path `/api/v1/customers/${id}/unarchive`, {
|
|
194
|
+
...options,
|
|
195
|
+
headers: buildHeaders([
|
|
196
|
+
{
|
|
197
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
198
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
199
|
+
},
|
|
200
|
+
options?.headers,
|
|
201
|
+
]),
|
|
202
|
+
});
|
|
175
203
|
}
|
|
176
204
|
}
|
|
177
205
|
Customers.PaymentMethod = PaymentMethod;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customers.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/customers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,eAAe,2BAAuB;AAClD,OAAO,EAQL,YAAY,GACb,2BAAuB;AACxB,OAAO,KAAK,gBAAgB,6BAAyB;AACrD,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"customers.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/customers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,eAAe,2BAAuB;AAClD,OAAO,EAQL,YAAY,GACb,2BAAuB;AACxB,OAAO,KAAK,gBAAgB,6BAAyB;AACrD,OAAO,EAAE,aAAa,EAAwD,6BAAyB;AACvG,OAAO,KAAK,0BAA0B,uCAAmC;AACzE,OAAO,EAQL,uBAAuB,GACxB,uCAAmC;AAEpC,OAAO,EAAE,cAAc,EAA0C,qCAAiC;AAClG,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjG,4BAAuB,GACrB,IAAI,0BAA0B,CAAC,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OA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C,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAugGD,SAAS,CAAC,aAAa,GAAG,aAAa,CAAC;AACxC,SAAS,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;AAC5D,SAAS,CAAC,YAAY,GAAG,YAAY,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Customers, type CustomerIntegrationResponse, type CustomerResponse, type CustomerListResponse, type CustomerCheckEntitlementResponse, type CustomerImportResponse, type CustomerListResourcesResponse, type CustomerRetrieveEntitlementsResponse, type CustomerUpdateParams, type CustomerListParams, type CustomerCheckEntitlementParams, type CustomerImportParams, type CustomerListResourcesParams, type CustomerProvisionParams, type CustomerRetrieveEntitlementsParams, type CustomerListResponsesMyCursorIDPage, type CustomerListResourcesResponsesMyCursorIDPage, } from "./customers.mjs";
|
|
1
|
+
export { Customers, type CustomerIntegrationResponse, type CustomerResponse, type CustomerListResponse, type CustomerCheckEntitlementResponse, type CustomerImportResponse, type CustomerListResourcesResponse, type CustomerRetrieveEntitlementsResponse, type CustomerRetrieveParams, type CustomerUpdateParams, type CustomerListParams, type CustomerArchiveParams, type CustomerCheckEntitlementParams, type CustomerImportParams, type CustomerListResourcesParams, type CustomerProvisionParams, type CustomerRetrieveEntitlementsParams, type CustomerUnarchiveParams, type CustomerListResponsesMyCursorIDPage, type CustomerListResourcesResponsesMyCursorIDPage, } from "./customers.mjs";
|
|
2
2
|
export { Integrations, type IntegrationListResponse, type IntegrationRetrieveParams, type IntegrationUpdateParams, type IntegrationListParams, type IntegrationLinkParams, type IntegrationUnlinkParams, type IntegrationListResponsesMyCursorIDPage, } from "./integrations.mjs";
|
|
3
|
-
export { PaymentMethod, type PaymentMethodAttachParams } from "./payment-method.mjs";
|
|
3
|
+
export { PaymentMethod, type PaymentMethodAttachParams, type PaymentMethodDetachParams, } from "./payment-method.mjs";
|
|
4
4
|
export { PromotionalEntitlements, type PromotionalEntitlementCreateResponse, type PromotionalEntitlementListResponse, type PromotionalEntitlementRevokeResponse, type PromotionalEntitlementCreateParams, type PromotionalEntitlementListParams, type PromotionalEntitlementRevokeParams, type PromotionalEntitlementListResponsesMyCursorIDPage, } from "./promotional-entitlements.mjs";
|
|
5
5
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/customers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EACxC,KAAK,4CAA4C,GAClD,wBAAoB;AACrB,OAAO,EACL,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,sCAAsC,GAC5C,2BAAuB;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/customers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,kCAAkC,EACvC,KAAK,uBAAuB,EAC5B,KAAK,mCAAmC,EACxC,KAAK,4CAA4C,GAClD,wBAAoB;AACrB,OAAO,EACL,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,sCAAsC,GAC5C,2BAAuB;AACxB,OAAO,EACL,aAAa,EACb,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,GAC/B,6BAAyB;AAC1B,OAAO,EACL,uBAAuB,EACvB,KAAK,oCAAoC,EACzC,KAAK,kCAAkC,EACvC,KAAK,oCAAoC,EACzC,KAAK,kCAAkC,EACvC,KAAK,gCAAgC,EACrC,KAAK,kCAAkC,EACvC,KAAK,iDAAiD,GACvD,uCAAmC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Customers, type CustomerIntegrationResponse, type CustomerResponse, type CustomerListResponse, type CustomerCheckEntitlementResponse, type CustomerImportResponse, type CustomerListResourcesResponse, type CustomerRetrieveEntitlementsResponse, type CustomerUpdateParams, type CustomerListParams, type CustomerCheckEntitlementParams, type CustomerImportParams, type CustomerListResourcesParams, type CustomerProvisionParams, type CustomerRetrieveEntitlementsParams, type CustomerListResponsesMyCursorIDPage, type CustomerListResourcesResponsesMyCursorIDPage, } from "./customers.js";
|
|
1
|
+
export { Customers, type CustomerIntegrationResponse, type CustomerResponse, type CustomerListResponse, type CustomerCheckEntitlementResponse, type CustomerImportResponse, type CustomerListResourcesResponse, type CustomerRetrieveEntitlementsResponse, type CustomerRetrieveParams, type CustomerUpdateParams, type CustomerListParams, type CustomerArchiveParams, type CustomerCheckEntitlementParams, type CustomerImportParams, type CustomerListResourcesParams, type CustomerProvisionParams, type CustomerRetrieveEntitlementsParams, type CustomerUnarchiveParams, type CustomerListResponsesMyCursorIDPage, type CustomerListResourcesResponsesMyCursorIDPage, } from "./customers.js";
|
|
2
2
|
export { Integrations, type IntegrationListResponse, type IntegrationRetrieveParams, type IntegrationUpdateParams, type IntegrationListParams, type IntegrationLinkParams, type IntegrationUnlinkParams, type IntegrationListResponsesMyCursorIDPage, } from "./integrations.js";
|
|
3
|
-
export { PaymentMethod, type PaymentMethodAttachParams } from "./payment-method.js";
|
|
3
|
+
export { PaymentMethod, type PaymentMethodAttachParams, type PaymentMethodDetachParams, } from "./payment-method.js";
|
|
4
4
|
export { PromotionalEntitlements, type PromotionalEntitlementCreateResponse, type PromotionalEntitlementListResponse, type PromotionalEntitlementRevokeResponse, type PromotionalEntitlementCreateParams, type PromotionalEntitlementListParams, type PromotionalEntitlementRevokeParams, type PromotionalEntitlementListResponsesMyCursorIDPage, } from "./promotional-entitlements.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|