@stigg/typescript 0.1.0-beta.16 → 0.1.0-beta.18
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 +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 +59 -0
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +59 -0
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +59 -0
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +59 -0
- 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/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 +77 -0
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +77 -0
- 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 +47 -0
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +47 -0
- 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 +16 -0
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +16 -0
- 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 +1 -1
- package/resources/v1/events/beta/customers/customers.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/customers.d.ts +1 -1
- 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 +37 -28
- package/resources/v1/events/beta/customers/entities.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entities.d.ts +37 -28
- package/resources/v1/events/beta/customers/entities.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entities.js +36 -27
- package/resources/v1/events/beta/customers/entities.js.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entities.mjs +36 -27
- 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.map +1 -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/data-export/data-export.d.mts +126 -0
- package/resources/v1/events/data-export/data-export.d.mts.map +1 -0
- package/resources/v1/events/data-export/data-export.d.ts +126 -0
- package/resources/v1/events/data-export/data-export.d.ts.map +1 -0
- package/resources/v1/events/data-export/data-export.js +45 -0
- package/resources/v1/events/data-export/data-export.js.map +1 -0
- package/resources/v1/events/data-export/data-export.mjs +40 -0
- package/resources/v1/events/data-export/data-export.mjs.map +1 -0
- package/resources/v1/events/data-export/destinations.d.mts +124 -0
- package/resources/v1/events/data-export/destinations.d.mts.map +1 -0
- package/resources/v1/events/data-export/destinations.d.ts +124 -0
- package/resources/v1/events/data-export/destinations.d.ts.map +1 -0
- package/resources/v1/events/data-export/destinations.js +41 -0
- package/resources/v1/events/data-export/destinations.js.map +1 -0
- package/resources/v1/events/data-export/destinations.mjs +37 -0
- package/resources/v1/events/data-export/destinations.mjs.map +1 -0
- package/resources/v1/events/data-export/index.d.mts +3 -0
- package/resources/v1/events/data-export/index.d.mts.map +1 -0
- package/resources/v1/events/data-export/index.d.ts +3 -0
- package/resources/v1/events/data-export/index.d.ts.map +1 -0
- package/resources/v1/events/data-export/index.js +9 -0
- package/resources/v1/events/data-export/index.js.map +1 -0
- package/resources/v1/events/data-export/index.mjs +4 -0
- package/resources/v1/events/data-export/index.mjs.map +1 -0
- package/resources/v1/events/data-export.d.mts +2 -0
- package/resources/v1/events/data-export.d.mts.map +1 -0
- package/resources/v1/events/data-export.d.ts +2 -0
- package/resources/v1/events/data-export.d.ts.map +1 -0
- package/resources/v1/events/data-export.js +6 -0
- package/resources/v1/events/data-export.js.map +1 -0
- package/resources/v1/events/data-export.mjs +3 -0
- package/resources/v1/events/data-export.mjs.map +1 -0
- package/resources/v1/events/events.d.mts +87 -0
- package/resources/v1/events/events.d.mts.map +1 -0
- package/resources/v1/events/events.d.ts +87 -0
- package/resources/v1/events/events.d.ts.map +1 -0
- package/resources/v1/events/events.js +44 -0
- package/resources/v1/events/events.js.map +1 -0
- package/resources/v1/events/events.mjs +39 -0
- package/resources/v1/events/events.mjs.map +1 -0
- package/resources/v1/events/index.d.mts +4 -0
- package/resources/v1/events/index.d.mts.map +1 -0
- package/resources/v1/events/index.d.ts +4 -0
- package/resources/v1/events/index.d.ts.map +1 -0
- package/resources/v1/events/index.js +11 -0
- package/resources/v1/events/index.js.map +1 -0
- package/resources/v1/events/index.mjs +5 -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 +1 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -1
- 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/plans.d.mts +69 -0
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +69 -0
- 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 +2 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +2 -2
- 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 +59 -0
- package/src/resources/v1/addons/entitlements.ts +31 -0
- 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 +77 -0
- package/src/resources/v1/customers/integrations.ts +47 -0
- package/src/resources/v1/customers/payment-method.ts +16 -0
- 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 +1 -1
- package/src/resources/{v1-beta → v1/events/beta}/customers/entities.ts +38 -29
- package/src/resources/{v1-beta → v1/events/beta}/customers/entitlements.ts +7 -5
- 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/data-export/data-export.ts +170 -0
- package/src/resources/v1/events/data-export/destinations.ts +149 -0
- package/src/resources/v1/events/data-export/index.ts +15 -0
- package/src/resources/v1/events/data-export.ts +3 -0
- package/src/resources/v1/events/events.ts +116 -0
- package/src/resources/v1/events/index.ts +11 -0
- package/src/resources/v1/events.ts +1 -75
- package/src/resources/v1/features.ts +43 -0
- package/src/resources/v1/index.ts +1 -1
- package/src/resources/v1/plans/entitlements.ts +31 -0
- package/src/resources/v1/plans/plans.ts +69 -0
- 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 +2 -2
- 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.map +0 -1
- 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.d.mts +0 -0
- /package/resources/{v1-beta → v1/events/beta}/customers/index.d.ts +0 -0
- /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/index.ts +0 -0
- /package/src/resources/{v1-beta → v1/events/beta}/customers.ts +0 -0
|
@@ -24,6 +24,15 @@ export class Addons extends APIResource {
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Creates a new addon in draft status, associated with a specific product.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const addon = await client.v1.addons.create({
|
|
31
|
+
* id: 'id',
|
|
32
|
+
* displayName: 'displayName',
|
|
33
|
+
* productId: 'productId',
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
27
36
|
*/
|
|
28
37
|
create(body: AddonCreateParams, options?: RequestOptions): APIPromise<Addon> {
|
|
29
38
|
return this._client.post('/api/v1/addons', { body, ...options });
|
|
@@ -32,6 +41,11 @@ export class Addons extends APIResource {
|
|
|
32
41
|
/**
|
|
33
42
|
* Retrieves an addon by its unique identifier, including entitlements and pricing
|
|
34
43
|
* details.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const addon = await client.v1.addons.retrieve('x');
|
|
48
|
+
* ```
|
|
35
49
|
*/
|
|
36
50
|
retrieve(id: string, options?: RequestOptions): APIPromise<Addon> {
|
|
37
51
|
return this._client.get(path`/api/v1/addons/${id}`, options);
|
|
@@ -40,6 +54,11 @@ export class Addons extends APIResource {
|
|
|
40
54
|
/**
|
|
41
55
|
* Updates an existing addon's properties such as display name, description, and
|
|
42
56
|
* metadata.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const addon = await client.v1.addons.update('x');
|
|
61
|
+
* ```
|
|
43
62
|
*/
|
|
44
63
|
update(id: string, body: AddonUpdateParams, options?: RequestOptions): APIPromise<Addon> {
|
|
45
64
|
return this._client.patch(path`/api/v1/addons/${id}`, { body, ...options });
|
|
@@ -47,6 +66,14 @@ export class Addons extends APIResource {
|
|
|
47
66
|
|
|
48
67
|
/**
|
|
49
68
|
* Retrieves a paginated list of addons in the environment.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* // Automatically fetches more pages as needed.
|
|
73
|
+
* for await (const addonListResponse of client.v1.addons.list()) {
|
|
74
|
+
* // ...
|
|
75
|
+
* }
|
|
76
|
+
* ```
|
|
50
77
|
*/
|
|
51
78
|
list(
|
|
52
79
|
query: AddonListParams | null | undefined = {},
|
|
@@ -60,6 +87,11 @@ export class Addons extends APIResource {
|
|
|
60
87
|
|
|
61
88
|
/**
|
|
62
89
|
* Archives an addon, preventing it from being used in new subscriptions.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* const addon = await client.v1.addons.archive('x');
|
|
94
|
+
* ```
|
|
63
95
|
*/
|
|
64
96
|
archive(id: string, options?: RequestOptions): APIPromise<Addon> {
|
|
65
97
|
return this._client.post(path`/api/v1/addons/${id}/archive`, options);
|
|
@@ -67,6 +99,11 @@ export class Addons extends APIResource {
|
|
|
67
99
|
|
|
68
100
|
/**
|
|
69
101
|
* Creates a draft version of an existing addon for modification before publishing.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* const addon = await client.v1.addons.createDraft('x');
|
|
106
|
+
* ```
|
|
70
107
|
*/
|
|
71
108
|
createDraft(id: string, options?: RequestOptions): APIPromise<Addon> {
|
|
72
109
|
return this._client.post(path`/api/v1/addons/${id}/draft`, options);
|
|
@@ -74,6 +111,16 @@ export class Addons extends APIResource {
|
|
|
74
111
|
|
|
75
112
|
/**
|
|
76
113
|
* Retrieves the list of charges configured on an addon.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* // Automatically fetches more pages as needed.
|
|
118
|
+
* for await (const addonListChargesResponse of client.v1.addons.listCharges(
|
|
119
|
+
* 'x',
|
|
120
|
+
* )) {
|
|
121
|
+
* // ...
|
|
122
|
+
* }
|
|
123
|
+
* ```
|
|
77
124
|
*/
|
|
78
125
|
listCharges(
|
|
79
126
|
id: string,
|
|
@@ -89,6 +136,13 @@ export class Addons extends APIResource {
|
|
|
89
136
|
|
|
90
137
|
/**
|
|
91
138
|
* Publishes a draft addon, making it available for use in subscriptions.
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```ts
|
|
142
|
+
* const response = await client.v1.addons.publish('x', {
|
|
143
|
+
* migrationType: 'NEW_CUSTOMERS',
|
|
144
|
+
* });
|
|
145
|
+
* ```
|
|
92
146
|
*/
|
|
93
147
|
publish(id: string, body: AddonPublishParams, options?: RequestOptions): APIPromise<AddonPublishResponse> {
|
|
94
148
|
return this._client.post(path`/api/v1/addons/${id}/publish`, { body, ...options });
|
|
@@ -96,6 +150,11 @@ export class Addons extends APIResource {
|
|
|
96
150
|
|
|
97
151
|
/**
|
|
98
152
|
* Removes a draft version of an addon.
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```ts
|
|
156
|
+
* const response = await client.v1.addons.removeDraft('x');
|
|
157
|
+
* ```
|
|
99
158
|
*/
|
|
100
159
|
removeDraft(id: string, options?: RequestOptions): APIPromise<AddonRemoveDraftResponse> {
|
|
101
160
|
return this._client.delete(path`/api/v1/addons/${id}/draft`, options);
|
|
@@ -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,
|
|
@@ -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);
|
|
@@ -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,
|
|
@@ -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);
|