@stigg/typescript 0.1.0-beta.1 → 0.1.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +114 -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 +231 -1
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +231 -1
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +65 -0
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +65 -0
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts +31 -0
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts +31 -0
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/entitlements.js +31 -0
- package/resources/v1/addons/entitlements.js.map +1 -1
- package/resources/v1/addons/entitlements.mjs +31 -0
- package/resources/v1/addons/entitlements.mjs.map +1 -1
- package/resources/v1/addons/index.d.mts +1 -1
- package/resources/v1/addons/index.d.mts.map +1 -1
- package/resources/v1/addons/index.d.ts +1 -1
- package/resources/v1/addons/index.d.ts.map +1 -1
- package/resources/v1/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 +36 -0
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +36 -0
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +36 -0
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +36 -0
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/{events/credits → credits}/credits.d.mts +57 -10
- package/resources/v1/credits/credits.d.mts.map +1 -0
- package/resources/v1/{events/credits → credits}/credits.d.ts +57 -10
- package/resources/v1/credits/credits.d.ts.map +1 -0
- package/resources/v1/{events/credits → credits}/credits.js +28 -3
- package/resources/v1/credits/credits.js.map +1 -0
- package/resources/v1/{events/credits → credits}/credits.mjs +27 -2
- package/resources/v1/credits/credits.mjs.map +1 -0
- package/resources/v1/{events/credits → credits}/custom-currencies.d.mts +63 -221
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -0
- package/resources/v1/{events/credits → credits}/custom-currencies.d.ts +63 -221
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -0
- package/resources/v1/{events/credits → credits}/custom-currencies.js +52 -3
- package/resources/v1/credits/custom-currencies.js.map +1 -0
- package/resources/v1/{events/credits → credits}/custom-currencies.mjs +52 -3
- package/resources/v1/credits/custom-currencies.mjs.map +1 -0
- package/resources/v1/{events/credits → credits}/grants.d.mts +32 -4
- package/resources/v1/credits/grants.d.mts.map +1 -0
- package/resources/v1/{events/credits → credits}/grants.d.ts +32 -4
- package/resources/v1/credits/grants.d.ts.map +1 -0
- package/resources/v1/{events/credits → credits}/grants.js +31 -3
- package/resources/v1/credits/grants.js.map +1 -0
- package/resources/v1/{events/credits → credits}/grants.mjs +31 -3
- package/resources/v1/credits/grants.mjs.map +1 -0
- package/resources/v1/credits/index.d.mts +4 -0
- package/resources/v1/credits/index.d.mts.map +1 -0
- package/resources/v1/credits/index.d.ts +4 -0
- package/resources/v1/credits/index.d.ts.map +1 -0
- package/resources/v1/credits/index.js.map +1 -0
- package/resources/v1/credits/index.mjs.map +1 -0
- package/resources/v1/credits.d.mts.map +1 -0
- package/resources/v1/credits.d.ts.map +1 -0
- package/resources/v1/{events/credits.js → credits.js} +1 -1
- package/resources/v1/credits.js.map +1 -0
- package/resources/v1/credits.mjs.map +1 -0
- package/resources/v1/customers/customers.d.mts +82 -5
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +82 -5
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +77 -0
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +77 -0
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +50 -3
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +50 -3
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/integrations.js +47 -0
- package/resources/v1/customers/integrations.js.map +1 -1
- package/resources/v1/customers/integrations.mjs +47 -0
- package/resources/v1/customers/integrations.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +17 -1
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +17 -1
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +16 -0
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +16 -0
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +51 -0
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +51 -0
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.js +51 -0
- package/resources/v1/customers/promotional-entitlements.js.map +1 -1
- package/resources/v1/customers/promotional-entitlements.mjs +51 -0
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
- package/resources/v1/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 +178 -0
- package/resources/v1/events/beta/customers/assignments.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/assignments.d.ts +178 -0
- package/resources/v1/events/beta/customers/assignments.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/assignments.js +62 -0
- package/resources/v1/events/beta/customers/assignments.js.map +1 -0
- package/resources/v1/events/beta/customers/assignments.mjs +58 -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 +304 -0
- package/resources/v1/events/beta/customers/entities.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/entities.d.ts +304 -0
- package/resources/v1/events/beta/customers/entities.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/entities.js +105 -0
- package/resources/v1/events/beta/customers/entities.js.map +1 -0
- package/resources/v1/events/beta/customers/entities.mjs +101 -0
- package/resources/v1/events/beta/customers/entities.mjs.map +1 -0
- package/resources/v1/events/beta/customers/entitlements.d.mts +238 -0
- package/resources/v1/events/beta/customers/entitlements.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/entitlements.d.ts +238 -0
- package/resources/v1/events/beta/customers/entitlements.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/entitlements.js +26 -0
- package/resources/v1/events/beta/customers/entitlements.js.map +1 -0
- package/resources/v1/events/beta/customers/entitlements.mjs +22 -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 +144 -0
- package/resources/v1/events/beta/entity-types.d.mts.map +1 -0
- package/resources/v1/events/beta/entity-types.d.ts +144 -0
- package/resources/v1/events/beta/entity-types.d.ts.map +1 -0
- package/resources/v1/events/beta/entity-types.js +56 -0
- package/resources/v1/events/beta/entity-types.js.map +1 -0
- package/resources/v1/events/beta/entity-types.mjs +52 -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/events.d.mts +17 -4
- package/resources/v1/events/events.d.mts.map +1 -1
- package/resources/v1/events/events.d.ts +17 -4
- package/resources/v1/events/events.d.ts.map +1 -1
- package/resources/v1/events/events.js +17 -4
- package/resources/v1/events/events.js.map +1 -1
- package/resources/v1/events/events.mjs +17 -4
- package/resources/v1/events/events.mjs.map +1 -1
- package/resources/v1/events/index.d.mts +1 -1
- package/resources/v1/events/index.d.mts.map +1 -1
- package/resources/v1/events/index.d.ts +1 -1
- package/resources/v1/events/index.d.ts.map +1 -1
- package/resources/v1/events/index.js +3 -3
- package/resources/v1/events/index.js.map +1 -1
- package/resources/v1/events/index.mjs +1 -1
- package/resources/v1/events/index.mjs.map +1 -1
- package/resources/v1/events.d.mts.map +1 -1
- package/resources/v1/events.d.ts.map +1 -1
- package/resources/v1/events.mjs.map +1 -1
- package/resources/v1/features.d.mts +43 -0
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +43 -0
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/features.js +43 -0
- package/resources/v1/features.js.map +1 -1
- package/resources/v1/features.mjs +43 -0
- package/resources/v1/features.mjs.map +1 -1
- package/resources/v1/index.d.mts +3 -2
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +3 -2
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +11 -9
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -0
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +31 -0
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts +31 -0
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/entitlements.js +31 -0
- package/resources/v1/plans/entitlements.js.map +1 -1
- package/resources/v1/plans/entitlements.mjs +31 -0
- package/resources/v1/plans/entitlements.mjs.map +1 -1
- package/resources/v1/plans/index.d.mts +1 -1
- package/resources/v1/plans/index.d.mts.map +1 -1
- package/resources/v1/plans/index.d.ts +1 -1
- package/resources/v1/plans/index.d.ts.map +1 -1
- package/resources/v1/plans/index.js.map +1 -1
- package/resources/v1/plans/index.mjs.map +1 -1
- package/resources/v1/plans/plans.d.mts +412 -1
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +412 -1
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +81 -0
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +81 -0
- 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 +43 -0
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +43 -0
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.js +43 -0
- package/resources/v1/products.js.map +1 -1
- package/resources/v1/products.mjs +43 -0
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +16 -0
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +16 -0
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +16 -0
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +16 -0
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/index.d.mts.map +1 -1
- package/resources/v1/subscriptions/index.d.ts.map +1 -1
- package/resources/v1/subscriptions/index.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts +6 -0
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts +6 -0
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.js +6 -0
- package/resources/v1/subscriptions/invoice.js.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs +6 -0
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +93 -9
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +93 -9
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +81 -0
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +81 -0
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +13 -0
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts +13 -0
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- package/resources/v1/subscriptions/usage.js +13 -0
- package/resources/v1/subscriptions/usage.js.map +1 -1
- package/resources/v1/subscriptions/usage.mjs +13 -0
- package/resources/v1/subscriptions/usage.mjs.map +1 -1
- package/resources/v1/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 +24 -0
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +24 -0
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +24 -0
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +24 -0
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +8 -4
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +8 -4
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +4 -0
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +4 -0
- 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 +625 -0
- package/src/resources/v1/addons/entitlements.ts +31 -0
- package/src/resources/v1/addons/index.ts +3 -0
- package/src/resources/v1/coupons.ts +36 -0
- package/src/resources/v1/{events/credits → credits}/credits.ts +61 -16
- package/src/resources/v1/{events/credits → credits}/custom-currencies.ts +65 -259
- package/src/resources/v1/{events/credits → credits}/grants.ts +33 -5
- package/src/resources/v1/{events/credits → credits}/index.ts +1 -4
- package/src/resources/v1/customers/customers.ts +92 -5
- package/src/resources/v1/customers/integrations.ts +55 -2
- package/src/resources/v1/customers/payment-method.ts +19 -1
- package/src/resources/v1/customers/promotional-entitlements.ts +51 -0
- package/src/resources/v1/events/beta/beta.ts +35 -0
- package/src/resources/v1/events/beta/customers/assignments.ts +228 -0
- package/src/resources/v1/events/beta/customers/customers.ts +71 -0
- package/src/resources/v1/events/beta/customers/entities.ts +381 -0
- package/src/resources/v1/events/beta/customers/entitlements.ts +327 -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 +180 -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/events.ts +18 -23
- package/src/resources/v1/events/index.ts +1 -10
- package/src/resources/v1/features.ts +43 -0
- package/src/resources/v1/index.ts +19 -0
- package/src/resources/v1/plans/entitlements.ts +31 -0
- package/src/resources/v1/plans/index.ts +6 -0
- package/src/resources/v1/plans/plans.ts +1201 -0
- package/src/resources/v1/products.ts +43 -0
- package/src/resources/v1/subscriptions/future-update.ts +16 -0
- package/src/resources/v1/subscriptions/invoice.ts +6 -0
- package/src/resources/v1/subscriptions/subscriptions.ts +93 -9
- package/src/resources/v1/subscriptions/usage.ts +13 -0
- package/src/resources/v1/usage.ts +24 -0
- package/src/resources/v1/v1.ts +42 -0
- 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/events/credits/credits.d.mts.map +0 -1
- package/resources/v1/events/credits/credits.d.ts.map +0 -1
- package/resources/v1/events/credits/credits.js.map +0 -1
- package/resources/v1/events/credits/credits.mjs.map +0 -1
- package/resources/v1/events/credits/custom-currencies.d.mts.map +0 -1
- package/resources/v1/events/credits/custom-currencies.d.ts.map +0 -1
- package/resources/v1/events/credits/custom-currencies.js.map +0 -1
- package/resources/v1/events/credits/custom-currencies.mjs.map +0 -1
- package/resources/v1/events/credits/grants.d.mts.map +0 -1
- package/resources/v1/events/credits/grants.d.ts.map +0 -1
- package/resources/v1/events/credits/grants.js.map +0 -1
- package/resources/v1/events/credits/grants.mjs.map +0 -1
- package/resources/v1/events/credits/index.d.mts +0 -4
- package/resources/v1/events/credits/index.d.mts.map +0 -1
- package/resources/v1/events/credits/index.d.ts +0 -4
- package/resources/v1/events/credits/index.d.ts.map +0 -1
- package/resources/v1/events/credits/index.js.map +0 -1
- package/resources/v1/events/credits/index.mjs.map +0 -1
- package/resources/v1/events/credits.d.mts.map +0 -1
- package/resources/v1/events/credits.d.ts.map +0 -1
- package/resources/v1/events/credits.js.map +0 -1
- package/resources/v1/events/credits.mjs.map +0 -1
- /package/resources/v1/{events/credits → credits}/index.js +0 -0
- /package/resources/v1/{events/credits → credits}/index.mjs +0 -0
- /package/resources/v1/{events/credits.d.mts → credits.d.mts} +0 -0
- /package/resources/v1/{events/credits.d.ts → credits.d.ts} +0 -0
- /package/resources/v1/{events/credits.mjs → credits.mjs} +0 -0
- /package/src/resources/v1/{events/credits.ts → credits.ts} +0 -0
package/resources/v1/coupons.js
CHANGED
|
@@ -12,18 +12,44 @@ class Coupons extends resource_1.APIResource {
|
|
|
12
12
|
/**
|
|
13
13
|
* Creates a new discount coupon with percentage or fixed amount off, applicable to
|
|
14
14
|
* customer subscriptions.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const coupon = await client.v1.coupons.create({
|
|
19
|
+
* id: 'id',
|
|
20
|
+
* amountsOff: [{ amount: 0, currency: 'usd' }],
|
|
21
|
+
* description: 'description',
|
|
22
|
+
* durationInMonths: 1,
|
|
23
|
+
* metadata: { foo: 'string' },
|
|
24
|
+
* name: 'name',
|
|
25
|
+
* percentOff: 1,
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
15
28
|
*/
|
|
16
29
|
create(body, options) {
|
|
17
30
|
return this._client.post('/api/v1/coupons', { body, ...options });
|
|
18
31
|
}
|
|
19
32
|
/**
|
|
20
33
|
* Retrieves a coupon by its unique identifier.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const coupon = await client.v1.coupons.retrieve('x');
|
|
38
|
+
* ```
|
|
21
39
|
*/
|
|
22
40
|
retrieve(id, options) {
|
|
23
41
|
return this._client.get((0, path_1.path) `/api/v1/coupons/${id}`, options);
|
|
24
42
|
}
|
|
25
43
|
/**
|
|
26
44
|
* Retrieves a paginated list of coupons in the environment.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* // Automatically fetches more pages as needed.
|
|
49
|
+
* for await (const couponListResponse of client.v1.coupons.list()) {
|
|
50
|
+
* // ...
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
27
53
|
*/
|
|
28
54
|
list(query = {}, options) {
|
|
29
55
|
return this._client.getAPIList('/api/v1/coupons', (pagination_1.MyCursorIDPage), {
|
|
@@ -33,12 +59,22 @@ class Coupons extends resource_1.APIResource {
|
|
|
33
59
|
}
|
|
34
60
|
/**
|
|
35
61
|
* Archives a coupon, preventing it from being applied to new subscriptions.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const coupon = await client.v1.coupons.archiveCoupon('x');
|
|
66
|
+
* ```
|
|
36
67
|
*/
|
|
37
68
|
archiveCoupon(id, options) {
|
|
38
69
|
return this._client.post((0, path_1.path) `/api/v1/coupons/${id}/archive`, options);
|
|
39
70
|
}
|
|
40
71
|
/**
|
|
41
72
|
* Updates an existing coupon's properties such as name, description, and metadata.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const coupon = await client.v1.coupons.updateCoupon('x');
|
|
77
|
+
* ```
|
|
42
78
|
*/
|
|
43
79
|
updateCoupon(id, body, options) {
|
|
44
80
|
return this._client.patch((0, path_1.path) `/api/v1/coupons/${id}`, { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coupons.js","sourceRoot":"","sources":["../../src/resources/v1/coupons.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAA+F;AAE/F,uDAAiD;AAEjD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC
|
|
1
|
+
{"version":3,"file":"coupons.js","sourceRoot":"","sources":["../../src/resources/v1/coupons.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAA+F;AAE/F,uDAAiD;AAEjD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mBAAmB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,2BAAkC,CAAA,EAAE;YACpF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,EAAU,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,mBAAmB,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,EAAU,EAAE,IAA8B,EAAE,OAAwB;QAC/E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,mBAAmB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AA9ED,0BA8EC"}
|
package/resources/v1/coupons.mjs
CHANGED
|
@@ -9,18 +9,44 @@ export class Coupons extends APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* Creates a new discount coupon with percentage or fixed amount off, applicable to
|
|
11
11
|
* customer subscriptions.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const coupon = await client.v1.coupons.create({
|
|
16
|
+
* id: 'id',
|
|
17
|
+
* amountsOff: [{ amount: 0, currency: 'usd' }],
|
|
18
|
+
* description: 'description',
|
|
19
|
+
* durationInMonths: 1,
|
|
20
|
+
* metadata: { foo: 'string' },
|
|
21
|
+
* name: 'name',
|
|
22
|
+
* percentOff: 1,
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
12
25
|
*/
|
|
13
26
|
create(body, options) {
|
|
14
27
|
return this._client.post('/api/v1/coupons', { body, ...options });
|
|
15
28
|
}
|
|
16
29
|
/**
|
|
17
30
|
* Retrieves a coupon by its unique identifier.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const coupon = await client.v1.coupons.retrieve('x');
|
|
35
|
+
* ```
|
|
18
36
|
*/
|
|
19
37
|
retrieve(id, options) {
|
|
20
38
|
return this._client.get(path `/api/v1/coupons/${id}`, options);
|
|
21
39
|
}
|
|
22
40
|
/**
|
|
23
41
|
* Retrieves a paginated list of coupons in the environment.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* // Automatically fetches more pages as needed.
|
|
46
|
+
* for await (const couponListResponse of client.v1.coupons.list()) {
|
|
47
|
+
* // ...
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
24
50
|
*/
|
|
25
51
|
list(query = {}, options) {
|
|
26
52
|
return this._client.getAPIList('/api/v1/coupons', (MyCursorIDPage), {
|
|
@@ -30,12 +56,22 @@ export class Coupons extends APIResource {
|
|
|
30
56
|
}
|
|
31
57
|
/**
|
|
32
58
|
* Archives a coupon, preventing it from being applied to new subscriptions.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const coupon = await client.v1.coupons.archiveCoupon('x');
|
|
63
|
+
* ```
|
|
33
64
|
*/
|
|
34
65
|
archiveCoupon(id, options) {
|
|
35
66
|
return this._client.post(path `/api/v1/coupons/${id}/archive`, options);
|
|
36
67
|
}
|
|
37
68
|
/**
|
|
38
69
|
* Updates an existing coupon's properties such as name, description, and metadata.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const coupon = await client.v1.coupons.updateCoupon('x');
|
|
74
|
+
* ```
|
|
39
75
|
*/
|
|
40
76
|
updateCoupon(id, body, options) {
|
|
41
77
|
return this._client.patch(path `/api/v1/coupons/${id}`, { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coupons.mjs","sourceRoot":"","sources":["../../src/resources/v1/coupons.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+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@@ -1,26 +1,51 @@
|
|
|
1
|
-
import { APIResource } from "
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
2
|
import * as CustomCurrenciesAPI from "./custom-currencies.mjs";
|
|
3
|
-
import { CustomCurrencies,
|
|
3
|
+
import { CustomCurrencies, CustomCurrencyCreateParams, CustomCurrencyListAssociatedEntitiesResponse, CustomCurrencyListParams, CustomCurrencyListResponse, CustomCurrencyListResponsesMyCursorIDPage, CustomCurrencyResponse, CustomCurrencyUpdateParams } from "./custom-currencies.mjs";
|
|
4
4
|
import * as GrantsAPI from "./grants.mjs";
|
|
5
5
|
import { CreditGrantResponse, GrantCreateParams, GrantListParams, GrantListResponse, GrantListResponsesMyCursorIDPage, Grants } from "./grants.mjs";
|
|
6
|
-
import { APIPromise } from "
|
|
7
|
-
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "
|
|
8
|
-
import { RequestOptions } from "
|
|
6
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
7
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "../../../core/pagination.mjs";
|
|
8
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
9
9
|
export declare class Credits extends APIResource {
|
|
10
10
|
grants: GrantsAPI.Grants;
|
|
11
11
|
customCurrencies: CustomCurrenciesAPI.CustomCurrencies;
|
|
12
12
|
/**
|
|
13
13
|
* Retrieves the automatic recharge configuration for a customer and currency.
|
|
14
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
|
+
* ```
|
|
15
23
|
*/
|
|
16
24
|
getAutoRecharge(query: CreditGetAutoRechargeParams, options?: RequestOptions): APIPromise<CreditGetAutoRechargeResponse>;
|
|
17
25
|
/**
|
|
18
26
|
* Retrieves credit usage time-series data for a customer, grouped by feature, over
|
|
19
27
|
* a specified time range.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const response = await client.v1.credits.getUsage({
|
|
32
|
+
* customerId: 'customerId',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
20
35
|
*/
|
|
21
36
|
getUsage(query: CreditGetUsageParams, options?: RequestOptions): APIPromise<CreditGetUsageResponse>;
|
|
22
37
|
/**
|
|
23
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
|
+
* ```
|
|
24
49
|
*/
|
|
25
50
|
listLedger(query: CreditListLedgerParams, options?: RequestOptions): PagePromise<CreditListLedgerResponsesMyCursorIDPage, CreditListLedgerResponse>;
|
|
26
51
|
}
|
|
@@ -139,13 +164,13 @@ export declare namespace CreditGetUsageResponse {
|
|
|
139
164
|
*/
|
|
140
165
|
interface Series {
|
|
141
166
|
/**
|
|
142
|
-
* The feature ID
|
|
167
|
+
* The feature ID; null when grouping by dimensions only
|
|
143
168
|
*/
|
|
144
|
-
featureId: string;
|
|
169
|
+
featureId: string | null;
|
|
145
170
|
/**
|
|
146
|
-
* The display name of the feature
|
|
171
|
+
* The display name of the feature; null when grouping by dimensions only
|
|
147
172
|
*/
|
|
148
|
-
featureName: string;
|
|
173
|
+
featureName: string | null;
|
|
149
174
|
/**
|
|
150
175
|
* Time-series data points for this feature
|
|
151
176
|
*/
|
|
@@ -154,6 +179,10 @@ export declare namespace CreditGetUsageResponse {
|
|
|
154
179
|
* Total credits consumed by this feature in the time range
|
|
155
180
|
*/
|
|
156
181
|
totalCredits: number;
|
|
182
|
+
/**
|
|
183
|
+
* Dimension key/value pairs identifying this series when groupBy is applied
|
|
184
|
+
*/
|
|
185
|
+
tags?: Array<Series.Tag>;
|
|
157
186
|
}
|
|
158
187
|
namespace Series {
|
|
159
188
|
/**
|
|
@@ -169,6 +198,19 @@ export declare namespace CreditGetUsageResponse {
|
|
|
169
198
|
*/
|
|
170
199
|
value: number;
|
|
171
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Dimension key/value pair identifying a credit usage series
|
|
203
|
+
*/
|
|
204
|
+
interface Tag {
|
|
205
|
+
/**
|
|
206
|
+
* The dimension key
|
|
207
|
+
*/
|
|
208
|
+
key: string;
|
|
209
|
+
/**
|
|
210
|
+
* The dimension value for this series
|
|
211
|
+
*/
|
|
212
|
+
value: string;
|
|
213
|
+
}
|
|
172
214
|
}
|
|
173
215
|
}
|
|
174
216
|
}
|
|
@@ -237,6 +279,11 @@ export interface CreditGetUsageParams {
|
|
|
237
279
|
* startDate is provided
|
|
238
280
|
*/
|
|
239
281
|
endDate?: string;
|
|
282
|
+
/**
|
|
283
|
+
* Comma-separated list of feature dimension keys to group usage series by (up to
|
|
284
|
+
* 3). Each key matches /^[a-zA-Z0-9_$-]+$/
|
|
285
|
+
*/
|
|
286
|
+
groupBy?: string;
|
|
240
287
|
/**
|
|
241
288
|
* Filter by resource ID
|
|
242
289
|
*/
|
|
@@ -269,6 +316,6 @@ export interface CreditListLedgerParams extends MyCursorIDPageParams {
|
|
|
269
316
|
export declare namespace Credits {
|
|
270
317
|
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, };
|
|
271
318
|
export { Grants as Grants, type CreditGrantResponse as CreditGrantResponse, type GrantListResponse as GrantListResponse, type GrantListResponsesMyCursorIDPage as GrantListResponsesMyCursorIDPage, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, };
|
|
272
|
-
export { CustomCurrencies as CustomCurrencies, type
|
|
319
|
+
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, };
|
|
273
320
|
}
|
|
274
321
|
//# sourceMappingURL=credits.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,0BAA0B,EAC1B,4CAA4C,EAC5C,wBAAwB,EACxB,0BAA0B,EAC1B,yCAAyC,EACzC,sBAAsB,EACtB,0BAA0B,EAC3B,gCAA4B;AAC7B,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gCAAgC,EAChC,MAAM,EACP,qBAAiB;AAClB,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,qCAAiC;AAClG,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAEnE,qBAAa,OAAQ,SAAQ,WAAW;IACtC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAC9D,gBAAgB,E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AEpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAKD,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,uCAAuC,IAAI,uCAAuC,EACvF,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;IAEF,OAAO,EACL,gBAAgB,IAAI,gBAAgB,EACpC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4CAA4C,IAAI,4CAA4C,EACjG,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -1,26 +1,51 @@
|
|
|
1
|
-
import { APIResource } from "
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
2
|
import * as CustomCurrenciesAPI from "./custom-currencies.js";
|
|
3
|
-
import { CustomCurrencies,
|
|
3
|
+
import { CustomCurrencies, CustomCurrencyCreateParams, CustomCurrencyListAssociatedEntitiesResponse, CustomCurrencyListParams, CustomCurrencyListResponse, CustomCurrencyListResponsesMyCursorIDPage, CustomCurrencyResponse, CustomCurrencyUpdateParams } from "./custom-currencies.js";
|
|
4
4
|
import * as GrantsAPI from "./grants.js";
|
|
5
5
|
import { CreditGrantResponse, GrantCreateParams, GrantListParams, GrantListResponse, GrantListResponsesMyCursorIDPage, Grants } from "./grants.js";
|
|
6
|
-
import { APIPromise } from "
|
|
7
|
-
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "
|
|
8
|
-
import { RequestOptions } from "
|
|
6
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
7
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "../../../core/pagination.js";
|
|
8
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
9
9
|
export declare class Credits extends APIResource {
|
|
10
10
|
grants: GrantsAPI.Grants;
|
|
11
11
|
customCurrencies: CustomCurrenciesAPI.CustomCurrencies;
|
|
12
12
|
/**
|
|
13
13
|
* Retrieves the automatic recharge configuration for a customer and currency.
|
|
14
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
|
+
* ```
|
|
15
23
|
*/
|
|
16
24
|
getAutoRecharge(query: CreditGetAutoRechargeParams, options?: RequestOptions): APIPromise<CreditGetAutoRechargeResponse>;
|
|
17
25
|
/**
|
|
18
26
|
* Retrieves credit usage time-series data for a customer, grouped by feature, over
|
|
19
27
|
* a specified time range.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const response = await client.v1.credits.getUsage({
|
|
32
|
+
* customerId: 'customerId',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
20
35
|
*/
|
|
21
36
|
getUsage(query: CreditGetUsageParams, options?: RequestOptions): APIPromise<CreditGetUsageResponse>;
|
|
22
37
|
/**
|
|
23
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
|
+
* ```
|
|
24
49
|
*/
|
|
25
50
|
listLedger(query: CreditListLedgerParams, options?: RequestOptions): PagePromise<CreditListLedgerResponsesMyCursorIDPage, CreditListLedgerResponse>;
|
|
26
51
|
}
|
|
@@ -139,13 +164,13 @@ export declare namespace CreditGetUsageResponse {
|
|
|
139
164
|
*/
|
|
140
165
|
interface Series {
|
|
141
166
|
/**
|
|
142
|
-
* The feature ID
|
|
167
|
+
* The feature ID; null when grouping by dimensions only
|
|
143
168
|
*/
|
|
144
|
-
featureId: string;
|
|
169
|
+
featureId: string | null;
|
|
145
170
|
/**
|
|
146
|
-
* The display name of the feature
|
|
171
|
+
* The display name of the feature; null when grouping by dimensions only
|
|
147
172
|
*/
|
|
148
|
-
featureName: string;
|
|
173
|
+
featureName: string | null;
|
|
149
174
|
/**
|
|
150
175
|
* Time-series data points for this feature
|
|
151
176
|
*/
|
|
@@ -154,6 +179,10 @@ export declare namespace CreditGetUsageResponse {
|
|
|
154
179
|
* Total credits consumed by this feature in the time range
|
|
155
180
|
*/
|
|
156
181
|
totalCredits: number;
|
|
182
|
+
/**
|
|
183
|
+
* Dimension key/value pairs identifying this series when groupBy is applied
|
|
184
|
+
*/
|
|
185
|
+
tags?: Array<Series.Tag>;
|
|
157
186
|
}
|
|
158
187
|
namespace Series {
|
|
159
188
|
/**
|
|
@@ -169,6 +198,19 @@ export declare namespace CreditGetUsageResponse {
|
|
|
169
198
|
*/
|
|
170
199
|
value: number;
|
|
171
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Dimension key/value pair identifying a credit usage series
|
|
203
|
+
*/
|
|
204
|
+
interface Tag {
|
|
205
|
+
/**
|
|
206
|
+
* The dimension key
|
|
207
|
+
*/
|
|
208
|
+
key: string;
|
|
209
|
+
/**
|
|
210
|
+
* The dimension value for this series
|
|
211
|
+
*/
|
|
212
|
+
value: string;
|
|
213
|
+
}
|
|
172
214
|
}
|
|
173
215
|
}
|
|
174
216
|
}
|
|
@@ -237,6 +279,11 @@ export interface CreditGetUsageParams {
|
|
|
237
279
|
* startDate is provided
|
|
238
280
|
*/
|
|
239
281
|
endDate?: string;
|
|
282
|
+
/**
|
|
283
|
+
* Comma-separated list of feature dimension keys to group usage series by (up to
|
|
284
|
+
* 3). Each key matches /^[a-zA-Z0-9_$-]+$/
|
|
285
|
+
*/
|
|
286
|
+
groupBy?: string;
|
|
240
287
|
/**
|
|
241
288
|
* Filter by resource ID
|
|
242
289
|
*/
|
|
@@ -269,6 +316,6 @@ export interface CreditListLedgerParams extends MyCursorIDPageParams {
|
|
|
269
316
|
export declare namespace Credits {
|
|
270
317
|
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, };
|
|
271
318
|
export { Grants as Grants, type CreditGrantResponse as CreditGrantResponse, type GrantListResponse as GrantListResponse, type GrantListResponsesMyCursorIDPage as GrantListResponsesMyCursorIDPage, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, };
|
|
272
|
-
export { CustomCurrencies as CustomCurrencies, type
|
|
319
|
+
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, };
|
|
273
320
|
}
|
|
274
321
|
//# sourceMappingURL=credits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,mBAAmB,+BAA4B;AAC3D,OAAO,EACL,gBAAgB,EAChB,0BAA0B,EAC1B,4CAA4C,EAC5C,wBAAwB,EACxB,0BAA0B,EAC1B,yCAAyC,EACzC,sBAAsB,EACtB,0BAA0B,EAC3B,+BAA4B;AAC7B,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gCAAgC,EAChC,MAAM,EACP,oBAAiB;AAClB,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,oCAAiC;AAClG,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAEnE,qBAAa,OAAQ,SAAQ,WAAW;IACtC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAC9D,gBAAgB,EAAE,mBAAmB,CAAC,gBAAgB,CAEpD;IAEF;;;;;;;;;;;OAWG;IACH,eAAe,CACb,KAAK,EAAE,2BAA2B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAI5C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,KAAK,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAInG;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,KAAK,EAAE,sBAAsB,EAC7B,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B,GACtD,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;IAEF,OAAO,EACL,gBAAgB,IAAI,gBAAgB,EACpC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4CAA4C,IAAI,4CAA4C,EACjG,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Credits = void 0;
|
|
5
|
-
const tslib_1 = require("
|
|
6
|
-
const resource_1 = require("
|
|
5
|
+
const tslib_1 = require("../../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../../core/resource.js");
|
|
7
7
|
const CustomCurrenciesAPI = tslib_1.__importStar(require("./custom-currencies.js"));
|
|
8
8
|
const custom_currencies_1 = require("./custom-currencies.js");
|
|
9
9
|
const GrantsAPI = tslib_1.__importStar(require("./grants.js"));
|
|
10
10
|
const grants_1 = require("./grants.js");
|
|
11
|
-
const pagination_1 = require("
|
|
11
|
+
const pagination_1 = require("../../../core/pagination.js");
|
|
12
12
|
class Credits extends resource_1.APIResource {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
@@ -18,6 +18,14 @@ class Credits extends resource_1.APIResource {
|
|
|
18
18
|
/**
|
|
19
19
|
* Retrieves the automatic recharge configuration for a customer and currency.
|
|
20
20
|
* Returns default settings if no configuration exists.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const response = await client.v1.credits.getAutoRecharge({
|
|
25
|
+
* currencyId: 'currencyId',
|
|
26
|
+
* customerId: 'customerId',
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
21
29
|
*/
|
|
22
30
|
getAutoRecharge(query, options) {
|
|
23
31
|
return this._client.get('/api/v1/credits/auto-recharge', { query, ...options });
|
|
@@ -25,12 +33,29 @@ class Credits extends resource_1.APIResource {
|
|
|
25
33
|
/**
|
|
26
34
|
* Retrieves credit usage time-series data for a customer, grouped by feature, over
|
|
27
35
|
* a specified time range.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const response = await client.v1.credits.getUsage({
|
|
40
|
+
* customerId: 'customerId',
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
28
43
|
*/
|
|
29
44
|
getUsage(query, options) {
|
|
30
45
|
return this._client.get('/api/v1/credits/usage', { query, ...options });
|
|
31
46
|
}
|
|
32
47
|
/**
|
|
33
48
|
* Retrieves a paginated list of credit ledger events for a customer.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* // Automatically fetches more pages as needed.
|
|
53
|
+
* for await (const creditListLedgerResponse of client.v1.credits.listLedger(
|
|
54
|
+
* { customerId: 'customerId' },
|
|
55
|
+
* )) {
|
|
56
|
+
* // ...
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
34
59
|
*/
|
|
35
60
|
listLedger(query, options) {
|
|
36
61
|
return this._client.getAPIList('/api/v1/credits/ledger', (pagination_1.MyCursorIDPage), {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credits.js","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,oFAA2D;AAC3D,8DAS6B;AAC7B,+DAAsC;AACtC,wCAOkB;AAElB,4DAAkG;AAGlG,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,qBAAgB,GAAyC,IAAI,mBAAmB,CAAC,gBAAgB,CAC/F,IAAI,CAAC,OAAO,CACb,CAAC;IA0DJ,CAAC;IAxDC;;;;;;;;;;;OAWG;IACH,eAAe,CACb,KAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,KAA2B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,KAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,wBAAwB,EAAE,CAAA,2BAAwC,CAAA,EAAE;YACjG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA9DD,0BA8DC;AAoUD,OAAO,CAAC,MAAM,GAAG,eAAM,CAAC;AACxB,OAAO,CAAC,gBAAgB,GAAG,oCAAgB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
3
|
import * as CustomCurrenciesAPI from "./custom-currencies.mjs";
|
|
4
4
|
import { CustomCurrencies, } from "./custom-currencies.mjs";
|
|
5
5
|
import * as GrantsAPI from "./grants.mjs";
|
|
6
6
|
import { Grants, } from "./grants.mjs";
|
|
7
|
-
import { MyCursorIDPage } from "
|
|
7
|
+
import { MyCursorIDPage } from "../../../core/pagination.mjs";
|
|
8
8
|
export class Credits extends APIResource {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
@@ -14,6 +14,14 @@ export class Credits extends APIResource {
|
|
|
14
14
|
/**
|
|
15
15
|
* Retrieves the automatic recharge configuration for a customer and currency.
|
|
16
16
|
* Returns default settings if no configuration exists.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const response = await client.v1.credits.getAutoRecharge({
|
|
21
|
+
* currencyId: 'currencyId',
|
|
22
|
+
* customerId: 'customerId',
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
17
25
|
*/
|
|
18
26
|
getAutoRecharge(query, options) {
|
|
19
27
|
return this._client.get('/api/v1/credits/auto-recharge', { query, ...options });
|
|
@@ -21,12 +29,29 @@ export class Credits extends APIResource {
|
|
|
21
29
|
/**
|
|
22
30
|
* Retrieves credit usage time-series data for a customer, grouped by feature, over
|
|
23
31
|
* a specified time range.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.v1.credits.getUsage({
|
|
36
|
+
* customerId: 'customerId',
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
24
39
|
*/
|
|
25
40
|
getUsage(query, options) {
|
|
26
41
|
return this._client.get('/api/v1/credits/usage', { query, ...options });
|
|
27
42
|
}
|
|
28
43
|
/**
|
|
29
44
|
* Retrieves a paginated list of credit ledger events for a customer.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* // Automatically fetches more pages as needed.
|
|
49
|
+
* for await (const creditListLedgerResponse of client.v1.credits.listLedger(
|
|
50
|
+
* { customerId: 'customerId' },
|
|
51
|
+
* )) {
|
|
52
|
+
* // ...
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
30
55
|
*/
|
|
31
56
|
listLedger(query, options) {
|
|
32
57
|
return this._client.getAPIList('/api/v1/credits/ledger', (MyCursorIDPage), {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credits.mjs","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,mBAAmB,gCAA4B;AAC3D,OAAO,EACL,gBAAgB,GAQjB,gCAA4B;AAC7B,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAML,MAAM,GACP,qBAAiB;AAElB,OAAO,EAAE,cAAc,EAA0C,qCAAiC;AAGlG,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,qBAAgB,GAAyC,IAAI,mBAAmB,CAAC,gBAAgB,CAC/F,IAAI,CAAC,OAAO,CACb,CAAC;IA0DJ,CAAC;IAxDC;;;;;;;;;;;OAWG;IACH,eAAe,CACb,KAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,KAA2B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,KAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,wBAAwB,EAAE,CAAA,cAAwC,CAAA,EAAE;YACjG,KAAK;YACL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