@stigg/typescript 0.1.0-beta.15 → 0.1.0-beta.16
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 +8 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/v1/addons/addons.d.mts +0 -59
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +0 -59
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +0 -59
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +0 -59
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts +0 -31
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts +0 -31
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/entitlements.js +0 -31
- package/resources/v1/addons/entitlements.js.map +1 -1
- package/resources/v1/addons/entitlements.mjs +0 -31
- package/resources/v1/addons/entitlements.mjs.map +1 -1
- package/resources/v1/coupons.d.mts +0 -36
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +0 -36
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +0 -36
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +0 -36
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/credits/credits.d.mts +0 -25
- package/resources/v1/credits/credits.d.mts.map +1 -1
- package/resources/v1/credits/credits.d.ts +0 -25
- package/resources/v1/credits/credits.d.ts.map +1 -1
- package/resources/v1/credits/credits.js +0 -25
- package/resources/v1/credits/credits.js.map +1 -1
- package/resources/v1/credits/credits.mjs +0 -25
- package/resources/v1/credits/credits.mjs.map +1 -1
- package/resources/v1/credits/custom-currencies.d.mts +0 -49
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
- package/resources/v1/credits/custom-currencies.d.ts +0 -49
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
- package/resources/v1/credits/custom-currencies.js +0 -49
- package/resources/v1/credits/custom-currencies.js.map +1 -1
- package/resources/v1/credits/custom-currencies.mjs +0 -49
- package/resources/v1/credits/custom-currencies.mjs.map +1 -1
- package/resources/v1/credits/grants.d.mts +0 -28
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +0 -28
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/credits/grants.js +0 -28
- package/resources/v1/credits/grants.js.map +1 -1
- package/resources/v1/credits/grants.mjs +0 -28
- package/resources/v1/credits/grants.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +0 -77
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +0 -77
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +0 -77
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +0 -77
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +0 -47
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +0 -47
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/integrations.js +0 -47
- package/resources/v1/customers/integrations.js.map +1 -1
- package/resources/v1/customers/integrations.mjs +0 -47
- package/resources/v1/customers/integrations.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +0 -16
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +0 -16
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +0 -16
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +0 -16
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +0 -51
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +0 -51
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.js +0 -51
- package/resources/v1/customers/promotional-entitlements.js.map +1 -1
- package/resources/v1/customers/promotional-entitlements.mjs +0 -51
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
- package/resources/v1/events.d.mts +65 -1
- package/resources/v1/events.d.mts.map +1 -1
- package/resources/v1/events.d.ts +65 -1
- package/resources/v1/events.d.ts.map +1 -1
- package/resources/v1/events.js +15 -2
- package/resources/v1/events.js.map +1 -1
- package/resources/v1/events.mjs +13 -1
- package/resources/v1/events.mjs.map +1 -1
- package/resources/v1/features.d.mts +0 -43
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +0 -43
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/features.js +0 -43
- package/resources/v1/features.js.map +1 -1
- package/resources/v1/features.mjs +0 -43
- 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 +0 -31
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts +0 -31
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/entitlements.js +0 -31
- package/resources/v1/plans/entitlements.js.map +1 -1
- package/resources/v1/plans/entitlements.mjs +0 -31
- package/resources/v1/plans/entitlements.mjs.map +1 -1
- package/resources/v1/plans/plans.d.mts +0 -69
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +0 -69
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +0 -69
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +0 -69
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +0 -43
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +0 -43
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.js +0 -43
- package/resources/v1/products.js.map +1 -1
- package/resources/v1/products.mjs +0 -43
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +0 -16
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +0 -16
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +0 -16
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +0 -16
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts +0 -6
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts +0 -6
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.js +0 -6
- package/resources/v1/subscriptions/invoice.js.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs +0 -6
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +0 -81
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +0 -81
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +0 -81
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +0 -81
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +0 -13
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts +0 -13
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- package/resources/v1/subscriptions/usage.js +0 -13
- package/resources/v1/subscriptions/usage.js.map +1 -1
- package/resources/v1/subscriptions/usage.mjs +0 -13
- package/resources/v1/subscriptions/usage.mjs.map +1 -1
- package/resources/v1/usage.d.mts +0 -24
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +0 -24
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +0 -24
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +0 -24
- 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/resources/{v1/events/beta → v1-beta}/customers/assignments.d.mts +21 -24
- package/resources/v1-beta/customers/assignments.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/assignments.d.ts +21 -24
- package/resources/v1-beta/customers/assignments.d.ts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/assignments.js +20 -23
- package/resources/v1-beta/customers/assignments.js.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/assignments.mjs +20 -23
- package/resources/v1-beta/customers/assignments.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/customers.d.mts +1 -1
- package/resources/v1-beta/customers/customers.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/customers.d.ts +1 -1
- package/resources/v1-beta/customers/customers.d.ts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/customers.js +2 -2
- package/resources/v1-beta/customers/customers.js.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/customers.mjs +1 -1
- package/resources/v1-beta/customers/customers.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entities.d.mts +28 -37
- package/resources/v1-beta/customers/entities.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entities.d.ts +28 -37
- package/resources/v1-beta/customers/entities.d.ts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entities.js +27 -36
- package/resources/v1-beta/customers/entities.js.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entities.mjs +27 -36
- package/resources/v1-beta/customers/entities.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entitlements.d.mts +4 -6
- package/resources/v1-beta/customers/entitlements.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entitlements.d.ts +4 -6
- package/resources/v1-beta/customers/entitlements.d.ts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entitlements.js +3 -5
- package/resources/v1-beta/customers/entitlements.js.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entitlements.mjs +3 -5
- package/resources/v1-beta/customers/entitlements.mjs.map +1 -0
- package/resources/v1-beta/customers/index.d.mts.map +1 -0
- package/resources/v1-beta/customers/index.d.ts.map +1 -0
- package/resources/v1-beta/customers/index.js.map +1 -0
- package/resources/v1-beta/customers/index.mjs.map +1 -0
- package/resources/v1-beta/customers.d.mts.map +1 -0
- package/resources/v1-beta/customers.d.ts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers.js +1 -1
- package/resources/v1-beta/customers.js.map +1 -0
- package/resources/v1-beta/customers.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/entity-types.d.mts +19 -20
- package/resources/v1-beta/entity-types.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/entity-types.d.ts +19 -20
- package/resources/v1-beta/entity-types.d.ts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/entity-types.js +17 -18
- package/resources/v1-beta/entity-types.js.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/entity-types.mjs +17 -18
- package/resources/v1-beta/entity-types.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/index.d.mts +1 -1
- package/resources/v1-beta/index.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/index.d.ts +1 -1
- package/resources/v1-beta/index.d.ts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/index.js +3 -3
- package/resources/v1-beta/index.js.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/index.mjs +1 -1
- package/resources/v1-beta/index.mjs.map +1 -0
- package/resources/{v1/events/beta/beta.d.mts → v1-beta/v1-beta.d.mts} +4 -4
- package/resources/v1-beta/v1-beta.d.mts.map +1 -0
- package/resources/{v1/events/beta/beta.d.ts → v1-beta/v1-beta.d.ts} +4 -4
- package/resources/v1-beta/v1-beta.d.ts.map +1 -0
- package/resources/{v1/events/beta/beta.js → v1-beta/v1-beta.js} +8 -8
- package/resources/v1-beta/v1-beta.js.map +1 -0
- package/resources/{v1/events/beta/beta.mjs → v1-beta/v1-beta.mjs} +5 -5
- package/resources/v1-beta/v1-beta.mjs.map +1 -0
- package/resources/v1-beta.d.mts +2 -0
- package/resources/v1-beta.d.mts.map +1 -0
- package/resources/v1-beta.d.ts +2 -0
- package/resources/v1-beta.d.ts.map +1 -0
- package/resources/{v1/events/beta.js → v1-beta.js} +3 -3
- package/resources/v1-beta.js.map +1 -0
- package/resources/{v1/events/beta.mjs → v1-beta.mjs} +2 -2
- package/resources/v1-beta.mjs.map +1 -0
- package/src/client.ts +5 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/v1/addons/addons.ts +0 -59
- package/src/resources/v1/addons/entitlements.ts +0 -31
- package/src/resources/v1/coupons.ts +0 -36
- package/src/resources/v1/credits/credits.ts +0 -25
- package/src/resources/v1/credits/custom-currencies.ts +0 -49
- package/src/resources/v1/credits/grants.ts +0 -28
- package/src/resources/v1/customers/customers.ts +0 -77
- package/src/resources/v1/customers/integrations.ts +0 -47
- package/src/resources/v1/customers/payment-method.ts +0 -16
- package/src/resources/v1/customers/promotional-entitlements.ts +0 -51
- package/src/resources/v1/events.ts +75 -1
- package/src/resources/v1/features.ts +0 -43
- package/src/resources/v1/index.ts +1 -1
- package/src/resources/v1/plans/entitlements.ts +0 -31
- package/src/resources/v1/plans/plans.ts +0 -69
- package/src/resources/v1/products.ts +0 -43
- package/src/resources/v1/subscriptions/future-update.ts +0 -16
- package/src/resources/v1/subscriptions/invoice.ts +0 -6
- package/src/resources/v1/subscriptions/subscriptions.ts +0 -81
- package/src/resources/v1/subscriptions/usage.ts +0 -13
- package/src/resources/v1/usage.ts +0 -24
- package/src/resources/v1/v1.ts +2 -2
- package/src/resources/{v1/events/beta → v1-beta}/customers/assignments.ts +22 -25
- package/src/resources/{v1/events/beta → v1-beta}/customers/customers.ts +1 -1
- package/src/resources/{v1/events/beta → v1-beta}/customers/entities.ts +29 -38
- package/src/resources/{v1/events/beta → v1-beta}/customers/entitlements.ts +5 -7
- package/src/resources/{v1/events/beta → v1-beta}/entity-types.ts +19 -20
- package/src/resources/{v1/events/beta → v1-beta}/index.ts +1 -1
- package/src/resources/{v1/events/beta/beta.ts → v1-beta/v1-beta.ts} +5 -5
- package/src/resources/{v1/events/beta.ts → v1-beta.ts} +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/v1/events/beta/beta.d.mts.map +0 -1
- package/resources/v1/events/beta/beta.d.ts.map +0 -1
- package/resources/v1/events/beta/beta.js.map +0 -1
- package/resources/v1/events/beta/beta.mjs.map +0 -1
- package/resources/v1/events/beta/customers/assignments.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/assignments.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/assignments.js.map +0 -1
- package/resources/v1/events/beta/customers/assignments.mjs.map +0 -1
- package/resources/v1/events/beta/customers/customers.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/customers.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/customers.js.map +0 -1
- package/resources/v1/events/beta/customers/customers.mjs.map +0 -1
- package/resources/v1/events/beta/customers/entities.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/entities.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/entities.js.map +0 -1
- package/resources/v1/events/beta/customers/entities.mjs.map +0 -1
- package/resources/v1/events/beta/customers/entitlements.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/entitlements.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/entitlements.js.map +0 -1
- package/resources/v1/events/beta/customers/entitlements.mjs.map +0 -1
- package/resources/v1/events/beta/customers/index.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/index.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/index.js.map +0 -1
- package/resources/v1/events/beta/customers/index.mjs.map +0 -1
- package/resources/v1/events/beta/customers.d.mts.map +0 -1
- package/resources/v1/events/beta/customers.d.ts.map +0 -1
- package/resources/v1/events/beta/customers.js.map +0 -1
- package/resources/v1/events/beta/customers.mjs.map +0 -1
- package/resources/v1/events/beta/entity-types.d.mts.map +0 -1
- package/resources/v1/events/beta/entity-types.d.ts.map +0 -1
- package/resources/v1/events/beta/entity-types.js.map +0 -1
- package/resources/v1/events/beta/entity-types.mjs.map +0 -1
- package/resources/v1/events/beta/index.d.mts.map +0 -1
- package/resources/v1/events/beta/index.d.ts.map +0 -1
- package/resources/v1/events/beta/index.js.map +0 -1
- package/resources/v1/events/beta/index.mjs.map +0 -1
- package/resources/v1/events/beta.d.mts +0 -2
- package/resources/v1/events/beta.d.mts.map +0 -1
- package/resources/v1/events/beta.d.ts +0 -2
- package/resources/v1/events/beta.d.ts.map +0 -1
- package/resources/v1/events/beta.js.map +0 -1
- package/resources/v1/events/beta.mjs.map +0 -1
- package/resources/v1/events/events.d.mts +0 -83
- package/resources/v1/events/events.d.mts.map +0 -1
- package/resources/v1/events/events.d.ts +0 -83
- package/resources/v1/events/events.d.ts.map +0 -1
- package/resources/v1/events/events.js +0 -40
- package/resources/v1/events/events.js.map +0 -1
- package/resources/v1/events/events.mjs +0 -35
- package/resources/v1/events/events.mjs.map +0 -1
- package/resources/v1/events/index.d.mts +0 -3
- package/resources/v1/events/index.d.mts.map +0 -1
- package/resources/v1/events/index.d.ts +0 -3
- package/resources/v1/events/index.d.ts.map +0 -1
- package/resources/v1/events/index.js +0 -9
- package/resources/v1/events/index.js.map +0 -1
- package/resources/v1/events/index.mjs +0 -4
- package/resources/v1/events/index.mjs.map +0 -1
- package/src/resources/v1/events/events.ts +0 -98
- package/src/resources/v1/events/index.ts +0 -4
- /package/resources/{v1/events/beta → v1-beta}/customers/index.d.mts +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers/index.d.ts +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers/index.js +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers/index.mjs +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers.d.mts +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers.d.ts +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers.mjs +0 -0
- /package/src/resources/{v1/events/beta → v1-beta}/customers/index.ts +0 -0
- /package/src/resources/{v1/events/beta → v1-beta}/customers.ts +0 -0
|
@@ -39,13 +39,6 @@ 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
|
-
* ```
|
|
49
42
|
*/
|
|
50
43
|
retrieve(id: string, options?: RequestOptions): APIPromise<CustomerResponse> {
|
|
51
44
|
return this._client.get(path`/api/v1/customers/${id}`, options);
|
|
@@ -54,13 +47,6 @@ export class Customers extends APIResource {
|
|
|
54
47
|
/**
|
|
55
48
|
* Updates an existing customer's properties such as name, email, and billing
|
|
56
49
|
* information.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* const customerResponse = await client.v1.customers.update(
|
|
61
|
-
* 'x',
|
|
62
|
-
* );
|
|
63
|
-
* ```
|
|
64
50
|
*/
|
|
65
51
|
update(id: string, body: CustomerUpdateParams, options?: RequestOptions): APIPromise<CustomerResponse> {
|
|
66
52
|
return this._client.patch(path`/api/v1/customers/${id}`, { body, ...options });
|
|
@@ -68,14 +54,6 @@ export class Customers extends APIResource {
|
|
|
68
54
|
|
|
69
55
|
/**
|
|
70
56
|
* 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
|
-
* ```
|
|
79
57
|
*/
|
|
80
58
|
list(
|
|
81
59
|
query: CustomerListParams | null | undefined = {},
|
|
@@ -90,13 +68,6 @@ export class Customers extends APIResource {
|
|
|
90
68
|
/**
|
|
91
69
|
* Archives a customer, preventing new subscriptions. Optionally cancels existing
|
|
92
70
|
* subscriptions.
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```ts
|
|
96
|
-
* const customerResponse = await client.v1.customers.archive(
|
|
97
|
-
* 'x',
|
|
98
|
-
* );
|
|
99
|
-
* ```
|
|
100
71
|
*/
|
|
101
72
|
archive(id: string, options?: RequestOptions): APIPromise<CustomerResponse> {
|
|
102
73
|
return this._client.post(path`/api/v1/customers/${id}/archive`, options);
|
|
@@ -111,13 +82,6 @@ export class Customers extends APIResource {
|
|
|
111
82
|
* mechanisms, and low-latency guarantees. It is not recommended for hot-path
|
|
112
83
|
* entitlement checks. For production use, consider using the Stigg Node Server SDK
|
|
113
84
|
* 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
|
-
* ```
|
|
121
85
|
*/
|
|
122
86
|
checkEntitlement(
|
|
123
87
|
id: string,
|
|
@@ -130,19 +94,6 @@ export class Customers extends APIResource {
|
|
|
130
94
|
/**
|
|
131
95
|
* Imports multiple customers in bulk. Used for migrating customer data from
|
|
132
96
|
* 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
|
-
* ```
|
|
146
97
|
*/
|
|
147
98
|
import(body: CustomerImportParams, options?: RequestOptions): APIPromise<CustomerImportResponse> {
|
|
148
99
|
return this._client.post('/api/v1/customers/import', { body, ...options });
|
|
@@ -150,16 +101,6 @@ export class Customers extends APIResource {
|
|
|
150
101
|
|
|
151
102
|
/**
|
|
152
103
|
* 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
|
-
* ```
|
|
163
104
|
*/
|
|
164
105
|
listResources(
|
|
165
106
|
id: string,
|
|
@@ -176,12 +117,6 @@ export class Customers extends APIResource {
|
|
|
176
117
|
/**
|
|
177
118
|
* Creates a new customer and optionally provisions an initial subscription in a
|
|
178
119
|
* single operation.
|
|
179
|
-
*
|
|
180
|
-
* @example
|
|
181
|
-
* ```ts
|
|
182
|
-
* const customerResponse =
|
|
183
|
-
* await client.v1.customers.provision({ id: 'id' });
|
|
184
|
-
* ```
|
|
185
120
|
*/
|
|
186
121
|
provision(body: CustomerProvisionParams, options?: RequestOptions): APIPromise<CustomerResponse> {
|
|
187
122
|
return this._client.post('/api/v1/customers', { body, ...options });
|
|
@@ -195,12 +130,6 @@ export class Customers extends APIResource {
|
|
|
195
130
|
* mechanisms, and low-latency guarantees. It is not recommended for hot-path
|
|
196
131
|
* entitlement checks. For production use, consider using the Stigg Node Server SDK
|
|
197
132
|
* 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
|
-
* ```
|
|
204
133
|
*/
|
|
205
134
|
retrieveEntitlements(
|
|
206
135
|
id: string,
|
|
@@ -212,12 +141,6 @@ export class Customers extends APIResource {
|
|
|
212
141
|
|
|
213
142
|
/**
|
|
214
143
|
* 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
|
-
* ```
|
|
221
144
|
*/
|
|
222
145
|
unarchive(id: string, options?: RequestOptions): APIPromise<CustomerResponse> {
|
|
223
146
|
return this._client.post(path`/api/v1/customers/${id}/unarchive`, options);
|
|
@@ -10,15 +10,6 @@ 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
|
-
* ```
|
|
22
13
|
*/
|
|
23
14
|
retrieve(
|
|
24
15
|
integrationID: string,
|
|
@@ -32,15 +23,6 @@ export class Integrations extends APIResource {
|
|
|
32
23
|
/**
|
|
33
24
|
* Updates a customer's integration link, such as changing the synced external
|
|
34
25
|
* entity ID.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* const customerIntegrationResponse =
|
|
39
|
-
* await client.v1.customers.integrations.update(
|
|
40
|
-
* 'integrationId',
|
|
41
|
-
* { id: 'id', syncedEntityId: 'syncedEntityId' },
|
|
42
|
-
* );
|
|
43
|
-
* ```
|
|
44
26
|
*/
|
|
45
27
|
update(
|
|
46
28
|
integrationID: string,
|
|
@@ -57,16 +39,6 @@ export class Integrations extends APIResource {
|
|
|
57
39
|
/**
|
|
58
40
|
* Retrieves a paginated list of a customer's external integrations (billing, CRM,
|
|
59
41
|
* etc.).
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```ts
|
|
63
|
-
* // Automatically fetches more pages as needed.
|
|
64
|
-
* for await (const integrationListResponse of client.v1.customers.integrations.list(
|
|
65
|
-
* 'x',
|
|
66
|
-
* )) {
|
|
67
|
-
* // ...
|
|
68
|
-
* }
|
|
69
|
-
* ```
|
|
70
42
|
*/
|
|
71
43
|
list(
|
|
72
44
|
id: string,
|
|
@@ -83,16 +55,6 @@ export class Integrations extends APIResource {
|
|
|
83
55
|
/**
|
|
84
56
|
* Links a customer to an external integration by specifying the vendor and
|
|
85
57
|
* external entity ID.
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* ```ts
|
|
89
|
-
* const customerIntegrationResponse =
|
|
90
|
-
* await client.v1.customers.integrations.link('x', {
|
|
91
|
-
* id: 'id',
|
|
92
|
-
* syncedEntityId: 'syncedEntityId',
|
|
93
|
-
* vendorIdentifier: 'AUTH0',
|
|
94
|
-
* });
|
|
95
|
-
* ```
|
|
96
58
|
*/
|
|
97
59
|
link(
|
|
98
60
|
id: string,
|
|
@@ -104,15 +66,6 @@ export class Integrations extends APIResource {
|
|
|
104
66
|
|
|
105
67
|
/**
|
|
106
68
|
* Removes the link between a customer and an external integration.
|
|
107
|
-
*
|
|
108
|
-
* @example
|
|
109
|
-
* ```ts
|
|
110
|
-
* const customerIntegrationResponse =
|
|
111
|
-
* await client.v1.customers.integrations.unlink(
|
|
112
|
-
* 'integrationId',
|
|
113
|
-
* { id: 'id' },
|
|
114
|
-
* );
|
|
115
|
-
* ```
|
|
116
69
|
*/
|
|
117
70
|
unlink(
|
|
118
71
|
integrationID: string,
|
|
@@ -13,16 +13,6 @@ 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
|
-
* ```
|
|
26
16
|
*/
|
|
27
17
|
attach(
|
|
28
18
|
id: string,
|
|
@@ -35,12 +25,6 @@ export class PaymentMethod extends APIResource {
|
|
|
35
25
|
/**
|
|
36
26
|
* Removes the payment method from a customer. Ensure active paid subscriptions
|
|
37
27
|
* have an alternative payment method.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* const customerResponse =
|
|
42
|
-
* await client.v1.customers.paymentMethod.detach('x');
|
|
43
|
-
* ```
|
|
44
28
|
*/
|
|
45
29
|
detach(id: string, options?: RequestOptions): APIPromise<CustomersAPI.CustomerResponse> {
|
|
46
30
|
return this._client.delete(path`/api/v1/customers/${id}/payment-method`, options);
|
|
@@ -13,38 +13,6 @@ export class PromotionalEntitlements extends APIResource {
|
|
|
13
13
|
/**
|
|
14
14
|
* Grants promotional entitlements to a customer, providing feature access outside
|
|
15
15
|
* their subscription. Entitlements can be time-limited or permanent.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* const promotionalEntitlement =
|
|
20
|
-
* await client.v1.customers.promotionalEntitlements.create(
|
|
21
|
-
* 'x',
|
|
22
|
-
* {
|
|
23
|
-
* promotionalEntitlements: [
|
|
24
|
-
* {
|
|
25
|
-
* customEndDate: '2019-12-27T18:11:19.117Z',
|
|
26
|
-
* enumValues: ['string'],
|
|
27
|
-
* featureId: 'featureId',
|
|
28
|
-
* hasSoftLimit: true,
|
|
29
|
-
* hasUnlimitedUsage: true,
|
|
30
|
-
* isVisible: true,
|
|
31
|
-
* monthlyResetPeriodConfiguration: {
|
|
32
|
-
* accordingTo: 'SubscriptionStart',
|
|
33
|
-
* },
|
|
34
|
-
* period: '1 week',
|
|
35
|
-
* resetPeriod: 'YEAR',
|
|
36
|
-
* usageLimit: -9007199254740991,
|
|
37
|
-
* weeklyResetPeriodConfiguration: {
|
|
38
|
-
* accordingTo: 'SubscriptionStart',
|
|
39
|
-
* },
|
|
40
|
-
* yearlyResetPeriodConfiguration: {
|
|
41
|
-
* accordingTo: 'SubscriptionStart',
|
|
42
|
-
* },
|
|
43
|
-
* },
|
|
44
|
-
* ],
|
|
45
|
-
* },
|
|
46
|
-
* );
|
|
47
|
-
* ```
|
|
48
16
|
*/
|
|
49
17
|
create(
|
|
50
18
|
id: string,
|
|
@@ -56,16 +24,6 @@ export class PromotionalEntitlements extends APIResource {
|
|
|
56
24
|
|
|
57
25
|
/**
|
|
58
26
|
* Retrieves a paginated list of a customer's promotional entitlements.
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```ts
|
|
62
|
-
* // Automatically fetches more pages as needed.
|
|
63
|
-
* for await (const promotionalEntitlementListResponse of client.v1.customers.promotionalEntitlements.list(
|
|
64
|
-
* 'x',
|
|
65
|
-
* )) {
|
|
66
|
-
* // ...
|
|
67
|
-
* }
|
|
68
|
-
* ```
|
|
69
27
|
*/
|
|
70
28
|
list(
|
|
71
29
|
id: string,
|
|
@@ -82,15 +40,6 @@ export class PromotionalEntitlements extends APIResource {
|
|
|
82
40
|
/**
|
|
83
41
|
* Revokes a previously granted promotional entitlement from a customer for a
|
|
84
42
|
* specific feature.
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```ts
|
|
88
|
-
* const response =
|
|
89
|
-
* await client.v1.customers.promotionalEntitlements.revoke(
|
|
90
|
-
* 'featureId',
|
|
91
|
-
* { id: 'id' },
|
|
92
|
-
* );
|
|
93
|
-
* ```
|
|
94
43
|
*/
|
|
95
44
|
revoke(
|
|
96
45
|
featureID: string,
|
|
@@ -1,3 +1,77 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Operations related to usage & metering
|
|
9
|
+
*/
|
|
10
|
+
export class Events extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Reports raw usage events for event-based metering. Events are ingested
|
|
13
|
+
* asynchronously and aggregated into usage totals.
|
|
14
|
+
*/
|
|
15
|
+
report(body: EventReportParams, options?: RequestOptions): APIPromise<EventReportResponse> {
|
|
16
|
+
return this._client.post('/api/v1/events', { body, ...options });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Response object
|
|
22
|
+
*/
|
|
23
|
+
export interface EventReportResponse {
|
|
24
|
+
/**
|
|
25
|
+
* Empty success response confirming that events were successfully ingested and
|
|
26
|
+
* queued for processing by Stigg's metering system.
|
|
27
|
+
*/
|
|
28
|
+
data: unknown;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface EventReportParams {
|
|
32
|
+
/**
|
|
33
|
+
* A list of usage events to report
|
|
34
|
+
*/
|
|
35
|
+
events: Array<EventReportParams.Event>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export namespace EventReportParams {
|
|
39
|
+
/**
|
|
40
|
+
* Raw usage event
|
|
41
|
+
*/
|
|
42
|
+
export interface Event {
|
|
43
|
+
/**
|
|
44
|
+
* Customer id
|
|
45
|
+
*/
|
|
46
|
+
customerId: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The name of the usage event
|
|
50
|
+
*/
|
|
51
|
+
eventName: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Idempotency key
|
|
55
|
+
*/
|
|
56
|
+
idempotencyKey: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Dimensions associated with the usage event
|
|
60
|
+
*/
|
|
61
|
+
dimensions?: { [key: string]: string | number | boolean };
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Resource id
|
|
65
|
+
*/
|
|
66
|
+
resourceId?: string | null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Timestamp
|
|
70
|
+
*/
|
|
71
|
+
timestamp?: string;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export declare namespace Events {
|
|
76
|
+
export { type EventReportResponse as EventReportResponse, type EventReportParams as EventReportParams };
|
|
77
|
+
}
|
|
@@ -12,13 +12,6 @@ import { path } from '../../internal/utils/path';
|
|
|
12
12
|
export class Features extends APIResource {
|
|
13
13
|
/**
|
|
14
14
|
* Archives a feature, preventing it from being used in new entitlements.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```ts
|
|
18
|
-
* const feature = await client.v1.features.archiveFeature(
|
|
19
|
-
* 'x',
|
|
20
|
-
* );
|
|
21
|
-
* ```
|
|
22
15
|
*/
|
|
23
16
|
archiveFeature(id: string, options?: RequestOptions): APIPromise<Feature> {
|
|
24
17
|
return this._client.post(path`/api/v1/features/${id}/archive`, options);
|
|
@@ -26,15 +19,6 @@ export class Features extends APIResource {
|
|
|
26
19
|
|
|
27
20
|
/**
|
|
28
21
|
* Creates a new feature with the specified type, metering, and configuration.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* const feature = await client.v1.features.createFeature({
|
|
33
|
-
* id: 'id',
|
|
34
|
-
* displayName: 'displayName',
|
|
35
|
-
* featureType: 'BOOLEAN',
|
|
36
|
-
* });
|
|
37
|
-
* ```
|
|
38
22
|
*/
|
|
39
23
|
createFeature(body: FeatureCreateFeatureParams, options?: RequestOptions): APIPromise<Feature> {
|
|
40
24
|
return this._client.post('/api/v1/features', { body, ...options });
|
|
@@ -42,14 +26,6 @@ export class Features extends APIResource {
|
|
|
42
26
|
|
|
43
27
|
/**
|
|
44
28
|
* Retrieves a paginated list of features in the environment.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```ts
|
|
48
|
-
* // Automatically fetches more pages as needed.
|
|
49
|
-
* for await (const featureListFeaturesResponse of client.v1.features.listFeatures()) {
|
|
50
|
-
* // ...
|
|
51
|
-
* }
|
|
52
|
-
* ```
|
|
53
29
|
*/
|
|
54
30
|
listFeatures(
|
|
55
31
|
query: FeatureListFeaturesParams | null | undefined = {},
|
|
@@ -63,13 +39,6 @@ export class Features extends APIResource {
|
|
|
63
39
|
|
|
64
40
|
/**
|
|
65
41
|
* Retrieves a feature by its unique identifier.
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```ts
|
|
69
|
-
* const feature = await client.v1.features.retrieveFeature(
|
|
70
|
-
* 'x',
|
|
71
|
-
* );
|
|
72
|
-
* ```
|
|
73
42
|
*/
|
|
74
43
|
retrieveFeature(id: string, options?: RequestOptions): APIPromise<Feature> {
|
|
75
44
|
return this._client.get(path`/api/v1/features/${id}`, options);
|
|
@@ -77,13 +46,6 @@ export class Features extends APIResource {
|
|
|
77
46
|
|
|
78
47
|
/**
|
|
79
48
|
* Restores an archived feature, allowing it to be used in entitlements again.
|
|
80
|
-
*
|
|
81
|
-
* @example
|
|
82
|
-
* ```ts
|
|
83
|
-
* const feature = await client.v1.features.unarchiveFeature(
|
|
84
|
-
* 'x',
|
|
85
|
-
* );
|
|
86
|
-
* ```
|
|
87
49
|
*/
|
|
88
50
|
unarchiveFeature(id: string, options?: RequestOptions): APIPromise<Feature> {
|
|
89
51
|
return this._client.post(path`/api/v1/features/${id}/unarchive`, options);
|
|
@@ -92,11 +54,6 @@ export class Features extends APIResource {
|
|
|
92
54
|
/**
|
|
93
55
|
* Updates an existing feature's properties such as display name, description, and
|
|
94
56
|
* configuration.
|
|
95
|
-
*
|
|
96
|
-
* @example
|
|
97
|
-
* ```ts
|
|
98
|
-
* const feature = await client.v1.features.updateFeature('x');
|
|
99
|
-
* ```
|
|
100
57
|
*/
|
|
101
58
|
updateFeature(id: string, body: FeatureUpdateFeatureParams, options?: RequestOptions): APIPromise<Feature> {
|
|
102
59
|
return this._client.patch(path`/api/v1/features/${id}`, { body, ...options });
|
|
@@ -53,7 +53,7 @@ export {
|
|
|
53
53
|
type CustomerListResponsesMyCursorIDPage,
|
|
54
54
|
type CustomerListResourcesResponsesMyCursorIDPage,
|
|
55
55
|
} from './customers/index';
|
|
56
|
-
export { Events, type EventReportResponse, type EventReportParams } from './events
|
|
56
|
+
export { Events, type EventReportResponse, type EventReportParams } from './events';
|
|
57
57
|
export {
|
|
58
58
|
Features,
|
|
59
59
|
type Feature,
|
|
@@ -8,14 +8,6 @@ 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 plan.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const entitlement =
|
|
15
|
-
* await client.v1.plans.entitlements.create('planId', {
|
|
16
|
-
* entitlements: [{ id: 'id', type: 'FEATURE' }],
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
11
|
*/
|
|
20
12
|
create(
|
|
21
13
|
planID: string,
|
|
@@ -27,15 +19,6 @@ export class Entitlements extends APIResource {
|
|
|
27
19
|
|
|
28
20
|
/**
|
|
29
21
|
* Updates an existing entitlement on a draft plan.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const planEntitlement =
|
|
34
|
-
* await client.v1.plans.entitlements.update('id', {
|
|
35
|
-
* planId: 'planId',
|
|
36
|
-
* type: 'FEATURE',
|
|
37
|
-
* });
|
|
38
|
-
* ```
|
|
39
22
|
*/
|
|
40
23
|
update(id: string, params: EntitlementUpdateParams, options?: RequestOptions): APIPromise<PlanEntitlement> {
|
|
41
24
|
const { planId, ...body } = params;
|
|
@@ -44,12 +27,6 @@ export class Entitlements extends APIResource {
|
|
|
44
27
|
|
|
45
28
|
/**
|
|
46
29
|
* Retrieves a list of entitlements for a plan.
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```ts
|
|
50
|
-
* const entitlements =
|
|
51
|
-
* await client.v1.plans.entitlements.list('planId');
|
|
52
|
-
* ```
|
|
53
30
|
*/
|
|
54
31
|
list(planID: string, options?: RequestOptions): APIPromise<EntitlementListResponse> {
|
|
55
32
|
return this._client.get(path`/api/v1/plans/${planID}/entitlements`, options);
|
|
@@ -57,14 +34,6 @@ export class Entitlements extends APIResource {
|
|
|
57
34
|
|
|
58
35
|
/**
|
|
59
36
|
* Deletes an entitlement from a draft plan.
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```ts
|
|
63
|
-
* const planEntitlement =
|
|
64
|
-
* await client.v1.plans.entitlements.delete('id', {
|
|
65
|
-
* planId: 'planId',
|
|
66
|
-
* });
|
|
67
|
-
* ```
|
|
68
37
|
*/
|
|
69
38
|
delete(id: string, params: EntitlementDeleteParams, options?: RequestOptions): APIPromise<PlanEntitlement> {
|
|
70
39
|
const { planId } = params;
|
|
@@ -24,15 +24,6 @@ export class Plans extends APIResource {
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Creates a new plan in draft status.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const plan = await client.v1.plans.create({
|
|
31
|
-
* id: 'id',
|
|
32
|
-
* displayName: 'displayName',
|
|
33
|
-
* productId: 'productId',
|
|
34
|
-
* });
|
|
35
|
-
* ```
|
|
36
27
|
*/
|
|
37
28
|
create(body: PlanCreateParams, options?: RequestOptions): APIPromise<Plan> {
|
|
38
29
|
return this._client.post('/api/v1/plans', { body, ...options });
|
|
@@ -41,11 +32,6 @@ export class Plans extends APIResource {
|
|
|
41
32
|
/**
|
|
42
33
|
* Retrieves a plan by its unique identifier, including entitlements and pricing
|
|
43
34
|
* details.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```ts
|
|
47
|
-
* const plan = await client.v1.plans.retrieve('x');
|
|
48
|
-
* ```
|
|
49
35
|
*/
|
|
50
36
|
retrieve(id: string, options?: RequestOptions): APIPromise<Plan> {
|
|
51
37
|
return this._client.get(path`/api/v1/plans/${id}`, options);
|
|
@@ -54,11 +40,6 @@ export class Plans extends APIResource {
|
|
|
54
40
|
/**
|
|
55
41
|
* Updates an existing plan's properties such as display name, description, and
|
|
56
42
|
* metadata.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* const plan = await client.v1.plans.update('x');
|
|
61
|
-
* ```
|
|
62
43
|
*/
|
|
63
44
|
update(id: string, body: PlanUpdateParams, options?: RequestOptions): APIPromise<Plan> {
|
|
64
45
|
return this._client.patch(path`/api/v1/plans/${id}`, { body, ...options });
|
|
@@ -66,14 +47,6 @@ export class Plans extends APIResource {
|
|
|
66
47
|
|
|
67
48
|
/**
|
|
68
49
|
* Retrieves a paginated list of plans in the environment.
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* ```ts
|
|
72
|
-
* // Automatically fetches more pages as needed.
|
|
73
|
-
* for await (const planListResponse of client.v1.plans.list()) {
|
|
74
|
-
* // ...
|
|
75
|
-
* }
|
|
76
|
-
* ```
|
|
77
50
|
*/
|
|
78
51
|
list(
|
|
79
52
|
query: PlanListParams | null | undefined = {},
|
|
@@ -84,11 +57,6 @@ export class Plans extends APIResource {
|
|
|
84
57
|
|
|
85
58
|
/**
|
|
86
59
|
* Archives a plan, preventing it from being used in new subscriptions.
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* ```ts
|
|
90
|
-
* const plan = await client.v1.plans.archive('x');
|
|
91
|
-
* ```
|
|
92
60
|
*/
|
|
93
61
|
archive(id: string, options?: RequestOptions): APIPromise<Plan> {
|
|
94
62
|
return this._client.post(path`/api/v1/plans/${id}/archive`, options);
|
|
@@ -96,11 +64,6 @@ export class Plans extends APIResource {
|
|
|
96
64
|
|
|
97
65
|
/**
|
|
98
66
|
* Creates a draft version of an existing plan for modification before publishing.
|
|
99
|
-
*
|
|
100
|
-
* @example
|
|
101
|
-
* ```ts
|
|
102
|
-
* const plan = await client.v1.plans.createDraft('x');
|
|
103
|
-
* ```
|
|
104
67
|
*/
|
|
105
68
|
createDraft(id: string, options?: RequestOptions): APIPromise<Plan> {
|
|
106
69
|
return this._client.post(path`/api/v1/plans/${id}/draft`, options);
|
|
@@ -108,16 +71,6 @@ export class Plans extends APIResource {
|
|
|
108
71
|
|
|
109
72
|
/**
|
|
110
73
|
* Retrieves the list of charges configured on a plan.
|
|
111
|
-
*
|
|
112
|
-
* @example
|
|
113
|
-
* ```ts
|
|
114
|
-
* // Automatically fetches more pages as needed.
|
|
115
|
-
* for await (const planListChargesResponse of client.v1.plans.listCharges(
|
|
116
|
-
* 'x',
|
|
117
|
-
* )) {
|
|
118
|
-
* // ...
|
|
119
|
-
* }
|
|
120
|
-
* ```
|
|
121
74
|
*/
|
|
122
75
|
listCharges(
|
|
123
76
|
id: string,
|
|
@@ -133,16 +86,6 @@ export class Plans extends APIResource {
|
|
|
133
86
|
|
|
134
87
|
/**
|
|
135
88
|
* Retrieves the list of overage charges configured on a plan.
|
|
136
|
-
*
|
|
137
|
-
* @example
|
|
138
|
-
* ```ts
|
|
139
|
-
* // Automatically fetches more pages as needed.
|
|
140
|
-
* for await (const planListOverageChargesResponse of client.v1.plans.listOverageCharges(
|
|
141
|
-
* 'x',
|
|
142
|
-
* )) {
|
|
143
|
-
* // ...
|
|
144
|
-
* }
|
|
145
|
-
* ```
|
|
146
89
|
*/
|
|
147
90
|
listOverageCharges(
|
|
148
91
|
id: string,
|
|
@@ -158,13 +101,6 @@ export class Plans extends APIResource {
|
|
|
158
101
|
|
|
159
102
|
/**
|
|
160
103
|
* Publishes a draft plan, making it available for use in subscriptions.
|
|
161
|
-
*
|
|
162
|
-
* @example
|
|
163
|
-
* ```ts
|
|
164
|
-
* const response = await client.v1.plans.publish('x', {
|
|
165
|
-
* migrationType: 'NEW_CUSTOMERS',
|
|
166
|
-
* });
|
|
167
|
-
* ```
|
|
168
104
|
*/
|
|
169
105
|
publish(id: string, body: PlanPublishParams, options?: RequestOptions): APIPromise<PlanPublishResponse> {
|
|
170
106
|
return this._client.post(path`/api/v1/plans/${id}/publish`, { body, ...options });
|
|
@@ -172,11 +108,6 @@ export class Plans extends APIResource {
|
|
|
172
108
|
|
|
173
109
|
/**
|
|
174
110
|
* Removes a draft version of a plan.
|
|
175
|
-
*
|
|
176
|
-
* @example
|
|
177
|
-
* ```ts
|
|
178
|
-
* const response = await client.v1.plans.removeDraft('x');
|
|
179
|
-
* ```
|
|
180
111
|
*/
|
|
181
112
|
removeDraft(id: string, options?: RequestOptions): APIPromise<PlanRemoveDraftResponse> {
|
|
182
113
|
return this._client.delete(path`/api/v1/plans/${id}/draft`, options);
|