@stigg/typescript 0.1.0-beta.20 → 0.1.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/v1/addons/addons.d.mts +145 -94
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +145 -94
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +110 -76
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +110 -76
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts +62 -36
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts +62 -36
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/entitlements.js +49 -39
- package/resources/v1/addons/entitlements.js.map +1 -1
- package/resources/v1/addons/entitlements.mjs +49 -39
- package/resources/v1/addons/entitlements.mjs.map +1 -1
- package/resources/v1/addons/index.d.mts +2 -2
- package/resources/v1/addons/index.d.mts.map +1 -1
- package/resources/v1/addons/index.d.ts +2 -2
- package/resources/v1/addons/index.d.ts.map +1 -1
- package/resources/v1/addons/index.js.map +1 -1
- package/resources/v1/addons/index.mjs.map +1 -1
- package/resources/v1/coupons.d.mts +81 -57
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +81 -57
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +60 -45
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +60 -45
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/credits/credits.d.mts +60 -52
- package/resources/v1/credits/credits.d.mts.map +1 -1
- package/resources/v1/credits/credits.d.ts +60 -52
- package/resources/v1/credits/credits.d.ts.map +1 -1
- package/resources/v1/credits/credits.js +36 -30
- package/resources/v1/credits/credits.js.map +1 -1
- package/resources/v1/credits/credits.mjs +36 -30
- package/resources/v1/credits/credits.mjs.map +1 -1
- package/resources/v1/credits/custom-currencies.d.mts +98 -74
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
- package/resources/v1/credits/custom-currencies.d.ts +98 -74
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
- package/resources/v1/credits/custom-currencies.js +76 -61
- package/resources/v1/credits/custom-currencies.js.map +1 -1
- package/resources/v1/credits/custom-currencies.mjs +76 -61
- package/resources/v1/credits/custom-currencies.mjs.map +1 -1
- package/resources/v1/credits/grants.d.mts +63 -54
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +63 -54
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/credits/grants.js +35 -33
- package/resources/v1/credits/grants.js.map +1 -1
- package/resources/v1/credits/grants.mjs +35 -33
- package/resources/v1/credits/grants.mjs.map +1 -1
- package/resources/v1/credits/index.d.mts +2 -2
- package/resources/v1/credits/index.d.mts.map +1 -1
- package/resources/v1/credits/index.d.ts +2 -2
- package/resources/v1/credits/index.d.ts.map +1 -1
- package/resources/v1/credits/index.js.map +1 -1
- package/resources/v1/credits/index.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +167 -127
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +167 -127
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +124 -96
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +124 -96
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +2 -2
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +2 -2
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +66 -58
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +66 -58
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/integrations.js +57 -56
- package/resources/v1/customers/integrations.js.map +1 -1
- package/resources/v1/customers/integrations.mjs +57 -56
- package/resources/v1/customers/integrations.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +33 -25
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +33 -25
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +26 -20
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +26 -20
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +42 -60
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +42 -60
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.js +38 -57
- package/resources/v1/customers/promotional-entitlements.js.map +1 -1
- package/resources/v1/customers/promotional-entitlements.mjs +38 -57
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
- package/resources/v1/events/data-export/data-export.d.mts +29 -21
- package/resources/v1/events/data-export/data-export.d.mts.map +1 -1
- package/resources/v1/events/data-export/data-export.d.ts +29 -21
- package/resources/v1/events/data-export/data-export.d.ts.map +1 -1
- package/resources/v1/events/data-export/data-export.js +27 -18
- package/resources/v1/events/data-export/data-export.js.map +1 -1
- package/resources/v1/events/data-export/data-export.mjs +27 -18
- package/resources/v1/events/data-export/data-export.mjs.map +1 -1
- package/resources/v1/events/data-export/destinations.d.mts +29 -22
- package/resources/v1/events/data-export/destinations.d.mts.map +1 -1
- package/resources/v1/events/data-export/destinations.d.ts +29 -22
- package/resources/v1/events/data-export/destinations.d.ts.map +1 -1
- package/resources/v1/events/data-export/destinations.js +26 -21
- package/resources/v1/events/data-export/destinations.js.map +1 -1
- package/resources/v1/events/data-export/destinations.mjs +26 -21
- package/resources/v1/events/data-export/destinations.mjs.map +1 -1
- package/resources/v1/events/data-export/index.d.mts +1 -1
- package/resources/v1/events/data-export/index.d.mts.map +1 -1
- package/resources/v1/events/data-export/index.d.ts +1 -1
- package/resources/v1/events/data-export/index.d.ts.map +1 -1
- package/resources/v1/events/data-export/index.js.map +1 -1
- package/resources/v1/events/data-export/index.mjs.map +1 -1
- package/resources/v1/events/events.d.mts +13 -19
- package/resources/v1/events/events.d.mts.map +1 -1
- package/resources/v1/events/events.d.ts +13 -19
- package/resources/v1/events/events.d.ts.map +1 -1
- package/resources/v1/events/events.js +14 -19
- package/resources/v1/events/events.js.map +1 -1
- package/resources/v1/events/events.mjs +14 -19
- package/resources/v1/events/events.mjs.map +1 -1
- package/resources/v1/events/index.d.mts +0 -1
- package/resources/v1/events/index.d.mts.map +1 -1
- package/resources/v1/events/index.d.ts +0 -1
- package/resources/v1/events/index.d.ts.map +1 -1
- package/resources/v1/events/index.js +3 -5
- package/resources/v1/events/index.js.map +1 -1
- package/resources/v1/events/index.mjs +0 -1
- package/resources/v1/events/index.mjs.map +1 -1
- package/resources/v1/features.d.mts +109 -74
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +109 -74
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/features.js +72 -54
- package/resources/v1/features.js.map +1 -1
- package/resources/v1/features.mjs +72 -54
- package/resources/v1/features.mjs.map +1 -1
- package/resources/v1/index.d.mts +7 -7
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +7 -7
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +62 -36
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts +62 -36
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/entitlements.js +49 -39
- package/resources/v1/plans/entitlements.js.map +1 -1
- package/resources/v1/plans/entitlements.mjs +49 -39
- package/resources/v1/plans/entitlements.mjs.map +1 -1
- package/resources/v1/plans/index.d.mts +2 -2
- package/resources/v1/plans/index.d.mts.map +1 -1
- package/resources/v1/plans/index.d.ts +2 -2
- package/resources/v1/plans/index.d.ts.map +1 -1
- package/resources/v1/plans/index.js.map +1 -1
- package/resources/v1/plans/index.mjs.map +1 -1
- package/resources/v1/plans/plans.d.mts +159 -106
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +159 -106
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +127 -89
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +127 -89
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +97 -66
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +97 -66
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.js +73 -54
- package/resources/v1/products.js.map +1 -1
- package/resources/v1/products.mjs +73 -54
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +29 -19
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +29 -19
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +25 -20
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +25 -20
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/index.d.mts +4 -4
- package/resources/v1/subscriptions/index.d.mts.map +1 -1
- package/resources/v1/subscriptions/index.d.ts +4 -4
- package/resources/v1/subscriptions/index.d.ts.map +1 -1
- package/resources/v1/subscriptions/index.js.map +1 -1
- package/resources/v1/subscriptions/index.mjs +1 -1
- package/resources/v1/subscriptions/index.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts +15 -8
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts +15 -8
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.js +13 -8
- package/resources/v1/subscriptions/invoice.js.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs +13 -8
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +244 -161
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +244 -161
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +126 -100
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +128 -102
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +29 -17
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts +29 -17
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- package/resources/v1/subscriptions/usage.js +26 -17
- package/resources/v1/subscriptions/usage.js.map +1 -1
- package/resources/v1/subscriptions/usage.mjs +26 -17
- package/resources/v1/subscriptions/usage.mjs.map +1 -1
- package/resources/v1/usage.d.mts +24 -26
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +24 -26
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +26 -28
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +26 -28
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +14 -14
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +14 -14
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1-beta/customers/assignments.d.mts +242 -0
- package/resources/v1-beta/customers/assignments.d.mts.map +1 -0
- package/resources/v1-beta/customers/assignments.d.ts +242 -0
- package/resources/v1-beta/customers/assignments.d.ts.map +1 -0
- package/resources/v1-beta/customers/assignments.js +84 -0
- package/resources/v1-beta/customers/assignments.js.map +1 -0
- package/resources/v1-beta/customers/assignments.mjs +80 -0
- package/resources/v1-beta/customers/assignments.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/customers.d.mts +1 -1
- package/resources/v1-beta/customers/customers.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/customers.d.ts +1 -1
- package/resources/v1-beta/customers/customers.d.ts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/customers.js +2 -2
- package/resources/v1-beta/customers/customers.js.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/customers.mjs +1 -1
- package/resources/v1-beta/customers/customers.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entities.d.mts +94 -47
- package/resources/v1-beta/customers/entities.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entities.d.ts +94 -47
- package/resources/v1-beta/customers/entities.d.ts.map +1 -0
- package/resources/v1-beta/customers/entities.js +150 -0
- package/resources/v1-beta/customers/entities.js.map +1 -0
- package/resources/v1-beta/customers/entities.mjs +146 -0
- package/resources/v1-beta/customers/entities.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entitlements.d.mts +27 -16
- package/resources/v1-beta/customers/entitlements.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers/entitlements.d.ts +27 -16
- package/resources/v1-beta/customers/entitlements.d.ts.map +1 -0
- package/resources/v1-beta/customers/entitlements.js +36 -0
- package/resources/v1-beta/customers/entitlements.js.map +1 -0
- package/resources/v1-beta/customers/entitlements.mjs +32 -0
- package/resources/v1-beta/customers/entitlements.mjs.map +1 -0
- package/resources/v1-beta/customers/index.d.mts.map +1 -0
- package/resources/v1-beta/customers/index.d.ts.map +1 -0
- package/resources/v1-beta/customers/index.js.map +1 -0
- package/resources/v1-beta/customers/index.mjs.map +1 -0
- package/resources/v1-beta/customers.d.mts.map +1 -0
- package/resources/v1-beta/customers.d.ts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/customers.js +1 -1
- package/resources/v1-beta/customers.js.map +1 -0
- package/resources/v1-beta/customers.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/entity-types.d.mts +44 -23
- package/resources/v1-beta/entity-types.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/entity-types.d.ts +44 -23
- package/resources/v1-beta/entity-types.d.ts.map +1 -0
- package/resources/v1-beta/entity-types.js +75 -0
- package/resources/v1-beta/entity-types.js.map +1 -0
- package/resources/v1-beta/entity-types.mjs +71 -0
- package/resources/v1-beta/entity-types.mjs.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/index.d.mts +1 -1
- package/resources/v1-beta/index.d.mts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/index.d.ts +1 -1
- package/resources/v1-beta/index.d.ts.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/index.js +3 -3
- package/resources/v1-beta/index.js.map +1 -0
- package/resources/{v1/events/beta → v1-beta}/index.mjs +1 -1
- package/resources/v1-beta/index.mjs.map +1 -0
- package/resources/{v1/events/beta/beta.d.mts → v1-beta/v1-beta.d.mts} +4 -4
- package/resources/v1-beta/v1-beta.d.mts.map +1 -0
- package/resources/{v1/events/beta/beta.d.ts → v1-beta/v1-beta.d.ts} +4 -4
- package/resources/v1-beta/v1-beta.d.ts.map +1 -0
- package/resources/{v1/events/beta/beta.js → v1-beta/v1-beta.js} +8 -8
- package/resources/v1-beta/v1-beta.js.map +1 -0
- package/resources/{v1/events/beta/beta.mjs → v1-beta/v1-beta.mjs} +5 -5
- package/resources/v1-beta/v1-beta.mjs.map +1 -0
- package/resources/v1-beta.d.mts +2 -0
- package/resources/v1-beta.d.mts.map +1 -0
- package/resources/v1-beta.d.ts +2 -0
- package/resources/v1-beta.d.ts.map +1 -0
- package/resources/{v1/events/beta.js → v1-beta.js} +3 -3
- package/resources/v1-beta.js.map +1 -0
- package/resources/{v1/events/beta.mjs → v1-beta.mjs} +2 -2
- package/resources/v1-beta.mjs.map +1 -0
- package/src/client.ts +5 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/v1/addons/addons.ts +293 -105
- package/src/resources/v1/addons/entitlements.ts +123 -41
- package/src/resources/v1/addons/index.ts +5 -0
- package/src/resources/v1/coupons.ts +158 -63
- package/src/resources/v1/credits/credits.ts +103 -50
- package/src/resources/v1/credits/custom-currencies.ts +191 -82
- package/src/resources/v1/credits/grants.ts +104 -54
- package/src/resources/v1/credits/index.ts +4 -0
- package/src/resources/v1/customers/customers.ts +324 -140
- package/src/resources/v1/customers/index.ts +8 -1
- package/src/resources/v1/customers/integrations.ts +129 -63
- package/src/resources/v1/customers/payment-method.ts +66 -25
- package/src/resources/v1/customers/promotional-entitlements.ts +82 -62
- package/src/resources/v1/events/data-export/data-export.ts +58 -21
- package/src/resources/v1/events/data-export/destinations.ts +61 -23
- package/src/resources/v1/events/data-export/index.ts +1 -0
- package/src/resources/v1/events/events.ts +28 -22
- package/src/resources/v1/events/index.ts +0 -1
- package/src/resources/v1/features.ts +209 -82
- package/src/resources/v1/index.ts +19 -0
- package/src/resources/v1/plans/entitlements.ts +123 -41
- package/src/resources/v1/plans/index.ts +5 -0
- package/src/resources/v1/plans/plans.ts +321 -119
- package/src/resources/v1/products.ts +193 -74
- package/src/resources/v1/subscriptions/future-update.ts +68 -21
- package/src/resources/v1/subscriptions/index.ts +9 -2
- package/src/resources/v1/subscriptions/invoice.ts +36 -9
- package/src/resources/v1/subscriptions/subscriptions.ts +417 -173
- package/src/resources/v1/subscriptions/usage.ts +61 -18
- package/src/resources/v1/usage.ts +53 -29
- package/src/resources/v1/v1.ts +38 -0
- package/src/resources/v1-beta/customers/assignments.ts +328 -0
- package/src/resources/{v1/events/beta → v1-beta}/customers/customers.ts +1 -1
- package/src/resources/{v1/events/beta → v1-beta}/customers/entities.ts +165 -54
- package/src/resources/{v1/events/beta → v1-beta}/customers/entitlements.ts +43 -18
- package/src/resources/{v1/events/beta → v1-beta}/entity-types.ts +70 -25
- package/src/resources/{v1/events/beta → v1-beta}/index.ts +1 -1
- package/src/resources/{v1/events/beta/beta.ts → v1-beta/v1-beta.ts} +5 -5
- package/src/resources/{v1/events/beta.ts → v1-beta.ts} +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/v1/events/beta/beta.d.mts.map +0 -1
- package/resources/v1/events/beta/beta.d.ts.map +0 -1
- package/resources/v1/events/beta/beta.js.map +0 -1
- package/resources/v1/events/beta/beta.mjs.map +0 -1
- package/resources/v1/events/beta/customers/assignments.d.mts +0 -178
- package/resources/v1/events/beta/customers/assignments.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/assignments.d.ts +0 -178
- package/resources/v1/events/beta/customers/assignments.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/assignments.js +0 -62
- package/resources/v1/events/beta/customers/assignments.js.map +0 -1
- package/resources/v1/events/beta/customers/assignments.mjs +0 -58
- package/resources/v1/events/beta/customers/assignments.mjs.map +0 -1
- package/resources/v1/events/beta/customers/customers.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/customers.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/customers.js.map +0 -1
- package/resources/v1/events/beta/customers/customers.mjs.map +0 -1
- package/resources/v1/events/beta/customers/entities.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/entities.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/entities.js +0 -105
- package/resources/v1/events/beta/customers/entities.js.map +0 -1
- package/resources/v1/events/beta/customers/entities.mjs +0 -101
- package/resources/v1/events/beta/customers/entities.mjs.map +0 -1
- package/resources/v1/events/beta/customers/entitlements.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/entitlements.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/entitlements.js +0 -26
- package/resources/v1/events/beta/customers/entitlements.js.map +0 -1
- package/resources/v1/events/beta/customers/entitlements.mjs +0 -22
- package/resources/v1/events/beta/customers/entitlements.mjs.map +0 -1
- package/resources/v1/events/beta/customers/index.d.mts.map +0 -1
- package/resources/v1/events/beta/customers/index.d.ts.map +0 -1
- package/resources/v1/events/beta/customers/index.js.map +0 -1
- package/resources/v1/events/beta/customers/index.mjs.map +0 -1
- package/resources/v1/events/beta/customers.d.mts.map +0 -1
- package/resources/v1/events/beta/customers.d.ts.map +0 -1
- package/resources/v1/events/beta/customers.js.map +0 -1
- package/resources/v1/events/beta/customers.mjs.map +0 -1
- package/resources/v1/events/beta/entity-types.d.mts.map +0 -1
- package/resources/v1/events/beta/entity-types.d.ts.map +0 -1
- package/resources/v1/events/beta/entity-types.js +0 -56
- package/resources/v1/events/beta/entity-types.js.map +0 -1
- package/resources/v1/events/beta/entity-types.mjs +0 -52
- package/resources/v1/events/beta/entity-types.mjs.map +0 -1
- package/resources/v1/events/beta/index.d.mts.map +0 -1
- package/resources/v1/events/beta/index.d.ts.map +0 -1
- package/resources/v1/events/beta/index.js.map +0 -1
- package/resources/v1/events/beta/index.mjs.map +0 -1
- package/resources/v1/events/beta.d.mts +0 -2
- package/resources/v1/events/beta.d.mts.map +0 -1
- package/resources/v1/events/beta.d.ts +0 -2
- package/resources/v1/events/beta.d.ts.map +0 -1
- package/resources/v1/events/beta.js.map +0 -1
- package/resources/v1/events/beta.mjs.map +0 -1
- package/src/resources/v1/events/beta/customers/assignments.ts +0 -228
- /package/resources/{v1/events/beta → v1-beta}/customers/index.d.mts +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers/index.d.ts +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers/index.js +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers/index.mjs +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers.d.mts +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers.d.ts +0 -0
- /package/resources/{v1/events/beta → v1-beta}/customers.mjs +0 -0
- /package/src/resources/{v1/events/beta → v1-beta}/customers/index.ts +0 -0
- /package/src/resources/{v1/events/beta → v1-beta}/customers.ts +0 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
8
|
+
import { path } from '../../../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class Assignments extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Returns a cursor-paginated list of capability assignments for the given
|
|
13
|
+
* customer. An assignment ties an entity to a capability with a usage limit and
|
|
14
|
+
* reset cadence.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* // Automatically fetches more pages as needed.
|
|
19
|
+
* for await (const assignmentListResponse of client.v1Beta.customers.assignments.list(
|
|
20
|
+
* 'id',
|
|
21
|
+
* )) {
|
|
22
|
+
* // ...
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
list(
|
|
27
|
+
id: string,
|
|
28
|
+
params: AssignmentListParams | null | undefined = {},
|
|
29
|
+
options?: RequestOptions,
|
|
30
|
+
): PagePromise<AssignmentListResponsesMyCursorIDPage, AssignmentListResponse> {
|
|
31
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
32
|
+
return this._client.getAPIList(
|
|
33
|
+
path`/api/v1-beta/customers/${id}/assignments`,
|
|
34
|
+
MyCursorIDPage<AssignmentListResponse>,
|
|
35
|
+
{
|
|
36
|
+
query,
|
|
37
|
+
...options,
|
|
38
|
+
headers: buildHeaders([
|
|
39
|
+
{
|
|
40
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
41
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
42
|
+
},
|
|
43
|
+
options?.headers,
|
|
44
|
+
]),
|
|
45
|
+
},
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Batched create-or-update of capability assignments. Existing assignments matched
|
|
51
|
+
* by (entityId, capabilityId) are updated; new pairs are created. On update,
|
|
52
|
+
* omitted fields (usageLimit, cadence) are preserved; on create both are required
|
|
53
|
+
* by the governance service.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const response =
|
|
58
|
+
* await client.v1Beta.customers.assignments.upsert('id', {
|
|
59
|
+
* assignments: [
|
|
60
|
+
* {
|
|
61
|
+
* entityId: 'workspace-001',
|
|
62
|
+
* featureId: 'compute-minutes',
|
|
63
|
+
* usageLimit: 1000,
|
|
64
|
+
* cadence: 'MONTH',
|
|
65
|
+
* },
|
|
66
|
+
* {
|
|
67
|
+
* entityId: 'workspace-002',
|
|
68
|
+
* currencyId: 'cred-type-tokens',
|
|
69
|
+
* usageLimit: 2000,
|
|
70
|
+
* cadence: 'MONTH',
|
|
71
|
+
* parentId: 'workspace-001',
|
|
72
|
+
* scopeEntityIds: ['user-1'],
|
|
73
|
+
* },
|
|
74
|
+
* ],
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
upsert(
|
|
79
|
+
id: string,
|
|
80
|
+
params: AssignmentUpsertParams,
|
|
81
|
+
options?: RequestOptions,
|
|
82
|
+
): APIPromise<AssignmentUpsertResponse> {
|
|
83
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
84
|
+
return this._client.put(path`/api/v1-beta/customers/${id}/assignments`, {
|
|
85
|
+
body,
|
|
86
|
+
...options,
|
|
87
|
+
headers: buildHeaders([
|
|
88
|
+
{
|
|
89
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
90
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
91
|
+
},
|
|
92
|
+
options?.headers,
|
|
93
|
+
]),
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type AssignmentListResponsesMyCursorIDPage = MyCursorIDPage<AssignmentListResponse>;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* A capability assignment for an entity belonging to a customer. Defines how much
|
|
102
|
+
* of the capability the entity may consume (`usageLimit`) and how often the
|
|
103
|
+
* counter resets (`cadence`).
|
|
104
|
+
*/
|
|
105
|
+
export interface AssignmentListResponse {
|
|
106
|
+
/**
|
|
107
|
+
* Synthetic UUID identifier — also the cursor anchor for paginated lists
|
|
108
|
+
*/
|
|
109
|
+
id: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Usage-reset cadence. Currently only `MONTH` is supported
|
|
113
|
+
*/
|
|
114
|
+
cadence: 'MONTH';
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Timestamp of when the record was created
|
|
118
|
+
*/
|
|
119
|
+
createdAt: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The entity refId this assignment is attached to
|
|
123
|
+
*/
|
|
124
|
+
entityId: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Parent entity refId in the hierarchy, or `null` for a root.
|
|
128
|
+
*/
|
|
129
|
+
parentId: string | null;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Dimension-scoped sub-budget key: the set of entity refIds this budget applies
|
|
133
|
+
* to. Empty is the node-wide budget that always matches; a non-empty set only
|
|
134
|
+
* applies when every listed entity is present in the resolved set
|
|
135
|
+
* (order-insensitive).
|
|
136
|
+
*/
|
|
137
|
+
scopeEntityIds: Array<string>;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Timestamp of when the record was last updated
|
|
141
|
+
*/
|
|
142
|
+
updatedAt: string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Maximum usage allowed within one cadence window
|
|
146
|
+
*/
|
|
147
|
+
usageLimit: number;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Currency refId this assignment grants (present for credit capabilities).
|
|
151
|
+
*/
|
|
152
|
+
currencyId?: string;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Feature refId this assignment grants (present for feature capabilities).
|
|
156
|
+
*/
|
|
157
|
+
featureId?: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Assignments after upsert.
|
|
162
|
+
*/
|
|
163
|
+
export interface AssignmentUpsertResponse {
|
|
164
|
+
data: Array<AssignmentUpsertResponse.Data>;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export namespace AssignmentUpsertResponse {
|
|
168
|
+
/**
|
|
169
|
+
* A capability assignment for an entity belonging to a customer. Defines how much
|
|
170
|
+
* of the capability the entity may consume (`usageLimit`) and how often the
|
|
171
|
+
* counter resets (`cadence`).
|
|
172
|
+
*/
|
|
173
|
+
export interface Data {
|
|
174
|
+
/**
|
|
175
|
+
* Synthetic UUID identifier — also the cursor anchor for paginated lists
|
|
176
|
+
*/
|
|
177
|
+
id: string;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Usage-reset cadence. Currently only `MONTH` is supported
|
|
181
|
+
*/
|
|
182
|
+
cadence: 'MONTH';
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Timestamp of when the record was created
|
|
186
|
+
*/
|
|
187
|
+
createdAt: string;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The entity refId this assignment is attached to
|
|
191
|
+
*/
|
|
192
|
+
entityId: string;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Parent entity refId in the hierarchy, or `null` for a root.
|
|
196
|
+
*/
|
|
197
|
+
parentId: string | null;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Dimension-scoped sub-budget key: the set of entity refIds this budget applies
|
|
201
|
+
* to. Empty is the node-wide budget that always matches; a non-empty set only
|
|
202
|
+
* applies when every listed entity is present in the resolved set
|
|
203
|
+
* (order-insensitive).
|
|
204
|
+
*/
|
|
205
|
+
scopeEntityIds: Array<string>;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Timestamp of when the record was last updated
|
|
209
|
+
*/
|
|
210
|
+
updatedAt: string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Maximum usage allowed within one cadence window
|
|
214
|
+
*/
|
|
215
|
+
usageLimit: number;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Currency refId this assignment grants (present for credit capabilities).
|
|
219
|
+
*/
|
|
220
|
+
currencyId?: string;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Feature refId this assignment grants (present for feature capabilities).
|
|
224
|
+
*/
|
|
225
|
+
featureId?: string;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface AssignmentListParams extends MyCursorIDPageParams {
|
|
230
|
+
/**
|
|
231
|
+
* Query param: Filter assignments to a specific capability refId
|
|
232
|
+
*/
|
|
233
|
+
capabilityId?: string;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Query param: Filter assignments to a specific entity refId
|
|
237
|
+
*/
|
|
238
|
+
entityId?: string;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
242
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
243
|
+
*/
|
|
244
|
+
'X-ACCOUNT-ID'?: string;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
248
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
249
|
+
* intrinsic to the key).
|
|
250
|
+
*/
|
|
251
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export interface AssignmentUpsertParams {
|
|
255
|
+
/**
|
|
256
|
+
* Body param: Assignments to upsert (1–100 per request)
|
|
257
|
+
*/
|
|
258
|
+
assignments: Array<AssignmentUpsertParams.Assignment>;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
262
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
263
|
+
*/
|
|
264
|
+
'X-ACCOUNT-ID'?: string;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
268
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
269
|
+
* intrinsic to the key).
|
|
270
|
+
*/
|
|
271
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export namespace AssignmentUpsertParams {
|
|
275
|
+
/**
|
|
276
|
+
* A single assignment to create or update. Identify the capability with exactly
|
|
277
|
+
* one of `featureId` or `currencyId`. The natural key is the
|
|
278
|
+
* `(entityId, capability, scopeEntityIds)` triple. On create both `usageLimit` and
|
|
279
|
+
* `cadence` are required; on update they may be omitted individually to preserve
|
|
280
|
+
* the existing value.
|
|
281
|
+
*/
|
|
282
|
+
export interface Assignment {
|
|
283
|
+
/**
|
|
284
|
+
* The entity refId this assignment is attached to
|
|
285
|
+
*/
|
|
286
|
+
entityId: string;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Usage-reset cadence (required on create). Currently only `MONTH` is supported
|
|
290
|
+
*/
|
|
291
|
+
cadence?: 'MONTH';
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Currency refId this assignment grants (credit budgets). Mutually exclusive with
|
|
295
|
+
* `featureId`.
|
|
296
|
+
*/
|
|
297
|
+
currencyId?: string;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Feature refId this assignment grants. Mutually exclusive with `currencyId`.
|
|
301
|
+
*/
|
|
302
|
+
featureId?: string;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Parent entity refId in the hierarchy. Omit to leave the current parent untouched
|
|
306
|
+
* (a new node defaults to a root); `null` detaches to a root; a refId sets or
|
|
307
|
+
* changes the parent. Reparenting an existing node is leaf-only.
|
|
308
|
+
*/
|
|
309
|
+
parentId?: string | null;
|
|
310
|
+
|
|
311
|
+
scopeEntityIds?: Array<string>;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Maximum usage allowed within one cadence window (required on create)
|
|
315
|
+
*/
|
|
316
|
+
usageLimit?: number;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export declare namespace Assignments {
|
|
321
|
+
export {
|
|
322
|
+
type AssignmentListResponse as AssignmentListResponse,
|
|
323
|
+
type AssignmentUpsertResponse as AssignmentUpsertResponse,
|
|
324
|
+
type AssignmentListResponsesMyCursorIDPage as AssignmentListResponsesMyCursorIDPage,
|
|
325
|
+
type AssignmentListParams as AssignmentListParams,
|
|
326
|
+
type AssignmentUpsertParams as AssignmentUpsertParams,
|
|
327
|
+
};
|
|
328
|
+
}
|
|
@@ -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,
|
|
@@ -1,10 +1,11 @@
|
|
|
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 {
|
|
7
|
-
import {
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
8
|
+
import { path } from '../../../internal/utils/path';
|
|
8
9
|
|
|
9
10
|
export class Entities extends APIResource {
|
|
10
11
|
/**
|
|
@@ -13,10 +14,9 @@ export class Entities extends APIResource {
|
|
|
13
14
|
* @example
|
|
14
15
|
* ```ts
|
|
15
16
|
* const entity =
|
|
16
|
-
* await client.
|
|
17
|
-
* '
|
|
18
|
-
*
|
|
19
|
-
* );
|
|
17
|
+
* await client.v1Beta.customers.entities.retrieve('x', {
|
|
18
|
+
* id: 'id',
|
|
19
|
+
* });
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
22
|
retrieve(
|
|
@@ -24,8 +24,17 @@ export class Entities extends APIResource {
|
|
|
24
24
|
params: EntityRetrieveParams,
|
|
25
25
|
options?: RequestOptions,
|
|
26
26
|
): APIPromise<EntityRetrieveResponse> {
|
|
27
|
-
const { id } = params;
|
|
28
|
-
return this._client.get(path`/api/v1-beta/customers/${id}/entities/${entityID}`,
|
|
27
|
+
const { id, 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params;
|
|
28
|
+
return this._client.get(path`/api/v1-beta/customers/${id}/entities/${entityID}`, {
|
|
29
|
+
...options,
|
|
30
|
+
headers: buildHeaders([
|
|
31
|
+
{
|
|
32
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
33
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
34
|
+
},
|
|
35
|
+
options?.headers,
|
|
36
|
+
]),
|
|
37
|
+
});
|
|
29
38
|
}
|
|
30
39
|
|
|
31
40
|
/**
|
|
@@ -34,7 +43,7 @@ export class Entities extends APIResource {
|
|
|
34
43
|
* @example
|
|
35
44
|
* ```ts
|
|
36
45
|
* // Automatically fetches more pages as needed.
|
|
37
|
-
* for await (const entityListResponse of client.
|
|
46
|
+
* for await (const entityListResponse of client.v1Beta.customers.entities.list(
|
|
38
47
|
* 'id',
|
|
39
48
|
* )) {
|
|
40
49
|
* // ...
|
|
@@ -43,13 +52,24 @@ export class Entities extends APIResource {
|
|
|
43
52
|
*/
|
|
44
53
|
list(
|
|
45
54
|
id: string,
|
|
46
|
-
|
|
55
|
+
params: EntityListParams | null | undefined = {},
|
|
47
56
|
options?: RequestOptions,
|
|
48
57
|
): PagePromise<EntityListResponsesMyCursorIDPage, EntityListResponse> {
|
|
58
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
49
59
|
return this._client.getAPIList(
|
|
50
60
|
path`/api/v1-beta/customers/${id}/entities`,
|
|
51
61
|
MyCursorIDPage<EntityListResponse>,
|
|
52
|
-
{
|
|
62
|
+
{
|
|
63
|
+
query,
|
|
64
|
+
...options,
|
|
65
|
+
headers: buildHeaders([
|
|
66
|
+
{
|
|
67
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
68
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
69
|
+
},
|
|
70
|
+
options?.headers,
|
|
71
|
+
]),
|
|
72
|
+
},
|
|
53
73
|
);
|
|
54
74
|
}
|
|
55
75
|
|
|
@@ -59,18 +79,28 @@ export class Entities extends APIResource {
|
|
|
59
79
|
* @example
|
|
60
80
|
* ```ts
|
|
61
81
|
* const response =
|
|
62
|
-
* await client.
|
|
63
|
-
* '
|
|
64
|
-
*
|
|
65
|
-
* );
|
|
82
|
+
* await client.v1Beta.customers.entities.archive('id', {
|
|
83
|
+
* ids: ['user-7f3a0c1d', 'user-c4d1b2e9'],
|
|
84
|
+
* });
|
|
66
85
|
* ```
|
|
67
86
|
*/
|
|
68
87
|
archive(
|
|
69
88
|
id: string,
|
|
70
|
-
|
|
89
|
+
params: EntityArchiveParams,
|
|
71
90
|
options?: RequestOptions,
|
|
72
91
|
): APIPromise<EntityArchiveResponse> {
|
|
73
|
-
|
|
92
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
93
|
+
return this._client.post(path`/api/v1-beta/customers/${id}/entities/archive`, {
|
|
94
|
+
body,
|
|
95
|
+
...options,
|
|
96
|
+
headers: buildHeaders([
|
|
97
|
+
{
|
|
98
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
99
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
100
|
+
},
|
|
101
|
+
options?.headers,
|
|
102
|
+
]),
|
|
103
|
+
});
|
|
74
104
|
}
|
|
75
105
|
|
|
76
106
|
/**
|
|
@@ -79,18 +109,28 @@ export class Entities extends APIResource {
|
|
|
79
109
|
* @example
|
|
80
110
|
* ```ts
|
|
81
111
|
* const response =
|
|
82
|
-
* await client.
|
|
83
|
-
* '
|
|
84
|
-
*
|
|
85
|
-
* );
|
|
112
|
+
* await client.v1Beta.customers.entities.unarchive('id', {
|
|
113
|
+
* ids: ['user-7f3a0c1d', 'user-c4d1b2e9'],
|
|
114
|
+
* });
|
|
86
115
|
* ```
|
|
87
116
|
*/
|
|
88
117
|
unarchive(
|
|
89
118
|
id: string,
|
|
90
|
-
|
|
119
|
+
params: EntityUnarchiveParams,
|
|
91
120
|
options?: RequestOptions,
|
|
92
121
|
): APIPromise<EntityUnarchiveResponse> {
|
|
93
|
-
|
|
122
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
123
|
+
return this._client.post(path`/api/v1-beta/customers/${id}/entities/unarchive`, {
|
|
124
|
+
body,
|
|
125
|
+
...options,
|
|
126
|
+
headers: buildHeaders([
|
|
127
|
+
{
|
|
128
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
129
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
130
|
+
},
|
|
131
|
+
options?.headers,
|
|
132
|
+
]),
|
|
133
|
+
});
|
|
94
134
|
}
|
|
95
135
|
|
|
96
136
|
/**
|
|
@@ -100,30 +140,35 @@ export class Entities extends APIResource {
|
|
|
100
140
|
* @example
|
|
101
141
|
* ```ts
|
|
102
142
|
* const response =
|
|
103
|
-
* await client.
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* typeRefId: 'user',
|
|
118
|
-
* metadata: { email: 'john@acme.com' },
|
|
119
|
-
* },
|
|
120
|
-
* ],
|
|
121
|
-
* },
|
|
122
|
-
* );
|
|
143
|
+
* await client.v1Beta.customers.entities.upsert('id', {
|
|
144
|
+
* entities: [
|
|
145
|
+
* {
|
|
146
|
+
* id: 'user-7f3a0c1d',
|
|
147
|
+
* typeRefId: 'user',
|
|
148
|
+
* metadata: { email: 'jane@acme.com', role: 'admin' },
|
|
149
|
+
* },
|
|
150
|
+
* {
|
|
151
|
+
* id: 'user-c4d1b2e9',
|
|
152
|
+
* typeRefId: 'user',
|
|
153
|
+
* metadata: { email: 'john@acme.com' },
|
|
154
|
+
* },
|
|
155
|
+
* ],
|
|
156
|
+
* });
|
|
123
157
|
* ```
|
|
124
158
|
*/
|
|
125
|
-
upsert(id: string,
|
|
126
|
-
|
|
159
|
+
upsert(id: string, params: EntityUpsertParams, options?: RequestOptions): APIPromise<EntityUpsertResponse> {
|
|
160
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
161
|
+
return this._client.put(path`/api/v1-beta/customers/${id}/entities`, {
|
|
162
|
+
body,
|
|
163
|
+
...options,
|
|
164
|
+
headers: buildHeaders([
|
|
165
|
+
{
|
|
166
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
167
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
168
|
+
},
|
|
169
|
+
options?.headers,
|
|
170
|
+
]),
|
|
171
|
+
});
|
|
127
172
|
}
|
|
128
173
|
}
|
|
129
174
|
|
|
@@ -301,42 +346,108 @@ export namespace EntityUpsertResponse {
|
|
|
301
346
|
|
|
302
347
|
export interface EntityRetrieveParams {
|
|
303
348
|
/**
|
|
304
|
-
* The customer identifier (owner) the entity belongs to
|
|
349
|
+
* Path param: The customer identifier (owner) the entity belongs to
|
|
305
350
|
*/
|
|
306
351
|
id: string;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
355
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
356
|
+
*/
|
|
357
|
+
'X-ACCOUNT-ID'?: string;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
361
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
362
|
+
* intrinsic to the key).
|
|
363
|
+
*/
|
|
364
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
307
365
|
}
|
|
308
366
|
|
|
309
367
|
export interface EntityListParams extends MyCursorIDPageParams {
|
|
310
368
|
/**
|
|
311
|
-
* Whether to include archived entities. One of: true, false
|
|
369
|
+
* Query param: Whether to include archived entities. One of: true, false
|
|
312
370
|
*/
|
|
313
371
|
includeArchived?: 'true' | 'false';
|
|
314
372
|
|
|
315
373
|
/**
|
|
316
|
-
* Filter results to entities of a specific entity type, by the type's
|
|
374
|
+
* Query param: Filter results to entities of a specific entity type, by the type's
|
|
375
|
+
* refId
|
|
317
376
|
*/
|
|
318
377
|
typeRefId?: string;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
381
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
382
|
+
*/
|
|
383
|
+
'X-ACCOUNT-ID'?: string;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
387
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
388
|
+
* intrinsic to the key).
|
|
389
|
+
*/
|
|
390
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
319
391
|
}
|
|
320
392
|
|
|
321
393
|
export interface EntityArchiveParams {
|
|
322
394
|
/**
|
|
323
|
-
* Entity identifiers to act on
|
|
395
|
+
* Body param: Entity identifiers to act on
|
|
324
396
|
*/
|
|
325
397
|
ids: Array<string>;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
401
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
402
|
+
*/
|
|
403
|
+
'X-ACCOUNT-ID'?: string;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
407
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
408
|
+
* intrinsic to the key).
|
|
409
|
+
*/
|
|
410
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
326
411
|
}
|
|
327
412
|
|
|
328
413
|
export interface EntityUnarchiveParams {
|
|
329
414
|
/**
|
|
330
|
-
* Entity identifiers to act on
|
|
415
|
+
* Body param: Entity identifiers to act on
|
|
331
416
|
*/
|
|
332
417
|
ids: Array<string>;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
421
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
422
|
+
*/
|
|
423
|
+
'X-ACCOUNT-ID'?: string;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
427
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
428
|
+
* intrinsic to the key).
|
|
429
|
+
*/
|
|
430
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
333
431
|
}
|
|
334
432
|
|
|
335
433
|
export interface EntityUpsertParams {
|
|
336
434
|
/**
|
|
337
|
-
* List of entities to create or update (1-100 entries)
|
|
435
|
+
* Body param: List of entities to create or update (1-100 entries)
|
|
338
436
|
*/
|
|
339
437
|
entities: Array<EntityUpsertParams.Entity>;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
441
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
442
|
+
*/
|
|
443
|
+
'X-ACCOUNT-ID'?: string;
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
447
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
448
|
+
* intrinsic to the key).
|
|
449
|
+
*/
|
|
450
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
340
451
|
}
|
|
341
452
|
|
|
342
453
|
export namespace EntityUpsertParams {
|