ts-ag 0.0.1-dev.2 → 1.0.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/browser.d.ts +1 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +1 -0
- package/dist/cognito/client.d.ts +6 -0
- package/dist/cognito/client.d.ts.map +1 -0
- package/dist/cognito/client.js +10 -0
- package/dist/cognito/errors.d.ts +95 -0
- package/dist/cognito/errors.d.ts.map +1 -0
- package/dist/cognito/errors.js +128 -0
- package/dist/cognito/index.d.ts +5 -0
- package/dist/cognito/index.d.ts.map +1 -0
- package/dist/cognito/index.js +4 -0
- package/dist/cognito/password.d.ts +53 -0
- package/dist/cognito/password.d.ts.map +1 -0
- package/dist/cognito/password.js +161 -0
- package/dist/cognito/user.d.ts +14 -0
- package/dist/cognito/user.d.ts.map +1 -0
- package/dist/cognito/user.js +34 -0
- package/dist/dynamo/errors.d.ts +9 -0
- package/dist/dynamo/errors.d.ts.map +1 -0
- package/dist/dynamo/errors.js +7 -0
- package/dist/dynamo/index.d.ts +2 -0
- package/dist/dynamo/index.d.ts.map +1 -0
- package/dist/dynamo/index.js +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/lambda/authentication.d.ts +2 -0
- package/dist/lambda/authentication.d.ts.map +1 -0
- package/dist/lambda/authentication.js +1 -0
- package/dist/lambda/browser.d.ts +2 -0
- package/dist/lambda/browser.d.ts.map +1 -1
- package/dist/lambda/browser.js +2 -0
- package/dist/lambda/client-types.d.ts +19 -19
- package/dist/lambda/client-types.d.ts.map +1 -1
- package/dist/lambda/client-types.js +9 -1
- package/dist/lambda/client.d.ts.map +1 -1
- package/dist/lambda/client.js +7 -2
- package/dist/lambda/errors.d.ts +19 -19
- package/dist/lambda/errors.d.ts.map +1 -1
- package/dist/lambda/errors.js +12 -12
- package/dist/lambda/handlerUtils.d.ts +8 -3
- package/dist/lambda/handlerUtils.d.ts.map +1 -1
- package/dist/lambda/handlerUtils.js +3 -2
- package/dist/lambda/index.d.ts +1 -0
- package/dist/lambda/index.d.ts.map +1 -1
- package/dist/lambda/index.js +2 -0
- package/dist/lambda/response.d.ts +48 -95
- package/dist/lambda/response.d.ts.map +1 -1
- package/dist/lambda/response.js +42 -18
- package/dist/lambda/server/authentication.d.ts +10 -0
- package/dist/lambda/server/authentication.d.ts.map +1 -0
- package/dist/lambda/server/authentication.js +24 -0
- package/dist/s3/client.d.ts +6 -0
- package/dist/s3/client.d.ts.map +1 -0
- package/dist/s3/client.js +7 -0
- package/dist/s3/errors.d.ts +7 -0
- package/dist/s3/errors.d.ts.map +1 -0
- package/dist/s3/errors.js +6 -0
- package/dist/s3/index.d.ts +5 -0
- package/dist/s3/index.d.ts.map +1 -0
- package/dist/s3/index.js +4 -0
- package/dist/s3/object.d.ts +17 -0
- package/dist/s3/object.d.ts.map +1 -0
- package/dist/s3/object.js +32 -0
- package/dist/s3/signedUrl.d.ts +3 -0
- package/dist/s3/signedUrl.d.ts.map +1 -0
- package/dist/s3/signedUrl.js +3 -0
- package/dist/scripts/clean.js +30 -59
- package/dist/scripts/ts-alias.d.ts +3 -0
- package/dist/scripts/ts-alias.d.ts.map +1 -0
- package/dist/scripts/ts-alias.js +167 -0
- package/dist/ses/errors.d.ts +4 -0
- package/dist/ses/errors.d.ts.map +1 -0
- package/dist/ses/errors.js +3 -0
- package/dist/ses/index.d.ts +2 -0
- package/dist/ses/index.d.ts.map +1 -0
- package/dist/ses/index.js +1 -0
- package/dist/ts-alias.js +0 -0
- package/dist/types/deep.d.ts +24 -0
- package/dist/types/deep.d.ts.map +1 -0
- package/dist/types/deep.js +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/safe.d.ts +2 -0
- package/dist/types/safe.d.ts.map +1 -0
- package/dist/types/safe.js +1 -0
- package/dist/utils/fs.d.ts +2 -1
- package/dist/utils/fs.d.ts.map +1 -1
- package/dist/utils/fs.js +3 -1
- package/package.json +31 -22
- package/src/browser.ts +3 -1
- package/src/cognito/client.ts +11 -0
- package/src/cognito/errors.ts +175 -0
- package/src/cognito/index.ts +5 -0
- package/src/cognito/password.ts +233 -0
- package/src/cognito/user.ts +46 -0
- package/src/dynamo/errors.ts +11 -0
- package/src/dynamo/index.ts +1 -0
- package/src/index.ts +8 -0
- package/src/lambda/browser.ts +2 -0
- package/src/lambda/client-types.ts +55 -29
- package/src/lambda/client.ts +7 -2
- package/src/lambda/errors.ts +25 -25
- package/src/lambda/handlerUtils.ts +30 -25
- package/src/lambda/index.ts +3 -0
- package/src/lambda/response.ts +90 -26
- package/src/lambda/server/authentication.ts +32 -0
- package/src/s3/client.ts +8 -0
- package/src/s3/errors.ts +6 -0
- package/src/s3/index.ts +6 -0
- package/src/s3/object.ts +37 -0
- package/src/s3/signedUrl.ts +4 -0
- package/src/scripts/clean.ts +34 -68
- package/src/ses/errors.ts +3 -0
- package/src/ses/index.ts +1 -0
- package/src/types/deep.ts +43 -0
- package/src/types/index.ts +2 -0
- package/src/types/safe.ts +1 -0
- package/src/utils/fs.ts +4 -2
- /package/src/{ts-alias.ts → scripts/ts-alias.ts} +0 -0
package/dist/browser.d.ts
CHANGED
package/dist/browser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,kBAAkB,CAAC"}
|
package/dist/browser.js
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
|
+
/**
|
|
3
|
+
* Convenience function if process.env.REGION is set
|
|
4
|
+
*/
|
|
5
|
+
export declare function getCognitoClient(): CognitoIdentityProviderClient;
|
|
6
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/cognito/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAC;AAE1F;;GAEG;AACH,wBAAgB,gBAAgB,kCAK/B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
|
+
/**
|
|
3
|
+
* Convenience function if process.env.REGION is set
|
|
4
|
+
*/
|
|
5
|
+
export function getCognitoClient() {
|
|
6
|
+
return new CognitoIdentityProviderClient({
|
|
7
|
+
region: process.env.REGION,
|
|
8
|
+
endpoint: `https://cognito-idp.${process.env.REGION}.amazonaws.com`
|
|
9
|
+
});
|
|
10
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export declare const error_cognito_forbidden: {
|
|
2
|
+
type: "cognito_forbidden";
|
|
3
|
+
};
|
|
4
|
+
export declare const error_cognito_internal: {
|
|
5
|
+
type: "cognito_internal";
|
|
6
|
+
};
|
|
7
|
+
export declare const error_cognito_role: {
|
|
8
|
+
type: "cognito_role";
|
|
9
|
+
};
|
|
10
|
+
export declare const error_cognito_input: {
|
|
11
|
+
type: "cognito_input";
|
|
12
|
+
};
|
|
13
|
+
export declare const error_cognito_auth: {
|
|
14
|
+
type: "cognito_auth";
|
|
15
|
+
};
|
|
16
|
+
export declare const error_cognito_notFound: {
|
|
17
|
+
type: "cognito_notFound";
|
|
18
|
+
};
|
|
19
|
+
export declare const error_cognito_userNotFound: {
|
|
20
|
+
type: "cognito_userNotFound";
|
|
21
|
+
};
|
|
22
|
+
export declare const error_cognito_tooManyRequests: {
|
|
23
|
+
type: "cognito_tooManyRequests";
|
|
24
|
+
};
|
|
25
|
+
export declare const error_cognito_passwordPolicy: {
|
|
26
|
+
type: "cognito_passwordPolicy";
|
|
27
|
+
};
|
|
28
|
+
export declare const error_cognito_passwordHistory: {
|
|
29
|
+
type: "cognito_passwordHistory";
|
|
30
|
+
};
|
|
31
|
+
export declare const error_cognito_passwordResetRequired: {
|
|
32
|
+
type: "cognito_passwordResetRequired";
|
|
33
|
+
};
|
|
34
|
+
export declare const error_cognito_codeExpired: {
|
|
35
|
+
type: "cognito_codeExpired";
|
|
36
|
+
};
|
|
37
|
+
export declare const error_cognito_codeMismatch: {
|
|
38
|
+
type: "cognito_codeMismatch";
|
|
39
|
+
};
|
|
40
|
+
export declare const error_cognito_delivery: {
|
|
41
|
+
type: "cognito_delivery";
|
|
42
|
+
};
|
|
43
|
+
export declare const error_cognito_userExists: {
|
|
44
|
+
type: "cognito_userExists";
|
|
45
|
+
};
|
|
46
|
+
export type type_error_cognito_forbidden = typeof error_cognito_forbidden;
|
|
47
|
+
export type type_error_cognito_internal = typeof error_cognito_internal;
|
|
48
|
+
export type type_error_cognito_role = typeof error_cognito_role;
|
|
49
|
+
export type type_error_cognito_input = typeof error_cognito_input;
|
|
50
|
+
export type type_error_cognito_auth = typeof error_cognito_auth;
|
|
51
|
+
export type type_error_cognito_notFound = typeof error_cognito_notFound;
|
|
52
|
+
export type type_error_cognito_userNotFound = typeof error_cognito_userNotFound;
|
|
53
|
+
export type type_error_cognito_tooManyRequests = typeof error_cognito_tooManyRequests;
|
|
54
|
+
export type type_error_cognito_passwordPolicy = typeof error_cognito_passwordPolicy;
|
|
55
|
+
export type type_error_cognito_passwordHistory = typeof error_cognito_passwordHistory;
|
|
56
|
+
export type type_error_cognito_passwordResetRequired = typeof error_cognito_passwordResetRequired;
|
|
57
|
+
export type type_error_cognito_codeExpired = typeof error_cognito_codeExpired;
|
|
58
|
+
export type type_error_cognito_codeMismatch = typeof error_cognito_codeMismatch;
|
|
59
|
+
export type type_error_cognito_delivery = typeof error_cognito_delivery;
|
|
60
|
+
export type type_error_cognito_userExists = typeof error_cognito_userExists;
|
|
61
|
+
export type type_error_cognito = type_error_cognito_forbidden | type_error_cognito_internal | type_error_cognito_role | type_error_cognito_input | type_error_cognito_auth | type_error_cognito_notFound | type_error_cognito_userNotFound | type_error_cognito_tooManyRequests | type_error_cognito_passwordPolicy | type_error_cognito_passwordHistory | type_error_cognito_passwordResetRequired | type_error_cognito_codeExpired | type_error_cognito_codeMismatch | type_error_cognito_delivery | type_error_cognito_userExists;
|
|
62
|
+
/**
|
|
63
|
+
* Gets a generic error from the name of the aws error
|
|
64
|
+
*/
|
|
65
|
+
export declare function error_cognito(error: Error): type_error_cognito;
|
|
66
|
+
/**
|
|
67
|
+
* Converts a cognito error to a lambda error.
|
|
68
|
+
* Basically just for narrowing it down a bit
|
|
69
|
+
*/
|
|
70
|
+
export declare function error_lambda_fromCognito(e: type_error_cognito): {
|
|
71
|
+
type: "lambda_badRequest";
|
|
72
|
+
message: string;
|
|
73
|
+
fieldName: string | undefined;
|
|
74
|
+
fieldValue: string | undefined;
|
|
75
|
+
} | {
|
|
76
|
+
type: "lambda_unauthorized";
|
|
77
|
+
message: string;
|
|
78
|
+
} | {
|
|
79
|
+
type: "lambda_forbidden";
|
|
80
|
+
message: string;
|
|
81
|
+
} | {
|
|
82
|
+
type: "lambda_notFound";
|
|
83
|
+
message: string;
|
|
84
|
+
fieldName: string | undefined;
|
|
85
|
+
fieldValue: string | undefined;
|
|
86
|
+
} | {
|
|
87
|
+
type: "lambda_conflict";
|
|
88
|
+
message: string;
|
|
89
|
+
fieldName: string | undefined;
|
|
90
|
+
fieldValue: string | undefined;
|
|
91
|
+
} | {
|
|
92
|
+
type: "lambda_internal";
|
|
93
|
+
message: string;
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/cognito/errors.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,uBAAuB;;CAEnC,CAAC;AACF,eAAO,MAAM,sBAAsB;;CAElC,CAAC;AACF,eAAO,MAAM,kBAAkB;;CAE9B,CAAC;AACF,eAAO,MAAM,mBAAmB;;CAE/B,CAAC;AACF,eAAO,MAAM,kBAAkB;;CAE9B,CAAC;AACF,eAAO,MAAM,sBAAsB;;CAElC,CAAC;AACF,eAAO,MAAM,0BAA0B;;CAEtC,CAAC;AACF,eAAO,MAAM,6BAA6B;;CAEzC,CAAC;AACF,eAAO,MAAM,4BAA4B;;CAExC,CAAC;AACF,eAAO,MAAM,6BAA6B;;CAEzC,CAAC;AACF,eAAO,MAAM,mCAAmC;;CAE/C,CAAC;AAGF,eAAO,MAAM,yBAAyB;;CAErC,CAAC;AACF,eAAO,MAAM,0BAA0B;;CAEtC,CAAC;AAGF,eAAO,MAAM,sBAAsB;;CAElC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;CAEpC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,OAAO,uBAAuB,CAAC;AAC1E,MAAM,MAAM,2BAA2B,GAAG,OAAO,sBAAsB,CAAC;AACxE,MAAM,MAAM,uBAAuB,GAAG,OAAO,kBAAkB,CAAC;AAChE,MAAM,MAAM,wBAAwB,GAAG,OAAO,mBAAmB,CAAC;AAClE,MAAM,MAAM,uBAAuB,GAAG,OAAO,kBAAkB,CAAC;AAChE,MAAM,MAAM,2BAA2B,GAAG,OAAO,sBAAsB,CAAC;AACxE,MAAM,MAAM,+BAA+B,GAAG,OAAO,0BAA0B,CAAC;AAChF,MAAM,MAAM,kCAAkC,GAAG,OAAO,6BAA6B,CAAC;AACtF,MAAM,MAAM,iCAAiC,GAAG,OAAO,4BAA4B,CAAC;AACpF,MAAM,MAAM,kCAAkC,GAAG,OAAO,6BAA6B,CAAC;AACtF,MAAM,MAAM,wCAAwC,GAAG,OAAO,mCAAmC,CAAC;AAClG,MAAM,MAAM,8BAA8B,GAAG,OAAO,yBAAyB,CAAC;AAC9E,MAAM,MAAM,+BAA+B,GAAG,OAAO,0BAA0B,CAAC;AAChF,MAAM,MAAM,2BAA2B,GAAG,OAAO,sBAAsB,CAAC;AACxE,MAAM,MAAM,6BAA6B,GAAG,OAAO,wBAAwB,CAAC;AAE5E,MAAM,MAAM,kBAAkB,GAC1B,4BAA4B,GAC5B,2BAA2B,GAC3B,uBAAuB,GACvB,wBAAwB,GACxB,uBAAuB,GACvB,2BAA2B,GAC3B,+BAA+B,GAC/B,kCAAkC,GAClC,iCAAiC,GACjC,kCAAkC,GAClC,wCAAwC,GACxC,8BAA8B,GAC9B,+BAA+B,GAC/B,2BAA2B,GAC3B,6BAA6B,CAAC;AAuClC;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB,CAO9D;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;EA4B7D"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { error_lambda_badRequest, error_lambda_conflict, error_lambda_internal, error_lambda_unauthorized, error_lambda_forbidden, error_lambda_notFound } from '../lambda/errors.js';
|
|
2
|
+
export const error_cognito_forbidden = {
|
|
3
|
+
type: 'cognito_forbidden'
|
|
4
|
+
};
|
|
5
|
+
export const error_cognito_internal = {
|
|
6
|
+
type: 'cognito_internal'
|
|
7
|
+
};
|
|
8
|
+
export const error_cognito_role = {
|
|
9
|
+
type: 'cognito_role'
|
|
10
|
+
};
|
|
11
|
+
export const error_cognito_input = {
|
|
12
|
+
type: 'cognito_input'
|
|
13
|
+
};
|
|
14
|
+
export const error_cognito_auth = {
|
|
15
|
+
type: 'cognito_auth'
|
|
16
|
+
};
|
|
17
|
+
export const error_cognito_notFound = {
|
|
18
|
+
type: 'cognito_notFound'
|
|
19
|
+
};
|
|
20
|
+
export const error_cognito_userNotFound = {
|
|
21
|
+
type: 'cognito_userNotFound'
|
|
22
|
+
};
|
|
23
|
+
export const error_cognito_tooManyRequests = {
|
|
24
|
+
type: 'cognito_tooManyRequests'
|
|
25
|
+
};
|
|
26
|
+
export const error_cognito_passwordPolicy = {
|
|
27
|
+
type: 'cognito_passwordPolicy'
|
|
28
|
+
};
|
|
29
|
+
export const error_cognito_passwordHistory = {
|
|
30
|
+
type: 'cognito_passwordHistory'
|
|
31
|
+
};
|
|
32
|
+
export const error_cognito_passwordResetRequired = {
|
|
33
|
+
type: 'cognito_passwordResetRequired'
|
|
34
|
+
};
|
|
35
|
+
// Confirm forgot password
|
|
36
|
+
export const error_cognito_codeExpired = {
|
|
37
|
+
type: 'cognito_codeExpired'
|
|
38
|
+
};
|
|
39
|
+
export const error_cognito_codeMismatch = {
|
|
40
|
+
type: 'cognito_codeMismatch'
|
|
41
|
+
};
|
|
42
|
+
// Forgot password
|
|
43
|
+
export const error_cognito_delivery = {
|
|
44
|
+
type: 'cognito_delivery'
|
|
45
|
+
};
|
|
46
|
+
// Confirm signup
|
|
47
|
+
export const error_cognito_userExists = {
|
|
48
|
+
type: 'cognito_userExists'
|
|
49
|
+
};
|
|
50
|
+
const awsToCognitoErrorMap = {
|
|
51
|
+
ForbiddenException: error_cognito_forbidden,
|
|
52
|
+
NotAuthorizedException: error_cognito_auth,
|
|
53
|
+
UserNotConfirmedException: error_cognito_auth,
|
|
54
|
+
UserNotFoundException: error_cognito_userNotFound,
|
|
55
|
+
ResourceNotFoundException: error_cognito_notFound,
|
|
56
|
+
InvalidParameterException: error_cognito_input,
|
|
57
|
+
InvalidPasswordException: error_cognito_passwordPolicy,
|
|
58
|
+
PasswordHistoryPolicyViolationException: error_cognito_passwordHistory,
|
|
59
|
+
PasswordResetRequiredException: error_cognito_passwordResetRequired,
|
|
60
|
+
LimitExceededException: error_cognito_tooManyRequests,
|
|
61
|
+
TooManyRequestsException: error_cognito_tooManyRequests,
|
|
62
|
+
InternalErrorException: error_cognito_internal,
|
|
63
|
+
// Confirm forgot password
|
|
64
|
+
CodeMismatchException: error_cognito_codeMismatch,
|
|
65
|
+
ExpiredCodeException: error_cognito_codeExpired,
|
|
66
|
+
TooManyFailedAttemptsException: error_cognito_tooManyRequests,
|
|
67
|
+
UnexpectedLambdaException: error_cognito_internal,
|
|
68
|
+
InvalidLambdaResponseException: error_cognito_internal,
|
|
69
|
+
UserLambdaValidationException: error_cognito_internal,
|
|
70
|
+
// Forgot password
|
|
71
|
+
InvalidEmailRoleAccessPolicyException: error_cognito_role,
|
|
72
|
+
InvalidSmsRoleAccessPolicyException: error_cognito_role,
|
|
73
|
+
InvalidSmsRoleTrustRelationshipException: error_cognito_role,
|
|
74
|
+
CodeDelliveryFailureException: error_cognito_delivery,
|
|
75
|
+
// Confirm signup
|
|
76
|
+
AliasExistsException: error_cognito_userExists,
|
|
77
|
+
// Login
|
|
78
|
+
InvalidUserPoolConfigurationException: error_cognito_internal,
|
|
79
|
+
MFAMethodNotFoundException: error_cognito_notFound,
|
|
80
|
+
UnsupportedOperationException: error_cognito_internal,
|
|
81
|
+
// Reset password
|
|
82
|
+
SoftwareTokenMFANotFoundException: error_cognito_notFound,
|
|
83
|
+
// Sign up
|
|
84
|
+
UsernameExistsException: error_cognito_userExists
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Gets a generic error from the name of the aws error
|
|
88
|
+
*/
|
|
89
|
+
export function error_cognito(error) {
|
|
90
|
+
const type = error.name;
|
|
91
|
+
if (awsToCognitoErrorMap[type] === undefined)
|
|
92
|
+
console.warn(`${type} is not present in the cognito error map`);
|
|
93
|
+
console.error(`Cognito error: ${type}`, error);
|
|
94
|
+
return awsToCognitoErrorMap[type] || error_cognito_internal;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Converts a cognito error to a lambda error.
|
|
98
|
+
* Basically just for narrowing it down a bit
|
|
99
|
+
*/
|
|
100
|
+
export function error_lambda_fromCognito(e) {
|
|
101
|
+
switch (e.type) {
|
|
102
|
+
case 'cognito_auth':
|
|
103
|
+
return error_lambda_unauthorized('Not authorized');
|
|
104
|
+
case 'cognito_forbidden':
|
|
105
|
+
return error_lambda_forbidden('Forbidden');
|
|
106
|
+
case 'cognito_internal':
|
|
107
|
+
case 'cognito_role':
|
|
108
|
+
return error_lambda_internal('Internal server error');
|
|
109
|
+
case 'cognito_input':
|
|
110
|
+
return error_lambda_badRequest('There is an issue with your request');
|
|
111
|
+
case 'cognito_notFound':
|
|
112
|
+
return error_lambda_notFound('Resource not found');
|
|
113
|
+
case 'cognito_userNotFound':
|
|
114
|
+
return error_lambda_notFound('User not found');
|
|
115
|
+
case 'cognito_tooManyRequests':
|
|
116
|
+
return error_lambda_badRequest('Too many requests');
|
|
117
|
+
case 'cognito_passwordPolicy':
|
|
118
|
+
return error_lambda_badRequest('Password does not meet policy requirements');
|
|
119
|
+
case 'cognito_passwordHistory':
|
|
120
|
+
return error_lambda_conflict('Password was used recently');
|
|
121
|
+
case 'cognito_passwordResetRequired':
|
|
122
|
+
return error_lambda_badRequest('Password reset required');
|
|
123
|
+
case 'cognito_delivery':
|
|
124
|
+
return error_lambda_internal('Delivery failed for the provided email or phone number');
|
|
125
|
+
default:
|
|
126
|
+
return error_lambda_internal('Unknown error');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cognito/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAE5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { type_error_cognito } from './errors.js';
|
|
2
|
+
import { ResultAsync } from 'neverthrow';
|
|
3
|
+
export declare function computeSecretHash(username: string, clientId: string, clientSecret: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Changes a users password
|
|
6
|
+
* Wraps the cognito sdk to use neverthrow
|
|
7
|
+
*/
|
|
8
|
+
export declare const changePassword: (accessToken: string, oldPassword: string, newPassword: string) => ResultAsync<import("@aws-sdk/client-cognito-identity-provider").ChangePasswordCommandOutput, type_error_cognito>;
|
|
9
|
+
/**
|
|
10
|
+
* Changes the password with the confirmation code sent to the email.
|
|
11
|
+
* Assumes the existence of process.env.COGNITO_CLIENT_ID and COGNITO_CLIENT_SECRET
|
|
12
|
+
* @param username - username or any of their alias attributes
|
|
13
|
+
* @param confirmationCode
|
|
14
|
+
* @param newPassword
|
|
15
|
+
*/
|
|
16
|
+
export declare const confirmForgotPassword: (data: {
|
|
17
|
+
username: string;
|
|
18
|
+
confirmationCode: string;
|
|
19
|
+
newPassword: string;
|
|
20
|
+
}) => ResultAsync<import("@aws-sdk/client-cognito-identity-provider").ConfirmForgotPasswordCommandOutput, type_error_cognito>;
|
|
21
|
+
/**
|
|
22
|
+
* Confirms signup
|
|
23
|
+
* @param username - username or any alias attribute
|
|
24
|
+
*/
|
|
25
|
+
export declare const confirmSignup: (data: {
|
|
26
|
+
username: string;
|
|
27
|
+
confirmationCode: string;
|
|
28
|
+
}) => ResultAsync<import("@aws-sdk/client-cognito-identity-provider").ConfirmSignUpCommandOutput, type_error_cognito>;
|
|
29
|
+
/**
|
|
30
|
+
* Sends an email for you to reset your password
|
|
31
|
+
*/
|
|
32
|
+
export declare const forgotPassword: (data: {
|
|
33
|
+
username: string;
|
|
34
|
+
}) => ResultAsync<import("@aws-sdk/client-cognito-identity-provider").ForgotPasswordCommandOutput, type_error_cognito>;
|
|
35
|
+
export declare const login: (data: {
|
|
36
|
+
username: string;
|
|
37
|
+
password: string;
|
|
38
|
+
}) => ResultAsync<import("@aws-sdk/client-cognito-identity-provider").AdminInitiateAuthCommandOutput, type_error_cognito>;
|
|
39
|
+
export declare const refreshTokens: (data: {
|
|
40
|
+
username: string;
|
|
41
|
+
refreshToken: string;
|
|
42
|
+
}) => ResultAsync<import("@aws-sdk/client-cognito-identity-provider").AdminInitiateAuthCommandOutput, type_error_cognito>;
|
|
43
|
+
export declare const logout: (accessToken: string) => ResultAsync<import("@aws-sdk/client-cognito-identity-provider").GlobalSignOutCommandOutput, type_error_cognito>;
|
|
44
|
+
export declare const resetPassword: (data: {
|
|
45
|
+
session: string;
|
|
46
|
+
newPassword: string;
|
|
47
|
+
username: string;
|
|
48
|
+
}) => ResultAsync<import("@aws-sdk/client-cognito-identity-provider").RespondToAuthChallengeCommandOutput, type_error_cognito>;
|
|
49
|
+
export declare const signUp: (data: {
|
|
50
|
+
username: string;
|
|
51
|
+
password: string;
|
|
52
|
+
} & Record<string, unknown>) => ResultAsync<import("@aws-sdk/client-cognito-identity-provider").SignUpCommandOutput, type_error_cognito>;
|
|
53
|
+
//# sourceMappingURL=password.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../src/cognito/password.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAOzC,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAIlG;AAID;;;GAGG;AACH,eAAO,MAAM,cAAc,qLAe1B,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;cACb,MAAM;sBAAoB,MAAM;iBAAe,MAAM;6HAgBzE,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,aAAa;cACL,MAAM;sBAAoB,MAAM;qHAepD,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,cAAc;cACN,MAAM;sHAc1B,CAAC;AAIF,eAAO,MAAM,KAAK;cACG,MAAM;cAAY,MAAM;yHAmB5C,CAAC;AAIF,eAAO,MAAM,aAAa;cACL,MAAM;kBAAgB,MAAM;yHAkBhD,CAAC;AAGF,eAAO,MAAM,MAAM,0IAUlB,CAAC;AAIF,eAAO,MAAM,aAAa;aACN,MAAM;iBAAe,MAAM;cAAY,MAAM;8HAmBhE,CAAC;AAGF,eAAO,MAAM,MAAM;cACE,MAAM;cAAY,MAAM;wIAuB5C,CAAC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { AdminInitiateAuthCommand, ChangePasswordCommand, ConfirmForgotPasswordCommand, ConfirmSignUpCommand, ForgotPasswordCommand, GlobalSignOutCommand, RespondToAuthChallengeCommand, SignUpCommand } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
|
+
import { error_cognito } from './errors.js';
|
|
3
|
+
import { getCognitoClient } from './client.js';
|
|
4
|
+
import { ResultAsync } from 'neverthrow';
|
|
5
|
+
import { createHmac } from 'crypto';
|
|
6
|
+
const clientId = process.env.COGNITO_CLIENT_ID;
|
|
7
|
+
const clientSecret = process.env.COGNITO_CLIENT_SECRET;
|
|
8
|
+
const userPoolId = process.env.COGNITO_USER_POOL_ID;
|
|
9
|
+
export function computeSecretHash(username, clientId, clientSecret) {
|
|
10
|
+
return createHmac('SHA256', clientSecret)
|
|
11
|
+
.update(username + clientId)
|
|
12
|
+
.digest('base64');
|
|
13
|
+
}
|
|
14
|
+
// ---- Change password ---- //
|
|
15
|
+
/**
|
|
16
|
+
* Changes a users password
|
|
17
|
+
* Wraps the cognito sdk to use neverthrow
|
|
18
|
+
*/
|
|
19
|
+
export const changePassword = ResultAsync.fromThrowable(async (accessToken, oldPassword, newPassword) => {
|
|
20
|
+
const cognitoClient = getCognitoClient();
|
|
21
|
+
return cognitoClient.send(new ChangePasswordCommand({
|
|
22
|
+
AccessToken: accessToken,
|
|
23
|
+
PreviousPassword: oldPassword,
|
|
24
|
+
ProposedPassword: newPassword
|
|
25
|
+
}));
|
|
26
|
+
}, (e) => {
|
|
27
|
+
console.error('ChangePasswordCommand error', e);
|
|
28
|
+
return error_cognito(e);
|
|
29
|
+
});
|
|
30
|
+
// ---- Confirm Forgot password ---- //
|
|
31
|
+
/**
|
|
32
|
+
* Changes the password with the confirmation code sent to the email.
|
|
33
|
+
* Assumes the existence of process.env.COGNITO_CLIENT_ID and COGNITO_CLIENT_SECRET
|
|
34
|
+
* @param username - username or any of their alias attributes
|
|
35
|
+
* @param confirmationCode
|
|
36
|
+
* @param newPassword
|
|
37
|
+
*/
|
|
38
|
+
export const confirmForgotPassword = ResultAsync.fromThrowable((data) => {
|
|
39
|
+
const cognitoClient = getCognitoClient();
|
|
40
|
+
return cognitoClient.send(new ConfirmForgotPasswordCommand({
|
|
41
|
+
ClientId: clientId,
|
|
42
|
+
Username: data.username,
|
|
43
|
+
ConfirmationCode: data.confirmationCode,
|
|
44
|
+
Password: data.newPassword,
|
|
45
|
+
SecretHash: computeSecretHash(data.username, clientId, clientSecret)
|
|
46
|
+
}));
|
|
47
|
+
}, (e) => {
|
|
48
|
+
console.error('ConfirmForgotPasswordCommand error', e);
|
|
49
|
+
return error_cognito(e);
|
|
50
|
+
});
|
|
51
|
+
// ---- Confirm Signup ---- //
|
|
52
|
+
/**
|
|
53
|
+
* Confirms signup
|
|
54
|
+
* @param username - username or any alias attribute
|
|
55
|
+
*/
|
|
56
|
+
export const confirmSignup = ResultAsync.fromThrowable((data) => {
|
|
57
|
+
const cognitoClient = getCognitoClient();
|
|
58
|
+
return cognitoClient.send(new ConfirmSignUpCommand({
|
|
59
|
+
ClientId: clientId,
|
|
60
|
+
Username: data.username,
|
|
61
|
+
ConfirmationCode: data.confirmationCode,
|
|
62
|
+
SecretHash: computeSecretHash(data.username, clientId, clientSecret)
|
|
63
|
+
}));
|
|
64
|
+
}, (e) => {
|
|
65
|
+
console.error('ConfirmSignUpCommand error', e);
|
|
66
|
+
return error_cognito(e);
|
|
67
|
+
});
|
|
68
|
+
// ---- Forgot password ---- //
|
|
69
|
+
/**
|
|
70
|
+
* Sends an email for you to reset your password
|
|
71
|
+
*/
|
|
72
|
+
export const forgotPassword = ResultAsync.fromThrowable((data) => {
|
|
73
|
+
const cognitoClient = getCognitoClient();
|
|
74
|
+
return cognitoClient.send(new ForgotPasswordCommand({
|
|
75
|
+
ClientId: clientId,
|
|
76
|
+
Username: data.username,
|
|
77
|
+
SecretHash: computeSecretHash(data.username, clientId, clientSecret)
|
|
78
|
+
}));
|
|
79
|
+
}, (e) => {
|
|
80
|
+
console.error('ForgotPasswordCommand error', e);
|
|
81
|
+
return error_cognito(e);
|
|
82
|
+
});
|
|
83
|
+
// ---- Login ---- //
|
|
84
|
+
export const login = ResultAsync.fromThrowable((data) => {
|
|
85
|
+
const cognitoClient = getCognitoClient();
|
|
86
|
+
return cognitoClient.send(new AdminInitiateAuthCommand({
|
|
87
|
+
AuthFlow: 'ADMIN_USER_PASSWORD_AUTH',
|
|
88
|
+
ClientId: clientId,
|
|
89
|
+
UserPoolId: userPoolId,
|
|
90
|
+
AuthParameters: {
|
|
91
|
+
USERNAME: data.username,
|
|
92
|
+
PASSWORD: data.password,
|
|
93
|
+
SECRET_HASH: computeSecretHash(data.username, clientId, clientSecret)
|
|
94
|
+
}
|
|
95
|
+
}));
|
|
96
|
+
}, (e) => {
|
|
97
|
+
console.error('AdminInitiateAuthCommand error', e);
|
|
98
|
+
return error_cognito(e);
|
|
99
|
+
});
|
|
100
|
+
// ---- Refresh token ---- //
|
|
101
|
+
export const refreshTokens = ResultAsync.fromThrowable((data) => {
|
|
102
|
+
const cognitoClient = getCognitoClient();
|
|
103
|
+
return cognitoClient.send(new AdminInitiateAuthCommand({
|
|
104
|
+
AuthFlow: 'REFRESH_TOKEN_AUTH',
|
|
105
|
+
ClientId: clientId,
|
|
106
|
+
UserPoolId: userPoolId,
|
|
107
|
+
AuthParameters: {
|
|
108
|
+
REFRESH_TOKEN: data.refreshToken,
|
|
109
|
+
SECRET_HASH: computeSecretHash(data.username, clientId, clientSecret)
|
|
110
|
+
}
|
|
111
|
+
}));
|
|
112
|
+
}, (e) => {
|
|
113
|
+
console.error('AdminInitiateAuthCommand error', e);
|
|
114
|
+
return error_cognito(e);
|
|
115
|
+
});
|
|
116
|
+
// ---- Logout ---- //
|
|
117
|
+
export const logout = ResultAsync.fromThrowable((accessToken) => {
|
|
118
|
+
const cognitoClient = getCognitoClient();
|
|
119
|
+
// GlobalSignOut invalidates all refresh tokens associated with user
|
|
120
|
+
return cognitoClient.send(new GlobalSignOutCommand({ AccessToken: accessToken }));
|
|
121
|
+
}, (e) => {
|
|
122
|
+
console.error('GlobalSignOutCommand error', e);
|
|
123
|
+
return error_cognito(e);
|
|
124
|
+
});
|
|
125
|
+
// ---- Reset password ---- //
|
|
126
|
+
export const resetPassword = ResultAsync.fromThrowable((data) => {
|
|
127
|
+
const cognitoClient = getCognitoClient();
|
|
128
|
+
return cognitoClient.send(new RespondToAuthChallengeCommand({
|
|
129
|
+
ChallengeName: 'NEW_PASSWORD_REQUIRED',
|
|
130
|
+
ClientId: clientId,
|
|
131
|
+
Session: data.session,
|
|
132
|
+
ChallengeResponses: {
|
|
133
|
+
SECRET_HASH: computeSecretHash(data.username, clientId, clientSecret),
|
|
134
|
+
NEW_PASSWORD: data.newPassword,
|
|
135
|
+
USERNAME: data.username
|
|
136
|
+
}
|
|
137
|
+
}));
|
|
138
|
+
}, (e) => {
|
|
139
|
+
console.error('RespondToAuthChallengeCommand error', e);
|
|
140
|
+
return error_cognito(e);
|
|
141
|
+
});
|
|
142
|
+
// ---- Sign up ---- //
|
|
143
|
+
export const signUp = ResultAsync.fromThrowable((data) => {
|
|
144
|
+
const cognitoClient = getCognitoClient();
|
|
145
|
+
const secretHash = computeSecretHash(data.username, clientId, clientSecret);
|
|
146
|
+
return cognitoClient.send(new SignUpCommand({
|
|
147
|
+
ClientId: clientId,
|
|
148
|
+
Username: data.username,
|
|
149
|
+
Password: data.password,
|
|
150
|
+
SecretHash: secretHash,
|
|
151
|
+
UserAttributes: Object.entries(data)
|
|
152
|
+
.filter(([key]) => key !== 'username' && key !== 'password')
|
|
153
|
+
.map(([key, value]) => ({
|
|
154
|
+
Name: key,
|
|
155
|
+
Value: value
|
|
156
|
+
}))
|
|
157
|
+
}));
|
|
158
|
+
}, (e) => {
|
|
159
|
+
console.error('SignUpCommand error', e);
|
|
160
|
+
return error_cognito(e);
|
|
161
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AdminGetUserCommandOutput, AttributeType } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
|
+
import { ResultAsync } from 'neverthrow';
|
|
3
|
+
export type UserRes = Omit<AdminGetUserCommandOutput, 'UserAttributes'> & {
|
|
4
|
+
UserAttributes: Record<string, string>;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Performs an AdminGetUserCommand and extracts the user attributes into an object
|
|
8
|
+
*/
|
|
9
|
+
export declare const getUserDetails: (username: string) => ResultAsync<UserRes, import("./errors.js").type_error_cognito>;
|
|
10
|
+
/**
|
|
11
|
+
* @returns An object of attributes with their names as keys and values as values.
|
|
12
|
+
*/
|
|
13
|
+
export declare function extractAttributes(attrs: AttributeType[] | undefined): Record<string, string>;
|
|
14
|
+
//# sourceMappingURL=user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/cognito/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,aAAa,EAEd,MAAM,2CAA2C,CAAC;AAGnD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzC,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,GAAG;IAAE,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC;AAErH;;GAEG;AACH,eAAO,MAAM,cAAc,sFAe1B,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,SAAS,0BAUnE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AdminGetUserCommand } from '@aws-sdk/client-cognito-identity-provider';
|
|
2
|
+
import { getCognitoClient } from './client.js';
|
|
3
|
+
import { ResultAsync } from 'neverthrow';
|
|
4
|
+
import { error_cognito } from './errors.js';
|
|
5
|
+
/**
|
|
6
|
+
* Performs an AdminGetUserCommand and extracts the user attributes into an object
|
|
7
|
+
*/
|
|
8
|
+
export const getUserDetails = ResultAsync.fromThrowable(async (username) => {
|
|
9
|
+
console.log('getUserDetails: Getting details for user: ', username);
|
|
10
|
+
const UserPoolId = process.env.COGNITO_USER_POOL_ID;
|
|
11
|
+
const cognitoClient = getCognitoClient();
|
|
12
|
+
const res = await cognitoClient.send(new AdminGetUserCommand({ UserPoolId, Username: username }));
|
|
13
|
+
return {
|
|
14
|
+
...res,
|
|
15
|
+
UserAttributes: extractAttributes(res.UserAttributes)
|
|
16
|
+
};
|
|
17
|
+
}, (e) => {
|
|
18
|
+
console.error('getUserDetails:error:', e);
|
|
19
|
+
return error_cognito(e);
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* @returns An object of attributes with their names as keys and values as values.
|
|
23
|
+
*/
|
|
24
|
+
export function extractAttributes(attrs) {
|
|
25
|
+
const attributes = {};
|
|
26
|
+
if (attrs) {
|
|
27
|
+
for (const attr of attrs) {
|
|
28
|
+
if (attr.Name && attr.Value) {
|
|
29
|
+
attributes[attr.Name] = attr.Value;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return attributes;
|
|
34
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const error_dynamo: {
|
|
2
|
+
type: "dynamo";
|
|
3
|
+
};
|
|
4
|
+
export type type_error_dynamo = typeof error_dynamo;
|
|
5
|
+
export declare function error_lambda_fromDynamo(e: type_error_dynamo): {
|
|
6
|
+
type: "lambda_internal";
|
|
7
|
+
message: string;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/dynamo/errors.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;CAExB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,OAAO,YAAY,CAAC;AAEpD,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,iBAAiB;;;EAE3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dynamo/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './errors.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export * from './lambda/index.js';
|
|
2
|
+
export * from './cognito/index.js';
|
|
3
|
+
export * from './s3/index.js';
|
|
4
|
+
export * from './dynamo/index.js';
|
|
5
|
+
export * from './ses/index.js';
|
|
2
6
|
export * from './rehype/index.js';
|
|
3
7
|
export * from './utils/index.js';
|
|
8
|
+
export * from './types/index.js';
|
|
4
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
// AWS
|
|
1
2
|
export * from './lambda/index.js';
|
|
3
|
+
export * from './cognito/index.js';
|
|
4
|
+
export * from './s3/index.js';
|
|
5
|
+
export * from './dynamo/index.js';
|
|
6
|
+
export * from './ses/index.js';
|
|
2
7
|
export * from './rehype/index.js';
|
|
3
8
|
export * from './utils/index.js';
|
|
9
|
+
export * from './types/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../src/lambda/authentication.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/lambda/browser.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/lambda/browser.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/lambda/browser.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
|