@stigg/typescript 0.1.0-beta.10 → 0.1.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/client.d.mts +0 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +0 -3
- package/client.d.ts.map +1 -1
- package/client.js +0 -3
- package/client.js.map +1 -1
- package/client.mjs +0 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +0 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +0 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +1 -1
- package/resources/v1/addons/addons.d.mts +226 -193
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +226 -193
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +60 -4
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +60 -4
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts +31 -0
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts +31 -0
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/entitlements.js +31 -0
- package/resources/v1/addons/entitlements.js.map +1 -1
- package/resources/v1/addons/entitlements.mjs +31 -0
- package/resources/v1/addons/entitlements.mjs.map +1 -1
- package/resources/v1/addons/index.d.mts +1 -1
- package/resources/v1/addons/index.d.mts.map +1 -1
- package/resources/v1/addons/index.d.ts +1 -1
- package/resources/v1/addons/index.d.ts.map +1 -1
- package/resources/v1/coupons.d.mts +36 -0
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +36 -0
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +36 -0
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +36 -0
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/credits/credits.d.mts +25 -0
- package/resources/v1/credits/credits.d.mts.map +1 -1
- package/resources/v1/credits/credits.d.ts +25 -0
- package/resources/v1/credits/credits.d.ts.map +1 -1
- package/resources/v1/credits/credits.js +25 -0
- package/resources/v1/credits/credits.js.map +1 -1
- package/resources/v1/credits/credits.mjs +25 -0
- package/resources/v1/credits/credits.mjs.map +1 -1
- package/resources/v1/credits/custom-currencies.d.mts +49 -0
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
- package/resources/v1/credits/custom-currencies.d.ts +49 -0
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
- package/resources/v1/credits/custom-currencies.js +49 -0
- package/resources/v1/credits/custom-currencies.js.map +1 -1
- package/resources/v1/credits/custom-currencies.mjs +49 -0
- package/resources/v1/credits/custom-currencies.mjs.map +1 -1
- package/resources/v1/credits/grants.d.mts +28 -0
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +28 -0
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/credits/grants.js +28 -0
- package/resources/v1/credits/grants.js.map +1 -1
- package/resources/v1/credits/grants.mjs +28 -0
- package/resources/v1/credits/grants.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +82 -5
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +82 -5
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +77 -0
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +77 -0
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +50 -3
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +50 -3
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/integrations.js +47 -0
- package/resources/v1/customers/integrations.js.map +1 -1
- package/resources/v1/customers/integrations.mjs +47 -0
- package/resources/v1/customers/integrations.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +17 -1
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +17 -1
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +16 -0
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +16 -0
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +51 -0
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +51 -0
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.js +51 -0
- package/resources/v1/customers/promotional-entitlements.js.map +1 -1
- package/resources/v1/customers/promotional-entitlements.mjs +51 -0
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
- package/resources/{v1-beta/v1-beta.d.mts → v1/events/beta/beta.d.mts} +4 -4
- package/resources/v1/events/beta/beta.d.mts.map +1 -0
- package/resources/{v1-beta/v1-beta.d.ts → v1/events/beta/beta.d.ts} +4 -4
- package/resources/v1/events/beta/beta.d.ts.map +1 -0
- package/resources/{v1-beta/v1-beta.js → v1/events/beta/beta.js} +8 -8
- package/resources/v1/events/beta/beta.js.map +1 -0
- package/resources/{v1-beta/v1-beta.mjs → v1/events/beta/beta.mjs} +5 -5
- package/resources/v1/events/beta/beta.mjs.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/assignments.d.mts +24 -21
- package/resources/v1/events/beta/customers/assignments.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/assignments.d.ts +24 -21
- package/resources/v1/events/beta/customers/assignments.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/assignments.js +23 -20
- package/resources/v1/events/beta/customers/assignments.js.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/assignments.mjs +23 -20
- package/resources/v1/events/beta/customers/assignments.mjs.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/customers.d.mts +3 -3
- package/resources/v1/events/beta/customers/customers.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/customers.d.ts +3 -3
- package/resources/v1/events/beta/customers/customers.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/customers.js +2 -2
- package/resources/v1/events/beta/customers/customers.js.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/customers.mjs +1 -1
- package/resources/v1/events/beta/customers/customers.mjs.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entities.d.mts +82 -62
- package/resources/v1/events/beta/customers/entities.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entities.d.ts +82 -62
- package/resources/v1/events/beta/customers/entities.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entities.js +38 -29
- package/resources/v1/events/beta/customers/entities.js.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entities.mjs +38 -29
- package/resources/v1/events/beta/customers/entities.mjs.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entitlements.d.mts +6 -4
- package/resources/v1/events/beta/customers/entitlements.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entitlements.d.ts +6 -4
- package/resources/v1/events/beta/customers/entitlements.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entitlements.js +5 -3
- package/resources/v1/events/beta/customers/entitlements.js.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers/entitlements.mjs +5 -3
- package/resources/v1/events/beta/customers/entitlements.mjs.map +1 -0
- package/resources/v1/events/beta/customers/index.d.mts +5 -0
- package/resources/v1/events/beta/customers/index.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/index.d.ts +5 -0
- package/resources/v1/events/beta/customers/index.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/index.js.map +1 -0
- package/resources/v1/events/beta/customers/index.mjs.map +1 -0
- package/resources/v1/events/beta/customers.d.mts.map +1 -0
- package/resources/v1/events/beta/customers.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/customers.js +1 -1
- package/resources/v1/events/beta/customers.js.map +1 -0
- package/resources/v1/events/beta/customers.mjs.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/entity-types.d.mts +20 -19
- package/resources/v1/events/beta/entity-types.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/entity-types.d.ts +20 -19
- package/resources/v1/events/beta/entity-types.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/entity-types.js +18 -17
- package/resources/v1/events/beta/entity-types.js.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/entity-types.mjs +18 -17
- package/resources/v1/events/beta/entity-types.mjs.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/index.d.mts +1 -1
- package/resources/v1/events/beta/index.d.mts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/index.d.ts +1 -1
- package/resources/v1/events/beta/index.d.ts.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/index.js +3 -3
- package/resources/v1/events/beta/index.js.map +1 -0
- package/resources/{v1-beta → v1/events/beta}/index.mjs +1 -1
- package/resources/v1/events/beta/index.mjs.map +1 -0
- package/resources/v1/events/beta.d.mts +2 -0
- package/resources/v1/events/beta.d.mts.map +1 -0
- package/resources/v1/events/beta.d.ts +2 -0
- package/resources/v1/events/beta.d.ts.map +1 -0
- package/resources/{v1-beta.js → v1/events/beta.js} +3 -3
- package/resources/v1/events/beta.js.map +1 -0
- package/resources/{v1-beta.mjs → v1/events/beta.mjs} +2 -2
- package/resources/v1/events/beta.mjs.map +1 -0
- package/resources/v1/events/events.d.mts +83 -0
- package/resources/v1/events/events.d.mts.map +1 -0
- package/resources/v1/events/events.d.ts +83 -0
- package/resources/v1/events/events.d.ts.map +1 -0
- package/resources/v1/events/events.js +40 -0
- package/resources/v1/events/events.js.map +1 -0
- package/resources/v1/events/events.mjs +35 -0
- package/resources/v1/events/events.mjs.map +1 -0
- package/resources/v1/events/index.d.mts +3 -0
- package/resources/v1/events/index.d.mts.map +1 -0
- package/resources/v1/events/index.d.ts +3 -0
- package/resources/v1/events/index.d.ts.map +1 -0
- package/resources/v1/events/index.js +9 -0
- package/resources/v1/events/index.js.map +1 -0
- package/resources/v1/events/index.mjs +4 -0
- package/resources/v1/events/index.mjs.map +1 -0
- package/resources/v1/events.d.mts +1 -65
- package/resources/v1/events.d.mts.map +1 -1
- package/resources/v1/events.d.ts +1 -65
- package/resources/v1/events.d.ts.map +1 -1
- package/resources/v1/events.js +2 -15
- package/resources/v1/events.js.map +1 -1
- package/resources/v1/events.mjs +1 -13
- package/resources/v1/events.mjs.map +1 -1
- package/resources/v1/features.d.mts +43 -0
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +43 -0
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/features.js +43 -0
- package/resources/v1/features.js.map +1 -1
- package/resources/v1/features.mjs +43 -0
- package/resources/v1/features.mjs.map +1 -1
- package/resources/v1/index.d.mts +3 -3
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +3 -3
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +6 -6
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +31 -0
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts +31 -0
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/entitlements.js +31 -0
- package/resources/v1/plans/entitlements.js.map +1 -1
- package/resources/v1/plans/entitlements.mjs +31 -0
- package/resources/v1/plans/entitlements.mjs.map +1 -1
- package/resources/v1/plans/index.d.mts +1 -1
- package/resources/v1/plans/index.d.mts.map +1 -1
- package/resources/v1/plans/index.d.ts +1 -1
- package/resources/v1/plans/index.d.ts.map +1 -1
- package/resources/v1/plans/index.js.map +1 -1
- package/resources/v1/plans/index.mjs.map +1 -1
- package/resources/v1/plans/plans.d.mts +402 -6
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +402 -6
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +69 -0
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +69 -0
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +43 -0
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +43 -0
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.js +43 -0
- package/resources/v1/products.js.map +1 -1
- package/resources/v1/products.mjs +43 -0
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +16 -0
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +16 -0
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +16 -0
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +16 -0
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts +6 -0
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts +6 -0
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.js +6 -0
- package/resources/v1/subscriptions/invoice.js.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs +6 -0
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +81 -0
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +81 -0
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +81 -0
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +81 -0
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +13 -0
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts +13 -0
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- package/resources/v1/subscriptions/usage.js +13 -0
- package/resources/v1/subscriptions/usage.js.map +1 -1
- package/resources/v1/subscriptions/usage.mjs +13 -0
- package/resources/v1/subscriptions/usage.mjs.map +1 -1
- package/resources/v1/usage.d.mts +24 -0
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +24 -0
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +24 -0
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +24 -0
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +6 -6
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +6 -6
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +2 -2
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +2 -2
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +0 -5
- package/src/resources/index.ts +0 -1
- package/src/resources/v1/addons/addons.ts +517 -487
- package/src/resources/v1/addons/entitlements.ts +31 -0
- package/src/resources/v1/addons/index.ts +2 -2
- package/src/resources/v1/coupons.ts +36 -0
- package/src/resources/v1/credits/credits.ts +25 -0
- package/src/resources/v1/credits/custom-currencies.ts +49 -0
- package/src/resources/v1/credits/grants.ts +28 -0
- package/src/resources/v1/customers/customers.ts +92 -5
- package/src/resources/v1/customers/integrations.ts +55 -2
- package/src/resources/v1/customers/payment-method.ts +19 -1
- package/src/resources/v1/customers/promotional-entitlements.ts +51 -0
- package/src/resources/{v1-beta/v1-beta.ts → v1/events/beta/beta.ts} +5 -5
- package/src/resources/{v1-beta → v1/events/beta}/customers/assignments.ts +25 -22
- package/src/resources/{v1-beta → v1/events/beta}/customers/customers.ts +5 -5
- package/src/resources/{v1-beta → v1/events/beta}/customers/entities.ts +88 -67
- package/src/resources/{v1-beta → v1/events/beta}/customers/entitlements.ts +7 -5
- package/src/resources/{v1-beta → v1/events/beta}/customers/index.ts +2 -2
- package/src/resources/{v1-beta → v1/events/beta}/entity-types.ts +20 -19
- package/src/resources/{v1-beta → v1/events/beta}/index.ts +1 -1
- package/src/resources/{v1-beta.ts → v1/events/beta.ts} +1 -1
- package/src/resources/v1/events/events.ts +98 -0
- package/src/resources/v1/events/index.ts +4 -0
- package/src/resources/v1/events.ts +1 -75
- package/src/resources/v1/features.ts +43 -0
- package/src/resources/v1/index.ts +7 -3
- package/src/resources/v1/plans/entitlements.ts +31 -0
- package/src/resources/v1/plans/index.ts +4 -0
- package/src/resources/v1/plans/plans.ts +1169 -8
- package/src/resources/v1/products.ts +43 -0
- package/src/resources/v1/subscriptions/future-update.ts +16 -0
- package/src/resources/v1/subscriptions/invoice.ts +6 -0
- package/src/resources/v1/subscriptions/subscriptions.ts +81 -0
- package/src/resources/v1/subscriptions/usage.ts +13 -0
- package/src/resources/v1/usage.ts +24 -0
- package/src/resources/v1/v1.ts +14 -6
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/v1-beta/customers/assignments.d.mts.map +0 -1
- package/resources/v1-beta/customers/assignments.d.ts.map +0 -1
- package/resources/v1-beta/customers/assignments.js.map +0 -1
- package/resources/v1-beta/customers/assignments.mjs.map +0 -1
- package/resources/v1-beta/customers/customers.d.mts.map +0 -1
- package/resources/v1-beta/customers/customers.d.ts.map +0 -1
- package/resources/v1-beta/customers/customers.js.map +0 -1
- package/resources/v1-beta/customers/customers.mjs.map +0 -1
- package/resources/v1-beta/customers/entities.d.mts.map +0 -1
- package/resources/v1-beta/customers/entities.d.ts.map +0 -1
- package/resources/v1-beta/customers/entities.js.map +0 -1
- package/resources/v1-beta/customers/entities.mjs.map +0 -1
- package/resources/v1-beta/customers/entitlements.d.mts.map +0 -1
- package/resources/v1-beta/customers/entitlements.d.ts.map +0 -1
- package/resources/v1-beta/customers/entitlements.js.map +0 -1
- package/resources/v1-beta/customers/entitlements.mjs.map +0 -1
- package/resources/v1-beta/customers/index.d.mts +0 -5
- package/resources/v1-beta/customers/index.d.mts.map +0 -1
- package/resources/v1-beta/customers/index.d.ts +0 -5
- package/resources/v1-beta/customers/index.d.ts.map +0 -1
- package/resources/v1-beta/customers/index.js.map +0 -1
- package/resources/v1-beta/customers/index.mjs.map +0 -1
- package/resources/v1-beta/customers.d.mts.map +0 -1
- package/resources/v1-beta/customers.d.ts.map +0 -1
- package/resources/v1-beta/customers.js.map +0 -1
- package/resources/v1-beta/customers.mjs.map +0 -1
- package/resources/v1-beta/entity-types.d.mts.map +0 -1
- package/resources/v1-beta/entity-types.d.ts.map +0 -1
- package/resources/v1-beta/entity-types.js.map +0 -1
- package/resources/v1-beta/entity-types.mjs.map +0 -1
- package/resources/v1-beta/index.d.mts.map +0 -1
- package/resources/v1-beta/index.d.ts.map +0 -1
- package/resources/v1-beta/index.js.map +0 -1
- package/resources/v1-beta/index.mjs.map +0 -1
- package/resources/v1-beta/v1-beta.d.mts.map +0 -1
- package/resources/v1-beta/v1-beta.d.ts.map +0 -1
- package/resources/v1-beta/v1-beta.js.map +0 -1
- package/resources/v1-beta/v1-beta.mjs.map +0 -1
- package/resources/v1-beta.d.mts +0 -2
- package/resources/v1-beta.d.mts.map +0 -1
- package/resources/v1-beta.d.ts +0 -2
- package/resources/v1-beta.d.ts.map +0 -1
- package/resources/v1-beta.js.map +0 -1
- package/resources/v1-beta.mjs.map +0 -1
- /package/resources/{v1-beta → v1/events/beta}/customers/index.js +0 -0
- /package/resources/{v1-beta → v1/events/beta}/customers/index.mjs +0 -0
- /package/resources/{v1-beta → v1/events/beta}/customers.d.mts +0 -0
- /package/resources/{v1-beta → v1/events/beta}/customers.d.ts +0 -0
- /package/resources/{v1-beta → v1/events/beta}/customers.mjs +0 -0
- /package/src/resources/{v1-beta → v1/events/beta}/customers.ts +0 -0
|
@@ -13,6 +13,38 @@ 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
|
+
* ```
|
|
16
48
|
*/
|
|
17
49
|
create(
|
|
18
50
|
id: string,
|
|
@@ -24,6 +56,16 @@ export class PromotionalEntitlements extends APIResource {
|
|
|
24
56
|
|
|
25
57
|
/**
|
|
26
58
|
* 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
|
+
* ```
|
|
27
69
|
*/
|
|
28
70
|
list(
|
|
29
71
|
id: string,
|
|
@@ -40,6 +82,15 @@ export class PromotionalEntitlements extends APIResource {
|
|
|
40
82
|
/**
|
|
41
83
|
* Revokes a previously granted promotional entitlement from a customer for a
|
|
42
84
|
* specific feature.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* const response =
|
|
89
|
+
* await client.v1.customers.promotionalEntitlements.revoke(
|
|
90
|
+
* 'featureId',
|
|
91
|
+
* { id: 'id' },
|
|
92
|
+
* );
|
|
93
|
+
* ```
|
|
43
94
|
*/
|
|
44
95
|
revoke(
|
|
45
96
|
featureID: string,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
3
|
+
import { APIResource } from '../../../../core/resource';
|
|
4
4
|
import * as EntityTypesAPI from './entity-types';
|
|
5
5
|
import {
|
|
6
6
|
EntityTypeListParams,
|
|
@@ -13,15 +13,15 @@ import {
|
|
|
13
13
|
import * as CustomersAPI from './customers/customers';
|
|
14
14
|
import { Customers } from './customers/customers';
|
|
15
15
|
|
|
16
|
-
export class
|
|
16
|
+
export class Beta extends APIResource {
|
|
17
17
|
customers: CustomersAPI.Customers = new CustomersAPI.Customers(this._client);
|
|
18
18
|
entityTypes: EntityTypesAPI.EntityTypes = new EntityTypesAPI.EntityTypes(this._client);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
Beta.Customers = Customers;
|
|
22
|
+
Beta.EntityTypes = EntityTypes;
|
|
23
23
|
|
|
24
|
-
export declare namespace
|
|
24
|
+
export declare namespace Beta {
|
|
25
25
|
export { Customers as Customers };
|
|
26
26
|
|
|
27
27
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
4
|
-
import { APIPromise } from '
|
|
5
|
-
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '
|
|
6
|
-
import { RequestOptions } from '
|
|
7
|
-
import { path } from '
|
|
3
|
+
import { APIResource } from '../../../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../../../core/api-promise';
|
|
5
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../../../core/pagination';
|
|
6
|
+
import { RequestOptions } from '../../../../../internal/request-options';
|
|
7
|
+
import { path } from '../../../../../internal/utils/path';
|
|
8
8
|
|
|
9
9
|
export class Assignments extends APIResource {
|
|
10
10
|
/**
|
|
@@ -15,7 +15,7 @@ export class Assignments extends APIResource {
|
|
|
15
15
|
* @example
|
|
16
16
|
* ```ts
|
|
17
17
|
* // Automatically fetches more pages as needed.
|
|
18
|
-
* for await (const assignmentListResponse of client.
|
|
18
|
+
* for await (const assignmentListResponse of client.v1.events.beta.customers.assignments.list(
|
|
19
19
|
* 'id',
|
|
20
20
|
* )) {
|
|
21
21
|
* // ...
|
|
@@ -43,22 +43,25 @@ export class Assignments extends APIResource {
|
|
|
43
43
|
* @example
|
|
44
44
|
* ```ts
|
|
45
45
|
* const response =
|
|
46
|
-
* await client.
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
46
|
+
* await client.v1.events.beta.customers.assignments.upsert(
|
|
47
|
+
* 'id',
|
|
48
|
+
* {
|
|
49
|
+
* assignments: [
|
|
50
|
+
* {
|
|
51
|
+
* entityId: 'workspace-001',
|
|
52
|
+
* capabilityId: 'compute-minutes',
|
|
53
|
+
* usageLimit: 1000,
|
|
54
|
+
* cadence: 'MONTH',
|
|
55
|
+
* },
|
|
56
|
+
* {
|
|
57
|
+
* entityId: 'workspace-002',
|
|
58
|
+
* capabilityId: 'compute-minutes',
|
|
59
|
+
* usageLimit: 2000,
|
|
60
|
+
* cadence: 'MONTH',
|
|
61
|
+
* },
|
|
62
|
+
* ],
|
|
63
|
+
* },
|
|
64
|
+
* );
|
|
62
65
|
* ```
|
|
63
66
|
*/
|
|
64
67
|
upsert(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
3
|
+
import { APIResource } from '../../../../../core/resource';
|
|
4
4
|
import * as AssignmentsAPI from './assignments';
|
|
5
5
|
import {
|
|
6
6
|
AssignmentListParams,
|
|
@@ -14,14 +14,14 @@ import * as EntitiesAPI from './entities';
|
|
|
14
14
|
import {
|
|
15
15
|
Entities,
|
|
16
16
|
EntityArchiveParams,
|
|
17
|
-
|
|
18
|
-
EntityIDsRequestDto,
|
|
17
|
+
EntityArchiveResponse,
|
|
19
18
|
EntityListParams,
|
|
20
19
|
EntityListResponse,
|
|
21
20
|
EntityListResponsesMyCursorIDPage,
|
|
22
21
|
EntityRetrieveParams,
|
|
23
22
|
EntityRetrieveResponse,
|
|
24
23
|
EntityUnarchiveParams,
|
|
24
|
+
EntityUnarchiveResponse,
|
|
25
25
|
EntityUpsertParams,
|
|
26
26
|
EntityUpsertResponse,
|
|
27
27
|
} from './entities';
|
|
@@ -47,10 +47,10 @@ export declare namespace Customers {
|
|
|
47
47
|
|
|
48
48
|
export {
|
|
49
49
|
Entities as Entities,
|
|
50
|
-
type EntityIDsActionResponseDto as EntityIDsActionResponseDto,
|
|
51
|
-
type EntityIDsRequestDto as EntityIDsRequestDto,
|
|
52
50
|
type EntityRetrieveResponse as EntityRetrieveResponse,
|
|
53
51
|
type EntityListResponse as EntityListResponse,
|
|
52
|
+
type EntityArchiveResponse as EntityArchiveResponse,
|
|
53
|
+
type EntityUnarchiveResponse as EntityUnarchiveResponse,
|
|
54
54
|
type EntityUpsertResponse as EntityUpsertResponse,
|
|
55
55
|
type EntityListResponsesMyCursorIDPage as EntityListResponsesMyCursorIDPage,
|
|
56
56
|
type EntityRetrieveParams as EntityRetrieveParams,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
4
|
-
import { APIPromise } from '
|
|
5
|
-
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '
|
|
6
|
-
import { RequestOptions } from '
|
|
7
|
-
import { path } from '
|
|
3
|
+
import { APIResource } from '../../../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../../../core/api-promise';
|
|
5
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../../../core/pagination';
|
|
6
|
+
import { RequestOptions } from '../../../../../internal/request-options';
|
|
7
|
+
import { path } from '../../../../../internal/utils/path';
|
|
8
8
|
|
|
9
9
|
export class Entities extends APIResource {
|
|
10
10
|
/**
|
|
@@ -13,9 +13,10 @@ export class Entities extends APIResource {
|
|
|
13
13
|
* @example
|
|
14
14
|
* ```ts
|
|
15
15
|
* const entity =
|
|
16
|
-
* await client.
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* await client.v1.events.beta.customers.entities.retrieve(
|
|
17
|
+
* 'x',
|
|
18
|
+
* { id: 'id' },
|
|
19
|
+
* );
|
|
19
20
|
* ```
|
|
20
21
|
*/
|
|
21
22
|
retrieve(
|
|
@@ -33,7 +34,7 @@ export class Entities extends APIResource {
|
|
|
33
34
|
* @example
|
|
34
35
|
* ```ts
|
|
35
36
|
* // Automatically fetches more pages as needed.
|
|
36
|
-
* for await (const entityListResponse of client.
|
|
37
|
+
* for await (const entityListResponse of client.v1.events.beta.customers.entities.list(
|
|
37
38
|
* 'id',
|
|
38
39
|
* )) {
|
|
39
40
|
* // ...
|
|
@@ -57,17 +58,18 @@ export class Entities extends APIResource {
|
|
|
57
58
|
*
|
|
58
59
|
* @example
|
|
59
60
|
* ```ts
|
|
60
|
-
* const
|
|
61
|
-
* await client.
|
|
62
|
-
*
|
|
63
|
-
*
|
|
61
|
+
* const response =
|
|
62
|
+
* await client.v1.events.beta.customers.entities.archive(
|
|
63
|
+
* 'id',
|
|
64
|
+
* { ids: ['user-7f3a0c1d', 'user-c4d1b2e9'] },
|
|
65
|
+
* );
|
|
64
66
|
* ```
|
|
65
67
|
*/
|
|
66
68
|
archive(
|
|
67
69
|
id: string,
|
|
68
70
|
body: EntityArchiveParams,
|
|
69
71
|
options?: RequestOptions,
|
|
70
|
-
): APIPromise<
|
|
72
|
+
): APIPromise<EntityArchiveResponse> {
|
|
71
73
|
return this._client.post(path`/api/v1-beta/customers/${id}/entities/archive`, { body, ...options });
|
|
72
74
|
}
|
|
73
75
|
|
|
@@ -76,17 +78,18 @@ export class Entities extends APIResource {
|
|
|
76
78
|
*
|
|
77
79
|
* @example
|
|
78
80
|
* ```ts
|
|
79
|
-
* const
|
|
80
|
-
* await client.
|
|
81
|
-
*
|
|
82
|
-
*
|
|
81
|
+
* const response =
|
|
82
|
+
* await client.v1.events.beta.customers.entities.unarchive(
|
|
83
|
+
* 'id',
|
|
84
|
+
* { ids: ['user-7f3a0c1d', 'user-c4d1b2e9'] },
|
|
85
|
+
* );
|
|
83
86
|
* ```
|
|
84
87
|
*/
|
|
85
88
|
unarchive(
|
|
86
89
|
id: string,
|
|
87
90
|
body: EntityUnarchiveParams,
|
|
88
91
|
options?: RequestOptions,
|
|
89
|
-
): APIPromise<
|
|
92
|
+
): APIPromise<EntityUnarchiveResponse> {
|
|
90
93
|
return this._client.post(path`/api/v1-beta/customers/${id}/entities/unarchive`, { body, ...options });
|
|
91
94
|
}
|
|
92
95
|
|
|
@@ -97,20 +100,26 @@ export class Entities extends APIResource {
|
|
|
97
100
|
* @example
|
|
98
101
|
* ```ts
|
|
99
102
|
* const response =
|
|
100
|
-
* await client.
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
103
|
+
* await client.v1.events.beta.customers.entities.upsert(
|
|
104
|
+
* 'id',
|
|
105
|
+
* {
|
|
106
|
+
* entities: [
|
|
107
|
+
* {
|
|
108
|
+
* id: 'user-7f3a0c1d',
|
|
109
|
+
* typeRefId: 'user',
|
|
110
|
+
* metadata: {
|
|
111
|
+
* email: 'jane@acme.com',
|
|
112
|
+
* role: 'admin',
|
|
113
|
+
* },
|
|
114
|
+
* },
|
|
115
|
+
* {
|
|
116
|
+
* id: 'user-c4d1b2e9',
|
|
117
|
+
* typeRefId: 'user',
|
|
118
|
+
* metadata: { email: 'john@acme.com' },
|
|
119
|
+
* },
|
|
120
|
+
* ],
|
|
121
|
+
* },
|
|
122
|
+
* );
|
|
114
123
|
* ```
|
|
115
124
|
*/
|
|
116
125
|
upsert(id: string, body: EntityUpsertParams, options?: RequestOptions): APIPromise<EntityUpsertResponse> {
|
|
@@ -120,38 +129,6 @@ export class Entities extends APIResource {
|
|
|
120
129
|
|
|
121
130
|
export type EntityListResponsesMyCursorIDPage = MyCursorIDPage<EntityListResponse>;
|
|
122
131
|
|
|
123
|
-
/**
|
|
124
|
-
* Wrapped response echoing the ids that were acted on by an archive/unarchive call
|
|
125
|
-
*/
|
|
126
|
-
export interface EntityIDsActionResponseDto {
|
|
127
|
-
/**
|
|
128
|
-
* List of entity identifiers that were acted on
|
|
129
|
-
*/
|
|
130
|
-
data: EntityIDsActionResponseDto.Data;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export namespace EntityIDsActionResponseDto {
|
|
134
|
-
/**
|
|
135
|
-
* List of entity identifiers that were acted on
|
|
136
|
-
*/
|
|
137
|
-
export interface Data {
|
|
138
|
-
/**
|
|
139
|
-
* Entity identifiers to act on
|
|
140
|
-
*/
|
|
141
|
-
ids: Array<string>;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* List of entity identifiers to act on in bulk (1-100 entries)
|
|
147
|
-
*/
|
|
148
|
-
export interface EntityIDsRequestDto {
|
|
149
|
-
/**
|
|
150
|
-
* Entity identifiers to act on
|
|
151
|
-
*/
|
|
152
|
-
ids: Array<string>;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
132
|
/**
|
|
156
133
|
* Response object
|
|
157
134
|
*/
|
|
@@ -234,6 +211,50 @@ export interface EntityListResponse {
|
|
|
234
211
|
updatedAt: string;
|
|
235
212
|
}
|
|
236
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Wrapped response echoing the ids that were acted on by an archive/unarchive call
|
|
216
|
+
*/
|
|
217
|
+
export interface EntityArchiveResponse {
|
|
218
|
+
/**
|
|
219
|
+
* List of entity identifiers that were acted on
|
|
220
|
+
*/
|
|
221
|
+
data: EntityArchiveResponse.Data;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export namespace EntityArchiveResponse {
|
|
225
|
+
/**
|
|
226
|
+
* List of entity identifiers that were acted on
|
|
227
|
+
*/
|
|
228
|
+
export interface Data {
|
|
229
|
+
/**
|
|
230
|
+
* Entity identifiers to act on
|
|
231
|
+
*/
|
|
232
|
+
ids: Array<string>;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Wrapped response echoing the ids that were acted on by an archive/unarchive call
|
|
238
|
+
*/
|
|
239
|
+
export interface EntityUnarchiveResponse {
|
|
240
|
+
/**
|
|
241
|
+
* List of entity identifiers that were acted on
|
|
242
|
+
*/
|
|
243
|
+
data: EntityUnarchiveResponse.Data;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export namespace EntityUnarchiveResponse {
|
|
247
|
+
/**
|
|
248
|
+
* List of entity identifiers that were acted on
|
|
249
|
+
*/
|
|
250
|
+
export interface Data {
|
|
251
|
+
/**
|
|
252
|
+
* Entity identifiers to act on
|
|
253
|
+
*/
|
|
254
|
+
ids: Array<string>;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
237
258
|
/**
|
|
238
259
|
* List of entities created or updated by an upsert request
|
|
239
260
|
*/
|
|
@@ -345,10 +366,10 @@ export namespace EntityUpsertParams {
|
|
|
345
366
|
|
|
346
367
|
export declare namespace Entities {
|
|
347
368
|
export {
|
|
348
|
-
type EntityIDsActionResponseDto as EntityIDsActionResponseDto,
|
|
349
|
-
type EntityIDsRequestDto as EntityIDsRequestDto,
|
|
350
369
|
type EntityRetrieveResponse as EntityRetrieveResponse,
|
|
351
370
|
type EntityListResponse as EntityListResponse,
|
|
371
|
+
type EntityArchiveResponse as EntityArchiveResponse,
|
|
372
|
+
type EntityUnarchiveResponse as EntityUnarchiveResponse,
|
|
352
373
|
type EntityUpsertResponse as EntityUpsertResponse,
|
|
353
374
|
type EntityListResponsesMyCursorIDPage as EntityListResponsesMyCursorIDPage,
|
|
354
375
|
type EntityRetrieveParams as EntityRetrieveParams,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
4
|
-
import { APIPromise } from '
|
|
5
|
-
import { RequestOptions } from '
|
|
6
|
-
import { path } from '
|
|
3
|
+
import { APIResource } from '../../../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../../../internal/request-options';
|
|
6
|
+
import { path } from '../../../../../internal/utils/path';
|
|
7
7
|
|
|
8
8
|
export class Entitlements extends APIResource {
|
|
9
9
|
/**
|
|
@@ -14,7 +14,9 @@ export class Entitlements extends APIResource {
|
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
16
|
* const response =
|
|
17
|
-
* await client.
|
|
17
|
+
* await client.v1.events.beta.customers.entitlements.check(
|
|
18
|
+
* 'x',
|
|
19
|
+
* );
|
|
18
20
|
* ```
|
|
19
21
|
*/
|
|
20
22
|
check(
|
|
@@ -11,10 +11,10 @@ export {
|
|
|
11
11
|
export { Customers } from './customers';
|
|
12
12
|
export {
|
|
13
13
|
Entities,
|
|
14
|
-
type EntityIDsActionResponseDto,
|
|
15
|
-
type EntityIDsRequestDto,
|
|
16
14
|
type EntityRetrieveResponse,
|
|
17
15
|
type EntityListResponse,
|
|
16
|
+
type EntityArchiveResponse,
|
|
17
|
+
type EntityUnarchiveResponse,
|
|
18
18
|
type EntityUpsertResponse,
|
|
19
19
|
type EntityRetrieveParams,
|
|
20
20
|
type EntityListParams,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
4
|
-
import { APIPromise } from '
|
|
5
|
-
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '
|
|
6
|
-
import { RequestOptions } from '
|
|
3
|
+
import { APIResource } from '../../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../../core/api-promise';
|
|
5
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../../core/pagination';
|
|
6
|
+
import { RequestOptions } from '../../../../internal/request-options';
|
|
7
7
|
|
|
8
8
|
export class EntityTypes extends APIResource {
|
|
9
9
|
/**
|
|
@@ -14,7 +14,7 @@ export class EntityTypes extends APIResource {
|
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
16
|
* // Automatically fetches more pages as needed.
|
|
17
|
-
* for await (const entityTypeListResponse of client.
|
|
17
|
+
* for await (const entityTypeListResponse of client.v1.events.beta.entityTypes.list()) {
|
|
18
18
|
* // ...
|
|
19
19
|
* }
|
|
20
20
|
* ```
|
|
@@ -36,20 +36,21 @@ export class EntityTypes extends APIResource {
|
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
38
|
* ```ts
|
|
39
|
-
* const response =
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
39
|
+
* const response =
|
|
40
|
+
* await client.v1.events.beta.entityTypes.upsert({
|
|
41
|
+
* types: [
|
|
42
|
+
* {
|
|
43
|
+
* id: 'org',
|
|
44
|
+
* displayName: 'Organization',
|
|
45
|
+
* attributionKeys: ['organizationId'],
|
|
46
|
+
* },
|
|
47
|
+
* {
|
|
48
|
+
* id: 'team',
|
|
49
|
+
* displayName: 'Team',
|
|
50
|
+
* attributionKeys: ['teamId'],
|
|
51
|
+
* },
|
|
52
|
+
* ],
|
|
53
|
+
* });
|
|
53
54
|
* ```
|
|
54
55
|
*/
|
|
55
56
|
upsert(body: EntityTypeUpsertParams, options?: RequestOptions): APIPromise<EntityTypeUpsertResponse> {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export { Beta } from './beta';
|
|
3
4
|
export { Customers } from './customers/index';
|
|
4
5
|
export {
|
|
5
6
|
EntityTypes,
|
|
@@ -9,4 +10,3 @@ export {
|
|
|
9
10
|
type EntityTypeUpsertParams,
|
|
10
11
|
type EntityTypeListResponsesMyCursorIDPage,
|
|
11
12
|
} from './entity-types';
|
|
12
|
-
export { V1Beta } from './v1-beta';
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as BetaAPI from './beta/beta';
|
|
5
|
+
import { Beta } from './beta/beta';
|
|
6
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
7
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Operations related to usage & metering
|
|
11
|
+
*/
|
|
12
|
+
export class Events extends APIResource {
|
|
13
|
+
beta: BetaAPI.Beta = new BetaAPI.Beta(this._client);
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Reports raw usage events for event-based metering. Events are ingested
|
|
17
|
+
* asynchronously and aggregated into usage totals.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const response = await client.v1.events.report({
|
|
22
|
+
* events: [
|
|
23
|
+
* {
|
|
24
|
+
* customerId: 'customerId',
|
|
25
|
+
* eventName: 'x',
|
|
26
|
+
* idempotencyKey: 'x',
|
|
27
|
+
* },
|
|
28
|
+
* ],
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
report(body: EventReportParams, options?: RequestOptions): APIPromise<EventReportResponse> {
|
|
33
|
+
return this._client.post('/api/v1/events', { body, ...options });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Response object
|
|
39
|
+
*/
|
|
40
|
+
export interface EventReportResponse {
|
|
41
|
+
/**
|
|
42
|
+
* Empty success response confirming that events were successfully ingested and
|
|
43
|
+
* queued for processing by Stigg's metering system.
|
|
44
|
+
*/
|
|
45
|
+
data: unknown;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface EventReportParams {
|
|
49
|
+
/**
|
|
50
|
+
* A list of usage events to report
|
|
51
|
+
*/
|
|
52
|
+
events: Array<EventReportParams.Event>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export namespace EventReportParams {
|
|
56
|
+
/**
|
|
57
|
+
* Raw usage event
|
|
58
|
+
*/
|
|
59
|
+
export interface Event {
|
|
60
|
+
/**
|
|
61
|
+
* Customer id
|
|
62
|
+
*/
|
|
63
|
+
customerId: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The name of the usage event
|
|
67
|
+
*/
|
|
68
|
+
eventName: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Idempotency key
|
|
72
|
+
*/
|
|
73
|
+
idempotencyKey: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Dimensions associated with the usage event
|
|
77
|
+
*/
|
|
78
|
+
dimensions?: { [key: string]: string | number | boolean };
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Resource id
|
|
82
|
+
*/
|
|
83
|
+
resourceId?: string | null;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Timestamp
|
|
87
|
+
*/
|
|
88
|
+
timestamp?: string;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
Events.Beta = Beta;
|
|
93
|
+
|
|
94
|
+
export declare namespace Events {
|
|
95
|
+
export { type EventReportResponse as EventReportResponse, type EventReportParams as EventReportParams };
|
|
96
|
+
|
|
97
|
+
export { Beta as Beta };
|
|
98
|
+
}
|