@stigg/typescript 0.1.0-alpha.9 → 0.1.0-beta.2
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 +417 -0
- package/client.d.mts +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +19 -7
- package/client.js.map +1 -1
- package/client.mjs +19 -7
- package/client.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.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.js +3 -2
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +3 -2
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +12 -1
- package/resources/v1/addons/addons.d.mts +828 -0
- package/resources/v1/addons/addons.d.mts.map +1 -0
- package/resources/v1/addons/addons.d.ts +828 -0
- package/resources/v1/addons/addons.d.ts.map +1 -0
- package/resources/v1/{events/addons → addons}/addons.js +41 -26
- package/resources/v1/addons/addons.js.map +1 -0
- package/resources/v1/{events/addons → addons}/addons.mjs +40 -25
- package/resources/v1/addons/addons.mjs.map +1 -0
- package/resources/v1/addons/entitlements.d.mts +888 -0
- package/resources/v1/addons/entitlements.d.mts.map +1 -0
- package/resources/v1/addons/entitlements.d.ts +888 -0
- package/resources/v1/addons/entitlements.d.ts.map +1 -0
- package/resources/v1/addons/entitlements.js +36 -0
- package/resources/v1/addons/entitlements.js.map +1 -0
- package/resources/v1/addons/entitlements.mjs +32 -0
- package/resources/v1/addons/entitlements.mjs.map +1 -0
- package/resources/v1/addons/index.d.mts +3 -0
- package/resources/v1/addons/index.d.mts.map +1 -0
- package/resources/v1/addons/index.d.ts +3 -0
- package/resources/v1/addons/index.d.ts.map +1 -0
- package/resources/v1/{events/addons → addons}/index.js +3 -3
- package/resources/v1/addons/index.js.map +1 -0
- package/resources/v1/{events/addons → addons}/index.mjs +1 -1
- package/resources/v1/addons/index.mjs.map +1 -0
- package/resources/v1/addons.d.mts.map +1 -0
- package/resources/v1/addons.d.ts.map +1 -0
- package/resources/v1/{events/addons.js → addons.js} +1 -1
- package/resources/v1/addons.js.map +1 -0
- package/resources/v1/addons.mjs.map +1 -0
- package/resources/v1/coupons.d.mts +19 -4
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +19 -4
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +3 -0
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +3 -0
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/credits/auto-recharge.d.mts +84 -0
- package/resources/v1/credits/auto-recharge.d.mts.map +1 -0
- package/resources/v1/credits/auto-recharge.d.ts +84 -0
- package/resources/v1/credits/auto-recharge.d.ts.map +1 -0
- package/resources/v1/credits/auto-recharge.js +16 -0
- package/resources/v1/credits/auto-recharge.js.map +1 -0
- package/resources/v1/credits/auto-recharge.mjs +12 -0
- package/resources/v1/credits/auto-recharge.mjs.map +1 -0
- package/resources/v1/credits/credits.d.mts +203 -0
- package/resources/v1/credits/credits.d.mts.map +1 -0
- package/resources/v1/credits/credits.d.ts +203 -0
- package/resources/v1/credits/credits.d.ts.map +1 -0
- package/resources/v1/credits/credits.js +42 -0
- package/resources/v1/credits/credits.js.map +1 -0
- package/resources/v1/credits/credits.mjs +37 -0
- package/resources/v1/credits/credits.mjs.map +1 -0
- package/resources/v1/credits/custom-currencies.d.mts +290 -0
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -0
- package/resources/v1/credits/custom-currencies.d.ts +290 -0
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -0
- package/resources/v1/credits/custom-currencies.js +56 -0
- package/resources/v1/credits/custom-currencies.js.map +1 -0
- package/resources/v1/credits/custom-currencies.mjs +52 -0
- package/resources/v1/credits/custom-currencies.mjs.map +1 -0
- package/resources/v1/credits/grants.d.mts +549 -0
- package/resources/v1/credits/grants.d.mts.map +1 -0
- package/resources/v1/credits/grants.d.ts +549 -0
- package/resources/v1/credits/grants.d.ts.map +1 -0
- package/resources/v1/credits/grants.js +37 -0
- package/resources/v1/credits/grants.js.map +1 -0
- package/resources/v1/credits/grants.mjs +33 -0
- package/resources/v1/credits/grants.mjs.map +1 -0
- package/resources/v1/credits/index.d.mts +5 -0
- package/resources/v1/credits/index.d.mts.map +1 -0
- package/resources/v1/credits/index.d.ts +5 -0
- package/resources/v1/credits/index.d.ts.map +1 -0
- package/resources/v1/credits/index.js +13 -0
- package/resources/v1/credits/index.js.map +1 -0
- package/resources/v1/credits/index.mjs +6 -0
- package/resources/v1/credits/index.mjs.map +1 -0
- package/resources/v1/credits.d.mts +2 -0
- package/resources/v1/credits.d.mts.map +1 -0
- package/resources/v1/credits.d.ts +2 -0
- package/resources/v1/credits.d.ts.map +1 -0
- package/resources/v1/credits.js +6 -0
- package/resources/v1/credits.js.map +1 -0
- package/resources/v1/credits.mjs +3 -0
- package/resources/v1/credits.mjs.map +1 -0
- package/resources/v1/customers/customers.d.mts +1204 -6
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +1204 -6
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +30 -1
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +30 -1
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +2 -1
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +2 -1
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js +3 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +1 -0
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +142 -0
- package/resources/v1/customers/integrations.d.mts.map +1 -0
- package/resources/v1/customers/integrations.d.ts +142 -0
- package/resources/v1/customers/integrations.d.ts.map +1 -0
- package/resources/v1/customers/integrations.js +50 -0
- package/resources/v1/customers/integrations.js.map +1 -0
- package/resources/v1/customers/integrations.mjs +46 -0
- package/resources/v1/customers/integrations.mjs.map +1 -0
- package/resources/v1/customers/payment-method.d.mts +3 -0
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +3 -0
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +3 -0
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +3 -0
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +4 -1
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +4 -1
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.js +3 -0
- package/resources/v1/customers/promotional-entitlements.js.map +1 -1
- package/resources/v1/customers/promotional-entitlements.mjs +3 -0
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
- package/resources/v1/events.d.mts +65 -1
- package/resources/v1/events.d.mts.map +1 -1
- package/resources/v1/events.d.ts +65 -1
- package/resources/v1/events.d.ts.map +1 -1
- package/resources/v1/events.js +15 -2
- package/resources/v1/events.js.map +1 -1
- package/resources/v1/events.mjs +13 -1
- package/resources/v1/events.mjs.map +1 -1
- package/resources/v1/features.d.mts +456 -0
- package/resources/v1/features.d.mts.map +1 -0
- package/resources/v1/features.d.ts +456 -0
- package/resources/v1/features.d.ts.map +1 -0
- package/resources/v1/{events/features.js → features.js} +6 -3
- package/resources/v1/features.js.map +1 -0
- package/resources/v1/{events/features.mjs → features.mjs} +6 -3
- package/resources/v1/features.mjs.map +1 -0
- package/resources/v1/index.d.mts +7 -3
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +7 -3
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +15 -7
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +5 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +888 -0
- package/resources/v1/plans/entitlements.d.mts.map +1 -0
- package/resources/v1/plans/entitlements.d.ts +888 -0
- package/resources/v1/plans/entitlements.d.ts.map +1 -0
- package/resources/v1/plans/entitlements.js +36 -0
- package/resources/v1/plans/entitlements.js.map +1 -0
- package/resources/v1/plans/entitlements.mjs +32 -0
- package/resources/v1/plans/entitlements.mjs.map +1 -0
- package/resources/v1/plans/index.d.mts +3 -0
- package/resources/v1/plans/index.d.mts.map +1 -0
- package/resources/v1/plans/index.d.ts +3 -0
- package/resources/v1/plans/index.d.ts.map +1 -0
- package/resources/v1/plans/index.js +9 -0
- package/resources/v1/plans/index.js.map +1 -0
- package/resources/v1/plans/index.mjs +4 -0
- package/resources/v1/plans/index.mjs.map +1 -0
- package/resources/v1/plans/plans.d.mts +977 -0
- package/resources/v1/plans/plans.d.mts.map +1 -0
- package/resources/v1/plans/plans.d.ts +977 -0
- package/resources/v1/plans/plans.d.ts.map +1 -0
- package/resources/v1/plans/plans.js +72 -0
- package/resources/v1/plans/plans.js.map +1 -0
- package/resources/v1/plans/plans.mjs +67 -0
- package/resources/v1/plans/plans.mjs.map +1 -0
- package/resources/v1/plans.d.mts +2 -0
- package/resources/v1/plans.d.mts.map +1 -0
- package/resources/v1/plans.d.ts +2 -0
- package/resources/v1/plans.d.ts.map +1 -0
- package/resources/v1/plans.js +6 -0
- package/resources/v1/plans.js.map +1 -0
- package/resources/v1/plans.mjs +3 -0
- package/resources/v1/plans.mjs.map +1 -0
- package/resources/v1/products.d.mts +22 -359
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +22 -359
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.js +5 -2
- package/resources/v1/products.js.map +1 -1
- package/resources/v1/products.mjs +5 -2
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +3 -0
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +3 -0
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +3 -0
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +3 -0
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts +3 -0
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts +3 -0
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.js +3 -0
- package/resources/v1/subscriptions/invoice.js.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs +3 -0
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +1131 -166
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +1131 -166
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +2 -2
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +3 -0
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts +3 -0
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- package/resources/v1/subscriptions/usage.js +3 -0
- package/resources/v1/subscriptions/usage.js.map +1 -1
- package/resources/v1/subscriptions/usage.mjs +3 -0
- package/resources/v1/subscriptions/usage.mjs.map +1 -1
- package/resources/v1/usage.d.mts +4 -1
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +4 -1
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +3 -0
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +3 -0
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +22 -6
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +22 -6
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +18 -2
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +18 -2
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +23 -10
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/env.ts +2 -2
- package/src/internal/utils/log.ts +2 -1
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/v1/addons/addons.ts +1856 -0
- package/src/resources/v1/addons/entitlements.ts +1153 -0
- package/src/resources/v1/addons/index.ts +23 -0
- package/src/resources/v1/coupons.ts +17 -4
- package/src/resources/v1/credits/auto-recharge.ts +109 -0
- package/src/resources/v1/credits/credits.ts +313 -0
- package/src/resources/v1/credits/custom-currencies.ts +372 -0
- package/src/resources/v1/credits/grants.ts +795 -0
- package/src/resources/v1/credits/index.ts +33 -0
- package/src/resources/v1/credits.ts +3 -0
- package/src/resources/v1/customers/customers.ts +2526 -69
- package/src/resources/v1/customers/index.ts +15 -0
- package/src/resources/v1/customers/integrations.ts +252 -0
- package/src/resources/v1/customers/payment-method.ts +3 -0
- package/src/resources/v1/customers/promotional-entitlements.ts +4 -1
- package/src/resources/v1/events.ts +75 -1
- package/src/resources/v1/{events/features.ts → features.ts} +29 -512
- package/src/resources/v1/index.ts +48 -6
- package/src/resources/v1/plans/entitlements.ts +1145 -0
- package/src/resources/v1/plans/index.ts +23 -0
- package/src/resources/v1/plans/plans.ts +2029 -0
- package/src/resources/v1/plans.ts +3 -0
- package/src/resources/v1/products.ts +24 -428
- package/src/resources/v1/subscriptions/future-update.ts +3 -0
- package/src/resources/v1/subscriptions/invoice.ts +3 -0
- package/src/resources/v1/subscriptions/subscriptions.ts +3901 -1324
- package/src/resources/v1/subscriptions/usage.ts +3 -0
- package/src/resources/v1/usage.ts +4 -1
- package/src/resources/v1/v1.ts +112 -12
- package/src/version.ts +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/addons/addons.d.mts +0 -605
- package/resources/v1/events/addons/addons.d.mts.map +0 -1
- package/resources/v1/events/addons/addons.d.ts +0 -605
- package/resources/v1/events/addons/addons.d.ts.map +0 -1
- package/resources/v1/events/addons/addons.js.map +0 -1
- package/resources/v1/events/addons/addons.mjs.map +0 -1
- package/resources/v1/events/addons/draft.d.mts +0 -121
- package/resources/v1/events/addons/draft.d.mts.map +0 -1
- package/resources/v1/events/addons/draft.d.ts +0 -121
- package/resources/v1/events/addons/draft.d.ts.map +0 -1
- package/resources/v1/events/addons/draft.js +0 -22
- package/resources/v1/events/addons/draft.js.map +0 -1
- package/resources/v1/events/addons/draft.mjs +0 -18
- package/resources/v1/events/addons/draft.mjs.map +0 -1
- package/resources/v1/events/addons/index.d.mts +0 -3
- package/resources/v1/events/addons/index.d.mts.map +0 -1
- package/resources/v1/events/addons/index.d.ts +0 -3
- package/resources/v1/events/addons/index.d.ts.map +0 -1
- package/resources/v1/events/addons/index.js.map +0 -1
- package/resources/v1/events/addons/index.mjs.map +0 -1
- package/resources/v1/events/addons.d.mts.map +0 -1
- package/resources/v1/events/addons.d.ts.map +0 -1
- package/resources/v1/events/addons.js.map +0 -1
- package/resources/v1/events/addons.mjs.map +0 -1
- package/resources/v1/events/events.d.mts +0 -75
- package/resources/v1/events/events.d.mts.map +0 -1
- package/resources/v1/events/events.d.ts +0 -75
- package/resources/v1/events/events.d.ts.map +0 -1
- package/resources/v1/events/events.js +0 -32
- package/resources/v1/events/events.js.map +0 -1
- package/resources/v1/events/events.mjs +0 -27
- package/resources/v1/events/events.mjs.map +0 -1
- package/resources/v1/events/features.d.mts +0 -856
- package/resources/v1/events/features.d.mts.map +0 -1
- package/resources/v1/events/features.d.ts +0 -856
- package/resources/v1/events/features.d.ts.map +0 -1
- package/resources/v1/events/features.js.map +0 -1
- package/resources/v1/events/features.mjs.map +0 -1
- package/resources/v1/events/index.d.mts +0 -5
- package/resources/v1/events/index.d.mts.map +0 -1
- package/resources/v1/events/index.d.ts +0 -5
- package/resources/v1/events/index.d.ts.map +0 -1
- package/resources/v1/events/index.js +0 -13
- package/resources/v1/events/index.js.map +0 -1
- package/resources/v1/events/index.mjs +0 -6
- package/resources/v1/events/index.mjs.map +0 -1
- package/resources/v1/events/plans.d.mts +0 -348
- package/resources/v1/events/plans.d.mts.map +0 -1
- package/resources/v1/events/plans.d.ts +0 -348
- package/resources/v1/events/plans.d.ts.map +0 -1
- package/resources/v1/events/plans.js +0 -30
- package/resources/v1/events/plans.js.map +0 -1
- package/resources/v1/events/plans.mjs +0 -26
- package/resources/v1/events/plans.mjs.map +0 -1
- package/src/resources/v1/events/addons/addons.ts +0 -761
- package/src/resources/v1/events/addons/draft.ts +0 -151
- package/src/resources/v1/events/addons/index.ts +0 -17
- package/src/resources/v1/events/events.ts +0 -160
- package/src/resources/v1/events/index.ts +0 -39
- package/src/resources/v1/events/plans.ts +0 -429
- /package/resources/v1/{events/addons.d.mts → addons.d.mts} +0 -0
- /package/resources/v1/{events/addons.d.ts → addons.d.ts} +0 -0
- /package/resources/v1/{events/addons.mjs → addons.mjs} +0 -0
- /package/src/resources/v1/{events/addons.ts → addons.ts} +0 -0
package/resources/v1/v1.d.ts
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import * as CouponsAPI from "./coupons.js";
|
|
3
3
|
import { Coupon, CouponCreateParams, CouponListParams, CouponListResponse, CouponListResponsesMyCursorIDPage, CouponUpdateCouponParams, Coupons } from "./coupons.js";
|
|
4
|
+
import * as EventsAPI from "./events.js";
|
|
5
|
+
import { EventReportParams, EventReportResponse, Events } from "./events.js";
|
|
6
|
+
import * as FeaturesAPI from "./features.js";
|
|
7
|
+
import { Feature, FeatureCreateFeatureParams, FeatureListFeaturesParams, FeatureListFeaturesResponse, FeatureListFeaturesResponsesMyCursorIDPage, FeatureUpdateFeatureParams, Features } from "./features.js";
|
|
4
8
|
import * as ProductsAPI from "./products.js";
|
|
5
|
-
import {
|
|
9
|
+
import { Product, ProductCreateProductParams, ProductDuplicateProductParams, ProductListProductsParams, ProductListProductsResponse, ProductListProductsResponsesMyCursorIDPage, ProductUpdateProductParams, Products } from "./products.js";
|
|
6
10
|
import * as UsageAPI from "./usage.js";
|
|
7
11
|
import { Usage, UsageHistoryParams, UsageHistoryResponse, UsageReportParams, UsageReportResponse } from "./usage.js";
|
|
12
|
+
import * as AddonsAPI from "./addons/addons.js";
|
|
13
|
+
import { Addon, AddonCreateParams, AddonListParams, AddonListResponse, AddonListResponsesMyCursorIDPage, AddonPublishParams, AddonPublishResponse, AddonRemoveDraftResponse, AddonUpdateParams, Addons } from "./addons/addons.js";
|
|
14
|
+
import * as CreditsAPI from "./credits/credits.js";
|
|
15
|
+
import { CreditGetUsageParams, CreditGetUsageResponse, CreditListLedgerParams, CreditListLedgerResponse, CreditListLedgerResponsesMyCursorIDPage, Credits } from "./credits/credits.js";
|
|
8
16
|
import * as CustomersAPI from "./customers/customers.js";
|
|
9
|
-
import { CustomerImportParams, CustomerImportResponse, CustomerListParams, CustomerListResourcesParams, CustomerListResourcesResponse, CustomerListResourcesResponsesMyCursorIDPage, CustomerListResponse, CustomerListResponsesMyCursorIDPage, CustomerProvisionParams, CustomerResponse, CustomerUpdateParams, Customers } from "./customers/customers.js";
|
|
10
|
-
import * as
|
|
11
|
-
import {
|
|
17
|
+
import { CustomerCheckEntitlementParams, CustomerCheckEntitlementResponse, CustomerImportParams, CustomerImportResponse, CustomerIntegrationResponse, CustomerListParams, CustomerListResourcesParams, CustomerListResourcesResponse, CustomerListResourcesResponsesMyCursorIDPage, CustomerListResponse, CustomerListResponsesMyCursorIDPage, CustomerProvisionParams, CustomerResponse, CustomerRetrieveEntitlementsParams, CustomerRetrieveEntitlementsResponse, CustomerUpdateParams, Customers } from "./customers/customers.js";
|
|
18
|
+
import * as PlansAPI from "./plans/plans.js";
|
|
19
|
+
import { Plan, PlanCreateParams, PlanListParams, PlanListResponse, PlanListResponsesMyCursorIDPage, PlanPublishParams, PlanPublishResponse, PlanRemoveDraftResponse, PlanUpdateParams, Plans } from "./plans/plans.js";
|
|
12
20
|
import * as SubscriptionsAPI from "./subscriptions/subscriptions.js";
|
|
13
21
|
import { Subscription, SubscriptionCancelParams, SubscriptionDelegateParams, SubscriptionImportParams, SubscriptionImportResponse, SubscriptionListParams, SubscriptionListResponse, SubscriptionListResponsesMyCursorIDPage, SubscriptionMigrateParams, SubscriptionPreviewParams, SubscriptionPreviewResponse, SubscriptionProvisionParams, SubscriptionProvisionResponse, SubscriptionTransferParams, SubscriptionUpdateParams, Subscriptions } from "./subscriptions/subscriptions.js";
|
|
14
22
|
export declare class V1 extends APIResource {
|
|
@@ -16,15 +24,23 @@ export declare class V1 extends APIResource {
|
|
|
16
24
|
subscriptions: SubscriptionsAPI.Subscriptions;
|
|
17
25
|
coupons: CouponsAPI.Coupons;
|
|
18
26
|
events: EventsAPI.Events;
|
|
27
|
+
credits: CreditsAPI.Credits;
|
|
28
|
+
features: FeaturesAPI.Features;
|
|
29
|
+
addons: AddonsAPI.Addons;
|
|
30
|
+
plans: PlansAPI.Plans;
|
|
19
31
|
usage: UsageAPI.Usage;
|
|
20
32
|
products: ProductsAPI.Products;
|
|
21
33
|
}
|
|
22
34
|
export declare namespace V1 {
|
|
23
|
-
export { Customers as Customers, type CustomerResponse as CustomerResponse, type CustomerListResponse as CustomerListResponse, type CustomerImportResponse as CustomerImportResponse, type CustomerListResourcesResponse as CustomerListResourcesResponse, type CustomerListResponsesMyCursorIDPage as CustomerListResponsesMyCursorIDPage, type CustomerListResourcesResponsesMyCursorIDPage as CustomerListResourcesResponsesMyCursorIDPage, type CustomerUpdateParams as CustomerUpdateParams, type CustomerListParams as CustomerListParams, type CustomerImportParams as CustomerImportParams, type CustomerListResourcesParams as CustomerListResourcesParams, type CustomerProvisionParams as CustomerProvisionParams, };
|
|
35
|
+
export { Customers as Customers, type CustomerIntegrationResponse as CustomerIntegrationResponse, type CustomerResponse as CustomerResponse, type CustomerListResponse as CustomerListResponse, type CustomerCheckEntitlementResponse as CustomerCheckEntitlementResponse, type CustomerImportResponse as CustomerImportResponse, type CustomerListResourcesResponse as CustomerListResourcesResponse, type CustomerRetrieveEntitlementsResponse as CustomerRetrieveEntitlementsResponse, type CustomerListResponsesMyCursorIDPage as CustomerListResponsesMyCursorIDPage, type CustomerListResourcesResponsesMyCursorIDPage as CustomerListResourcesResponsesMyCursorIDPage, type CustomerUpdateParams as CustomerUpdateParams, type CustomerListParams as CustomerListParams, type CustomerCheckEntitlementParams as CustomerCheckEntitlementParams, type CustomerImportParams as CustomerImportParams, type CustomerListResourcesParams as CustomerListResourcesParams, type CustomerProvisionParams as CustomerProvisionParams, type CustomerRetrieveEntitlementsParams as CustomerRetrieveEntitlementsParams, };
|
|
24
36
|
export { Subscriptions as Subscriptions, type Subscription as Subscription, type SubscriptionListResponse as SubscriptionListResponse, type SubscriptionImportResponse as SubscriptionImportResponse, type SubscriptionPreviewResponse as SubscriptionPreviewResponse, type SubscriptionProvisionResponse as SubscriptionProvisionResponse, type SubscriptionListResponsesMyCursorIDPage as SubscriptionListResponsesMyCursorIDPage, type SubscriptionUpdateParams as SubscriptionUpdateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionCancelParams as SubscriptionCancelParams, type SubscriptionDelegateParams as SubscriptionDelegateParams, type SubscriptionImportParams as SubscriptionImportParams, type SubscriptionMigrateParams as SubscriptionMigrateParams, type SubscriptionPreviewParams as SubscriptionPreviewParams, type SubscriptionProvisionParams as SubscriptionProvisionParams, type SubscriptionTransferParams as SubscriptionTransferParams, };
|
|
25
37
|
export { Coupons as Coupons, type Coupon as Coupon, type CouponListResponse as CouponListResponse, type CouponListResponsesMyCursorIDPage as CouponListResponsesMyCursorIDPage, type CouponCreateParams as CouponCreateParams, type CouponListParams as CouponListParams, type CouponUpdateCouponParams as CouponUpdateCouponParams, };
|
|
26
38
|
export { Events as Events, type EventReportResponse as EventReportResponse, type EventReportParams as EventReportParams, };
|
|
39
|
+
export { Credits as Credits, type CreditGetUsageResponse as CreditGetUsageResponse, type CreditListLedgerResponse as CreditListLedgerResponse, type CreditListLedgerResponsesMyCursorIDPage as CreditListLedgerResponsesMyCursorIDPage, type CreditGetUsageParams as CreditGetUsageParams, type CreditListLedgerParams as CreditListLedgerParams, };
|
|
40
|
+
export { Features as Features, type Feature as Feature, type FeatureListFeaturesResponse as FeatureListFeaturesResponse, type FeatureListFeaturesResponsesMyCursorIDPage as FeatureListFeaturesResponsesMyCursorIDPage, type FeatureCreateFeatureParams as FeatureCreateFeatureParams, type FeatureListFeaturesParams as FeatureListFeaturesParams, type FeatureUpdateFeatureParams as FeatureUpdateFeatureParams, };
|
|
41
|
+
export { Addons as Addons, type Addon as Addon, type AddonListResponse as AddonListResponse, type AddonPublishResponse as AddonPublishResponse, type AddonRemoveDraftResponse as AddonRemoveDraftResponse, type AddonListResponsesMyCursorIDPage as AddonListResponsesMyCursorIDPage, type AddonCreateParams as AddonCreateParams, type AddonUpdateParams as AddonUpdateParams, type AddonListParams as AddonListParams, type AddonPublishParams as AddonPublishParams, };
|
|
42
|
+
export { Plans as Plans, type Plan as Plan, type PlanListResponse as PlanListResponse, type PlanPublishResponse as PlanPublishResponse, type PlanRemoveDraftResponse as PlanRemoveDraftResponse, type PlanListResponsesMyCursorIDPage as PlanListResponsesMyCursorIDPage, type PlanCreateParams as PlanCreateParams, type PlanUpdateParams as PlanUpdateParams, type PlanListParams as PlanListParams, type PlanPublishParams as PlanPublishParams, };
|
|
27
43
|
export { Usage as Usage, type UsageHistoryResponse as UsageHistoryResponse, type UsageReportResponse as UsageReportResponse, type UsageHistoryParams as UsageHistoryParams, type UsageReportParams as UsageReportParams, };
|
|
28
|
-
export { Products as Products, type
|
|
44
|
+
export { Products as Products, type Product as Product, type ProductListProductsResponse as ProductListProductsResponse, type ProductListProductsResponsesMyCursorIDPage as ProductListProductsResponsesMyCursorIDPage, type ProductCreateProductParams as ProductCreateProductParams, type ProductDuplicateProductParams as ProductDuplicateProductParams, type ProductListProductsParams as ProductListProductsParams, type ProductUpdateProductParams as ProductUpdateProductParams, };
|
|
29
45
|
}
|
|
30
46
|
//# sourceMappingURL=v1.d.ts.map
|
package/resources/v1/v1.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,MAAM,EACN,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,iCAAiC,EACjC,wBAAwB,EACxB,OAAO,EACR;OACM,KAAK,WAAW;OAChB,EACL,
|
|
1
|
+
{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/resources/v1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KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
package/resources/v1/v1.js
CHANGED
|
@@ -6,14 +6,22 @@ const tslib_1 = require("../../internal/tslib.js");
|
|
|
6
6
|
const resource_1 = require("../../core/resource.js");
|
|
7
7
|
const CouponsAPI = tslib_1.__importStar(require("./coupons.js"));
|
|
8
8
|
const coupons_1 = require("./coupons.js");
|
|
9
|
+
const EventsAPI = tslib_1.__importStar(require("./events.js"));
|
|
10
|
+
const events_1 = require("./events.js");
|
|
11
|
+
const FeaturesAPI = tslib_1.__importStar(require("./features.js"));
|
|
12
|
+
const features_1 = require("./features.js");
|
|
9
13
|
const ProductsAPI = tslib_1.__importStar(require("./products.js"));
|
|
10
14
|
const products_1 = require("./products.js");
|
|
11
15
|
const UsageAPI = tslib_1.__importStar(require("./usage.js"));
|
|
12
16
|
const usage_1 = require("./usage.js");
|
|
17
|
+
const AddonsAPI = tslib_1.__importStar(require("./addons/addons.js"));
|
|
18
|
+
const addons_1 = require("./addons/addons.js");
|
|
19
|
+
const CreditsAPI = tslib_1.__importStar(require("./credits/credits.js"));
|
|
20
|
+
const credits_1 = require("./credits/credits.js");
|
|
13
21
|
const CustomersAPI = tslib_1.__importStar(require("./customers/customers.js"));
|
|
14
22
|
const customers_1 = require("./customers/customers.js");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
23
|
+
const PlansAPI = tslib_1.__importStar(require("./plans/plans.js"));
|
|
24
|
+
const plans_1 = require("./plans/plans.js");
|
|
17
25
|
const SubscriptionsAPI = tslib_1.__importStar(require("./subscriptions/subscriptions.js"));
|
|
18
26
|
const subscriptions_1 = require("./subscriptions/subscriptions.js");
|
|
19
27
|
class V1 extends resource_1.APIResource {
|
|
@@ -23,6 +31,10 @@ class V1 extends resource_1.APIResource {
|
|
|
23
31
|
this.subscriptions = new SubscriptionsAPI.Subscriptions(this._client);
|
|
24
32
|
this.coupons = new CouponsAPI.Coupons(this._client);
|
|
25
33
|
this.events = new EventsAPI.Events(this._client);
|
|
34
|
+
this.credits = new CreditsAPI.Credits(this._client);
|
|
35
|
+
this.features = new FeaturesAPI.Features(this._client);
|
|
36
|
+
this.addons = new AddonsAPI.Addons(this._client);
|
|
37
|
+
this.plans = new PlansAPI.Plans(this._client);
|
|
26
38
|
this.usage = new UsageAPI.Usage(this._client);
|
|
27
39
|
this.products = new ProductsAPI.Products(this._client);
|
|
28
40
|
}
|
|
@@ -32,6 +44,10 @@ V1.Customers = customers_1.Customers;
|
|
|
32
44
|
V1.Subscriptions = subscriptions_1.Subscriptions;
|
|
33
45
|
V1.Coupons = coupons_1.Coupons;
|
|
34
46
|
V1.Events = events_1.Events;
|
|
47
|
+
V1.Credits = credits_1.Credits;
|
|
48
|
+
V1.Features = features_1.Features;
|
|
49
|
+
V1.Addons = addons_1.Addons;
|
|
50
|
+
V1.Plans = plans_1.Plans;
|
|
35
51
|
V1.Usage = usage_1.Usage;
|
|
36
52
|
V1.Products = products_1.Products;
|
|
37
53
|
//# sourceMappingURL=v1.js.map
|
package/resources/v1/v1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,iEAAwC;AACxC,0CAQmB;AACnB,mEAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":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CAAC;IAC1E,CAAC;CAAA;AAXD,gBAWC;AAED,EAAE,CAAC,SAAS,GAAG,qBAAS,CAAC;AACzB,EAAE,CAAC,aAAa,GAAG,6BAAa,CAAC;AACjC,EAAE,CAAC,OAAO,GAAG,iBAAO,CAAC;AACrB,EAAE,CAAC,MAAM,GAAG,eAAM,CAAC;AACnB,EAAE,CAAC,OAAO,GAAG,iBAAO,CAAC;AACrB,EAAE,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AACvB,EAAE,CAAC,MAAM,GAAG,eAAM,CAAC;AACnB,EAAE,CAAC,KAAK,GAAG,aAAK,CAAC;AACjB,EAAE,CAAC,KAAK,GAAG,aAAK,CAAC;AACjB,EAAE,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}
|
package/resources/v1/v1.mjs
CHANGED
|
@@ -2,14 +2,22 @@
|
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import * as CouponsAPI from "./coupons.mjs";
|
|
4
4
|
import { Coupons, } from "./coupons.mjs";
|
|
5
|
+
import * as EventsAPI from "./events.mjs";
|
|
6
|
+
import { Events } from "./events.mjs";
|
|
7
|
+
import * as FeaturesAPI from "./features.mjs";
|
|
8
|
+
import { Features, } from "./features.mjs";
|
|
5
9
|
import * as ProductsAPI from "./products.mjs";
|
|
6
10
|
import { Products, } from "./products.mjs";
|
|
7
11
|
import * as UsageAPI from "./usage.mjs";
|
|
8
12
|
import { Usage, } from "./usage.mjs";
|
|
13
|
+
import * as AddonsAPI from "./addons/addons.mjs";
|
|
14
|
+
import { Addons, } from "./addons/addons.mjs";
|
|
15
|
+
import * as CreditsAPI from "./credits/credits.mjs";
|
|
16
|
+
import { Credits, } from "./credits/credits.mjs";
|
|
9
17
|
import * as CustomersAPI from "./customers/customers.mjs";
|
|
10
18
|
import { Customers, } from "./customers/customers.mjs";
|
|
11
|
-
import * as
|
|
12
|
-
import {
|
|
19
|
+
import * as PlansAPI from "./plans/plans.mjs";
|
|
20
|
+
import { Plans, } from "./plans/plans.mjs";
|
|
13
21
|
import * as SubscriptionsAPI from "./subscriptions/subscriptions.mjs";
|
|
14
22
|
import { Subscriptions, } from "./subscriptions/subscriptions.mjs";
|
|
15
23
|
export class V1 extends APIResource {
|
|
@@ -19,6 +27,10 @@ export class V1 extends APIResource {
|
|
|
19
27
|
this.subscriptions = new SubscriptionsAPI.Subscriptions(this._client);
|
|
20
28
|
this.coupons = new CouponsAPI.Coupons(this._client);
|
|
21
29
|
this.events = new EventsAPI.Events(this._client);
|
|
30
|
+
this.credits = new CreditsAPI.Credits(this._client);
|
|
31
|
+
this.features = new FeaturesAPI.Features(this._client);
|
|
32
|
+
this.addons = new AddonsAPI.Addons(this._client);
|
|
33
|
+
this.plans = new PlansAPI.Plans(this._client);
|
|
22
34
|
this.usage = new UsageAPI.Usage(this._client);
|
|
23
35
|
this.products = new ProductsAPI.Products(this._client);
|
|
24
36
|
}
|
|
@@ -27,6 +39,10 @@ V1.Customers = Customers;
|
|
|
27
39
|
V1.Subscriptions = Subscriptions;
|
|
28
40
|
V1.Coupons = Coupons;
|
|
29
41
|
V1.Events = Events;
|
|
42
|
+
V1.Credits = Credits;
|
|
43
|
+
V1.Features = Features;
|
|
44
|
+
V1.Addons = Addons;
|
|
45
|
+
V1.Plans = Plans;
|
|
30
46
|
V1.Usage = Usage;
|
|
31
47
|
V1.Products = Products;
|
|
32
48
|
//# sourceMappingURL=v1.mjs.map
|
package/resources/v1/v1.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.mjs","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAOL,OAAO,GACR;OACM,KAAK,WAAW;OAChB,
|
|
1
|
+
{"version":3,"file":"v1.mjs","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,E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I,CAAC,OAAO,CAAC,CAAC;IAC1E,CAAC;CAAA;AAED,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC;AACzB,EAAE,CAAC,aAAa,GAAG,aAAa,CAAC;AACjC,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC;AACrB,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC;AACnB,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC;AACrB,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACvB,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC;AACnB,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC;AACjB,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC;AACjB,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
|
package/src/client.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type { APIResponseProps } from './internal/parse';
|
|
|
11
11
|
import { getPlatformHeaders } from './internal/detect-platform';
|
|
12
12
|
import * as Shims from './internal/shims';
|
|
13
13
|
import * as Opts from './internal/request-options';
|
|
14
|
-
import
|
|
14
|
+
import { stringifyQuery } from './internal/utils/query';
|
|
15
15
|
import { VERSION } from './version';
|
|
16
16
|
import * as Errors from './core/error';
|
|
17
17
|
import * as Pagination from './core/pagination';
|
|
@@ -170,6 +170,18 @@ export class Stigg {
|
|
|
170
170
|
this.fetch = options.fetch ?? Shims.getDefaultFetch();
|
|
171
171
|
this.#encoder = Opts.FallbackEncoder;
|
|
172
172
|
|
|
173
|
+
const customHeadersEnv = readEnv('STIGG_CUSTOM_HEADERS');
|
|
174
|
+
if (customHeadersEnv) {
|
|
175
|
+
const parsed: Record<string, string> = {};
|
|
176
|
+
for (const line of customHeadersEnv.split('\n')) {
|
|
177
|
+
const colon = line.indexOf(':');
|
|
178
|
+
if (colon >= 0) {
|
|
179
|
+
parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
options.defaultHeaders = { ...parsed, ...options.defaultHeaders };
|
|
183
|
+
}
|
|
184
|
+
|
|
173
185
|
this._options = options;
|
|
174
186
|
|
|
175
187
|
this.apiKey = apiKey;
|
|
@@ -213,8 +225,8 @@ export class Stigg {
|
|
|
213
225
|
return buildHeaders([{ 'X-API-KEY': this.apiKey }]);
|
|
214
226
|
}
|
|
215
227
|
|
|
216
|
-
protected stringifyQuery(query: Record<string, unknown>): string {
|
|
217
|
-
return
|
|
228
|
+
protected stringifyQuery(query: object | Record<string, unknown>): string {
|
|
229
|
+
return stringifyQuery(query);
|
|
218
230
|
}
|
|
219
231
|
|
|
220
232
|
private getUserAgent(): string {
|
|
@@ -246,12 +258,13 @@ export class Stigg {
|
|
|
246
258
|
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
247
259
|
|
|
248
260
|
const defaultQuery = this.defaultQuery();
|
|
249
|
-
|
|
250
|
-
|
|
261
|
+
const pathQuery = Object.fromEntries(url.searchParams);
|
|
262
|
+
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
|
|
263
|
+
query = { ...pathQuery, ...defaultQuery, ...query };
|
|
251
264
|
}
|
|
252
265
|
|
|
253
266
|
if (typeof query === 'object' && query && !Array.isArray(query)) {
|
|
254
|
-
url.search = this.stringifyQuery(query
|
|
267
|
+
url.search = this.stringifyQuery(query);
|
|
255
268
|
}
|
|
256
269
|
|
|
257
270
|
return url.toString();
|
|
@@ -580,9 +593,9 @@ export class Stigg {
|
|
|
580
593
|
}
|
|
581
594
|
}
|
|
582
595
|
|
|
583
|
-
// If the API asks us to wait a certain amount of time
|
|
584
|
-
//
|
|
585
|
-
if (
|
|
596
|
+
// If the API asks us to wait a certain amount of time, just do what it
|
|
597
|
+
// says, but otherwise calculate a default
|
|
598
|
+
if (timeoutMillis === undefined) {
|
|
586
599
|
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
587
600
|
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
|
|
588
601
|
}
|
|
@@ -714,7 +727,7 @@ export class Stigg {
|
|
|
714
727
|
) {
|
|
715
728
|
return {
|
|
716
729
|
bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
717
|
-
body: this.stringifyQuery(body
|
|
730
|
+
body: this.stringifyQuery(body),
|
|
718
731
|
};
|
|
719
732
|
} else {
|
|
720
733
|
return this.#encoder({ body, headers });
|
package/src/internal/types.ts
CHANGED
|
@@ -40,7 +40,6 @@ type OverloadedParameters<T> =
|
|
|
40
40
|
: T extends (...args: infer A) => unknown ? A
|
|
41
41
|
: never;
|
|
42
42
|
|
|
43
|
-
/* eslint-disable */
|
|
44
43
|
/**
|
|
45
44
|
* These imports attempt to get types from a parent package's dependencies.
|
|
46
45
|
* Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
|
|
@@ -63,19 +62,18 @@ type OverloadedParameters<T> =
|
|
|
63
62
|
*
|
|
64
63
|
* [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
|
|
65
64
|
*/
|
|
66
|
-
/** @ts-ignore For users with \@types/node */
|
|
65
|
+
/** @ts-ignore For users with \@types/node */ /* prettier-ignore */
|
|
67
66
|
type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit>;
|
|
68
|
-
/** @ts-ignore For users with undici */
|
|
67
|
+
/** @ts-ignore For users with undici */ /* prettier-ignore */
|
|
69
68
|
type UndiciRequestInit = NotAny<import('../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici/index.d.ts').RequestInit>;
|
|
70
|
-
/** @ts-ignore For users with \@types/bun */
|
|
69
|
+
/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */
|
|
71
70
|
type BunRequestInit = globalThis.FetchRequestInit;
|
|
72
|
-
/** @ts-ignore For users with node-fetch@2 */
|
|
71
|
+
/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */
|
|
73
72
|
type NodeFetch2RequestInit = NotAny<import('../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit>;
|
|
74
|
-
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */
|
|
73
|
+
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */
|
|
75
74
|
type NodeFetch3RequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
|
|
76
|
-
/** @ts-ignore For users who use Deno */
|
|
75
|
+
/** @ts-ignore For users who use Deno */ /* prettier-ignore */
|
|
77
76
|
type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
|
|
78
|
-
/* eslint-enable */
|
|
79
77
|
|
|
80
78
|
type RequestInits =
|
|
81
79
|
| NotAny<UndiciTypesRequestInit>
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export const readEnv = (env: string): string | undefined => {
|
|
11
11
|
if (typeof (globalThis as any).process !== 'undefined') {
|
|
12
|
-
return (globalThis as any).process.env?.[env]?.trim()
|
|
12
|
+
return (globalThis as any).process.env?.[env]?.trim() || undefined;
|
|
13
13
|
}
|
|
14
14
|
if (typeof (globalThis as any).Deno !== 'undefined') {
|
|
15
|
-
return (globalThis as any).Deno.env?.get?.(env)?.trim();
|
|
15
|
+
return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
|
|
16
16
|
}
|
|
17
17
|
return undefined;
|
|
18
18
|
};
|
|
@@ -106,8 +106,9 @@ export const formatRequestDetails = (details: {
|
|
|
106
106
|
([name, value]) => [
|
|
107
107
|
name,
|
|
108
108
|
(
|
|
109
|
-
name.toLowerCase() === 'x-api-key' ||
|
|
110
109
|
name.toLowerCase() === 'authorization' ||
|
|
110
|
+
name.toLowerCase() === 'api-key' ||
|
|
111
|
+
name.toLowerCase() === 'x-api-key' ||
|
|
111
112
|
name.toLowerCase() === 'cookie' ||
|
|
112
113
|
name.toLowerCase() === 'set-cookie'
|
|
113
114
|
) ?
|
package/src/internal/utils.ts
CHANGED