ts-ag 1.1.26 → 1.2.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.
@@ -0,0 +1,1067 @@
1
+ import * as v from "valibot";
2
+ import { GenericSchema, GenericSchemaAsync, SafeParseResult } from "valibot";
3
+ import * as _$cookie from "cookie";
4
+ import { Result, ResultAsync } from "neverthrow";
5
+ import * as _$_aws_sdk_client_cognito_identity_provider0 from "@aws-sdk/client-cognito-identity-provider";
6
+ import { AdminGetUserCommandOutput, AttributeType, CognitoIdentityProviderClient } from "@aws-sdk/client-cognito-identity-provider";
7
+ import { S3Client } from "@aws-sdk/client-s3";
8
+ import { DynamoDBToolboxError } from "dynamodb-toolbox";
9
+ import { Plugin } from "unified";
10
+ import { APIGatewayProxyEventV2WithLambdaAuthorizer, APIGatewayProxyResultV2, APIGatewayRequestAuthorizerEventV2, Context } from "aws-lambda";
11
+ import * as _$_smithy_types0 from "@smithy/types";
12
+ import { PackageJson } from "type-fest";
13
+
14
+ //#region src/lambda/handlerUtils.d.ts
15
+ type SuccessCode = 200 | 201 | 204;
16
+ type ErrorCode = 400 | 401 | 403 | 404 | 409 | 500;
17
+ type ErrorBody = {
18
+ message: string;
19
+ field?: {
20
+ name: string;
21
+ value: string;
22
+ };
23
+ };
24
+ /**
25
+ * The error response for the lambda functions to return
26
+ */
27
+ type ErrorRawProxyResultV2 = {
28
+ statusCode: ErrorCode;
29
+ headers?: {
30
+ [header: string]: string;
31
+ } | undefined;
32
+ body?: ErrorBody;
33
+ isBase64Encoded?: boolean | undefined;
34
+ cookies?: string[] | undefined;
35
+ };
36
+ type OkRawProxyResultV2 = {
37
+ statusCode: SuccessCode;
38
+ headers?: {
39
+ [header: string]: string;
40
+ } | undefined;
41
+ body?: object | undefined;
42
+ isBase64Encoded?: boolean | undefined;
43
+ cookies?: string[] | undefined;
44
+ };
45
+ /**
46
+ * A type for the raw proxy result - just using an object not a stirng for the body
47
+ */
48
+ type RawProxyResultV2 = ErrorRawProxyResultV2 | OkRawProxyResultV2;
49
+ type APIGatewayHandler<E> = (event: E, context: Context) => Promise<APIGatewayProxyResultV2>;
50
+ type RawApiGatewayHandler<E extends APIGatewayProxyEventV2WithLambdaAuthorizer<any>> = (event: E, context: Context) => Promise<RawProxyResultV2>;
51
+ /**
52
+ * Wraps a handler that returns the body as an object rather than a string.
53
+ *
54
+ * This means you can achieve proper type inference on your handler and have standardised serialisation
55
+ *
56
+ * @example
57
+ ```ts
58
+ export type AuthorizerContext = {
59
+ details: JWTPayload;
60
+ } | null;
61
+
62
+ export const wrapHandler = baseWrapHandler<APIGatewayProxyEventV2WithLambdaAuthorizer<AuthorizerContext>>
63
+
64
+ */
65
+ declare function wrapHandler<E extends APIGatewayProxyEventV2WithLambdaAuthorizer<any>>(handler: RawApiGatewayHandler<E>): APIGatewayHandler<E>;
66
+ //#endregion
67
+ //#region src/lambda/client-types.d.ts
68
+ /**
69
+ * Extracts the requestInput type from an API endpoint definition
70
+ * @template E - Union type of all API endpoints
71
+ * @template P - Path string literal type (e.g. 'payments/account')
72
+ * @template M - HTTP method string literal type (e.g. 'GET', 'POST')
73
+ */
74
+ type ApiInput<E extends ApiEndpoints, P extends E['path'], M extends E['method']> = Extract<E, {
75
+ path: P;
76
+ method: M;
77
+ }>['requestInput'];
78
+ /**
79
+ * Extracts the requestOutput type from an API endpoint definition
80
+ * @template E - Union type of all API endpoints
81
+ * @template P - Path string literal type (e.g. 'payments/account')
82
+ * @template M - HTTP method string literal type (e.g. 'GET', 'POST')
83
+ */
84
+ type ApiOutput<E extends ApiEndpoints, P extends E['path'], M extends E['method']> = Extract<E, {
85
+ path: P;
86
+ method: M;
87
+ }>['requestOutput'];
88
+ /**
89
+ * Extracts the response type from an API endpoint definition
90
+ * @template E - Union type of all API endpoints
91
+ * @template P - Path string literal type (e.g. 'payments/account')
92
+ * @template M - HTTP method string literal type (e.g. 'GET', 'POST')
93
+ */
94
+ type ApiResponse<E extends ApiEndpoints, P extends E['path'], M extends E['method']> = Extract<E, {
95
+ path: P;
96
+ method: M;
97
+ }>['response'];
98
+ /**
99
+ * Extracts the sucessful body type from an API endpoint definition
100
+ * @template E - Union type of all API endpoints
101
+ * @template P - Path string literal type (e.g. 'payments/account')
102
+ * @template M - HTTP method string literal type (e.g. 'GET', 'POST')
103
+ */
104
+ type ApiSuccessBody<E extends ApiEndpoints, P extends E['path'], M extends E['method']> = Extract<Extract<E, {
105
+ path: P;
106
+ method: M;
107
+ }>['response'], {
108
+ status: SuccessCode;
109
+ }>['json'] extends (() => Promise<infer R>) ? R : unknown;
110
+ /**
111
+ * Extracts the sucessful body type from an API endpoint definition
112
+ * @template E - Union type of all API endpoints
113
+ * @template P - Path string literal type (e.g. 'payments/account')
114
+ * @template M - HTTP method string literal type (e.g. 'GET', 'POST')
115
+ */
116
+ type ApiErrorBody<E extends ApiEndpoints, P extends E['path'], M extends E['method']> = Extract<Extract<E, {
117
+ path: P;
118
+ method: M;
119
+ }>['response'], {
120
+ status: ErrorCode;
121
+ }>['json'] extends (() => Promise<infer R>) ? R : unknown;
122
+ /**
123
+ * Converts a RawApiGatewayHandler response type to a fetch like response type.
124
+ */
125
+ type ConvertToFetch<T> = T extends {
126
+ statusCode: number;
127
+ body: object;
128
+ headers: object;
129
+ } ? {
130
+ ok: T['statusCode'] extends SuccessCode ? true : false;
131
+ json: () => Promise<T['body']>;
132
+ status: T['statusCode'];
133
+ } : T;
134
+ type CleanResponse = Omit<Response, 'status' | 'ok' | 'json'>;
135
+ type FetchResponse<T extends (...args: any) => any> = ConvertToFetch<Awaited<ReturnType<T>>> & CleanResponse;
136
+ declare const HTTPMethods: readonly ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS', 'HEAD'];
137
+ type HTTPMethod = (typeof HTTPMethods)[number];
138
+ type ApiEndpoints = {
139
+ path: string;
140
+ method: HTTPMethod;
141
+ requestInput: Record<string, any> | null;
142
+ requestOutput: object | null;
143
+ response: FetchResponse<() => Promise<{
144
+ headers: object;
145
+ statusCode: SuccessCode;
146
+ body: any;
147
+ } | {
148
+ headers: object;
149
+ statusCode: ErrorCode;
150
+ body: ErrorBody;
151
+ }>>;
152
+ };
153
+ //#endregion
154
+ //#region src/lambda/client.d.ts
155
+ declare const HTTPMethods$1: readonly ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS', 'HEAD'];
156
+ type HTTPMethod$1 = (typeof HTTPMethods$1)[number];
157
+ type ApiRequestFunction<API extends ApiEndpoints> = <Path extends API['path'], Method extends Extract<API, {
158
+ path: Path;
159
+ }>['method']>(path: Path, method: Method, input: ApiInput<API, Path, Method>, headers?: HeadersInit) => Promise<ApiResponse<API, Path, Method>>;
160
+ type ApiSchema = v.GenericSchema | v.GenericSchemaAsync;
161
+ /**
162
+ * @returns A function that can be used to make API requests with type safety
163
+ * @example const clientApiRequest = createApiRequest<ApiEndpoints>();
164
+ */
165
+ declare function createApiRequest<API extends ApiEndpoints>(schemas: Partial<Record<API['path'], Partial<Record<HTTPMethod$1, ApiSchema>>>>, apiUrl: string, env: string): ApiRequestFunction<API>;
166
+ //#endregion
167
+ //#region src/lambda/errors.d.ts
168
+ /**
169
+ * These are the various errors that should be returned from anything called by a lambda function.
170
+ *
171
+ * Pass a lambda error to the errorResponse function to get a suitable response to return from the lambda handler.
172
+ *
173
+ * The separation means that they can be returned from functions that are certainly run inside a lambda fucntion but theyre not the actual return of the lambda.
174
+ * Im not sure it this is optimal behaviour and if not we will migrate to only using the errorResponse function
175
+ */
176
+ declare const error_lambda_badRequest: (message: string, fieldName?: string, fieldValue?: string) => type_error_lambda_badRequest;
177
+ declare const error_lambda_unauthorized: (message: string) => type_error_lambda_unauthorized;
178
+ declare const error_lambda_forbidden: (message: string) => type_error_lambda_forbidden;
179
+ declare const error_lambda_notFound: (message: string, fieldName?: string, fieldValue?: string) => type_error_lambda_notFound;
180
+ declare const error_lambda_conflict: (message: string, fieldName?: string, fieldValue?: string) => type_error_lambda_conflict;
181
+ declare const error_lambda_internal: (message: string) => type_error_lambda_internal;
182
+ type type_error_lambda_badRequest = {
183
+ type: 'badRequest';
184
+ message: string;
185
+ fieldName?: string;
186
+ fieldValue?: string;
187
+ };
188
+ type type_error_lambda_unauthorized = {
189
+ type: 'unauthorized';
190
+ message: string;
191
+ };
192
+ type type_error_lambda_forbidden = {
193
+ type: 'forbidden';
194
+ message: string;
195
+ };
196
+ type type_error_lambda_notFound = {
197
+ type: 'notFound';
198
+ message: string;
199
+ fieldName?: string;
200
+ fieldValue?: string;
201
+ };
202
+ type type_error_lambda_conflict = {
203
+ type: 'conflict';
204
+ message: string;
205
+ fieldName?: string;
206
+ fieldValue?: string;
207
+ };
208
+ type type_error_lambda_internal = {
209
+ type: 'internal';
210
+ message: string;
211
+ };
212
+ type type_error_lambda = type_error_lambda_badRequest | type_error_lambda_unauthorized | type_error_lambda_forbidden | type_error_lambda_notFound | type_error_lambda_conflict | type_error_lambda_internal;
213
+ //#endregion
214
+ //#region src/lambda/response.d.ts
215
+ declare function field(obj: {
216
+ fieldName?: string;
217
+ fieldValue?: string;
218
+ }): {
219
+ field?: undefined;
220
+ } | {
221
+ field: {
222
+ name: string;
223
+ value: string;
224
+ };
225
+ };
226
+ type type_error_response = Omit<ErrorRawProxyResultV2, 'headers' | 'body'> & {
227
+ headers: NonNullable<ErrorRawProxyResultV2['headers']>;
228
+ body: NonNullable<ErrorRawProxyResultV2['body']>;
229
+ };
230
+ type LambdaErrorResponse<Type extends string = '', Extras extends object = {}> = {
231
+ headers: Record<string, string>;
232
+ statusCode: 400;
233
+ body: {
234
+ message: string;
235
+ type: Type;
236
+ } & ReturnType<typeof field> & Extras;
237
+ } | {
238
+ headers: Record<string, string>;
239
+ statusCode: 401;
240
+ body: {
241
+ message: string;
242
+ type: Type;
243
+ } & Extras;
244
+ } | {
245
+ headers: Record<string, string>;
246
+ statusCode: 403;
247
+ body: {
248
+ message: string;
249
+ type: Type;
250
+ } & Extras;
251
+ } | {
252
+ headers: Record<string, string>;
253
+ statusCode: 404;
254
+ body: {
255
+ message: string;
256
+ type: Type;
257
+ } & ReturnType<typeof field> & Extras;
258
+ } | {
259
+ headers: Record<string, string>;
260
+ statusCode: 409;
261
+ body: {
262
+ message: string;
263
+ type: Type;
264
+ } & ReturnType<typeof field> & Extras;
265
+ } | {
266
+ headers: Record<string, string>;
267
+ statusCode: 500;
268
+ body: {
269
+ message: string;
270
+ type: Type;
271
+ } & Extras;
272
+ };
273
+ /**
274
+ * Maps lambda errors to responses suitable to return from lambda functions
275
+ * @param e
276
+ * @param headers
277
+ * @param type
278
+ * @param extras
279
+ * @returns
280
+ */
281
+ declare function response_error<Type extends string = '', Extras extends object = {}>(e: type_error_lambda, headers: Record<string, string>, type?: Type, extras?: Extras): LambdaErrorResponse<Type, Extras>;
282
+ /**
283
+ * Helper function to get a reasonable default error response from a valibot parse result
284
+ * @param res - The output from calling safeParse on the input
285
+ * @param headers - The headers to return in the response
286
+ */
287
+ declare function response_valibotError(res: Extract<SafeParseResult<any>, {
288
+ success: false;
289
+ }>, headers: any): LambdaErrorResponse<"", {}>;
290
+ declare function response_ok<Body extends {
291
+ message: string;
292
+ }>(body: Body, headers: any, cookies?: string[] | undefined): {
293
+ headers: any;
294
+ cookies: string[] | undefined;
295
+ statusCode: 200;
296
+ body: Body;
297
+ };
298
+ //#endregion
299
+ //#region src/lambda/server/authentication.d.ts
300
+ /**
301
+ * Wraps cookies parse along with the api gateway event with neverthrow
302
+ */
303
+ declare const getCookies: (event: APIGatewayProxyEventV2WithLambdaAuthorizer<any> | APIGatewayRequestAuthorizerEventV2) => Result<_$cookie.Cookies, type_error_lambda_unauthorized>;
304
+ //#endregion
305
+ //#region src/cognito/client.d.ts
306
+ /**
307
+ * Convenience function if process.env.AWS_REGION is set
308
+ */
309
+ declare function getCognitoClient(): CognitoIdentityProviderClient;
310
+ //#endregion
311
+ //#region src/cognito/errors.d.ts
312
+ /** Error wrapper for failures that happen while doing Cognito SDK work. */
313
+ type type_error_cognito = {
314
+ type: 'cognito';
315
+ error: unknown;
316
+ };
317
+ /** Internal reason used before converting Cognito errors into public lambda errors. */
318
+ type type_error_lambda_fromCognito_reason = 'auth' | 'forbidden' | 'invalidInput' | 'userNotFound' | 'resourceNotFound' | 'tooManyRequests' | 'passwordPolicy' | 'passwordHistory' | 'passwordResetRequired' | 'codeExpired' | 'codeMismatch' | 'delivery' | 'userExists' | 'conflict' | 'internal';
319
+ /** Per-reason public response override for endpoint-specific privacy and status choices. */
320
+ type type_error_lambda_fromCognito_override = {
321
+ message?: string;
322
+ } | Partial<type_error_lambda>;
323
+ /** Options for converting Cognito errors to lambda errors. */
324
+ type type_error_lambda_fromCognito_options = Partial<Record<type_error_lambda_fromCognito_reason, type_error_lambda_fromCognito_override>>;
325
+ /** Wrap an unknown caught value as a Cognito-domain error for neverthrow flows. */
326
+ declare function error_cognito(error: unknown): type_error_cognito;
327
+ /** Convert AWS SDK Cognito errors into a safe lambda error for API responses. */
328
+ declare function error_lambda_fromCognito(e: type_error_cognito, options?: type_error_lambda_fromCognito_options): type_error_lambda;
329
+ //#endregion
330
+ //#region src/cognito/user.d.ts
331
+ type type_userResponse = Omit<AdminGetUserCommandOutput, 'UserAttributes'> & {
332
+ UserAttributes: Record<string, string>;
333
+ };
334
+ /**
335
+ * Performs an AdminGetUserCommand and extracts the user attributes into an object
336
+ */
337
+ declare const getUserDetails: (a: {
338
+ username: string;
339
+ userPoolId: string;
340
+ }) => ResultAsync<type_userResponse, type_error_cognito>;
341
+ /**
342
+ * @returns An object of attributes with their names as keys and values as values.
343
+ */
344
+ declare function extractAttributes(attrs: AttributeType[] | undefined): Record<string, string>;
345
+ /**
346
+ * Performs an AdminGetUserCommand and extracts the user attributes into an object
347
+ */
348
+ declare const getUserGroups: (a: {
349
+ username: string;
350
+ userPoolId: string;
351
+ }) => ResultAsync<_$_aws_sdk_client_cognito_identity_provider0.AdminListGroupsForUserCommandOutput, type_error_cognito>;
352
+ //#endregion
353
+ //#region src/cognito/password.d.ts
354
+ /**
355
+ * Computes Cognito secret hash used for client-side authentication flows.
356
+ *
357
+ * @param username - Cognito username or alias.
358
+ * @param clientId - Cognito app client ID.
359
+ * @param clientSecret - Cognito app client secret.
360
+ */
361
+ declare function computeSecretHash(username: string, clientId: string, clientSecret: string): string;
362
+ /**
363
+ * Changes a user's password given a valid access token.
364
+ *
365
+ * @param accessToken - Access token for the authenticated user.
366
+ * @param oldPassword - Current password.
367
+ * @param newPassword - New password to set.
368
+ */
369
+ declare const changePassword: (accessToken: string, oldPassword: string, newPassword: string) => ResultAsync<_$_aws_sdk_client_cognito_identity_provider0.ChangePasswordCommandOutput, type_error_cognito>;
370
+ /**
371
+ * Completes a forgot-password flow by submitting the confirmation code and new password.
372
+ *
373
+ * @param a.username - Cognito username or alias.
374
+ * @param a.confirmationCode - Code sent by Cognito to the user.
375
+ * @param a.newPassword - New password to set.
376
+ * @param a.clientId - Cognito app client ID.
377
+ * @param a.clientSecret - Cognito app client secret.
378
+ */
379
+ declare const confirmForgotPassword: (a: {
380
+ username: string;
381
+ confirmationCode: string;
382
+ newPassword: string;
383
+ clientId: string;
384
+ clientSecret: string;
385
+ }) => ResultAsync<_$_aws_sdk_client_cognito_identity_provider0.ConfirmForgotPasswordCommandOutput, type_error_cognito>;
386
+ /**
387
+ * Confirms a user's signup using the confirmation code sent by Cognito.
388
+ *
389
+ * @param a.username - Cognito username or alias.
390
+ * @param a.confirmationCode - Code sent to the user after signup.
391
+ * @param a.clientId - Cognito app client ID.
392
+ * @param a.clientSecret - Cognito app client secret.
393
+ */
394
+ declare const confirmSignup: (a: {
395
+ username: string;
396
+ confirmationCode: string;
397
+ clientId: string;
398
+ clientSecret: string;
399
+ }) => ResultAsync<_$_aws_sdk_client_cognito_identity_provider0.ConfirmSignUpCommandOutput, type_error_cognito>;
400
+ /**
401
+ * Starts a forgot-password flow by sending a reset code to the user.
402
+ *
403
+ * @param a.username - Cognito username or alias.
404
+ * @param a.clientId - Cognito app client ID.
405
+ * @param a.clientSecret - Cognito app client secret.
406
+ */
407
+ declare const forgotPassword: (a: {
408
+ username: string;
409
+ clientId: string;
410
+ clientSecret: string;
411
+ }) => ResultAsync<_$_aws_sdk_client_cognito_identity_provider0.ForgotPasswordCommandOutput, type_error_cognito>;
412
+ /**
413
+ * Signs a user in with ADMIN_USER_PASSWORD_AUTH.
414
+ *
415
+ * @param a.username - Cognito username or alias.
416
+ * @param a.password - User password.
417
+ * @param a.clientId - Cognito app client ID.
418
+ * @param a.clientSecret - Cognito app client secret.
419
+ * @param a.userPoolId - Cognito user pool ID.
420
+ */
421
+ declare const login: (a: {
422
+ username: string;
423
+ password: string;
424
+ clientId: string;
425
+ clientSecret: string;
426
+ userPoolId: string;
427
+ }) => ResultAsync<_$_aws_sdk_client_cognito_identity_provider0.AdminInitiateAuthCommandOutput, type_error_cognito>;
428
+ /**
429
+ * Exchanges a refresh token for new tokens.
430
+ *
431
+ * @param a.username - Cognito username or alias used to compute secret hash.
432
+ * @param a.refreshToken - Refresh token to exchange.
433
+ * @param a.clientId - Cognito app client ID.
434
+ * @param a.clientSecret - Cognito app client secret.
435
+ * @param a.userPoolId - Cognito user pool ID.
436
+ */
437
+ declare const refreshTokens: (a: {
438
+ username: string;
439
+ refreshToken: string;
440
+ clientId: string;
441
+ clientSecret: string;
442
+ userPoolId: string;
443
+ }) => ResultAsync<_$_aws_sdk_client_cognito_identity_provider0.AdminInitiateAuthCommandOutput, type_error_cognito>;
444
+ /**
445
+ * Globally signs out a user by invalidating all refresh tokens.
446
+ *
447
+ * @param accessToken - Access token for the authenticated user.
448
+ */
449
+ declare const logout: (accessToken: string) => ResultAsync<_$_aws_sdk_client_cognito_identity_provider0.GlobalSignOutCommandOutput, type_error_cognito>;
450
+ /**
451
+ * Completes a NEW_PASSWORD_REQUIRED challenge for users who must set a new password.
452
+ *
453
+ * @param a.session - Session returned from the auth challenge.
454
+ * @param a.newPassword - New password to set.
455
+ * @param a.username - Cognito username or alias.
456
+ * @param a.clientId - Cognito app client ID.
457
+ * @param a.clientSecret - Cognito app client secret.
458
+ */
459
+ declare const resetPassword: (a: {
460
+ session: string;
461
+ newPassword: string;
462
+ username: string;
463
+ clientId: string;
464
+ clientSecret: string;
465
+ }) => ResultAsync<_$_aws_sdk_client_cognito_identity_provider0.RespondToAuthChallengeCommandOutput, type_error_cognito>;
466
+ /**
467
+ * Registers a new user with Cognito and optional custom attributes.
468
+ *
469
+ * @param a.username - Cognito username.
470
+ * @param a.password - User password.
471
+ * @param a.clientId - Cognito app client ID.
472
+ * @param a.clientSecret - Cognito app client secret.
473
+ * @param a.<attribute> - Any additional user attributes to set.
474
+ */
475
+ declare const signUp: (a: {
476
+ username: string;
477
+ password: string;
478
+ clientId: string;
479
+ clientSecret: string;
480
+ } & Record<string, unknown>) => ResultAsync<_$_aws_sdk_client_cognito_identity_provider0.SignUpCommandOutput, type_error_cognito>;
481
+ /**
482
+ * Exchanges an OAuth2 authorization code for Cognito tokens using the token endpoint.
483
+ * See https://docs.aws.amazon.com/cognito/latest/developerguide/token-endpoint.html for request/response fields and grant details.
484
+ *
485
+ * @param a.code - Authorization code returned by the hosted UI.
486
+ * @param a.redirectUri - Redirect URI registered with the app client.
487
+ * @param a.clientId - Cognito app client ID.
488
+ * @param a.clientSecret - Cognito app client secret used for Basic Auth.
489
+ * @param a.cognitoDomain - Cognito domain URL (e.g., your-domain.auth.region.amazoncognito.com).
490
+ * @returns Parsed token payload containing `access_token`, `id_token`, `refresh_token`, token type, and expiry.
491
+ */
492
+ declare const verifyOAuthToken: (a: {
493
+ code: string;
494
+ redirectUri: string;
495
+ clientId: string;
496
+ clientSecret: string;
497
+ cognitoDomain: string;
498
+ }) => ResultAsync<{
499
+ access_token: string;
500
+ id_token: string;
501
+ refresh_token: string;
502
+ token_type: string;
503
+ expires_in: number;
504
+ }, type_error_cognito>;
505
+ /**
506
+ * Exchanges an OAuth2 refresh token for Cognito tokens using the oauth token endpoint.
507
+ * See https://docs.aws.amazon.com/cognito/latest/developerguide/token-endpoint.html for request/response fields and grant details.
508
+ *
509
+ * @param a.redirectUri - Redirect URI registered with the app client.
510
+ * @param a.clientId - Cognito app client ID.
511
+ * @param a.clientSecret - Cognito app client secret used for Basic Auth.
512
+ * @param a.cognitoDomain - Cognito domain URL (e.g., your-domain.auth.region.amazoncognito.com).
513
+ * @returns Parsed token payload containing `access_token`, `id_token`, `refresh_token`, token type, and expiry.
514
+ */
515
+ declare const refreshOAuthToken: (a: {
516
+ clientId: string;
517
+ clientSecret: string;
518
+ cognitoDomain: string;
519
+ refreshToken: string;
520
+ }) => ResultAsync<{
521
+ access_token: string;
522
+ id_token: string;
523
+ refresh_token: string | undefined;
524
+ token_type: string;
525
+ expires_in: number;
526
+ }, type_error_cognito>;
527
+ //#endregion
528
+ //#region src/s3/client.d.ts
529
+ /**
530
+ * Convenience function for S3Client when process.env.REGION is set
531
+ */
532
+ declare function getS3(): S3Client;
533
+ //#endregion
534
+ //#region src/s3/errors.d.ts
535
+ /** Error wrapper for failures that happen while doing S3 SDK work. */
536
+ type type_error_s3 = {
537
+ type: 's3';
538
+ error: unknown;
539
+ };
540
+ /** Internal reason used before converting S3 errors into public lambda errors. */
541
+ type type_error_lambda_fromS3_reason = 'invalidInput' | 'objectNotFound' | 'bucketNotFound' | 'conflict' | 'throttled' | 'accessDenied' | 'internal';
542
+ /** Per-reason public response override for endpoint-specific privacy and status choices. */
543
+ type type_error_lambda_fromS3_override = {
544
+ message?: string;
545
+ } | Partial<type_error_lambda>;
546
+ /** Options for converting S3 errors to lambda errors. */
547
+ type type_error_lambda_fromS3_options = Partial<Record<type_error_lambda_fromS3_reason, type_error_lambda_fromS3_override>>;
548
+ /** Wrap an unknown caught value as an S3-domain error for neverthrow flows. */
549
+ declare function error_s3(error: unknown): type_error_s3;
550
+ /** Convert AWS SDK S3 errors into a safe lambda error for API responses. */
551
+ declare function error_lambda_fromS3(e: type_error_s3, options?: type_error_lambda_fromS3_options): type_error_lambda;
552
+ /** Returns true for normal S3 object-missing responses. */
553
+ declare function is_s3_notFound(error: unknown): boolean;
554
+ //#endregion
555
+ //#region src/s3/signedUrl.d.ts
556
+ declare const getSignedUrl: <InputTypesUnion extends object, InputType extends InputTypesUnion, OutputType extends _$_smithy_types0.MetadataBearer = _$_smithy_types0.MetadataBearer>(client: _$_aws_sdk_client_cognito_identity_provider0.__Client<any, InputTypesUnion, _$_smithy_types0.MetadataBearer, any>, command: _$_aws_sdk_client_cognito_identity_provider0.$Command<InputType, OutputType, any, InputTypesUnion, _$_smithy_types0.MetadataBearer>, options?: _$_smithy_types0.RequestPresigningArguments | undefined) => ResultAsync<string, void>;
557
+ //#endregion
558
+ //#region src/s3/object.d.ts
559
+ /**
560
+ * Retrieves an object from an S3 bucket.
561
+ *
562
+ * @param {string} bucketName - The name of the S3 bucket.
563
+ * @param {string} key - The key of the object to retrieve.
564
+ * @returns {Promise<Buffer>} A promise that resolves to the object data as a Buffer.
565
+ */
566
+ declare const getObject: (bucketName: string, key: string) => ResultAsync<Buffer<ArrayBufferLike>, type_error_s3>;
567
+ /**
568
+ * Convenience function to get an object from S3 and return it as a string.
569
+ */
570
+ declare function getObjectString(bucketName: string, key: string): ResultAsync<string, type_error_s3>;
571
+ /**
572
+ * Checks if an object exists in an s3 bucket by retrieving the HEAD data
573
+ *
574
+ * @param {string} bucketName - The name of the S3 bucket.
575
+ * @param {string} key - The key of the object to retrieve.
576
+ * @returns {Promise<Buffer>} A promise that resolves to a boolean.
577
+ */
578
+ declare const objectExists: (bucketName: string, key: string) => ResultAsync<boolean, type_error_s3>;
579
+ //#endregion
580
+ //#region src/dynamo/errors.d.ts
581
+ /** Error wrapper for failures that happen while doing DynamoDB or DynamoDB Toolbox work. */
582
+ type type_error_dynamo = {
583
+ type: 'dynamo';
584
+ error: DynamoDBToolboxError | unknown;
585
+ };
586
+ /** Internal reason used before converting Dynamo-related errors into public lambda errors. */
587
+ type type_error_lambda_fromDynamo_reason = 'invalidInput' | 'conditionalCheckFailed' | 'transactionConflict' | 'resourceNotFound' | 'throttled' | 'accessDenied' | 'internal';
588
+ /** Per-reason public response override for endpoint-specific privacy and status choices. */
589
+ type type_error_lambda_fromDynamo_override = {
590
+ message?: string;
591
+ } | Partial<type_error_lambda>;
592
+ /** Options for converting Dynamo errors to lambda errors. */
593
+ type type_error_lambda_fromDynamo_options = Partial<Record<type_error_lambda_fromDynamo_reason, type_error_lambda_fromDynamo_override>> & {
594
+ /**
595
+ * By default DynamoDB and DynamoDB Toolbox details are not returned to clients.
596
+ * Set this to true only when the Toolbox path is already a public input field.
597
+ */
598
+ includeToolboxPath?: boolean;
599
+ };
600
+ /** Wrap an unknown caught value as a Dynamo-domain error for neverthrow flows. */
601
+ declare function error_dynamo(error: unknown): type_error_dynamo;
602
+ /** Convert DynamoDB Toolbox or AWS SDK errors into a safe lambda error for API responses. */
603
+ declare function error_lambda_fromDynamo(e: type_error_dynamo, options?: type_error_lambda_fromDynamo_options): type_error_lambda;
604
+ //#endregion
605
+ //#region src/ses/errors.d.ts
606
+ /** Error wrapper for failures that happen while doing SES SDK work. */
607
+ type type_error_ses = {
608
+ type: 'ses';
609
+ error: unknown;
610
+ };
611
+ /** Internal reason used before converting SES errors into public lambda errors. */
612
+ type type_error_lambda_fromSes_reason = 'invalidInput' | 'messageRejected' | 'identityNotVerified' | 'notFound' | 'alreadyExists' | 'conflict' | 'throttled' | 'accessDenied' | 'internal';
613
+ /** Per-reason public response override for endpoint-specific privacy and status choices. */
614
+ type type_error_lambda_fromSes_override = {
615
+ message?: string;
616
+ } | Partial<type_error_lambda>;
617
+ /** Options for converting SES errors to lambda errors. */
618
+ type type_error_lambda_fromSes_options = Partial<Record<type_error_lambda_fromSes_reason, type_error_lambda_fromSes_override>>;
619
+ /** Wrap an unknown caught value as an SES-domain error for neverthrow flows. */
620
+ declare function error_ses(error: unknown): type_error_ses;
621
+ /** Convert AWS SDK SES errors into a safe lambda error for API responses. */
622
+ declare function error_lambda_fromSes(e: type_error_ses, options?: type_error_lambda_fromSes_options): type_error_lambda;
623
+ //#endregion
624
+ //#region node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts
625
+ // ## Interfaces
626
+ /**
627
+ * Info associated with nodes by the ecosystem.
628
+ *
629
+ * This space is guaranteed to never be specified by unist or specifications
630
+ * implementing unist.
631
+ * But you can use it in utilities and plugins to store data.
632
+ *
633
+ * This type can be augmented to register custom data.
634
+ * For example:
635
+ *
636
+ * ```ts
637
+ * declare module 'unist' {
638
+ * interface Data {
639
+ * // `someNode.data.myId` is typed as `number | undefined`
640
+ * myId?: number | undefined
641
+ * }
642
+ * }
643
+ * ```
644
+ */
645
+ interface Data$1 {}
646
+ /**
647
+ * One place in a source file.
648
+ */
649
+ interface Point {
650
+ /**
651
+ * Line in a source file (1-indexed integer).
652
+ */
653
+ line: number;
654
+ /**
655
+ * Column in a source file (1-indexed integer).
656
+ */
657
+ column: number;
658
+ /**
659
+ * Character in a source file (0-indexed integer).
660
+ */
661
+ offset?: number | undefined;
662
+ }
663
+ /**
664
+ * Position of a node in a source document.
665
+ *
666
+ * A position is a range between two points.
667
+ */
668
+ interface Position {
669
+ /**
670
+ * Place of the first character of the parsed source region.
671
+ */
672
+ start: Point;
673
+ /**
674
+ * Place of the first character after the parsed source region.
675
+ */
676
+ end: Point;
677
+ }
678
+ /**
679
+ * Abstract unist node.
680
+ *
681
+ * The syntactic unit in unist syntax trees are called nodes.
682
+ *
683
+ * This interface is supposed to be extended.
684
+ * If you can use {@link Literal} or {@link Parent}, you should.
685
+ * But for example in markdown, a `thematicBreak` (`***`), is neither literal
686
+ * nor parent, but still a node.
687
+ */
688
+ interface Node$1 {
689
+ /**
690
+ * Node type.
691
+ */
692
+ type: string;
693
+ /**
694
+ * Info from the ecosystem.
695
+ */
696
+ data?: Data$1 | undefined;
697
+ /**
698
+ * Position of a node in a source document.
699
+ *
700
+ * Nodes that are generated (not in the original source document) must not
701
+ * have a position.
702
+ */
703
+ position?: Position | undefined;
704
+ }
705
+ //#endregion
706
+ //#region node_modules/.pnpm/@types+hast@3.0.4/node_modules/@types/hast/index.d.ts
707
+ // ## Interfaces
708
+ /**
709
+ * Info associated with hast nodes by the ecosystem.
710
+ *
711
+ * This space is guaranteed to never be specified by unist or hast.
712
+ * But you can use it in utilities and plugins to store data.
713
+ *
714
+ * This type can be augmented to register custom data.
715
+ * For example:
716
+ *
717
+ * ```ts
718
+ * declare module 'hast' {
719
+ * interface Data {
720
+ * // `someNode.data.myId` is typed as `number | undefined`
721
+ * myId?: number | undefined
722
+ * }
723
+ * }
724
+ * ```
725
+ */
726
+ interface Data extends Data$1 {}
727
+ /**
728
+ * Info associated with an element.
729
+ */
730
+ interface Properties {
731
+ [PropertyName: string]: boolean | number | string | null | undefined | Array<string | number>;
732
+ }
733
+ // ## Content maps
734
+ /**
735
+ * Union of registered hast nodes that can occur in {@link Element}.
736
+ *
737
+ * To register mote custom hast nodes, add them to {@link ElementContentMap}.
738
+ * They will be automatically added here.
739
+ */
740
+ type ElementContent = ElementContentMap[keyof ElementContentMap];
741
+ /**
742
+ * Registry of all hast nodes that can occur as children of {@link Element}.
743
+ *
744
+ * For a union of all {@link Element} children, see {@link ElementContent}.
745
+ */
746
+ interface ElementContentMap {
747
+ comment: Comment;
748
+ element: Element;
749
+ text: Text;
750
+ }
751
+ /**
752
+ * Union of registered hast nodes that can occur in {@link Root}.
753
+ *
754
+ * To register custom hast nodes, add them to {@link RootContentMap}.
755
+ * They will be automatically added here.
756
+ */
757
+ type RootContent = RootContentMap[keyof RootContentMap];
758
+ /**
759
+ * Registry of all hast nodes that can occur as children of {@link Root}.
760
+ *
761
+ * > 👉 **Note**: {@link Root} does not need to be an entire document.
762
+ * > it can also be a fragment.
763
+ *
764
+ * For a union of all {@link Root} children, see {@link RootContent}.
765
+ */
766
+ interface RootContentMap {
767
+ comment: Comment;
768
+ doctype: Doctype;
769
+ element: Element;
770
+ text: Text;
771
+ }
772
+ // ## Abstract nodes
773
+ /**
774
+ * Abstract hast node.
775
+ *
776
+ * This interface is supposed to be extended.
777
+ * If you can use {@link Literal} or {@link Parent}, you should.
778
+ * But for example in HTML, a `Doctype` is neither literal nor parent, but
779
+ * still a node.
780
+ *
781
+ * To register custom hast nodes, add them to {@link RootContentMap} and other
782
+ * places where relevant (such as {@link ElementContentMap}).
783
+ *
784
+ * For a union of all registered hast nodes, see {@link Nodes}.
785
+ */
786
+ interface Node extends Node$1 {
787
+ /**
788
+ * Info from the ecosystem.
789
+ */
790
+ data?: Data | undefined;
791
+ }
792
+ /**
793
+ * Abstract hast node that contains the smallest possible value.
794
+ *
795
+ * This interface is supposed to be extended if you make custom hast nodes.
796
+ *
797
+ * For a union of all registered hast literals, see {@link Literals}.
798
+ */
799
+ interface Literal extends Node {
800
+ /**
801
+ * Plain-text value.
802
+ */
803
+ value: string;
804
+ }
805
+ /**
806
+ * Abstract hast node that contains other hast nodes (*children*).
807
+ *
808
+ * This interface is supposed to be extended if you make custom hast nodes.
809
+ *
810
+ * For a union of all registered hast parents, see {@link Parents}.
811
+ */
812
+ interface Parent extends Node {
813
+ /**
814
+ * List of children.
815
+ */
816
+ children: RootContent[];
817
+ }
818
+ // ## Concrete nodes
819
+ /**
820
+ * HTML comment.
821
+ */
822
+ interface Comment extends Literal {
823
+ /**
824
+ * Node type of HTML comments in hast.
825
+ */
826
+ type: "comment";
827
+ /**
828
+ * Data associated with the comment.
829
+ */
830
+ data?: CommentData | undefined;
831
+ }
832
+ /**
833
+ * Info associated with hast comments by the ecosystem.
834
+ */
835
+ interface CommentData extends Data {}
836
+ /**
837
+ * HTML document type.
838
+ */
839
+ interface Doctype extends Node$1 {
840
+ /**
841
+ * Node type of HTML document types in hast.
842
+ */
843
+ type: "doctype";
844
+ /**
845
+ * Data associated with the doctype.
846
+ */
847
+ data?: DoctypeData | undefined;
848
+ }
849
+ /**
850
+ * Info associated with hast doctypes by the ecosystem.
851
+ */
852
+ interface DoctypeData extends Data {}
853
+ /**
854
+ * HTML element.
855
+ */
856
+ interface Element extends Parent {
857
+ /**
858
+ * Node type of elements.
859
+ */
860
+ type: "element";
861
+ /**
862
+ * Tag name (such as `'body'`) of the element.
863
+ */
864
+ tagName: string;
865
+ /**
866
+ * Info associated with the element.
867
+ */
868
+ properties: Properties;
869
+ /**
870
+ * Children of element.
871
+ */
872
+ children: ElementContent[];
873
+ /**
874
+ * When the `tagName` field is `'template'`, a `content` field can be
875
+ * present.
876
+ */
877
+ content?: Root | undefined;
878
+ /**
879
+ * Data associated with the element.
880
+ */
881
+ data?: ElementData | undefined;
882
+ }
883
+ /**
884
+ * Info associated with hast elements by the ecosystem.
885
+ */
886
+ interface ElementData extends Data {}
887
+ /**
888
+ * Document fragment or a whole document.
889
+ *
890
+ * Should be used as the root of a tree and must not be used as a child.
891
+ *
892
+ * Can also be used as the value for the content field on a `'template'` element.
893
+ */
894
+ interface Root extends Parent {
895
+ /**
896
+ * Node type of hast root.
897
+ */
898
+ type: "root";
899
+ /**
900
+ * Children of root.
901
+ */
902
+ children: RootContent[];
903
+ /**
904
+ * Data associated with the hast root.
905
+ */
906
+ data?: RootData | undefined;
907
+ }
908
+ /**
909
+ * Info associated with hast root nodes by the ecosystem.
910
+ */
911
+ interface RootData extends Data {}
912
+ /**
913
+ * HTML character data (plain text).
914
+ */
915
+ interface Text extends Literal {
916
+ /**
917
+ * Node type of HTML character data (plain text) in hast.
918
+ */
919
+ type: "text";
920
+ /**
921
+ * Data associated with the text.
922
+ */
923
+ data?: TextData | undefined;
924
+ }
925
+ /**
926
+ * Info associated with hast texts by the ecosystem.
927
+ */
928
+ interface TextData extends Data {}
929
+ //#endregion
930
+ //#region src/rehype/flat-toc.d.ts
931
+ /**
932
+ * This rehype plugin extracts the headings from the markdown elements but also the raw elements.
933
+ * So we get html headings in the TOC as well
934
+ *
935
+ * It sets the file.data.fm.toc to a flat map of the toc
936
+ */
937
+ declare const extractToc: Plugin<[], Root>;
938
+ type Toc = TocEntry[];
939
+ type TocEntry = {
940
+ level: number;
941
+ id: string;
942
+ value: string;
943
+ };
944
+ /**
945
+ * Parses raw HTML and returns a flat array of all heading (h1-h6) elements as HAST nodes.
946
+ */
947
+ declare function parseRaw(raw: string): Element[];
948
+ //#endregion
949
+ //#region src/utils/valibot.d.ts
950
+ declare function isSchema(x: unknown): x is GenericSchema;
951
+ declare function unwrap(schema: GenericSchema): GenericSchema;
952
+ type GetSchemaByPathOptions = {
953
+ /**
954
+ * When a union/variant cannot be narrowed by the path segment,
955
+ * choose index `preferOption` (default 0). Set to -1 to return undefined instead.
956
+ */
957
+ preferOption?: number;
958
+ };
959
+ declare function getSchemaByPath(root: GenericSchema | GenericSchemaAsync, path: string, opts?: GetSchemaByPathOptions): GenericSchema | undefined;
960
+ //#endregion
961
+ //#region src/types/deep.d.ts
962
+ /**
963
+ * @example
964
+ * type HomeOverridden = DeepOverride<Home, {
965
+ * test: {
966
+ * featuredImages: never; // Removing the property
967
+ * meta: {
968
+ * updatedAt: string; // Changing the type
969
+ * };
970
+ * };
971
+ * }>;
972
+ */
973
+ type DeepOverride<T, R> = { [K in keyof T]: K extends keyof R ? R[K] extends infer RK ? RK extends Record<string, any> ? T[K] extends Record<string, any> ? DeepOverride<T[K], RK> : RK : RK extends Array<infer RU> ? T[K] extends Array<infer TU> ? Array<DeepOverride<TU, RU>> : RK : RK : never : T[K] };
974
+ type Primitive = string | number | boolean | bigint | symbol | null | undefined | Date | RegExp | Function;
975
+ type DeepPartial<T> = T extends Primitive ? T : T extends readonly (infer U)[] ? readonly U[] : T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T;
976
+ type DeepRequired<T> = { [P in keyof T]-?: NonNullable<T[P] extends object ? (T[P] extends Function ? T[P] : DeepRequired<T[P]>) : T[P]> };
977
+ /**
978
+ * Recursively readonly
979
+ */
980
+ type DeepReadonly<T> = T extends ((...args: any) => any) ? T : T extends object ? { readonly [K in keyof T]: DeepReadonly<T[K]> } : T;
981
+ //#endregion
982
+ //#region src/utils/object.d.ts
983
+ /**
984
+ * Sets the value for an object by its dot path
985
+ * @param obj - any object
986
+ * @param path - the dot path eg. key1.0.1.key2
987
+ * @param value - any value
988
+ * @returns - the modified object
989
+ */
990
+ declare function setByPath<T extends object>(obj: T, path: string, value: any): T;
991
+ /**
992
+ * Gets the value from an object by its dot path
993
+ * @param obj - any object
994
+ * @param path - the dot path eg. key1.0.1.key2
995
+ * @returns - the value at the given path or undefined
996
+ */
997
+ declare function getByPath<T extends object>(obj: T, path: string): any;
998
+ /**
999
+ * Returns a deep "patch" object containing only the fields from `b`
1000
+ * that are different from `a`.
1001
+ *
1002
+ * Behavior:
1003
+ * - Only keys from `b` can appear in the result.
1004
+ * - New keys in `b` are included.
1005
+ * - Changed primitive/array values are included as the value from `b`.
1006
+ * - For nested plain objects, it recurses and returns only the differing nested fields.
1007
+ * - Arrays are treated as atomic (if different, the whole array from `b` is returned).
1008
+ *
1009
+ * Typing:
1010
+ * - Output is `DeepPartial<B>` because only a subset of `b`'s shape is returned.
1011
+ *
1012
+ * @template A
1013
+ * @template B
1014
+ * @param {A} a - Base/original object (can be a different shape than `b`).
1015
+ * @param {B} b - Updated object; output keys come from this object.
1016
+ * @returns {DeepPartial<B>} Deep partial of `b` containing only differences vs `a`.
1017
+ */
1018
+ declare const deepDiff: <A extends object, B extends object>(a: A, b: B) => DeepPartial<B>;
1019
+ /**
1020
+ * Deeply prunes `source` to match the *shape* of `shape`.
1021
+ *
1022
+ * Rules:
1023
+ * - Only keys that exist on `shape` are kept.
1024
+ * - Pruning is deep for nested plain objects.
1025
+ * - Arrays are supported by using the first element of `shape` as the element-shape.
1026
+ * - If `shape` is `[]`, returns `[]` (drops all elements).
1027
+ * - Primitive values are kept as-is (no type coercion) if the key exists in `shape`.
1028
+ * - If `shape` expects an object/array but `source` is not compatible, returns an empty object/array of that shape.
1029
+ *
1030
+ * @typeParam S - Source object type.
1031
+ * @typeParam Sh - Shape object type.
1032
+ * @param source - The object to prune.
1033
+ * @param shape - The object whose keys/structure are the allowlist.
1034
+ * @returns A new value derived from `source`, containing only fields present in `shape`, pruned deeply.
1035
+ *
1036
+ * @example
1037
+ * const source = { a: 1, b: { c: 2, d: 3 }, e: [ { x: 1, y: 2 }, { x: 3, y: 4 } ], z: 9 };
1038
+ * const shape = { a: 0, b: { c: 0 }, e: [ { x: 0 } ] };
1039
+ * // => { a: 1, b: { c: 2 }, e: [ { x: 1 }, { x: 3 } ] }
1040
+ * const out = pruneToShape(source, shape);
1041
+ */
1042
+ declare function pruneToShape<S, Sh>(source: S, shape: Sh): Sh;
1043
+ //#endregion
1044
+ //#region src/utils/fs.d.ts
1045
+ /**
1046
+ * @returns true if a filepath exists
1047
+ */
1048
+ declare function exists(filePath: string): Promise<boolean>;
1049
+ /**
1050
+ * Writes data to a filepath if it is different
1051
+ * @returns true if the file is written to
1052
+ */
1053
+ declare function writeIfDifferent(filePath: string, newData: string): Promise<boolean>;
1054
+ /**
1055
+ * @returns the json object packageJson or undefined if it doesnt exist
1056
+ */
1057
+ declare function readPackageJson(filePath: string): Promise<PackageJson | undefined>;
1058
+ //#endregion
1059
+ //#region src/utils/errors.d.ts
1060
+ declare function isRecord(value: unknown): value is Record<string, unknown>;
1061
+ declare function getErrorName(error: unknown): string | undefined;
1062
+ //#endregion
1063
+ //#region src/types/safe.d.ts
1064
+ type SafeOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
1065
+ //#endregion
1066
+ export { APIGatewayHandler, ApiEndpoints, ApiErrorBody, ApiInput, ApiOutput, ApiRequestFunction, ApiResponse, ApiSchema, ApiSuccessBody, CleanResponse, DeepOverride, DeepPartial, DeepReadonly, DeepRequired, ErrorBody, ErrorCode, ErrorRawProxyResultV2, FetchResponse, GetSchemaByPathOptions, HTTPMethod, HTTPMethods, LambdaErrorResponse, OkRawProxyResultV2, RawApiGatewayHandler, RawProxyResultV2, SafeOmit, SuccessCode, Toc, TocEntry, changePassword, computeSecretHash, confirmForgotPassword, confirmSignup, createApiRequest, deepDiff, error_cognito, error_dynamo, error_lambda_badRequest, error_lambda_conflict, error_lambda_forbidden, error_lambda_fromCognito, error_lambda_fromDynamo, error_lambda_fromS3, error_lambda_fromSes, error_lambda_internal, error_lambda_notFound, error_lambda_unauthorized, error_s3, error_ses, exists, extractAttributes, extractToc, forgotPassword, getByPath, getCognitoClient, getCookies, getErrorName, getObject, getObjectString, getS3, getSchemaByPath, getSignedUrl, getUserDetails, getUserGroups, isRecord, isSchema, is_s3_notFound, login, logout, objectExists, parseRaw, pruneToShape, readPackageJson, refreshOAuthToken, refreshTokens, resetPassword, response_error, response_ok, response_valibotError, setByPath, signUp, type_error_cognito, type_error_dynamo, type_error_lambda, type_error_lambda_badRequest, type_error_lambda_conflict, type_error_lambda_forbidden, type_error_lambda_fromCognito_options, type_error_lambda_fromCognito_reason, type_error_lambda_fromDynamo_options, type_error_lambda_fromDynamo_reason, type_error_lambda_fromS3_options, type_error_lambda_fromS3_reason, type_error_lambda_fromSes_options, type_error_lambda_fromSes_reason, type_error_lambda_internal, type_error_lambda_notFound, type_error_lambda_unauthorized, type_error_response, type_error_s3, type_error_ses, type_userResponse, unwrap, verifyOAuthToken, wrapHandler, writeIfDifferent };
1067
+ //# sourceMappingURL=worker.d.mts.map