@spyglasshq/sdk 0.1.10 → 0.1.11

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.
Files changed (261) hide show
  1. package/README.md +30 -14
  2. package/dist/cjs/BaseClient.d.ts +4 -4
  3. package/dist/cjs/BaseClient.js +7 -7
  4. package/dist/cjs/Client.d.ts +5 -5
  5. package/dist/cjs/Client.js +38 -56
  6. package/dist/cjs/api/client/index.d.ts +1 -1
  7. package/dist/cjs/api/client/requests/SearchBrandsRequest.js +6 -6
  8. package/dist/cjs/api/client/requests/SearchCreatorsRequest.js +174 -174
  9. package/dist/cjs/api/client/requests/SearchMediaRequest.d.ts +4 -0
  10. package/dist/cjs/api/client/requests/SearchMediaRequest.js +227 -223
  11. package/dist/cjs/api/client/requests/index.d.ts +5 -5
  12. package/dist/cjs/api/errors/BadRequestError.d.ts +3 -3
  13. package/dist/cjs/api/errors/BadRequestError.js +2 -2
  14. package/dist/cjs/api/errors/ContentTooLargeError.d.ts +3 -3
  15. package/dist/cjs/api/errors/ContentTooLargeError.js +2 -2
  16. package/dist/cjs/api/errors/ForbiddenError.d.ts +3 -3
  17. package/dist/cjs/api/errors/ForbiddenError.js +2 -2
  18. package/dist/cjs/api/errors/InternalServerError.d.ts +3 -3
  19. package/dist/cjs/api/errors/InternalServerError.js +2 -2
  20. package/dist/cjs/api/errors/MethodNotAllowedError.d.ts +3 -3
  21. package/dist/cjs/api/errors/MethodNotAllowedError.js +2 -2
  22. package/dist/cjs/api/errors/NotFoundError.d.ts +3 -3
  23. package/dist/cjs/api/errors/NotFoundError.js +2 -2
  24. package/dist/cjs/api/errors/PaymentRequiredError.d.ts +3 -3
  25. package/dist/cjs/api/errors/PaymentRequiredError.js +2 -2
  26. package/dist/cjs/api/errors/TooManyRequestsError.d.ts +3 -3
  27. package/dist/cjs/api/errors/TooManyRequestsError.js +2 -2
  28. package/dist/cjs/api/errors/UnauthorizedError.d.ts +3 -3
  29. package/dist/cjs/api/errors/UnauthorizedError.js +2 -2
  30. package/dist/cjs/api/errors/index.d.ts +9 -9
  31. package/dist/cjs/api/index.d.ts +4 -4
  32. package/dist/cjs/api/resources/account/client/Client.d.ts +4 -4
  33. package/dist/cjs/api/resources/account/client/Client.js +31 -52
  34. package/dist/cjs/api/resources/account/client/index.d.ts +1 -1
  35. package/dist/cjs/api/resources/account/client/requests/CampaignsAccountRequest.d.ts +1 -1
  36. package/dist/cjs/api/resources/account/client/requests/InsightsAccountRequest.d.ts +1 -1
  37. package/dist/cjs/api/resources/account/client/requests/LandingPagesAccountRequest.d.ts +1 -1
  38. package/dist/cjs/api/resources/account/client/requests/index.d.ts +7 -7
  39. package/dist/cjs/api/resources/account/exports.d.ts +2 -2
  40. package/dist/cjs/api/resources/account/index.d.ts +2 -2
  41. package/dist/cjs/api/resources/account/types/CampaignsAccountRequestDatePreset.js +14 -14
  42. package/dist/cjs/api/resources/account/types/CampaignsAccountRequestSortBy.js +2 -2
  43. package/dist/cjs/api/resources/account/types/CampaignsAccountRequestType.js +2 -2
  44. package/dist/cjs/api/resources/account/types/GetAccountResponse.d.ts +3 -3
  45. package/dist/cjs/api/resources/account/types/IndexAccountResponse.js +2 -2
  46. package/dist/cjs/api/resources/account/types/IndexStatusAccountResponse.js +2 -2
  47. package/dist/cjs/api/resources/account/types/InsightsAccountRequestType.js +4 -4
  48. package/dist/cjs/api/resources/account/types/InsightsAccountResponse.d.ts +2 -2
  49. package/dist/cjs/api/resources/account/types/LandingPagesAccountRequestShowInactive.js +2 -2
  50. package/dist/cjs/api/resources/account/types/index.d.ts +12 -12
  51. package/dist/cjs/api/resources/index.d.ts +3 -3
  52. package/dist/cjs/api/types/Error_.js +11 -11
  53. package/dist/cjs/api/types/SearchBrandsResponse.js +1 -1
  54. package/dist/cjs/api/types/SearchCreatorsResponse.js +1 -1
  55. package/dist/cjs/api/types/SearchMediaResponse.js +26 -26
  56. package/dist/cjs/api/types/index.d.ts +7 -7
  57. package/dist/cjs/auth/BearerAuthProvider.d.ts +1 -1
  58. package/dist/cjs/auth/BearerAuthProvider.js +2 -2
  59. package/dist/cjs/auth/index.d.ts +1 -1
  60. package/dist/cjs/core/auth/AuthProvider.d.ts +2 -2
  61. package/dist/cjs/core/auth/AuthProvider.js +3 -3
  62. package/dist/cjs/core/auth/BasicAuth.js +7 -7
  63. package/dist/cjs/core/auth/BearerToken.js +1 -1
  64. package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +2 -2
  65. package/dist/cjs/core/auth/index.d.ts +5 -5
  66. package/dist/cjs/core/base64.js +4 -4
  67. package/dist/cjs/core/exports.d.ts +1 -1
  68. package/dist/cjs/core/fetcher/APIResponse.d.ts +1 -1
  69. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +4 -4
  70. package/dist/cjs/core/fetcher/BinaryResponse.js +1 -1
  71. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
  72. package/dist/cjs/core/fetcher/EndpointSupplier.js +1 -1
  73. package/dist/cjs/core/fetcher/Fetcher.d.ts +11 -11
  74. package/dist/cjs/core/fetcher/Fetcher.js +50 -56
  75. package/dist/cjs/core/fetcher/Headers.js +10 -10
  76. package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +2 -2
  77. package/dist/cjs/core/fetcher/RawResponse.d.ts +1 -1
  78. package/dist/cjs/core/fetcher/RawResponse.js +6 -6
  79. package/dist/cjs/core/fetcher/Supplier.js +1 -1
  80. package/dist/cjs/core/fetcher/createRequestUrl.js +1 -1
  81. package/dist/cjs/core/fetcher/getErrorResponseBody.js +11 -11
  82. package/dist/cjs/core/fetcher/getRequestBody.d.ts +2 -2
  83. package/dist/cjs/core/fetcher/getRequestBody.js +4 -4
  84. package/dist/cjs/core/fetcher/getResponseBody.d.ts +2 -2
  85. package/dist/cjs/core/fetcher/getResponseBody.js +11 -11
  86. package/dist/cjs/core/fetcher/index.d.ts +13 -13
  87. package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +2 -2
  88. package/dist/cjs/core/fetcher/makePassthroughRequest.js +7 -7
  89. package/dist/cjs/core/fetcher/makeRequest.js +3 -3
  90. package/dist/cjs/core/fetcher/redactUrl.js +36 -36
  91. package/dist/cjs/core/fetcher/requestWithRetries.js +4 -4
  92. package/dist/cjs/core/fetcher/signals.js +2 -2
  93. package/dist/cjs/core/index.d.ts +6 -6
  94. package/dist/cjs/core/logging/exports.d.ts +1 -1
  95. package/dist/cjs/core/logging/index.d.ts +1 -1
  96. package/dist/cjs/core/logging/logger.js +4 -4
  97. package/dist/cjs/core/requestBody.js +1 -1
  98. package/dist/cjs/core/runtime/index.d.ts +1 -1
  99. package/dist/cjs/core/runtime/runtime.d.ts +1 -1
  100. package/dist/cjs/core/runtime/runtime.js +35 -37
  101. package/dist/cjs/core/url/QueryStringBuilder.d.ts +1 -1
  102. package/dist/cjs/core/url/QueryStringBuilder.js +3 -3
  103. package/dist/cjs/core/url/encodePathParam.js +8 -10
  104. package/dist/cjs/core/url/index.d.ts +4 -4
  105. package/dist/cjs/core/url/join.js +11 -11
  106. package/dist/cjs/core/url/qs.d.ts +1 -1
  107. package/dist/cjs/core/url/qs.js +14 -14
  108. package/dist/cjs/environments.js +1 -1
  109. package/dist/cjs/errors/SpyglassError.d.ts +1 -1
  110. package/dist/cjs/errors/SpyglassError.js +3 -3
  111. package/dist/cjs/errors/SpyglassTimeoutError.d.ts +1 -1
  112. package/dist/cjs/errors/SpyglassTimeoutError.js +1 -1
  113. package/dist/cjs/errors/handleNonStatusCodeError.d.ts +1 -1
  114. package/dist/cjs/errors/handleNonStatusCodeError.js +5 -5
  115. package/dist/cjs/errors/index.d.ts +2 -2
  116. package/dist/cjs/exports.d.ts +1 -1
  117. package/dist/cjs/index.d.ts +6 -6
  118. package/dist/cjs/version.d.ts +1 -1
  119. package/dist/cjs/version.js +1 -1
  120. package/dist/esm/BaseClient.d.mts +4 -4
  121. package/dist/esm/BaseClient.mjs +10 -10
  122. package/dist/esm/Client.d.mts +5 -5
  123. package/dist/esm/Client.mjs +47 -65
  124. package/dist/esm/api/client/index.d.mts +1 -1
  125. package/dist/esm/api/client/index.mjs +1 -1
  126. package/dist/esm/api/client/requests/SearchBrandsRequest.mjs +6 -6
  127. package/dist/esm/api/client/requests/SearchCreatorsRequest.mjs +174 -174
  128. package/dist/esm/api/client/requests/SearchMediaRequest.d.mts +4 -0
  129. package/dist/esm/api/client/requests/SearchMediaRequest.mjs +227 -223
  130. package/dist/esm/api/client/requests/index.d.mts +5 -5
  131. package/dist/esm/api/client/requests/index.mjs +3 -3
  132. package/dist/esm/api/errors/BadRequestError.d.mts +3 -3
  133. package/dist/esm/api/errors/BadRequestError.mjs +3 -3
  134. package/dist/esm/api/errors/ContentTooLargeError.d.mts +3 -3
  135. package/dist/esm/api/errors/ContentTooLargeError.mjs +3 -3
  136. package/dist/esm/api/errors/ForbiddenError.d.mts +3 -3
  137. package/dist/esm/api/errors/ForbiddenError.mjs +3 -3
  138. package/dist/esm/api/errors/InternalServerError.d.mts +3 -3
  139. package/dist/esm/api/errors/InternalServerError.mjs +3 -3
  140. package/dist/esm/api/errors/MethodNotAllowedError.d.mts +3 -3
  141. package/dist/esm/api/errors/MethodNotAllowedError.mjs +3 -3
  142. package/dist/esm/api/errors/NotFoundError.d.mts +3 -3
  143. package/dist/esm/api/errors/NotFoundError.mjs +3 -3
  144. package/dist/esm/api/errors/PaymentRequiredError.d.mts +3 -3
  145. package/dist/esm/api/errors/PaymentRequiredError.mjs +3 -3
  146. package/dist/esm/api/errors/TooManyRequestsError.d.mts +3 -3
  147. package/dist/esm/api/errors/TooManyRequestsError.mjs +3 -3
  148. package/dist/esm/api/errors/UnauthorizedError.d.mts +3 -3
  149. package/dist/esm/api/errors/UnauthorizedError.mjs +3 -3
  150. package/dist/esm/api/errors/index.d.mts +9 -9
  151. package/dist/esm/api/errors/index.mjs +9 -9
  152. package/dist/esm/api/index.d.mts +4 -4
  153. package/dist/esm/api/index.mjs +4 -4
  154. package/dist/esm/api/resources/account/client/Client.d.mts +4 -4
  155. package/dist/esm/api/resources/account/client/Client.mjs +39 -60
  156. package/dist/esm/api/resources/account/client/index.d.mts +1 -1
  157. package/dist/esm/api/resources/account/client/index.mjs +1 -1
  158. package/dist/esm/api/resources/account/client/requests/CampaignsAccountRequest.d.mts +1 -1
  159. package/dist/esm/api/resources/account/client/requests/InsightsAccountRequest.d.mts +1 -1
  160. package/dist/esm/api/resources/account/client/requests/LandingPagesAccountRequest.d.mts +1 -1
  161. package/dist/esm/api/resources/account/client/requests/index.d.mts +7 -7
  162. package/dist/esm/api/resources/account/exports.d.mts +2 -2
  163. package/dist/esm/api/resources/account/exports.mjs +2 -2
  164. package/dist/esm/api/resources/account/index.d.mts +2 -2
  165. package/dist/esm/api/resources/account/index.mjs +2 -2
  166. package/dist/esm/api/resources/account/types/CampaignsAccountRequestDatePreset.mjs +14 -14
  167. package/dist/esm/api/resources/account/types/CampaignsAccountRequestSortBy.mjs +2 -2
  168. package/dist/esm/api/resources/account/types/CampaignsAccountRequestType.mjs +2 -2
  169. package/dist/esm/api/resources/account/types/GetAccountResponse.d.mts +3 -3
  170. package/dist/esm/api/resources/account/types/IndexAccountResponse.mjs +2 -2
  171. package/dist/esm/api/resources/account/types/IndexStatusAccountResponse.mjs +2 -2
  172. package/dist/esm/api/resources/account/types/InsightsAccountRequestType.mjs +4 -4
  173. package/dist/esm/api/resources/account/types/InsightsAccountResponse.d.mts +2 -2
  174. package/dist/esm/api/resources/account/types/LandingPagesAccountRequestShowInactive.mjs +2 -2
  175. package/dist/esm/api/resources/account/types/index.d.mts +12 -12
  176. package/dist/esm/api/resources/account/types/index.mjs +12 -12
  177. package/dist/esm/api/resources/index.d.mts +3 -3
  178. package/dist/esm/api/resources/index.mjs +3 -3
  179. package/dist/esm/api/types/Error_.mjs +11 -11
  180. package/dist/esm/api/types/SearchBrandsResponse.mjs +1 -1
  181. package/dist/esm/api/types/SearchCreatorsResponse.mjs +1 -1
  182. package/dist/esm/api/types/SearchMediaResponse.mjs +26 -26
  183. package/dist/esm/api/types/index.d.mts +7 -7
  184. package/dist/esm/api/types/index.mjs +7 -7
  185. package/dist/esm/auth/BearerAuthProvider.d.mts +1 -1
  186. package/dist/esm/auth/BearerAuthProvider.mjs +4 -4
  187. package/dist/esm/auth/index.d.mts +1 -1
  188. package/dist/esm/auth/index.mjs +1 -1
  189. package/dist/esm/core/auth/AuthProvider.d.mts +2 -2
  190. package/dist/esm/core/auth/AuthProvider.mjs +3 -3
  191. package/dist/esm/core/auth/BasicAuth.mjs +8 -8
  192. package/dist/esm/core/auth/BearerToken.mjs +1 -1
  193. package/dist/esm/core/auth/NoOpAuthProvider.d.mts +2 -2
  194. package/dist/esm/core/auth/index.d.mts +5 -5
  195. package/dist/esm/core/auth/index.mjs +4 -4
  196. package/dist/esm/core/base64.mjs +4 -4
  197. package/dist/esm/core/exports.d.mts +1 -1
  198. package/dist/esm/core/exports.mjs +1 -1
  199. package/dist/esm/core/fetcher/APIResponse.d.mts +1 -1
  200. package/dist/esm/core/fetcher/BinaryResponse.d.mts +4 -4
  201. package/dist/esm/core/fetcher/BinaryResponse.mjs +1 -1
  202. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
  203. package/dist/esm/core/fetcher/EndpointSupplier.mjs +1 -1
  204. package/dist/esm/core/fetcher/Fetcher.d.mts +11 -11
  205. package/dist/esm/core/fetcher/Fetcher.mjs +64 -70
  206. package/dist/esm/core/fetcher/Headers.mjs +10 -10
  207. package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +2 -2
  208. package/dist/esm/core/fetcher/RawResponse.d.mts +1 -1
  209. package/dist/esm/core/fetcher/RawResponse.mjs +7 -7
  210. package/dist/esm/core/fetcher/Supplier.mjs +1 -1
  211. package/dist/esm/core/fetcher/createRequestUrl.mjs +2 -2
  212. package/dist/esm/core/fetcher/getErrorResponseBody.mjs +13 -13
  213. package/dist/esm/core/fetcher/getRequestBody.d.mts +2 -2
  214. package/dist/esm/core/fetcher/getRequestBody.mjs +6 -6
  215. package/dist/esm/core/fetcher/getResponseBody.d.mts +2 -2
  216. package/dist/esm/core/fetcher/getResponseBody.mjs +13 -13
  217. package/dist/esm/core/fetcher/index.d.mts +13 -13
  218. package/dist/esm/core/fetcher/index.mjs +7 -7
  219. package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +2 -2
  220. package/dist/esm/core/fetcher/makePassthroughRequest.mjs +16 -16
  221. package/dist/esm/core/fetcher/makeRequest.mjs +4 -4
  222. package/dist/esm/core/fetcher/redactUrl.mjs +36 -36
  223. package/dist/esm/core/fetcher/requestWithRetries.mjs +4 -4
  224. package/dist/esm/core/fetcher/signals.mjs +2 -2
  225. package/dist/esm/core/index.d.mts +6 -6
  226. package/dist/esm/core/index.mjs +6 -6
  227. package/dist/esm/core/logging/exports.d.mts +1 -1
  228. package/dist/esm/core/logging/exports.mjs +1 -1
  229. package/dist/esm/core/logging/index.d.mts +1 -1
  230. package/dist/esm/core/logging/index.mjs +1 -1
  231. package/dist/esm/core/logging/logger.mjs +4 -4
  232. package/dist/esm/core/requestBody.mjs +1 -1
  233. package/dist/esm/core/runtime/index.d.mts +1 -1
  234. package/dist/esm/core/runtime/index.mjs +1 -1
  235. package/dist/esm/core/runtime/runtime.d.mts +1 -1
  236. package/dist/esm/core/runtime/runtime.mjs +35 -37
  237. package/dist/esm/core/url/QueryStringBuilder.d.mts +1 -1
  238. package/dist/esm/core/url/QueryStringBuilder.mjs +4 -4
  239. package/dist/esm/core/url/encodePathParam.mjs +8 -10
  240. package/dist/esm/core/url/index.d.mts +4 -4
  241. package/dist/esm/core/url/index.mjs +4 -4
  242. package/dist/esm/core/url/join.mjs +11 -11
  243. package/dist/esm/core/url/qs.d.mts +1 -1
  244. package/dist/esm/core/url/qs.mjs +14 -14
  245. package/dist/esm/environments.mjs +1 -1
  246. package/dist/esm/errors/SpyglassError.d.mts +1 -1
  247. package/dist/esm/errors/SpyglassError.mjs +4 -4
  248. package/dist/esm/errors/SpyglassTimeoutError.d.mts +1 -1
  249. package/dist/esm/errors/SpyglassTimeoutError.mjs +2 -2
  250. package/dist/esm/errors/handleNonStatusCodeError.d.mts +1 -1
  251. package/dist/esm/errors/handleNonStatusCodeError.mjs +6 -6
  252. package/dist/esm/errors/index.d.mts +2 -2
  253. package/dist/esm/errors/index.mjs +2 -2
  254. package/dist/esm/exports.d.mts +1 -1
  255. package/dist/esm/exports.mjs +1 -1
  256. package/dist/esm/index.d.mts +6 -6
  257. package/dist/esm/index.mjs +5 -5
  258. package/dist/esm/version.d.mts +1 -1
  259. package/dist/esm/version.mjs +1 -1
  260. package/package.json +91 -91
  261. package/reference.md +97 -98
@@ -25,7 +25,7 @@ function isCacheNoStoreSupported() {
25
25
  return _cacheNoStoreSupported;
26
26
  }
27
27
  try {
28
- new Request('http://localhost', { cache: 'no-store' });
28
+ new Request("http://localhost", { cache: "no-store" });
29
29
  _cacheNoStoreSupported = true;
30
30
  }
31
31
  catch (_a) {
@@ -67,9 +67,9 @@ const makeRequest = (fetchFn, url, method, headers, requestBody, timeoutMs, abor
67
67
  const newSignals = (0, signals_js_1.anySignal)(signals);
68
68
  let response;
69
69
  try {
70
- response = yield fetchFn(url, Object.assign({ method: method, headers, body: requestBody, signal: newSignals, credentials: withCredentials ? 'include' : undefined,
70
+ response = yield fetchFn(url, Object.assign({ method: method, headers, body: requestBody, signal: newSignals, credentials: withCredentials ? "include" : undefined,
71
71
  // @ts-ignore
72
- duplex }, (disableCache && isCacheNoStoreSupported() ? { cache: 'no-store' } : {})));
72
+ duplex }, (disableCache && isCacheNoStoreSupported() ? { cache: "no-store" } : {})));
73
73
  }
74
74
  catch (error) {
75
75
  if (timeoutAbortId != null) {
@@ -3,39 +3,39 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SENSITIVE_QUERY_PARAMS = void 0;
4
4
  exports.redactUrl = redactUrl;
5
5
  exports.SENSITIVE_QUERY_PARAMS = new Set([
6
- 'api_key',
7
- 'api-key',
8
- 'apikey',
9
- 'token',
10
- 'access_token',
11
- 'access-token',
12
- 'auth_token',
13
- 'auth-token',
14
- 'password',
15
- 'passwd',
16
- 'secret',
17
- 'api_secret',
18
- 'api-secret',
19
- 'apisecret',
20
- 'key',
21
- 'session',
22
- 'session_id',
23
- 'session-id',
6
+ "api_key",
7
+ "api-key",
8
+ "apikey",
9
+ "token",
10
+ "access_token",
11
+ "access-token",
12
+ "auth_token",
13
+ "auth-token",
14
+ "password",
15
+ "passwd",
16
+ "secret",
17
+ "api_secret",
18
+ "api-secret",
19
+ "apisecret",
20
+ "key",
21
+ "session",
22
+ "session_id",
23
+ "session-id",
24
24
  ]);
25
25
  function redactUrl(url) {
26
- const protocolIndex = url.indexOf('://');
26
+ const protocolIndex = url.indexOf("://");
27
27
  if (protocolIndex === -1)
28
28
  return url;
29
29
  const afterProtocol = protocolIndex + 3;
30
30
  // Find the first delimiter that marks the end of the authority section
31
- const pathStart = url.indexOf('/', afterProtocol);
32
- let queryStart = url.indexOf('?', afterProtocol);
33
- let fragmentStart = url.indexOf('#', afterProtocol);
31
+ const pathStart = url.indexOf("/", afterProtocol);
32
+ let queryStart = url.indexOf("?", afterProtocol);
33
+ let fragmentStart = url.indexOf("#", afterProtocol);
34
34
  const firstDelimiter = Math.min(pathStart === -1 ? url.length : pathStart, queryStart === -1 ? url.length : queryStart, fragmentStart === -1 ? url.length : fragmentStart);
35
35
  // Find the LAST @ before the delimiter (handles multiple @ in credentials)
36
36
  let atIndex = -1;
37
37
  for (let i = afterProtocol; i < firstDelimiter; i++) {
38
- if (url[i] === '@') {
38
+ if (url[i] === "@") {
39
39
  atIndex = i;
40
40
  }
41
41
  }
@@ -43,10 +43,10 @@ function redactUrl(url) {
43
43
  url = `${url.slice(0, afterProtocol)}[REDACTED]@${url.slice(atIndex + 1)}`;
44
44
  }
45
45
  // Recalculate queryStart since url might have changed
46
- queryStart = url.indexOf('?');
46
+ queryStart = url.indexOf("?");
47
47
  if (queryStart === -1)
48
48
  return url;
49
- fragmentStart = url.indexOf('#', queryStart);
49
+ fragmentStart = url.indexOf("#", queryStart);
50
50
  const queryEnd = fragmentStart !== -1 ? fragmentStart : url.length;
51
51
  const queryString = url.slice(queryStart + 1, queryEnd);
52
52
  if (queryString.length === 0)
@@ -54,28 +54,28 @@ function redactUrl(url) {
54
54
  // FAST PATH: Quick check if any sensitive keywords present
55
55
  // Using indexOf is faster than regex for simple substring matching
56
56
  const lower = queryString.toLowerCase();
57
- const hasSensitive = lower.includes('token') ||
58
- lower.includes('key') ||
59
- lower.includes('password') ||
60
- lower.includes('passwd') ||
61
- lower.includes('secret') ||
62
- lower.includes('session') ||
63
- lower.includes('auth');
57
+ const hasSensitive = lower.includes("token") ||
58
+ lower.includes("key") ||
59
+ lower.includes("password") ||
60
+ lower.includes("passwd") ||
61
+ lower.includes("secret") ||
62
+ lower.includes("session") ||
63
+ lower.includes("auth");
64
64
  if (!hasSensitive) {
65
65
  return url;
66
66
  }
67
67
  // SLOW PATH: Parse and redact
68
68
  const redactedParams = [];
69
- const params = queryString.split('&');
69
+ const params = queryString.split("&");
70
70
  for (const param of params) {
71
- const equalIndex = param.indexOf('=');
71
+ const equalIndex = param.indexOf("=");
72
72
  if (equalIndex === -1) {
73
73
  redactedParams.push(param);
74
74
  continue;
75
75
  }
76
76
  const key = param.slice(0, equalIndex);
77
77
  let shouldRedact = exports.SENSITIVE_QUERY_PARAMS.has(key.toLowerCase());
78
- if (!shouldRedact && key.includes('%')) {
78
+ if (!shouldRedact && key.includes("%")) {
79
79
  try {
80
80
  const decodedKey = decodeURIComponent(key);
81
81
  shouldRedact = exports.SENSITIVE_QUERY_PARAMS.has(decodedKey.toLowerCase());
@@ -84,5 +84,5 @@ function redactUrl(url) {
84
84
  }
85
85
  redactedParams.push(shouldRedact ? `${key}=[REDACTED]` : param);
86
86
  }
87
- return url.slice(0, queryStart + 1) + redactedParams.join('&') + url.slice(queryEnd);
87
+ return url.slice(0, queryStart + 1) + redactedParams.join("&") + url.slice(queryEnd);
88
88
  }
@@ -26,7 +26,7 @@ function addSymmetricJitter(delay) {
26
26
  return delay * jitterMultiplier;
27
27
  }
28
28
  function getRetryDelayFromHeaders(response, retryAttempt) {
29
- const retryAfter = response.headers.get('Retry-After');
29
+ const retryAfter = response.headers.get("Retry-After");
30
30
  if (retryAfter) {
31
31
  const retryAfterSeconds = parseInt(retryAfter, 10);
32
32
  if (!Number.isNaN(retryAfterSeconds) && retryAfterSeconds > 0) {
@@ -40,7 +40,7 @@ function getRetryDelayFromHeaders(response, retryAttempt) {
40
40
  }
41
41
  }
42
42
  }
43
- const rateLimitReset = response.headers.get('X-RateLimit-Reset');
43
+ const rateLimitReset = response.headers.get("X-RateLimit-Reset");
44
44
  if (rateLimitReset) {
45
45
  const resetTime = parseInt(rateLimitReset, 10);
46
46
  if (!Number.isNaN(resetTime)) {
@@ -67,10 +67,10 @@ function sleep(ms, abortSignal) {
67
67
  reject(abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.reason);
68
68
  };
69
69
  const timeoutId = setTimeout(() => {
70
- abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener('abort', onAbort);
70
+ abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort);
71
71
  resolve();
72
72
  }, ms);
73
- abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener('abort', onAbort, { once: true });
73
+ abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort, { once: true });
74
74
  });
75
75
  }
76
76
  function requestWithRetries(requestFn_1) {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TIMEOUT = void 0;
4
4
  exports.getTimeoutSignal = getTimeoutSignal;
5
5
  exports.anySignal = anySignal;
6
- exports.TIMEOUT = 'timeout';
6
+ exports.TIMEOUT = "timeout";
7
7
  function getTimeoutSignal(timeoutMs) {
8
8
  const controller = new AbortController();
9
9
  const abortId = setTimeout(() => controller.abort(exports.TIMEOUT), timeoutMs);
@@ -17,7 +17,7 @@ function anySignal(...args) {
17
17
  controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason);
18
18
  return controller.signal;
19
19
  }
20
- signal.addEventListener('abort', () => controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason), {
20
+ signal.addEventListener("abort", () => controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason), {
21
21
  signal: controller.signal,
22
22
  });
23
23
  // Re-check after adding listener: the signal may have aborted
@@ -1,6 +1,6 @@
1
- export * from './auth/index.js';
2
- export * from './base64.js';
3
- export * from './fetcher/index.js';
4
- export * as logging from './logging/index.js';
5
- export * from './runtime/index.js';
6
- export * as url from './url/index.js';
1
+ export * from "./auth/index.js";
2
+ export * from "./base64.js";
3
+ export * from "./fetcher/index.js";
4
+ export * as logging from "./logging/index.js";
5
+ export * from "./runtime/index.js";
6
+ export * as url from "./url/index.js";
@@ -1,4 +1,4 @@
1
- import * as logger from './logger.js';
1
+ import * as logger from "./logger.js";
2
2
  export declare namespace logging {
3
3
  /**
4
4
  * Configuration for logger instances.
@@ -1 +1 @@
1
- export * from './logger.js';
1
+ export * from "./logger.js";
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Logger = exports.ConsoleLogger = exports.LogLevel = void 0;
4
4
  exports.createLogger = createLogger;
5
5
  exports.LogLevel = {
6
- Debug: 'debug',
7
- Info: 'info',
8
- Warn: 'warn',
9
- Error: 'error',
6
+ Debug: "debug",
7
+ Info: "info",
8
+ Warn: "warn",
9
+ Error: "error",
10
10
  };
11
11
  const logLevelMap = {
12
12
  [exports.LogLevel.Debug]: 1,
@@ -19,7 +19,7 @@ function mergeAdditionalBodyParameters(body, additionalBodyParameters) {
19
19
  if (body == null) {
20
20
  return Object.assign({}, additionalBodyParameters);
21
21
  }
22
- if (typeof body === 'object' && !Array.isArray(body)) {
22
+ if (typeof body === "object" && !Array.isArray(body)) {
23
23
  return Object.assign(Object.assign({}, body), additionalBodyParameters);
24
24
  }
25
25
  return body;
@@ -1 +1 @@
1
- export { getUserAgent, RUNTIME } from './runtime.js';
1
+ export { getUserAgent, RUNTIME } from "./runtime.js";
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export declare const RUNTIME: Runtime;
5
5
  export interface Runtime {
6
- type: 'browser' | 'web-worker' | 'deno' | 'bun' | 'node' | 'react-native' | 'unknown' | 'workerd' | 'edge-runtime';
6
+ type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd" | "edge-runtime";
7
7
  version?: string;
8
8
  parsedVersion?: number;
9
9
  /**
@@ -11,10 +11,10 @@ function evaluateRuntime() {
11
11
  /**
12
12
  * A constant that indicates whether the environment the code is running is a Web Browser.
13
13
  */
14
- const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
14
+ const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
15
15
  if (isBrowser) {
16
16
  return {
17
- type: 'browser',
17
+ type: "browser",
18
18
  version: window.navigator.userAgent,
19
19
  };
20
20
  }
@@ -22,45 +22,43 @@ function evaluateRuntime() {
22
22
  * A constant that indicates whether the environment the code is running is Cloudflare.
23
23
  * https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent
24
24
  */
25
- const isCloudflare = typeof globalThis !== 'undefined' && ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === 'Cloudflare-Workers';
25
+ const isCloudflare = typeof globalThis !== "undefined" && ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === "Cloudflare-Workers";
26
26
  if (isCloudflare) {
27
27
  return {
28
- type: 'workerd',
28
+ type: "workerd",
29
29
  };
30
30
  }
31
31
  /**
32
32
  * A constant that indicates whether the environment the code is running is Edge Runtime.
33
33
  * https://vercel.com/docs/functions/runtimes/edge-runtime#check-if-you're-running-on-the-edge-runtime
34
34
  */
35
- const isEdgeRuntime = typeof EdgeRuntime === 'string';
35
+ const isEdgeRuntime = typeof EdgeRuntime === "string";
36
36
  if (isEdgeRuntime) {
37
37
  return {
38
- type: 'edge-runtime',
38
+ type: "edge-runtime",
39
39
  };
40
40
  }
41
41
  /**
42
42
  * A constant that indicates whether the environment the code is running is a Web Worker.
43
43
  */
44
- const isWebWorker = typeof self === 'object' &&
45
- typeof (self === null || self === void 0 ? void 0 : self.importScripts) === 'function' &&
46
- (((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === 'DedicatedWorkerGlobalScope' ||
47
- ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === 'ServiceWorkerGlobalScope' ||
48
- ((_d = self.constructor) === null || _d === void 0 ? void 0 : _d.name) === 'SharedWorkerGlobalScope');
44
+ const isWebWorker = typeof self === "object" &&
45
+ typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" &&
46
+ (((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "DedicatedWorkerGlobalScope" ||
47
+ ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "ServiceWorkerGlobalScope" ||
48
+ ((_d = self.constructor) === null || _d === void 0 ? void 0 : _d.name) === "SharedWorkerGlobalScope");
49
49
  if (isWebWorker) {
50
50
  return {
51
- type: 'web-worker',
51
+ type: "web-worker",
52
52
  };
53
53
  }
54
54
  /**
55
55
  * A constant that indicates whether the environment the code is running is Deno.
56
56
  * FYI Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions
57
57
  */
58
- const isDeno = typeof Deno !== 'undefined' &&
59
- typeof Deno.version !== 'undefined' &&
60
- typeof Deno.version.deno !== 'undefined';
58
+ const isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined";
61
59
  if (isDeno) {
62
60
  return {
63
- type: 'deno',
61
+ type: "deno",
64
62
  version: Deno.version.deno,
65
63
  os: (_e = Deno.build) === null || _e === void 0 ? void 0 : _e.os,
66
64
  arch: (_f = Deno.build) === null || _f === void 0 ? void 0 : _f.arch,
@@ -69,13 +67,13 @@ function evaluateRuntime() {
69
67
  /**
70
68
  * A constant that indicates whether the environment the code is running is Bun.sh.
71
69
  */
72
- const isBun = typeof Bun !== 'undefined' && typeof Bun.version !== 'undefined';
70
+ const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined";
73
71
  if (isBun) {
74
72
  return {
75
- type: 'bun',
73
+ type: "bun",
76
74
  version: Bun.version,
77
- os: typeof process !== 'undefined' ? process.platform : undefined,
78
- arch: typeof process !== 'undefined' ? process.arch : undefined,
75
+ os: typeof process !== "undefined" ? process.platform : undefined,
76
+ arch: typeof process !== "undefined" ? process.arch : undefined,
79
77
  };
80
78
  }
81
79
  /**
@@ -83,10 +81,10 @@ function evaluateRuntime() {
83
81
  * This check should come before Node.js detection since React Native may have a process polyfill.
84
82
  * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
85
83
  */
86
- const isReactNative = typeof navigator !== 'undefined' && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === 'ReactNative';
84
+ const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
87
85
  if (isReactNative) {
88
86
  return {
89
- type: 'react-native',
87
+ type: "react-native",
90
88
  };
91
89
  }
92
90
  /**
@@ -96,19 +94,19 @@ function evaluateRuntime() {
96
94
  * bundlers that perform static analysis on `process.versions` (e.g. Next.js
97
95
  * Edge Runtime warns about Node.js APIs even when they are guarded).
98
96
  */
99
- const _process = typeof process !== 'undefined' ? process : undefined;
100
- const isNode = typeof _process !== 'undefined' && typeof ((_g = _process.versions) === null || _g === void 0 ? void 0 : _g.node) === 'string';
97
+ const _process = typeof process !== "undefined" ? process : undefined;
98
+ const isNode = typeof _process !== "undefined" && typeof ((_g = _process.versions) === null || _g === void 0 ? void 0 : _g.node) === "string";
101
99
  if (isNode) {
102
100
  return {
103
- type: 'node',
101
+ type: "node",
104
102
  version: _process.versions.node,
105
- parsedVersion: Number(_process.versions.node.split('.')[0]),
103
+ parsedVersion: Number(_process.versions.node.split(".")[0]),
106
104
  os: _process.platform,
107
105
  arch: _process.arch,
108
106
  };
109
107
  }
110
108
  return {
111
- type: 'unknown',
109
+ type: "unknown",
112
110
  };
113
111
  }
114
112
  /**
@@ -118,14 +116,14 @@ function evaluateRuntime() {
118
116
  * to `undefined` so they are omitted from the User-Agent.
119
117
  */
120
118
  const RUNTIME_DISPLAY_NAMES = {
121
- node: 'Node',
122
- deno: 'Deno',
123
- bun: 'Bun',
119
+ node: "Node",
120
+ deno: "Deno",
121
+ bun: "Bun",
124
122
  browser: undefined,
125
- 'web-worker': undefined,
126
- 'react-native': undefined,
123
+ "web-worker": undefined,
124
+ "react-native": undefined,
127
125
  workerd: undefined,
128
- 'edge-runtime': undefined,
126
+ "edge-runtime": undefined,
129
127
  unknown: undefined,
130
128
  };
131
129
  /**
@@ -134,7 +132,7 @@ const RUNTIME_DISPLAY_NAMES = {
134
132
  * consistent regardless of which runtime reports it (Node reports `x64`, others
135
133
  * report `amd64` or `x86_64`).
136
134
  */
137
- const X86_64_ARCH_ALIASES = new Set(['x64', 'amd64', 'x86_64']);
135
+ const X86_64_ARCH_ALIASES = new Set(["x64", "amd64", "x86_64"]);
138
136
  /**
139
137
  * Normalizes a CPU architecture token, collapsing the 64-bit x86 aliases
140
138
  * (`x64`, `amd64`, `x86_64`) to `x86_64`. Other architectures are returned
@@ -144,7 +142,7 @@ function normalizeArch(arch) {
144
142
  if (arch == null) {
145
143
  return arch;
146
144
  }
147
- return X86_64_ARCH_ALIASES.has(arch.toLowerCase()) ? 'x86_64' : arch;
145
+ return X86_64_ARCH_ALIASES.has(arch.toLowerCase()) ? "x86_64" : arch;
148
146
  }
149
147
  /**
150
148
  * Percent-encodes the `@` and `/` characters in an npm package name so the
@@ -153,7 +151,7 @@ function normalizeArch(arch) {
153
151
  * `@dummy/sdk` becomes `%40dummy%2Fsdk`).
154
152
  */
155
153
  function encodeProductName(sdkName) {
156
- return sdkName.replace(/@/g, '%40').replace(/\//g, '%2F');
154
+ return sdkName.replace(/@/g, "%40").replace(/\//g, "%2F");
157
155
  }
158
156
  /**
159
157
  * Builds a structured User-Agent string of the form
@@ -165,7 +163,7 @@ function getUserAgent(sdkName, sdkVersion) {
165
163
  let userAgent = `${encodeProductName(sdkName)}/${sdkVersion}`;
166
164
  const platform = [exports.RUNTIME.os, normalizeArch(exports.RUNTIME.arch)].filter((part) => part != null && part.length > 0);
167
165
  if (platform.length > 0) {
168
- userAgent += ` (${platform.join('; ')})`;
166
+ userAgent += ` (${platform.join("; ")})`;
169
167
  }
170
168
  const runtimeName = RUNTIME_DISPLAY_NAMES[exports.RUNTIME.type];
171
169
  if (runtimeName != null) {
@@ -25,7 +25,7 @@ declare class QueryStringBuilder {
25
25
  * Null / undefined values are silently skipped.
26
26
  */
27
27
  add(key: string, value: unknown, options?: {
28
- style?: 'comma';
28
+ style?: "comma";
29
29
  }): this;
30
30
  /**
31
31
  * Adds multiple query parameters at once from a record.
@@ -36,7 +36,7 @@ class QueryStringBuilder {
36
36
  if (value === undefined || value === null) {
37
37
  return this;
38
38
  }
39
- const serialized = (0, qs_js_1.toQueryString)({ [key]: value }, { arrayFormat: (options === null || options === void 0 ? void 0 : options.style) === 'comma' ? 'comma' : 'repeat' });
39
+ const serialized = (0, qs_js_1.toQueryString)({ [key]: value }, { arrayFormat: (options === null || options === void 0 ? void 0 : options.style) === "comma" ? "comma" : "repeat" });
40
40
  if (serialized.length > 0) {
41
41
  this.parts.set(key, serialized);
42
42
  }
@@ -65,7 +65,7 @@ class QueryStringBuilder {
65
65
  if (value === undefined || value === null) {
66
66
  continue;
67
67
  }
68
- const serialized = (0, qs_js_1.toQueryString)({ [key]: value }, { arrayFormat: 'repeat' });
68
+ const serialized = (0, qs_js_1.toQueryString)({ [key]: value }, { arrayFormat: "repeat" });
69
69
  if (serialized.length > 0) {
70
70
  this.parts.set(key, serialized);
71
71
  }
@@ -78,6 +78,6 @@ class QueryStringBuilder {
78
78
  * Returns an empty string when no parameters were added.
79
79
  */
80
80
  build() {
81
- return [...this.parts.values()].join('&');
81
+ return [...this.parts.values()].join("&");
82
82
  }
83
83
  }
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.encodePathParam = encodePathParam;
4
4
  function encodePathParam(param, InvalidPathParameterError) {
5
5
  if (param === null) {
6
- return 'null';
6
+ return "null";
7
7
  }
8
8
  const typeofParam = typeof param;
9
9
  switch (typeofParam) {
10
- case 'undefined':
11
- return 'undefined';
12
- case 'string':
13
- case 'number':
14
- case 'boolean':
10
+ case "undefined":
11
+ return "undefined";
12
+ case "string":
13
+ case "number":
14
+ case "boolean":
15
15
  break;
16
16
  default:
17
17
  param = String(param);
@@ -19,11 +19,9 @@ function encodePathParam(param, InvalidPathParameterError) {
19
19
  }
20
20
  const encoded = encodeURIComponent(param);
21
21
  // "." and ".." are dot segments: URL resolution would remove them and send the request to a different path.
22
- if (encoded === '.' || encoded === '..') {
22
+ if (encoded === "." || encoded === "..") {
23
23
  const message = `Invalid path parameter "${encoded}": "." and ".." are not allowed because they change the request path.`;
24
- throw InvalidPathParameterError != null
25
- ? new InvalidPathParameterError({ message })
26
- : new Error(message);
24
+ throw InvalidPathParameterError != null ? new InvalidPathParameterError({ message }) : new Error(message);
27
25
  }
28
26
  return encoded;
29
27
  }
@@ -1,4 +1,4 @@
1
- export { encodePathParam } from './encodePathParam.js';
2
- export { join } from './join.js';
3
- export { queryBuilder } from './QueryStringBuilder.js';
4
- export { toQueryString } from './qs.js';
1
+ export { encodePathParam } from "./encodePathParam.js";
2
+ export { join } from "./join.js";
3
+ export { queryBuilder } from "./QueryStringBuilder.js";
4
+ export { toQueryString } from "./qs.js";
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.join = join;
4
4
  function join(base, ...segments) {
5
5
  if (!base) {
6
- return '';
6
+ return "";
7
7
  }
8
8
  if (segments.length === 0) {
9
9
  return base;
10
10
  }
11
- if (base.includes('://')) {
11
+ if (base.includes("://")) {
12
12
  let url;
13
13
  try {
14
14
  url = new URL(base);
@@ -17,15 +17,15 @@ function join(base, ...segments) {
17
17
  return joinPath(base, ...segments);
18
18
  }
19
19
  const lastSegment = segments[segments.length - 1];
20
- const shouldPreserveTrailingSlash = lastSegment === null || lastSegment === void 0 ? void 0 : lastSegment.endsWith('/');
20
+ const shouldPreserveTrailingSlash = lastSegment === null || lastSegment === void 0 ? void 0 : lastSegment.endsWith("/");
21
21
  for (const segment of segments) {
22
22
  const cleanSegment = trimSlashes(segment);
23
23
  if (cleanSegment) {
24
24
  url.pathname = joinPathSegments(url.pathname, cleanSegment);
25
25
  }
26
26
  }
27
- if (shouldPreserveTrailingSlash && !url.pathname.endsWith('/')) {
28
- url.pathname += '/';
27
+ if (shouldPreserveTrailingSlash && !url.pathname.endsWith("/")) {
28
+ url.pathname += "/";
29
29
  }
30
30
  return url.toString();
31
31
  }
@@ -37,20 +37,20 @@ function joinPath(base, ...segments) {
37
37
  }
38
38
  let result = base;
39
39
  const lastSegment = segments[segments.length - 1];
40
- const shouldPreserveTrailingSlash = lastSegment === null || lastSegment === void 0 ? void 0 : lastSegment.endsWith('/');
40
+ const shouldPreserveTrailingSlash = lastSegment === null || lastSegment === void 0 ? void 0 : lastSegment.endsWith("/");
41
41
  for (const segment of segments) {
42
42
  const cleanSegment = trimSlashes(segment);
43
43
  if (cleanSegment) {
44
44
  result = joinPathSegments(result, cleanSegment);
45
45
  }
46
46
  }
47
- if (shouldPreserveTrailingSlash && !result.endsWith('/')) {
48
- result += '/';
47
+ if (shouldPreserveTrailingSlash && !result.endsWith("/")) {
48
+ result += "/";
49
49
  }
50
50
  return result;
51
51
  }
52
52
  function joinPathSegments(left, right) {
53
- if (left.endsWith('/')) {
53
+ if (left.endsWith("/")) {
54
54
  return left + right;
55
55
  }
56
56
  return `${left}/${right}`;
@@ -60,9 +60,9 @@ function trimSlashes(str) {
60
60
  return str;
61
61
  let start = 0;
62
62
  let end = str.length;
63
- if (str.startsWith('/'))
63
+ if (str.startsWith("/"))
64
64
  start = 1;
65
- if (str.endsWith('/'))
65
+ if (str.endsWith("/"))
66
66
  end = str.length - 1;
67
67
  return start === 0 && end === str.length ? str : str.slice(start, end);
68
68
  }
@@ -1,4 +1,4 @@
1
- type ArrayFormat = 'indices' | 'repeat' | 'comma';
1
+ type ArrayFormat = "indices" | "repeat" | "comma";
2
2
  interface QueryStringOptions {
3
3
  arrayFormat?: ArrayFormat;
4
4
  encode?: boolean;