@stigg/typescript 0.1.0-beta.2 → 0.1.0-beta.21
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 +170 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/v1/addons/addons.d.mts +372 -32
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +372 -32
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +173 -15
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +173 -15
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts +93 -5
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts +93 -5
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/entitlements.js +80 -8
- package/resources/v1/addons/entitlements.js.map +1 -1
- package/resources/v1/addons/entitlements.mjs +80 -8
- 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/addons.d.mts.map +1 -1
- package/resources/v1/addons.d.ts.map +1 -1
- package/resources/v1/addons.mjs.map +1 -1
- package/resources/v1/coupons.d.mts +117 -21
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +117 -21
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +96 -9
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +96 -9
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/credits/credits.d.mts +212 -27
- package/resources/v1/credits/credits.d.mts.map +1 -1
- package/resources/v1/credits/credits.d.ts +212 -27
- package/resources/v1/credits/credits.d.ts.map +1 -1
- package/resources/v1/credits/credits.js +66 -7
- package/resources/v1/credits/credits.js.map +1 -1
- package/resources/v1/credits/credits.mjs +66 -7
- package/resources/v1/credits/credits.mjs.map +1 -1
- package/resources/v1/credits/custom-currencies.d.mts +150 -28
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
- package/resources/v1/credits/custom-currencies.d.ts +150 -28
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
- package/resources/v1/credits/custom-currencies.js +125 -12
- package/resources/v1/credits/custom-currencies.js.map +1 -1
- package/resources/v1/credits/custom-currencies.mjs +125 -12
- package/resources/v1/credits/custom-currencies.mjs.map +1 -1
- package/resources/v1/credits/grants.d.mts +91 -26
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +91 -26
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/credits/grants.js +63 -5
- package/resources/v1/credits/grants.js.map +1 -1
- package/resources/v1/credits/grants.mjs +63 -5
- package/resources/v1/credits/grants.mjs.map +1 -1
- package/resources/v1/credits/index.d.mts +3 -4
- package/resources/v1/credits/index.d.mts.map +1 -1
- package/resources/v1/credits/index.d.ts +3 -4
- package/resources/v1/credits/index.d.ts.map +1 -1
- package/resources/v1/credits/index.js +1 -3
- package/resources/v1/credits/index.js.map +1 -1
- package/resources/v1/credits/index.mjs +0 -1
- package/resources/v1/credits/index.mjs.map +1 -1
- package/resources/v1/credits.d.mts.map +1 -1
- package/resources/v1/credits.d.ts.map +1 -1
- package/resources/v1/credits.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +249 -55
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +249 -55
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +201 -19
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +201 -19
- 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 +116 -14
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +116 -14
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/integrations.js +104 -9
- package/resources/v1/customers/integrations.js.map +1 -1
- package/resources/v1/customers/integrations.mjs +104 -9
- package/resources/v1/customers/integrations.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +48 -8
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +48 -8
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +42 -4
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +42 -4
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +93 -9
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +93 -9
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.js +89 -6
- package/resources/v1/customers/promotional-entitlements.js.map +1 -1
- package/resources/v1/customers/promotional-entitlements.mjs +89 -6
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
- package/resources/v1/customers.d.mts.map +1 -1
- package/resources/v1/customers.d.ts.map +1 -1
- package/resources/v1/customers.mjs.map +1 -1
- package/resources/v1/events/beta/beta.d.mts +14 -0
- package/resources/v1/events/beta/beta.d.mts.map +1 -0
- package/resources/v1/events/beta/beta.d.ts +14 -0
- package/resources/v1/events/beta/beta.d.ts.map +1 -0
- package/resources/v1/events/beta/beta.js +21 -0
- package/resources/v1/events/beta/beta.js.map +1 -0
- package/resources/v1/events/beta/beta.mjs +16 -0
- package/resources/v1/events/beta/beta.mjs.map +1 -0
- package/resources/v1/events/beta/customers/assignments.d.mts +200 -0
- package/resources/v1/events/beta/customers/assignments.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/assignments.d.ts +200 -0
- package/resources/v1/events/beta/customers/assignments.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/assignments.js +85 -0
- package/resources/v1/events/beta/customers/assignments.js.map +1 -0
- package/resources/v1/events/beta/customers/assignments.mjs +81 -0
- package/resources/v1/events/beta/customers/assignments.mjs.map +1 -0
- package/resources/v1/events/beta/customers/customers.d.mts +18 -0
- package/resources/v1/events/beta/customers/customers.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/customers.d.ts +18 -0
- package/resources/v1/events/beta/customers/customers.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/customers.js +25 -0
- package/resources/v1/events/beta/customers/customers.js.map +1 -0
- package/resources/v1/events/beta/customers/customers.mjs +20 -0
- package/resources/v1/events/beta/customers/customers.mjs.map +1 -0
- package/resources/v1/events/beta/customers/entities.d.mts +360 -0
- package/resources/v1/events/beta/customers/entities.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/entities.d.ts +360 -0
- package/resources/v1/events/beta/customers/entities.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/entities.js +159 -0
- package/resources/v1/events/beta/customers/entities.js.map +1 -0
- package/resources/v1/events/beta/customers/entities.mjs +155 -0
- package/resources/v1/events/beta/customers/entities.mjs.map +1 -0
- package/resources/v1/events/beta/customers/entitlements.d.mts +251 -0
- package/resources/v1/events/beta/customers/entitlements.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/entitlements.d.ts +251 -0
- package/resources/v1/events/beta/customers/entitlements.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/entitlements.js +38 -0
- package/resources/v1/events/beta/customers/entitlements.js.map +1 -0
- package/resources/v1/events/beta/customers/entitlements.mjs +34 -0
- package/resources/v1/events/beta/customers/entitlements.mjs.map +1 -0
- package/resources/v1/events/beta/customers/index.d.mts +5 -0
- package/resources/v1/events/beta/customers/index.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/index.d.ts +5 -0
- package/resources/v1/events/beta/customers/index.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/index.js +13 -0
- package/resources/v1/events/beta/customers/index.js.map +1 -0
- package/resources/v1/events/beta/customers/index.mjs +6 -0
- package/resources/v1/events/beta/customers/index.mjs.map +1 -0
- package/resources/v1/events/beta/customers.d.mts +2 -0
- package/resources/v1/events/beta/customers.d.mts.map +1 -0
- package/resources/v1/events/beta/customers.d.ts +2 -0
- package/resources/v1/events/beta/customers.d.ts.map +1 -0
- package/resources/v1/events/beta/customers.js +6 -0
- package/resources/v1/events/beta/customers.js.map +1 -0
- package/resources/v1/events/beta/customers.mjs +3 -0
- package/resources/v1/events/beta/customers.mjs.map +1 -0
- package/resources/v1/events/beta/entity-types.d.mts +166 -0
- package/resources/v1/events/beta/entity-types.d.mts.map +1 -0
- package/resources/v1/events/beta/entity-types.d.ts +166 -0
- package/resources/v1/events/beta/entity-types.d.ts.map +1 -0
- package/resources/v1/events/beta/entity-types.js +76 -0
- package/resources/v1/events/beta/entity-types.js.map +1 -0
- package/resources/v1/events/beta/entity-types.mjs +72 -0
- package/resources/v1/events/beta/entity-types.mjs.map +1 -0
- package/resources/v1/events/beta/index.d.mts +4 -0
- package/resources/v1/events/beta/index.d.mts.map +1 -0
- package/resources/v1/events/beta/index.d.ts +4 -0
- package/resources/v1/events/beta/index.d.ts.map +1 -0
- package/resources/v1/events/beta/index.js +11 -0
- package/resources/v1/events/beta/index.js.map +1 -0
- package/resources/v1/events/beta/index.mjs +5 -0
- package/resources/v1/events/beta/index.mjs.map +1 -0
- package/resources/v1/events/beta.d.mts +2 -0
- package/resources/v1/events/beta.d.mts.map +1 -0
- package/resources/v1/events/beta.d.ts +2 -0
- package/resources/v1/events/beta.d.ts.map +1 -0
- package/resources/v1/events/beta.js +6 -0
- package/resources/v1/events/beta.js.map +1 -0
- package/resources/v1/events/beta.mjs +3 -0
- package/resources/v1/events/beta.mjs.map +1 -0
- package/resources/v1/events/data-export/data-export.d.mts +126 -0
- package/resources/v1/events/data-export/data-export.d.mts.map +1 -0
- package/resources/v1/events/data-export/data-export.d.ts +126 -0
- package/resources/v1/events/data-export/data-export.d.ts.map +1 -0
- package/resources/v1/events/data-export/data-export.js +45 -0
- package/resources/v1/events/data-export/data-export.js.map +1 -0
- package/resources/v1/events/data-export/data-export.mjs +40 -0
- package/resources/v1/events/data-export/data-export.mjs.map +1 -0
- package/resources/v1/events/data-export/destinations.d.mts +202 -0
- package/resources/v1/events/data-export/destinations.d.mts.map +1 -0
- package/resources/v1/events/data-export/destinations.d.ts +202 -0
- package/resources/v1/events/data-export/destinations.d.ts.map +1 -0
- package/resources/v1/events/data-export/destinations.js +41 -0
- package/resources/v1/events/data-export/destinations.js.map +1 -0
- package/resources/v1/events/data-export/destinations.mjs +37 -0
- package/resources/v1/events/data-export/destinations.mjs.map +1 -0
- package/resources/v1/events/data-export/index.d.mts +3 -0
- package/resources/v1/events/data-export/index.d.mts.map +1 -0
- package/resources/v1/events/data-export/index.d.ts +3 -0
- package/resources/v1/events/data-export/index.d.ts.map +1 -0
- package/resources/v1/events/data-export/index.js +9 -0
- package/resources/v1/events/data-export/index.js.map +1 -0
- package/resources/v1/events/data-export/index.mjs +4 -0
- package/resources/v1/events/data-export/index.mjs.map +1 -0
- package/resources/v1/events/data-export.d.mts +2 -0
- package/resources/v1/events/data-export.d.mts.map +1 -0
- package/resources/v1/events/data-export.d.ts +2 -0
- package/resources/v1/events/data-export.d.ts.map +1 -0
- package/resources/v1/events/data-export.js +6 -0
- package/resources/v1/events/data-export.js.map +1 -0
- package/resources/v1/events/data-export.mjs +3 -0
- package/resources/v1/events/data-export.mjs.map +1 -0
- package/resources/v1/events/events.d.mts +98 -0
- package/resources/v1/events/events.d.mts.map +1 -0
- package/resources/v1/events/events.d.ts +98 -0
- package/resources/v1/events/events.d.ts.map +1 -0
- package/resources/v1/events/events.js +56 -0
- package/resources/v1/events/events.js.map +1 -0
- package/resources/v1/events/events.mjs +51 -0
- package/resources/v1/events/events.mjs.map +1 -0
- package/resources/v1/events/index.d.mts +4 -0
- package/resources/v1/events/index.d.mts.map +1 -0
- package/resources/v1/events/index.d.ts +4 -0
- package/resources/v1/events/index.d.ts.map +1 -0
- package/resources/v1/events/index.js +11 -0
- package/resources/v1/events/index.js.map +1 -0
- package/resources/v1/events/index.mjs +5 -0
- package/resources/v1/events/index.mjs.map +1 -0
- package/resources/v1/events.d.mts +1 -65
- package/resources/v1/events.d.mts.map +1 -1
- package/resources/v1/events.d.ts +1 -65
- package/resources/v1/events.d.ts.map +1 -1
- package/resources/v1/events.js +2 -15
- package/resources/v1/events.js.map +1 -1
- package/resources/v1/events.mjs +1 -13
- package/resources/v1/events.mjs.map +1 -1
- package/resources/v1/features.d.mts +152 -31
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +152 -31
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/features.js +115 -11
- package/resources/v1/features.js.map +1 -1
- package/resources/v1/features.mjs +115 -11
- package/resources/v1/features.mjs.map +1 -1
- package/resources/v1/index.d.mts +9 -9
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +9 -9
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +6 -6
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +93 -5
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts +93 -5
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/entitlements.js +80 -8
- package/resources/v1/plans/entitlements.js.map +1 -1
- package/resources/v1/plans/entitlements.mjs +80 -8
- 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 +565 -32
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +565 -32
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +204 -16
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +204 -16
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/plans.d.mts.map +1 -1
- package/resources/v1/plans.d.ts.map +1 -1
- package/resources/v1/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +140 -23
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +140 -23
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.js +116 -11
- package/resources/v1/products.js.map +1 -1
- package/resources/v1/products.mjs +116 -11
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +45 -3
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +45 -3
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +41 -4
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +41 -4
- 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 +21 -2
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts +21 -2
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.js +19 -2
- package/resources/v1/subscriptions/invoice.js.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs +19 -2
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +341 -85
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +341 -85
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +207 -19
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +209 -21
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +42 -4
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts +42 -4
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- package/resources/v1/subscriptions/usage.js +39 -4
- package/resources/v1/subscriptions/usage.js.map +1 -1
- package/resources/v1/subscriptions/usage.mjs +39 -4
- package/resources/v1/subscriptions/usage.mjs.map +1 -1
- package/resources/v1/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions.mjs.map +1 -1
- package/resources/v1/usage.d.mts +48 -2
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +48 -2
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +50 -4
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +50 -4
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +18 -18
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +18 -18
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +2 -2
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +2 -2
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1.d.mts.map +1 -1
- package/resources/v1.d.ts.map +1 -1
- package/resources/v1.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/resources/v1/addons/addons.ts +908 -36
- package/src/resources/v1/addons/entitlements.ts +154 -10
- package/src/resources/v1/addons/index.ts +8 -0
- package/src/resources/v1/coupons.ts +194 -27
- package/src/resources/v1/credits/credits.ts +287 -35
- package/src/resources/v1/credits/custom-currencies.ts +245 -38
- package/src/resources/v1/credits/grants.ts +132 -26
- package/src/resources/v1/credits/index.ts +7 -6
- package/src/resources/v1/customers/customers.ts +415 -67
- package/src/resources/v1/customers/index.ts +8 -1
- package/src/resources/v1/customers/integrations.ts +184 -18
- package/src/resources/v1/customers/payment-method.ts +85 -10
- package/src/resources/v1/customers/promotional-entitlements.ts +133 -11
- package/src/resources/v1/events/beta/beta.ts +35 -0
- package/src/resources/v1/events/beta/customers/assignments.ts +277 -0
- package/src/resources/v1/events/beta/customers/customers.ts +71 -0
- package/src/resources/v1/events/beta/customers/entities.ts +501 -0
- package/src/resources/v1/events/beta/customers/entitlements.ts +354 -0
- package/src/resources/v1/events/beta/customers/index.ts +26 -0
- package/src/resources/v1/events/beta/customers.ts +3 -0
- package/src/resources/v1/events/beta/entity-types.ts +226 -0
- package/src/resources/v1/events/beta/index.ts +12 -0
- package/src/resources/v1/events/beta.ts +3 -0
- package/src/resources/v1/events/data-export/data-export.ts +170 -0
- package/src/resources/v1/events/data-export/destinations.ts +243 -0
- package/src/resources/v1/events/data-export/index.ts +15 -0
- package/src/resources/v1/events/data-export.ts +3 -0
- package/src/resources/v1/events/events.ts +141 -0
- package/src/resources/v1/events/index.ts +11 -0
- package/src/resources/v1/events.ts +1 -75
- package/src/resources/v1/features.ts +252 -39
- package/src/resources/v1/index.ts +31 -1
- package/src/resources/v1/plans/entitlements.ts +154 -10
- package/src/resources/v1/plans/index.ts +11 -0
- package/src/resources/v1/plans/plans.ts +1509 -37
- package/src/resources/v1/products.ts +235 -30
- package/src/resources/v1/subscriptions/future-update.ts +84 -5
- package/src/resources/v1/subscriptions/index.ts +9 -2
- package/src/resources/v1/subscriptions/invoice.ts +42 -3
- package/src/resources/v1/subscriptions/subscriptions.ts +509 -90
- package/src/resources/v1/subscriptions/usage.ts +74 -5
- package/src/resources/v1/usage.ts +77 -5
- package/src/resources/v1/v1.ts +62 -2
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/v1/credits/auto-recharge.d.mts +0 -84
- package/resources/v1/credits/auto-recharge.d.mts.map +0 -1
- package/resources/v1/credits/auto-recharge.d.ts +0 -84
- package/resources/v1/credits/auto-recharge.d.ts.map +0 -1
- package/resources/v1/credits/auto-recharge.js +0 -16
- package/resources/v1/credits/auto-recharge.js.map +0 -1
- package/resources/v1/credits/auto-recharge.mjs +0 -12
- package/resources/v1/credits/auto-recharge.mjs.map +0 -1
- package/src/resources/v1/credits/auto-recharge.ts +0 -109
package/resources/v1/coupons.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Coupons = void 0;
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
6
|
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../../internal/headers.js");
|
|
7
8
|
const path_1 = require("../../internal/utils/path.js");
|
|
8
9
|
/**
|
|
9
10
|
* Operations related to coupons
|
|
@@ -12,36 +13,122 @@ class Coupons extends resource_1.APIResource {
|
|
|
12
13
|
/**
|
|
13
14
|
* Creates a new discount coupon with percentage or fixed amount off, applicable to
|
|
14
15
|
* customer subscriptions.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const coupon = await client.v1.coupons.create({
|
|
20
|
+
* id: 'id',
|
|
21
|
+
* amountsOff: [{ amount: 0, currency: 'usd' }],
|
|
22
|
+
* description: 'description',
|
|
23
|
+
* durationInMonths: 1,
|
|
24
|
+
* metadata: { foo: 'string' },
|
|
25
|
+
* name: 'name',
|
|
26
|
+
* percentOff: 1,
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
15
29
|
*/
|
|
16
|
-
create(
|
|
17
|
-
|
|
30
|
+
create(params, options) {
|
|
31
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
32
|
+
return this._client.post('/api/v1/coupons', {
|
|
33
|
+
body,
|
|
34
|
+
...options,
|
|
35
|
+
headers: (0, headers_1.buildHeaders)([
|
|
36
|
+
{
|
|
37
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
38
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
39
|
+
},
|
|
40
|
+
options?.headers,
|
|
41
|
+
]),
|
|
42
|
+
});
|
|
18
43
|
}
|
|
19
44
|
/**
|
|
20
45
|
* Retrieves a coupon by its unique identifier.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const coupon = await client.v1.coupons.retrieve('x');
|
|
50
|
+
* ```
|
|
21
51
|
*/
|
|
22
|
-
retrieve(id, options) {
|
|
23
|
-
|
|
52
|
+
retrieve(id, params = {}, options) {
|
|
53
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
54
|
+
return this._client.get((0, path_1.path) `/api/v1/coupons/${id}`, {
|
|
55
|
+
...options,
|
|
56
|
+
headers: (0, headers_1.buildHeaders)([
|
|
57
|
+
{
|
|
58
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
59
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
60
|
+
},
|
|
61
|
+
options?.headers,
|
|
62
|
+
]),
|
|
63
|
+
});
|
|
24
64
|
}
|
|
25
65
|
/**
|
|
26
66
|
* Retrieves a paginated list of coupons in the environment.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* // Automatically fetches more pages as needed.
|
|
71
|
+
* for await (const couponListResponse of client.v1.coupons.list()) {
|
|
72
|
+
* // ...
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
27
75
|
*/
|
|
28
|
-
list(
|
|
76
|
+
list(params = {}, options) {
|
|
77
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
29
78
|
return this._client.getAPIList('/api/v1/coupons', (pagination_1.MyCursorIDPage), {
|
|
30
79
|
query,
|
|
31
80
|
...options,
|
|
81
|
+
headers: (0, headers_1.buildHeaders)([
|
|
82
|
+
{
|
|
83
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
84
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
85
|
+
},
|
|
86
|
+
options?.headers,
|
|
87
|
+
]),
|
|
32
88
|
});
|
|
33
89
|
}
|
|
34
90
|
/**
|
|
35
91
|
* Archives a coupon, preventing it from being applied to new subscriptions.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const coupon = await client.v1.coupons.archiveCoupon('x');
|
|
96
|
+
* ```
|
|
36
97
|
*/
|
|
37
|
-
archiveCoupon(id, options) {
|
|
38
|
-
|
|
98
|
+
archiveCoupon(id, params = {}, options) {
|
|
99
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
100
|
+
return this._client.post((0, path_1.path) `/api/v1/coupons/${id}/archive`, {
|
|
101
|
+
...options,
|
|
102
|
+
headers: (0, headers_1.buildHeaders)([
|
|
103
|
+
{
|
|
104
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
105
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
106
|
+
},
|
|
107
|
+
options?.headers,
|
|
108
|
+
]),
|
|
109
|
+
});
|
|
39
110
|
}
|
|
40
111
|
/**
|
|
41
112
|
* Updates an existing coupon's properties such as name, description, and metadata.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```ts
|
|
116
|
+
* const coupon = await client.v1.coupons.updateCoupon('x');
|
|
117
|
+
* ```
|
|
42
118
|
*/
|
|
43
|
-
updateCoupon(id,
|
|
44
|
-
|
|
119
|
+
updateCoupon(id, params, options) {
|
|
120
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
121
|
+
return this._client.patch((0, path_1.path) `/api/v1/coupons/${id}`, {
|
|
122
|
+
body,
|
|
123
|
+
...options,
|
|
124
|
+
headers: (0, headers_1.buildHeaders)([
|
|
125
|
+
{
|
|
126
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
127
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
128
|
+
},
|
|
129
|
+
options?.headers,
|
|
130
|
+
]),
|
|
131
|
+
});
|
|
45
132
|
}
|
|
46
133
|
}
|
|
47
134
|
exports.Coupons = Coupons;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coupons.js","sourceRoot":"","sources":["../../src/resources/v1/coupons.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAA+F;
|
|
1
|
+
{"version":3,"file":"coupons.js","sourceRoot":"","sources":["../../src/resources/v1/coupons.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAA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C,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,EAAU,EAAE,MAAgC,EAAE,OAAwB;QACjF,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3F,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,mBAAmB,EAAE,EAAE,EAAE;YACrD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAxID,0BAwIC"}
|
package/resources/v1/coupons.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import { MyCursorIDPage } from "../../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
5
|
import { path } from "../../internal/utils/path.mjs";
|
|
5
6
|
/**
|
|
6
7
|
* Operations related to coupons
|
|
@@ -9,36 +10,122 @@ export class Coupons extends APIResource {
|
|
|
9
10
|
/**
|
|
10
11
|
* Creates a new discount coupon with percentage or fixed amount off, applicable to
|
|
11
12
|
* customer subscriptions.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const coupon = await client.v1.coupons.create({
|
|
17
|
+
* id: 'id',
|
|
18
|
+
* amountsOff: [{ amount: 0, currency: 'usd' }],
|
|
19
|
+
* description: 'description',
|
|
20
|
+
* durationInMonths: 1,
|
|
21
|
+
* metadata: { foo: 'string' },
|
|
22
|
+
* name: 'name',
|
|
23
|
+
* percentOff: 1,
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
12
26
|
*/
|
|
13
|
-
create(
|
|
14
|
-
|
|
27
|
+
create(params, options) {
|
|
28
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
29
|
+
return this._client.post('/api/v1/coupons', {
|
|
30
|
+
body,
|
|
31
|
+
...options,
|
|
32
|
+
headers: buildHeaders([
|
|
33
|
+
{
|
|
34
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
35
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
36
|
+
},
|
|
37
|
+
options?.headers,
|
|
38
|
+
]),
|
|
39
|
+
});
|
|
15
40
|
}
|
|
16
41
|
/**
|
|
17
42
|
* Retrieves a coupon by its unique identifier.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const coupon = await client.v1.coupons.retrieve('x');
|
|
47
|
+
* ```
|
|
18
48
|
*/
|
|
19
|
-
retrieve(id, options) {
|
|
20
|
-
|
|
49
|
+
retrieve(id, params = {}, options) {
|
|
50
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
51
|
+
return this._client.get(path `/api/v1/coupons/${id}`, {
|
|
52
|
+
...options,
|
|
53
|
+
headers: buildHeaders([
|
|
54
|
+
{
|
|
55
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
56
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
57
|
+
},
|
|
58
|
+
options?.headers,
|
|
59
|
+
]),
|
|
60
|
+
});
|
|
21
61
|
}
|
|
22
62
|
/**
|
|
23
63
|
* Retrieves a paginated list of coupons in the environment.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* // Automatically fetches more pages as needed.
|
|
68
|
+
* for await (const couponListResponse of client.v1.coupons.list()) {
|
|
69
|
+
* // ...
|
|
70
|
+
* }
|
|
71
|
+
* ```
|
|
24
72
|
*/
|
|
25
|
-
list(
|
|
73
|
+
list(params = {}, options) {
|
|
74
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
26
75
|
return this._client.getAPIList('/api/v1/coupons', (MyCursorIDPage), {
|
|
27
76
|
query,
|
|
28
77
|
...options,
|
|
78
|
+
headers: buildHeaders([
|
|
79
|
+
{
|
|
80
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
81
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
82
|
+
},
|
|
83
|
+
options?.headers,
|
|
84
|
+
]),
|
|
29
85
|
});
|
|
30
86
|
}
|
|
31
87
|
/**
|
|
32
88
|
* Archives a coupon, preventing it from being applied to new subscriptions.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const coupon = await client.v1.coupons.archiveCoupon('x');
|
|
93
|
+
* ```
|
|
33
94
|
*/
|
|
34
|
-
archiveCoupon(id, options) {
|
|
35
|
-
|
|
95
|
+
archiveCoupon(id, params = {}, options) {
|
|
96
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
97
|
+
return this._client.post(path `/api/v1/coupons/${id}/archive`, {
|
|
98
|
+
...options,
|
|
99
|
+
headers: buildHeaders([
|
|
100
|
+
{
|
|
101
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
102
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
103
|
+
},
|
|
104
|
+
options?.headers,
|
|
105
|
+
]),
|
|
106
|
+
});
|
|
36
107
|
}
|
|
37
108
|
/**
|
|
38
109
|
* Updates an existing coupon's properties such as name, description, and metadata.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* const coupon = await client.v1.coupons.updateCoupon('x');
|
|
114
|
+
* ```
|
|
39
115
|
*/
|
|
40
|
-
updateCoupon(id,
|
|
41
|
-
|
|
116
|
+
updateCoupon(id, params, options) {
|
|
117
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
118
|
+
return this._client.patch(path `/api/v1/coupons/${id}`, {
|
|
119
|
+
body,
|
|
120
|
+
...options,
|
|
121
|
+
headers: buildHeaders([
|
|
122
|
+
{
|
|
123
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
124
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
125
|
+
},
|
|
126
|
+
options?.headers,
|
|
127
|
+
]),
|
|
128
|
+
});
|
|
42
129
|
}
|
|
43
130
|
}
|
|
44
131
|
//# sourceMappingURL=coupons.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coupons.mjs","sourceRoot":"","sources":["../../src/resources/v1/coupons.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"coupons.mjs","sourceRoot":"","sources":["../../src/resources/v1/coupons.ts"],"names":[],"mappings":"AAAA,sFAAs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AE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,EAAU,EAAE,MAAgC,EAAE,OAAwB;QACjF,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3F,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,mBAAmB,EAAE,EAAE,EAAE;YACrD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,28 +1,115 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
-
import * as AutoRechargeAPI from "./auto-recharge.mjs";
|
|
3
|
-
import { AutoRecharge, AutoRechargeGetAutoRechargeParams, AutoRechargeGetAutoRechargeResponse } from "./auto-recharge.mjs";
|
|
4
2
|
import * as CustomCurrenciesAPI from "./custom-currencies.mjs";
|
|
5
|
-
import { CustomCurrencies,
|
|
3
|
+
import { CustomCurrencies, CustomCurrencyArchiveParams, CustomCurrencyCreateParams, CustomCurrencyListAssociatedEntitiesParams, CustomCurrencyListAssociatedEntitiesResponse, CustomCurrencyListParams, CustomCurrencyListResponse, CustomCurrencyListResponsesMyCursorIDPage, CustomCurrencyResponse, CustomCurrencyUnarchiveParams, CustomCurrencyUpdateParams } from "./custom-currencies.mjs";
|
|
6
4
|
import * as GrantsAPI from "./grants.mjs";
|
|
7
|
-
import { CreditGrantResponse, GrantCreateParams, GrantListParams, GrantListResponse, GrantListResponsesMyCursorIDPage, Grants } from "./grants.mjs";
|
|
5
|
+
import { CreditGrantResponse, GrantCreateParams, GrantListParams, GrantListResponse, GrantListResponsesMyCursorIDPage, GrantVoidParams, Grants } from "./grants.mjs";
|
|
8
6
|
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
9
7
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "../../../core/pagination.mjs";
|
|
10
8
|
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
11
9
|
export declare class Credits extends APIResource {
|
|
12
10
|
grants: GrantsAPI.Grants;
|
|
13
11
|
customCurrencies: CustomCurrenciesAPI.CustomCurrencies;
|
|
14
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves the automatic recharge configuration for a customer and currency.
|
|
14
|
+
* Returns default settings if no configuration exists.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const response = await client.v1.credits.getAutoRecharge({
|
|
19
|
+
* currencyId: 'currencyId',
|
|
20
|
+
* customerId: 'customerId',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
getAutoRecharge(params: CreditGetAutoRechargeParams, options?: RequestOptions): APIPromise<CreditGetAutoRechargeResponse>;
|
|
15
25
|
/**
|
|
16
26
|
* Retrieves credit usage time-series data for a customer, grouped by feature, over
|
|
17
27
|
* a specified time range.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const response = await client.v1.credits.getUsage({
|
|
32
|
+
* customerId: 'customerId',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
18
35
|
*/
|
|
19
|
-
getUsage(
|
|
36
|
+
getUsage(params: CreditGetUsageParams, options?: RequestOptions): APIPromise<CreditGetUsageResponse>;
|
|
20
37
|
/**
|
|
21
38
|
* Retrieves a paginated list of credit ledger events for a customer.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* // Automatically fetches more pages as needed.
|
|
43
|
+
* for await (const creditListLedgerResponse of client.v1.credits.listLedger(
|
|
44
|
+
* { customerId: 'customerId' },
|
|
45
|
+
* )) {
|
|
46
|
+
* // ...
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
22
49
|
*/
|
|
23
|
-
listLedger(
|
|
50
|
+
listLedger(params: CreditListLedgerParams, options?: RequestOptions): PagePromise<CreditListLedgerResponsesMyCursorIDPage, CreditListLedgerResponse>;
|
|
24
51
|
}
|
|
25
52
|
export type CreditListLedgerResponsesMyCursorIDPage = MyCursorIDPage<CreditListLedgerResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* Response object
|
|
55
|
+
*/
|
|
56
|
+
export interface CreditGetAutoRechargeResponse {
|
|
57
|
+
/**
|
|
58
|
+
* Automatic recharge configuration for a customer and currency
|
|
59
|
+
*/
|
|
60
|
+
data: CreditGetAutoRechargeResponse.Data;
|
|
61
|
+
}
|
|
62
|
+
export declare namespace CreditGetAutoRechargeResponse {
|
|
63
|
+
/**
|
|
64
|
+
* Automatic recharge configuration for a customer and currency
|
|
65
|
+
*/
|
|
66
|
+
interface Data {
|
|
67
|
+
/**
|
|
68
|
+
* The unique configuration ID
|
|
69
|
+
*/
|
|
70
|
+
id: string | null;
|
|
71
|
+
/**
|
|
72
|
+
* Timestamp of when the record was created
|
|
73
|
+
*/
|
|
74
|
+
createdAt: string | null;
|
|
75
|
+
/**
|
|
76
|
+
* The currency ID for this configuration
|
|
77
|
+
*/
|
|
78
|
+
currencyId: string;
|
|
79
|
+
/**
|
|
80
|
+
* The customer ID this configuration belongs to
|
|
81
|
+
*/
|
|
82
|
+
customerId: string;
|
|
83
|
+
/**
|
|
84
|
+
* Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
|
|
85
|
+
*/
|
|
86
|
+
grantExpirationPeriod: '1_MONTH' | '1_YEAR';
|
|
87
|
+
/**
|
|
88
|
+
* Whether automatic recharge is enabled
|
|
89
|
+
*/
|
|
90
|
+
isEnabled: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Maximum monthly spend limit for automatic recharges
|
|
93
|
+
*/
|
|
94
|
+
maxSpendLimit: number | null;
|
|
95
|
+
/**
|
|
96
|
+
* The target credit balance to recharge to
|
|
97
|
+
*/
|
|
98
|
+
targetBalance: number;
|
|
99
|
+
/**
|
|
100
|
+
* The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
|
|
101
|
+
*/
|
|
102
|
+
thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT';
|
|
103
|
+
/**
|
|
104
|
+
* The threshold value that triggers a recharge
|
|
105
|
+
*/
|
|
106
|
+
thresholdValue: number;
|
|
107
|
+
/**
|
|
108
|
+
* Timestamp of when the record was last updated
|
|
109
|
+
*/
|
|
110
|
+
updatedAt: string | null;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
26
113
|
/**
|
|
27
114
|
* Response object
|
|
28
115
|
*/
|
|
@@ -41,6 +128,12 @@ export declare namespace CreditGetUsageResponse {
|
|
|
41
128
|
* The custom currency used for credit measurement
|
|
42
129
|
*/
|
|
43
130
|
currency: Data.Currency | null;
|
|
131
|
+
/**
|
|
132
|
+
* Cursor-based pagination for the returned series. `next`/`prev` are opaque
|
|
133
|
+
* cursors; pass them back as `after`/`before` to traverse pages. The series axis
|
|
134
|
+
* is `groupBy` when provided, otherwise `featureId`
|
|
135
|
+
*/
|
|
136
|
+
pagination: Data.Pagination;
|
|
44
137
|
/**
|
|
45
138
|
* Credit usage series grouped by feature
|
|
46
139
|
*/
|
|
@@ -72,18 +165,34 @@ export declare namespace CreditGetUsageResponse {
|
|
|
72
165
|
*/
|
|
73
166
|
symbol: string | null;
|
|
74
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* Cursor-based pagination for the returned series. `next`/`prev` are opaque
|
|
170
|
+
* cursors; pass them back as `after`/`before` to traverse pages. The series axis
|
|
171
|
+
* is `groupBy` when provided, otherwise `featureId`
|
|
172
|
+
*/
|
|
173
|
+
interface Pagination {
|
|
174
|
+
/**
|
|
175
|
+
* Cursor for fetching the next page of results, or null if no additional pages
|
|
176
|
+
* exist
|
|
177
|
+
*/
|
|
178
|
+
next: string | null;
|
|
179
|
+
/**
|
|
180
|
+
* Cursor for fetching the previous page of results, or null if at the beginning
|
|
181
|
+
*/
|
|
182
|
+
prev: string | null;
|
|
183
|
+
}
|
|
75
184
|
/**
|
|
76
185
|
* Credit usage data for a single feature
|
|
77
186
|
*/
|
|
78
187
|
interface Series {
|
|
79
188
|
/**
|
|
80
|
-
* The feature ID
|
|
189
|
+
* The feature ID; null when grouping by dimensions only
|
|
81
190
|
*/
|
|
82
|
-
featureId: string;
|
|
191
|
+
featureId: string | null;
|
|
83
192
|
/**
|
|
84
|
-
* The display name of the feature
|
|
193
|
+
* The display name of the feature; null when grouping by dimensions only
|
|
85
194
|
*/
|
|
86
|
-
featureName: string;
|
|
195
|
+
featureName: string | null;
|
|
87
196
|
/**
|
|
88
197
|
* Time-series data points for this feature
|
|
89
198
|
*/
|
|
@@ -92,6 +201,10 @@ export declare namespace CreditGetUsageResponse {
|
|
|
92
201
|
* Total credits consumed by this feature in the time range
|
|
93
202
|
*/
|
|
94
203
|
totalCredits: number;
|
|
204
|
+
/**
|
|
205
|
+
* Dimension key/value pairs identifying this series when groupBy is applied
|
|
206
|
+
*/
|
|
207
|
+
tags?: Array<Series.Tag>;
|
|
95
208
|
}
|
|
96
209
|
namespace Series {
|
|
97
210
|
/**
|
|
@@ -107,6 +220,19 @@ export declare namespace CreditGetUsageResponse {
|
|
|
107
220
|
*/
|
|
108
221
|
value: number;
|
|
109
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* Dimension key/value pair identifying a credit usage series
|
|
225
|
+
*/
|
|
226
|
+
interface Tag {
|
|
227
|
+
/**
|
|
228
|
+
* The dimension key
|
|
229
|
+
*/
|
|
230
|
+
key: string;
|
|
231
|
+
/**
|
|
232
|
+
* The dimension value for this series
|
|
233
|
+
*/
|
|
234
|
+
value: string;
|
|
235
|
+
}
|
|
110
236
|
}
|
|
111
237
|
}
|
|
112
238
|
}
|
|
@@ -151,53 +277,112 @@ export interface CreditListLedgerResponse {
|
|
|
151
277
|
*/
|
|
152
278
|
timestamp: string;
|
|
153
279
|
}
|
|
280
|
+
export interface CreditGetAutoRechargeParams {
|
|
281
|
+
/**
|
|
282
|
+
* Query param: Filter by currency ID (required)
|
|
283
|
+
*/
|
|
284
|
+
currencyId: string;
|
|
285
|
+
/**
|
|
286
|
+
* Query param: Filter by customer ID (required)
|
|
287
|
+
*/
|
|
288
|
+
customerId: string;
|
|
289
|
+
/**
|
|
290
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
291
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
292
|
+
*/
|
|
293
|
+
'X-ACCOUNT-ID'?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
296
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
297
|
+
* intrinsic to the key).
|
|
298
|
+
*/
|
|
299
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
300
|
+
}
|
|
154
301
|
export interface CreditGetUsageParams {
|
|
155
302
|
/**
|
|
156
|
-
* Filter by customer ID (required)
|
|
303
|
+
* Query param: Filter by customer ID (required)
|
|
157
304
|
*/
|
|
158
305
|
customerId: string;
|
|
159
306
|
/**
|
|
160
|
-
*
|
|
307
|
+
* Query param: Return items that come after this cursor
|
|
308
|
+
*/
|
|
309
|
+
after?: string;
|
|
310
|
+
/**
|
|
311
|
+
* Query param: Return items that come before this cursor
|
|
312
|
+
*/
|
|
313
|
+
before?: string;
|
|
314
|
+
/**
|
|
315
|
+
* Query param: Filter by currency ID
|
|
161
316
|
*/
|
|
162
317
|
currencyId?: string;
|
|
163
318
|
/**
|
|
164
|
-
* End date for the credit usage time range (ISO 8601). Defaults to
|
|
165
|
-
* startDate is provided
|
|
319
|
+
* Query param: End date for the credit usage time range (ISO 8601). Defaults to
|
|
320
|
+
* now when startDate is provided
|
|
166
321
|
*/
|
|
167
322
|
endDate?: string;
|
|
168
323
|
/**
|
|
169
|
-
*
|
|
324
|
+
* Query param: Comma-separated list of feature dimension keys to group usage
|
|
325
|
+
* series by (up to 3). Each key matches /^[a-zA-Z0-9_$-]+$/
|
|
326
|
+
*/
|
|
327
|
+
groupBy?: string;
|
|
328
|
+
/**
|
|
329
|
+
* Query param: Maximum number of items to return
|
|
330
|
+
*/
|
|
331
|
+
limit?: number;
|
|
332
|
+
/**
|
|
333
|
+
* Query param: Filter by resource ID
|
|
170
334
|
*/
|
|
171
335
|
resourceId?: string;
|
|
172
336
|
/**
|
|
173
|
-
* Start date for the credit usage time range (ISO 8601). Takes
|
|
174
|
-
* timeRange when provided
|
|
337
|
+
* Query param: Start date for the credit usage time range (ISO 8601). Takes
|
|
338
|
+
* precedence over timeRange when provided
|
|
175
339
|
*/
|
|
176
340
|
startDate?: string;
|
|
177
341
|
/**
|
|
178
|
-
* Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH,
|
|
179
|
-
* to LAST_MONTH
|
|
342
|
+
* Query param: Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH,
|
|
343
|
+
* LAST_YEAR). Defaults to LAST_MONTH
|
|
180
344
|
*/
|
|
181
345
|
timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR';
|
|
346
|
+
/**
|
|
347
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
348
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
349
|
+
*/
|
|
350
|
+
'X-ACCOUNT-ID'?: string;
|
|
351
|
+
/**
|
|
352
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
353
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
354
|
+
* intrinsic to the key).
|
|
355
|
+
*/
|
|
356
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
182
357
|
}
|
|
183
358
|
export interface CreditListLedgerParams extends MyCursorIDPageParams {
|
|
184
359
|
/**
|
|
185
|
-
* Filter by customer ID (required)
|
|
360
|
+
* Query param: Filter by customer ID (required)
|
|
186
361
|
*/
|
|
187
362
|
customerId: string;
|
|
188
363
|
/**
|
|
189
|
-
* Filter by currency ID
|
|
364
|
+
* Query param: Filter by currency ID
|
|
190
365
|
*/
|
|
191
366
|
currencyId?: string;
|
|
192
367
|
/**
|
|
193
|
-
* Filter by resource ID
|
|
368
|
+
* Query param: Filter by resource ID
|
|
194
369
|
*/
|
|
195
370
|
resourceId?: string;
|
|
371
|
+
/**
|
|
372
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
373
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
374
|
+
*/
|
|
375
|
+
'X-ACCOUNT-ID'?: string;
|
|
376
|
+
/**
|
|
377
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
378
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
379
|
+
* intrinsic to the key).
|
|
380
|
+
*/
|
|
381
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
196
382
|
}
|
|
197
383
|
export declare namespace Credits {
|
|
198
|
-
export { type CreditGetUsageResponse as CreditGetUsageResponse, type CreditListLedgerResponse as CreditListLedgerResponse, type CreditListLedgerResponsesMyCursorIDPage as CreditListLedgerResponsesMyCursorIDPage, type CreditGetUsageParams as CreditGetUsageParams, type CreditListLedgerParams as CreditListLedgerParams, };
|
|
199
|
-
export { Grants as Grants, type CreditGrantResponse as CreditGrantResponse, type GrantListResponse as GrantListResponse, type GrantListResponsesMyCursorIDPage as GrantListResponsesMyCursorIDPage, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, };
|
|
200
|
-
export { CustomCurrencies as CustomCurrencies, type
|
|
201
|
-
export { AutoRecharge as AutoRecharge, type AutoRechargeGetAutoRechargeResponse as AutoRechargeGetAutoRechargeResponse, type AutoRechargeGetAutoRechargeParams as AutoRechargeGetAutoRechargeParams, };
|
|
384
|
+
export { type CreditGetAutoRechargeResponse as CreditGetAutoRechargeResponse, type CreditGetUsageResponse as CreditGetUsageResponse, type CreditListLedgerResponse as CreditListLedgerResponse, type CreditListLedgerResponsesMyCursorIDPage as CreditListLedgerResponsesMyCursorIDPage, type CreditGetAutoRechargeParams as CreditGetAutoRechargeParams, type CreditGetUsageParams as CreditGetUsageParams, type CreditListLedgerParams as CreditListLedgerParams, };
|
|
385
|
+
export { Grants as Grants, type CreditGrantResponse as CreditGrantResponse, type GrantListResponse as GrantListResponse, type GrantListResponsesMyCursorIDPage as GrantListResponsesMyCursorIDPage, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, type GrantVoidParams as GrantVoidParams, };
|
|
386
|
+
export { CustomCurrencies as CustomCurrencies, type CustomCurrencyResponse as CustomCurrencyResponse, type CustomCurrencyListResponse as CustomCurrencyListResponse, type CustomCurrencyListAssociatedEntitiesResponse as CustomCurrencyListAssociatedEntitiesResponse, type CustomCurrencyListResponsesMyCursorIDPage as CustomCurrencyListResponsesMyCursorIDPage, type CustomCurrencyCreateParams as CustomCurrencyCreateParams, type CustomCurrencyUpdateParams as CustomCurrencyUpdateParams, type CustomCurrencyListParams as CustomCurrencyListParams, type CustomCurrencyArchiveParams as CustomCurrencyArchiveParams, type CustomCurrencyListAssociatedEntitiesParams as CustomCurrencyListAssociatedEntitiesParams, type CustomCurrencyUnarchiveParams as CustomCurrencyUnarchiveParams, };
|
|
202
387
|
}
|
|
203
388
|
//# sourceMappingURL=credits.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credits.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,mBAAmB,gCAA4B;AAC3D,OAAO,EACL,gBAAgB,EAChB,2BAA2B,EAC3B,0BAA0B,EAC1B,0CAA0C,EAC1C,4CAA4C,EAC5C,wBAAwB,EACxB,0BAA0B,EAC1B,yCAAyC,EACzC,sBAAsB,EACtB,6BAA6B,EAC7B,0BAA0B,EAC3B,gCAA4B;AAC7B,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gCAAgC,EAChC,eAAe,EACf,MAAM,EACP,qBAAiB;AAClB,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,qCAAiC;AAElG,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAEnE,qBAAa,OAAQ,SAAQ,WAAW;IACtC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAC9D,gBAAgB,EAAE,mBAAmB,CAAC,gBAAgB,CAEpD;IAEF;;;;;;;;;;;OAWG;IACH,eAAe,CACb,MAAM,EAAE,2BAA2B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAe5C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAM,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAepG;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,MAAM,EAAE,sBAAsB,EAC9B,OAAO,C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