@idlebox/stripe-node-types 24.0.14-patch.0 → 24.0.15

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 (134) hide show
  1. package/README.md +1 -1
  2. package/assert/strict.d.ts +113 -1
  3. package/assert.d.ts +162 -248
  4. package/async_hooks.d.ts +20 -5
  5. package/buffer.buffer.d.ts +24 -6
  6. package/buffer.d.ts +63 -168
  7. package/child_process.d.ts +117 -223
  8. package/cluster.d.ts +251 -329
  9. package/compatibility/iterators.d.ts +15 -0
  10. package/console.d.ts +60 -346
  11. package/constants.d.ts +15 -1
  12. package/crypto.d.ts +713 -1149
  13. package/dgram.d.ts +30 -50
  14. package/diagnostics_channel.d.ts +16 -3
  15. package/dns/promises.d.ts +15 -0
  16. package/dns.d.ts +150 -131
  17. package/domain.d.ts +25 -14
  18. package/events.d.ts +858 -719
  19. package/fs/promises.d.ts +117 -53
  20. package/fs.d.ts +729 -484
  21. package/globals.d.ts +142 -344
  22. package/globals.typedarray.d.ts +94 -0
  23. package/http.d.ts +358 -246
  24. package/http2.d.ts +578 -711
  25. package/https.d.ts +85 -216
  26. package/index.d.ts +39 -3
  27. package/inspector/promises.d.ts +54 -0
  28. package/inspector.d.ts +180 -3936
  29. package/inspector.generated.d.ts +4242 -0
  30. package/module.d.ts +60 -95
  31. package/my-shim.d.ts +15 -0
  32. package/net.d.ts +102 -186
  33. package/os.d.ts +32 -6
  34. package/package.json +3 -8
  35. package/path/posix.d.ts +20 -0
  36. package/path/win32.d.ts +20 -0
  37. package/path.d.ts +132 -122
  38. package/perf_hooks.d.ts +310 -644
  39. package/process.d.ts +192 -138
  40. package/punycode.d.ts +17 -2
  41. package/querystring.d.ts +16 -1
  42. package/quic.d.ts +926 -0
  43. package/readline/promises.d.ts +16 -1
  44. package/readline.d.ts +80 -118
  45. package/repl.d.ts +98 -96
  46. package/sea.d.ts +25 -1
  47. package/sqlite.d.ts +277 -13
  48. package/stream/consumers.d.ts +22 -7
  49. package/stream/promises.d.ts +148 -12
  50. package/stream/web.d.ts +187 -494
  51. package/stream.d.ts +608 -490
  52. package/string_decoder.d.ts +18 -3
  53. package/test/reporters.d.ts +112 -0
  54. package/test.d.ts +238 -199
  55. package/timers/promises.d.ts +16 -1
  56. package/timers.d.ts +16 -129
  57. package/tls.d.ts +163 -163
  58. package/trace_events.d.ts +21 -6
  59. package/ts5.6/buffer.buffer.d.ts +25 -8
  60. package/ts5.6/compatibility/float16array.d.ts +15 -0
  61. package/ts5.6/globals.typedarray.d.ts +31 -0
  62. package/ts5.6/index.d.ts +39 -3
  63. package/ts5.7/compatibility/float16array.d.ts +15 -0
  64. package/ts5.7/index.d.ts +39 -3
  65. package/tty.d.ts +70 -13
  66. package/undici-types/agent.d.ts +20 -4
  67. package/undici-types/api.d.ts +15 -0
  68. package/undici-types/balanced-pool.d.ts +15 -0
  69. package/undici-types/cache-interceptor.d.ts +15 -0
  70. package/undici-types/cache.d.ts +15 -0
  71. package/undici-types/client-stats.d.ts +31 -0
  72. package/undici-types/client.d.ts +21 -5
  73. package/undici-types/connector.d.ts +15 -0
  74. package/undici-types/content-type.d.ts +15 -0
  75. package/undici-types/cookies.d.ts +15 -0
  76. package/undici-types/diagnostics-channel.d.ts +24 -1
  77. package/undici-types/dispatcher.d.ts +18 -8
  78. package/undici-types/env-http-proxy-agent.d.ts +17 -1
  79. package/undici-types/errors.d.ts +20 -15
  80. package/undici-types/eventsource.d.ts +24 -4
  81. package/undici-types/fetch.d.ts +16 -0
  82. package/undici-types/formdata.d.ts +15 -0
  83. package/undici-types/global-dispatcher.d.ts +15 -0
  84. package/undici-types/global-origin.d.ts +15 -0
  85. package/undici-types/h2c-client.d.ts +15 -2
  86. package/undici-types/handlers.d.ts +16 -1
  87. package/undici-types/header.d.ts +15 -0
  88. package/undici-types/index.d.ts +21 -1
  89. package/undici-types/interceptors.d.ts +20 -0
  90. package/undici-types/mock-agent.d.ts +18 -0
  91. package/undici-types/mock-call-history.d.ts +15 -0
  92. package/undici-types/mock-client.d.ts +17 -0
  93. package/undici-types/mock-errors.d.ts +15 -0
  94. package/undici-types/mock-interceptor.d.ts +17 -1
  95. package/undici-types/mock-pool.d.ts +17 -0
  96. package/undici-types/package.json +1 -1
  97. package/undici-types/patch.d.ts +15 -0
  98. package/undici-types/pool-stats.d.ts +15 -0
  99. package/undici-types/pool.d.ts +17 -0
  100. package/undici-types/proxy-agent.d.ts +16 -0
  101. package/undici-types/readable.d.ts +15 -0
  102. package/undici-types/retry-agent.d.ts +15 -0
  103. package/undici-types/retry-handler.d.ts +24 -0
  104. package/undici-types/snapshot-agent.d.ts +125 -0
  105. package/undici-types/util.d.ts +15 -0
  106. package/undici-types/utility.d.ts +15 -0
  107. package/undici-types/webidl.d.ts +126 -36
  108. package/undici-types/websocket.d.ts +18 -1
  109. package/url.d.ts +107 -587
  110. package/util/types.d.ts +571 -0
  111. package/util.d.ts +158 -792
  112. package/v8.d.ts +82 -7
  113. package/vm.d.ts +267 -108
  114. package/wasi.d.ts +38 -2
  115. package/web-globals/abortcontroller.d.ts +75 -0
  116. package/web-globals/blob.d.ts +39 -0
  117. package/web-globals/console.d.ts +25 -0
  118. package/web-globals/crypto.d.ts +55 -0
  119. package/web-globals/domexception.d.ts +84 -0
  120. package/web-globals/encoding.d.ts +27 -0
  121. package/{dom-events.d.ts → web-globals/events.d.ts} +72 -50
  122. package/web-globals/fetch.d.ts +70 -0
  123. package/web-globals/importmeta.d.ts +29 -0
  124. package/web-globals/messaging.d.ts +39 -0
  125. package/web-globals/navigator.d.ts +41 -0
  126. package/web-globals/performance.d.ts +61 -0
  127. package/web-globals/storage.d.ts +40 -0
  128. package/web-globals/streams.d.ts +131 -0
  129. package/web-globals/timers.d.ts +60 -0
  130. package/web-globals/url.d.ts +40 -0
  131. package/worker_threads.d.ts +306 -349
  132. package/zlib.d.ts +59 -94
  133. package/ts5.1/compatibility/disposable.d.ts +0 -13
  134. package/ts5.1/index.d.ts +0 -100
@@ -1,3 +1,18 @@
1
+ // biome-ignore-all lint: generated file
2
+ // biome-ignore-all assist: generated file
3
+ /* eslint-disable */
4
+ // @ts-ignore
5
+
6
+ /******************************************************************************
7
+ * GENERATED FILE, DO NOT MODIFY
8
+ * 这是生成的文件,千万不要修改
9
+ *
10
+ * @build-script/codegen - The Simple Code Generater
11
+ * https://github.com/GongT/baobao
12
+ *
13
+ ******************************************************************************/
14
+
15
+
1
16
  // These types are not exported, and are only used internally
2
17
  import * as undici from './index'
3
18
 
@@ -10,15 +25,13 @@ type SequenceConverter<T> = (object: unknown, iterable?: IterableIterator<T>) =>
10
25
 
11
26
  type RecordConverter<K extends string, V> = (object: unknown) => Record<K, V>
12
27
 
13
- interface ConvertToIntOpts {
14
- clamp?: boolean
15
- enforceRange?: boolean
16
- }
17
-
18
28
  interface WebidlErrors {
29
+ /**
30
+ * @description Instantiate an error
31
+ */
19
32
  exception (opts: { header: string, message: string }): TypeError
20
33
  /**
21
- * @description Throw an error when conversion from one type to another has failed
34
+ * @description Instantiate an error when conversion from one type to another has failed
22
35
  */
23
36
  conversionFailed (opts: {
24
37
  prefix: string
@@ -71,11 +84,11 @@ interface WebidlUtil {
71
84
  V: unknown,
72
85
  bitLength: number,
73
86
  signedness: 'signed' | 'unsigned',
74
- opts?: ConvertToIntOpts
87
+ flags?: number
75
88
  ): number
76
89
 
77
90
  /**
78
- * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
91
+ * @see https://webidl.spec.whatwg.org/#abstract-opdef-integerpart
79
92
  */
80
93
  IntegerPart (N: number): number
81
94
 
@@ -91,15 +104,17 @@ interface WebidlUtil {
91
104
  * This is only effective in some newer Node.js versions.
92
105
  */
93
106
  markAsUncloneable (V: any): void
107
+
108
+ IsResizableArrayBuffer (V: ArrayBufferLike): boolean
109
+
110
+ HasFlag (flag: number, attributes: number): boolean
94
111
  }
95
112
 
96
113
  interface WebidlConverters {
97
114
  /**
98
115
  * @see https://webidl.spec.whatwg.org/#es-DOMString
99
116
  */
100
- DOMString (V: unknown, prefix: string, argument: string, opts?: {
101
- legacyNullToEmptyString: boolean
102
- }): string
117
+ DOMString (V: unknown, prefix: string, argument: string, flags?: number): string
103
118
 
104
119
  /**
105
120
  * @see https://webidl.spec.whatwg.org/#es-ByteString
@@ -139,39 +154,78 @@ interface WebidlConverters {
139
154
  /**
140
155
  * @see https://webidl.spec.whatwg.org/#es-unsigned-short
141
156
  */
142
- ['unsigned short'] (V: unknown, opts?: ConvertToIntOpts): number
157
+ ['unsigned short'] (V: unknown, flags?: number): number
143
158
 
144
159
  /**
145
160
  * @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer
146
161
  */
147
- ArrayBuffer (V: unknown): ArrayBufferLike
148
- ArrayBuffer (V: unknown, opts: { allowShared: false }): ArrayBuffer
162
+ ArrayBuffer (
163
+ V: unknown,
164
+ prefix: string,
165
+ argument: string,
166
+ options?: { allowResizable: boolean }
167
+ ): ArrayBuffer
168
+
169
+ /**
170
+ * @see https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer
171
+ */
172
+ SharedArrayBuffer (
173
+ V: unknown,
174
+ prefix: string,
175
+ argument: string,
176
+ options?: { allowResizable: boolean }
177
+ ): SharedArrayBuffer
149
178
 
150
179
  /**
151
180
  * @see https://webidl.spec.whatwg.org/#es-buffer-source-types
152
181
  */
153
182
  TypedArray (
154
183
  V: unknown,
155
- TypedArray: NodeJS.TypedArray | ArrayBufferLike
156
- ): NodeJS.TypedArray | ArrayBufferLike
157
- TypedArray (
184
+ T: new () => NodeJS.TypedArray,
185
+ prefix: string,
186
+ argument: string,
187
+ flags?: number
188
+ ): NodeJS.TypedArray
189
+
190
+ /**
191
+ * @see https://webidl.spec.whatwg.org/#es-buffer-source-types
192
+ */
193
+ DataView (
158
194
  V: unknown,
159
- TypedArray: NodeJS.TypedArray | ArrayBufferLike,
160
- opts?: { allowShared: false }
161
- ): NodeJS.TypedArray | ArrayBuffer
195
+ prefix: string,
196
+ argument: string,
197
+ flags?: number
198
+ ): DataView
162
199
 
163
200
  /**
164
201
  * @see https://webidl.spec.whatwg.org/#es-buffer-source-types
165
202
  */
166
- DataView (V: unknown, opts?: { allowShared: boolean }): DataView
203
+ ArrayBufferView (
204
+ V: unknown,
205
+ prefix: string,
206
+ argument: string,
207
+ flags?: number
208
+ ): NodeJS.ArrayBufferView
167
209
 
168
210
  /**
169
211
  * @see https://webidl.spec.whatwg.org/#BufferSource
170
212
  */
171
213
  BufferSource (
172
214
  V: unknown,
173
- opts?: { allowShared: boolean }
174
- ): NodeJS.TypedArray | ArrayBufferLike | DataView
215
+ prefix: string,
216
+ argument: string,
217
+ flags?: number
218
+ ): ArrayBuffer | NodeJS.ArrayBufferView
219
+
220
+ /**
221
+ * @see https://webidl.spec.whatwg.org/#AllowSharedBufferSource
222
+ */
223
+ AllowSharedBufferSource (
224
+ V: unknown,
225
+ prefix: string,
226
+ argument: string,
227
+ flags?: number
228
+ ): ArrayBuffer | SharedArrayBuffer | NodeJS.ArrayBufferView
175
229
 
176
230
  ['sequence<ByteString>']: SequenceConverter<string>
177
231
 
@@ -179,23 +233,45 @@ interface WebidlConverters {
179
233
 
180
234
  ['record<ByteString, ByteString>']: RecordConverter<string, string>
181
235
 
236
+ /**
237
+ * @see https://fetch.spec.whatwg.org/#requestinfo
238
+ */
239
+ RequestInfo (V: unknown): undici.Request | string
240
+
241
+ /**
242
+ * @see https://fetch.spec.whatwg.org/#requestinit
243
+ */
244
+ RequestInit (V: unknown): undici.RequestInit
245
+
246
+ /**
247
+ * @see https://html.spec.whatwg.org/multipage/webappapis.html#eventhandlernonnull
248
+ */
249
+ EventHandlerNonNull (V: unknown): Function | null
250
+
251
+ WebSocketStreamWrite (V: unknown): ArrayBuffer | NodeJS.TypedArray | string
252
+
182
253
  [Key: string]: (...args: any[]) => unknown
183
254
  }
184
255
 
185
- type IsAssertion<T> = (arg: any) => arg is T
256
+ type WebidlIsFunction<T> = (arg: any) => arg is T
186
257
 
187
258
  interface WebidlIs {
188
- Request: IsAssertion<undici.Request>
189
- Response: IsAssertion<undici.Response>
190
- ReadableStream: IsAssertion<ReadableStream>
191
- Blob: IsAssertion<Blob>
192
- URLSearchParams: IsAssertion<URLSearchParams>
193
- File: IsAssertion<File>
194
- FormData: IsAssertion<undici.FormData>
195
- URL: IsAssertion<URL>
196
- WebSocketError: IsAssertion<undici.WebSocketError>
197
- AbortSignal: IsAssertion<AbortSignal>
198
- MessagePort: IsAssertion<MessagePort>
259
+ Request: WebidlIsFunction<undici.Request>
260
+ Response: WebidlIsFunction<undici.Response>
261
+ ReadableStream: WebidlIsFunction<ReadableStream>
262
+ Blob: WebidlIsFunction<Blob>
263
+ URLSearchParams: WebidlIsFunction<URLSearchParams>
264
+ File: WebidlIsFunction<File>
265
+ FormData: WebidlIsFunction<undici.FormData>
266
+ URL: WebidlIsFunction<URL>
267
+ WebSocketError: WebidlIsFunction<undici.WebSocketError>
268
+ AbortSignal: WebidlIsFunction<AbortSignal>
269
+ MessagePort: WebidlIsFunction<MessagePort>
270
+ USVString: WebidlIsFunction<string>
271
+ /**
272
+ * @see https://webidl.spec.whatwg.org/#BufferSource
273
+ */
274
+ BufferSource: WebidlIsFunction<ArrayBuffer | NodeJS.TypedArray>
199
275
  }
200
276
 
201
277
  export interface Webidl {
@@ -203,6 +279,7 @@ export interface Webidl {
203
279
  util: WebidlUtil
204
280
  converters: WebidlConverters
205
281
  is: WebidlIs
282
+ attributes: WebIDLExtendedAttributes
206
283
 
207
284
  /**
208
285
  * @description Performs a brand-check on {@param V} to ensure it is a
@@ -233,7 +310,7 @@ export interface Webidl {
233
310
  * Similar to {@link Webidl.brandCheck} but allows skipping the check if third party
234
311
  * interfaces are allowed.
235
312
  */
236
- interfaceConverter <Interface>(typeCheck: IsAssertion<Interface>, name: string): (
313
+ interfaceConverter <Interface>(typeCheck: WebidlIsFunction<Interface>, name: string): (
237
314
  V: unknown,
238
315
  prefix: string,
239
316
  argument: string
@@ -265,3 +342,16 @@ export interface Webidl {
265
342
  argumentLengthCheck (args: { length: number }, min: number, context: string): void
266
343
  }
267
344
 
345
+ interface WebIDLExtendedAttributes {
346
+ /** https://webidl.spec.whatwg.org/#Clamp */
347
+ Clamp: number
348
+ /** https://webidl.spec.whatwg.org/#EnforceRange */
349
+ EnforceRange: number
350
+ /** https://webidl.spec.whatwg.org/#AllowShared */
351
+ AllowShared: number
352
+ /** https://webidl.spec.whatwg.org/#AllowResizable */
353
+ AllowResizable: number
354
+ /** https://webidl.spec.whatwg.org/#LegacyNullToEmptyString */
355
+ LegacyNullToEmptyString: number
356
+ }
357
+
@@ -1,3 +1,18 @@
1
+ // biome-ignore-all lint: generated file
2
+ // biome-ignore-all assist: generated file
3
+ /* eslint-disable */
4
+ // @ts-ignore
5
+
6
+ /******************************************************************************
7
+ * GENERATED FILE, DO NOT MODIFY
8
+ * 这是生成的文件,千万不要修改
9
+ *
10
+ * @build-script/codegen - The Simple Code Generater
11
+ * https://github.com/GongT/baobao
12
+ *
13
+ ******************************************************************************/
14
+
15
+
1
16
  /// <reference types="node" />
2
17
 
3
18
  import type { Blob } from 'node:buffer'
@@ -136,7 +151,7 @@ interface ErrorEvent extends Event {
136
151
  readonly filename: string
137
152
  readonly lineno: number
138
153
  readonly colno: number
139
- readonly error: any
154
+ readonly error: Error
140
155
  }
141
156
 
142
157
  export declare const ErrorEvent: {
@@ -183,3 +198,5 @@ export declare const WebSocketError: {
183
198
  new (type: string, init?: WebSocketCloseInfo): WebSocketError
184
199
  }
185
200
 
201
+ export declare const ping: (ws: WebSocket, body?: Buffer) => void
202
+