@idlebox/stripe-node-types 24.0.14-patch.0 → 24.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assert/strict.d.ts +15 -0
- package/assert.d.ts +15 -0
- package/async_hooks.d.ts +15 -0
- package/buffer.buffer.d.ts +15 -0
- package/buffer.d.ts +15 -0
- package/child_process.d.ts +15 -0
- package/cluster.d.ts +15 -0
- package/compatibility/iterators.d.ts +15 -0
- package/console.d.ts +15 -0
- package/constants.d.ts +15 -0
- package/crypto.d.ts +15 -0
- package/dgram.d.ts +15 -0
- package/diagnostics_channel.d.ts +15 -0
- package/dns/promises.d.ts +15 -0
- package/dns.d.ts +15 -0
- package/dom-events.d.ts +15 -0
- package/domain.d.ts +15 -0
- package/events.d.ts +15 -0
- package/fs/promises.d.ts +15 -0
- package/fs.d.ts +15 -0
- package/globals.d.ts +15 -0
- package/globals.typedarray.d.ts +15 -0
- package/http.d.ts +15 -0
- package/http2.d.ts +15 -0
- package/https.d.ts +15 -0
- package/index.d.ts +15 -0
- package/inspector.d.ts +15 -0
- package/module.d.ts +15 -0
- package/my-shim.d.ts +15 -0
- package/net.d.ts +15 -0
- package/os.d.ts +15 -0
- package/package.json +1 -1
- package/path.d.ts +15 -0
- package/perf_hooks.d.ts +15 -0
- package/process.d.ts +15 -0
- package/punycode.d.ts +15 -0
- package/querystring.d.ts +15 -0
- package/readline/promises.d.ts +15 -0
- package/readline.d.ts +15 -0
- package/repl.d.ts +15 -0
- package/sea.d.ts +15 -0
- package/sqlite.d.ts +15 -0
- package/stream/consumers.d.ts +15 -0
- package/stream/promises.d.ts +15 -0
- package/stream/web.d.ts +15 -0
- package/stream.d.ts +15 -0
- package/string_decoder.d.ts +15 -0
- package/test.d.ts +15 -0
- package/timers/promises.d.ts +15 -0
- package/timers.d.ts +15 -0
- package/tls.d.ts +15 -0
- package/trace_events.d.ts +15 -0
- package/ts5.1/compatibility/disposable.d.ts +15 -0
- package/ts5.1/index.d.ts +15 -0
- package/ts5.6/buffer.buffer.d.ts +15 -0
- package/ts5.6/compatibility/float16array.d.ts +15 -0
- package/ts5.6/globals.typedarray.d.ts +15 -0
- package/ts5.6/index.d.ts +15 -0
- package/ts5.7/compatibility/float16array.d.ts +15 -0
- package/ts5.7/index.d.ts +15 -0
- package/tty.d.ts +15 -0
- package/undici-types/agent.d.ts +20 -4
- package/undici-types/api.d.ts +15 -0
- package/undici-types/balanced-pool.d.ts +15 -0
- package/undici-types/cache-interceptor.d.ts +15 -0
- package/undici-types/cache.d.ts +15 -0
- package/undici-types/client-stats.d.ts +31 -0
- package/undici-types/client.d.ts +21 -5
- package/undici-types/connector.d.ts +15 -0
- package/undici-types/content-type.d.ts +15 -0
- package/undici-types/cookies.d.ts +15 -0
- package/undici-types/diagnostics-channel.d.ts +24 -1
- package/undici-types/dispatcher.d.ts +18 -8
- package/undici-types/env-http-proxy-agent.d.ts +17 -1
- package/undici-types/errors.d.ts +20 -15
- package/undici-types/eventsource.d.ts +24 -4
- package/undici-types/fetch.d.ts +16 -0
- package/undici-types/formdata.d.ts +15 -0
- package/undici-types/global-dispatcher.d.ts +15 -0
- package/undici-types/global-origin.d.ts +15 -0
- package/undici-types/h2c-client.d.ts +15 -2
- package/undici-types/handlers.d.ts +16 -1
- package/undici-types/header.d.ts +15 -0
- package/undici-types/index.d.ts +21 -1
- package/undici-types/interceptors.d.ts +20 -0
- package/undici-types/mock-agent.d.ts +18 -0
- package/undici-types/mock-call-history.d.ts +15 -0
- package/undici-types/mock-client.d.ts +17 -0
- package/undici-types/mock-errors.d.ts +15 -0
- package/undici-types/mock-interceptor.d.ts +17 -1
- package/undici-types/mock-pool.d.ts +17 -0
- package/undici-types/package.json +1 -1
- package/undici-types/patch.d.ts +15 -0
- package/undici-types/pool-stats.d.ts +15 -0
- package/undici-types/pool.d.ts +17 -0
- package/undici-types/proxy-agent.d.ts +16 -0
- package/undici-types/readable.d.ts +15 -0
- package/undici-types/retry-agent.d.ts +15 -0
- package/undici-types/retry-handler.d.ts +24 -0
- package/undici-types/snapshot-agent.d.ts +125 -0
- package/undici-types/util.d.ts +15 -0
- package/undici-types/utility.d.ts +15 -0
- package/undici-types/webidl.d.ts +126 -36
- package/undici-types/websocket.d.ts +18 -1
- package/url.d.ts +15 -0
- package/util.d.ts +15 -0
- package/v8.d.ts +15 -0
- package/vm.d.ts +15 -0
- package/wasi.d.ts +15 -0
- package/worker_threads.d.ts +15 -0
- package/zlib.d.ts +15 -0
|
@@ -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
|
import Dispatcher from './dispatcher'
|
|
2
17
|
|
|
3
18
|
declare namespace MockCallHistoryLog {
|
|
@@ -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
|
import Client from './client'
|
|
2
17
|
import Dispatcher from './dispatcher'
|
|
3
18
|
import MockAgent from './mock-agent'
|
|
@@ -14,6 +29,8 @@ declare class MockClient extends Client implements Interceptable {
|
|
|
14
29
|
dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean
|
|
15
30
|
/** Closes the mock client and gracefully waits for enqueued requests to complete. */
|
|
16
31
|
close (): Promise<void>
|
|
32
|
+
/** Clean up all the prepared mocks. */
|
|
33
|
+
cleanMocks (): void
|
|
17
34
|
}
|
|
18
35
|
|
|
19
36
|
declare namespace MockClient {
|
|
@@ -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
|
import Errors from './errors'
|
|
2
17
|
|
|
3
18
|
export default MockErrors
|
|
@@ -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
|
import { IncomingHttpHeaders } from './header'
|
|
2
17
|
import Dispatcher from './dispatcher'
|
|
3
18
|
import { BodyInit, Headers } from './fetch'
|
|
@@ -69,7 +84,6 @@ declare namespace MockInterceptor {
|
|
|
69
84
|
headers?: Headers | Record<string, string>;
|
|
70
85
|
origin?: string;
|
|
71
86
|
body?: BodyInit | Dispatcher.DispatchOptions['body'] | null;
|
|
72
|
-
maxRedirections?: number;
|
|
73
87
|
}
|
|
74
88
|
|
|
75
89
|
export type MockResponseDataHandler<TData extends object = object> = (
|
|
@@ -84,6 +98,8 @@ declare namespace MockInterceptor {
|
|
|
84
98
|
interface Interceptable extends Dispatcher {
|
|
85
99
|
/** Intercepts any matching requests that use the same origin as this mock client. */
|
|
86
100
|
intercept(options: MockInterceptor.Options): MockInterceptor;
|
|
101
|
+
/** Clean up all the prepared mocks. */
|
|
102
|
+
cleanMocks (): void
|
|
87
103
|
}
|
|
88
104
|
|
|
89
105
|
export {
|
|
@@ -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
|
import Pool from './pool'
|
|
2
17
|
import MockAgent from './mock-agent'
|
|
3
18
|
import { Interceptable, MockInterceptor } from './mock-interceptor'
|
|
@@ -14,6 +29,8 @@ declare class MockPool extends Pool implements Interceptable {
|
|
|
14
29
|
dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean
|
|
15
30
|
/** Closes the mock pool and gracefully waits for enqueued requests to complete. */
|
|
16
31
|
close (): Promise<void>
|
|
32
|
+
/** Clean up all the prepared mocks. */
|
|
33
|
+
cleanMocks (): void
|
|
17
34
|
}
|
|
18
35
|
|
|
19
36
|
declare namespace MockPool {
|
package/undici-types/patch.d.ts
CHANGED
|
@@ -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
|
// See https://github.com/nodejs/undici/issues/1740
|
|
@@ -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
|
import Pool from './pool'
|
|
2
17
|
|
|
3
18
|
export default PoolStats
|
package/undici-types/pool.d.ts
CHANGED
|
@@ -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
|
import Client from './client'
|
|
2
17
|
import TPoolStats from './pool-stats'
|
|
3
18
|
import { URL } from 'node:url'
|
|
@@ -33,6 +48,8 @@ declare namespace Pool {
|
|
|
33
48
|
factory?(origin: URL, opts: object): Dispatcher;
|
|
34
49
|
/** The max number of clients to create. `null` if no limit. Default `null`. */
|
|
35
50
|
connections?: number | null;
|
|
51
|
+
/** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */
|
|
52
|
+
clientTtl?: number | null;
|
|
36
53
|
|
|
37
54
|
interceptors?: { Pool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options['interceptors']
|
|
38
55
|
}
|
|
@@ -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
|
import Agent from './agent'
|
|
2
17
|
import buildConnector from './connector'
|
|
3
18
|
import Dispatcher from './dispatcher'
|
|
@@ -24,6 +39,7 @@ declare namespace ProxyAgent {
|
|
|
24
39
|
requestTls?: buildConnector.BuildOptions;
|
|
25
40
|
proxyTls?: buildConnector.BuildOptions;
|
|
26
41
|
clientFactory?(origin: URL, opts: object): Dispatcher;
|
|
42
|
+
proxyTunnel?: boolean;
|
|
27
43
|
}
|
|
28
44
|
}
|
|
29
45
|
|
|
@@ -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
|
import { Readable } from 'node:stream'
|
|
2
17
|
import { Blob } from 'node:buffer'
|
|
3
18
|
|
|
@@ -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
|
import Dispatcher from './dispatcher'
|
|
2
17
|
import RetryHandler from './retry-handler'
|
|
3
18
|
|
|
@@ -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
|
import Dispatcher from './dispatcher'
|
|
2
17
|
|
|
3
18
|
export default RetryHandler
|
|
@@ -35,6 +50,15 @@ declare namespace RetryHandler {
|
|
|
35
50
|
) => void
|
|
36
51
|
|
|
37
52
|
export interface RetryOptions {
|
|
53
|
+
/**
|
|
54
|
+
* If true, the retry handler will throw an error if the request fails,
|
|
55
|
+
* this will prevent the folling handlers from being called, and will destroy the socket.
|
|
56
|
+
*
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
* @memberof RetryOptions
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
throwOnError?: boolean;
|
|
38
62
|
/**
|
|
39
63
|
* Callback to be invoked on every retry iteration.
|
|
40
64
|
* It receives the error, current state of the retry object and the options object
|
|
@@ -0,0 +1,125 @@
|
|
|
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
|
+
|
|
16
|
+
import MockAgent from './mock-agent'
|
|
17
|
+
|
|
18
|
+
declare class SnapshotRecorder {
|
|
19
|
+
constructor (options?: SnapshotRecorder.Options)
|
|
20
|
+
|
|
21
|
+
record (requestOpts: any, response: any): Promise<void>
|
|
22
|
+
findSnapshot (requestOpts: any): SnapshotRecorder.Snapshot | undefined
|
|
23
|
+
loadSnapshots (filePath?: string): Promise<void>
|
|
24
|
+
saveSnapshots (filePath?: string): Promise<void>
|
|
25
|
+
clear (): void
|
|
26
|
+
getSnapshots (): SnapshotRecorder.Snapshot[]
|
|
27
|
+
size (): number
|
|
28
|
+
resetCallCounts (): void
|
|
29
|
+
deleteSnapshot (requestOpts: any): boolean
|
|
30
|
+
getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null
|
|
31
|
+
replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void
|
|
32
|
+
destroy (): void
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare namespace SnapshotRecorder {
|
|
36
|
+
type SnapshotRecorderMode = 'record' | 'playback' | 'update'
|
|
37
|
+
|
|
38
|
+
export interface Options {
|
|
39
|
+
snapshotPath?: string
|
|
40
|
+
mode?: SnapshotRecorderMode
|
|
41
|
+
maxSnapshots?: number
|
|
42
|
+
autoFlush?: boolean
|
|
43
|
+
flushInterval?: number
|
|
44
|
+
matchHeaders?: string[]
|
|
45
|
+
ignoreHeaders?: string[]
|
|
46
|
+
excludeHeaders?: string[]
|
|
47
|
+
matchBody?: boolean
|
|
48
|
+
matchQuery?: boolean
|
|
49
|
+
caseSensitive?: boolean
|
|
50
|
+
shouldRecord?: (requestOpts: any) => boolean
|
|
51
|
+
shouldPlayback?: (requestOpts: any) => boolean
|
|
52
|
+
excludeUrls?: (string | RegExp)[]
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface Snapshot {
|
|
56
|
+
request: {
|
|
57
|
+
method: string
|
|
58
|
+
url: string
|
|
59
|
+
headers: Record<string, string>
|
|
60
|
+
body?: string
|
|
61
|
+
}
|
|
62
|
+
responses: {
|
|
63
|
+
statusCode: number
|
|
64
|
+
headers: Record<string, string>
|
|
65
|
+
body: string
|
|
66
|
+
trailers: Record<string, string>
|
|
67
|
+
}[]
|
|
68
|
+
callCount: number
|
|
69
|
+
timestamp: string
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface SnapshotInfo {
|
|
73
|
+
hash: string
|
|
74
|
+
request: {
|
|
75
|
+
method: string
|
|
76
|
+
url: string
|
|
77
|
+
headers: Record<string, string>
|
|
78
|
+
body?: string
|
|
79
|
+
}
|
|
80
|
+
responseCount: number
|
|
81
|
+
callCount: number
|
|
82
|
+
timestamp: string
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface SnapshotData {
|
|
86
|
+
hash: string
|
|
87
|
+
snapshot: Snapshot
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare class SnapshotAgent extends MockAgent {
|
|
92
|
+
constructor (options?: SnapshotAgent.Options)
|
|
93
|
+
|
|
94
|
+
saveSnapshots (filePath?: string): Promise<void>
|
|
95
|
+
loadSnapshots (filePath?: string): Promise<void>
|
|
96
|
+
getRecorder (): SnapshotRecorder
|
|
97
|
+
getMode (): SnapshotRecorder.SnapshotRecorderMode
|
|
98
|
+
clearSnapshots (): void
|
|
99
|
+
resetCallCounts (): void
|
|
100
|
+
deleteSnapshot (requestOpts: any): boolean
|
|
101
|
+
getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null
|
|
102
|
+
replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare namespace SnapshotAgent {
|
|
106
|
+
export interface Options extends MockAgent.Options {
|
|
107
|
+
mode?: SnapshotRecorder.SnapshotRecorderMode
|
|
108
|
+
snapshotPath?: string
|
|
109
|
+
maxSnapshots?: number
|
|
110
|
+
autoFlush?: boolean
|
|
111
|
+
flushInterval?: number
|
|
112
|
+
matchHeaders?: string[]
|
|
113
|
+
ignoreHeaders?: string[]
|
|
114
|
+
excludeHeaders?: string[]
|
|
115
|
+
matchBody?: boolean
|
|
116
|
+
matchQuery?: boolean
|
|
117
|
+
caseSensitive?: boolean
|
|
118
|
+
shouldRecord?: (requestOpts: any) => boolean
|
|
119
|
+
shouldPlayback?: (requestOpts: any) => boolean
|
|
120
|
+
excludeUrls?: (string | RegExp)[]
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export { SnapshotAgent, SnapshotRecorder }
|
|
125
|
+
|
package/undici-types/util.d.ts
CHANGED
|
@@ -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
|
export namespace util {
|
|
2
17
|
/**
|
|
3
18
|
* Retrieves a header name and returns its lowercase value.
|
|
@@ -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
|
type AutocompletePrimitiveBaseType<T> =
|
|
2
17
|
T extends string ? string :
|
|
3
18
|
T extends number ? number :
|