@snagsolutions/sdk 0.1.0-alpha.230 → 0.1.0-alpha.232
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +42 -112
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/_shims/auto/runtime-bun.d.ts +5 -0
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +101 -0
- package/_shims/auto/types.js +3 -0
- package/_shims/auto/types.mjs +3 -0
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +83 -0
- package/_shims/index.js +17 -0
- package/_shims/index.mjs +11 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +89 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +56 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +37 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +41 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +37 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +78 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +71 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +83 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +255 -0
- package/core.d.ts.map +1 -0
- package/core.js +929 -0
- package/core.js.map +1 -0
- package/core.mjs +897 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +46 -1
- package/error.d.ts.map +1 -1
- package/error.js +110 -3
- package/error.js.map +1 -1
- package/error.mjs +96 -1
- package/error.mjs.map +1 -1
- package/index.d.mts +138 -6
- package/index.d.ts +137 -5
- package/index.d.ts.map +1 -1
- package/index.js +136 -12
- package/index.js.map +1 -1
- package/index.mjs +109 -5
- package/index.mjs.map +1 -1
- package/internal/qs/formats.d.ts +0 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/formats.js +2 -4
- package/internal/qs/formats.js.map +1 -1
- package/internal/qs/formats.mjs +1 -2
- package/internal/qs/formats.mjs.map +1 -1
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.js +19 -16
- package/internal/qs/stringify.js.map +1 -1
- package/internal/qs/stringify.mjs +19 -17
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.ts +0 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.js +21 -22
- package/internal/qs/utils.js.map +1 -1
- package/internal/qs/utils.mjs +12 -12
- package/internal/qs/utils.mjs.map +1 -1
- package/package.json +65 -101
- package/resource.d.ts +5 -1
- package/resource.d.ts.map +1 -1
- package/resource.js +8 -3
- package/resource.js.map +1 -1
- package/resource.mjs +6 -1
- package/resource.mjs.map +1 -1
- package/resources/assets.d.ts +3 -4
- package/resources/assets.d.ts.map +1 -1
- package/resources/assets.js +1 -1
- package/resources/assets.js.map +1 -1
- package/resources/assets.mjs +1 -1
- package/resources/assets.mjs.map +1 -1
- package/resources/auctions/auctions.d.ts +6 -6
- package/resources/auctions/auctions.d.ts.map +1 -1
- package/resources/auctions/auctions.js +29 -11
- package/resources/auctions/auctions.js.map +1 -1
- package/resources/auctions/auctions.mjs +5 -9
- package/resources/auctions/auctions.mjs.map +1 -1
- package/resources/auctions/index.d.ts.map +1 -1
- package/resources/auctions/website-user-attributes/index.d.ts.map +1 -1
- package/resources/auctions/website-user-attributes/values.d.ts +4 -5
- package/resources/auctions/website-user-attributes/values.d.ts.map +1 -1
- package/resources/auctions/website-user-attributes/values.js +1 -1
- package/resources/auctions/website-user-attributes/values.js.map +1 -1
- package/resources/auctions/website-user-attributes/values.mjs +1 -1
- package/resources/auctions/website-user-attributes/values.mjs.map +1 -1
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +6 -6
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -1
- package/resources/auctions/website-user-attributes/website-user-attributes.js +31 -15
- package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -1
- package/resources/auctions/website-user-attributes/website-user-attributes.mjs +7 -13
- package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -1
- package/resources/auctions/website-user-attributes.d.ts.map +1 -1
- package/resources/auctions/website-user-attributes.js +15 -2
- package/resources/auctions/website-user-attributes.js.map +1 -1
- package/resources/auctions.d.ts.map +1 -1
- package/resources/auctions.js +15 -2
- package/resources/auctions.js.map +1 -1
- package/resources/auth.d.ts +52 -5
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.js +11 -5
- package/resources/auth.js.map +1 -1
- package/resources/auth.mjs +11 -5
- package/resources/auth.mjs.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/loyalty/account-streaks.d.ts +3 -4
- package/resources/loyalty/account-streaks.d.ts.map +1 -1
- package/resources/loyalty/account-streaks.js +1 -1
- package/resources/loyalty/account-streaks.js.map +1 -1
- package/resources/loyalty/account-streaks.mjs +1 -1
- package/resources/loyalty/account-streaks.mjs.map +1 -1
- package/resources/loyalty/accounts.d.ts +5 -5
- package/resources/loyalty/accounts.d.ts.map +1 -1
- package/resources/loyalty/accounts.js +6 -11
- package/resources/loyalty/accounts.js.map +1 -1
- package/resources/loyalty/accounts.mjs +6 -11
- package/resources/loyalty/accounts.mjs.map +1 -1
- package/resources/loyalty/badges.d.ts +12 -9
- package/resources/loyalty/badges.d.ts.map +1 -1
- package/resources/loyalty/badges.js +18 -44
- package/resources/loyalty/badges.js.map +1 -1
- package/resources/loyalty/badges.mjs +18 -44
- package/resources/loyalty/badges.mjs.map +1 -1
- package/resources/loyalty/currencies.d.ts +4 -5
- package/resources/loyalty/currencies.d.ts.map +1 -1
- package/resources/loyalty/currencies.js +1 -1
- package/resources/loyalty/currencies.js.map +1 -1
- package/resources/loyalty/currencies.mjs +1 -1
- package/resources/loyalty/currencies.mjs.map +1 -1
- package/resources/loyalty/index.d.ts.map +1 -1
- package/resources/loyalty/loyalty.d.ts +1 -1
- package/resources/loyalty/loyalty.d.ts.map +1 -1
- package/resources/loyalty/loyalty.js +35 -13
- package/resources/loyalty/loyalty.js.map +1 -1
- package/resources/loyalty/loyalty.mjs +1 -1
- package/resources/loyalty/multipliers.d.ts +10 -9
- package/resources/loyalty/multipliers.d.ts.map +1 -1
- package/resources/loyalty/multipliers.js +14 -26
- package/resources/loyalty/multipliers.js.map +1 -1
- package/resources/loyalty/multipliers.mjs +14 -26
- package/resources/loyalty/multipliers.mjs.map +1 -1
- package/resources/loyalty/questions-responses.d.ts +5 -5
- package/resources/loyalty/questions-responses.d.ts.map +1 -1
- package/resources/loyalty/questions-responses.js +5 -11
- package/resources/loyalty/questions-responses.js.map +1 -1
- package/resources/loyalty/questions-responses.mjs +5 -11
- package/resources/loyalty/questions-responses.mjs.map +1 -1
- package/resources/loyalty/questions.d.ts +5 -6
- package/resources/loyalty/questions.d.ts.map +1 -1
- package/resources/loyalty/questions.js +2 -3
- package/resources/loyalty/questions.js.map +1 -1
- package/resources/loyalty/questions.mjs +2 -3
- package/resources/loyalty/questions.mjs.map +1 -1
- package/resources/loyalty/rule-edits.d.ts +4 -5
- package/resources/loyalty/rule-edits.d.ts.map +1 -1
- package/resources/loyalty/rule-edits.js +2 -3
- package/resources/loyalty/rule-edits.js.map +1 -1
- package/resources/loyalty/rule-edits.mjs +2 -3
- package/resources/loyalty/rule-edits.mjs.map +1 -1
- package/resources/loyalty/rule-groups.d.ts +8 -7
- package/resources/loyalty/rule-groups.d.ts.map +1 -1
- package/resources/loyalty/rule-groups.js +10 -24
- package/resources/loyalty/rule-groups.js.map +1 -1
- package/resources/loyalty/rule-groups.mjs +10 -24
- package/resources/loyalty/rule-groups.mjs.map +1 -1
- package/resources/loyalty/rules.d.ts +12 -9
- package/resources/loyalty/rules.d.ts.map +1 -1
- package/resources/loyalty/rules.js +18 -48
- package/resources/loyalty/rules.js.map +1 -1
- package/resources/loyalty/rules.mjs +18 -48
- package/resources/loyalty/rules.mjs.map +1 -1
- package/resources/loyalty/transactions/index.d.ts.map +1 -1
- package/resources/loyalty/transactions/posts.d.ts +5 -5
- package/resources/loyalty/transactions/posts.d.ts.map +1 -1
- package/resources/loyalty/transactions/posts.js +6 -14
- package/resources/loyalty/transactions/posts.js.map +1 -1
- package/resources/loyalty/transactions/posts.mjs +6 -14
- package/resources/loyalty/transactions/posts.mjs.map +1 -1
- package/resources/loyalty/transactions/rule-statuses.d.ts +5 -5
- package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -1
- package/resources/loyalty/transactions/rule-statuses.js +5 -10
- package/resources/loyalty/transactions/rule-statuses.js.map +1 -1
- package/resources/loyalty/transactions/rule-statuses.mjs +5 -10
- package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -1
- package/resources/loyalty/transactions/transactions.d.ts +8 -8
- package/resources/loyalty/transactions/transactions.d.ts.map +1 -1
- package/resources/loyalty/transactions/transactions.js +30 -14
- package/resources/loyalty/transactions/transactions.js.map +1 -1
- package/resources/loyalty/transactions/transactions.mjs +5 -11
- package/resources/loyalty/transactions/transactions.mjs.map +1 -1
- package/resources/loyalty/transactions.d.ts.map +1 -1
- package/resources/loyalty/transactions.js +15 -2
- package/resources/loyalty/transactions.js.map +1 -1
- package/resources/loyalty.d.ts.map +1 -1
- package/resources/loyalty.js +15 -2
- package/resources/loyalty.js.map +1 -1
- package/resources/minting/allowlist.d.ts +4 -5
- package/resources/minting/allowlist.d.ts.map +1 -1
- package/resources/minting/allowlist.js +1 -1
- package/resources/minting/allowlist.js.map +1 -1
- package/resources/minting/allowlist.mjs +1 -1
- package/resources/minting/allowlist.mjs.map +1 -1
- package/resources/minting/contracts.d.ts +5 -5
- package/resources/minting/contracts.d.ts.map +1 -1
- package/resources/minting/contracts.js +5 -9
- package/resources/minting/contracts.js.map +1 -1
- package/resources/minting/contracts.mjs +5 -9
- package/resources/minting/contracts.mjs.map +1 -1
- package/resources/minting/index.d.ts.map +1 -1
- package/resources/minting/minting.d.ts +4 -5
- package/resources/minting/minting.d.ts.map +1 -1
- package/resources/minting/minting.js +27 -5
- package/resources/minting/minting.js.map +1 -1
- package/resources/minting/minting.mjs +1 -1
- package/resources/minting/minting.mjs.map +1 -1
- package/resources/minting/status.d.ts +4 -5
- package/resources/minting/status.d.ts.map +1 -1
- package/resources/minting/status.js +3 -4
- package/resources/minting/status.js.map +1 -1
- package/resources/minting/status.mjs +3 -4
- package/resources/minting/status.mjs.map +1 -1
- package/resources/minting.d.ts.map +1 -1
- package/resources/minting.js +15 -2
- package/resources/minting.js.map +1 -1
- package/resources/referral/index.d.ts.map +1 -1
- package/resources/referral/referral.d.ts +3 -4
- package/resources/referral/referral.d.ts.map +1 -1
- package/resources/referral/referral.js +25 -3
- package/resources/referral/referral.js.map +1 -1
- package/resources/referral/referral.mjs +1 -1
- package/resources/referral/referral.mjs.map +1 -1
- package/resources/referral/users.d.ts +5 -5
- package/resources/referral/users.d.ts.map +1 -1
- package/resources/referral/users.js +5 -9
- package/resources/referral/users.js.map +1 -1
- package/resources/referral/users.mjs +5 -9
- package/resources/referral/users.mjs.map +1 -1
- package/resources/referral.d.ts.map +1 -1
- package/resources/referral.js +15 -2
- package/resources/referral.js.map +1 -1
- package/resources/token-claims.d.ts +10 -9
- package/resources/token-claims.d.ts.map +1 -1
- package/resources/token-claims.js +16 -16
- package/resources/token-claims.js.map +1 -1
- package/resources/token-claims.mjs +16 -16
- package/resources/token-claims.mjs.map +1 -1
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/metadatas.d.ts +6 -5
- package/resources/users/metadatas.d.ts.map +1 -1
- package/resources/users/metadatas.js +8 -17
- package/resources/users/metadatas.js.map +1 -1
- package/resources/users/metadatas.mjs +8 -17
- package/resources/users/metadatas.mjs.map +1 -1
- package/resources/users/users.d.ts +13 -9
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js +29 -11
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs +5 -9
- package/resources/users/users.mjs.map +1 -1
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +15 -2
- package/resources/users.js.map +1 -1
- package/resources/websites/index.d.ts.map +1 -1
- package/resources/websites/website-collections.d.ts +4 -5
- package/resources/websites/website-collections.d.ts.map +1 -1
- package/resources/websites/website-collections.js +2 -3
- package/resources/websites/website-collections.js.map +1 -1
- package/resources/websites/website-collections.mjs +2 -3
- package/resources/websites/website-collections.mjs.map +1 -1
- package/resources/websites/website-user-roles.d.ts +4 -5
- package/resources/websites/website-user-roles.d.ts.map +1 -1
- package/resources/websites/website-user-roles.js +1 -1
- package/resources/websites/website-user-roles.js.map +1 -1
- package/resources/websites/website-user-roles.mjs +1 -1
- package/resources/websites/website-user-roles.mjs.map +1 -1
- package/resources/websites/websites.d.ts +5 -5
- package/resources/websites/websites.d.ts.map +1 -1
- package/resources/websites/websites.js +30 -13
- package/resources/websites/websites.js.map +1 -1
- package/resources/websites/websites.mjs +5 -10
- package/resources/websites/websites.mjs.map +1 -1
- package/resources/websites.d.ts.map +1 -1
- package/resources/websites.js +15 -2
- package/resources/websites.js.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.js +15 -2
- package/resources.js.map +1 -1
- package/shims/node.d.ts +30 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +101 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +83 -0
- package/src/_shims/index.js +17 -0
- package/src/_shims/index.mjs +11 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +81 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +67 -0
- package/src/_shims/web-runtime.ts +103 -0
- package/src/_shims/web-types.d.ts +83 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +1243 -0
- package/src/error.ts +130 -2
- package/src/index.ts +342 -5
- package/src/internal/qs/formats.ts +1 -2
- package/src/internal/qs/stringify.ts +20 -17
- package/src/internal/qs/utils.ts +14 -14
- package/src/resource.ts +11 -2
- package/src/resources/assets.ts +6 -4
- package/src/resources/auctions/auctions.ts +17 -9
- package/src/resources/auctions/website-user-attributes/values.ts +4 -5
- package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +20 -13
- package/src/resources/auth.ts +107 -8
- package/src/resources/index.ts +7 -1
- package/src/resources/loyalty/account-streaks.ts +4 -5
- package/src/resources/loyalty/accounts.ts +14 -10
- package/src/resources/loyalty/badges.ts +53 -22
- package/src/resources/loyalty/currencies.ts +4 -5
- package/src/resources/loyalty/loyalty.ts +1 -1
- package/src/resources/loyalty/multipliers.ts +35 -19
- package/src/resources/loyalty/questions-responses.ts +16 -8
- package/src/resources/loyalty/questions.ts +7 -9
- package/src/resources/loyalty/rule-edits.ts +6 -8
- package/src/resources/loyalty/rule-groups.ts +34 -15
- package/src/resources/loyalty/rules.ts +56 -22
- package/src/resources/loyalty/transactions/posts.ts +17 -9
- package/src/resources/loyalty/transactions/rule-statuses.ts +15 -7
- package/src/resources/loyalty/transactions/transactions.ts +24 -14
- package/src/resources/minting/allowlist.ts +7 -5
- package/src/resources/minting/contracts.ts +12 -7
- package/src/resources/minting/minting.ts +8 -6
- package/src/resources/minting/status.ts +10 -8
- package/src/resources/referral/referral.ts +4 -5
- package/src/resources/referral/users.ts +12 -7
- package/src/resources/token-claims.ts +39 -26
- package/src/resources/users/metadatas.ts +19 -9
- package/src/resources/users/users.ts +30 -11
- package/src/resources/websites/website-collections.ts +6 -8
- package/src/resources/websites/website-user-roles.ts +8 -6
- package/src/resources/websites/websites.ts +12 -7
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +255 -2
- package/src/version.ts +1 -1
- package/uploads.d.ts +74 -1
- package/uploads.d.ts.map +1 -1
- package/uploads.js +168 -3
- package/uploads.js.map +1 -1
- package/uploads.mjs +157 -1
- package/uploads.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/api-promise.d.mts +0 -2
- package/api-promise.d.mts.map +0 -1
- package/api-promise.d.ts +0 -2
- package/api-promise.d.ts.map +0 -1
- package/api-promise.js +0 -6
- package/api-promise.js.map +0 -1
- package/api-promise.mjs +0 -2
- package/api-promise.mjs.map +0 -1
- package/client.d.mts +0 -202
- package/client.d.mts.map +0 -1
- package/client.d.ts +0 -202
- package/client.d.ts.map +0 -1
- package/client.js +0 -478
- package/client.js.map +0 -1
- package/client.mjs +0 -474
- package/client.mjs.map +0 -1
- package/core/api-promise.d.mts +0 -46
- package/core/api-promise.d.mts.map +0 -1
- package/core/api-promise.d.ts +0 -46
- package/core/api-promise.d.ts.map +0 -1
- package/core/api-promise.js +0 -74
- package/core/api-promise.js.map +0 -1
- package/core/api-promise.mjs +0 -70
- package/core/api-promise.mjs.map +0 -1
- package/core/error.d.mts +0 -46
- package/core/error.d.mts.map +0 -1
- package/core/error.d.ts +0 -46
- package/core/error.d.ts.map +0 -1
- package/core/error.js +0 -113
- package/core/error.js.map +0 -1
- package/core/error.mjs +0 -97
- package/core/error.mjs.map +0 -1
- package/core/resource.d.mts +0 -6
- package/core/resource.d.mts.map +0 -1
- package/core/resource.d.ts +0 -6
- package/core/resource.d.ts.map +0 -1
- package/core/resource.js +0 -11
- package/core/resource.js.map +0 -1
- package/core/resource.mjs +0 -7
- package/core/resource.mjs.map +0 -1
- package/core/uploads.d.mts +0 -3
- package/core/uploads.d.mts.map +0 -1
- package/core/uploads.d.ts +0 -3
- package/core/uploads.d.ts.map +0 -1
- package/core/uploads.js +0 -6
- package/core/uploads.js.map +0 -1
- package/core/uploads.mjs +0 -2
- package/core/uploads.mjs.map +0 -1
- package/error.d.mts +0 -2
- package/error.d.mts.map +0 -1
- package/index.d.mts.map +0 -1
- package/internal/builtin-types.d.mts +0 -73
- package/internal/builtin-types.d.mts.map +0 -1
- package/internal/builtin-types.d.ts +0 -73
- package/internal/builtin-types.d.ts.map +0 -1
- package/internal/builtin-types.js +0 -4
- package/internal/builtin-types.js.map +0 -1
- package/internal/builtin-types.mjs +0 -3
- package/internal/builtin-types.mjs.map +0 -1
- package/internal/detect-platform.d.mts +0 -15
- package/internal/detect-platform.d.mts.map +0 -1
- package/internal/detect-platform.d.ts +0 -15
- package/internal/detect-platform.d.ts.map +0 -1
- package/internal/detect-platform.js +0 -162
- package/internal/detect-platform.js.map +0 -1
- package/internal/detect-platform.mjs +0 -157
- package/internal/detect-platform.mjs.map +0 -1
- package/internal/errors.d.mts +0 -3
- package/internal/errors.d.mts.map +0 -1
- package/internal/errors.d.ts +0 -3
- package/internal/errors.d.ts.map +0 -1
- package/internal/errors.js +0 -41
- package/internal/errors.js.map +0 -1
- package/internal/errors.mjs +0 -36
- package/internal/errors.mjs.map +0 -1
- package/internal/headers.d.mts +0 -20
- package/internal/headers.d.mts.map +0 -1
- package/internal/headers.d.ts +0 -20
- package/internal/headers.d.ts.map +0 -1
- package/internal/headers.js +0 -79
- package/internal/headers.js.map +0 -1
- package/internal/headers.mjs +0 -74
- package/internal/headers.mjs.map +0 -1
- package/internal/parse.d.mts +0 -12
- package/internal/parse.d.mts.map +0 -1
- package/internal/parse.d.ts +0 -12
- package/internal/parse.d.ts.map +0 -1
- package/internal/parse.js +0 -40
- package/internal/parse.js.map +0 -1
- package/internal/parse.mjs +0 -37
- package/internal/parse.mjs.map +0 -1
- package/internal/qs/formats.d.mts +0 -7
- package/internal/qs/formats.d.mts.map +0 -1
- package/internal/qs/index.d.mts +0 -10
- package/internal/qs/index.d.mts.map +0 -1
- package/internal/qs/stringify.d.mts +0 -3
- package/internal/qs/stringify.d.mts.map +0 -1
- package/internal/qs/types.d.mts +0 -57
- package/internal/qs/types.d.mts.map +0 -1
- package/internal/qs/utils.d.mts +0 -15
- package/internal/qs/utils.d.mts.map +0 -1
- package/internal/request-options.d.mts +0 -75
- package/internal/request-options.d.mts.map +0 -1
- package/internal/request-options.d.ts +0 -75
- package/internal/request-options.d.ts.map +0 -1
- package/internal/request-options.js +0 -14
- package/internal/request-options.js.map +0 -1
- package/internal/request-options.mjs +0 -10
- package/internal/request-options.mjs.map +0 -1
- package/internal/shim-types.d.mts +0 -17
- package/internal/shim-types.d.mts.map +0 -1
- package/internal/shim-types.d.ts +0 -17
- package/internal/shim-types.d.ts.map +0 -1
- package/internal/shim-types.js +0 -4
- package/internal/shim-types.js.map +0 -1
- package/internal/shim-types.mjs +0 -3
- package/internal/shim-types.mjs.map +0 -1
- package/internal/shims.d.mts +0 -20
- package/internal/shims.d.mts.map +0 -1
- package/internal/shims.d.ts +0 -20
- package/internal/shims.d.ts.map +0 -1
- package/internal/shims.js +0 -92
- package/internal/shims.js.map +0 -1
- package/internal/shims.mjs +0 -85
- package/internal/shims.mjs.map +0 -1
- package/internal/to-file.d.mts +0 -45
- package/internal/to-file.d.mts.map +0 -1
- package/internal/to-file.d.ts +0 -45
- package/internal/to-file.d.ts.map +0 -1
- package/internal/to-file.js +0 -91
- package/internal/to-file.js.map +0 -1
- package/internal/to-file.mjs +0 -88
- package/internal/to-file.mjs.map +0 -1
- package/internal/tslib.js +0 -81
- package/internal/tslib.mjs +0 -17
- package/internal/types.d.mts +0 -69
- package/internal/types.d.mts.map +0 -1
- package/internal/types.d.ts +0 -69
- package/internal/types.d.ts.map +0 -1
- package/internal/types.js +0 -4
- package/internal/types.js.map +0 -1
- package/internal/types.mjs +0 -3
- package/internal/types.mjs.map +0 -1
- package/internal/uploads.d.mts +0 -42
- package/internal/uploads.d.mts.map +0 -1
- package/internal/uploads.d.ts +0 -42
- package/internal/uploads.d.ts.map +0 -1
- package/internal/uploads.js +0 -141
- package/internal/uploads.js.map +0 -1
- package/internal/uploads.mjs +0 -131
- package/internal/uploads.mjs.map +0 -1
- package/internal/utils/base64.d.mts +0 -3
- package/internal/utils/base64.d.mts.map +0 -1
- package/internal/utils/base64.d.ts +0 -3
- package/internal/utils/base64.d.ts.map +0 -1
- package/internal/utils/base64.js +0 -38
- package/internal/utils/base64.js.map +0 -1
- package/internal/utils/base64.mjs +0 -33
- package/internal/utils/base64.mjs.map +0 -1
- package/internal/utils/bytes.d.mts +0 -4
- package/internal/utils/bytes.d.mts.map +0 -1
- package/internal/utils/bytes.d.ts +0 -4
- package/internal/utils/bytes.d.ts.map +0 -1
- package/internal/utils/bytes.js +0 -31
- package/internal/utils/bytes.js.map +0 -1
- package/internal/utils/bytes.mjs +0 -26
- package/internal/utils/bytes.mjs.map +0 -1
- package/internal/utils/env.d.mts +0 -9
- package/internal/utils/env.d.mts.map +0 -1
- package/internal/utils/env.d.ts +0 -9
- package/internal/utils/env.d.ts.map +0 -1
- package/internal/utils/env.js +0 -22
- package/internal/utils/env.js.map +0 -1
- package/internal/utils/env.mjs +0 -18
- package/internal/utils/env.mjs.map +0 -1
- package/internal/utils/log.d.mts +0 -37
- package/internal/utils/log.d.mts.map +0 -1
- package/internal/utils/log.d.ts +0 -37
- package/internal/utils/log.d.ts.map +0 -1
- package/internal/utils/log.js +0 -86
- package/internal/utils/log.js.map +0 -1
- package/internal/utils/log.mjs +0 -80
- package/internal/utils/log.mjs.map +0 -1
- package/internal/utils/path.d.mts +0 -15
- package/internal/utils/path.d.mts.map +0 -1
- package/internal/utils/path.d.ts +0 -15
- package/internal/utils/path.d.ts.map +0 -1
- package/internal/utils/path.js +0 -79
- package/internal/utils/path.js.map +0 -1
- package/internal/utils/path.mjs +0 -74
- package/internal/utils/path.mjs.map +0 -1
- package/internal/utils/sleep.d.mts +0 -2
- package/internal/utils/sleep.d.mts.map +0 -1
- package/internal/utils/sleep.d.ts +0 -2
- package/internal/utils/sleep.d.ts.map +0 -1
- package/internal/utils/sleep.js +0 -7
- package/internal/utils/sleep.js.map +0 -1
- package/internal/utils/sleep.mjs +0 -3
- package/internal/utils/sleep.mjs.map +0 -1
- package/internal/utils/uuid.d.mts +0 -5
- package/internal/utils/uuid.d.mts.map +0 -1
- package/internal/utils/uuid.d.ts +0 -5
- package/internal/utils/uuid.d.ts.map +0 -1
- package/internal/utils/uuid.js +0 -19
- package/internal/utils/uuid.js.map +0 -1
- package/internal/utils/uuid.mjs +0 -15
- package/internal/utils/uuid.mjs.map +0 -1
- package/internal/utils/values.d.mts +0 -18
- package/internal/utils/values.d.mts.map +0 -1
- package/internal/utils/values.d.ts +0 -18
- package/internal/utils/values.d.ts.map +0 -1
- package/internal/utils/values.js +0 -112
- package/internal/utils/values.js.map +0 -1
- package/internal/utils/values.mjs +0 -94
- package/internal/utils/values.mjs.map +0 -1
- package/internal/utils.d.mts +0 -7
- package/internal/utils.d.mts.map +0 -1
- package/internal/utils.d.ts +0 -7
- package/internal/utils.d.ts.map +0 -1
- package/internal/utils.js +0 -11
- package/internal/utils.js.map +0 -1
- package/internal/utils.mjs +0 -8
- package/internal/utils.mjs.map +0 -1
- package/resource.d.mts +0 -2
- package/resource.d.mts.map +0 -1
- package/resources/assets.d.mts +0 -65
- package/resources/assets.d.mts.map +0 -1
- package/resources/auctions/auctions.d.mts +0 -368
- package/resources/auctions/auctions.d.mts.map +0 -1
- package/resources/auctions/index.d.mts +0 -3
- package/resources/auctions/index.d.mts.map +0 -1
- package/resources/auctions/website-user-attributes/index.d.mts +0 -3
- package/resources/auctions/website-user-attributes/index.d.mts.map +0 -1
- package/resources/auctions/website-user-attributes/values.d.mts +0 -127
- package/resources/auctions/website-user-attributes/values.d.mts.map +0 -1
- package/resources/auctions/website-user-attributes/website-user-attributes.d.mts +0 -136
- package/resources/auctions/website-user-attributes/website-user-attributes.d.mts.map +0 -1
- package/resources/auctions/website-user-attributes.d.mts +0 -2
- package/resources/auctions/website-user-attributes.d.mts.map +0 -1
- package/resources/auctions.d.mts +0 -2
- package/resources/auctions.d.mts.map +0 -1
- package/resources/auth.d.mts +0 -53
- package/resources/auth.d.mts.map +0 -1
- package/resources/index.d.mts +0 -10
- package/resources/index.d.mts.map +0 -1
- package/resources/loyalty/account-streaks.d.mts +0 -97
- package/resources/loyalty/account-streaks.d.mts.map +0 -1
- package/resources/loyalty/accounts.d.mts +0 -238
- package/resources/loyalty/accounts.d.mts.map +0 -1
- package/resources/loyalty/badges.d.mts +0 -1398
- package/resources/loyalty/badges.d.mts.map +0 -1
- package/resources/loyalty/currencies.d.mts +0 -272
- package/resources/loyalty/currencies.d.mts.map +0 -1
- package/resources/loyalty/index.d.mts +0 -13
- package/resources/loyalty/index.d.mts.map +0 -1
- package/resources/loyalty/loyalty.d.mts +0 -50
- package/resources/loyalty/loyalty.d.mts.map +0 -1
- package/resources/loyalty/multipliers.d.mts +0 -221
- package/resources/loyalty/multipliers.d.mts.map +0 -1
- package/resources/loyalty/questions-responses.d.mts +0 -148
- package/resources/loyalty/questions-responses.d.mts.map +0 -1
- package/resources/loyalty/questions.d.mts +0 -205
- package/resources/loyalty/questions.d.mts.map +0 -1
- package/resources/loyalty/rule-edits.d.mts +0 -3165
- package/resources/loyalty/rule-edits.d.mts.map +0 -1
- package/resources/loyalty/rule-groups.d.mts +0 -826
- package/resources/loyalty/rule-groups.d.mts.map +0 -1
- package/resources/loyalty/rules.d.mts +0 -4543
- package/resources/loyalty/rules.d.mts.map +0 -1
- package/resources/loyalty/transactions/index.d.mts +0 -4
- package/resources/loyalty/transactions/index.d.mts.map +0 -1
- package/resources/loyalty/transactions/posts.d.mts +0 -145
- package/resources/loyalty/transactions/posts.d.mts.map +0 -1
- package/resources/loyalty/transactions/rule-statuses.d.mts +0 -121
- package/resources/loyalty/transactions/rule-statuses.d.mts.map +0 -1
- package/resources/loyalty/transactions/transactions.d.mts +0 -564
- package/resources/loyalty/transactions/transactions.d.mts.map +0 -1
- package/resources/loyalty/transactions.d.mts +0 -2
- package/resources/loyalty/transactions.d.mts.map +0 -1
- package/resources/loyalty.d.mts +0 -2
- package/resources/loyalty.d.mts.map +0 -1
- package/resources/minting/allowlist.d.mts +0 -85
- package/resources/minting/allowlist.d.mts.map +0 -1
- package/resources/minting/contracts.d.mts +0 -165
- package/resources/minting/contracts.d.mts.map +0 -1
- package/resources/minting/index.d.mts +0 -5
- package/resources/minting/index.d.mts.map +0 -1
- package/resources/minting/minting.d.mts +0 -143
- package/resources/minting/minting.d.mts.map +0 -1
- package/resources/minting/status.d.mts +0 -45
- package/resources/minting/status.d.mts.map +0 -1
- package/resources/minting.d.mts +0 -2
- package/resources/minting.d.mts.map +0 -1
- package/resources/referral/index.d.mts +0 -3
- package/resources/referral/index.d.mts.map +0 -1
- package/resources/referral/referral.d.mts +0 -41
- package/resources/referral/referral.d.mts.map +0 -1
- package/resources/referral/users.d.mts +0 -84
- package/resources/referral/users.d.mts.map +0 -1
- package/resources/referral.d.mts +0 -2
- package/resources/referral.d.mts.map +0 -1
- package/resources/token-claims.d.mts +0 -159
- package/resources/token-claims.d.mts.map +0 -1
- package/resources/users/index.d.mts +0 -3
- package/resources/users/index.d.mts.map +0 -1
- package/resources/users/metadatas.d.mts +0 -174
- package/resources/users/metadatas.d.mts.map +0 -1
- package/resources/users/users.d.mts +0 -465
- package/resources/users/users.d.mts.map +0 -1
- package/resources/users.d.mts +0 -2
- package/resources/users.d.mts.map +0 -1
- package/resources/websites/index.d.mts +0 -4
- package/resources/websites/index.d.mts.map +0 -1
- package/resources/websites/website-collections.d.mts +0 -95
- package/resources/websites/website-collections.d.mts.map +0 -1
- package/resources/websites/website-user-roles.d.mts +0 -97
- package/resources/websites/website-user-roles.d.mts.map +0 -1
- package/resources/websites/websites.d.mts +0 -329
- package/resources/websites/websites.d.mts.map +0 -1
- package/resources/websites.d.mts +0 -2
- package/resources/websites.d.mts.map +0 -1
- package/resources.d.mts +0 -2
- package/resources.d.mts.map +0 -1
- package/src/api-promise.ts +0 -2
- package/src/client.ts +0 -868
- package/src/core/README.md +0 -3
- package/src/core/api-promise.ts +0 -92
- package/src/core/error.ts +0 -130
- package/src/core/resource.ts +0 -11
- package/src/core/uploads.ts +0 -2
- package/src/internal/README.md +0 -3
- package/src/internal/builtin-types.ts +0 -93
- package/src/internal/detect-platform.ts +0 -196
- package/src/internal/errors.ts +0 -33
- package/src/internal/headers.ts +0 -97
- package/src/internal/parse.ts +0 -56
- package/src/internal/request-options.ts +0 -91
- package/src/internal/shim-types.ts +0 -26
- package/src/internal/shims.ts +0 -107
- package/src/internal/to-file.ts +0 -154
- package/src/internal/types.ts +0 -95
- package/src/internal/uploads.ts +0 -187
- package/src/internal/utils/base64.ts +0 -40
- package/src/internal/utils/bytes.ts +0 -32
- package/src/internal/utils/env.ts +0 -18
- package/src/internal/utils/log.ts +0 -127
- package/src/internal/utils/path.ts +0 -88
- package/src/internal/utils/sleep.ts +0 -3
- package/src/internal/utils/uuid.ts +0 -17
- package/src/internal/utils/values.ts +0 -105
- package/src/internal/utils.ts +0 -8
- package/uploads.d.mts +0 -2
- package/uploads.d.mts.map +0 -1
- package/version.d.mts +0 -2
- package/version.d.mts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.232 (2026-02-11)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.231...v0.1.0-alpha.232](https://github.com/Snag-Solutions/node-sdk/compare/v0.1.0-alpha.231...v0.1.0-alpha.232)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** open api update ([ca1ac81](https://github.com/Snag-Solutions/node-sdk/commit/ca1ac81508f393436dc1daca7d5e10cbbb878a21))
|
|
10
|
+
|
|
11
|
+
## 0.1.0-alpha.231 (2026-02-11)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.1.0-alpha.230...v0.1.0-alpha.231](https://github.com/Snag-Solutions/node-sdk/compare/v0.1.0-alpha.230...v0.1.0-alpha.231)
|
|
14
|
+
|
|
15
|
+
### Chores
|
|
16
|
+
|
|
17
|
+
* remove custom code ([827479d](https://github.com/Snag-Solutions/node-sdk/commit/827479dd478fb4eb18af479930ada2451531cbd3))
|
|
18
|
+
|
|
3
19
|
## 0.1.0-alpha.230 (2026-02-10)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v0.1.0-alpha.229...v0.1.0-alpha.230](https://github.com/Snag-Solutions/node-sdk/compare/v0.1.0-alpha.229...v0.1.0-alpha.230)
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Snag Solutions
|
|
1
|
+
# Snag Solutions Node API Library
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.org/package/@snagsolutions/sdk) 
|
|
4
4
|
|
|
5
5
|
This library provides convenient access to the Snag Solutions REST API from server-side TypeScript or JavaScript.
|
|
6
6
|
|
|
@@ -130,10 +130,8 @@ Note that requests which time out will be [retried twice by default](#retries).
|
|
|
130
130
|
### Accessing raw Response data (e.g., headers)
|
|
131
131
|
|
|
132
132
|
The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
|
|
133
|
-
This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.
|
|
134
133
|
|
|
135
134
|
You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
|
|
136
|
-
Unlike `.asResponse()` this method consumes the body, returning once it is parsed.
|
|
137
135
|
|
|
138
136
|
<!-- prettier-ignore -->
|
|
139
137
|
```ts
|
|
@@ -152,59 +150,6 @@ console.log(raw.headers.get('X-My-Header'));
|
|
|
152
150
|
console.log(response.signedUrl);
|
|
153
151
|
```
|
|
154
152
|
|
|
155
|
-
### Logging
|
|
156
|
-
|
|
157
|
-
> [!IMPORTANT]
|
|
158
|
-
> All log messages are intended for debugging only. The format and content of log messages
|
|
159
|
-
> may change between releases.
|
|
160
|
-
|
|
161
|
-
#### Log levels
|
|
162
|
-
|
|
163
|
-
The log level can be configured in two ways:
|
|
164
|
-
|
|
165
|
-
1. Via the `SNAG_SOLUTIONS_LOG` environment variable
|
|
166
|
-
2. Using the `logLevel` client option (overrides the environment variable if set)
|
|
167
|
-
|
|
168
|
-
```ts
|
|
169
|
-
import SnagSolutions from '@snagsolutions/sdk';
|
|
170
|
-
|
|
171
|
-
const client = new SnagSolutions({
|
|
172
|
-
logLevel: 'debug', // Show all log messages
|
|
173
|
-
});
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Available log levels, from most to least verbose:
|
|
177
|
-
|
|
178
|
-
- `'debug'` - Show debug messages, info, warnings, and errors
|
|
179
|
-
- `'info'` - Show info messages, warnings, and errors
|
|
180
|
-
- `'warn'` - Show warnings and errors (default)
|
|
181
|
-
- `'error'` - Show only errors
|
|
182
|
-
- `'off'` - Disable all logging
|
|
183
|
-
|
|
184
|
-
At the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.
|
|
185
|
-
Some authentication-related headers are redacted, but sensitive data in request and response bodies
|
|
186
|
-
may still be visible.
|
|
187
|
-
|
|
188
|
-
#### Custom logger
|
|
189
|
-
|
|
190
|
-
By default, this library logs to `globalThis.console`. You can also provide a custom logger.
|
|
191
|
-
Most logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.
|
|
192
|
-
|
|
193
|
-
When providing a custom logger, the `logLevel` option still controls which messages are emitted, messages
|
|
194
|
-
below the configured level will not be sent to your logger.
|
|
195
|
-
|
|
196
|
-
```ts
|
|
197
|
-
import SnagSolutions from '@snagsolutions/sdk';
|
|
198
|
-
import pino from 'pino';
|
|
199
|
-
|
|
200
|
-
const logger = pino();
|
|
201
|
-
|
|
202
|
-
const client = new SnagSolutions({
|
|
203
|
-
logger: logger.child({ name: 'SnagSolutions' }),
|
|
204
|
-
logLevel: 'debug', // Send all messages to pino, allowing it to filter
|
|
205
|
-
});
|
|
206
|
-
```
|
|
207
|
-
|
|
208
153
|
### Making custom/undocumented requests
|
|
209
154
|
|
|
210
155
|
This library is typed for convenient access to the documented API. If you need to access undocumented
|
|
@@ -229,8 +174,9 @@ parameter. This library doesn't validate at runtime that the request matches the
|
|
|
229
174
|
send will be sent as-is.
|
|
230
175
|
|
|
231
176
|
```ts
|
|
232
|
-
client.
|
|
233
|
-
|
|
177
|
+
client.foo.create({
|
|
178
|
+
foo: 'my_param',
|
|
179
|
+
bar: 12,
|
|
234
180
|
// @ts-expect-error baz is not yet public
|
|
235
181
|
baz: 'undocumented option',
|
|
236
182
|
});
|
|
@@ -250,85 +196,69 @@ validate or strip extra properties from the response from the API.
|
|
|
250
196
|
|
|
251
197
|
### Customizing the fetch client
|
|
252
198
|
|
|
253
|
-
By default, this library expects a global `fetch` function
|
|
199
|
+
By default, this library uses `node-fetch` in Node, and expects a global `fetch` function in other environments.
|
|
254
200
|
|
|
255
|
-
If you
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
import fetch from 'my-fetch';
|
|
259
|
-
|
|
260
|
-
globalThis.fetch = fetch;
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
Or pass it to the client:
|
|
201
|
+
If you would prefer to use a global, web-standards-compliant `fetch` function even in a Node environment,
|
|
202
|
+
(for example, if you are running Node with `--experimental-fetch` or using NextJS which polyfills with `undici`),
|
|
203
|
+
add the following import before your first import `from "SnagSolutions"`:
|
|
264
204
|
|
|
265
205
|
```ts
|
|
206
|
+
// Tell TypeScript and the package to use the global web fetch instead of node-fetch.
|
|
207
|
+
// Note, despite the name, this does not add any polyfills, but expects them to be provided if needed.
|
|
208
|
+
import '@snagsolutions/sdk/shims/web';
|
|
266
209
|
import SnagSolutions from '@snagsolutions/sdk';
|
|
267
|
-
import fetch from 'my-fetch';
|
|
268
|
-
|
|
269
|
-
const client = new SnagSolutions({ fetch });
|
|
270
210
|
```
|
|
271
211
|
|
|
272
|
-
|
|
212
|
+
To do the inverse, add `import "@snagsolutions/sdk/shims/node"` (which does import polyfills).
|
|
213
|
+
This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](https://github.com/Snag-Solutions/node-sdk/tree/main/src/_shims#readme)).
|
|
214
|
+
|
|
215
|
+
### Logging and middleware
|
|
273
216
|
|
|
274
|
-
|
|
217
|
+
You may also provide a custom `fetch` function when instantiating the client,
|
|
218
|
+
which can be used to inspect or alter the `Request` or `Response` before/after each request:
|
|
275
219
|
|
|
276
220
|
```ts
|
|
221
|
+
import { fetch } from 'undici'; // as one example
|
|
277
222
|
import SnagSolutions from '@snagsolutions/sdk';
|
|
278
223
|
|
|
279
224
|
const client = new SnagSolutions({
|
|
280
|
-
|
|
281
|
-
|
|
225
|
+
fetch: async (url: RequestInfo, init?: RequestInit): Promise<Response> => {
|
|
226
|
+
console.log('About to make a request', url, init);
|
|
227
|
+
const response = await fetch(url, init);
|
|
228
|
+
console.log('Got response', response);
|
|
229
|
+
return response;
|
|
282
230
|
},
|
|
283
231
|
});
|
|
284
232
|
```
|
|
285
233
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
To modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy
|
|
289
|
-
options to requests:
|
|
234
|
+
Note that if given a `DEBUG=true` environment variable, this library will log all requests and responses automatically.
|
|
235
|
+
This is intended for debugging purposes only and may change in the future without notice.
|
|
290
236
|
|
|
291
|
-
|
|
237
|
+
### Configuring an HTTP(S) Agent (e.g., for proxies)
|
|
292
238
|
|
|
293
|
-
|
|
294
|
-
import SnagSolutions from '@snagsolutions/sdk';
|
|
295
|
-
import * as undici from 'undici';
|
|
296
|
-
|
|
297
|
-
const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
|
|
298
|
-
const client = new SnagSolutions({
|
|
299
|
-
fetchOptions: {
|
|
300
|
-
dispatcher: proxyAgent,
|
|
301
|
-
},
|
|
302
|
-
});
|
|
303
|
-
```
|
|
239
|
+
By default, this library uses a stable agent for all http/https requests to reuse TCP connections, eliminating many TCP & TLS handshakes and shaving around 100ms off most requests.
|
|
304
240
|
|
|
305
|
-
|
|
241
|
+
If you would like to disable or customize this behavior, for example to use the API behind a proxy, you can pass an `httpAgent` which is used for all requests (be they http or https), for example:
|
|
306
242
|
|
|
243
|
+
<!-- prettier-ignore -->
|
|
307
244
|
```ts
|
|
308
|
-
import
|
|
245
|
+
import http from 'http';
|
|
246
|
+
import { HttpsProxyAgent } from 'https-proxy-agent';
|
|
309
247
|
|
|
248
|
+
// Configure the default for all requests:
|
|
310
249
|
const client = new SnagSolutions({
|
|
311
|
-
|
|
312
|
-
proxy: 'http://localhost:8888',
|
|
313
|
-
},
|
|
250
|
+
httpAgent: new HttpsProxyAgent(process.env.PROXY_URL),
|
|
314
251
|
});
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
|
|
318
252
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
fetchOptions: {
|
|
325
|
-
client: httpClient,
|
|
253
|
+
// Override per-request:
|
|
254
|
+
await client.assets.createAsset(
|
|
255
|
+
{ fileName: 'REPLACE_ME', fileSize: 1024 },
|
|
256
|
+
{
|
|
257
|
+
httpAgent: new http.Agent({ keepAlive: false }),
|
|
326
258
|
},
|
|
327
|
-
|
|
259
|
+
);
|
|
328
260
|
```
|
|
329
261
|
|
|
330
|
-
## Frequently Asked Questions
|
|
331
|
-
|
|
332
262
|
## Semantic versioning
|
|
333
263
|
|
|
334
264
|
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
|
|
@@ -343,12 +273,12 @@ We are keen for your feedback; please open an [issue](https://www.github.com/Sna
|
|
|
343
273
|
|
|
344
274
|
## Requirements
|
|
345
275
|
|
|
346
|
-
TypeScript >= 4.
|
|
276
|
+
TypeScript >= 4.5 is supported.
|
|
347
277
|
|
|
348
278
|
The following runtimes are supported:
|
|
349
279
|
|
|
350
280
|
- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
|
|
351
|
-
- Node.js
|
|
281
|
+
- Node.js 18 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
|
|
352
282
|
- Deno v1.28.0 or higher.
|
|
353
283
|
- Bun 1.0 or later.
|
|
354
284
|
- Cloudflare Workers.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultipartBody.d.ts","sourceRoot":"","sources":["../src/_shims/MultipartBody.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,aAAa;IACL,IAAI,EAAE,GAAG;gBAAT,IAAI,EAAE,GAAG;IAC5B,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MultipartBody = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
6
|
+
*/
|
|
7
|
+
class MultipartBody {
|
|
8
|
+
constructor(body) {
|
|
9
|
+
this.body = body;
|
|
10
|
+
}
|
|
11
|
+
get [Symbol.toStringTag]() {
|
|
12
|
+
return 'MultipartBody';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.MultipartBody = MultipartBody;
|
|
16
|
+
//# sourceMappingURL=MultipartBody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultipartBody.js","sourceRoot":"","sources":["../src/_shims/MultipartBody.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,aAAa;IACxB,YAAmB,IAAS;QAAT,SAAI,GAAJ,IAAI,CAAK;IAAG,CAAC;IAChC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,eAAe,CAAC;IACzB,CAAC;CACF;AALD,sCAKC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
|
+
*/
|
|
4
|
+
export class MultipartBody {
|
|
5
|
+
constructor(body) {
|
|
6
|
+
this.body = body;
|
|
7
|
+
}
|
|
8
|
+
get [Symbol.toStringTag]() {
|
|
9
|
+
return 'MultipartBody';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=MultipartBody.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultipartBody.mjs","sourceRoot":"","sources":["../src/_shims/MultipartBody.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,aAAa;IACxB,YAAmB,IAAS;QAAT,SAAI,GAAJ,IAAI,CAAK;IAAG,CAAC;IAChC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,eAAe,CAAC;IACzB,CAAC;CACF"}
|
package/_shims/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# 👋 Wondering what everything in here does?
|
|
2
|
+
|
|
3
|
+
`@snagsolutions/sdk` supports a wide variety of runtime environments like Node.js, Deno, Bun, browsers, and various
|
|
4
|
+
edge runtimes, as well as both CommonJS (CJS) and EcmaScript Modules (ESM).
|
|
5
|
+
|
|
6
|
+
To do this, `@snagsolutions/sdk` provides shims for either using `node-fetch` when in Node (because `fetch` is still experimental there) or the global `fetch` API built into the environment when not in Node.
|
|
7
|
+
|
|
8
|
+
It uses [conditional exports](https://nodejs.org/api/packages.html#conditional-exports) to
|
|
9
|
+
automatically select the correct shims for each environment. However, conditional exports are a fairly new
|
|
10
|
+
feature and not supported everywhere. For instance, the TypeScript `"moduleResolution": "node"`
|
|
11
|
+
|
|
12
|
+
setting doesn't consult the `exports` map, compared to `"moduleResolution": "nodeNext"`, which does.
|
|
13
|
+
Unfortunately that's still the default setting, and it can result in errors like
|
|
14
|
+
getting the wrong raw `Response` type from `.asResponse()`, for example.
|
|
15
|
+
|
|
16
|
+
The user can work around these issues by manually importing one of:
|
|
17
|
+
|
|
18
|
+
- `import '@snagsolutions/sdk/shims/node'`
|
|
19
|
+
- `import '@snagsolutions/sdk/shims/web'`
|
|
20
|
+
|
|
21
|
+
All of the code here in `_shims` handles selecting the automatic default shims or manual overrides.
|
|
22
|
+
|
|
23
|
+
### How it works - Runtime
|
|
24
|
+
|
|
25
|
+
Runtime shims get installed by calling `setShims` exported by `@snagsolutions/sdk/_shims/registry`.
|
|
26
|
+
|
|
27
|
+
Manually importing `@snagsolutions/sdk/shims/node` or `@snagsolutions/sdk/shims/web`, calls `setShims` with the respective runtime shims.
|
|
28
|
+
|
|
29
|
+
All client code imports shims from `@snagsolutions/sdk/_shims/index`, which:
|
|
30
|
+
|
|
31
|
+
- checks if shims have been set manually
|
|
32
|
+
- if not, calls `setShims` with the shims from `@snagsolutions/sdk/_shims/auto/runtime`
|
|
33
|
+
- re-exports the installed shims from `@snagsolutions/sdk/_shims/registry`.
|
|
34
|
+
|
|
35
|
+
`@snagsolutions/sdk/_shims/auto/runtime` exports web runtime shims.
|
|
36
|
+
If the `node` export condition is set, the export map replaces it with `@snagsolutions/sdk/_shims/auto/runtime-node`.
|
|
37
|
+
|
|
38
|
+
### How it works - Type time
|
|
39
|
+
|
|
40
|
+
All client code imports shim types from `@snagsolutions/sdk/_shims/index`, which selects the manual types from `@snagsolutions/sdk/_shims/manual-types` if they have been declared, otherwise it exports the auto types from `@snagsolutions/sdk/_shims/auto/types`.
|
|
41
|
+
|
|
42
|
+
`@snagsolutions/sdk/_shims/manual-types` exports an empty namespace.
|
|
43
|
+
Manually importing `@snagsolutions/sdk/shims/node` or `@snagsolutions/sdk/shims/web` merges declarations into this empty namespace, so they get picked up by `@snagsolutions/sdk/_shims/index`.
|
|
44
|
+
|
|
45
|
+
`@snagsolutions/sdk/_shims/auto/types` exports web type definitions.
|
|
46
|
+
If the `node` export condition is set, the export map replaces it with `@snagsolutions/sdk/_shims/auto/types-node`, though TS only picks this up if `"moduleResolution": "nodenext"` or `"moduleResolution": "bundler"`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-bun.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/runtime-bun.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/**
|
|
18
|
+
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
19
|
+
*/
|
|
20
|
+
__exportStar(require("../bun-runtime.js"), exports);
|
|
21
|
+
//# sourceMappingURL=runtime-bun.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-bun.js","sourceRoot":"","sources":["../../src/_shims/auto/runtime-bun.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,oDAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-bun.mjs","sourceRoot":"","sources":["../../src/_shims/auto/runtime-bun.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-node.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/runtime-node.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/**
|
|
18
|
+
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
19
|
+
*/
|
|
20
|
+
__exportStar(require("../node-runtime.js"), exports);
|
|
21
|
+
//# sourceMappingURL=runtime-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-node.js","sourceRoot":"","sources":["../../src/_shims/auto/runtime-node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,qDAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-node.mjs","sourceRoot":"","sources":["../../src/_shims/auto/runtime-node.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/**
|
|
18
|
+
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
19
|
+
*/
|
|
20
|
+
__exportStar(require("../web-runtime.js"), exports);
|
|
21
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/_shims/auto/runtime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,oDAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.mjs","sourceRoot":"","sources":["../../src/_shims/auto/runtime.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-node.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/types-node.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/**
|
|
18
|
+
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
19
|
+
*/
|
|
20
|
+
__exportStar(require("../node-types.js"), exports);
|
|
21
|
+
//# sourceMappingURL=types-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-node.js","sourceRoot":"","sources":["../../src/_shims/auto/types-node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,mDAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-node.mjs","sourceRoot":"","sources":["../../src/_shims/auto/types-node.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
|
+
*/
|
|
4
|
+
export type Agent = any;
|
|
5
|
+
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
declare const _fetch: unknown extends typeof fetch ? never : typeof fetch;
|
|
8
|
+
export { _fetch as fetch };
|
|
9
|
+
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
type _Request = unknown extends Request ? never : Request;
|
|
12
|
+
export { _Request as Request };
|
|
13
|
+
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
type _RequestInfo = unknown extends RequestInfo ? never : RequestInfo;
|
|
16
|
+
export { type _RequestInfo as RequestInfo };
|
|
17
|
+
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
type _RequestInit = unknown extends RequestInit ? never : RequestInit;
|
|
20
|
+
export { type _RequestInit as RequestInit };
|
|
21
|
+
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
type _Response = unknown extends Response ? never : Response;
|
|
24
|
+
export { _Response as Response };
|
|
25
|
+
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
type _ResponseInit = unknown extends ResponseInit ? never : ResponseInit;
|
|
28
|
+
export { type _ResponseInit as ResponseInit };
|
|
29
|
+
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
type _ResponseType = unknown extends ResponseType ? never : ResponseType;
|
|
32
|
+
export { type _ResponseType as ResponseType };
|
|
33
|
+
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
type _BodyInit = unknown extends BodyInit ? never : BodyInit;
|
|
36
|
+
export { type _BodyInit as BodyInit };
|
|
37
|
+
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
type _Headers = unknown extends Headers ? never : Headers;
|
|
40
|
+
export { _Headers as Headers };
|
|
41
|
+
|
|
42
|
+
// @ts-ignore
|
|
43
|
+
type _HeadersInit = unknown extends HeadersInit ? never : HeadersInit;
|
|
44
|
+
export { type _HeadersInit as HeadersInit };
|
|
45
|
+
|
|
46
|
+
type EndingType = 'native' | 'transparent';
|
|
47
|
+
|
|
48
|
+
export interface BlobPropertyBag {
|
|
49
|
+
endings?: EndingType;
|
|
50
|
+
type?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface FilePropertyBag extends BlobPropertyBag {
|
|
54
|
+
lastModified?: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type FileFromPathOptions = Omit<FilePropertyBag, 'lastModified'>;
|
|
58
|
+
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
type _FormData = unknown extends FormData ? never : FormData;
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
declare const _FormData: unknown extends typeof FormData ? never : typeof FormData;
|
|
63
|
+
export { _FormData as FormData };
|
|
64
|
+
|
|
65
|
+
// @ts-ignore
|
|
66
|
+
type _File = unknown extends File ? never : File;
|
|
67
|
+
// @ts-ignore
|
|
68
|
+
declare const _File: unknown extends typeof File ? never : typeof File;
|
|
69
|
+
export { _File as File };
|
|
70
|
+
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
type _Blob = unknown extends Blob ? never : Blob;
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
declare const _Blob: unknown extends typeof Blob ? never : typeof Blob;
|
|
75
|
+
export { _Blob as Blob };
|
|
76
|
+
|
|
77
|
+
export declare class Readable {
|
|
78
|
+
readable: boolean;
|
|
79
|
+
readonly readableEnded: boolean;
|
|
80
|
+
readonly readableFlowing: boolean | null;
|
|
81
|
+
readonly readableHighWaterMark: number;
|
|
82
|
+
readonly readableLength: number;
|
|
83
|
+
readonly readableObjectMode: boolean;
|
|
84
|
+
destroyed: boolean;
|
|
85
|
+
read(size?: number): any;
|
|
86
|
+
pause(): this;
|
|
87
|
+
resume(): this;
|
|
88
|
+
isPaused(): boolean;
|
|
89
|
+
destroy(error?: Error): this;
|
|
90
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<any>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export declare class FsReadStream extends Readable {
|
|
94
|
+
path: {}; // node type is string | Buffer
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// @ts-ignore
|
|
98
|
+
type _ReadableStream<R = any> = unknown extends ReadableStream<R> ? never : ReadableStream<R>;
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
declare const _ReadableStream: unknown extends typeof ReadableStream ? never : typeof ReadableStream;
|
|
101
|
+
export { _ReadableStream as ReadableStream };
|