@quiverai/sdk 0.1.3 → 0.1.4

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 (183) hide show
  1. package/README.md +8 -11
  2. package/_speakeasy/.github/action-inputs-config.json +53 -0
  3. package/_speakeasy/.github/action-security-config.json +88 -0
  4. package/dist/commonjs/funcs/modelsListModels.js +1 -1
  5. package/dist/commonjs/funcs/modelsRetrieveModel.js +1 -1
  6. package/dist/commonjs/funcs/svgCheckVectorizability.js +1 -1
  7. package/dist/commonjs/funcs/svgCreateSVGAnimation.js +1 -1
  8. package/dist/commonjs/funcs/svgCreateSVGCollection.js +1 -1
  9. package/dist/commonjs/funcs/svgCreateSVGEdit.js +1 -1
  10. package/dist/commonjs/funcs/svgCreateSVGGeneration.js +1 -1
  11. package/dist/commonjs/funcs/svgCreateSVGVectorization.js +1 -1
  12. package/dist/commonjs/lib/config.d.ts +2 -2
  13. package/dist/commonjs/lib/config.js +2 -2
  14. package/dist/esm/funcs/modelsListModels.js +1 -1
  15. package/dist/esm/funcs/modelsRetrieveModel.js +1 -1
  16. package/dist/esm/funcs/svgCheckVectorizability.js +1 -1
  17. package/dist/esm/funcs/svgCreateSVGAnimation.js +1 -1
  18. package/dist/esm/funcs/svgCreateSVGCollection.js +1 -1
  19. package/dist/esm/funcs/svgCreateSVGEdit.js +1 -1
  20. package/dist/esm/funcs/svgCreateSVGGeneration.js +1 -1
  21. package/dist/esm/funcs/svgCreateSVGVectorization.js +1 -1
  22. package/dist/esm/lib/config.d.ts +2 -2
  23. package/dist/esm/lib/config.js +2 -2
  24. package/examples/package-lock.json +611 -0
  25. package/jsr.json +1 -1
  26. package/package.json +5 -1
  27. package/src/funcs/modelsListModels.ts +1 -1
  28. package/src/funcs/modelsRetrieveModel.ts +1 -1
  29. package/src/funcs/svgCheckVectorizability.ts +1 -1
  30. package/src/funcs/svgCreateSVGAnimation.ts +1 -1
  31. package/src/funcs/svgCreateSVGCollection.ts +1 -1
  32. package/src/funcs/svgCreateSVGEdit.ts +1 -1
  33. package/src/funcs/svgCreateSVGGeneration.ts +1 -1
  34. package/src/funcs/svgCreateSVGVectorization.ts +1 -1
  35. package/src/lib/config.ts +2 -2
  36. package/.speakeasy/temp/reformatted4022478357.json +0 -3500
  37. package/.speakeasy/temp/registry_9588e5.json +0 -1
  38. package/examples/node_modules/.package-lock.json +0 -161
  39. package/examples/node_modules/@esbuild/darwin-arm64/package.json +0 -20
  40. package/examples/node_modules/@types/node/assert/strict.d.ts +0 -8
  41. package/examples/node_modules/@types/node/assert.d.ts +0 -1062
  42. package/examples/node_modules/@types/node/async_hooks.d.ts +0 -605
  43. package/examples/node_modules/@types/node/buffer.buffer.d.ts +0 -471
  44. package/examples/node_modules/@types/node/buffer.d.ts +0 -1936
  45. package/examples/node_modules/@types/node/child_process.d.ts +0 -1475
  46. package/examples/node_modules/@types/node/cluster.d.ts +0 -577
  47. package/examples/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  48. package/examples/node_modules/@types/node/compatibility/index.d.ts +0 -9
  49. package/examples/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  50. package/examples/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  51. package/examples/node_modules/@types/node/console.d.ts +0 -452
  52. package/examples/node_modules/@types/node/constants.d.ts +0 -21
  53. package/examples/node_modules/@types/node/crypto.d.ts +0 -4590
  54. package/examples/node_modules/@types/node/dgram.d.ts +0 -597
  55. package/examples/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  56. package/examples/node_modules/@types/node/dns/promises.d.ts +0 -479
  57. package/examples/node_modules/@types/node/dns.d.ts +0 -871
  58. package/examples/node_modules/@types/node/domain.d.ts +0 -170
  59. package/examples/node_modules/@types/node/events.d.ts +0 -977
  60. package/examples/node_modules/@types/node/fs/promises.d.ts +0 -1270
  61. package/examples/node_modules/@types/node/fs.d.ts +0 -4375
  62. package/examples/node_modules/@types/node/globals.d.ts +0 -172
  63. package/examples/node_modules/@types/node/globals.typedarray.d.ts +0 -38
  64. package/examples/node_modules/@types/node/http.d.ts +0 -2049
  65. package/examples/node_modules/@types/node/http2.d.ts +0 -2631
  66. package/examples/node_modules/@types/node/https.d.ts +0 -578
  67. package/examples/node_modules/@types/node/index.d.ts +0 -93
  68. package/examples/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  69. package/examples/node_modules/@types/node/module.d.ts +0 -539
  70. package/examples/node_modules/@types/node/net.d.ts +0 -1012
  71. package/examples/node_modules/@types/node/os.d.ts +0 -506
  72. package/examples/node_modules/@types/node/package.json +0 -140
  73. package/examples/node_modules/@types/node/path.d.ts +0 -200
  74. package/examples/node_modules/@types/node/perf_hooks.d.ts +0 -961
  75. package/examples/node_modules/@types/node/process.d.ts +0 -1957
  76. package/examples/node_modules/@types/node/punycode.d.ts +0 -117
  77. package/examples/node_modules/@types/node/querystring.d.ts +0 -152
  78. package/examples/node_modules/@types/node/readline/promises.d.ts +0 -162
  79. package/examples/node_modules/@types/node/readline.d.ts +0 -589
  80. package/examples/node_modules/@types/node/repl.d.ts +0 -430
  81. package/examples/node_modules/@types/node/sea.d.ts +0 -153
  82. package/examples/node_modules/@types/node/stream/consumers.d.ts +0 -38
  83. package/examples/node_modules/@types/node/stream/promises.d.ts +0 -90
  84. package/examples/node_modules/@types/node/stream/web.d.ts +0 -533
  85. package/examples/node_modules/@types/node/stream.d.ts +0 -1675
  86. package/examples/node_modules/@types/node/string_decoder.d.ts +0 -67
  87. package/examples/node_modules/@types/node/test.d.ts +0 -1787
  88. package/examples/node_modules/@types/node/timers/promises.d.ts +0 -108
  89. package/examples/node_modules/@types/node/timers.d.ts +0 -286
  90. package/examples/node_modules/@types/node/tls.d.ts +0 -1255
  91. package/examples/node_modules/@types/node/trace_events.d.ts +0 -197
  92. package/examples/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -468
  93. package/examples/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -34
  94. package/examples/node_modules/@types/node/ts5.6/index.d.ts +0 -93
  95. package/examples/node_modules/@types/node/tty.d.ts +0 -208
  96. package/examples/node_modules/@types/node/url.d.ts +0 -964
  97. package/examples/node_modules/@types/node/util.d.ts +0 -2331
  98. package/examples/node_modules/@types/node/v8.d.ts +0 -809
  99. package/examples/node_modules/@types/node/vm.d.ts +0 -1001
  100. package/examples/node_modules/@types/node/wasi.d.ts +0 -181
  101. package/examples/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  102. package/examples/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  103. package/examples/node_modules/@types/node/web-globals/events.d.ts +0 -97
  104. package/examples/node_modules/@types/node/web-globals/fetch.d.ts +0 -46
  105. package/examples/node_modules/@types/node/worker_threads.d.ts +0 -715
  106. package/examples/node_modules/@types/node/zlib.d.ts +0 -540
  107. package/examples/node_modules/dotenv/config.d.ts +0 -1
  108. package/examples/node_modules/dotenv/config.js +0 -9
  109. package/examples/node_modules/dotenv/lib/cli-options.js +0 -17
  110. package/examples/node_modules/dotenv/lib/env-options.js +0 -28
  111. package/examples/node_modules/dotenv/lib/main.d.ts +0 -162
  112. package/examples/node_modules/dotenv/lib/main.js +0 -386
  113. package/examples/node_modules/dotenv/package.json +0 -62
  114. package/examples/node_modules/esbuild/install.js +0 -289
  115. package/examples/node_modules/esbuild/lib/main.d.ts +0 -716
  116. package/examples/node_modules/esbuild/lib/main.js +0 -2242
  117. package/examples/node_modules/esbuild/package.json +0 -49
  118. package/examples/node_modules/get-tsconfig/dist/index.mjs +0 -7
  119. package/examples/node_modules/get-tsconfig/package.json +0 -46
  120. package/examples/node_modules/resolve-pkg-maps/dist/index.mjs +0 -1
  121. package/examples/node_modules/resolve-pkg-maps/package.json +0 -42
  122. package/examples/node_modules/tsx/dist/cjs/api/index.mjs +0 -1
  123. package/examples/node_modules/tsx/dist/cjs/index.mjs +0 -1
  124. package/examples/node_modules/tsx/dist/cli.mjs +0 -55
  125. package/examples/node_modules/tsx/dist/client-BQVF1NaW.mjs +0 -1
  126. package/examples/node_modules/tsx/dist/esm/api/index.mjs +0 -1
  127. package/examples/node_modules/tsx/dist/esm/index.mjs +0 -2
  128. package/examples/node_modules/tsx/dist/get-pipe-path-BHW2eJdv.mjs +0 -1
  129. package/examples/node_modules/tsx/dist/index-7AaEi15b.mjs +0 -14
  130. package/examples/node_modules/tsx/dist/index-gbaejti9.mjs +0 -1
  131. package/examples/node_modules/tsx/dist/lexer-DQCqS3nf.mjs +0 -3
  132. package/examples/node_modules/tsx/dist/loader.mjs +0 -1
  133. package/examples/node_modules/tsx/dist/node-features-_8ZFwP_x.mjs +0 -1
  134. package/examples/node_modules/tsx/dist/package-CeBgXWuR.mjs +0 -1
  135. package/examples/node_modules/tsx/dist/patch-repl.mjs +0 -1
  136. package/examples/node_modules/tsx/dist/preflight.mjs +0 -1
  137. package/examples/node_modules/tsx/dist/register-B7jrtLTO.mjs +0 -1
  138. package/examples/node_modules/tsx/dist/register-CFH5oNdT.mjs +0 -4
  139. package/examples/node_modules/tsx/dist/repl.mjs +0 -3
  140. package/examples/node_modules/tsx/dist/require-DQxpCAr4.mjs +0 -1
  141. package/examples/node_modules/tsx/dist/suppress-warnings.mjs +0 -1
  142. package/examples/node_modules/tsx/dist/temporary-directory-CwHp0_NW.mjs +0 -1
  143. package/examples/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +0 -5
  144. package/examples/node_modules/tsx/package.json +0 -68
  145. package/examples/node_modules/undici-types/agent.d.ts +0 -31
  146. package/examples/node_modules/undici-types/api.d.ts +0 -43
  147. package/examples/node_modules/undici-types/balanced-pool.d.ts +0 -29
  148. package/examples/node_modules/undici-types/cache.d.ts +0 -36
  149. package/examples/node_modules/undici-types/client.d.ts +0 -108
  150. package/examples/node_modules/undici-types/connector.d.ts +0 -34
  151. package/examples/node_modules/undici-types/content-type.d.ts +0 -21
  152. package/examples/node_modules/undici-types/cookies.d.ts +0 -28
  153. package/examples/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  154. package/examples/node_modules/undici-types/dispatcher.d.ts +0 -256
  155. package/examples/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  156. package/examples/node_modules/undici-types/errors.d.ts +0 -149
  157. package/examples/node_modules/undici-types/eventsource.d.ts +0 -61
  158. package/examples/node_modules/undici-types/fetch.d.ts +0 -209
  159. package/examples/node_modules/undici-types/file.d.ts +0 -39
  160. package/examples/node_modules/undici-types/filereader.d.ts +0 -54
  161. package/examples/node_modules/undici-types/formdata.d.ts +0 -108
  162. package/examples/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  163. package/examples/node_modules/undici-types/global-origin.d.ts +0 -7
  164. package/examples/node_modules/undici-types/handlers.d.ts +0 -15
  165. package/examples/node_modules/undici-types/header.d.ts +0 -4
  166. package/examples/node_modules/undici-types/index.d.ts +0 -71
  167. package/examples/node_modules/undici-types/interceptors.d.ts +0 -17
  168. package/examples/node_modules/undici-types/mock-agent.d.ts +0 -50
  169. package/examples/node_modules/undici-types/mock-client.d.ts +0 -25
  170. package/examples/node_modules/undici-types/mock-errors.d.ts +0 -12
  171. package/examples/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  172. package/examples/node_modules/undici-types/mock-pool.d.ts +0 -25
  173. package/examples/node_modules/undici-types/package.json +0 -55
  174. package/examples/node_modules/undici-types/patch.d.ts +0 -33
  175. package/examples/node_modules/undici-types/pool-stats.d.ts +0 -19
  176. package/examples/node_modules/undici-types/pool.d.ts +0 -39
  177. package/examples/node_modules/undici-types/proxy-agent.d.ts +0 -28
  178. package/examples/node_modules/undici-types/readable.d.ts +0 -65
  179. package/examples/node_modules/undici-types/retry-agent.d.ts +0 -8
  180. package/examples/node_modules/undici-types/retry-handler.d.ts +0 -116
  181. package/examples/node_modules/undici-types/util.d.ts +0 -18
  182. package/examples/node_modules/undici-types/webidl.d.ts +0 -228
  183. package/examples/node_modules/undici-types/websocket.d.ts +0 -150
@@ -1,90 +0,0 @@
1
- declare module "stream/promises" {
2
- import {
3
- FinishedOptions as _FinishedOptions,
4
- PipelineDestination,
5
- PipelineOptions,
6
- PipelinePromise,
7
- PipelineSource,
8
- PipelineTransform,
9
- } from "node:stream";
10
- interface FinishedOptions extends _FinishedOptions {
11
- /**
12
- * If true, removes the listeners registered by this function before the promise is fulfilled.
13
- * @default false
14
- */
15
- cleanup?: boolean | undefined;
16
- }
17
- function finished(
18
- stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
19
- options?: FinishedOptions,
20
- ): Promise<void>;
21
- function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(
22
- source: A,
23
- destination: B,
24
- options?: PipelineOptions,
25
- ): PipelinePromise<B>;
26
- function pipeline<
27
- A extends PipelineSource<any>,
28
- T1 extends PipelineTransform<A, any>,
29
- B extends PipelineDestination<T1, any>,
30
- >(
31
- source: A,
32
- transform1: T1,
33
- destination: B,
34
- options?: PipelineOptions,
35
- ): PipelinePromise<B>;
36
- function pipeline<
37
- A extends PipelineSource<any>,
38
- T1 extends PipelineTransform<A, any>,
39
- T2 extends PipelineTransform<T1, any>,
40
- B extends PipelineDestination<T2, any>,
41
- >(
42
- source: A,
43
- transform1: T1,
44
- transform2: T2,
45
- destination: B,
46
- options?: PipelineOptions,
47
- ): PipelinePromise<B>;
48
- function pipeline<
49
- A extends PipelineSource<any>,
50
- T1 extends PipelineTransform<A, any>,
51
- T2 extends PipelineTransform<T1, any>,
52
- T3 extends PipelineTransform<T2, any>,
53
- B extends PipelineDestination<T3, any>,
54
- >(
55
- source: A,
56
- transform1: T1,
57
- transform2: T2,
58
- transform3: T3,
59
- destination: B,
60
- options?: PipelineOptions,
61
- ): PipelinePromise<B>;
62
- function pipeline<
63
- A extends PipelineSource<any>,
64
- T1 extends PipelineTransform<A, any>,
65
- T2 extends PipelineTransform<T1, any>,
66
- T3 extends PipelineTransform<T2, any>,
67
- T4 extends PipelineTransform<T3, any>,
68
- B extends PipelineDestination<T4, any>,
69
- >(
70
- source: A,
71
- transform1: T1,
72
- transform2: T2,
73
- transform3: T3,
74
- transform4: T4,
75
- destination: B,
76
- options?: PipelineOptions,
77
- ): PipelinePromise<B>;
78
- function pipeline(
79
- streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
80
- options?: PipelineOptions,
81
- ): Promise<void>;
82
- function pipeline(
83
- stream1: NodeJS.ReadableStream,
84
- stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
85
- ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
86
- ): Promise<void>;
87
- }
88
- declare module "node:stream/promises" {
89
- export * from "stream/promises";
90
- }
@@ -1,533 +0,0 @@
1
- type _ByteLengthQueuingStrategy = typeof globalThis extends { onmessage: any } ? {}
2
- : import("stream/web").ByteLengthQueuingStrategy;
3
- type _CompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {}
4
- : import("stream/web").CompressionStream;
5
- type _CountQueuingStrategy = typeof globalThis extends { onmessage: any } ? {}
6
- : import("stream/web").CountQueuingStrategy;
7
- type _DecompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {}
8
- : import("stream/web").DecompressionStream;
9
- type _QueuingStrategy<T = any> = typeof globalThis extends { onmessage: any } ? {}
10
- : import("stream/web").QueuingStrategy<T>;
11
- type _ReadableByteStreamController = typeof globalThis extends { onmessage: any } ? {}
12
- : import("stream/web").ReadableByteStreamController;
13
- type _ReadableStream<R = any> = typeof globalThis extends { onmessage: any } ? {}
14
- : import("stream/web").ReadableStream<R>;
15
- type _ReadableStreamBYOBReader = typeof globalThis extends { onmessage: any } ? {}
16
- : import("stream/web").ReadableStreamBYOBReader;
17
- type _ReadableStreamBYOBRequest = typeof globalThis extends { onmessage: any } ? {}
18
- : import("stream/web").ReadableStreamBYOBRequest;
19
- type _ReadableStreamDefaultController<R = any> = typeof globalThis extends { onmessage: any } ? {}
20
- : import("stream/web").ReadableStreamDefaultController<R>;
21
- type _ReadableStreamDefaultReader<R = any> = typeof globalThis extends { onmessage: any } ? {}
22
- : import("stream/web").ReadableStreamDefaultReader<R>;
23
- type _TextDecoderStream = typeof globalThis extends { onmessage: any } ? {}
24
- : import("stream/web").TextDecoderStream;
25
- type _TextEncoderStream = typeof globalThis extends { onmessage: any } ? {}
26
- : import("stream/web").TextEncoderStream;
27
- type _TransformStream<I = any, O = any> = typeof globalThis extends { onmessage: any } ? {}
28
- : import("stream/web").TransformStream<I, O>;
29
- type _TransformStreamDefaultController<O = any> = typeof globalThis extends { onmessage: any } ? {}
30
- : import("stream/web").TransformStreamDefaultController<O>;
31
- type _WritableStream<W = any> = typeof globalThis extends { onmessage: any } ? {}
32
- : import("stream/web").WritableStream<W>;
33
- type _WritableStreamDefaultController = typeof globalThis extends { onmessage: any } ? {}
34
- : import("stream/web").WritableStreamDefaultController;
35
- type _WritableStreamDefaultWriter<W = any> = typeof globalThis extends { onmessage: any } ? {}
36
- : import("stream/web").WritableStreamDefaultWriter<W>;
37
-
38
- declare module "stream/web" {
39
- // stub module, pending copy&paste from .d.ts or manual impl
40
- // copy from lib.dom.d.ts
41
- interface ReadableWritablePair<R = any, W = any> {
42
- readable: ReadableStream<R>;
43
- /**
44
- * Provides a convenient, chainable way of piping this readable stream
45
- * through a transform stream (or any other { writable, readable }
46
- * pair). It simply pipes the stream into the writable side of the
47
- * supplied pair, and returns the readable side for further use.
48
- *
49
- * Piping a stream will lock it for the duration of the pipe, preventing
50
- * any other consumer from acquiring a reader.
51
- */
52
- writable: WritableStream<W>;
53
- }
54
- interface StreamPipeOptions {
55
- preventAbort?: boolean;
56
- preventCancel?: boolean;
57
- /**
58
- * Pipes this readable stream to a given writable stream destination.
59
- * The way in which the piping process behaves under various error
60
- * conditions can be customized with a number of passed options. It
61
- * returns a promise that fulfills when the piping process completes
62
- * successfully, or rejects if any errors were encountered.
63
- *
64
- * Piping a stream will lock it for the duration of the pipe, preventing
65
- * any other consumer from acquiring a reader.
66
- *
67
- * Errors and closures of the source and destination streams propagate
68
- * as follows:
69
- *
70
- * An error in this source readable stream will abort destination,
71
- * unless preventAbort is truthy. The returned promise will be rejected
72
- * with the source's error, or with any error that occurs during
73
- * aborting the destination.
74
- *
75
- * An error in destination will cancel this source readable stream,
76
- * unless preventCancel is truthy. The returned promise will be rejected
77
- * with the destination's error, or with any error that occurs during
78
- * canceling the source.
79
- *
80
- * When this source readable stream closes, destination will be closed,
81
- * unless preventClose is truthy. The returned promise will be fulfilled
82
- * once this process completes, unless an error is encountered while
83
- * closing the destination, in which case it will be rejected with that
84
- * error.
85
- *
86
- * If destination starts out closed or closing, this source readable
87
- * stream will be canceled, unless preventCancel is true. The returned
88
- * promise will be rejected with an error indicating piping to a closed
89
- * stream failed, or with any error that occurs during canceling the
90
- * source.
91
- *
92
- * The signal option can be set to an AbortSignal to allow aborting an
93
- * ongoing pipe operation via the corresponding AbortController. In this
94
- * case, this source readable stream will be canceled, and destination
95
- * aborted, unless the respective options preventCancel or preventAbort
96
- * are set.
97
- */
98
- preventClose?: boolean;
99
- signal?: AbortSignal;
100
- }
101
- interface ReadableStreamGenericReader {
102
- readonly closed: Promise<void>;
103
- cancel(reason?: any): Promise<void>;
104
- }
105
- type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
106
- interface ReadableStreamReadValueResult<T> {
107
- done: false;
108
- value: T;
109
- }
110
- interface ReadableStreamReadDoneResult<T> {
111
- done: true;
112
- value?: T;
113
- }
114
- type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
115
- interface ReadableByteStreamControllerCallback {
116
- (controller: ReadableByteStreamController): void | PromiseLike<void>;
117
- }
118
- interface UnderlyingSinkAbortCallback {
119
- (reason?: any): void | PromiseLike<void>;
120
- }
121
- interface UnderlyingSinkCloseCallback {
122
- (): void | PromiseLike<void>;
123
- }
124
- interface UnderlyingSinkStartCallback {
125
- (controller: WritableStreamDefaultController): any;
126
- }
127
- interface UnderlyingSinkWriteCallback<W> {
128
- (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
129
- }
130
- interface UnderlyingSourceCancelCallback {
131
- (reason?: any): void | PromiseLike<void>;
132
- }
133
- interface UnderlyingSourcePullCallback<R> {
134
- (controller: ReadableStreamController<R>): void | PromiseLike<void>;
135
- }
136
- interface UnderlyingSourceStartCallback<R> {
137
- (controller: ReadableStreamController<R>): any;
138
- }
139
- interface TransformerFlushCallback<O> {
140
- (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
141
- }
142
- interface TransformerStartCallback<O> {
143
- (controller: TransformStreamDefaultController<O>): any;
144
- }
145
- interface TransformerTransformCallback<I, O> {
146
- (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
147
- }
148
- interface UnderlyingByteSource {
149
- autoAllocateChunkSize?: number;
150
- cancel?: ReadableStreamErrorCallback;
151
- pull?: ReadableByteStreamControllerCallback;
152
- start?: ReadableByteStreamControllerCallback;
153
- type: "bytes";
154
- }
155
- interface UnderlyingSource<R = any> {
156
- cancel?: UnderlyingSourceCancelCallback;
157
- pull?: UnderlyingSourcePullCallback<R>;
158
- start?: UnderlyingSourceStartCallback<R>;
159
- type?: undefined;
160
- }
161
- interface UnderlyingSink<W = any> {
162
- abort?: UnderlyingSinkAbortCallback;
163
- close?: UnderlyingSinkCloseCallback;
164
- start?: UnderlyingSinkStartCallback;
165
- type?: undefined;
166
- write?: UnderlyingSinkWriteCallback<W>;
167
- }
168
- interface ReadableStreamErrorCallback {
169
- (reason: any): void | PromiseLike<void>;
170
- }
171
- interface ReadableStreamAsyncIterator<T> extends NodeJS.AsyncIterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
172
- [Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
173
- }
174
- /** This Streams API interface represents a readable stream of byte data. */
175
- interface ReadableStream<R = any> {
176
- readonly locked: boolean;
177
- cancel(reason?: any): Promise<void>;
178
- getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
179
- getReader(): ReadableStreamDefaultReader<R>;
180
- getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<R>;
181
- pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
182
- pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
183
- tee(): [ReadableStream<R>, ReadableStream<R>];
184
- values(options?: { preventCancel?: boolean }): ReadableStreamAsyncIterator<R>;
185
- [Symbol.asyncIterator](): ReadableStreamAsyncIterator<R>;
186
- }
187
- const ReadableStream: {
188
- prototype: ReadableStream;
189
- from<T>(iterable: Iterable<T> | AsyncIterable<T>): ReadableStream<T>;
190
- new(underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>;
191
- new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
192
- };
193
- type ReadableStreamReaderMode = "byob";
194
- interface ReadableStreamGetReaderOptions {
195
- /**
196
- * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
197
- *
198
- * This call behaves the same way as the no-argument variant, except that it only works on readable byte streams, i.e. streams which were constructed specifically with the ability to handle "bring your own buffer" reading. The returned BYOB reader provides the ability to directly read individual chunks from the stream via its read() method, into developer-supplied buffers, allowing more precise control over allocation.
199
- */
200
- mode?: ReadableStreamReaderMode;
201
- }
202
- type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
203
- interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
204
- read(): Promise<ReadableStreamReadResult<R>>;
205
- releaseLock(): void;
206
- }
207
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
208
- interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
209
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
210
- read<T extends ArrayBufferView>(
211
- view: T,
212
- options?: {
213
- min?: number;
214
- },
215
- ): Promise<ReadableStreamReadResult<T>>;
216
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
217
- releaseLock(): void;
218
- }
219
- const ReadableStreamDefaultReader: {
220
- prototype: ReadableStreamDefaultReader;
221
- new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
222
- };
223
- const ReadableStreamBYOBReader: {
224
- prototype: ReadableStreamBYOBReader;
225
- new(stream: ReadableStream): ReadableStreamBYOBReader;
226
- };
227
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
228
- interface ReadableStreamBYOBRequest {
229
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
230
- readonly view: ArrayBufferView | null;
231
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
232
- respond(bytesWritten: number): void;
233
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
234
- respondWithNewView(view: ArrayBufferView): void;
235
- }
236
- const ReadableStreamBYOBRequest: {
237
- prototype: ReadableStreamBYOBRequest;
238
- new(): ReadableStreamBYOBRequest;
239
- };
240
- interface ReadableByteStreamController {
241
- readonly byobRequest: undefined;
242
- readonly desiredSize: number | null;
243
- close(): void;
244
- enqueue(chunk: ArrayBufferView): void;
245
- error(error?: any): void;
246
- }
247
- const ReadableByteStreamController: {
248
- prototype: ReadableByteStreamController;
249
- new(): ReadableByteStreamController;
250
- };
251
- interface ReadableStreamDefaultController<R = any> {
252
- readonly desiredSize: number | null;
253
- close(): void;
254
- enqueue(chunk?: R): void;
255
- error(e?: any): void;
256
- }
257
- const ReadableStreamDefaultController: {
258
- prototype: ReadableStreamDefaultController;
259
- new(): ReadableStreamDefaultController;
260
- };
261
- interface Transformer<I = any, O = any> {
262
- flush?: TransformerFlushCallback<O>;
263
- readableType?: undefined;
264
- start?: TransformerStartCallback<O>;
265
- transform?: TransformerTransformCallback<I, O>;
266
- writableType?: undefined;
267
- }
268
- interface TransformStream<I = any, O = any> {
269
- readonly readable: ReadableStream<O>;
270
- readonly writable: WritableStream<I>;
271
- }
272
- const TransformStream: {
273
- prototype: TransformStream;
274
- new<I = any, O = any>(
275
- transformer?: Transformer<I, O>,
276
- writableStrategy?: QueuingStrategy<I>,
277
- readableStrategy?: QueuingStrategy<O>,
278
- ): TransformStream<I, O>;
279
- };
280
- interface TransformStreamDefaultController<O = any> {
281
- readonly desiredSize: number | null;
282
- enqueue(chunk?: O): void;
283
- error(reason?: any): void;
284
- terminate(): void;
285
- }
286
- const TransformStreamDefaultController: {
287
- prototype: TransformStreamDefaultController;
288
- new(): TransformStreamDefaultController;
289
- };
290
- /**
291
- * This Streams API interface provides a standard abstraction for writing
292
- * streaming data to a destination, known as a sink. This object comes with
293
- * built-in back pressure and queuing.
294
- */
295
- interface WritableStream<W = any> {
296
- readonly locked: boolean;
297
- abort(reason?: any): Promise<void>;
298
- close(): Promise<void>;
299
- getWriter(): WritableStreamDefaultWriter<W>;
300
- }
301
- const WritableStream: {
302
- prototype: WritableStream;
303
- new<W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
304
- };
305
- /**
306
- * This Streams API interface is the object returned by
307
- * WritableStream.getWriter() and once created locks the < writer to the
308
- * WritableStream ensuring that no other streams can write to the underlying
309
- * sink.
310
- */
311
- interface WritableStreamDefaultWriter<W = any> {
312
- readonly closed: Promise<void>;
313
- readonly desiredSize: number | null;
314
- readonly ready: Promise<void>;
315
- abort(reason?: any): Promise<void>;
316
- close(): Promise<void>;
317
- releaseLock(): void;
318
- write(chunk?: W): Promise<void>;
319
- }
320
- const WritableStreamDefaultWriter: {
321
- prototype: WritableStreamDefaultWriter;
322
- new<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
323
- };
324
- /**
325
- * This Streams API interface represents a controller allowing control of a
326
- * WritableStream's state. When constructing a WritableStream, the
327
- * underlying sink is given a corresponding WritableStreamDefaultController
328
- * instance to manipulate.
329
- */
330
- interface WritableStreamDefaultController {
331
- error(e?: any): void;
332
- }
333
- const WritableStreamDefaultController: {
334
- prototype: WritableStreamDefaultController;
335
- new(): WritableStreamDefaultController;
336
- };
337
- interface QueuingStrategy<T = any> {
338
- highWaterMark?: number;
339
- size?: QueuingStrategySize<T>;
340
- }
341
- interface QueuingStrategySize<T = any> {
342
- (chunk?: T): number;
343
- }
344
- interface QueuingStrategyInit {
345
- /**
346
- * Creates a new ByteLengthQueuingStrategy with the provided high water
347
- * mark.
348
- *
349
- * Note that the provided high water mark will not be validated ahead of
350
- * time. Instead, if it is negative, NaN, or not a number, the resulting
351
- * ByteLengthQueuingStrategy will cause the corresponding stream
352
- * constructor to throw.
353
- */
354
- highWaterMark: number;
355
- }
356
- /**
357
- * This Streams API interface provides a built-in byte length queuing
358
- * strategy that can be used when constructing streams.
359
- */
360
- interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
361
- readonly highWaterMark: number;
362
- readonly size: QueuingStrategySize<ArrayBufferView>;
363
- }
364
- const ByteLengthQueuingStrategy: {
365
- prototype: ByteLengthQueuingStrategy;
366
- new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
367
- };
368
- /**
369
- * This Streams API interface provides a built-in byte length queuing
370
- * strategy that can be used when constructing streams.
371
- */
372
- interface CountQueuingStrategy extends QueuingStrategy {
373
- readonly highWaterMark: number;
374
- readonly size: QueuingStrategySize;
375
- }
376
- const CountQueuingStrategy: {
377
- prototype: CountQueuingStrategy;
378
- new(init: QueuingStrategyInit): CountQueuingStrategy;
379
- };
380
- interface TextEncoderStream {
381
- /** Returns "utf-8". */
382
- readonly encoding: "utf-8";
383
- readonly readable: ReadableStream<Uint8Array>;
384
- readonly writable: WritableStream<string>;
385
- readonly [Symbol.toStringTag]: string;
386
- }
387
- const TextEncoderStream: {
388
- prototype: TextEncoderStream;
389
- new(): TextEncoderStream;
390
- };
391
- interface TextDecoderOptions {
392
- fatal?: boolean;
393
- ignoreBOM?: boolean;
394
- }
395
- type BufferSource = ArrayBufferView | ArrayBuffer;
396
- interface TextDecoderStream {
397
- /** Returns encoding's name, lower cased. */
398
- readonly encoding: string;
399
- /** Returns `true` if error mode is "fatal", and `false` otherwise. */
400
- readonly fatal: boolean;
401
- /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */
402
- readonly ignoreBOM: boolean;
403
- readonly readable: ReadableStream<string>;
404
- readonly writable: WritableStream<BufferSource>;
405
- readonly [Symbol.toStringTag]: string;
406
- }
407
- const TextDecoderStream: {
408
- prototype: TextDecoderStream;
409
- new(encoding?: string, options?: TextDecoderOptions): TextDecoderStream;
410
- };
411
- interface CompressionStream {
412
- readonly readable: ReadableStream;
413
- readonly writable: WritableStream;
414
- }
415
- const CompressionStream: {
416
- prototype: CompressionStream;
417
- new(format: "deflate" | "deflate-raw" | "gzip"): CompressionStream;
418
- };
419
- interface DecompressionStream {
420
- readonly writable: WritableStream;
421
- readonly readable: ReadableStream;
422
- }
423
- const DecompressionStream: {
424
- prototype: DecompressionStream;
425
- new(format: "deflate" | "deflate-raw" | "gzip"): DecompressionStream;
426
- };
427
-
428
- global {
429
- interface ByteLengthQueuingStrategy extends _ByteLengthQueuingStrategy {}
430
- var ByteLengthQueuingStrategy: typeof globalThis extends { onmessage: any; ByteLengthQueuingStrategy: infer T }
431
- ? T
432
- : typeof import("stream/web").ByteLengthQueuingStrategy;
433
-
434
- interface CompressionStream extends _CompressionStream {}
435
- var CompressionStream: typeof globalThis extends {
436
- onmessage: any;
437
- // CompressionStream, DecompressionStream and ReportingObserver was introduced in the same commit.
438
- // If ReportingObserver check is removed, the type here will form a circular reference in TS5.0+lib.dom.d.ts
439
- ReportingObserver: any;
440
- CompressionStream: infer T;
441
- } ? T
442
- // TS 4.8, 4.9, 5.0
443
- : typeof globalThis extends { onmessage: any; TransformStream: { prototype: infer T } } ? {
444
- prototype: T;
445
- new(format: "deflate" | "deflate-raw" | "gzip"): T;
446
- }
447
- : typeof import("stream/web").CompressionStream;
448
-
449
- interface CountQueuingStrategy extends _CountQueuingStrategy {}
450
- var CountQueuingStrategy: typeof globalThis extends { onmessage: any; CountQueuingStrategy: infer T } ? T
451
- : typeof import("stream/web").CountQueuingStrategy;
452
-
453
- interface DecompressionStream extends _DecompressionStream {}
454
- var DecompressionStream: typeof globalThis extends {
455
- onmessage: any;
456
- // CompressionStream, DecompressionStream and ReportingObserver was introduced in the same commit.
457
- // If ReportingObserver check is removed, the type here will form a circular reference in TS5.0+lib.dom.d.ts
458
- ReportingObserver: any;
459
- DecompressionStream: infer T;
460
- } ? T
461
- // TS 4.8, 4.9, 5.0
462
- : typeof globalThis extends { onmessage: any; TransformStream: { prototype: infer T } } ? {
463
- prototype: T;
464
- new(format: "deflate" | "deflate-raw" | "gzip"): T;
465
- }
466
- : typeof import("stream/web").DecompressionStream;
467
-
468
- interface QueuingStrategy<T = any> extends _QueuingStrategy<T> {}
469
-
470
- interface ReadableByteStreamController extends _ReadableByteStreamController {}
471
- var ReadableByteStreamController: typeof globalThis extends
472
- { onmessage: any; ReadableByteStreamController: infer T } ? T
473
- : typeof import("stream/web").ReadableByteStreamController;
474
-
475
- interface ReadableStream<R = any> extends _ReadableStream<R> {}
476
- var ReadableStream: typeof globalThis extends { onmessage: any; ReadableStream: infer T } ? T
477
- : typeof import("stream/web").ReadableStream;
478
-
479
- interface ReadableStreamBYOBReader extends _ReadableStreamBYOBReader {}
480
- var ReadableStreamBYOBReader: typeof globalThis extends { onmessage: any; ReadableStreamBYOBReader: infer T }
481
- ? T
482
- : typeof import("stream/web").ReadableStreamBYOBReader;
483
-
484
- interface ReadableStreamBYOBRequest extends _ReadableStreamBYOBRequest {}
485
- var ReadableStreamBYOBRequest: typeof globalThis extends { onmessage: any; ReadableStreamBYOBRequest: infer T }
486
- ? T
487
- : typeof import("stream/web").ReadableStreamBYOBRequest;
488
-
489
- interface ReadableStreamDefaultController<R = any> extends _ReadableStreamDefaultController<R> {}
490
- var ReadableStreamDefaultController: typeof globalThis extends
491
- { onmessage: any; ReadableStreamDefaultController: infer T } ? T
492
- : typeof import("stream/web").ReadableStreamDefaultController;
493
-
494
- interface ReadableStreamDefaultReader<R = any> extends _ReadableStreamDefaultReader<R> {}
495
- var ReadableStreamDefaultReader: typeof globalThis extends
496
- { onmessage: any; ReadableStreamDefaultReader: infer T } ? T
497
- : typeof import("stream/web").ReadableStreamDefaultReader;
498
-
499
- interface TextDecoderStream extends _TextDecoderStream {}
500
- var TextDecoderStream: typeof globalThis extends { onmessage: any; TextDecoderStream: infer T } ? T
501
- : typeof import("stream/web").TextDecoderStream;
502
-
503
- interface TextEncoderStream extends _TextEncoderStream {}
504
- var TextEncoderStream: typeof globalThis extends { onmessage: any; TextEncoderStream: infer T } ? T
505
- : typeof import("stream/web").TextEncoderStream;
506
-
507
- interface TransformStream<I = any, O = any> extends _TransformStream<I, O> {}
508
- var TransformStream: typeof globalThis extends { onmessage: any; TransformStream: infer T } ? T
509
- : typeof import("stream/web").TransformStream;
510
-
511
- interface TransformStreamDefaultController<O = any> extends _TransformStreamDefaultController<O> {}
512
- var TransformStreamDefaultController: typeof globalThis extends
513
- { onmessage: any; TransformStreamDefaultController: infer T } ? T
514
- : typeof import("stream/web").TransformStreamDefaultController;
515
-
516
- interface WritableStream<W = any> extends _WritableStream<W> {}
517
- var WritableStream: typeof globalThis extends { onmessage: any; WritableStream: infer T } ? T
518
- : typeof import("stream/web").WritableStream;
519
-
520
- interface WritableStreamDefaultController extends _WritableStreamDefaultController {}
521
- var WritableStreamDefaultController: typeof globalThis extends
522
- { onmessage: any; WritableStreamDefaultController: infer T } ? T
523
- : typeof import("stream/web").WritableStreamDefaultController;
524
-
525
- interface WritableStreamDefaultWriter<W = any> extends _WritableStreamDefaultWriter<W> {}
526
- var WritableStreamDefaultWriter: typeof globalThis extends
527
- { onmessage: any; WritableStreamDefaultWriter: infer T } ? T
528
- : typeof import("stream/web").WritableStreamDefaultWriter;
529
- }
530
- }
531
- declare module "node:stream/web" {
532
- export * from "stream/web";
533
- }