@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
|
@@ -2,81 +2,95 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
5
6
|
import { RequestOptions } from '../../../internal/request-options';
|
|
6
7
|
import { path } from '../../../internal/utils/path';
|
|
7
8
|
|
|
8
9
|
export class Entitlements extends APIResource {
|
|
9
10
|
/**
|
|
10
11
|
* Creates one or more entitlements (feature or credit) on a draft addon.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const entitlement =
|
|
15
|
-
* await client.v1.addons.entitlements.create('addonId', {
|
|
16
|
-
* entitlements: [{ id: 'id', type: 'FEATURE' }],
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
12
|
*/
|
|
20
13
|
create(
|
|
21
14
|
addonID: string,
|
|
22
|
-
|
|
15
|
+
params: EntitlementCreateParams,
|
|
23
16
|
options?: RequestOptions,
|
|
24
17
|
): APIPromise<EntitlementCreateResponse> {
|
|
25
|
-
|
|
18
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
19
|
+
return this._client.post(path`/api/v1/addons/${addonID}/entitlements`, {
|
|
20
|
+
body,
|
|
21
|
+
...options,
|
|
22
|
+
headers: buildHeaders([
|
|
23
|
+
{
|
|
24
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
25
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
26
|
+
},
|
|
27
|
+
options?.headers,
|
|
28
|
+
]),
|
|
29
|
+
});
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
/**
|
|
29
33
|
* Updates an existing entitlement on a draft addon.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const addonPackageEntitlement =
|
|
34
|
-
* await client.v1.addons.entitlements.update('id', {
|
|
35
|
-
* addonId: 'addonId',
|
|
36
|
-
* type: 'FEATURE',
|
|
37
|
-
* });
|
|
38
|
-
* ```
|
|
39
34
|
*/
|
|
40
35
|
update(
|
|
41
36
|
id: string,
|
|
42
37
|
params: EntitlementUpdateParams,
|
|
43
38
|
options?: RequestOptions,
|
|
44
39
|
): APIPromise<AddonPackageEntitlement> {
|
|
45
|
-
const { addonId, ...body } = params;
|
|
46
|
-
return this._client.patch(path`/api/v1/addons/${addonId}/entitlements/${id}`, {
|
|
40
|
+
const { addonId, 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
41
|
+
return this._client.patch(path`/api/v1/addons/${addonId}/entitlements/${id}`, {
|
|
42
|
+
body,
|
|
43
|
+
...options,
|
|
44
|
+
headers: buildHeaders([
|
|
45
|
+
{
|
|
46
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
47
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
48
|
+
},
|
|
49
|
+
options?.headers,
|
|
50
|
+
]),
|
|
51
|
+
});
|
|
47
52
|
}
|
|
48
53
|
|
|
49
54
|
/**
|
|
50
55
|
* Retrieves a list of entitlements for an addon.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```ts
|
|
54
|
-
* const entitlements =
|
|
55
|
-
* await client.v1.addons.entitlements.list('addonId');
|
|
56
|
-
* ```
|
|
57
56
|
*/
|
|
58
|
-
list(
|
|
59
|
-
|
|
57
|
+
list(
|
|
58
|
+
addonID: string,
|
|
59
|
+
params: EntitlementListParams | null | undefined = {},
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): APIPromise<EntitlementListResponse> {
|
|
62
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
63
|
+
return this._client.get(path`/api/v1/addons/${addonID}/entitlements`, {
|
|
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
|
+
});
|
|
60
73
|
}
|
|
61
74
|
|
|
62
75
|
/**
|
|
63
76
|
* Deletes an entitlement from a draft addon.
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* ```ts
|
|
67
|
-
* const addonPackageEntitlement =
|
|
68
|
-
* await client.v1.addons.entitlements.delete('id', {
|
|
69
|
-
* addonId: 'addonId',
|
|
70
|
-
* });
|
|
71
|
-
* ```
|
|
72
77
|
*/
|
|
73
78
|
delete(
|
|
74
79
|
id: string,
|
|
75
80
|
params: EntitlementDeleteParams,
|
|
76
81
|
options?: RequestOptions,
|
|
77
82
|
): APIPromise<AddonPackageEntitlement> {
|
|
78
|
-
const { addonId } = params;
|
|
79
|
-
return this._client.delete(path`/api/v1/addons/${addonId}/entitlements/${id}`,
|
|
83
|
+
const { addonId, 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params;
|
|
84
|
+
return this._client.delete(path`/api/v1/addons/${addonId}/entitlements/${id}`, {
|
|
85
|
+
...options,
|
|
86
|
+
headers: buildHeaders([
|
|
87
|
+
{
|
|
88
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
89
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
90
|
+
},
|
|
91
|
+
options?.headers,
|
|
92
|
+
]),
|
|
93
|
+
});
|
|
80
94
|
}
|
|
81
95
|
}
|
|
82
96
|
|
|
@@ -766,9 +780,22 @@ export namespace EntitlementListResponse {
|
|
|
766
780
|
|
|
767
781
|
export interface EntitlementCreateParams {
|
|
768
782
|
/**
|
|
769
|
-
* Entitlements to create
|
|
783
|
+
* Body param: Entitlements to create
|
|
770
784
|
*/
|
|
771
785
|
entitlements: Array<EntitlementCreateParams.Feature | EntitlementCreateParams.Credit>;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
789
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
790
|
+
*/
|
|
791
|
+
'X-ACCOUNT-ID'?: string;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
795
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
796
|
+
* intrinsic to the key).
|
|
797
|
+
*/
|
|
798
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
772
799
|
}
|
|
773
800
|
|
|
774
801
|
export namespace EntitlementCreateParams {
|
|
@@ -1059,6 +1086,19 @@ export declare namespace EntitlementUpdateParams {
|
|
|
1059
1086
|
* Body param: Configuration for yearly reset period
|
|
1060
1087
|
*/
|
|
1061
1088
|
yearlyResetPeriodConfiguration?: UpdateFeatureEntitlementRequest.YearlyResetPeriodConfiguration | null;
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
1092
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
1093
|
+
*/
|
|
1094
|
+
'X-ACCOUNT-ID'?: string;
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
1098
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
1099
|
+
* intrinsic to the key).
|
|
1100
|
+
*/
|
|
1101
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
1062
1102
|
}
|
|
1063
1103
|
|
|
1064
1104
|
export namespace UpdateFeatureEntitlementRequest {
|
|
@@ -1162,14 +1202,55 @@ export declare namespace EntitlementUpdateParams {
|
|
|
1162
1202
|
* Body param: Display order of the entitlement
|
|
1163
1203
|
*/
|
|
1164
1204
|
order?: number;
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
1208
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
1209
|
+
*/
|
|
1210
|
+
'X-ACCOUNT-ID'?: string;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
1214
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
1215
|
+
* intrinsic to the key).
|
|
1216
|
+
*/
|
|
1217
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
1165
1218
|
}
|
|
1166
1219
|
}
|
|
1167
1220
|
|
|
1221
|
+
export interface EntitlementListParams {
|
|
1222
|
+
/**
|
|
1223
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
1224
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
1225
|
+
*/
|
|
1226
|
+
'X-ACCOUNT-ID'?: string;
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
1230
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
1231
|
+
* key).
|
|
1232
|
+
*/
|
|
1233
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1168
1236
|
export interface EntitlementDeleteParams {
|
|
1169
1237
|
/**
|
|
1170
|
-
* The addon ID
|
|
1238
|
+
* Path param: The addon ID
|
|
1171
1239
|
*/
|
|
1172
1240
|
addonId: string;
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
1244
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
1245
|
+
*/
|
|
1246
|
+
'X-ACCOUNT-ID'?: string;
|
|
1247
|
+
|
|
1248
|
+
/**
|
|
1249
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
1250
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
1251
|
+
* intrinsic to the key).
|
|
1252
|
+
*/
|
|
1253
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
1173
1254
|
}
|
|
1174
1255
|
|
|
1175
1256
|
export declare namespace Entitlements {
|
|
@@ -1179,6 +1260,7 @@ export declare namespace Entitlements {
|
|
|
1179
1260
|
type EntitlementListResponse as EntitlementListResponse,
|
|
1180
1261
|
type EntitlementCreateParams as EntitlementCreateParams,
|
|
1181
1262
|
type EntitlementUpdateParams as EntitlementUpdateParams,
|
|
1263
|
+
type EntitlementListParams as EntitlementListParams,
|
|
1182
1264
|
type EntitlementDeleteParams as EntitlementDeleteParams,
|
|
1183
1265
|
};
|
|
1184
1266
|
}
|
|
@@ -8,10 +8,14 @@ export {
|
|
|
8
8
|
type AddonPublishResponse,
|
|
9
9
|
type AddonRemoveDraftResponse,
|
|
10
10
|
type AddonCreateParams,
|
|
11
|
+
type AddonRetrieveParams,
|
|
11
12
|
type AddonUpdateParams,
|
|
12
13
|
type AddonListParams,
|
|
14
|
+
type AddonArchiveParams,
|
|
15
|
+
type AddonCreateDraftParams,
|
|
13
16
|
type AddonListChargesParams,
|
|
14
17
|
type AddonPublishParams,
|
|
18
|
+
type AddonRemoveDraftParams,
|
|
15
19
|
type AddonListResponsesMyCursorIDPage,
|
|
16
20
|
type AddonListChargesResponsesMyCursorIDPage,
|
|
17
21
|
} from './addons';
|
|
@@ -22,5 +26,6 @@ export {
|
|
|
22
26
|
type EntitlementListResponse,
|
|
23
27
|
type EntitlementCreateParams,
|
|
24
28
|
type EntitlementUpdateParams,
|
|
29
|
+
type EntitlementListParams,
|
|
25
30
|
type EntitlementDeleteParams,
|
|
26
31
|
} from './entitlements';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
|
5
5
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
7
8
|
import { path } from '../../internal/utils/path';
|
|
8
9
|
|
|
@@ -13,79 +14,101 @@ export class Coupons extends APIResource {
|
|
|
13
14
|
/**
|
|
14
15
|
* Creates a new discount coupon with percentage or fixed amount off, applicable to
|
|
15
16
|
* customer subscriptions.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
create(body: CouponCreateParams, options?: RequestOptions): APIPromise<Coupon> {
|
|
31
|
-
return this._client.post('/api/v1/coupons', { body, ...options });
|
|
17
|
+
*/
|
|
18
|
+
create(params: CouponCreateParams, options?: RequestOptions): APIPromise<Coupon> {
|
|
19
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
20
|
+
return this._client.post('/api/v1/coupons', {
|
|
21
|
+
body,
|
|
22
|
+
...options,
|
|
23
|
+
headers: buildHeaders([
|
|
24
|
+
{
|
|
25
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
26
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
27
|
+
},
|
|
28
|
+
options?.headers,
|
|
29
|
+
]),
|
|
30
|
+
});
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
34
|
* Retrieves a coupon by its unique identifier.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return this._client.get(path`/api/v1/coupons/${id}`,
|
|
35
|
+
*/
|
|
36
|
+
retrieve(
|
|
37
|
+
id: string,
|
|
38
|
+
params: CouponRetrieveParams | null | undefined = {},
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<Coupon> {
|
|
41
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
42
|
+
return this._client.get(path`/api/v1/coupons/${id}`, {
|
|
43
|
+
...options,
|
|
44
|
+
headers: buildHeaders([
|
|
45
|
+
{
|
|
46
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
47
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
48
|
+
},
|
|
49
|
+
options?.headers,
|
|
50
|
+
]),
|
|
51
|
+
});
|
|
44
52
|
}
|
|
45
53
|
|
|
46
54
|
/**
|
|
47
55
|
* Retrieves a paginated list of coupons in the environment.
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* // Automatically fetches more pages as needed.
|
|
52
|
-
* for await (const couponListResponse of client.v1.coupons.list()) {
|
|
53
|
-
* // ...
|
|
54
|
-
* }
|
|
55
|
-
* ```
|
|
56
56
|
*/
|
|
57
57
|
list(
|
|
58
|
-
|
|
58
|
+
params: CouponListParams | null | undefined = {},
|
|
59
59
|
options?: RequestOptions,
|
|
60
60
|
): PagePromise<CouponListResponsesMyCursorIDPage, CouponListResponse> {
|
|
61
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
61
62
|
return this._client.getAPIList('/api/v1/coupons', MyCursorIDPage<CouponListResponse>, {
|
|
62
63
|
query,
|
|
63
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
|
+
]),
|
|
64
72
|
});
|
|
65
73
|
}
|
|
66
74
|
|
|
67
75
|
/**
|
|
68
76
|
* Archives a coupon, preventing it from being applied to new subscriptions.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return this._client.post(path`/api/v1/coupons/${id}/archive`,
|
|
77
|
+
*/
|
|
78
|
+
archiveCoupon(
|
|
79
|
+
id: string,
|
|
80
|
+
params: CouponArchiveCouponParams | null | undefined = {},
|
|
81
|
+
options?: RequestOptions,
|
|
82
|
+
): APIPromise<Coupon> {
|
|
83
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
84
|
+
return this._client.post(path`/api/v1/coupons/${id}/archive`, {
|
|
85
|
+
...options,
|
|
86
|
+
headers: buildHeaders([
|
|
87
|
+
{
|
|
88
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
89
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
90
|
+
},
|
|
91
|
+
options?.headers,
|
|
92
|
+
]),
|
|
93
|
+
});
|
|
77
94
|
}
|
|
78
95
|
|
|
79
96
|
/**
|
|
80
97
|
* Updates an existing coupon's properties such as name, description, and metadata.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
98
|
+
*/
|
|
99
|
+
updateCoupon(id: string, params: CouponUpdateCouponParams, options?: RequestOptions): APIPromise<Coupon> {
|
|
100
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
101
|
+
return this._client.patch(path`/api/v1/coupons/${id}`, {
|
|
102
|
+
body,
|
|
103
|
+
...options,
|
|
104
|
+
headers: buildHeaders([
|
|
105
|
+
{
|
|
106
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
107
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
108
|
+
},
|
|
109
|
+
options?.headers,
|
|
110
|
+
]),
|
|
111
|
+
});
|
|
89
112
|
}
|
|
90
113
|
}
|
|
91
114
|
|
|
@@ -521,39 +544,52 @@ export namespace CouponListResponse {
|
|
|
521
544
|
|
|
522
545
|
export interface CouponCreateParams {
|
|
523
546
|
/**
|
|
524
|
-
* The unique identifier for the entity
|
|
547
|
+
* Body param: The unique identifier for the entity
|
|
525
548
|
*/
|
|
526
549
|
id: string;
|
|
527
550
|
|
|
528
551
|
/**
|
|
529
|
-
* Fixed amount discounts in different currencies
|
|
552
|
+
* Body param: Fixed amount discounts in different currencies
|
|
530
553
|
*/
|
|
531
554
|
amountsOff: Array<CouponCreateParams.AmountsOff> | null;
|
|
532
555
|
|
|
533
556
|
/**
|
|
534
|
-
* Description of the coupon
|
|
557
|
+
* Body param: Description of the coupon
|
|
535
558
|
*/
|
|
536
559
|
description: string | null;
|
|
537
560
|
|
|
538
561
|
/**
|
|
539
|
-
* Duration of the coupon validity in months
|
|
562
|
+
* Body param: Duration of the coupon validity in months
|
|
540
563
|
*/
|
|
541
564
|
durationInMonths: number | null;
|
|
542
565
|
|
|
543
566
|
/**
|
|
544
|
-
* Metadata associated with the entity
|
|
567
|
+
* Body param: Metadata associated with the entity
|
|
545
568
|
*/
|
|
546
569
|
metadata: { [key: string]: string } | null;
|
|
547
570
|
|
|
548
571
|
/**
|
|
549
|
-
* Name of the coupon
|
|
572
|
+
* Body param: Name of the coupon
|
|
550
573
|
*/
|
|
551
574
|
name: string;
|
|
552
575
|
|
|
553
576
|
/**
|
|
554
|
-
* Percentage discount off the original price
|
|
577
|
+
* Body param: Percentage discount off the original price
|
|
555
578
|
*/
|
|
556
579
|
percentOff: number | null;
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
583
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
584
|
+
*/
|
|
585
|
+
'X-ACCOUNT-ID'?: string;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
589
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
590
|
+
* intrinsic to the key).
|
|
591
|
+
*/
|
|
592
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
557
593
|
}
|
|
558
594
|
|
|
559
595
|
export namespace CouponCreateParams {
|
|
@@ -689,26 +725,55 @@ export namespace CouponCreateParams {
|
|
|
689
725
|
}
|
|
690
726
|
}
|
|
691
727
|
|
|
728
|
+
export interface CouponRetrieveParams {
|
|
729
|
+
/**
|
|
730
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
731
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
732
|
+
*/
|
|
733
|
+
'X-ACCOUNT-ID'?: string;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
737
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
738
|
+
* key).
|
|
739
|
+
*/
|
|
740
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
741
|
+
}
|
|
742
|
+
|
|
692
743
|
export interface CouponListParams extends MyCursorIDPageParams {
|
|
693
744
|
/**
|
|
694
|
-
* Filter by entity ID
|
|
745
|
+
* Query param: Filter by entity ID
|
|
695
746
|
*/
|
|
696
747
|
id?: string;
|
|
697
748
|
|
|
698
749
|
/**
|
|
699
|
-
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
750
|
+
* Query param: Filter by creation date using range operators: gt, gte, lt, lte
|
|
700
751
|
*/
|
|
701
752
|
createdAt?: CouponListParams.CreatedAt;
|
|
702
753
|
|
|
703
754
|
/**
|
|
704
|
-
* Filter by coupon status. Supports comma-separated values for
|
|
755
|
+
* Query param: Filter by coupon status. Supports comma-separated values for
|
|
756
|
+
* multiple statuses
|
|
705
757
|
*/
|
|
706
758
|
status?: Array<'ACTIVE' | 'ARCHIVED'>;
|
|
707
759
|
|
|
708
760
|
/**
|
|
709
|
-
* Filter by coupon type (FIXED or PERCENTAGE)
|
|
761
|
+
* Query param: Filter by coupon type (FIXED or PERCENTAGE)
|
|
710
762
|
*/
|
|
711
763
|
type?: 'FIXED' | 'PERCENTAGE';
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
767
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
768
|
+
*/
|
|
769
|
+
'X-ACCOUNT-ID'?: string;
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
773
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
774
|
+
* intrinsic to the key).
|
|
775
|
+
*/
|
|
776
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
712
777
|
}
|
|
713
778
|
|
|
714
779
|
export namespace CouponListParams {
|
|
@@ -738,21 +803,49 @@ export namespace CouponListParams {
|
|
|
738
803
|
}
|
|
739
804
|
}
|
|
740
805
|
|
|
806
|
+
export interface CouponArchiveCouponParams {
|
|
807
|
+
/**
|
|
808
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
809
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
810
|
+
*/
|
|
811
|
+
'X-ACCOUNT-ID'?: string;
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
815
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
816
|
+
* key).
|
|
817
|
+
*/
|
|
818
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
819
|
+
}
|
|
820
|
+
|
|
741
821
|
export interface CouponUpdateCouponParams {
|
|
742
822
|
/**
|
|
743
|
-
* Description of the coupon
|
|
823
|
+
* Body param: Description of the coupon
|
|
744
824
|
*/
|
|
745
825
|
description?: string | null;
|
|
746
826
|
|
|
747
827
|
/**
|
|
748
|
-
* Metadata associated with the entity
|
|
828
|
+
* Body param: Metadata associated with the entity
|
|
749
829
|
*/
|
|
750
830
|
metadata?: { [key: string]: string } | null;
|
|
751
831
|
|
|
752
832
|
/**
|
|
753
|
-
* Name of the coupon
|
|
833
|
+
* Body param: Name of the coupon
|
|
754
834
|
*/
|
|
755
835
|
name?: string;
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
839
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
840
|
+
*/
|
|
841
|
+
'X-ACCOUNT-ID'?: string;
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
845
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
846
|
+
* intrinsic to the key).
|
|
847
|
+
*/
|
|
848
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
756
849
|
}
|
|
757
850
|
|
|
758
851
|
export declare namespace Coupons {
|
|
@@ -761,7 +854,9 @@ export declare namespace Coupons {
|
|
|
761
854
|
type CouponListResponse as CouponListResponse,
|
|
762
855
|
type CouponListResponsesMyCursorIDPage as CouponListResponsesMyCursorIDPage,
|
|
763
856
|
type CouponCreateParams as CouponCreateParams,
|
|
857
|
+
type CouponRetrieveParams as CouponRetrieveParams,
|
|
764
858
|
type CouponListParams as CouponListParams,
|
|
859
|
+
type CouponArchiveCouponParams as CouponArchiveCouponParams,
|
|
765
860
|
type CouponUpdateCouponParams as CouponUpdateCouponParams,
|
|
766
861
|
};
|
|
767
862
|
}
|