@stigg/typescript 0.1.0-alpha.2 → 0.1.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +270 -0
- package/README.md +9 -0
- package/client.d.mts +7 -9
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -9
- package/client.d.ts.map +1 -1
- package/client.js +29 -26
- package/client.js.map +1 -1
- package/client.mjs +30 -27
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/tslib.js +17 -17
- 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/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/v1/addons/addons.d.mts +1305 -0
- package/resources/v1/addons/addons.d.mts.map +1 -0
- package/resources/v1/addons/addons.d.ts +1305 -0
- package/resources/v1/addons/addons.d.ts.map +1 -0
- package/resources/v1/addons/addons.js +81 -0
- package/resources/v1/addons/addons.js.map +1 -0
- package/resources/v1/addons/addons.mjs +76 -0
- package/resources/v1/addons/addons.mjs.map +1 -0
- package/resources/v1/addons/entitlements.d.mts +860 -0
- package/resources/v1/addons/entitlements.d.mts.map +1 -0
- package/resources/v1/addons/entitlements.d.ts +860 -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/addons/index.js +9 -0
- package/resources/v1/addons/index.js.map +1 -0
- package/resources/v1/addons/index.mjs +4 -0
- package/resources/v1/addons/index.mjs.map +1 -0
- package/resources/v1/addons.d.mts +2 -0
- package/resources/v1/addons.d.mts.map +1 -0
- package/resources/v1/addons.d.ts +2 -0
- package/resources/v1/addons.d.ts.map +1 -0
- package/resources/v1/addons.js +6 -0
- package/resources/v1/addons.js.map +1 -0
- package/resources/v1/addons.mjs +3 -0
- package/resources/v1/addons.mjs.map +1 -0
- package/resources/v1/coupons.d.mts +113 -82
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +113 -82
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +19 -3
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +19 -3
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +221 -45
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +221 -45
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +32 -15
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +32 -15
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +2 -2
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +2 -2
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js +3 -3
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +10 -2
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +10 -2
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +7 -2
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +7 -2
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +501 -0
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -0
- package/resources/v1/customers/promotional-entitlements.d.ts +501 -0
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -0
- package/resources/v1/customers/promotional-entitlements.js +35 -0
- package/resources/v1/customers/promotional-entitlements.js.map +1 -0
- package/resources/v1/customers/promotional-entitlements.mjs +31 -0
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -0
- package/resources/v1/events/credits/credits.d.mts +260 -0
- package/resources/v1/events/credits/credits.d.mts.map +1 -0
- package/resources/v1/events/credits/credits.d.ts +260 -0
- package/resources/v1/events/credits/credits.d.ts.map +1 -0
- package/resources/v1/events/credits/credits.js +41 -0
- package/resources/v1/events/credits/credits.js.map +1 -0
- package/resources/v1/events/credits/credits.mjs +36 -0
- package/resources/v1/events/credits/credits.mjs.map +1 -0
- package/resources/v1/events/credits/grants.d.mts +549 -0
- package/resources/v1/events/credits/grants.d.mts.map +1 -0
- package/resources/v1/events/credits/grants.d.ts +549 -0
- package/resources/v1/events/credits/grants.d.ts.map +1 -0
- package/resources/v1/events/credits/grants.js +37 -0
- package/resources/v1/events/credits/grants.js.map +1 -0
- package/resources/v1/events/credits/grants.mjs +33 -0
- package/resources/v1/events/credits/grants.mjs.map +1 -0
- package/resources/v1/events/credits/index.d.mts +3 -0
- package/resources/v1/events/credits/index.d.mts.map +1 -0
- package/resources/v1/events/credits/index.d.ts +3 -0
- package/resources/v1/events/credits/index.d.ts.map +1 -0
- package/resources/v1/events/credits/index.js +9 -0
- package/resources/v1/events/credits/index.js.map +1 -0
- package/resources/v1/events/credits/index.mjs +4 -0
- package/resources/v1/events/credits/index.mjs.map +1 -0
- package/resources/v1/events/credits.d.mts +2 -0
- package/resources/v1/events/credits.d.mts.map +1 -0
- package/resources/v1/events/credits.d.ts +2 -0
- package/resources/v1/events/credits.d.ts.map +1 -0
- package/resources/v1/events/credits.js +6 -0
- package/resources/v1/events/credits.js.map +1 -0
- package/resources/v1/events/credits.mjs +3 -0
- package/resources/v1/events/credits.mjs.map +1 -0
- package/resources/v1/events/events.d.mts +70 -0
- package/resources/v1/events/events.d.mts.map +1 -0
- package/resources/v1/events/events.d.ts +70 -0
- package/resources/v1/events/events.d.ts.map +1 -0
- package/resources/v1/events/events.js +27 -0
- package/resources/v1/events/events.js.map +1 -0
- package/resources/v1/events/events.mjs +22 -0
- package/resources/v1/events/events.mjs.map +1 -0
- package/resources/v1/events/index.d.mts +3 -0
- package/resources/v1/events/index.d.mts.map +1 -0
- package/resources/v1/events/index.d.ts +3 -0
- package/resources/v1/events/index.d.ts.map +1 -0
- package/resources/v1/events/index.js +9 -0
- package/resources/v1/events/index.js.map +1 -0
- package/resources/v1/events/index.mjs +4 -0
- package/resources/v1/events/index.mjs.map +1 -0
- package/resources/v1/events.d.mts +2 -0
- package/resources/v1/events.d.mts.map +1 -0
- package/resources/v1/events.d.ts +2 -0
- package/resources/v1/events.d.ts.map +1 -0
- package/resources/v1/events.js +6 -0
- package/resources/v1/events.js.map +1 -0
- package/resources/v1/events.mjs +3 -0
- package/resources/v1/events.mjs.map +1 -0
- package/resources/v1/features.d.mts +447 -0
- package/resources/v1/features.d.mts.map +1 -0
- package/resources/v1/features.d.ts +447 -0
- package/resources/v1/features.d.ts.map +1 -0
- package/resources/v1/features.js +54 -0
- package/resources/v1/features.js.map +1 -0
- package/resources/v1/features.mjs +50 -0
- package/resources/v1/features.mjs.map +1 -0
- package/resources/v1/index.d.mts +10 -4
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +10 -4
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +17 -5
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +7 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +860 -0
- package/resources/v1/plans/entitlements.d.mts.map +1 -0
- package/resources/v1/plans/entitlements.d.ts +860 -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 +976 -0
- package/resources/v1/plans/plans.d.mts.map +1 -0
- package/resources/v1/plans/plans.d.ts +976 -0
- package/resources/v1/plans/plans.d.ts.map +1 -0
- package/resources/v1/plans/plans.js +79 -0
- package/resources/v1/plans/plans.js.map +1 -0
- package/resources/v1/plans/plans.mjs +74 -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 +335 -0
- package/resources/v1/products.d.mts.map +1 -0
- package/resources/v1/products.d.ts +335 -0
- package/resources/v1/products.d.ts.map +1 -0
- package/resources/v1/products.js +55 -0
- package/resources/v1/products.js.map +1 -0
- package/resources/v1/products.mjs +51 -0
- package/resources/v1/products.mjs.map +1 -0
- package/resources/v1/subscriptions/future-update.d.mts +15 -19
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +15 -19
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +6 -2
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +6 -2
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/index.d.mts +4 -2
- package/resources/v1/subscriptions/index.d.mts.map +1 -1
- package/resources/v1/subscriptions/index.d.ts +4 -2
- package/resources/v1/subscriptions/index.d.ts.map +1 -1
- package/resources/v1/subscriptions/index.js +5 -1
- package/resources/v1/subscriptions/index.js.map +1 -1
- package/resources/v1/subscriptions/index.mjs +3 -1
- package/resources/v1/subscriptions/index.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts +37 -0
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -0
- package/resources/v1/subscriptions/invoice.d.ts +37 -0
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -0
- package/resources/v1/subscriptions/invoice.js +20 -0
- package/resources/v1/subscriptions/invoice.js.map +1 -0
- package/resources/v1/subscriptions/invoice.mjs +16 -0
- package/resources/v1/subscriptions/invoice.mjs.map +1 -0
- package/resources/v1/subscriptions/subscriptions.d.mts +2547 -561
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +2547 -561
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +47 -11
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +49 -13
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +101 -0
- package/resources/v1/subscriptions/usage.d.mts.map +1 -0
- package/resources/v1/subscriptions/usage.d.ts +101 -0
- package/resources/v1/subscriptions/usage.d.ts.map +1 -0
- package/resources/v1/subscriptions/usage.js +27 -0
- package/resources/v1/subscriptions/usage.js.map +1 -0
- package/resources/v1/subscriptions/usage.mjs +23 -0
- package/resources/v1/subscriptions/usage.mjs.map +1 -0
- package/resources/v1/usage.d.mts +238 -0
- package/resources/v1/usage.d.mts.map +1 -0
- package/resources/v1/usage.d.ts +238 -0
- package/resources/v1/usage.d.ts.map +1 -0
- package/resources/v1/usage.js +27 -0
- package/resources/v1/usage.js.map +1 -0
- package/resources/v1/usage.mjs +23 -0
- package/resources/v1/usage.mjs.map +1 -0
- package/resources/v1/v1.d.mts +30 -149
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +30 -149
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +24 -12
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +24 -12
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +41 -47
- package/src/internal/parse.ts +6 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/index.ts +1 -7
- package/src/resources/v1/addons/addons.ts +3253 -0
- package/src/resources/v1/addons/entitlements.ts +1120 -0
- package/src/resources/v1/addons/index.ts +26 -0
- package/src/resources/v1/addons.ts +3 -0
- package/src/resources/v1/coupons.ts +126 -216
- package/src/resources/v1/customers/customers.ts +296 -61
- package/src/resources/v1/customers/index.ts +16 -2
- package/src/resources/v1/customers/payment-method.ts +10 -2
- package/src/resources/v1/customers/promotional-entitlements.ts +672 -0
- package/src/resources/v1/events/credits/credits.ts +356 -0
- package/src/resources/v1/events/credits/grants.ts +795 -0
- package/src/resources/v1/events/credits/index.ts +20 -0
- package/src/resources/v1/events/credits.ts +3 -0
- package/src/resources/v1/events/events.ts +103 -0
- package/src/resources/v1/events/index.ts +13 -0
- package/src/resources/v1/events.ts +3 -0
- package/src/resources/v1/features.ts +574 -0
- package/src/resources/v1/index.ts +70 -15
- package/src/resources/v1/plans/entitlements.ts +1112 -0
- package/src/resources/v1/plans/index.ts +24 -0
- package/src/resources/v1/plans/plans.ts +2035 -0
- package/src/resources/v1/plans.ts +3 -0
- package/src/resources/v1/products.ts +426 -0
- package/src/resources/v1/subscriptions/future-update.ts +15 -27
- package/src/resources/v1/subscriptions/index.ts +15 -11
- package/src/resources/v1/subscriptions/invoice.ts +45 -0
- package/src/resources/v1/subscriptions/subscriptions.ts +5836 -777
- package/src/resources/v1/subscriptions/usage.ts +129 -0
- package/src/resources/v1/usage.ts +293 -0
- package/src/resources/v1/v1.ts +168 -197
- 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/customers/usage.d.mts +0 -98
- package/resources/v1/customers/usage.d.mts.map +0 -1
- package/resources/v1/customers/usage.d.ts +0 -98
- package/resources/v1/customers/usage.d.ts.map +0 -1
- package/resources/v1/customers/usage.js +0 -20
- package/resources/v1/customers/usage.js.map +0 -1
- package/resources/v1/customers/usage.mjs +0 -16
- package/resources/v1/customers/usage.mjs.map +0 -1
- package/src/resources/v1/customers/usage.ts +0 -132
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,275 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.21 (2026-03-12)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.20...v0.1.0-alpha.21](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.20...v0.1.0-alpha.21)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([3ae27b8](https://github.com/stiggio/stigg-typescript/commit/3ae27b8ac9550be5498b9bd687564a9c7e124b37))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* **internal:** bump @modelcontextprotocol/sdk, @hono/node-server, and minimatch ([75580ea](https://github.com/stiggio/stigg-typescript/commit/75580ea84f0b39a6c3e87870ef61d895d131023c))
|
|
15
|
+
|
|
16
|
+
## 0.1.0-alpha.20 (2026-03-10)
|
|
17
|
+
|
|
18
|
+
Full Changelog: [v0.1.0-alpha.19...v0.1.0-alpha.20](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.19...v0.1.0-alpha.20)
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
|
|
22
|
+
* **internal:** update dependencies to address dependabot vulnerabilities ([93f2013](https://github.com/stiggio/stigg-typescript/commit/93f20138cceb8b8dd266b76c0d0b834be8e924e1))
|
|
23
|
+
|
|
24
|
+
## 0.1.0-alpha.19 (2026-03-09)
|
|
25
|
+
|
|
26
|
+
Full Changelog: [v0.1.0-alpha.18...v0.1.0-alpha.19](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.18...v0.1.0-alpha.19)
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* **api:** added credits resources ([9b440aa](https://github.com/stiggio/stigg-typescript/commit/9b440aa26682530f642eeb479b6c17287c5bcda6))
|
|
31
|
+
* **api:** api update ([020ee9f](https://github.com/stiggio/stigg-typescript/commit/020ee9fce20574e4336dc5e2418074388fe677cf))
|
|
32
|
+
* **api:** api update ([bc2afcc](https://github.com/stiggio/stigg-typescript/commit/bc2afccb14dc7c690d3f1e54e81a33998b6dddfd))
|
|
33
|
+
* **api:** api update ([79b5b2d](https://github.com/stiggio/stigg-typescript/commit/79b5b2d3c6c2878eaaaeb81d7bfff9ae6ac105ca))
|
|
34
|
+
* **api:** api update ([20d6f41](https://github.com/stiggio/stigg-typescript/commit/20d6f41fac5ada56fa55ce8291c5f42551126bd9))
|
|
35
|
+
|
|
36
|
+
## 0.1.0-alpha.18 (2026-03-08)
|
|
37
|
+
|
|
38
|
+
Full Changelog: [v0.1.0-alpha.17...v0.1.0-alpha.18](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.17...v0.1.0-alpha.18)
|
|
39
|
+
|
|
40
|
+
### Features
|
|
41
|
+
|
|
42
|
+
* **api:** api update ([3f5925d](https://github.com/stiggio/stigg-typescript/commit/3f5925d74abf2d6896c156bfecafb3a096658821))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* **client:** improve parameter names ([31bd6fb](https://github.com/stiggio/stigg-typescript/commit/31bd6fb8353e52a1e8b5ebdad724c4d54cd48b6b))
|
|
48
|
+
* **client:** preserve URL params already embedded in path ([d461718](https://github.com/stiggio/stigg-typescript/commit/d461718125f93fc32ee7e67f68ff4967bf18fc83))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Chores
|
|
52
|
+
|
|
53
|
+
* **ci:** skip uploading artifacts on stainless-internal branches ([3a6276c](https://github.com/stiggio/stigg-typescript/commit/3a6276cfc3aa550d33fc82e49b8f5a37f37a8c40))
|
|
54
|
+
* **internal:** codegen related update ([5834b85](https://github.com/stiggio/stigg-typescript/commit/5834b85e24ded0fc29b49f27a3a765346a896f53))
|
|
55
|
+
* **mcp-server:** improve instructions ([1c4d9ad](https://github.com/stiggio/stigg-typescript/commit/1c4d9ad1b255af8793effbc5908e5a64010ebda4))
|
|
56
|
+
|
|
57
|
+
## 0.1.0-alpha.17 (2026-03-05)
|
|
58
|
+
|
|
59
|
+
Full Changelog: [v0.1.0-alpha.16...v0.1.0-alpha.17](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.16...v0.1.0-alpha.17)
|
|
60
|
+
|
|
61
|
+
### Features
|
|
62
|
+
|
|
63
|
+
* **api:** api update ([b0490cc](https://github.com/stiggio/stigg-typescript/commit/b0490ccd79bdc32712c560297b0bfea6fb22ffe2))
|
|
64
|
+
|
|
65
|
+
## 0.1.0-alpha.16 (2026-03-05)
|
|
66
|
+
|
|
67
|
+
Full Changelog: [v0.1.0-alpha.15...v0.1.0-alpha.16](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.15...v0.1.0-alpha.16)
|
|
68
|
+
|
|
69
|
+
### Features
|
|
70
|
+
|
|
71
|
+
* **api:** api update ([c2e4823](https://github.com/stiggio/stigg-typescript/commit/c2e4823a5b43606f12c04fb7f5f1500bfadd3db2))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### Chores
|
|
75
|
+
|
|
76
|
+
* **internal:** use x-stainless-mcp-client-envs header for MCP remote code tool calls ([4f6b4a3](https://github.com/stiggio/stigg-typescript/commit/4f6b4a37d60bf9f28358f5cb343714d32da393cb))
|
|
77
|
+
|
|
78
|
+
## 0.1.0-alpha.15 (2026-03-04)
|
|
79
|
+
|
|
80
|
+
Full Changelog: [v0.1.0-alpha.14...v0.1.0-alpha.15](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.14...v0.1.0-alpha.15)
|
|
81
|
+
|
|
82
|
+
### Features
|
|
83
|
+
|
|
84
|
+
* **api:** api update ([5e75193](https://github.com/stiggio/stigg-typescript/commit/5e751935f08e6338a339aec76463b132f12d64d0))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Chores
|
|
88
|
+
|
|
89
|
+
* **internal:** codegen related update ([b31c7ae](https://github.com/stiggio/stigg-typescript/commit/b31c7ae69c8aae6b82aa88c341b8b380befcaf87))
|
|
90
|
+
* **mcp-server:** return access instructions for 404 without API key ([1a702bc](https://github.com/stiggio/stigg-typescript/commit/1a702bc643f28d1f0e235c9061feaffca0f0d1d4))
|
|
91
|
+
|
|
92
|
+
## 0.1.0-alpha.14 (2026-03-02)
|
|
93
|
+
|
|
94
|
+
Full Changelog: [v0.1.0-alpha.13...v0.1.0-alpha.14](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.13...v0.1.0-alpha.14)
|
|
95
|
+
|
|
96
|
+
### Features
|
|
97
|
+
|
|
98
|
+
* **api:** api update ([52d42b8](https://github.com/stiggio/stigg-typescript/commit/52d42b8bd1684904a9b9833edb9ed5129cf1a89e))
|
|
99
|
+
|
|
100
|
+
## 0.1.0-alpha.13 (2026-03-02)
|
|
101
|
+
|
|
102
|
+
Full Changelog: [v0.1.0-alpha.12...v0.1.0-alpha.13](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.12...v0.1.0-alpha.13)
|
|
103
|
+
|
|
104
|
+
### Features
|
|
105
|
+
|
|
106
|
+
* **api:** api update ([0b8c3c5](https://github.com/stiggio/stigg-typescript/commit/0b8c3c54b06fe6a3de59eca7d0c740a6e6b19d4e))
|
|
107
|
+
|
|
108
|
+
## 0.1.0-alpha.12 (2026-02-27)
|
|
109
|
+
|
|
110
|
+
Full Changelog: [v0.1.0-alpha.11...v0.1.0-alpha.12](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.11...v0.1.0-alpha.12)
|
|
111
|
+
|
|
112
|
+
### Features
|
|
113
|
+
|
|
114
|
+
* **mcp:** add an option to disable code tool ([48ef94d](https://github.com/stiggio/stigg-typescript/commit/48ef94db9af330f0c6aef3b0df98a4ee8cdb8a00))
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
### Bug Fixes
|
|
118
|
+
|
|
119
|
+
* **mcp:** update prompt ([074e755](https://github.com/stiggio/stigg-typescript/commit/074e755f197434542e58cf6e66a0e5daf5b8c6a2))
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
### Chores
|
|
123
|
+
|
|
124
|
+
* **internal:** move stringifyQuery implementation to internal function ([da0839b](https://github.com/stiggio/stigg-typescript/commit/da0839b349ab846cb445e2474a397baf1f45f6fa))
|
|
125
|
+
|
|
126
|
+
## 0.1.0-alpha.11 (2026-02-26)
|
|
127
|
+
|
|
128
|
+
Full Changelog: [v0.1.0-alpha.10...v0.1.0-alpha.11](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.10...v0.1.0-alpha.11)
|
|
129
|
+
|
|
130
|
+
### Features
|
|
131
|
+
|
|
132
|
+
* **api:** api update ([eb2a4cc](https://github.com/stiggio/stigg-typescript/commit/eb2a4cc0f2f0c9d7bb0eac31f45647bb022814ef))
|
|
133
|
+
* **api:** stainless config updates ([255807f](https://github.com/stiggio/stigg-typescript/commit/255807f1f82acd0172fcb09343edd8ef6c2c237f))
|
|
134
|
+
* **api:** update endpoints and models ([7f9b02d](https://github.com/stiggio/stigg-typescript/commit/7f9b02d4d889d42f12967dbe8fcffd1c498dab82))
|
|
135
|
+
|
|
136
|
+
## 0.1.0-alpha.10 (2026-02-26)
|
|
137
|
+
|
|
138
|
+
Full Changelog: [v0.1.0-alpha.9...v0.1.0-alpha.10](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.9...v0.1.0-alpha.10)
|
|
139
|
+
|
|
140
|
+
### Features
|
|
141
|
+
|
|
142
|
+
* **api:** api update ([0ab6f6f](https://github.com/stiggio/stigg-typescript/commit/0ab6f6fb541d52cf589c33378dbbec65ee20bfdf))
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### Bug Fixes
|
|
146
|
+
|
|
147
|
+
* **docs/contributing:** correct pnpm link command ([9fa3bb5](https://github.com/stiggio/stigg-typescript/commit/9fa3bb58a1803c49be282e085f588197e95256f5))
|
|
148
|
+
* **mcp:** initialize SDK lazily to avoid failing the connection on init errors ([f8a472c](https://github.com/stiggio/stigg-typescript/commit/f8a472c5ca146393bcdd85867149740b8e1e8155))
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### Chores
|
|
152
|
+
|
|
153
|
+
* **internal:** cache fetch instruction calls in MCP server ([dfab22a](https://github.com/stiggio/stigg-typescript/commit/dfab22a2308eec2a10bdb5b9733132dd31136505))
|
|
154
|
+
* **internal:** fix MCP Dockerfiles so they can be built without buildkit ([22f41ef](https://github.com/stiggio/stigg-typescript/commit/22f41efdf7a55e61d24554976b817d4409da8eb2))
|
|
155
|
+
* **internal:** fix MCP Dockerfiles so they can be built without buildkit ([e9d86c4](https://github.com/stiggio/stigg-typescript/commit/e9d86c47627080d38c1ee5c6491cfb655103daf2))
|
|
156
|
+
* **internal:** make MCP code execution location configurable via a flag ([6f3c168](https://github.com/stiggio/stigg-typescript/commit/6f3c1687a702a149895a12603a9d334017dd8dde))
|
|
157
|
+
* **internal:** remove mock server code ([b70b5a5](https://github.com/stiggio/stigg-typescript/commit/b70b5a5640848e2981fdd26f11aa0bfd3c0daf57))
|
|
158
|
+
* **internal:** upgrade @modelcontextprotocol/sdk and hono ([f1ba036](https://github.com/stiggio/stigg-typescript/commit/f1ba0369b02d44365986b56b028d5b1c6af128a4))
|
|
159
|
+
* **mcp:** correctly update version in sync with sdk ([3d658ff](https://github.com/stiggio/stigg-typescript/commit/3d658ff565dfbcaeb1f1883eadae3d4a84a4fd00))
|
|
160
|
+
* update mock server docs ([47ff87f](https://github.com/stiggio/stigg-typescript/commit/47ff87f0b115bdc2106afc31a6319d2bcb6ae8a8))
|
|
161
|
+
|
|
162
|
+
## 0.1.0-alpha.9 (2026-02-18)
|
|
163
|
+
|
|
164
|
+
Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
|
|
165
|
+
|
|
166
|
+
### Features
|
|
167
|
+
|
|
168
|
+
* **api:** api update ([2be2e6f](https://github.com/stiggio/stigg-typescript/commit/2be2e6f0c0c1efac02fc39d3227a603ba70fd453))
|
|
169
|
+
|
|
170
|
+
## 0.1.0-alpha.8 (2026-02-18)
|
|
171
|
+
|
|
172
|
+
Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)
|
|
173
|
+
|
|
174
|
+
### Features
|
|
175
|
+
|
|
176
|
+
* **api:** add events features/addons/plans, subscriptions usage/invoice, coupons/products endpoints ([aa80361](https://github.com/stiggio/stigg-typescript/commit/aa8036192fd6f8a060ee861d2dd0da1de86e3cb6))
|
|
177
|
+
* **api:** Add missing endpoints ([ded1c1d](https://github.com/stiggio/stigg-typescript/commit/ded1c1d297174ddc906862c0587ae020442cc7d6))
|
|
178
|
+
* **api:** api update ([356282f](https://github.com/stiggio/stigg-typescript/commit/356282f1f257e6176c26c8163b8f801d74b09282))
|
|
179
|
+
* **api:** api update ([473a89c](https://github.com/stiggio/stigg-typescript/commit/473a89c5a14c9c1391039a4d03b5109b9538595d))
|
|
180
|
+
* **api:** api update ([d2cfe9f](https://github.com/stiggio/stigg-typescript/commit/d2cfe9f5b1e4424ccca75eea6c815ff56e677d16))
|
|
181
|
+
* **api:** manual updates ([622e55e](https://github.com/stiggio/stigg-typescript/commit/622e55e14a46fb239763101b95f2cbad5e3c10de))
|
|
182
|
+
* **api:** manual updates ([622e55e](https://github.com/stiggio/stigg-typescript/commit/622e55e14a46fb239763101b95f2cbad5e3c10de))
|
|
183
|
+
* **api:** manual updates ([b7e5a4b](https://github.com/stiggio/stigg-typescript/commit/b7e5a4bb6dcabe6fa369741eb779050901e827f1))
|
|
184
|
+
* **api:** manual updates ([083f5fa](https://github.com/stiggio/stigg-typescript/commit/083f5fac9a83126b4fbbfd55228b39164eadb325))
|
|
185
|
+
* **api:** manual updates ([a15494f](https://github.com/stiggio/stigg-typescript/commit/a15494fb80a3d76eae49a2b8beac10b8a569f68d))
|
|
186
|
+
* **api:** trigger release ([4f4bd4f](https://github.com/stiggio/stigg-typescript/commit/4f4bd4fe4fba2e9fdbee9a7391a009a3674bcd2b))
|
|
187
|
+
* **api:** trigger release ([4f4bd4f](https://github.com/stiggio/stigg-typescript/commit/4f4bd4fe4fba2e9fdbee9a7391a009a3674bcd2b))
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
### Bug Fixes
|
|
191
|
+
|
|
192
|
+
* **api:** rename pathID param, remove body_id field in products.duplicateProduct ([b2b795e](https://github.com/stiggio/stigg-typescript/commit/b2b795e5f0ec8f72f3392d82b428a627c84294da))
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
### Chores
|
|
196
|
+
|
|
197
|
+
* **internal/client:** fix form-urlencoded requests ([456672a](https://github.com/stiggio/stigg-typescript/commit/456672ad70b99e5ce322a15a48d958da37ffb7a0))
|
|
198
|
+
* **internal:** allow setting x-stainless-api-key header on mcp server requests ([c73920b](https://github.com/stiggio/stigg-typescript/commit/c73920be5a90ca466d47848418e9d7cb0b81ebd3))
|
|
199
|
+
* remove custom code ([0a618df](https://github.com/stiggio/stigg-typescript/commit/0a618df73be4e5b195393c813740838d179b7d5c))
|
|
200
|
+
* update SDK settings ([23fb700](https://github.com/stiggio/stigg-typescript/commit/23fb700dadc23339d0d3f075c7a869687b206ce5))
|
|
201
|
+
* update SDK settings ([0c8a587](https://github.com/stiggio/stigg-typescript/commit/0c8a58729cc38e085cf988b43a6d88e4ff3a0122))
|
|
202
|
+
|
|
203
|
+
## 0.1.0-alpha.7 (2026-02-17)
|
|
204
|
+
|
|
205
|
+
Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)
|
|
206
|
+
|
|
207
|
+
### Features
|
|
208
|
+
|
|
209
|
+
* **api:** api update ([e494923](https://github.com/stiggio/stigg-typescript/commit/e4949234a065f5cba5c0590d291cbf432b0d3f06))
|
|
210
|
+
* **api:** updated the production environment ([9332bd4](https://github.com/stiggio/stigg-typescript/commit/9332bd46ede72c46cd352b78db2d5f8c512f3160))
|
|
211
|
+
|
|
212
|
+
## 0.1.0-alpha.6 (2026-02-15)
|
|
213
|
+
|
|
214
|
+
Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)
|
|
215
|
+
|
|
216
|
+
### Features
|
|
217
|
+
|
|
218
|
+
* **api:** api update ([d41ae3a](https://github.com/stiggio/stigg-typescript/commit/d41ae3aefe5bd1643da96a211c3b0830d118fb7f))
|
|
219
|
+
* **api:** api update ([6a44c80](https://github.com/stiggio/stigg-typescript/commit/6a44c80d1666a54aeb13cd63b3aa81fc2c701771))
|
|
220
|
+
* **api:** api update ([3dc1a6f](https://github.com/stiggio/stigg-typescript/commit/3dc1a6f233db6cec6421f234dcc42fa053d522c0))
|
|
221
|
+
* **api:** api update ([5f3a051](https://github.com/stiggio/stigg-typescript/commit/5f3a05145bc6a95c2dade1dfb1ab08d42b3d041f))
|
|
222
|
+
* **api:** api update ([278b7e2](https://github.com/stiggio/stigg-typescript/commit/278b7e2a11a56ebb28fd49fc5c4d374dee762a37))
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
### Chores
|
|
226
|
+
|
|
227
|
+
* configure new SDK language ([f13f50a](https://github.com/stiggio/stigg-typescript/commit/f13f50aeb8a1ee97a508716129057bf287f4d7bb))
|
|
228
|
+
* **internal:** avoid type checking errors with ts-reset ([6d2c1c2](https://github.com/stiggio/stigg-typescript/commit/6d2c1c257bb18e29a3b431ba7993b038f2c913d1))
|
|
229
|
+
* **internal:** configure MCP Server hosting ([4ac2625](https://github.com/stiggio/stigg-typescript/commit/4ac2625f32c269765ab8df22099343bfb2bc4d07))
|
|
230
|
+
|
|
231
|
+
## 0.1.0-alpha.5 (2026-02-08)
|
|
232
|
+
|
|
233
|
+
Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.4...v0.1.0-alpha.5)
|
|
234
|
+
|
|
235
|
+
### Features
|
|
236
|
+
|
|
237
|
+
* **api:** api update ([37a1b67](https://github.com/stiggio/stigg-typescript/commit/37a1b67750e685df4faf6c27328d7298089b1257))
|
|
238
|
+
* **api:** api update ([8951b7b](https://github.com/stiggio/stigg-typescript/commit/8951b7bf135a8254e5a53576ec9ef69aff4b22d5))
|
|
239
|
+
* **api:** api update ([70381e3](https://github.com/stiggio/stigg-typescript/commit/70381e36226669df1e78f537ecec6a82387149af))
|
|
240
|
+
* **api:** manual updates ([6d41016](https://github.com/stiggio/stigg-typescript/commit/6d41016adcdc3d543cda35174bdd07b647b7a940))
|
|
241
|
+
* **api:** manual updates ([18e731c](https://github.com/stiggio/stigg-typescript/commit/18e731c2408ee437c3cbc138208b829cef697646))
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
### Bug Fixes
|
|
245
|
+
|
|
246
|
+
* **client:** avoid memory leak with abort signals ([2a35609](https://github.com/stiggio/stigg-typescript/commit/2a35609541af137208a0f80c17239a0512839332))
|
|
247
|
+
* **client:** avoid removing abort listener too early ([e392dde](https://github.com/stiggio/stigg-typescript/commit/e392dde7d989ebc61c04ac6605c8fefe8f9a605f))
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
### Chores
|
|
251
|
+
|
|
252
|
+
* **client:** do not parse responses with empty content-length ([43d4528](https://github.com/stiggio/stigg-typescript/commit/43d4528c0507b29dfafd0e2763ef0326cc77c868))
|
|
253
|
+
* **client:** restructure abort controller binding ([6e5585d](https://github.com/stiggio/stigg-typescript/commit/6e5585d479f7a88fd45d7747c17f3a0d77c0b6ee))
|
|
254
|
+
* **internal:** fix pagination internals not accepting option promises ([ca6a9b9](https://github.com/stiggio/stigg-typescript/commit/ca6a9b9770072de182b7110e69f5fcae05669d88))
|
|
255
|
+
|
|
256
|
+
## 0.1.0-alpha.4 (2026-01-29)
|
|
257
|
+
|
|
258
|
+
Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)
|
|
259
|
+
|
|
260
|
+
### Features
|
|
261
|
+
|
|
262
|
+
* **api:** update stainless config ([c1c9e66](https://github.com/stiggio/stigg-typescript/commit/c1c9e66bf79510ca37cb3178105e0c1213d2b606))
|
|
263
|
+
|
|
264
|
+
## 0.1.0-alpha.3 (2026-01-28)
|
|
265
|
+
|
|
266
|
+
Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
|
|
267
|
+
|
|
268
|
+
### Features
|
|
269
|
+
|
|
270
|
+
* **api:** api update ([2dc20eb](https://github.com/stiggio/stigg-typescript/commit/2dc20eb12dbb88fdf6ad5d9d416f9b2464e71a91))
|
|
271
|
+
* **api:** api update ([ac6c77e](https://github.com/stiggio/stigg-typescript/commit/ac6c77ee65cc9c1e0f63bc2387f890516a670c9d))
|
|
272
|
+
|
|
3
273
|
## 0.1.0-alpha.2 (2026-01-27)
|
|
4
274
|
|
|
5
275
|
Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/stiggio/stigg-typescript/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
|
package/README.md
CHANGED
|
@@ -8,6 +8,15 @@ The full API of this library can be found in [api.md](api.md).
|
|
|
8
8
|
|
|
9
9
|
It is generated with [Stainless](https://www.stainless.com/).
|
|
10
10
|
|
|
11
|
+
## MCP Server
|
|
12
|
+
|
|
13
|
+
Use the Stigg MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
|
|
14
|
+
|
|
15
|
+
[](https://cursor.com/en-US/install-mcp?name=%40stigg%2Ftypescript-mcp&config=eyJuYW1lIjoiQHN0aWdnL3R5cGVzY3JpcHQtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vc3RpZ2ctbWNwLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IlgtQVBJLUtFWSI6Ik15IEFQSSBLZXkifX0)
|
|
16
|
+
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40stigg%2Ftypescript-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fstigg-mcp.stlmcp.com%22%2C%22headers%22%3A%7B%22X-API-KEY%22%3A%22My%20API%20Key%22%7D%7D)
|
|
17
|
+
|
|
18
|
+
> Note: You may need to set environment variables in your MCP client.
|
|
19
|
+
|
|
11
20
|
## Installation
|
|
12
21
|
|
|
13
22
|
```sh
|
package/client.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ import { type MyCursorIDPageParams, MyCursorIDPageResponse } from "./core/pagina
|
|
|
8
8
|
import * as Uploads from "./core/uploads.mjs";
|
|
9
9
|
import * as API from "./resources/index.mjs";
|
|
10
10
|
import { APIPromise } from "./core/api-promise.mjs";
|
|
11
|
-
import { V1
|
|
11
|
+
import { V1 } from "./resources/v1/v1.mjs";
|
|
12
12
|
import { type Fetch } from "./internal/builtin-types.mjs";
|
|
13
13
|
import { HeadersLike, NullableHeaders } from "./internal/headers.mjs";
|
|
14
14
|
import { FinalRequestOptions, RequestOptions } from "./internal/request-options.mjs";
|
|
@@ -98,7 +98,7 @@ export declare class Stigg {
|
|
|
98
98
|
* API Client for interfacing with the Stigg API.
|
|
99
99
|
*
|
|
100
100
|
* @param {string | undefined} [opts.apiKey=process.env['STIGG_API_KEY'] ?? undefined]
|
|
101
|
-
* @param {string} [opts.baseURL=process.env['STIGG_BASE_URL'] ?? https://api.
|
|
101
|
+
* @param {string} [opts.baseURL=process.env['STIGG_BASE_URL'] ?? https://api.stigg.io] - Override the default base URL for the API.
|
|
102
102
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
103
103
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
104
104
|
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -114,10 +114,7 @@ export declare class Stigg {
|
|
|
114
114
|
protected defaultQuery(): Record<string, string | undefined> | undefined;
|
|
115
115
|
protected validateHeaders({ values, nulls }: NullableHeaders): void;
|
|
116
116
|
protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
117
|
-
|
|
118
|
-
* Basic re-implementation of `qs.stringify` for primitive types.
|
|
119
|
-
*/
|
|
120
|
-
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
117
|
+
protected stringifyQuery(query: object | Record<string, unknown>): string;
|
|
121
118
|
private getUserAgent;
|
|
122
119
|
protected defaultIdempotencyKey(): string;
|
|
123
120
|
protected makeStatusError(status: number, error: Object, message: string | undefined, headers: Headers): Errors.APIError;
|
|
@@ -144,8 +141,8 @@ export declare class Stigg {
|
|
|
144
141
|
private methodRequest;
|
|
145
142
|
request<Rsp>(options: PromiseOrValue<FinalRequestOptions>, remainingRetries?: number | null): APIPromise<Rsp>;
|
|
146
143
|
private makeRequest;
|
|
147
|
-
getAPIList<Item, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(path: string, Page: new (...args: any[]) => PageClass, opts?: RequestOptions): Pagination.PagePromise<PageClass, Item>;
|
|
148
|
-
requestAPIList<Item = unknown, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(Page: new (...args: ConstructorParameters<typeof Pagination.AbstractPage>) => PageClass, options: FinalRequestOptions): Pagination.PagePromise<PageClass, Item>;
|
|
144
|
+
getAPIList<Item, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(path: string, Page: new (...args: any[]) => PageClass, opts?: PromiseOrValue<RequestOptions>): Pagination.PagePromise<PageClass, Item>;
|
|
145
|
+
requestAPIList<Item = unknown, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(Page: new (...args: ConstructorParameters<typeof Pagination.AbstractPage>) => PageClass, options: PromiseOrValue<FinalRequestOptions>): Pagination.PagePromise<PageClass, Item>;
|
|
149
146
|
fetchWithTimeout(url: RequestInfo, init: RequestInit | undefined, ms: number, controller: AbortController): Promise<Response>;
|
|
150
147
|
private shouldRetry;
|
|
151
148
|
private retryRequest;
|
|
@@ -158,6 +155,7 @@ export declare class Stigg {
|
|
|
158
155
|
timeout: number;
|
|
159
156
|
}>;
|
|
160
157
|
private buildHeaders;
|
|
158
|
+
private _makeAbort;
|
|
161
159
|
private buildBody;
|
|
162
160
|
static Stigg: typeof Stigg;
|
|
163
161
|
static DEFAULT_TIMEOUT: number;
|
|
@@ -181,6 +179,6 @@ export declare namespace Stigg {
|
|
|
181
179
|
export type RequestOptions = Opts.RequestOptions;
|
|
182
180
|
export import MyCursorIDPage = Pagination.MyCursorIDPage;
|
|
183
181
|
export { type MyCursorIDPageParams as MyCursorIDPageParams, type MyCursorIDPageResponse as MyCursorIDPageResponse, };
|
|
184
|
-
export { V1 as V1
|
|
182
|
+
export { V1 as V1 };
|
|
185
183
|
}
|
|
186
184
|
//# sourceMappingURL=client.d.mts.map
|
package/client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;
|
|
1
|
+
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAGT,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAAgB,KAAK,oBAAoB,EAAE,sBAAsB,EAAE;OACnE,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EAAE,EAAE,EAAE;OACN,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,WAAW,EAAE,eAAe,EAAgB;OAC9C,EAAE,mBAAmB,EAAE,cAAc,EAA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AC/B;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;IAEjD,MAAM,QAAQ,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;IACzD,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC;CACrB"}
|
package/client.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { type MyCursorIDPageParams, MyCursorIDPageResponse } from "./core/pagina
|
|
|
8
8
|
import * as Uploads from "./core/uploads.js";
|
|
9
9
|
import * as API from "./resources/index.js";
|
|
10
10
|
import { APIPromise } from "./core/api-promise.js";
|
|
11
|
-
import { V1
|
|
11
|
+
import { V1 } from "./resources/v1/v1.js";
|
|
12
12
|
import { type Fetch } from "./internal/builtin-types.js";
|
|
13
13
|
import { HeadersLike, NullableHeaders } from "./internal/headers.js";
|
|
14
14
|
import { FinalRequestOptions, RequestOptions } from "./internal/request-options.js";
|
|
@@ -98,7 +98,7 @@ export declare class Stigg {
|
|
|
98
98
|
* API Client for interfacing with the Stigg API.
|
|
99
99
|
*
|
|
100
100
|
* @param {string | undefined} [opts.apiKey=process.env['STIGG_API_KEY'] ?? undefined]
|
|
101
|
-
* @param {string} [opts.baseURL=process.env['STIGG_BASE_URL'] ?? https://api.
|
|
101
|
+
* @param {string} [opts.baseURL=process.env['STIGG_BASE_URL'] ?? https://api.stigg.io] - Override the default base URL for the API.
|
|
102
102
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
103
103
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
104
104
|
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -114,10 +114,7 @@ export declare class Stigg {
|
|
|
114
114
|
protected defaultQuery(): Record<string, string | undefined> | undefined;
|
|
115
115
|
protected validateHeaders({ values, nulls }: NullableHeaders): void;
|
|
116
116
|
protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
117
|
-
|
|
118
|
-
* Basic re-implementation of `qs.stringify` for primitive types.
|
|
119
|
-
*/
|
|
120
|
-
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
117
|
+
protected stringifyQuery(query: object | Record<string, unknown>): string;
|
|
121
118
|
private getUserAgent;
|
|
122
119
|
protected defaultIdempotencyKey(): string;
|
|
123
120
|
protected makeStatusError(status: number, error: Object, message: string | undefined, headers: Headers): Errors.APIError;
|
|
@@ -144,8 +141,8 @@ export declare class Stigg {
|
|
|
144
141
|
private methodRequest;
|
|
145
142
|
request<Rsp>(options: PromiseOrValue<FinalRequestOptions>, remainingRetries?: number | null): APIPromise<Rsp>;
|
|
146
143
|
private makeRequest;
|
|
147
|
-
getAPIList<Item, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(path: string, Page: new (...args: any[]) => PageClass, opts?: RequestOptions): Pagination.PagePromise<PageClass, Item>;
|
|
148
|
-
requestAPIList<Item = unknown, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(Page: new (...args: ConstructorParameters<typeof Pagination.AbstractPage>) => PageClass, options: FinalRequestOptions): Pagination.PagePromise<PageClass, Item>;
|
|
144
|
+
getAPIList<Item, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(path: string, Page: new (...args: any[]) => PageClass, opts?: PromiseOrValue<RequestOptions>): Pagination.PagePromise<PageClass, Item>;
|
|
145
|
+
requestAPIList<Item = unknown, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(Page: new (...args: ConstructorParameters<typeof Pagination.AbstractPage>) => PageClass, options: PromiseOrValue<FinalRequestOptions>): Pagination.PagePromise<PageClass, Item>;
|
|
149
146
|
fetchWithTimeout(url: RequestInfo, init: RequestInit | undefined, ms: number, controller: AbortController): Promise<Response>;
|
|
150
147
|
private shouldRetry;
|
|
151
148
|
private retryRequest;
|
|
@@ -158,6 +155,7 @@ export declare class Stigg {
|
|
|
158
155
|
timeout: number;
|
|
159
156
|
}>;
|
|
160
157
|
private buildHeaders;
|
|
158
|
+
private _makeAbort;
|
|
161
159
|
private buildBody;
|
|
162
160
|
static Stigg: typeof Stigg;
|
|
163
161
|
static DEFAULT_TIMEOUT: number;
|
|
@@ -181,6 +179,6 @@ export declare namespace Stigg {
|
|
|
181
179
|
export type RequestOptions = Opts.RequestOptions;
|
|
182
180
|
export import MyCursorIDPage = Pagination.MyCursorIDPage;
|
|
183
181
|
export { type MyCursorIDPageParams as MyCursorIDPageParams, type MyCursorIDPageResponse as MyCursorIDPageResponse, };
|
|
184
|
-
export { V1 as V1
|
|
182
|
+
export { V1 as V1 };
|
|
185
183
|
}
|
|
186
184
|
//# sourceMappingURL=client.d.ts.map
|
package/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAGT,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAAgB,KAAK,oBAAoB,EAAE,sBAAsB,EAAE;OACnE,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EA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AAqB,sCAAgC;IAC5D,MAAM,CAAC,wBAAwB,yCAAmC;IAElE,MAAM,CAAC,MAAM,wBAAkB;IAE/B,EAAE,EAAE,GAAG,CAAC,EAAE,CAAoB;CAC/B;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;IAEjD,MAAM,QAAQ,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;IACzD,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC;CACrB"}
|
package/client.js
CHANGED
|
@@ -11,6 +11,7 @@ const errors_1 = require("./internal/errors.js");
|
|
|
11
11
|
const detect_platform_1 = require("./internal/detect-platform.js");
|
|
12
12
|
const Shims = tslib_1.__importStar(require("./internal/shims.js"));
|
|
13
13
|
const Opts = tslib_1.__importStar(require("./internal/request-options.js"));
|
|
14
|
+
const query_1 = require("./internal/utils/query.js");
|
|
14
15
|
const version_1 = require("./version.js");
|
|
15
16
|
const Errors = tslib_1.__importStar(require("./core/error.js"));
|
|
16
17
|
const Pagination = tslib_1.__importStar(require("./core/pagination.js"));
|
|
@@ -30,7 +31,7 @@ class Stigg {
|
|
|
30
31
|
* API Client for interfacing with the Stigg API.
|
|
31
32
|
*
|
|
32
33
|
* @param {string | undefined} [opts.apiKey=process.env['STIGG_API_KEY'] ?? undefined]
|
|
33
|
-
* @param {string} [opts.baseURL=process.env['STIGG_BASE_URL'] ?? https://api.
|
|
34
|
+
* @param {string} [opts.baseURL=process.env['STIGG_BASE_URL'] ?? https://api.stigg.io] - Override the default base URL for the API.
|
|
34
35
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
35
36
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
36
37
|
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -48,7 +49,7 @@ class Stigg {
|
|
|
48
49
|
const options = {
|
|
49
50
|
apiKey,
|
|
50
51
|
...opts,
|
|
51
|
-
baseURL: baseURL || `https://api.
|
|
52
|
+
baseURL: baseURL || `https://api.stigg.io`,
|
|
52
53
|
};
|
|
53
54
|
this.baseURL = options.baseURL;
|
|
54
55
|
this.timeout = options.timeout ?? _a.DEFAULT_TIMEOUT /* 1 minute */;
|
|
@@ -94,22 +95,8 @@ class Stigg {
|
|
|
94
95
|
async authHeaders(opts) {
|
|
95
96
|
return (0, headers_1.buildHeaders)([{ 'X-API-KEY': this.apiKey }]);
|
|
96
97
|
}
|
|
97
|
-
/**
|
|
98
|
-
* Basic re-implementation of `qs.stringify` for primitive types.
|
|
99
|
-
*/
|
|
100
98
|
stringifyQuery(query) {
|
|
101
|
-
return
|
|
102
|
-
.filter(([_, value]) => typeof value !== 'undefined')
|
|
103
|
-
.map(([key, value]) => {
|
|
104
|
-
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
105
|
-
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
|
|
106
|
-
}
|
|
107
|
-
if (value === null) {
|
|
108
|
-
return `${encodeURIComponent(key)}=`;
|
|
109
|
-
}
|
|
110
|
-
throw new Errors.StiggError(`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`);
|
|
111
|
-
})
|
|
112
|
-
.join('&');
|
|
99
|
+
return (0, query_1.stringifyQuery)(query);
|
|
113
100
|
}
|
|
114
101
|
getUserAgent() {
|
|
115
102
|
return `${this.constructor.name}/JS ${version_1.VERSION}`;
|
|
@@ -126,8 +113,9 @@ class Stigg {
|
|
|
126
113
|
new URL(path)
|
|
127
114
|
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
128
115
|
const defaultQuery = this.defaultQuery();
|
|
129
|
-
|
|
130
|
-
|
|
116
|
+
const pathQuery = Object.fromEntries(url.searchParams);
|
|
117
|
+
if (!(0, values_2.isEmptyObj)(defaultQuery) || !(0, values_2.isEmptyObj)(pathQuery)) {
|
|
118
|
+
query = { ...pathQuery, ...defaultQuery, ...query };
|
|
131
119
|
}
|
|
132
120
|
if (typeof query === 'object' && query && !Array.isArray(query)) {
|
|
133
121
|
url.search = this.stringifyQuery(query);
|
|
@@ -273,7 +261,9 @@ class Stigg {
|
|
|
273
261
|
return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
|
|
274
262
|
}
|
|
275
263
|
getAPIList(path, Page, opts) {
|
|
276
|
-
return this.requestAPIList(Page,
|
|
264
|
+
return this.requestAPIList(Page, opts && 'then' in opts ?
|
|
265
|
+
opts.then((opts) => ({ method: 'get', path, ...opts }))
|
|
266
|
+
: { method: 'get', path, ...opts });
|
|
277
267
|
}
|
|
278
268
|
requestAPIList(Page, options) {
|
|
279
269
|
const request = this.makeRequest(options, null, undefined);
|
|
@@ -281,9 +271,10 @@ class Stigg {
|
|
|
281
271
|
}
|
|
282
272
|
async fetchWithTimeout(url, init, ms, controller) {
|
|
283
273
|
const { signal, method, ...options } = init || {};
|
|
274
|
+
const abort = this._makeAbort(controller);
|
|
284
275
|
if (signal)
|
|
285
|
-
signal.addEventListener('abort',
|
|
286
|
-
const timeout = setTimeout(
|
|
276
|
+
signal.addEventListener('abort', abort, { once: true });
|
|
277
|
+
const timeout = setTimeout(abort, ms);
|
|
287
278
|
const isReadableBody = (globalThis.ReadableStream && options.body instanceof globalThis.ReadableStream) ||
|
|
288
279
|
(typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body);
|
|
289
280
|
const fetchOptions = {
|
|
@@ -348,9 +339,9 @@ class Stigg {
|
|
|
348
339
|
timeoutMillis = Date.parse(retryAfterHeader) - Date.now();
|
|
349
340
|
}
|
|
350
341
|
}
|
|
351
|
-
// If the API asks us to wait a certain amount of time
|
|
352
|
-
//
|
|
353
|
-
if (
|
|
342
|
+
// If the API asks us to wait a certain amount of time, just do what it
|
|
343
|
+
// says, but otherwise calculate a default
|
|
344
|
+
if (timeoutMillis === undefined) {
|
|
354
345
|
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
355
346
|
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
|
|
356
347
|
}
|
|
@@ -412,6 +403,11 @@ class Stigg {
|
|
|
412
403
|
this.validateHeaders(headers);
|
|
413
404
|
return headers.values;
|
|
414
405
|
}
|
|
406
|
+
_makeAbort(controller) {
|
|
407
|
+
// note: we can't just inline this method inside `fetchWithTimeout()` because then the closure
|
|
408
|
+
// would capture all request options, and cause a memory leak.
|
|
409
|
+
return () => controller.abort();
|
|
410
|
+
}
|
|
415
411
|
buildBody({ options: { body, headers: rawHeaders } }) {
|
|
416
412
|
if (!body) {
|
|
417
413
|
return { bodyHeaders: undefined, body: undefined };
|
|
@@ -440,6 +436,13 @@ class Stigg {
|
|
|
440
436
|
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))) {
|
|
441
437
|
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body) };
|
|
442
438
|
}
|
|
439
|
+
else if (typeof body === 'object' &&
|
|
440
|
+
headers.values.get('content-type') === 'application/x-www-form-urlencoded') {
|
|
441
|
+
return {
|
|
442
|
+
bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
443
|
+
body: this.stringifyQuery(body),
|
|
444
|
+
};
|
|
445
|
+
}
|
|
443
446
|
else {
|
|
444
447
|
return tslib_1.__classPrivateFieldGet(this, _Stigg_encoder, "f").call(this, { body, headers });
|
|
445
448
|
}
|
|
@@ -447,7 +450,7 @@ class Stigg {
|
|
|
447
450
|
}
|
|
448
451
|
exports.Stigg = Stigg;
|
|
449
452
|
_a = Stigg, _Stigg_encoder = new WeakMap(), _Stigg_instances = new WeakSet(), _Stigg_baseURLOverridden = function _Stigg_baseURLOverridden() {
|
|
450
|
-
return this.baseURL !== 'https://api.
|
|
453
|
+
return this.baseURL !== 'https://api.stigg.io';
|
|
451
454
|
};
|
|
452
455
|
Stigg.Stigg = _a;
|
|
453
456
|
Stigg.DEFAULT_TIMEOUT = 60000; // 1 minute
|