@jaypie/testkit 1.1.36 → 1.2.0-rc.0
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/dist/index.d.ts +4 -105
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/matchers/toThrowJaypieError.matcher.d.ts +4 -3
- package/dist/matchers.module.d.ts +1 -96
- package/dist/mock/core.d.ts +165 -267
- package/dist/mock/datadog.d.ts +18 -2
- package/dist/mock/index.d.ts +196 -283
- package/dist/mock/index.js +92 -695
- package/dist/mock/index.js.map +1 -1
- package/dist/mock/matchers/toThrowJaypieError.matcher.d.ts +4 -3
- package/dist/mock/matchers.module.d.ts +1 -96
- package/dist/mock/mock/core.d.ts +165 -267
- package/dist/mock/mock/datadog.d.ts +18 -2
- package/dist/mock/mock/original.d.ts +9 -16
- package/dist/mock/mockLog.module.d.ts +1 -1
- package/dist/mock/original.d.ts +9 -16
- package/dist/mockLog.module.d.ts +1 -1
- package/package.json +21 -15
package/dist/mock/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/// <reference types="vitest" />
|
|
2
2
|
/// <reference types="jest-extended" />
|
|
3
3
|
import * as vitest from 'vitest';
|
|
4
|
-
import * as
|
|
5
|
-
|
|
6
|
-
import * as original
|
|
7
|
-
import * as original$
|
|
8
|
-
|
|
9
|
-
export { FORMAT, LEVEL, Logger } from '@jaypie/logger';
|
|
4
|
+
import * as errors from '@jaypie/errors';
|
|
5
|
+
import * as kit from '@jaypie/kit';
|
|
6
|
+
import * as original from '@jaypie/llm';
|
|
7
|
+
import * as original$1 from '@jaypie/textract';
|
|
8
|
+
export { FORMAT, LEVEL, Logger, log } from '@jaypie/logger';
|
|
10
9
|
export { mongoose } from '@jaypie/mongoose';
|
|
11
10
|
|
|
12
11
|
declare const getMessages: vitest.Mock<(...args: any[]) => any>;
|
|
@@ -30,50 +29,29 @@ declare const sendTextractJob: (({ bucket, key, featureTypes, }: {
|
|
|
30
29
|
mock: any;
|
|
31
30
|
};
|
|
32
31
|
|
|
33
|
-
declare const
|
|
34
|
-
declare const
|
|
35
|
-
declare const
|
|
36
|
-
declare const
|
|
37
|
-
declare const
|
|
38
|
-
declare const
|
|
39
|
-
declare const
|
|
40
|
-
declare const
|
|
41
|
-
declare const
|
|
42
|
-
declare const
|
|
43
|
-
declare const
|
|
44
|
-
declare const
|
|
45
|
-
declare const
|
|
46
|
-
declare const
|
|
47
|
-
declare const
|
|
48
|
-
declare const
|
|
49
|
-
declare const
|
|
50
|
-
declare const
|
|
51
|
-
declare const
|
|
52
|
-
declare const
|
|
53
|
-
declare const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}): boolean;
|
|
57
|
-
array<T = unknown>(argument: unknown, options?: original.ValidationOptions): argument is T[];
|
|
58
|
-
boolean(argument: unknown, options?: original.ValidationOptions): argument is boolean;
|
|
59
|
-
class(argument: unknown, options?: original.ValidationOptions): boolean;
|
|
60
|
-
function(argument: unknown, options?: original.ValidationOptions): argument is (...args: unknown[]) => unknown;
|
|
61
|
-
null(argument: unknown, options?: original.ValidationOptions): argument is null;
|
|
62
|
-
number(argument: unknown, options?: original.ValidationOptions): argument is number;
|
|
63
|
-
object<T extends Record<string, unknown> = Record<string, unknown>>(argument: unknown, options?: original.ValidationOptions): argument is T;
|
|
64
|
-
string(argument: unknown, options?: original.ValidationOptions): argument is string;
|
|
65
|
-
undefined(argument: unknown, options?: original.ValidationOptions): argument is undefined;
|
|
66
|
-
optional: {
|
|
67
|
-
array<T = unknown>(argument: unknown, options?: original.ValidationOptions): argument is T[] | undefined;
|
|
68
|
-
boolean(argument: unknown, options?: original.ValidationOptions): argument is boolean | undefined;
|
|
69
|
-
class(argument: unknown, options?: original.ValidationOptions): boolean;
|
|
70
|
-
function(argument: unknown, options?: original.ValidationOptions): argument is ((...args: unknown[]) => unknown) | undefined;
|
|
71
|
-
null(argument: unknown, options?: original.ValidationOptions): argument is null | undefined;
|
|
72
|
-
number(argument: unknown, options?: original.ValidationOptions): argument is number | undefined;
|
|
73
|
-
object<T extends Record<string, unknown> = Record<string, unknown>>(argument: unknown, options?: original.ValidationOptions): argument is T | undefined;
|
|
74
|
-
string(argument: unknown, options?: original.ValidationOptions): argument is string | undefined;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
32
|
+
declare const JaypieError: typeof errors.JaypieError;
|
|
33
|
+
declare const BadGatewayError: typeof errors.BadGatewayError;
|
|
34
|
+
declare const BadRequestError: typeof errors.BadRequestError;
|
|
35
|
+
declare const ConfigurationError: typeof errors.ConfigurationError;
|
|
36
|
+
declare const CorsError: typeof errors.CorsError;
|
|
37
|
+
declare const ForbiddenError: typeof errors.ForbiddenError;
|
|
38
|
+
declare const GatewayTimeoutError: typeof errors.GatewayTimeoutError;
|
|
39
|
+
declare const GoneError: typeof errors.GoneError;
|
|
40
|
+
declare const IllogicalError: typeof errors.IllogicalError;
|
|
41
|
+
declare const InternalError: typeof errors.InternalError;
|
|
42
|
+
declare const MethodNotAllowedError: typeof errors.MethodNotAllowedError;
|
|
43
|
+
declare const MultiError: typeof errors.InternalError;
|
|
44
|
+
declare const NotFoundError: typeof errors.NotFoundError;
|
|
45
|
+
declare const NotImplementedError: typeof errors.NotImplementedError;
|
|
46
|
+
declare const ProjectError: typeof errors.InternalError;
|
|
47
|
+
declare const ProjectMultiError: typeof errors.InternalError;
|
|
48
|
+
declare const RejectedError: typeof errors.RejectedError;
|
|
49
|
+
declare const TeapotError: typeof errors.TeapotError;
|
|
50
|
+
declare const TooManyRequestsError: typeof errors.TooManyRequestsError;
|
|
51
|
+
declare const UnauthorizedError: typeof errors.UnauthorizedError;
|
|
52
|
+
declare const UnavailableError: typeof errors.UnavailableError;
|
|
53
|
+
declare const UnhandledError: typeof errors.UnhandledError;
|
|
54
|
+
declare const UnreachableCodeError: typeof errors.UnreachableCodeError;
|
|
77
55
|
|
|
78
56
|
declare const cloneDeep: vitest.Mock<(...args: any[]) => any>;
|
|
79
57
|
declare const envBoolean: vitest.Mock<(...args: any[]) => any>;
|
|
@@ -82,45 +60,17 @@ declare const errorFromStatusCode: ((statusCode: number, message?: string) => Er
|
|
|
82
60
|
mock: any;
|
|
83
61
|
};
|
|
84
62
|
declare const formatError: vitest.Mock<(...args: any[]) => any>;
|
|
63
|
+
declare const jaypieErrorFromStatus: ((statusCode: number, message?: string) => Error) & {
|
|
64
|
+
mock: any;
|
|
65
|
+
};
|
|
85
66
|
declare const getHeaderFrom: vitest.Mock<(...args: any[]) => any>;
|
|
86
67
|
declare const getObjectKeyCaseInsensitive: vitest.Mock<(...args: any[]) => any>;
|
|
87
68
|
declare const isClass: vitest.Mock<(...args: any[]) => any>;
|
|
88
69
|
declare const isJaypieError: vitest.Mock<(...args: any[]) => any>;
|
|
89
|
-
declare const optional: {
|
|
90
|
-
(value: unknown, type: unknown, options?: Record<string, unknown>): boolean;
|
|
91
|
-
array<T = unknown>(value: unknown): value is T[] | undefined;
|
|
92
|
-
boolean(value: unknown): value is boolean | undefined;
|
|
93
|
-
number(value: unknown): value is number | undefined;
|
|
94
|
-
object<T extends Record<string, unknown> = Record<string, unknown>>(value: unknown): value is T | undefined;
|
|
95
|
-
positive(value: unknown): value is number | undefined;
|
|
96
|
-
string(value: unknown, defaultValue?: string): value is string | undefined;
|
|
97
|
-
};
|
|
98
|
-
declare const required: {
|
|
99
|
-
(value: unknown, type: unknown, options?: Record<string, unknown>): boolean;
|
|
100
|
-
array<T = unknown>(value: unknown): value is T[];
|
|
101
|
-
boolean(value: unknown): value is boolean;
|
|
102
|
-
number(value: unknown): value is number;
|
|
103
|
-
object<T extends Record<string, unknown> = Record<string, unknown>>(value: unknown): value is T;
|
|
104
|
-
positive(value: unknown): value is number;
|
|
105
|
-
string(value: unknown, defaultValue?: string): value is string;
|
|
106
|
-
};
|
|
107
70
|
declare const resolveValue: vitest.Mock<(...args: any[]) => any>;
|
|
108
71
|
declare const safeParseFloat: vitest.Mock<(...args: any[]) => any>;
|
|
109
72
|
declare const placeholders: vitest.Mock<(...args: any[]) => any>;
|
|
110
|
-
declare const force:
|
|
111
|
-
(value: unknown, type: unknown, options?: string | {
|
|
112
|
-
key?: string;
|
|
113
|
-
maximum?: number;
|
|
114
|
-
minimum?: number;
|
|
115
|
-
nan?: boolean;
|
|
116
|
-
}): unknown;
|
|
117
|
-
array<T = unknown>(value: unknown): T[];
|
|
118
|
-
boolean(value: unknown): boolean;
|
|
119
|
-
number(value: unknown): number;
|
|
120
|
-
object<T extends Record<string, unknown> = Record<string, unknown>>(value: unknown, key?: string): T;
|
|
121
|
-
positive(value: unknown): number;
|
|
122
|
-
string(value: unknown, defaultValue?: string): string;
|
|
123
|
-
};
|
|
73
|
+
declare const force: kit.ForceFunction;
|
|
124
74
|
declare const jaypieHandler: ((handler: Function, options?: {
|
|
125
75
|
setup?: Function | Function[];
|
|
126
76
|
teardown?: Function | Function[];
|
|
@@ -131,220 +81,183 @@ declare const jaypieHandler: ((handler: Function, options?: {
|
|
|
131
81
|
};
|
|
132
82
|
declare const sleep: vitest.Mock<(...args: any[]) => any>;
|
|
133
83
|
declare const uuid: vitest.Mock<(...args: any[]) => any>;
|
|
134
|
-
declare const ERROR: {
|
|
135
|
-
MESSAGE: {
|
|
136
|
-
BAD_GATEWAY: "An unexpected error occurred on an upstream resource";
|
|
137
|
-
BAD_REQUEST: "The request was not properly formatted";
|
|
138
|
-
CONFIGURATION_ERROR: "The application responding to the request encountered a configuration error";
|
|
139
|
-
FORBIDDEN: "Access to this resource is not authorized";
|
|
140
|
-
GATEWAY_TIMEOUT: "The connection timed out waiting for an upstream resource";
|
|
141
|
-
GONE: "The requested resource is no longer available";
|
|
142
|
-
ILLOGICAL: "The application encountered an illogical condition while processing the request";
|
|
143
|
-
INTERNAL_ERROR: "An unexpected error occurred and the request was unable to complete";
|
|
144
|
-
METHOD_NOT_ALLOWED: "The requested method is not allowed";
|
|
145
|
-
NOT_FOUND: "The requested resource was not found";
|
|
146
|
-
NOT_IMPLEMENTED: "The request was understood but the resource is not implemented";
|
|
147
|
-
REJECTED: "The request was rejected prior to processing";
|
|
148
|
-
TEAPOT: "This resource is a teapot incapable of processing the request";
|
|
149
|
-
UNAUTHORIZED: "The request did not include valid authentication credentials";
|
|
150
|
-
UNAVAILABLE: "The requested resource is temporarily unavailable";
|
|
151
|
-
UNHANDLED: "An unhandled error occurred and the request was unable to complete";
|
|
152
|
-
UNREACHABLE_CODE: "The application encountered an unreachable condition while processing the request";
|
|
153
|
-
};
|
|
154
|
-
TITLE: {
|
|
155
|
-
BAD_GATEWAY: "Bad Gateway";
|
|
156
|
-
BAD_REQUEST: "Bad Request";
|
|
157
|
-
CONFIGURATION_ERROR: "Internal Configuration Error";
|
|
158
|
-
FORBIDDEN: "Forbidden";
|
|
159
|
-
GATEWAY_TIMEOUT: "Gateway Timeout";
|
|
160
|
-
GONE: "Gone";
|
|
161
|
-
INTERNAL_ERROR: "Internal Application Error";
|
|
162
|
-
METHOD_NOT_ALLOWED: "Method Not Allowed";
|
|
163
|
-
NOT_FOUND: "Not Found";
|
|
164
|
-
NOT_IMPLEMENTED: "Not Implemented";
|
|
165
|
-
REJECTED: "Request Rejected";
|
|
166
|
-
TEAPOT: "Teapot";
|
|
167
|
-
UNAUTHORIZED: "Service Unauthorized";
|
|
168
|
-
UNAVAILABLE: "Service Unavailable";
|
|
169
|
-
};
|
|
170
|
-
TYPE: {
|
|
171
|
-
BAD_GATEWAY: "BAD_GATEWAY";
|
|
172
|
-
BAD_REQUEST: "BAD_REQUEST";
|
|
173
|
-
CONFIGURATION_ERROR: "CONFIGURATION_ERROR";
|
|
174
|
-
FORBIDDEN: "FORBIDDEN";
|
|
175
|
-
GATEWAY_TIMEOUT: "GATEWAY_TIMEOUT";
|
|
176
|
-
GONE: "GONE";
|
|
177
|
-
ILLOGICAL: "ILLOGICAL";
|
|
178
|
-
INTERNAL_ERROR: "INTERNAL_ERROR";
|
|
179
|
-
METHOD_NOT_ALLOWED: "METHOD_NOT_ALLOWED";
|
|
180
|
-
MULTI_ERROR: "MULTI_ERROR";
|
|
181
|
-
NOT_FOUND: "NOT_FOUND";
|
|
182
|
-
NOT_IMPLEMENTED: "NOT_IMPLEMENTED";
|
|
183
|
-
REJECTED: "REJECTED";
|
|
184
|
-
TEAPOT: "TEAPOT";
|
|
185
|
-
UNAUTHORIZED: "UNAUTHORIZED";
|
|
186
|
-
UNAVAILABLE: "UNAVAILABLE";
|
|
187
|
-
UNHANDLED: "UNHANDLED";
|
|
188
|
-
UNKNOWN_TYPE: "UNKNOWN_TYPE";
|
|
189
|
-
UNREACHABLE_CODE: "UNREACHABLE_CODE";
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
84
|
declare const HTTP: {
|
|
193
|
-
ALLOW: {
|
|
194
|
-
ANY: "*";
|
|
85
|
+
readonly ALLOW: {
|
|
86
|
+
readonly ANY: "*";
|
|
195
87
|
};
|
|
196
|
-
CODE: {
|
|
197
|
-
OK: 200;
|
|
198
|
-
CREATED: 201;
|
|
199
|
-
ACCEPTED: 202;
|
|
200
|
-
NO_CONTENT: 204;
|
|
201
|
-
FOUND: 302;
|
|
202
|
-
BAD_REQUEST: 400;
|
|
203
|
-
UNAUTHORIZED: 401;
|
|
204
|
-
FORBIDDEN: 403;
|
|
205
|
-
NOT_FOUND: 404;
|
|
206
|
-
METHOD_NOT_ALLOWED: 405;
|
|
207
|
-
CONFLICT: 409;
|
|
208
|
-
GONE: 410;
|
|
209
|
-
TEAPOT: 418;
|
|
210
|
-
INTERNAL_ERROR: 500;
|
|
211
|
-
BAD_GATEWAY: 502;
|
|
212
|
-
UNAVAILABLE: 503;
|
|
213
|
-
GATEWAY_TIMEOUT: 504;
|
|
88
|
+
readonly CODE: {
|
|
89
|
+
readonly OK: 200;
|
|
90
|
+
readonly CREATED: 201;
|
|
91
|
+
readonly ACCEPTED: 202;
|
|
92
|
+
readonly NO_CONTENT: 204;
|
|
93
|
+
readonly FOUND: 302;
|
|
94
|
+
readonly BAD_REQUEST: 400;
|
|
95
|
+
readonly UNAUTHORIZED: 401;
|
|
96
|
+
readonly FORBIDDEN: 403;
|
|
97
|
+
readonly NOT_FOUND: 404;
|
|
98
|
+
readonly METHOD_NOT_ALLOWED: 405;
|
|
99
|
+
readonly CONFLICT: 409;
|
|
100
|
+
readonly GONE: 410;
|
|
101
|
+
readonly TEAPOT: 418;
|
|
102
|
+
readonly INTERNAL_ERROR: 500;
|
|
103
|
+
readonly BAD_GATEWAY: 502;
|
|
104
|
+
readonly UNAVAILABLE: 503;
|
|
105
|
+
readonly GATEWAY_TIMEOUT: 504;
|
|
214
106
|
};
|
|
215
|
-
CONTENT: {
|
|
216
|
-
ANY: "*/*";
|
|
217
|
-
HTML: "text/html";
|
|
218
|
-
JSON: "application/json";
|
|
219
|
-
TEXT: "text/plain";
|
|
107
|
+
readonly CONTENT: {
|
|
108
|
+
readonly ANY: "*/*";
|
|
109
|
+
readonly HTML: "text/html";
|
|
110
|
+
readonly JSON: "application/json";
|
|
111
|
+
readonly TEXT: "text/plain";
|
|
220
112
|
};
|
|
221
|
-
HEADER: {
|
|
222
|
-
ACCEPT: "Accept";
|
|
223
|
-
ACCEPT_ENCODING: "Accept-Encoding";
|
|
224
|
-
ALLOW: {
|
|
225
|
-
HEADERS: "Access-Control-Allow-Headers";
|
|
226
|
-
METHODS: "Access-Control-Allow-Methods";
|
|
227
|
-
ORIGIN: "Access-Control-Allow-Origin";
|
|
113
|
+
readonly HEADER: {
|
|
114
|
+
readonly ACCEPT: "Accept";
|
|
115
|
+
readonly ACCEPT_ENCODING: "Accept-Encoding";
|
|
116
|
+
readonly ALLOW: {
|
|
117
|
+
readonly HEADERS: "Access-Control-Allow-Headers";
|
|
118
|
+
readonly METHODS: "Access-Control-Allow-Methods";
|
|
119
|
+
readonly ORIGIN: "Access-Control-Allow-Origin";
|
|
228
120
|
};
|
|
229
|
-
AMAZON: {
|
|
230
|
-
CF_ID: "X-Amz-Cf-Id";
|
|
231
|
-
CLOUDFRONT_COUNTRY: "CloudFront-Viewer-Country";
|
|
232
|
-
CLOUDFRONT_DESKTOP: "CloudFront-Is-Desktop-Viewer";
|
|
233
|
-
CLOUDFRONT_MOBILE: "CloudFront-Is-Mobile-Viewer";
|
|
234
|
-
CLOUDFRONT_PROTOCOL: "CloudFront-Forwarded-Proto";
|
|
235
|
-
CLOUDFRONT_SMARTTV: "CloudFront-Is-SmartTV-Viewer";
|
|
236
|
-
CLOUDFRONT_TABLET: "CloudFront-Is-Tablet-Viewer";
|
|
237
|
-
TRACE_ID: "X-Amzn-Trace-Id";
|
|
121
|
+
readonly AMAZON: {
|
|
122
|
+
readonly CF_ID: "X-Amz-Cf-Id";
|
|
123
|
+
readonly CLOUDFRONT_COUNTRY: "CloudFront-Viewer-Country";
|
|
124
|
+
readonly CLOUDFRONT_DESKTOP: "CloudFront-Is-Desktop-Viewer";
|
|
125
|
+
readonly CLOUDFRONT_MOBILE: "CloudFront-Is-Mobile-Viewer";
|
|
126
|
+
readonly CLOUDFRONT_PROTOCOL: "CloudFront-Forwarded-Proto";
|
|
127
|
+
readonly CLOUDFRONT_SMARTTV: "CloudFront-Is-SmartTV-Viewer";
|
|
128
|
+
readonly CLOUDFRONT_TABLET: "CloudFront-Is-Tablet-Viewer";
|
|
129
|
+
readonly TRACE_ID: "X-Amzn-Trace-Id";
|
|
238
130
|
};
|
|
239
|
-
AUTHORIZATION: "Authorization";
|
|
240
|
-
CACHE_CONTROL: "Cache-Control";
|
|
241
|
-
CONTENT_TYPE: "Content-Type";
|
|
242
|
-
COOKIE: {
|
|
243
|
-
REQUEST: "Cookie";
|
|
244
|
-
RESPONSE: "Set-Cookie";
|
|
131
|
+
readonly AUTHORIZATION: "Authorization";
|
|
132
|
+
readonly CACHE_CONTROL: "Cache-Control";
|
|
133
|
+
readonly CONTENT_TYPE: "Content-Type";
|
|
134
|
+
readonly COOKIE: {
|
|
135
|
+
readonly REQUEST: "Cookie";
|
|
136
|
+
readonly RESPONSE: "Set-Cookie";
|
|
245
137
|
};
|
|
246
|
-
DATADOG: {
|
|
247
|
-
SESSION_ID: "X-Session-Id";
|
|
138
|
+
readonly DATADOG: {
|
|
139
|
+
readonly SESSION_ID: "X-Session-Id";
|
|
248
140
|
};
|
|
249
|
-
FORWARDED: {
|
|
250
|
-
FOR: "X-Forwarded-For";
|
|
251
|
-
PORT: "X-Forwarded-Port";
|
|
252
|
-
PROTOCOL: "X-Forwarded-Proto";
|
|
141
|
+
readonly FORWARDED: {
|
|
142
|
+
readonly FOR: "X-Forwarded-For";
|
|
143
|
+
readonly PORT: "X-Forwarded-Port";
|
|
144
|
+
readonly PROTOCOL: "X-Forwarded-Proto";
|
|
253
145
|
};
|
|
254
|
-
HOST: "Host";
|
|
255
|
-
ORIGIN: "Origin";
|
|
256
|
-
POSTMAN: {
|
|
257
|
-
TOKEN: "Postman-Token";
|
|
146
|
+
readonly HOST: "Host";
|
|
147
|
+
readonly ORIGIN: "Origin";
|
|
148
|
+
readonly POSTMAN: {
|
|
149
|
+
readonly TOKEN: "Postman-Token";
|
|
258
150
|
};
|
|
259
|
-
POWERED_BY: "X-Powered-By";
|
|
260
|
-
PROJECT: {
|
|
261
|
-
ACCOUNT: "X-Project-Account";
|
|
262
|
-
CALLER: "X-Project-Caller";
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
151
|
+
readonly POWERED_BY: "X-Powered-By";
|
|
152
|
+
readonly PROJECT: {
|
|
153
|
+
readonly ACCOUNT: "X-Project-Account";
|
|
154
|
+
readonly CALLER: "X-Project-Caller";
|
|
155
|
+
readonly CHAOS: "X-Project-Chaos";
|
|
156
|
+
readonly ENVIRONMENT: "X-Project-Environment";
|
|
157
|
+
readonly KEY: "X-Project-Key";
|
|
158
|
+
readonly HANDLER: "X-Project-Handler";
|
|
159
|
+
readonly INVOCATION: "X-Project-Invocation";
|
|
160
|
+
readonly ROOT_INVOCATION: "X-Project-Root-Invocation";
|
|
161
|
+
readonly SECRET: "X-Project-Secret";
|
|
162
|
+
readonly SEED: "X-Project-Seed";
|
|
163
|
+
readonly SESSION: "X-Project-Session";
|
|
164
|
+
readonly VERSION: "X-Project-Version";
|
|
272
165
|
};
|
|
273
|
-
SIGNATURE: {
|
|
274
|
-
ED25519: "X-Signature-Ed25519";
|
|
275
|
-
TIMESTAMP: "X-Signature-Timestamp";
|
|
166
|
+
readonly SIGNATURE: {
|
|
167
|
+
readonly ED25519: "X-Signature-Ed25519";
|
|
168
|
+
readonly TIMESTAMP: "X-Signature-Timestamp";
|
|
276
169
|
};
|
|
277
|
-
USER_AGENT: "User-Agent";
|
|
278
|
-
VIA: "Via";
|
|
170
|
+
readonly USER_AGENT: "User-Agent";
|
|
171
|
+
readonly VIA: "Via";
|
|
279
172
|
};
|
|
280
|
-
METHOD: {
|
|
281
|
-
DELETE: "DELETE";
|
|
282
|
-
HEAD: "HEAD";
|
|
283
|
-
GET: "GET";
|
|
284
|
-
OPTIONS: "OPTIONS";
|
|
285
|
-
POST: "POST";
|
|
286
|
-
PUT: "PUT";
|
|
173
|
+
readonly METHOD: {
|
|
174
|
+
readonly DELETE: "DELETE";
|
|
175
|
+
readonly HEAD: "HEAD";
|
|
176
|
+
readonly GET: "GET";
|
|
177
|
+
readonly OPTIONS: "OPTIONS";
|
|
178
|
+
readonly POST: "POST";
|
|
179
|
+
readonly PUT: "PUT";
|
|
287
180
|
};
|
|
288
|
-
RESPONSE:
|
|
181
|
+
readonly RESPONSE: {};
|
|
289
182
|
};
|
|
290
183
|
declare const JAYPIE: {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
LOGGER: "@jaypie/logger";
|
|
305
|
-
MCP: "@jaypie/mcp";
|
|
306
|
-
MOCK: "@jaypie/mock";
|
|
307
|
-
MONGOOSE: "@jaypie/mongoose";
|
|
308
|
-
TESTKIT: "@jaypie/testkit";
|
|
309
|
-
TEXTTRACT: "@jaypie/textract";
|
|
310
|
-
TYPES: "@jaypie/types";
|
|
311
|
-
WEBKIT: "@jaypie/webkit";
|
|
184
|
+
readonly ENV: {
|
|
185
|
+
readonly DATADOG_API_KEY: "DATADOG_API_KEY";
|
|
186
|
+
readonly DD_SITE: "DD_SITE";
|
|
187
|
+
readonly LOG_LEVEL: "LOG_LEVEL";
|
|
188
|
+
readonly MODULE_LOG_LEVEL: "MODULE_LOG_LEVEL";
|
|
189
|
+
readonly PROJECT_CHAOS: "PROJECT_CHAOS";
|
|
190
|
+
readonly PROJECT_ENV: "PROJECT_ENV";
|
|
191
|
+
readonly PROJECT_KEY: "PROJECT_KEY";
|
|
192
|
+
readonly PROJECT_SEED: "PROJECT_SEED";
|
|
193
|
+
readonly PROJECT_SERVICE: "PROJECT_SERVICE";
|
|
194
|
+
readonly PROJECT_SPONSOR: "PROJECT_SPONSOR";
|
|
195
|
+
readonly PROJECT_VERSION: "PROJECT_VERSION";
|
|
196
|
+
readonly SECRET_DATADOG_API_KEY: "SECRET_DATADOG_API_KEY";
|
|
312
197
|
};
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
198
|
+
readonly LIB: {
|
|
199
|
+
readonly AWS: "@jaypie/aws";
|
|
200
|
+
readonly CDK: "@jaypie/cdk";
|
|
201
|
+
readonly CONSTRUCTS: "@jaypie/constructs";
|
|
202
|
+
readonly CORE: "@jaypie/core";
|
|
203
|
+
readonly ERRORS: "@jaypie/errors";
|
|
204
|
+
readonly ESLINT: "@jaypie/eslint";
|
|
205
|
+
readonly EXPRESS: "@jaypie/express";
|
|
206
|
+
readonly FABRICATOR: "@jaypie/fabricator";
|
|
207
|
+
readonly JAYPIE: "jaypie";
|
|
208
|
+
readonly KIT: "@jaypie/kit";
|
|
209
|
+
readonly LAMBDA: "@jaypie/lambda";
|
|
210
|
+
readonly LOGGER: "@jaypie/logger";
|
|
211
|
+
readonly LLM: "@jaypie/llm";
|
|
212
|
+
readonly MATCHERS: "@jaypie/matchers";
|
|
213
|
+
readonly MCP: "@jaypie/mcp";
|
|
214
|
+
readonly MOCK: "@jaypie/mock";
|
|
215
|
+
readonly MONGOOSE: "@jaypie/mongoose";
|
|
216
|
+
readonly TESTKIT: "@jaypie/testkit";
|
|
217
|
+
readonly TEXTTRACT: "@jaypie/textract";
|
|
218
|
+
readonly TYPES: "@jaypie/types";
|
|
219
|
+
readonly WEBKIT: "@jaypie/webkit";
|
|
320
220
|
};
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
221
|
+
readonly LAYER: {
|
|
222
|
+
readonly EXPRESS: "express";
|
|
223
|
+
readonly HANDLER: "handler";
|
|
224
|
+
readonly JAYPIE: "jaypie";
|
|
225
|
+
readonly LAMBDA: "lambda";
|
|
226
|
+
readonly MODULE: "module";
|
|
227
|
+
readonly NEXTJS: "nextjs";
|
|
324
228
|
};
|
|
325
|
-
|
|
229
|
+
readonly LOGGER: {
|
|
230
|
+
readonly DEFAULT: "default";
|
|
231
|
+
readonly MODULE: "module";
|
|
232
|
+
};
|
|
233
|
+
readonly UNKNOWN: "unknown";
|
|
326
234
|
};
|
|
327
235
|
declare const PROJECT: {
|
|
328
|
-
SPONSOR: {
|
|
329
|
-
FINLAYSON: "finlaysonstudio";
|
|
330
|
-
JAYPIE: "jaypie";
|
|
331
|
-
KNOWDEV: "knowdev.studio";
|
|
236
|
+
readonly SPONSOR: {
|
|
237
|
+
readonly FINLAYSON: "finlaysonstudio";
|
|
238
|
+
readonly JAYPIE: "jaypie";
|
|
239
|
+
readonly KNOWDEV: "knowdev.studio";
|
|
332
240
|
};
|
|
333
241
|
};
|
|
334
|
-
declare const VALIDATE: {
|
|
335
|
-
ANY: "*";
|
|
336
|
-
ARRAY: ArrayConstructor;
|
|
337
|
-
BOOLEAN: BooleanConstructor;
|
|
338
|
-
CLASS: "_CLASS";
|
|
339
|
-
FUNCTION: FunctionConstructor;
|
|
340
|
-
NUMBER: NumberConstructor;
|
|
341
|
-
NULL: null;
|
|
342
|
-
OBJECT: ObjectConstructor;
|
|
343
|
-
STRING: StringConstructor;
|
|
344
|
-
UNDEFINED: "_UNDEFINED";
|
|
345
|
-
};
|
|
346
242
|
|
|
347
|
-
declare const DATADOG:
|
|
243
|
+
declare const DATADOG: {
|
|
244
|
+
ENV: {
|
|
245
|
+
DATADOG_API_KEY: string;
|
|
246
|
+
DATADOG_API_KEY_ARN: string;
|
|
247
|
+
DD_API_KEY_SECRET_ARN: string;
|
|
248
|
+
DD_SITE: string;
|
|
249
|
+
SECRET_DATADOG_API_KEY: string;
|
|
250
|
+
};
|
|
251
|
+
METRIC: {
|
|
252
|
+
TYPE: {
|
|
253
|
+
UNKNOWN: number;
|
|
254
|
+
COUNT: number;
|
|
255
|
+
RATE: number;
|
|
256
|
+
GAUGE: number;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
SITE: string;
|
|
260
|
+
};
|
|
348
261
|
declare const hasDatadogEnv: vitest.Mock<(...args: any[]) => any>;
|
|
349
262
|
declare const submitDistribution: vitest.Mock<(...args: any[]) => any>;
|
|
350
263
|
declare const submitMetric: vitest.Mock<(...args: any[]) => any>;
|
|
@@ -400,19 +313,19 @@ declare const lambdaHandler: ((handler: HandlerFunction, props?: LambdaOptions)
|
|
|
400
313
|
mock: any;
|
|
401
314
|
};
|
|
402
315
|
|
|
403
|
-
declare const LLM: typeof original
|
|
316
|
+
declare const LLM: typeof original.LLM;
|
|
404
317
|
declare const Llm: vitest.Mock<(...args: any[]) => any> & {
|
|
405
318
|
operate: vitest.Mock<(...args: any[]) => any>;
|
|
406
319
|
send: vitest.Mock<(...args: any[]) => any>;
|
|
407
320
|
};
|
|
408
|
-
declare const Toolkit: typeof original
|
|
409
|
-
declare const JaypieToolkit: typeof original
|
|
410
|
-
declare const LlmMessageRole: typeof original
|
|
411
|
-
declare const LlmMessageType: typeof original
|
|
412
|
-
declare const GeminiProvider: typeof original
|
|
413
|
-
declare const OpenRouterProvider: typeof original
|
|
414
|
-
declare const toolkit: original
|
|
415
|
-
declare const tools: Omit<original
|
|
321
|
+
declare const Toolkit: typeof original.Toolkit;
|
|
322
|
+
declare const JaypieToolkit: typeof original.JaypieToolkit;
|
|
323
|
+
declare const LlmMessageRole: typeof original.LlmMessageRole;
|
|
324
|
+
declare const LlmMessageType: typeof original.LlmMessageType;
|
|
325
|
+
declare const GeminiProvider: typeof original.GeminiProvider;
|
|
326
|
+
declare const OpenRouterProvider: typeof original.OpenRouterProvider;
|
|
327
|
+
declare const toolkit: original.JaypieToolkit;
|
|
328
|
+
declare const tools: Omit<original.LlmTool, "call">[];
|
|
416
329
|
|
|
417
330
|
interface JsonApiError {
|
|
418
331
|
errors: Array<{
|
|
@@ -489,7 +402,7 @@ declare const disconnect: vitest.Mock<(...args: any[]) => any>;
|
|
|
489
402
|
/**
|
|
490
403
|
* Mock for MarkdownPage class from @jaypie/textract
|
|
491
404
|
*/
|
|
492
|
-
declare const MarkdownPage: typeof original$
|
|
405
|
+
declare const MarkdownPage: typeof original$1.MarkdownPage;
|
|
493
406
|
/**
|
|
494
407
|
* Mock for textractJsonToMarkdown function from @jaypie/textract
|
|
495
408
|
*/
|
|
@@ -497,5 +410,5 @@ declare const textractJsonToMarkdown: vitest.Mock<(...args: any[]) => any>;
|
|
|
497
410
|
|
|
498
411
|
declare const mock: Record<string, any>;
|
|
499
412
|
|
|
500
|
-
export { BadGatewayError, BadRequestError, ConfigurationError,
|
|
413
|
+
export { BadGatewayError, BadRequestError, ConfigurationError, CorsError, DATADOG, EXPRESS, ForbiddenError, GatewayTimeoutError, GeminiProvider, GoneError, HTTP, IllogicalError, InternalError, JAYPIE, JaypieError, JaypieToolkit, LLM, Llm, LlmMessageRole, LlmMessageType, MarkdownPage, MethodNotAllowedError, MultiError, NotFoundError, NotImplementedError, OpenRouterProvider, PROJECT, ProjectError, ProjectMultiError, RejectedError, TeapotError, TooManyRequestsError, Toolkit, UnauthorizedError, UnavailableError, UnhandledError, UnreachableCodeError, badRequestRoute, cloneDeep, connect, connectFromSecretEnv, cors, createLogger, mock as default, disconnect, echoRoute, envBoolean, envsKey, errorFromStatusCode, expressHandler, expressHttpCodeHandler, forbiddenRoute, force, formatError, getEnvSecret, getHeaderFrom, getMessages, getObjectKeyCaseInsensitive, getSecret, getSingletonMessage, getTextractJob, goneRoute, hasDatadogEnv, isClass, isJaypieError, isNodeTestEnv, isProductionEnv, jaypieErrorFromStatus, jaypieHandler, lambdaHandler, methodNotAllowedRoute, noContentRoute, notFoundRoute, notImplementedRoute, placeholders, resolveValue, safeParseFloat, sendBatchMessages, sendMessage, sendTextractJob, sleep, submitDistribution, submitMetric, submitMetricSet, textractJsonToMarkdown, toolkit, tools, uuid };
|
|
501
414
|
export type { ExpressHandlerFunction, ExpressHandlerOptions, LambdaOptions };
|