@roarkanalytics/sdk 0.1.0-alpha.1 → 0.1.0-alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (347) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +1 -1
  3. package/README.md +48 -85
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +16 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +12 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/{internal/utils.js → _shims/auto/runtime-bun.js} +5 -8
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +2 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +21 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +2 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +21 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +2 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +21 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +2 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +101 -0
  36. package/_shims/auto/types.js +3 -0
  37. package/_shims/auto/types.mjs +3 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +14 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +10 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +81 -0
  45. package/_shims/index.js +13 -0
  46. package/_shims/index.mjs +7 -0
  47. package/_shims/manual-types.d.ts +12 -0
  48. package/_shims/manual-types.js +3 -0
  49. package/_shims/manual-types.mjs +3 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +89 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +56 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +42 -0
  57. package/_shims/node-types.js +3 -0
  58. package/_shims/node-types.mjs +3 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +41 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +37 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +78 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +71 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +83 -0
  72. package/_shims/web-types.js +3 -0
  73. package/_shims/web-types.mjs +3 -0
  74. package/core.d.ts +241 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +908 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +876 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +3 -3
  81. package/error.d.ts.map +1 -1
  82. package/error.js +6 -6
  83. package/error.js.map +1 -1
  84. package/error.mjs +3 -3
  85. package/error.mjs.map +1 -1
  86. package/index.d.mts +109 -5
  87. package/index.d.ts +109 -5
  88. package/index.d.ts.map +1 -1
  89. package/index.js +103 -11
  90. package/index.js.map +1 -1
  91. package/index.mjs +77 -5
  92. package/index.mjs.map +1 -1
  93. package/package.json +66 -82
  94. package/resource.d.ts +3 -3
  95. package/resource.d.ts.map +1 -1
  96. package/resource.js.map +1 -1
  97. package/resource.mjs.map +1 -1
  98. package/resources/calls.d.ts +2 -3
  99. package/resources/calls.d.ts.map +1 -1
  100. package/resources/calls.js.map +1 -1
  101. package/resources/calls.mjs.map +1 -1
  102. package/resources/index.d.ts.map +1 -1
  103. package/shims/node.d.ts +30 -0
  104. package/shims/node.d.ts.map +1 -0
  105. package/shims/node.js +31 -0
  106. package/shims/node.js.map +1 -0
  107. package/shims/node.mjs +5 -0
  108. package/shims/node.mjs.map +1 -0
  109. package/shims/web.d.ts +26 -0
  110. package/shims/web.d.ts.map +1 -0
  111. package/shims/web.js +31 -0
  112. package/shims/web.js.map +1 -0
  113. package/shims/web.mjs +5 -0
  114. package/shims/web.mjs.map +1 -0
  115. package/src/_shims/MultipartBody.ts +9 -0
  116. package/src/_shims/README.md +46 -0
  117. package/src/_shims/auto/runtime-bun.ts +4 -0
  118. package/src/_shims/auto/runtime-node.ts +4 -0
  119. package/src/_shims/auto/runtime.ts +4 -0
  120. package/src/_shims/auto/types-node.ts +4 -0
  121. package/src/_shims/auto/types.d.ts +101 -0
  122. package/src/_shims/auto/types.js +3 -0
  123. package/src/_shims/auto/types.mjs +3 -0
  124. package/src/_shims/bun-runtime.ts +14 -0
  125. package/src/_shims/index.d.ts +81 -0
  126. package/src/_shims/index.js +13 -0
  127. package/src/_shims/index.mjs +7 -0
  128. package/src/_shims/manual-types.d.ts +12 -0
  129. package/src/_shims/manual-types.js +3 -0
  130. package/src/_shims/manual-types.mjs +3 -0
  131. package/src/_shims/node-runtime.ts +81 -0
  132. package/src/_shims/node-types.d.ts +42 -0
  133. package/src/_shims/node-types.js +3 -0
  134. package/src/_shims/node-types.mjs +3 -0
  135. package/src/_shims/registry.ts +67 -0
  136. package/src/_shims/web-runtime.ts +103 -0
  137. package/src/_shims/web-types.d.ts +83 -0
  138. package/src/_shims/web-types.js +3 -0
  139. package/src/_shims/web-types.mjs +3 -0
  140. package/src/core.ts +1200 -0
  141. package/src/error.ts +3 -3
  142. package/src/index.ts +172 -5
  143. package/src/resource.ts +3 -3
  144. package/src/resources/calls.ts +2 -3
  145. package/src/shims/node.ts +50 -0
  146. package/src/shims/web.ts +50 -0
  147. package/src/tsconfig.json +2 -2
  148. package/src/uploads.ts +255 -1
  149. package/src/version.ts +1 -1
  150. package/uploads.d.ts +74 -1
  151. package/uploads.d.ts.map +1 -1
  152. package/uploads.js +168 -3
  153. package/uploads.js.map +1 -1
  154. package/uploads.mjs +157 -1
  155. package/uploads.mjs.map +1 -1
  156. package/version.d.ts +1 -1
  157. package/version.js +1 -1
  158. package/version.mjs +1 -1
  159. package/api-promise.d.mts +0 -47
  160. package/api-promise.d.mts.map +0 -1
  161. package/api-promise.d.ts +0 -47
  162. package/api-promise.d.ts.map +0 -1
  163. package/api-promise.js +0 -84
  164. package/api-promise.js.map +0 -1
  165. package/api-promise.mjs +0 -80
  166. package/api-promise.mjs.map +0 -1
  167. package/client.d.mts +0 -186
  168. package/client.d.mts.map +0 -1
  169. package/client.d.ts +0 -186
  170. package/client.d.ts.map +0 -1
  171. package/client.js +0 -449
  172. package/client.js.map +0 -1
  173. package/client.mjs +0 -422
  174. package/client.mjs.map +0 -1
  175. package/error.d.mts +0 -47
  176. package/error.d.mts.map +0 -1
  177. package/index.d.mts.map +0 -1
  178. package/internal/builtin-types.d.mts +0 -65
  179. package/internal/builtin-types.d.mts.map +0 -1
  180. package/internal/builtin-types.d.ts +0 -65
  181. package/internal/builtin-types.d.ts.map +0 -1
  182. package/internal/builtin-types.js +0 -4
  183. package/internal/builtin-types.js.map +0 -1
  184. package/internal/builtin-types.mjs +0 -3
  185. package/internal/builtin-types.mjs.map +0 -1
  186. package/internal/detect-platform.d.mts +0 -15
  187. package/internal/detect-platform.d.mts.map +0 -1
  188. package/internal/detect-platform.d.ts +0 -15
  189. package/internal/detect-platform.d.ts.map +0 -1
  190. package/internal/detect-platform.js +0 -162
  191. package/internal/detect-platform.js.map +0 -1
  192. package/internal/detect-platform.mjs +0 -157
  193. package/internal/detect-platform.mjs.map +0 -1
  194. package/internal/errors.d.mts +0 -3
  195. package/internal/errors.d.mts.map +0 -1
  196. package/internal/errors.d.ts +0 -3
  197. package/internal/errors.d.ts.map +0 -1
  198. package/internal/errors.js +0 -26
  199. package/internal/errors.js.map +0 -1
  200. package/internal/errors.mjs +0 -21
  201. package/internal/errors.mjs.map +0 -1
  202. package/internal/headers.d.mts +0 -21
  203. package/internal/headers.d.mts.map +0 -1
  204. package/internal/headers.d.ts +0 -21
  205. package/internal/headers.d.ts.map +0 -1
  206. package/internal/headers.js +0 -77
  207. package/internal/headers.js.map +0 -1
  208. package/internal/headers.mjs +0 -72
  209. package/internal/headers.mjs.map +0 -1
  210. package/internal/parse.d.mts +0 -10
  211. package/internal/parse.d.mts.map +0 -1
  212. package/internal/parse.d.ts +0 -10
  213. package/internal/parse.d.ts.map +0 -1
  214. package/internal/parse.js +0 -28
  215. package/internal/parse.js.map +0 -1
  216. package/internal/parse.mjs +0 -24
  217. package/internal/parse.mjs.map +0 -1
  218. package/internal/polyfill/crypto.node.d.ts +0 -10
  219. package/internal/polyfill/crypto.node.js +0 -11
  220. package/internal/polyfill/crypto.node.mjs +0 -2
  221. package/internal/polyfill/file.node.d.ts +0 -9
  222. package/internal/polyfill/file.node.js +0 -17
  223. package/internal/polyfill/file.node.mjs +0 -9
  224. package/internal/request-options.d.mts +0 -34
  225. package/internal/request-options.d.mts.map +0 -1
  226. package/internal/request-options.d.ts +0 -34
  227. package/internal/request-options.d.ts.map +0 -1
  228. package/internal/request-options.js +0 -39
  229. package/internal/request-options.js.map +0 -1
  230. package/internal/request-options.mjs +0 -34
  231. package/internal/request-options.mjs.map +0 -1
  232. package/internal/shim-types.d.mts +0 -28
  233. package/internal/shim-types.d.ts +0 -28
  234. package/internal/shims.d.mts +0 -61
  235. package/internal/shims.d.mts.map +0 -1
  236. package/internal/shims.d.ts +0 -61
  237. package/internal/shims.d.ts.map +0 -1
  238. package/internal/shims.js +0 -101
  239. package/internal/shims.js.map +0 -1
  240. package/internal/shims.mjs +0 -92
  241. package/internal/shims.mjs.map +0 -1
  242. package/internal/types.d.mts +0 -68
  243. package/internal/types.d.mts.map +0 -1
  244. package/internal/types.d.ts +0 -68
  245. package/internal/types.d.ts.map +0 -1
  246. package/internal/types.js +0 -4
  247. package/internal/types.js.map +0 -1
  248. package/internal/types.mjs +0 -3
  249. package/internal/types.mjs.map +0 -1
  250. package/internal/uploads.d.mts +0 -73
  251. package/internal/uploads.d.mts.map +0 -1
  252. package/internal/uploads.d.ts +0 -73
  253. package/internal/uploads.d.ts.map +0 -1
  254. package/internal/uploads.js +0 -208
  255. package/internal/uploads.js.map +0 -1
  256. package/internal/uploads.mjs +0 -200
  257. package/internal/uploads.mjs.map +0 -1
  258. package/internal/utils/base64.d.mts +0 -3
  259. package/internal/utils/base64.d.mts.map +0 -1
  260. package/internal/utils/base64.d.ts +0 -3
  261. package/internal/utils/base64.d.ts.map +0 -1
  262. package/internal/utils/base64.js +0 -33
  263. package/internal/utils/base64.js.map +0 -1
  264. package/internal/utils/base64.mjs +0 -28
  265. package/internal/utils/base64.mjs.map +0 -1
  266. package/internal/utils/env.d.mts +0 -9
  267. package/internal/utils/env.d.mts.map +0 -1
  268. package/internal/utils/env.d.ts +0 -9
  269. package/internal/utils/env.d.ts.map +0 -1
  270. package/internal/utils/env.js +0 -22
  271. package/internal/utils/env.js.map +0 -1
  272. package/internal/utils/env.mjs +0 -18
  273. package/internal/utils/env.mjs.map +0 -1
  274. package/internal/utils/log.d.mts +0 -4
  275. package/internal/utils/log.d.mts.map +0 -1
  276. package/internal/utils/log.d.ts +0 -4
  277. package/internal/utils/log.d.ts.map +0 -1
  278. package/internal/utils/log.js +0 -47
  279. package/internal/utils/log.js.map +0 -1
  280. package/internal/utils/log.mjs +0 -43
  281. package/internal/utils/log.mjs.map +0 -1
  282. package/internal/utils/sleep.d.mts +0 -2
  283. package/internal/utils/sleep.d.mts.map +0 -1
  284. package/internal/utils/sleep.d.ts +0 -2
  285. package/internal/utils/sleep.d.ts.map +0 -1
  286. package/internal/utils/sleep.js +0 -7
  287. package/internal/utils/sleep.js.map +0 -1
  288. package/internal/utils/sleep.mjs +0 -3
  289. package/internal/utils/sleep.mjs.map +0 -1
  290. package/internal/utils/uuid.d.mts +0 -5
  291. package/internal/utils/uuid.d.mts.map +0 -1
  292. package/internal/utils/uuid.d.ts +0 -5
  293. package/internal/utils/uuid.d.ts.map +0 -1
  294. package/internal/utils/uuid.js +0 -15
  295. package/internal/utils/uuid.js.map +0 -1
  296. package/internal/utils/uuid.mjs +0 -11
  297. package/internal/utils/uuid.mjs.map +0 -1
  298. package/internal/utils/values.d.mts +0 -15
  299. package/internal/utils/values.d.mts.map +0 -1
  300. package/internal/utils/values.d.ts +0 -15
  301. package/internal/utils/values.d.ts.map +0 -1
  302. package/internal/utils/values.js +0 -100
  303. package/internal/utils/values.js.map +0 -1
  304. package/internal/utils/values.mjs +0 -84
  305. package/internal/utils/values.mjs.map +0 -1
  306. package/internal/utils.d.mts +0 -7
  307. package/internal/utils.d.mts.map +0 -1
  308. package/internal/utils.d.ts +0 -7
  309. package/internal/utils.d.ts.map +0 -1
  310. package/internal/utils.js.map +0 -1
  311. package/internal/utils.mjs +0 -8
  312. package/internal/utils.mjs.map +0 -1
  313. package/resource.d.mts +0 -6
  314. package/resource.d.mts.map +0 -1
  315. package/resources/calls.d.mts +0 -85
  316. package/resources/calls.d.mts.map +0 -1
  317. package/resources/index.d.mts +0 -2
  318. package/resources/index.d.mts.map +0 -1
  319. package/src/api-promise.ts +0 -92
  320. package/src/client.ts +0 -646
  321. package/src/internal/builtin-types.ts +0 -79
  322. package/src/internal/detect-platform.ts +0 -196
  323. package/src/internal/errors.ts +0 -22
  324. package/src/internal/headers.ts +0 -96
  325. package/src/internal/parse.ts +0 -41
  326. package/src/internal/polyfill/crypto.node.d.ts +0 -10
  327. package/src/internal/polyfill/crypto.node.js +0 -11
  328. package/src/internal/polyfill/crypto.node.mjs +0 -2
  329. package/src/internal/polyfill/file.node.d.ts +0 -9
  330. package/src/internal/polyfill/file.node.js +0 -17
  331. package/src/internal/polyfill/file.node.mjs +0 -9
  332. package/src/internal/request-options.ts +0 -67
  333. package/src/internal/shim-types.d.ts +0 -28
  334. package/src/internal/shims.ts +0 -145
  335. package/src/internal/types.ts +0 -98
  336. package/src/internal/uploads.ts +0 -307
  337. package/src/internal/utils/base64.ts +0 -37
  338. package/src/internal/utils/env.ts +0 -18
  339. package/src/internal/utils/log.ts +0 -49
  340. package/src/internal/utils/sleep.ts +0 -3
  341. package/src/internal/utils/uuid.ts +0 -13
  342. package/src/internal/utils/values.ts +0 -94
  343. package/src/internal/utils.ts +0 -8
  344. package/uploads.d.mts +0 -2
  345. package/uploads.d.mts.map +0 -1
  346. package/version.d.mts +0 -2
  347. package/version.d.mts.map +0 -1
package/internal/shims.js DELETED
@@ -1,101 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ReadableStreamToAsyncIterable = exports.ReadableStreamFrom = exports.makeReadableStream = exports.isFsReadStreamLike = exports.isReadableLike = exports.getDefaultFetch = void 0;
5
- function getDefaultFetch() {
6
- if (typeof fetch !== 'undefined') {
7
- return fetch;
8
- }
9
- throw new Error('`fetch` is not defined as a global; Either pass `fetch` to the client, `new Petstore({ fetch })` or polyfill the global, `globalThis.fetch = fetch`');
10
- }
11
- exports.getDefaultFetch = getDefaultFetch;
12
- /**
13
- * Determines if the given value looks like a NodeJS `stream.Readable`
14
- * object and that it is readable, i.e. has not been consumed.
15
- *
16
- * https://nodejs.org/api/stream.html#class-streamreadable
17
- */
18
- function isReadableLike(value) {
19
- // We declare our own class of Readable here, so it's not feasible to
20
- // do an 'instanceof' check. Instead, check for Readable-like properties.
21
- return !!value && value.readable === true && typeof value.read === 'function';
22
- }
23
- exports.isReadableLike = isReadableLike;
24
- /**
25
- * Determines if the given value looks like a NodeJS `fs.ReadStream`
26
- * object.
27
- *
28
- * This just checks if the object matches our `Readable` interface
29
- * and defines a `path` property, there may be false positives.
30
- *
31
- * https://nodejs.org/api/fs.html#class-fsreadstream
32
- */
33
- function isFsReadStreamLike(value) {
34
- return isReadableLike(value) && 'path' in value;
35
- }
36
- exports.isFsReadStreamLike = isFsReadStreamLike;
37
- function makeReadableStream(...args) {
38
- const ReadableStream = globalThis.ReadableStream;
39
- if (typeof ReadableStream === 'undefined') {
40
- // Note: All of the platforms / runtimes we officially support already define
41
- // `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes.
42
- throw new Error('`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`');
43
- }
44
- return new ReadableStream(...args);
45
- }
46
- exports.makeReadableStream = makeReadableStream;
47
- function ReadableStreamFrom(iterable) {
48
- let iter = Symbol.asyncIterator in iterable ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
49
- return makeReadableStream({
50
- start() { },
51
- async pull(controller) {
52
- const { done, value } = await iter.next();
53
- if (done) {
54
- controller.close();
55
- }
56
- else {
57
- controller.enqueue(value);
58
- }
59
- },
60
- async cancel() {
61
- await iter.return?.();
62
- },
63
- });
64
- }
65
- exports.ReadableStreamFrom = ReadableStreamFrom;
66
- /**
67
- * Most browsers don't yet have async iterable support for ReadableStream,
68
- * and Node has a very different way of reading bytes from its "ReadableStream".
69
- *
70
- * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
71
- */
72
- function ReadableStreamToAsyncIterable(stream) {
73
- if (stream[Symbol.asyncIterator])
74
- return stream;
75
- const reader = stream.getReader();
76
- return {
77
- async next() {
78
- try {
79
- const result = await reader.read();
80
- if (result?.done)
81
- reader.releaseLock(); // release lock when stream becomes closed
82
- return result;
83
- }
84
- catch (e) {
85
- reader.releaseLock(); // release lock when stream becomes errored
86
- throw e;
87
- }
88
- },
89
- async return() {
90
- const cancelPromise = reader.cancel();
91
- reader.releaseLock();
92
- await cancelPromise;
93
- return { done: true, value: undefined };
94
- },
95
- [Symbol.asyncIterator]() {
96
- return this;
97
- },
98
- };
99
- }
100
- exports.ReadableStreamToAsyncIterable = ReadableStreamToAsyncIterable;
101
- //# sourceMappingURL=shims.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shims.js","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAYtF,SAAgB,eAAe;IAC7B,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;QAChC,OAAO,KAAY,CAAC;KACrB;IAED,MAAM,IAAI,KAAK,CACb,qJAAqJ,CACtJ,CAAC;AACJ,CAAC;AARD,0CAQC;AAwBD;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,KAAU;IACvC,qEAAqE;IACrE,yEAAyE;IACzE,OAAO,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AAChF,CAAC;AAJD,wCAIC;AAWD;;;;;;;;GAQG;AACH,SAAgB,kBAAkB,CAAC,KAAU;IAC3C,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,MAAM,IAAI,KAAK,CAAC;AAClD,CAAC;AAFD,gDAEC;AAID,SAAgB,kBAAkB,CAAC,GAAG,IAAwB;IAC5D,MAAM,cAAc,GAAI,UAAkB,CAAC,cAAc,CAAC;IAC1D,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE;QACzC,6EAA6E;QAC7E,yFAAyF;QACzF,MAAM,IAAI,KAAK,CACb,yHAAyH,CAC1H,CAAC;KACH;IAED,O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,CAAC;QACD,KAAK,CAAC,MAAM;YACV,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;YACtC,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,aAAa,CAAC;YACpB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC1C,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC;AAzBD,sEAyBC"}
@@ -1,92 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- export function getDefaultFetch() {
3
- if (typeof fetch !== 'undefined') {
4
- return fetch;
5
- }
6
- throw new Error('`fetch` is not defined as a global; Either pass `fetch` to the client, `new Petstore({ fetch })` or polyfill the global, `globalThis.fetch = fetch`');
7
- }
8
- /**
9
- * Determines if the given value looks like a NodeJS `stream.Readable`
10
- * object and that it is readable, i.e. has not been consumed.
11
- *
12
- * https://nodejs.org/api/stream.html#class-streamreadable
13
- */
14
- export function isReadableLike(value) {
15
- // We declare our own class of Readable here, so it's not feasible to
16
- // do an 'instanceof' check. Instead, check for Readable-like properties.
17
- return !!value && value.readable === true && typeof value.read === 'function';
18
- }
19
- /**
20
- * Determines if the given value looks like a NodeJS `fs.ReadStream`
21
- * object.
22
- *
23
- * This just checks if the object matches our `Readable` interface
24
- * and defines a `path` property, there may be false positives.
25
- *
26
- * https://nodejs.org/api/fs.html#class-fsreadstream
27
- */
28
- export function isFsReadStreamLike(value) {
29
- return isReadableLike(value) && 'path' in value;
30
- }
31
- export function makeReadableStream(...args) {
32
- const ReadableStream = globalThis.ReadableStream;
33
- if (typeof ReadableStream === 'undefined') {
34
- // Note: All of the platforms / runtimes we officially support already define
35
- // `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes.
36
- throw new Error('`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`');
37
- }
38
- return new ReadableStream(...args);
39
- }
40
- export function ReadableStreamFrom(iterable) {
41
- let iter = Symbol.asyncIterator in iterable ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
42
- return makeReadableStream({
43
- start() { },
44
- async pull(controller) {
45
- const { done, value } = await iter.next();
46
- if (done) {
47
- controller.close();
48
- }
49
- else {
50
- controller.enqueue(value);
51
- }
52
- },
53
- async cancel() {
54
- await iter.return?.();
55
- },
56
- });
57
- }
58
- /**
59
- * Most browsers don't yet have async iterable support for ReadableStream,
60
- * and Node has a very different way of reading bytes from its "ReadableStream".
61
- *
62
- * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
63
- */
64
- export function ReadableStreamToAsyncIterable(stream) {
65
- if (stream[Symbol.asyncIterator])
66
- return stream;
67
- const reader = stream.getReader();
68
- return {
69
- async next() {
70
- try {
71
- const result = await reader.read();
72
- if (result?.done)
73
- reader.releaseLock(); // release lock when stream becomes closed
74
- return result;
75
- }
76
- catch (e) {
77
- reader.releaseLock(); // release lock when stream becomes errored
78
- throw e;
79
- }
80
- },
81
- async return() {
82
- const cancelPromise = reader.cancel();
83
- reader.releaseLock();
84
- await cancelPromise;
85
- return { done: true, value: undefined };
86
- },
87
- [Symbol.asyncIterator]() {
88
- return this;
89
- },
90
- };
91
- }
92
- //# sourceMappingURL=shims.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shims.mjs","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAYtF,MAAM,UAAU,eAAe;IAC7B,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;QAChC,OAAO,KAAY,CAAC;KACrB;IAED,MAAM,IAAI,KAAK,CACb,qJAAqJ,CACtJ,CAAC;AACJ,CAAC;AAwBD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAAU;IACvC,qEAAqE;IACrE,yEAAyE;IACzE,OAAO,CAAC,CAAC,K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,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC;QAAE,OAAO,MAAM,CAAC;IAEhD,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,OAAO;QACL,KAAK,CAAC,IAAI;YACR,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;gBACnC,IAAI,MAAM,EAAE,IAAI;oBAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,0CAA0C;gBAClF,OAAO,MAAM,CAAC;aACf;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,2CAA2C;gBACjE,MAAM,CAAC,CAAC;aACT;QACH,CAAC;QACD,KAAK,CAAC,MAAM;YACV,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;YACtC,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,aAAa,CAAC;YACpB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC1C,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,68 +0,0 @@
1
-
2
- export type PromiseOrValue<T> = T | Promise<T>;
3
- export type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
4
- export type KeysEnum<T> = {
5
- [P in keyof Required<T>]: true;
6
- };
7
- type NotAny<T> = [unknown] extends [T] ? never : T;
8
- type Literal<T> = PropertyKey extends T ? never : T;
9
- type MappedLiteralKeys<T> = T extends any ? Literal<keyof T> : never;
10
- type MappedIndex<T, K> = T extends any ? K extends keyof T ? T[K] : never : never;
11
- /**
12
- * Some environments overload the global fetch function, and Parameters<T> only gets the last signature.
13
- */
14
- type OverloadedParameters<T> = T extends ({
15
- (...args: infer A): unknown;
16
- (...args: infer B): unknown;
17
- (...args: infer C): unknown;
18
- (...args: infer D): unknown;
19
- }) ? A | B | C | D : T extends ({
20
- (...args: infer A): unknown;
21
- (...args: infer B): unknown;
22
- (...args: infer C): unknown;
23
- }) ? A | B | C : T extends ({
24
- (...args: infer A): unknown;
25
- (...args: infer B): unknown;
26
- }) ? A | B : T extends (...args: infer A) => unknown ? A : never;
27
- /**
28
- * These imports attempt to get types from a parent package's dependencies.
29
- * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
30
- * would cause typescript to show types not present at runtime. To avoid this, we import
31
- * directly from parent node_modules folders.
32
- *
33
- * We need to check multiple levels because we don't know what directory structure we'll be in.
34
- * For example, pnpm generates directories like this:
35
- * ```
36
- * node_modules
37
- * ├── .pnpm
38
- * │ └── pkg@1.0.0
39
- * │ └── node_modules
40
- * │ └── pkg
41
- * │ └── internal
42
- * │ └── types.d.ts
43
- * ├── pkg -> .pnpm/pkg@1.0.0/node_modules/pkg
44
- * └── undici
45
- * ```
46
- *
47
- * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
48
- */
49
- /** @ts-ignore For users with \@types/node */
50
- type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types').RequestInit> | NotAny<import('../../node_modules/undici-types').RequestInit> | NotAny<import('../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types').RequestInit>;
51
- /** @ts-ignore For users with undici */
52
- type UndiciRequestInit = NotAny<import('../node_modules/undici').RequestInit> | NotAny<import('../../node_modules/undici').RequestInit> | NotAny<import('../../../node_modules/undici').RequestInit> | NotAny<import('../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici').RequestInit>;
53
- /** @ts-ignore For users with \@types/bun */
54
- type BunRequestInit = globalThis.FetchRequestInit;
55
- /** @ts-ignore For users with node-fetch */
56
- type NodeFetchRequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
57
- /** @ts-ignore For users who use Deno */
58
- type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
59
- type RequestInits = NotAny<UndiciTypesRequestInit> | NotAny<UndiciRequestInit> | NotAny<BunRequestInit> | NotAny<NodeFetchRequestInit> | NotAny<RequestInit> | NotAny<FetchRequestInit>;
60
- /**
61
- * This type contains `RequestInit` options that may be available on the current runtime,
62
- * including per-platform extensions like `dispatcher`, `agent`, `client`, etc.
63
- */
64
- export type MergedRequestInit = {
65
- [K in MappedLiteralKeys<RequestInits>]?: MappedIndex<RequestInits, K> | undefined;
66
- };
67
- export {};
68
- //# sourceMappingURL=types.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":";AAEA,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;A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C,IAAI,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,YAAY,EAAE,CAAC,CAAC,GAAG,SAAS;CAClF,CAAC"}
@@ -1,68 +0,0 @@
1
-
2
- export type PromiseOrValue<T> = T | Promise<T>;
3
- export type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
4
- export type KeysEnum<T> = {
5
- [P in keyof Required<T>]: true;
6
- };
7
- type NotAny<T> = [unknown] extends [T] ? never : T;
8
- type Literal<T> = PropertyKey extends T ? never : T;
9
- type MappedLiteralKeys<T> = T extends any ? Literal<keyof T> : never;
10
- type MappedIndex<T, K> = T extends any ? K extends keyof T ? T[K] : never : never;
11
- /**
12
- * Some environments overload the global fetch function, and Parameters<T> only gets the last signature.
13
- */
14
- type OverloadedParameters<T> = T extends ({
15
- (...args: infer A): unknown;
16
- (...args: infer B): unknown;
17
- (...args: infer C): unknown;
18
- (...args: infer D): unknown;
19
- }) ? A | B | C | D : T extends ({
20
- (...args: infer A): unknown;
21
- (...args: infer B): unknown;
22
- (...args: infer C): unknown;
23
- }) ? A | B | C : T extends ({
24
- (...args: infer A): unknown;
25
- (...args: infer B): unknown;
26
- }) ? A | B : T extends (...args: infer A) => unknown ? A : never;
27
- /**
28
- * These imports attempt to get types from a parent package's dependencies.
29
- * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
30
- * would cause typescript to show types not present at runtime. To avoid this, we import
31
- * directly from parent node_modules folders.
32
- *
33
- * We need to check multiple levels because we don't know what directory structure we'll be in.
34
- * For example, pnpm generates directories like this:
35
- * ```
36
- * node_modules
37
- * ├── .pnpm
38
- * │ └── pkg@1.0.0
39
- * │ └── node_modules
40
- * │ └── pkg
41
- * │ └── internal
42
- * │ └── types.d.ts
43
- * ├── pkg -> .pnpm/pkg@1.0.0/node_modules/pkg
44
- * └── undici
45
- * ```
46
- *
47
- * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
48
- */
49
- /** @ts-ignore For users with \@types/node */
50
- type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types').RequestInit> | NotAny<import('../../node_modules/undici-types').RequestInit> | NotAny<import('../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types').RequestInit>;
51
- /** @ts-ignore For users with undici */
52
- type UndiciRequestInit = NotAny<import('../node_modules/undici').RequestInit> | NotAny<import('../../node_modules/undici').RequestInit> | NotAny<import('../../../node_modules/undici').RequestInit> | NotAny<import('../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici').RequestInit>;
53
- /** @ts-ignore For users with \@types/bun */
54
- type BunRequestInit = globalThis.FetchRequestInit;
55
- /** @ts-ignore For users with node-fetch */
56
- type NodeFetchRequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
57
- /** @ts-ignore For users who use Deno */
58
- type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
59
- type RequestInits = NotAny<UndiciTypesRequestInit> | NotAny<UndiciRequestInit> | NotAny<BunRequestInit> | NotAny<NodeFetchRequestInit> | NotAny<RequestInit> | NotAny<FetchRequestInit>;
60
- /**
61
- * This type contains `RequestInit` options that may be available on the current runtime,
62
- * including per-platform extensions like `dispatcher`, `agent`, `client`, etc.
63
- */
64
- export type MergedRequestInit = {
65
- [K in MappedLiteralKeys<RequestInits>]?: MappedIndex<RequestInits, K> | undefined;
66
- };
67
- export {};
68
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":";AAEA,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/C,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErE,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI;CAAE,CAAC;AAE7D,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;AACnD,KAAK,OAAO,CAAC,CAAC,IAAI,WAAW,SAAS,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;AACpD,KAAK,iBAAiB,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC;AACrE,KAAK,WAAW,CAAC,CAAC,EAAE,CAAC,IACnB,CAAC,SAAS,GAAG,GACX,CAAC,SAAS,MAAM,CAAC,GACf,CAAC,CAAC,CAAC,CAAC,GACJ,KAAK,GACP,KAAK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AA8C,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,iDAAiD,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,oDAAoD,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,uDAAuD,EAAE,WAAW,CAAC,CAAC;AAC/uB,wCAAwC;AACxC,KAAK,gBAAgB,GAAG,WAAW,CAAC,oBAAoB,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAG3E,KAAK,YAAY,GACb,MAAM,CAAC,sBAAsB,CAAC,GAC9B,MAAM,CAAC,iBAAiB,CAAC,GACzB,MAAM,CAAC,cAAc,CAAC,GACtB,MAAM,CAAC,oBAAoB,CAAC,GAC5B,MAAM,CAAC,WAAW,CAAC,GACnB,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAE7B;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;KAC7B,CAAC,IAAI,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,YAAY,EAAE,CAAC,CAAC,GAAG,SAAS;CAClF,CAAC"}
package/internal/types.js DELETED
@@ -1,4 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":";AAAA,sFAAsF"}
@@ -1,3 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- export {};
3
- //# sourceMappingURL=types.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -1,73 +0,0 @@
1
-
2
-
3
- import { type RequestOptions } from "./request-options.mjs";
4
- import type { FilePropertyBag, Fetch } from "./builtin-types.mjs";
5
- import { type FsReadStreamLike } from "./shims.mjs";
6
- import type { Petstore } from "../client.mjs";
7
- import "./polyfill/file.node.mjs";
8
- type BlobLikePart = string | ArrayBuffer | ArrayBufferView | BlobLike | DataView;
9
- type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView;
10
- /**
11
- * Typically, this is a native "File" class.
12
- *
13
- * We provide the {@link toFile} utility to convert a variety of objects
14
- * into the File class.
15
- *
16
- * For convenience, you can also pass a fetch Response, or in Node,
17
- * the result of fs.createReadStream().
18
- */
19
- export type Uploadable = FileLike | ResponseLike | FsReadStreamLike;
20
- /**
21
- * Intended to match DOM Blob, node-fetch Blob, node:buffer Blob, etc.
22
- * Don't add arrayBuffer here, node-fetch doesn't have it
23
- */
24
- interface BlobLike {
25
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
26
- readonly size: number;
27
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
28
- readonly type: string;
29
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
30
- text(): Promise<string>;
31
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
32
- slice(start?: number, end?: number): BlobLike;
33
- }
34
- /**
35
- * Intended to match DOM File, node:buffer File, undici File, etc.
36
- */
37
- interface FileLike extends BlobLike {
38
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
39
- readonly lastModified: number;
40
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
41
- readonly name: string;
42
- }
43
- /**
44
- * Intended to match DOM Response, node-fetch Response, undici Response, etc.
45
- */
46
- export interface ResponseLike {
47
- url: string;
48
- blob(): Promise<BlobLike>;
49
- }
50
- type ToFileInput = Uploadable | Exclude<BlobLikePart, string> | AsyncIterable<BlobLikePart>;
51
- /**
52
- * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
53
- * @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s
54
- * @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
55
- * @param {Object=} options additional properties
56
- * @param {string=} options.type the MIME type of the content
57
- * @param {number=} options.lastModified the last modified timestamp
58
- * @returns a {@link File} with the given properties
59
- */
60
- export declare function toFile(value: ToFileInput | PromiseLike<ToFileInput>, name?: string | null | undefined, options?: FilePropertyBag | undefined): Promise<FileLike>;
61
- export declare function getBytes(value: Uploadable | BlobLikePart | AsyncIterable<BlobLikePart>): Promise<Array<BlobPart>>;
62
- /**
63
- * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
64
- * Otherwise returns the request as is.
65
- */
66
- export declare const maybeMultipartFormRequestOptions: (opts: RequestOptions, fetch: Petstore | Fetch) => Promise<RequestOptions>;
67
- type MultipartFormRequestOptions = Omit<RequestOptions, 'body'> & {
68
- body: unknown;
69
- };
70
- export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: Petstore | Fetch) => Promise<RequestOptions>;
71
- export declare const createForm: <T = Record<string, unknown>>(body: T | undefined, fetch: Petstore | Fetch) => Promise<FormData>;
72
- export {};
73
- //# sourceMappingURL=uploads.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../src/internal/uploads.ts"],"names":[],"mappings":";;OAAO,EAAE,KAAK,cAAc,EAAE;OACvB,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;OAC/B,EAAsB,KAAK,gBAAgB,EAAE;OAC7C,KAAK,EAAE,QAAQ,EAAE;;AAGxB,KAAK,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACjF,KAAK,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,IAAI,GAAG,QAAQ,CAAC;AAEzE;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,YAAY,GAAG,gBAAgB,CAA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AAK,2BAA2B,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpF,eAAO,MAAM,2BAA2B,SAChC,2BAA2B,SAC1B,QAAQ,GAAG,KAAK,KACtB,QAAQ,cAAc,CAExB,CAAC;AAkCF,eAAO,MAAM,UAAU,4DAEd,QAAQ,GAAG,KAAK,KACtB,QAAQ,QAAQ,CASlB,CAAC"}
@@ -1,73 +0,0 @@
1
-
2
-
3
- import { type RequestOptions } from "./request-options.js";
4
- import type { FilePropertyBag, Fetch } from "./builtin-types.js";
5
- import { type FsReadStreamLike } from "./shims.js";
6
- import type { Petstore } from "../client.js";
7
- import "./polyfill/file.node.js";
8
- type BlobLikePart = string | ArrayBuffer | ArrayBufferView | BlobLike | DataView;
9
- type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView;
10
- /**
11
- * Typically, this is a native "File" class.
12
- *
13
- * We provide the {@link toFile} utility to convert a variety of objects
14
- * into the File class.
15
- *
16
- * For convenience, you can also pass a fetch Response, or in Node,
17
- * the result of fs.createReadStream().
18
- */
19
- export type Uploadable = FileLike | ResponseLike | FsReadStreamLike;
20
- /**
21
- * Intended to match DOM Blob, node-fetch Blob, node:buffer Blob, etc.
22
- * Don't add arrayBuffer here, node-fetch doesn't have it
23
- */
24
- interface BlobLike {
25
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
26
- readonly size: number;
27
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
28
- readonly type: string;
29
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
30
- text(): Promise<string>;
31
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
32
- slice(start?: number, end?: number): BlobLike;
33
- }
34
- /**
35
- * Intended to match DOM File, node:buffer File, undici File, etc.
36
- */
37
- interface FileLike extends BlobLike {
38
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
39
- readonly lastModified: number;
40
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
41
- readonly name: string;
42
- }
43
- /**
44
- * Intended to match DOM Response, node-fetch Response, undici Response, etc.
45
- */
46
- export interface ResponseLike {
47
- url: string;
48
- blob(): Promise<BlobLike>;
49
- }
50
- type ToFileInput = Uploadable | Exclude<BlobLikePart, string> | AsyncIterable<BlobLikePart>;
51
- /**
52
- * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
53
- * @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s
54
- * @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
55
- * @param {Object=} options additional properties
56
- * @param {string=} options.type the MIME type of the content
57
- * @param {number=} options.lastModified the last modified timestamp
58
- * @returns a {@link File} with the given properties
59
- */
60
- export declare function toFile(value: ToFileInput | PromiseLike<ToFileInput>, name?: string | null | undefined, options?: FilePropertyBag | undefined): Promise<FileLike>;
61
- export declare function getBytes(value: Uploadable | BlobLikePart | AsyncIterable<BlobLikePart>): Promise<Array<BlobPart>>;
62
- /**
63
- * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
64
- * Otherwise returns the request as is.
65
- */
66
- export declare const maybeMultipartFormRequestOptions: (opts: RequestOptions, fetch: Petstore | Fetch) => Promise<RequestOptions>;
67
- type MultipartFormRequestOptions = Omit<RequestOptions, 'body'> & {
68
- body: unknown;
69
- };
70
- export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: Petstore | Fetch) => Promise<RequestOptions>;
71
- export declare const createForm: <T = Record<string, unknown>>(body: T | undefined, fetch: Petstore | Fetch) => Promise<FormData>;
72
- export {};
73
- //# sourceMappingURL=uploads.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../src/internal/uploads.ts"],"names":[],"mappings":";;OAAO,EAAE,KAAK,cAAc,EAAE;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