@stigg/typescript 0.1.0-beta.10 → 0.1.0-beta.13
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 +24 -0
- package/client.d.mts +0 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +0 -3
- package/client.d.ts.map +1 -1
- package/client.js +0 -3
- package/client.js.map +1 -1
- package/client.mjs +0 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +0 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +0 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +1 -1
- package/resources/v1/addons/addons.d.mts +226 -193
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +226 -193
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +60 -4
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +60 -4
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts +31 -0
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts +31 -0
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/entitlements.js +31 -0
- package/resources/v1/addons/entitlements.js.map +1 -1
- package/resources/v1/addons/entitlements.mjs +31 -0
- package/resources/v1/addons/entitlements.mjs.map +1 -1
- package/resources/v1/addons/index.d.mts +1 -1
- package/resources/v1/addons/index.d.mts.map +1 -1
- package/resources/v1/addons/index.d.ts +1 -1
- package/resources/v1/addons/index.d.ts.map +1 -1
- package/resources/v1/coupons.d.mts +36 -0
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +36 -0
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +36 -0
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +36 -0
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/credits/credits.d.mts +25 -0
- package/resources/v1/credits/credits.d.mts.map +1 -1
- package/resources/v1/credits/credits.d.ts +25 -0
- package/resources/v1/credits/credits.d.ts.map +1 -1
- package/resources/v1/credits/credits.js +25 -0
- package/resources/v1/credits/credits.js.map +1 -1
- package/resources/v1/credits/credits.mjs +25 -0
- package/resources/v1/credits/credits.mjs.map +1 -1
- package/resources/v1/credits/custom-currencies.d.mts +49 -0
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
- package/resources/v1/credits/custom-currencies.d.ts +49 -0
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
- package/resources/v1/credits/custom-currencies.js +49 -0
- package/resources/v1/credits/custom-currencies.js.map +1 -1
- package/resources/v1/credits/custom-currencies.mjs +49 -0
- package/resources/v1/credits/custom-currencies.mjs.map +1 -1
- package/resources/v1/credits/grants.d.mts +28 -0
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +28 -0
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/credits/grants.js +28 -0
- package/resources/v1/credits/grants.js.map +1 -1
- package/resources/v1/credits/grants.mjs +28 -0
- package/resources/v1/credits/grants.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +82 -5
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +82 -5
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +77 -0
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +77 -0
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +50 -3
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +50 -3
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/integrations.js +47 -0
- package/resources/v1/customers/integrations.js.map +1 -1
- package/resources/v1/customers/integrations.mjs +47 -0
- package/resources/v1/customers/integrations.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +17 -1
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +17 -1
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +16 -0
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +16 -0
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +51 -0
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +51 -0
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.js +51 -0
- package/resources/v1/customers/promotional-entitlements.js.map +1 -1
- package/resources/v1/customers/promotional-entitlements.mjs +51 -0
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
- package/resources/{v1-beta/v1-beta.d.mts → v1/events/beta/beta.d.mts} +4 -4
- package/resources/v1/events/beta/beta.d.mts.map +1 -0
- package/resources/{v1-beta/v1-beta.d.ts → v1/events/beta/beta.d.ts} +4 -4
- package/resources/v1/events/beta/beta.d.ts.map +1 -0
- package/resources/{v1-beta/v1-beta.js → v1/events/beta/beta.js} +8 -8
- package/resources/v1/events/beta/beta.js.map +1 -0
- package/resources/{v1-beta/v1-beta.mjs → v1/events/beta/beta.mjs} +5 -5
- package/resources/v1/events/beta/beta.mjs.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/assignments.d.mts +24 -21
- package/resources/v1/events/beta/customers/assignments.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/assignments.d.ts +24 -21
- package/resources/v1/events/beta/customers/assignments.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/assignments.js +23 -20
- package/resources/v1/events/beta/customers/assignments.js.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/assignments.mjs +23 -20
- package/resources/v1/events/beta/customers/assignments.mjs.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/customers.d.mts +3 -3
- package/resources/v1/events/beta/customers/customers.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/customers.d.ts +3 -3
- package/resources/v1/events/beta/customers/customers.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/customers.js +2 -2
- package/resources/v1/events/beta/customers/customers.js.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/customers.mjs +1 -1
- package/resources/v1/events/beta/customers/customers.mjs.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entities.d.mts +82 -62
- package/resources/v1/events/beta/customers/entities.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entities.d.ts +82 -62
- package/resources/v1/events/beta/customers/entities.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entities.js +38 -29
- package/resources/v1/events/beta/customers/entities.js.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entities.mjs +38 -29
- package/resources/v1/events/beta/customers/entities.mjs.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entitlements.d.mts +6 -4
- package/resources/v1/events/beta/customers/entitlements.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entitlements.d.ts +6 -4
- package/resources/v1/events/beta/customers/entitlements.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entitlements.js +5 -3
- package/resources/v1/events/beta/customers/entitlements.js.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entitlements.mjs +5 -3
- package/resources/v1/events/beta/customers/entitlements.mjs.map +1 -0
- package/resources/v1/events/beta/customers/index.d.mts +5 -0
- package/resources/v1/events/beta/customers/index.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/index.d.ts +5 -0
- package/resources/v1/events/beta/customers/index.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/index.js.map +1 -0
- package/resources/v1/events/beta/customers/index.mjs.map +1 -0
- package/resources/v1/events/beta/customers.d.mts.map +1 -0
- package/resources/v1/events/beta/customers.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers.js +1 -1
- package/resources/v1/events/beta/customers.js.map +1 -0
- package/resources/v1/events/beta/customers.mjs.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/entity-types.d.mts +20 -19
- package/resources/v1/events/beta/entity-types.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/entity-types.d.ts +20 -19
- package/resources/v1/events/beta/entity-types.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/entity-types.js +18 -17
- package/resources/v1/events/beta/entity-types.js.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/entity-types.mjs +18 -17
- package/resources/v1/events/beta/entity-types.mjs.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/index.d.mts +1 -1
- package/resources/v1/events/beta/index.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/index.d.ts +1 -1
- package/resources/v1/events/beta/index.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/index.js +3 -3
- package/resources/v1/events/beta/index.js.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/index.mjs +1 -1
- package/resources/v1/events/beta/index.mjs.map +1 -0
- package/resources/v1/events/beta.d.mts +2 -0
- package/resources/v1/events/beta.d.mts.map +1 -0
- package/resources/v1/events/beta.d.ts +2 -0
- package/resources/v1/events/beta.d.ts.map +1 -0
- package/resources/{v1-beta.js → v1/events/beta.js} +3 -3
- package/resources/v1/events/beta.js.map +1 -0
- package/resources/{v1-beta.mjs → v1/events/beta.mjs} +2 -2
- package/resources/v1/events/beta.mjs.map +1 -0
- package/resources/v1/events/events.d.mts +83 -0
- package/resources/v1/events/events.d.mts.map +1 -0
- package/resources/v1/events/events.d.ts +83 -0
- package/resources/v1/events/events.d.ts.map +1 -0
- package/resources/v1/events/events.js +40 -0
- package/resources/v1/events/events.js.map +1 -0
- package/resources/v1/events/events.mjs +35 -0
- package/resources/v1/events/events.mjs.map +1 -0
- package/resources/v1/events/index.d.mts +3 -0
- package/resources/v1/events/index.d.mts.map +1 -0
- package/resources/v1/events/index.d.ts +3 -0
- package/resources/v1/events/index.d.ts.map +1 -0
- package/resources/v1/events/index.js +9 -0
- package/resources/v1/events/index.js.map +1 -0
- package/resources/v1/events/index.mjs +4 -0
- package/resources/v1/events/index.mjs.map +1 -0
- package/resources/v1/events.d.mts +1 -65
- package/resources/v1/events.d.mts.map +1 -1
- package/resources/v1/events.d.ts +1 -65
- package/resources/v1/events.d.ts.map +1 -1
- package/resources/v1/events.js +2 -15
- package/resources/v1/events.js.map +1 -1
- package/resources/v1/events.mjs +1 -13
- package/resources/v1/events.mjs.map +1 -1
- package/resources/v1/features.d.mts +43 -0
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +43 -0
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/features.js +43 -0
- package/resources/v1/features.js.map +1 -1
- package/resources/v1/features.mjs +43 -0
- package/resources/v1/features.mjs.map +1 -1
- package/resources/v1/index.d.mts +3 -3
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +3 -3
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +6 -6
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +31 -0
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts +31 -0
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/entitlements.js +31 -0
- package/resources/v1/plans/entitlements.js.map +1 -1
- package/resources/v1/plans/entitlements.mjs +31 -0
- package/resources/v1/plans/entitlements.mjs.map +1 -1
- package/resources/v1/plans/index.d.mts +1 -1
- package/resources/v1/plans/index.d.mts.map +1 -1
- package/resources/v1/plans/index.d.ts +1 -1
- 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 +402 -6
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +402 -6
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +69 -0
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +69 -0
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +43 -0
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +43 -0
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.js +43 -0
- package/resources/v1/products.js.map +1 -1
- package/resources/v1/products.mjs +43 -0
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +16 -0
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +16 -0
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +16 -0
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +16 -0
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts +6 -0
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts +6 -0
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.js +6 -0
- package/resources/v1/subscriptions/invoice.js.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs +6 -0
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +81 -0
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +81 -0
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +81 -0
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +81 -0
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +13 -0
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts +13 -0
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- package/resources/v1/subscriptions/usage.js +13 -0
- package/resources/v1/subscriptions/usage.js.map +1 -1
- package/resources/v1/subscriptions/usage.mjs +13 -0
- package/resources/v1/subscriptions/usage.mjs.map +1 -1
- package/resources/v1/usage.d.mts +24 -0
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +24 -0
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +24 -0
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +24 -0
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +6 -6
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +6 -6
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +2 -2
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +2 -2
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +0 -5
- package/src/resources/index.ts +0 -1
- package/src/resources/v1/addons/addons.ts +517 -487
- package/src/resources/v1/addons/entitlements.ts +31 -0
- package/src/resources/v1/addons/index.ts +2 -2
- package/src/resources/v1/coupons.ts +36 -0
- package/src/resources/v1/credits/credits.ts +25 -0
- package/src/resources/v1/credits/custom-currencies.ts +49 -0
- package/src/resources/v1/credits/grants.ts +28 -0
- package/src/resources/v1/customers/customers.ts +92 -5
- package/src/resources/v1/customers/integrations.ts +55 -2
- package/src/resources/v1/customers/payment-method.ts +19 -1
- package/src/resources/v1/customers/promotional-entitlements.ts +51 -0
- package/src/resources/{v1-beta/v1-beta.ts → v1/events/beta/beta.ts} +5 -5
- package/src/resources/{v1-beta → v1/events/beta}/customers/assignments.ts +25 -22
- package/src/resources/{v1-beta → v1/events/beta}/customers/customers.ts +5 -5
- package/src/resources/{v1-beta → v1/events/beta}/customers/entities.ts +88 -67
- package/src/resources/{v1-beta → v1/events/beta}/customers/entitlements.ts +7 -5
- package/src/resources/{v1-beta → v1/events/beta}/customers/index.ts +2 -2
- package/src/resources/{v1-beta → v1/events/beta}/entity-types.ts +20 -19
- package/src/resources/{v1-beta → v1/events/beta}/index.ts +1 -1
- package/src/resources/{v1-beta.ts → v1/events/beta.ts} +1 -1
- package/src/resources/v1/events/events.ts +98 -0
- package/src/resources/v1/events/index.ts +4 -0
- package/src/resources/v1/events.ts +1 -75
- package/src/resources/v1/features.ts +43 -0
- package/src/resources/v1/index.ts +7 -3
- package/src/resources/v1/plans/entitlements.ts +31 -0
- package/src/resources/v1/plans/index.ts +4 -0
- package/src/resources/v1/plans/plans.ts +1169 -8
- package/src/resources/v1/products.ts +43 -0
- package/src/resources/v1/subscriptions/future-update.ts +16 -0
- package/src/resources/v1/subscriptions/invoice.ts +6 -0
- package/src/resources/v1/subscriptions/subscriptions.ts +81 -0
- package/src/resources/v1/subscriptions/usage.ts +13 -0
- package/src/resources/v1/usage.ts +24 -0
- package/src/resources/v1/v1.ts +14 -6
- 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-beta/customers/assignments.d.mts.map +0 -1
- package/resources/v1-beta/customers/assignments.d.ts.map +0 -1
- package/resources/v1-beta/customers/assignments.js.map +0 -1
- package/resources/v1-beta/customers/assignments.mjs.map +0 -1
- package/resources/v1-beta/customers/customers.d.mts.map +0 -1
- package/resources/v1-beta/customers/customers.d.ts.map +0 -1
- package/resources/v1-beta/customers/customers.js.map +0 -1
- package/resources/v1-beta/customers/customers.mjs.map +0 -1
- package/resources/v1-beta/customers/entities.d.mts.map +0 -1
- package/resources/v1-beta/customers/entities.d.ts.map +0 -1
- package/resources/v1-beta/customers/entities.js.map +0 -1
- package/resources/v1-beta/customers/entities.mjs.map +0 -1
- package/resources/v1-beta/customers/entitlements.d.mts.map +0 -1
- package/resources/v1-beta/customers/entitlements.d.ts.map +0 -1
- package/resources/v1-beta/customers/entitlements.js.map +0 -1
- package/resources/v1-beta/customers/entitlements.mjs.map +0 -1
- package/resources/v1-beta/customers/index.d.mts +0 -5
- package/resources/v1-beta/customers/index.d.mts.map +0 -1
- package/resources/v1-beta/customers/index.d.ts +0 -5
- package/resources/v1-beta/customers/index.d.ts.map +0 -1
- package/resources/v1-beta/customers/index.js.map +0 -1
- package/resources/v1-beta/customers/index.mjs.map +0 -1
- package/resources/v1-beta/customers.d.mts.map +0 -1
- package/resources/v1-beta/customers.d.ts.map +0 -1
- package/resources/v1-beta/customers.js.map +0 -1
- package/resources/v1-beta/customers.mjs.map +0 -1
- package/resources/v1-beta/entity-types.d.mts.map +0 -1
- package/resources/v1-beta/entity-types.d.ts.map +0 -1
- package/resources/v1-beta/entity-types.js.map +0 -1
- package/resources/v1-beta/entity-types.mjs.map +0 -1
- package/resources/v1-beta/index.d.mts.map +0 -1
- package/resources/v1-beta/index.d.ts.map +0 -1
- package/resources/v1-beta/index.js.map +0 -1
- package/resources/v1-beta/index.mjs.map +0 -1
- package/resources/v1-beta/v1-beta.d.mts.map +0 -1
- package/resources/v1-beta/v1-beta.d.ts.map +0 -1
- package/resources/v1-beta/v1-beta.js.map +0 -1
- package/resources/v1-beta/v1-beta.mjs.map +0 -1
- package/resources/v1-beta.d.mts +0 -2
- package/resources/v1-beta.d.mts.map +0 -1
- package/resources/v1-beta.d.ts +0 -2
- package/resources/v1-beta.d.ts.map +0 -1
- package/resources/v1-beta.js.map +0 -1
- package/resources/v1-beta.mjs.map +0 -1
- /package/resources/{v1-beta → v1/events/beta}/customers/index.js +0 -0
- /package/resources/{v1-beta → v1/events/beta}/customers/index.mjs +0 -0
- /package/resources/{v1-beta → v1/events/beta}/customers.d.mts +0 -0
- /package/resources/{v1-beta → v1/events/beta}/customers.d.ts +0 -0
- /package/resources/{v1-beta → v1/events/beta}/customers.mjs +0 -0
- /package/src/resources/{v1-beta → v1/events/beta}/customers.ts +0 -0
|
@@ -8,6 +8,14 @@ import { path } from '../../../internal/utils/path';
|
|
|
8
8
|
export class Entitlements extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Creates one or more entitlements (feature or credit) on a draft addon.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const entitlement =
|
|
15
|
+
* await client.v1.addons.entitlements.create('addonId', {
|
|
16
|
+
* entitlements: [{ id: 'id', type: 'FEATURE' }],
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
11
19
|
*/
|
|
12
20
|
create(
|
|
13
21
|
addonID: string,
|
|
@@ -19,6 +27,15 @@ export class Entitlements extends APIResource {
|
|
|
19
27
|
|
|
20
28
|
/**
|
|
21
29
|
* Updates an existing entitlement on a draft addon.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const addonPackageEntitlement =
|
|
34
|
+
* await client.v1.addons.entitlements.update('id', {
|
|
35
|
+
* addonId: 'addonId',
|
|
36
|
+
* type: 'FEATURE',
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
22
39
|
*/
|
|
23
40
|
update(
|
|
24
41
|
id: string,
|
|
@@ -31,6 +48,12 @@ export class Entitlements extends APIResource {
|
|
|
31
48
|
|
|
32
49
|
/**
|
|
33
50
|
* Retrieves a list of entitlements for an addon.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const entitlements =
|
|
55
|
+
* await client.v1.addons.entitlements.list('addonId');
|
|
56
|
+
* ```
|
|
34
57
|
*/
|
|
35
58
|
list(addonID: string, options?: RequestOptions): APIPromise<EntitlementListResponse> {
|
|
36
59
|
return this._client.get(path`/api/v1/addons/${addonID}/entitlements`, options);
|
|
@@ -38,6 +61,14 @@ export class Entitlements extends APIResource {
|
|
|
38
61
|
|
|
39
62
|
/**
|
|
40
63
|
* Deletes an entitlement from a draft addon.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const addonPackageEntitlement =
|
|
68
|
+
* await client.v1.addons.entitlements.delete('id', {
|
|
69
|
+
* addonId: 'addonId',
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
41
72
|
*/
|
|
42
73
|
delete(
|
|
43
74
|
id: string,
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
export {
|
|
4
4
|
Addons,
|
|
5
5
|
type Addon,
|
|
6
|
-
type ChargeList,
|
|
7
6
|
type AddonListResponse,
|
|
7
|
+
type AddonListChargesResponse,
|
|
8
8
|
type AddonPublishResponse,
|
|
9
9
|
type AddonRemoveDraftResponse,
|
|
10
10
|
type AddonCreateParams,
|
|
@@ -13,7 +13,7 @@ export {
|
|
|
13
13
|
type AddonListChargesParams,
|
|
14
14
|
type AddonPublishParams,
|
|
15
15
|
type AddonListResponsesMyCursorIDPage,
|
|
16
|
-
type
|
|
16
|
+
type AddonListChargesResponsesMyCursorIDPage,
|
|
17
17
|
} from './addons';
|
|
18
18
|
export {
|
|
19
19
|
Entitlements,
|
|
@@ -13,6 +13,19 @@ export class Coupons extends APIResource {
|
|
|
13
13
|
/**
|
|
14
14
|
* Creates a new discount coupon with percentage or fixed amount off, applicable to
|
|
15
15
|
* customer subscriptions.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const coupon = await client.v1.coupons.create({
|
|
20
|
+
* id: 'id',
|
|
21
|
+
* amountsOff: [{ amount: 0, currency: 'usd' }],
|
|
22
|
+
* description: 'description',
|
|
23
|
+
* durationInMonths: 1,
|
|
24
|
+
* metadata: { foo: 'string' },
|
|
25
|
+
* name: 'name',
|
|
26
|
+
* percentOff: 1,
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
16
29
|
*/
|
|
17
30
|
create(body: CouponCreateParams, options?: RequestOptions): APIPromise<Coupon> {
|
|
18
31
|
return this._client.post('/api/v1/coupons', { body, ...options });
|
|
@@ -20,6 +33,11 @@ export class Coupons extends APIResource {
|
|
|
20
33
|
|
|
21
34
|
/**
|
|
22
35
|
* Retrieves a coupon by its unique identifier.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const coupon = await client.v1.coupons.retrieve('x');
|
|
40
|
+
* ```
|
|
23
41
|
*/
|
|
24
42
|
retrieve(id: string, options?: RequestOptions): APIPromise<Coupon> {
|
|
25
43
|
return this._client.get(path`/api/v1/coupons/${id}`, options);
|
|
@@ -27,6 +45,14 @@ export class Coupons extends APIResource {
|
|
|
27
45
|
|
|
28
46
|
/**
|
|
29
47
|
* Retrieves a paginated list of coupons in the environment.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* // Automatically fetches more pages as needed.
|
|
52
|
+
* for await (const couponListResponse of client.v1.coupons.list()) {
|
|
53
|
+
* // ...
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
30
56
|
*/
|
|
31
57
|
list(
|
|
32
58
|
query: CouponListParams | null | undefined = {},
|
|
@@ -40,6 +66,11 @@ export class Coupons extends APIResource {
|
|
|
40
66
|
|
|
41
67
|
/**
|
|
42
68
|
* Archives a coupon, preventing it from being applied to new subscriptions.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const coupon = await client.v1.coupons.archiveCoupon('x');
|
|
73
|
+
* ```
|
|
43
74
|
*/
|
|
44
75
|
archiveCoupon(id: string, options?: RequestOptions): APIPromise<Coupon> {
|
|
45
76
|
return this._client.post(path`/api/v1/coupons/${id}/archive`, options);
|
|
@@ -47,6 +78,11 @@ export class Coupons extends APIResource {
|
|
|
47
78
|
|
|
48
79
|
/**
|
|
49
80
|
* Updates an existing coupon's properties such as name, description, and metadata.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const coupon = await client.v1.coupons.updateCoupon('x');
|
|
85
|
+
* ```
|
|
50
86
|
*/
|
|
51
87
|
updateCoupon(id: string, body: CouponUpdateCouponParams, options?: RequestOptions): APIPromise<Coupon> {
|
|
52
88
|
return this._client.patch(path`/api/v1/coupons/${id}`, { body, ...options });
|
|
@@ -34,6 +34,14 @@ export class Credits extends APIResource {
|
|
|
34
34
|
/**
|
|
35
35
|
* Retrieves the automatic recharge configuration for a customer and currency.
|
|
36
36
|
* Returns default settings if no configuration exists.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const response = await client.v1.credits.getAutoRecharge({
|
|
41
|
+
* currencyId: 'currencyId',
|
|
42
|
+
* customerId: 'customerId',
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
37
45
|
*/
|
|
38
46
|
getAutoRecharge(
|
|
39
47
|
query: CreditGetAutoRechargeParams,
|
|
@@ -45,6 +53,13 @@ export class Credits extends APIResource {
|
|
|
45
53
|
/**
|
|
46
54
|
* Retrieves credit usage time-series data for a customer, grouped by feature, over
|
|
47
55
|
* a specified time range.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const response = await client.v1.credits.getUsage({
|
|
60
|
+
* customerId: 'customerId',
|
|
61
|
+
* });
|
|
62
|
+
* ```
|
|
48
63
|
*/
|
|
49
64
|
getUsage(query: CreditGetUsageParams, options?: RequestOptions): APIPromise<CreditGetUsageResponse> {
|
|
50
65
|
return this._client.get('/api/v1/credits/usage', { query, ...options });
|
|
@@ -52,6 +67,16 @@ export class Credits extends APIResource {
|
|
|
52
67
|
|
|
53
68
|
/**
|
|
54
69
|
* Retrieves a paginated list of credit ledger events for a customer.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* // Automatically fetches more pages as needed.
|
|
74
|
+
* for await (const creditListLedgerResponse of client.v1.credits.listLedger(
|
|
75
|
+
* { customerId: 'customerId' },
|
|
76
|
+
* )) {
|
|
77
|
+
* // ...
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
55
80
|
*/
|
|
56
81
|
listLedger(
|
|
57
82
|
query: CreditListLedgerParams,
|
|
@@ -12,6 +12,15 @@ import { path } from '../../../internal/utils/path';
|
|
|
12
12
|
export class CustomCurrencies extends APIResource {
|
|
13
13
|
/**
|
|
14
14
|
* Creates a new custom currency in the environment.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const customCurrencyResponse =
|
|
19
|
+
* await client.v1.credits.customCurrencies.create({
|
|
20
|
+
* id: 'id',
|
|
21
|
+
* displayName: 'displayName',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
15
24
|
*/
|
|
16
25
|
create(body: CustomCurrencyCreateParams, options?: RequestOptions): APIPromise<CustomCurrencyResponse> {
|
|
17
26
|
return this._client.post('/api/v1/credits/custom-currencies', { body, ...options });
|
|
@@ -19,6 +28,14 @@ export class CustomCurrencies extends APIResource {
|
|
|
19
28
|
|
|
20
29
|
/**
|
|
21
30
|
* Updates an existing custom currency. Only the supplied fields are modified.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const customCurrencyResponse =
|
|
35
|
+
* await client.v1.credits.customCurrencies.update(
|
|
36
|
+
* 'currencyId',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
22
39
|
*/
|
|
23
40
|
update(
|
|
24
41
|
currencyID: string,
|
|
@@ -32,6 +49,14 @@ export class CustomCurrencies extends APIResource {
|
|
|
32
49
|
* Retrieves a paginated list of custom currencies in the environment. Archived
|
|
33
50
|
* currencies are excluded by default; pass `status=ARCHIVED` (or
|
|
34
51
|
* `status=ACTIVE,ARCHIVED`) to include them.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* // Automatically fetches more pages as needed.
|
|
56
|
+
* for await (const customCurrencyListResponse of client.v1.credits.customCurrencies.list()) {
|
|
57
|
+
* // ...
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
35
60
|
*/
|
|
36
61
|
list(
|
|
37
62
|
query: CustomCurrencyListParams | null | undefined = {},
|
|
@@ -48,6 +73,14 @@ export class CustomCurrencies extends APIResource {
|
|
|
48
73
|
* Archives a custom currency. Fails if the currency is still associated with any
|
|
49
74
|
* active plan or addon — use the associated-entities endpoint first to inspect
|
|
50
75
|
* dependencies.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const customCurrencyResponse =
|
|
80
|
+
* await client.v1.credits.customCurrencies.archive(
|
|
81
|
+
* 'currencyId',
|
|
82
|
+
* );
|
|
83
|
+
* ```
|
|
51
84
|
*/
|
|
52
85
|
archive(currencyID: string, options?: RequestOptions): APIPromise<CustomCurrencyResponse> {
|
|
53
86
|
return this._client.post(path`/api/v1/credits/custom-currencies/${currencyID}/archive`, options);
|
|
@@ -56,6 +89,14 @@ export class CustomCurrencies extends APIResource {
|
|
|
56
89
|
/**
|
|
57
90
|
* Lists the active plans and addons that reference a custom currency. Useful
|
|
58
91
|
* before archiving to inspect dependencies.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const response =
|
|
96
|
+
* await client.v1.credits.customCurrencies.listAssociatedEntities(
|
|
97
|
+
* 'currencyId',
|
|
98
|
+
* );
|
|
99
|
+
* ```
|
|
59
100
|
*/
|
|
60
101
|
listAssociatedEntities(
|
|
61
102
|
currencyID: string,
|
|
@@ -70,6 +111,14 @@ export class CustomCurrencies extends APIResource {
|
|
|
70
111
|
/**
|
|
71
112
|
* Restores a previously archived custom currency. Fails if another active currency
|
|
72
113
|
* with the same ID already exists.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* const customCurrencyResponse =
|
|
118
|
+
* await client.v1.credits.customCurrencies.unarchive(
|
|
119
|
+
* 'currencyId',
|
|
120
|
+
* );
|
|
121
|
+
* ```
|
|
73
122
|
*/
|
|
74
123
|
unarchive(currencyID: string, options?: RequestOptions): APIPromise<CustomCurrencyResponse> {
|
|
75
124
|
return this._client.post(path`/api/v1/credits/custom-currencies/${currencyID}/unarchive`, options);
|
|
@@ -13,6 +13,18 @@ export class Grants extends APIResource {
|
|
|
13
13
|
/**
|
|
14
14
|
* Creates a new credit grant for a customer with specified amount, type, and
|
|
15
15
|
* optional billing configuration.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const creditGrantResponse =
|
|
20
|
+
* await client.v1.credits.grants.create({
|
|
21
|
+
* amount: 0,
|
|
22
|
+
* currencyId: 'currencyId',
|
|
23
|
+
* customerId: 'customerId',
|
|
24
|
+
* displayName: 'displayName',
|
|
25
|
+
* grantType: 'PAID',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
16
28
|
*/
|
|
17
29
|
create(body: GrantCreateParams, options?: RequestOptions): APIPromise<CreditGrantResponse> {
|
|
18
30
|
return this._client.post('/api/v1/credits/grants', { body, ...options });
|
|
@@ -20,6 +32,16 @@ export class Grants extends APIResource {
|
|
|
20
32
|
|
|
21
33
|
/**
|
|
22
34
|
* Retrieves a paginated list of credit grants for a customer.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* // Automatically fetches more pages as needed.
|
|
39
|
+
* for await (const grantListResponse of client.v1.credits.grants.list(
|
|
40
|
+
* { customerId: 'customerId' },
|
|
41
|
+
* )) {
|
|
42
|
+
* // ...
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
23
45
|
*/
|
|
24
46
|
list(
|
|
25
47
|
query: GrantListParams,
|
|
@@ -34,6 +56,12 @@ export class Grants extends APIResource {
|
|
|
34
56
|
/**
|
|
35
57
|
* Voids an existing credit grant, preventing further consumption of the remaining
|
|
36
58
|
* credits.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const creditGrantResponse =
|
|
63
|
+
* await client.v1.credits.grants.void('x');
|
|
64
|
+
* ```
|
|
37
65
|
*/
|
|
38
66
|
void(id: string, options?: RequestOptions): APIPromise<CreditGrantResponse> {
|
|
39
67
|
return this._client.post(path`/api/v1/credits/grants/${id}/void`, options);
|
|
@@ -39,6 +39,13 @@ export class Customers extends APIResource {
|
|
|
39
39
|
/**
|
|
40
40
|
* Retrieves a customer by their unique identifier, including billing information
|
|
41
41
|
* and subscription status.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const customerResponse = await client.v1.customers.retrieve(
|
|
46
|
+
* 'x',
|
|
47
|
+
* );
|
|
48
|
+
* ```
|
|
42
49
|
*/
|
|
43
50
|
retrieve(id: string, options?: RequestOptions): APIPromise<CustomerResponse> {
|
|
44
51
|
return this._client.get(path`/api/v1/customers/${id}`, options);
|
|
@@ -47,6 +54,13 @@ export class Customers extends APIResource {
|
|
|
47
54
|
/**
|
|
48
55
|
* Updates an existing customer's properties such as name, email, and billing
|
|
49
56
|
* information.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const customerResponse = await client.v1.customers.update(
|
|
61
|
+
* 'x',
|
|
62
|
+
* );
|
|
63
|
+
* ```
|
|
50
64
|
*/
|
|
51
65
|
update(id: string, body: CustomerUpdateParams, options?: RequestOptions): APIPromise<CustomerResponse> {
|
|
52
66
|
return this._client.patch(path`/api/v1/customers/${id}`, { body, ...options });
|
|
@@ -54,6 +68,14 @@ export class Customers extends APIResource {
|
|
|
54
68
|
|
|
55
69
|
/**
|
|
56
70
|
* Retrieves a paginated list of customers in the environment.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* // Automatically fetches more pages as needed.
|
|
75
|
+
* for await (const customerListResponse of client.v1.customers.list()) {
|
|
76
|
+
* // ...
|
|
77
|
+
* }
|
|
78
|
+
* ```
|
|
57
79
|
*/
|
|
58
80
|
list(
|
|
59
81
|
query: CustomerListParams | null | undefined = {},
|
|
@@ -68,6 +90,13 @@ export class Customers extends APIResource {
|
|
|
68
90
|
/**
|
|
69
91
|
* Archives a customer, preventing new subscriptions. Optionally cancels existing
|
|
70
92
|
* subscriptions.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* const customerResponse = await client.v1.customers.archive(
|
|
97
|
+
* 'x',
|
|
98
|
+
* );
|
|
99
|
+
* ```
|
|
71
100
|
*/
|
|
72
101
|
archive(id: string, options?: RequestOptions): APIPromise<CustomerResponse> {
|
|
73
102
|
return this._client.post(path`/api/v1/customers/${id}/archive`, options);
|
|
@@ -82,6 +111,13 @@ export class Customers extends APIResource {
|
|
|
82
111
|
* mechanisms, and low-latency guarantees. It is not recommended for hot-path
|
|
83
112
|
* entitlement checks. For production use, consider using the Stigg Node Server SDK
|
|
84
113
|
* with caching or the Sidecar for low-latency cached responses.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* const response = await client.v1.customers.checkEntitlement(
|
|
118
|
+
* 'x',
|
|
119
|
+
* );
|
|
120
|
+
* ```
|
|
85
121
|
*/
|
|
86
122
|
checkEntitlement(
|
|
87
123
|
id: string,
|
|
@@ -94,6 +130,19 @@ export class Customers extends APIResource {
|
|
|
94
130
|
/**
|
|
95
131
|
* Imports multiple customers in bulk. Used for migrating customer data from
|
|
96
132
|
* external systems.
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```ts
|
|
136
|
+
* const response = await client.v1.customers.import({
|
|
137
|
+
* customers: [
|
|
138
|
+
* {
|
|
139
|
+
* id: 'id',
|
|
140
|
+
* email: 'dev@stainless.com',
|
|
141
|
+
* name: 'name',
|
|
142
|
+
* },
|
|
143
|
+
* ],
|
|
144
|
+
* });
|
|
145
|
+
* ```
|
|
97
146
|
*/
|
|
98
147
|
import(body: CustomerImportParams, options?: RequestOptions): APIPromise<CustomerImportResponse> {
|
|
99
148
|
return this._client.post('/api/v1/customers/import', { body, ...options });
|
|
@@ -101,6 +150,16 @@ export class Customers extends APIResource {
|
|
|
101
150
|
|
|
102
151
|
/**
|
|
103
152
|
* Retrieves a paginated list of resources within the same customer.
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```ts
|
|
156
|
+
* // Automatically fetches more pages as needed.
|
|
157
|
+
* for await (const customerListResourcesResponse of client.v1.customers.listResources(
|
|
158
|
+
* 'x',
|
|
159
|
+
* )) {
|
|
160
|
+
* // ...
|
|
161
|
+
* }
|
|
162
|
+
* ```
|
|
104
163
|
*/
|
|
105
164
|
listResources(
|
|
106
165
|
id: string,
|
|
@@ -117,6 +176,12 @@ export class Customers extends APIResource {
|
|
|
117
176
|
/**
|
|
118
177
|
* Creates a new customer and optionally provisions an initial subscription in a
|
|
119
178
|
* single operation.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```ts
|
|
182
|
+
* const customerResponse =
|
|
183
|
+
* await client.v1.customers.provision({ id: 'id' });
|
|
184
|
+
* ```
|
|
120
185
|
*/
|
|
121
186
|
provision(body: CustomerProvisionParams, options?: RequestOptions): APIPromise<CustomerResponse> {
|
|
122
187
|
return this._client.post('/api/v1/customers', { body, ...options });
|
|
@@ -130,6 +195,12 @@ export class Customers extends APIResource {
|
|
|
130
195
|
* mechanisms, and low-latency guarantees. It is not recommended for hot-path
|
|
131
196
|
* entitlement checks. For production use, consider using the Stigg Node Server SDK
|
|
132
197
|
* with caching or the Sidecar for low-latency cached responses.
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```ts
|
|
201
|
+
* const response =
|
|
202
|
+
* await client.v1.customers.retrieveEntitlements('x');
|
|
203
|
+
* ```
|
|
133
204
|
*/
|
|
134
205
|
retrieveEntitlements(
|
|
135
206
|
id: string,
|
|
@@ -141,6 +212,12 @@ export class Customers extends APIResource {
|
|
|
141
212
|
|
|
142
213
|
/**
|
|
143
214
|
* Restores an archived customer, allowing them to create new subscriptions again.
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* ```ts
|
|
218
|
+
* const customerResponse =
|
|
219
|
+
* await client.v1.customers.unarchive('x');
|
|
220
|
+
* ```
|
|
144
221
|
*/
|
|
145
222
|
unarchive(id: string, options?: RequestOptions): APIPromise<CustomerResponse> {
|
|
146
223
|
return this._client.post(path`/api/v1/customers/${id}/unarchive`, options);
|
|
@@ -189,7 +266,9 @@ export namespace CustomerIntegrationResponse {
|
|
|
189
266
|
| 'SALESFORCE'
|
|
190
267
|
| 'BIG_QUERY'
|
|
191
268
|
| 'OPEN_FGA'
|
|
192
|
-
| 'APP_STORE'
|
|
269
|
+
| 'APP_STORE'
|
|
270
|
+
| 'RECEIVED'
|
|
271
|
+
| 'PREQUEL';
|
|
193
272
|
|
|
194
273
|
/**
|
|
195
274
|
* Price billing sync revision data containing billing ID, link URL, and price
|
|
@@ -517,7 +596,9 @@ export namespace CustomerResponse {
|
|
|
517
596
|
| 'SALESFORCE'
|
|
518
597
|
| 'BIG_QUERY'
|
|
519
598
|
| 'OPEN_FGA'
|
|
520
|
-
| 'APP_STORE'
|
|
599
|
+
| 'APP_STORE'
|
|
600
|
+
| 'RECEIVED'
|
|
601
|
+
| 'PREQUEL';
|
|
521
602
|
}
|
|
522
603
|
|
|
523
604
|
/**
|
|
@@ -1099,7 +1180,9 @@ export namespace CustomerListResponse {
|
|
|
1099
1180
|
| 'SALESFORCE'
|
|
1100
1181
|
| 'BIG_QUERY'
|
|
1101
1182
|
| 'OPEN_FGA'
|
|
1102
|
-
| 'APP_STORE'
|
|
1183
|
+
| 'APP_STORE'
|
|
1184
|
+
| 'RECEIVED'
|
|
1185
|
+
| 'PREQUEL';
|
|
1103
1186
|
}
|
|
1104
1187
|
|
|
1105
1188
|
/**
|
|
@@ -2050,7 +2133,9 @@ export namespace CustomerUpdateParams {
|
|
|
2050
2133
|
| 'SALESFORCE'
|
|
2051
2134
|
| 'BIG_QUERY'
|
|
2052
2135
|
| 'OPEN_FGA'
|
|
2053
|
-
| 'APP_STORE'
|
|
2136
|
+
| 'APP_STORE'
|
|
2137
|
+
| 'RECEIVED'
|
|
2138
|
+
| 'PREQUEL';
|
|
2054
2139
|
}
|
|
2055
2140
|
|
|
2056
2141
|
/**
|
|
@@ -2744,7 +2829,9 @@ export namespace CustomerProvisionParams {
|
|
|
2744
2829
|
| 'SALESFORCE'
|
|
2745
2830
|
| 'BIG_QUERY'
|
|
2746
2831
|
| 'OPEN_FGA'
|
|
2747
|
-
| 'APP_STORE'
|
|
2832
|
+
| 'APP_STORE'
|
|
2833
|
+
| 'RECEIVED'
|
|
2834
|
+
| 'PREQUEL';
|
|
2748
2835
|
}
|
|
2749
2836
|
|
|
2750
2837
|
/**
|
|
@@ -10,6 +10,15 @@ import { path } from '../../../internal/utils/path';
|
|
|
10
10
|
export class Integrations extends APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* 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
|
+
* ```
|
|
13
22
|
*/
|
|
14
23
|
retrieve(
|
|
15
24
|
integrationID: string,
|
|
@@ -23,6 +32,15 @@ export class Integrations extends APIResource {
|
|
|
23
32
|
/**
|
|
24
33
|
* Updates a customer's integration link, such as changing the synced external
|
|
25
34
|
* 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
|
+
* ```
|
|
26
44
|
*/
|
|
27
45
|
update(
|
|
28
46
|
integrationID: string,
|
|
@@ -39,6 +57,16 @@ export class Integrations extends APIResource {
|
|
|
39
57
|
/**
|
|
40
58
|
* Retrieves a paginated list of a customer's external integrations (billing, CRM,
|
|
41
59
|
* 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
|
+
* ```
|
|
42
70
|
*/
|
|
43
71
|
list(
|
|
44
72
|
id: string,
|
|
@@ -55,6 +83,16 @@ export class Integrations extends APIResource {
|
|
|
55
83
|
/**
|
|
56
84
|
* Links a customer to an external integration by specifying the vendor and
|
|
57
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
|
+
* ```
|
|
58
96
|
*/
|
|
59
97
|
link(
|
|
60
98
|
id: string,
|
|
@@ -66,6 +104,15 @@ export class Integrations extends APIResource {
|
|
|
66
104
|
|
|
67
105
|
/**
|
|
68
106
|
* 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
|
+
* ```
|
|
69
116
|
*/
|
|
70
117
|
unlink(
|
|
71
118
|
integrationID: string,
|
|
@@ -106,7 +153,9 @@ export interface IntegrationListResponse {
|
|
|
106
153
|
| 'SALESFORCE'
|
|
107
154
|
| 'BIG_QUERY'
|
|
108
155
|
| 'OPEN_FGA'
|
|
109
|
-
| 'APP_STORE'
|
|
156
|
+
| 'APP_STORE'
|
|
157
|
+
| 'RECEIVED'
|
|
158
|
+
| 'PREQUEL';
|
|
110
159
|
|
|
111
160
|
/**
|
|
112
161
|
* Price billing sync revision data containing billing ID, link URL, and price
|
|
@@ -202,6 +251,8 @@ export interface IntegrationListParams extends MyCursorIDPageParams {
|
|
|
202
251
|
| 'BIG_QUERY'
|
|
203
252
|
| 'OPEN_FGA'
|
|
204
253
|
| 'APP_STORE'
|
|
254
|
+
| 'RECEIVED'
|
|
255
|
+
| 'PREQUEL'
|
|
205
256
|
>;
|
|
206
257
|
}
|
|
207
258
|
|
|
@@ -229,7 +280,9 @@ export interface IntegrationLinkParams {
|
|
|
229
280
|
| 'SALESFORCE'
|
|
230
281
|
| 'BIG_QUERY'
|
|
231
282
|
| 'OPEN_FGA'
|
|
232
|
-
| 'APP_STORE'
|
|
283
|
+
| 'APP_STORE'
|
|
284
|
+
| 'RECEIVED'
|
|
285
|
+
| 'PREQUEL';
|
|
233
286
|
}
|
|
234
287
|
|
|
235
288
|
export interface IntegrationUnlinkParams {
|
|
@@ -13,6 +13,16 @@ export class PaymentMethod extends APIResource {
|
|
|
13
13
|
/**
|
|
14
14
|
* Attaches a payment method to a customer for billing. Required for paid
|
|
15
15
|
* 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
|
+
* ```
|
|
16
26
|
*/
|
|
17
27
|
attach(
|
|
18
28
|
id: string,
|
|
@@ -25,6 +35,12 @@ export class PaymentMethod extends APIResource {
|
|
|
25
35
|
/**
|
|
26
36
|
* Removes the payment method from a customer. Ensure active paid subscriptions
|
|
27
37
|
* have an alternative payment method.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const customerResponse =
|
|
42
|
+
* await client.v1.customers.paymentMethod.detach('x');
|
|
43
|
+
* ```
|
|
28
44
|
*/
|
|
29
45
|
detach(id: string, options?: RequestOptions): APIPromise<CustomersAPI.CustomerResponse> {
|
|
30
46
|
return this._client.delete(path`/api/v1/customers/${id}/payment-method`, options);
|
|
@@ -55,7 +71,9 @@ export interface PaymentMethodAttachParams {
|
|
|
55
71
|
| 'SALESFORCE'
|
|
56
72
|
| 'BIG_QUERY'
|
|
57
73
|
| 'OPEN_FGA'
|
|
58
|
-
| 'APP_STORE'
|
|
74
|
+
| 'APP_STORE'
|
|
75
|
+
| 'RECEIVED'
|
|
76
|
+
| 'PREQUEL';
|
|
59
77
|
|
|
60
78
|
/**
|
|
61
79
|
* Customers selected currency
|