@jaypie/testkit 1.2.40 → 1.2.42

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.
@@ -1,21 +1,39 @@
1
- export declare const getMessages: import("vitest").Mock<(...args: any[]) => any>;
1
+ export declare const getMessages: import("vitest").MockInstance<(...args: any[]) => any> & {
2
+ (...args: any[]): any;
3
+ new (...args: any[]): any;
4
+ } & {};
2
5
  export declare const getS3FileBuffer: (({ bucket, key }: {
3
6
  bucket: string;
4
7
  key: string;
5
8
  }) => Promise<Buffer>) & {
6
9
  mock: any;
7
10
  };
8
- export declare const getSecret: import("vitest").Mock<(...args: any[]) => any>;
9
- export declare const sendMessage: import("vitest").Mock<(...args: any[]) => any>;
11
+ export declare const getSecret: import("vitest").MockInstance<(...args: any[]) => any> & {
12
+ (...args: any[]): any;
13
+ new (...args: any[]): any;
14
+ } & {};
15
+ export declare const sendMessage: import("vitest").MockInstance<(...args: any[]) => any> & {
16
+ (...args: any[]): any;
17
+ new (...args: any[]): any;
18
+ } & {};
10
19
  export declare const getEnvSecret: ((key: string) => Promise<string>) & {
11
20
  mock: any;
12
21
  };
13
- export declare const loadEnvSecrets: import("vitest").Mock<(...args: any[]) => any>;
14
- export declare const getSingletonMessage: import("vitest").Mock<(...args: any[]) => any>;
22
+ export declare const loadEnvSecrets: import("vitest").MockInstance<(...args: any[]) => any> & {
23
+ (...args: any[]): any;
24
+ new (...args: any[]): any;
25
+ } & {};
26
+ export declare const getSingletonMessage: import("vitest").MockInstance<(...args: any[]) => any> & {
27
+ (...args: any[]): any;
28
+ new (...args: any[]): any;
29
+ } & {};
15
30
  export declare const getTextractJob: ((jobId: string) => Promise<any>) & {
16
31
  mock: any;
17
32
  };
18
- export declare const sendBatchMessages: import("vitest").Mock<(...args: any[]) => any>;
33
+ export declare const sendBatchMessages: import("vitest").MockInstance<(...args: any[]) => any> & {
34
+ (...args: any[]): any;
35
+ new (...args: any[]): any;
36
+ } & {};
19
37
  export declare const sendTextractJob: (({ bucket, key, featureTypes, }: {
20
38
  bucket: string;
21
39
  key: string;
@@ -26,26 +26,68 @@ export declare const UnavailableError: typeof errors.UnavailableError;
26
26
  export declare const UnhandledError: typeof errors.UnhandledError;
27
27
  export declare const UnreachableCodeError: typeof errors.UnreachableCodeError;
28
28
  export { log };
29
- export declare const cloneDeep: import("vitest").Mock<(...args: any[]) => any>;
30
- export declare const envBoolean: import("vitest").Mock<(...args: any[]) => any>;
31
- export declare const envsKey: import("vitest").Mock<(...args: any[]) => any>;
29
+ export declare const cloneDeep: import("vitest").MockInstance<(...args: any[]) => any> & {
30
+ (...args: any[]): any;
31
+ new (...args: any[]): any;
32
+ } & {};
33
+ export declare const envBoolean: import("vitest").MockInstance<(...args: any[]) => any> & {
34
+ (...args: any[]): any;
35
+ new (...args: any[]): any;
36
+ } & {};
37
+ export declare const envsKey: import("vitest").MockInstance<(...args: any[]) => any> & {
38
+ (...args: any[]): any;
39
+ new (...args: any[]): any;
40
+ } & {};
32
41
  export declare const errorFromStatusCode: ((statusCode: number, message?: string) => Error) & {
33
42
  mock: any;
34
43
  };
35
- export declare const formatError: import("vitest").Mock<(...args: any[]) => any>;
36
- export declare const generateJaypieKey: import("vitest").Mock<(...args: any[]) => any>;
37
- export declare const hashJaypieKey: import("vitest").Mock<(...args: any[]) => any>;
38
- export declare const jaypieApiKeyId: import("vitest").Mock<(...args: any[]) => any>;
44
+ export declare const formatError: import("vitest").MockInstance<(...args: any[]) => any> & {
45
+ (...args: any[]): any;
46
+ new (...args: any[]): any;
47
+ } & {};
48
+ export declare const generateJaypieKey: import("vitest").MockInstance<(...args: any[]) => any> & {
49
+ (...args: any[]): any;
50
+ new (...args: any[]): any;
51
+ } & {};
52
+ export declare const hashJaypieKey: import("vitest").MockInstance<(...args: any[]) => any> & {
53
+ (...args: any[]): any;
54
+ new (...args: any[]): any;
55
+ } & {};
56
+ export declare const jaypieApiKeyId: import("vitest").MockInstance<(...args: any[]) => any> & {
57
+ (...args: any[]): any;
58
+ new (...args: any[]): any;
59
+ } & {};
39
60
  export declare const jaypieErrorFromStatus: ((statusCode: number, message?: string) => Error) & {
40
61
  mock: any;
41
62
  };
42
- export declare const getHeaderFrom: import("vitest").Mock<(...args: any[]) => any>;
43
- export declare const getObjectKeyCaseInsensitive: import("vitest").Mock<(...args: any[]) => any>;
44
- export declare const isClass: import("vitest").Mock<(...args: any[]) => any>;
45
- export declare const isJaypieError: import("vitest").Mock<(...args: any[]) => any>;
46
- export declare const resolveValue: import("vitest").Mock<(...args: any[]) => any>;
47
- export declare const safeParseFloat: import("vitest").Mock<(...args: any[]) => any>;
48
- export declare const placeholders: import("vitest").Mock<(...args: any[]) => any>;
63
+ export declare const getHeaderFrom: import("vitest").MockInstance<(...args: any[]) => any> & {
64
+ (...args: any[]): any;
65
+ new (...args: any[]): any;
66
+ } & {};
67
+ export declare const getObjectKeyCaseInsensitive: import("vitest").MockInstance<(...args: any[]) => any> & {
68
+ (...args: any[]): any;
69
+ new (...args: any[]): any;
70
+ } & {};
71
+ export declare const isClass: import("vitest").MockInstance<(...args: any[]) => any> & {
72
+ (...args: any[]): any;
73
+ new (...args: any[]): any;
74
+ } & {};
75
+ export declare const isJaypieError: import("vitest").MockInstance<(...args: any[]) => any> & {
76
+ (...args: any[]): any;
77
+ new (...args: any[]): any;
78
+ } & {};
79
+ export declare const resolveValue: import("vitest").MockInstance<(...args: any[]) => any> & {
80
+ (...args: any[]): any;
81
+ new (...args: any[]): any;
82
+ } & {};
83
+ export declare const safeParseFloat: import("vitest").MockInstance<(...args: any[]) => any> & {
84
+ (...args: any[]): any;
85
+ new (...args: any[]): any;
86
+ } & {};
87
+ export declare const placeholders: import("vitest").MockInstance<(...args: any[]) => any> & {
88
+ (...args: any[]): any;
89
+ new (...args: any[]): any;
90
+ } & {};
49
91
  export declare const force: kit.ForceFunction;
50
92
  export declare const jaypieHandler: ((handler: Function, options?: {
51
93
  setup?: Function | Function[];
@@ -55,9 +97,18 @@ export declare const jaypieHandler: ((handler: Function, options?: {
55
97
  }) => Function) & {
56
98
  mock: any;
57
99
  };
58
- export declare const sleep: import("vitest").Mock<(...args: any[]) => any>;
59
- export declare const uuid: import("vitest").Mock<(...args: any[]) => any>;
60
- export declare const validateJaypieKey: import("vitest").Mock<(...args: any[]) => any>;
100
+ export declare const sleep: import("vitest").MockInstance<(...args: any[]) => any> & {
101
+ (...args: any[]): any;
102
+ new (...args: any[]): any;
103
+ } & {};
104
+ export declare const uuid: import("vitest").MockInstance<(...args: any[]) => any> & {
105
+ (...args: any[]): any;
106
+ new (...args: any[]): any;
107
+ } & {};
108
+ export declare const validateJaypieKey: import("vitest").MockInstance<(...args: any[]) => any> & {
109
+ (...args: any[]): any;
110
+ new (...args: any[]): any;
111
+ } & {};
61
112
  export declare const HTTP: {
62
113
  readonly ALLOW: {
63
114
  readonly ANY: "*";
@@ -16,7 +16,19 @@ export declare const DATADOG: {
16
16
  };
17
17
  SITE: string;
18
18
  };
19
- export declare const hasDatadogEnv: import("vitest").Mock<(...args: any[]) => any>;
20
- export declare const submitDistribution: import("vitest").Mock<(...args: any[]) => any>;
21
- export declare const submitMetric: import("vitest").Mock<(...args: any[]) => any>;
22
- export declare const submitMetricSet: import("vitest").Mock<(...args: any[]) => any>;
19
+ export declare const hasDatadogEnv: import("vitest").MockInstance<(...args: any[]) => any> & {
20
+ (...args: any[]): any;
21
+ new (...args: any[]): any;
22
+ } & {};
23
+ export declare const submitDistribution: import("vitest").MockInstance<(...args: any[]) => any> & {
24
+ (...args: any[]): any;
25
+ new (...args: any[]): any;
26
+ } & {};
27
+ export declare const submitMetric: import("vitest").MockInstance<(...args: any[]) => any> & {
28
+ (...args: any[]): any;
29
+ new (...args: any[]): any;
30
+ } & {};
31
+ export declare const submitMetricSet: import("vitest").MockInstance<(...args: any[]) => any> & {
32
+ (...args: any[]): any;
33
+ new (...args: any[]): any;
34
+ } & {};
@@ -1,7 +1,16 @@
1
1
  import * as original from "@jaypie/express";
2
- export declare const createLambdaHandler: import("vitest").Mock<(...args: any[]) => any>;
3
- export declare const createLambdaStreamHandler: import("vitest").Mock<(...args: any[]) => any>;
4
- export declare const getCurrentInvoke: import("vitest").Mock<(...args: any[]) => any>;
2
+ export declare const createLambdaHandler: import("vitest").MockInstance<(...args: any[]) => any> & {
3
+ (...args: any[]): any;
4
+ new (...args: any[]): any;
5
+ } & {};
6
+ export declare const createLambdaStreamHandler: import("vitest").MockInstance<(...args: any[]) => any> & {
7
+ (...args: any[]): any;
8
+ new (...args: any[]): any;
9
+ } & {};
10
+ export declare const getCurrentInvoke: import("vitest").MockInstance<(...args: any[]) => any> & {
11
+ (...args: any[]): any;
12
+ new (...args: any[]): any;
13
+ } & {};
5
14
  export declare const LambdaRequest: typeof original.LambdaRequest;
6
15
  export declare const LambdaResponseBuffered: typeof original.LambdaResponseBuffered;
7
16
  export declare const LambdaResponseStreaming: typeof original.LambdaResponseStreaming;
@@ -12,18 +21,54 @@ export declare const EXPRESS: {
12
21
  readonly ROOT: RegExp;
13
22
  };
14
23
  };
15
- export declare const badRequestRoute: import("vitest").Mock<(...args: any[]) => any>;
16
- export declare const echoRoute: import("vitest").Mock<(...args: any[]) => any>;
17
- export declare const forbiddenRoute: import("vitest").Mock<(...args: any[]) => any>;
18
- export declare const goneRoute: import("vitest").Mock<(...args: any[]) => any>;
19
- export declare const methodNotAllowedRoute: import("vitest").Mock<(...args: any[]) => any>;
20
- export declare const noContentRoute: import("vitest").Mock<(...args: any[]) => any>;
21
- export declare const notFoundRoute: import("vitest").Mock<(...args: any[]) => any>;
22
- export declare const notImplementedRoute: import("vitest").Mock<(...args: any[]) => any>;
23
- export declare const expressHttpCodeHandler: import("vitest").Mock<(...args: any[]) => any>;
24
- export declare const cors: import("vitest").Mock<(...args: any[]) => any>;
25
- export declare const fabricApiResponse: import("vitest").Mock<(...args: any[]) => any>;
26
- export declare const getCurrentInvokeUuid: import("vitest").Mock<(...args: any[]) => any>;
24
+ export declare const badRequestRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
25
+ (...args: any[]): any;
26
+ new (...args: any[]): any;
27
+ } & {};
28
+ export declare const echoRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
29
+ (...args: any[]): any;
30
+ new (...args: any[]): any;
31
+ } & {};
32
+ export declare const forbiddenRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
33
+ (...args: any[]): any;
34
+ new (...args: any[]): any;
35
+ } & {};
36
+ export declare const goneRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
37
+ (...args: any[]): any;
38
+ new (...args: any[]): any;
39
+ } & {};
40
+ export declare const methodNotAllowedRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
41
+ (...args: any[]): any;
42
+ new (...args: any[]): any;
43
+ } & {};
44
+ export declare const noContentRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
45
+ (...args: any[]): any;
46
+ new (...args: any[]): any;
47
+ } & {};
48
+ export declare const notFoundRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
49
+ (...args: any[]): any;
50
+ new (...args: any[]): any;
51
+ } & {};
52
+ export declare const notImplementedRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
53
+ (...args: any[]): any;
54
+ new (...args: any[]): any;
55
+ } & {};
56
+ export declare const expressHttpCodeHandler: import("vitest").MockInstance<(...args: any[]) => any> & {
57
+ (...args: any[]): any;
58
+ new (...args: any[]): any;
59
+ } & {};
60
+ export declare const cors: import("vitest").MockInstance<(...args: any[]) => any> & {
61
+ (...args: any[]): any;
62
+ new (...args: any[]): any;
63
+ } & {};
64
+ export declare const fabricApiResponse: import("vitest").MockInstance<(...args: any[]) => any> & {
65
+ (...args: any[]): any;
66
+ new (...args: any[]): any;
67
+ } & {};
68
+ export declare const getCurrentInvokeUuid: import("vitest").MockInstance<(...args: any[]) => any> & {
69
+ (...args: any[]): any;
70
+ new (...args: any[]): any;
71
+ } & {};
27
72
  export interface ExpressHandlerFunction {
28
73
  (req: any, res: any, ...extra: any[]): Promise<any> | any;
29
74
  }