@fiado/type-kit 3.37.0 → 3.39.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/_test_/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.test.ts +77 -0
- package/_test_/unit/cognitoBackofficeConnector/validators/NoTenantIdInCustomAttrs.test.ts +43 -0
- package/bin/benefitCenter/dtos/BackofficeInputLabelsUpdateRequest.d.ts +12 -0
- package/bin/benefitCenter/dtos/BackofficeInputLabelsUpdateRequest.js +29 -0
- package/bin/benefitCenter/dtos/BackofficeLeafHelpImageUpdateRequest.d.ts +9 -0
- package/bin/benefitCenter/dtos/BackofficeLeafHelpImageUpdateRequest.js +26 -0
- package/bin/benefitCenter/dtos/BackofficeProductEnabledUpdateRequest.d.ts +9 -0
- package/bin/benefitCenter/dtos/BackofficeProductEnabledUpdateRequest.js +26 -0
- package/bin/benefitCenter/dtos/BackofficeProductHelpImageUpdateRequest.d.ts +9 -0
- package/bin/benefitCenter/dtos/BackofficeProductHelpImageUpdateRequest.js +26 -0
- package/bin/benefitCenter/dtos/BackofficeSubcategoryLogoUpdateRequest.d.ts +10 -0
- package/bin/benefitCenter/dtos/BackofficeSubcategoryLogoUpdateRequest.js +27 -0
- package/bin/benefitCenter/dtos/LeafAssetUploadUrlRequest.d.ts +14 -0
- package/bin/benefitCenter/dtos/LeafAssetUploadUrlRequest.js +36 -0
- package/bin/benefitCenter/dtos/LeafAssetUploadUrlResponse.d.ts +13 -0
- package/bin/benefitCenter/dtos/LeafAssetUploadUrlResponse.js +12 -0
- package/bin/benefitCenter/dtos/ProductItem.d.ts +12 -0
- package/bin/benefitCenter/enums/LeafAssetKindEnum.d.ts +12 -0
- package/bin/benefitCenter/enums/LeafAssetKindEnum.js +16 -0
- package/bin/benefitCenter/index.d.ts +8 -0
- package/bin/benefitCenter/index.js +9 -0
- package/bin/cognitoBackofficeConnector/dtos/AppClientConfig.d.ts +19 -0
- package/bin/cognitoBackofficeConnector/dtos/AppClientConfig.js +74 -0
- package/bin/cognitoBackofficeConnector/dtos/AuthEventResponse.d.ts +8 -0
- package/bin/cognitoBackofficeConnector/dtos/AuthEventResponse.js +6 -0
- package/bin/cognitoBackofficeConnector/dtos/AuthEventsRequest.d.ts +5 -0
- package/bin/cognitoBackofficeConnector/dtos/AuthEventsRequest.js +37 -0
- package/bin/cognitoBackofficeConnector/dtos/AuthTokensResponse.d.ts +12 -0
- package/bin/cognitoBackofficeConnector/dtos/AuthTokensResponse.js +11 -0
- package/bin/cognitoBackofficeConnector/dtos/ChangePasswordRequest.d.ts +6 -0
- package/bin/cognitoBackofficeConnector/dtos/ChangePasswordRequest.js +41 -0
- package/bin/cognitoBackofficeConnector/dtos/ConfirmForgotPasswordRequest.d.ts +8 -0
- package/bin/cognitoBackofficeConnector/dtos/ConfirmForgotPasswordRequest.js +53 -0
- package/bin/cognitoBackofficeConnector/dtos/CreatePoolRequest.d.ts +19 -0
- package/bin/cognitoBackofficeConnector/dtos/CreatePoolRequest.js +63 -0
- package/bin/cognitoBackofficeConnector/dtos/CreatePoolResponse.d.ts +13 -0
- package/bin/cognitoBackofficeConnector/dtos/CreatePoolResponse.js +13 -0
- package/bin/cognitoBackofficeConnector/dtos/CreateUserRequest.d.ts +9 -0
- package/bin/cognitoBackofficeConnector/dtos/CreateUserRequest.js +57 -0
- package/bin/cognitoBackofficeConnector/dtos/CreateUserResponse.d.ts +10 -0
- package/bin/cognitoBackofficeConnector/dtos/CreateUserResponse.js +6 -0
- package/bin/cognitoBackofficeConnector/dtos/CustomAttributeSpec.d.ts +9 -0
- package/bin/cognitoBackofficeConnector/dtos/CustomAttributeSpec.js +38 -0
- package/bin/cognitoBackofficeConnector/dtos/DeletePoolRequest.d.ts +13 -0
- package/bin/cognitoBackofficeConnector/dtos/DeletePoolRequest.js +36 -0
- package/bin/cognitoBackofficeConnector/dtos/DeleteUserRequest.d.ts +4 -0
- package/bin/cognitoBackofficeConnector/dtos/DeleteUserRequest.js +29 -0
- package/bin/cognitoBackofficeConnector/dtos/ForgotPasswordRequest.d.ts +6 -0
- package/bin/cognitoBackofficeConnector/dtos/ForgotPasswordRequest.js +41 -0
- package/bin/cognitoBackofficeConnector/dtos/HealthcheckResponse.d.ts +12 -0
- package/bin/cognitoBackofficeConnector/dtos/HealthcheckResponse.js +13 -0
- package/bin/cognitoBackofficeConnector/dtos/InitiateAuthRequest.d.ts +8 -0
- package/bin/cognitoBackofficeConnector/dtos/InitiateAuthRequest.js +53 -0
- package/bin/cognitoBackofficeConnector/dtos/InitiateAuthResponse.d.ts +16 -0
- package/bin/cognitoBackofficeConnector/dtos/InitiateAuthResponse.js +14 -0
- package/bin/cognitoBackofficeConnector/dtos/MfaPoolConfig.d.ts +7 -0
- package/bin/cognitoBackofficeConnector/dtos/MfaPoolConfig.js +31 -0
- package/bin/cognitoBackofficeConnector/dtos/MfaResetRequest.d.ts +4 -0
- package/bin/cognitoBackofficeConnector/dtos/MfaResetRequest.js +29 -0
- package/bin/cognitoBackofficeConnector/dtos/MfaVerifyResponse.d.ts +8 -0
- package/bin/cognitoBackofficeConnector/dtos/MfaVerifyResponse.js +11 -0
- package/bin/cognitoBackofficeConnector/dtos/PasswordPolicyConfig.d.ts +8 -0
- package/bin/cognitoBackofficeConnector/dtos/PasswordPolicyConfig.js +51 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.d.ts +20 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.js +11 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.d.ts +4 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.js +6 -0
- package/bin/cognitoBackofficeConnector/dtos/RefreshTokensRequest.d.ts +6 -0
- package/bin/cognitoBackofficeConnector/dtos/RefreshTokensRequest.js +41 -0
- package/bin/cognitoBackofficeConnector/dtos/RefreshTokensResponse.d.ts +4 -0
- package/bin/cognitoBackofficeConnector/dtos/RefreshTokensResponse.js +6 -0
- package/bin/cognitoBackofficeConnector/dtos/ResendConfirmationRequest.d.ts +6 -0
- package/bin/cognitoBackofficeConnector/dtos/ResendConfirmationRequest.js +41 -0
- package/bin/cognitoBackofficeConnector/dtos/ResendInvitationRequest.d.ts +4 -0
- package/bin/cognitoBackofficeConnector/dtos/ResendInvitationRequest.js +29 -0
- package/bin/cognitoBackofficeConnector/dtos/RespondToChallengeRequest.d.ts +9 -0
- package/bin/cognitoBackofficeConnector/dtos/RespondToChallengeRequest.js +52 -0
- package/bin/cognitoBackofficeConnector/dtos/RespondToChallengeResponse.d.ts +13 -0
- package/bin/cognitoBackofficeConnector/dtos/RespondToChallengeResponse.js +11 -0
- package/bin/cognitoBackofficeConnector/dtos/SetMfaPreferenceRequest.d.ts +8 -0
- package/bin/cognitoBackofficeConnector/dtos/SetMfaPreferenceRequest.js +51 -0
- package/bin/cognitoBackofficeConnector/dtos/TotpBeginRequest.d.ts +5 -0
- package/bin/cognitoBackofficeConnector/dtos/TotpBeginRequest.js +35 -0
- package/bin/cognitoBackofficeConnector/dtos/TotpBeginResponse.d.ts +4 -0
- package/bin/cognitoBackofficeConnector/dtos/TotpBeginResponse.js +6 -0
- package/bin/cognitoBackofficeConnector/dtos/TotpVerifyRequest.d.ts +6 -0
- package/bin/cognitoBackofficeConnector/dtos/TotpVerifyRequest.js +41 -0
- package/bin/cognitoBackofficeConnector/dtos/UpdateEmailRequest.d.ts +5 -0
- package/bin/cognitoBackofficeConnector/dtos/UpdateEmailRequest.js +34 -0
- package/bin/cognitoBackofficeConnector/dtos/UpdateProfileRequest.d.ts +12 -0
- package/bin/cognitoBackofficeConnector/dtos/UpdateProfileRequest.js +47 -0
- package/bin/cognitoBackofficeConnector/dtos/UpdateUserAttributesRequest.d.ts +7 -0
- package/bin/cognitoBackofficeConnector/dtos/UpdateUserAttributesRequest.js +49 -0
- package/bin/cognitoBackofficeConnector/dtos/UserActionRequest.d.ts +9 -0
- package/bin/cognitoBackofficeConnector/dtos/UserActionRequest.js +34 -0
- package/bin/cognitoBackofficeConnector/dtos/UserDetailResponse.d.ts +13 -0
- package/bin/cognitoBackofficeConnector/dtos/UserDetailResponse.js +6 -0
- package/bin/cognitoBackofficeConnector/dtos/VerifyEmailRequest.d.ts +5 -0
- package/bin/cognitoBackofficeConnector/dtos/VerifyEmailRequest.js +35 -0
- package/bin/cognitoBackofficeConnector/enums/CognitoChallengeType.d.ts +26 -0
- package/bin/cognitoBackofficeConnector/enums/CognitoChallengeType.js +30 -0
- package/bin/cognitoBackofficeConnector/enums/CognitoUserStatus.d.ts +29 -0
- package/bin/cognitoBackofficeConnector/enums/CognitoUserStatus.js +33 -0
- package/bin/cognitoBackofficeConnector/index.d.ts +50 -0
- package/bin/cognitoBackofficeConnector/index.js +66 -0
- package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.d.ts +17 -0
- package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.js +39 -0
- package/bin/cognitoBackofficeConnector/validators/NoTenantIdInCustomAttrs.d.ts +27 -0
- package/bin/cognitoBackofficeConnector/validators/NoTenantIdInCustomAttrs.js +48 -0
- package/bin/index.d.ts +3 -0
- package/bin/index.js +9 -1
- package/bin/platformRbac/dtos/AuthContext.d.ts +21 -0
- package/bin/platformRbac/dtos/AuthContext.js +2 -0
- package/bin/platformRbac/dtos/PermissionMeta.d.ts +19 -0
- package/bin/platformRbac/dtos/PermissionMeta.js +2 -0
- package/bin/platformRbac/dtos/RoleAssignmentInfo.d.ts +11 -0
- package/bin/platformRbac/dtos/RoleAssignmentInfo.js +2 -0
- package/bin/platformRbac/enums/Permission.d.ts +93 -0
- package/bin/platformRbac/enums/Permission.js +118 -0
- package/bin/platformRbac/enums/PermissionCategory.d.ts +14 -0
- package/bin/platformRbac/enums/PermissionCategory.js +18 -0
- package/bin/platformRbac/enums/PermissionScope.d.ts +10 -0
- package/bin/platformRbac/enums/PermissionScope.js +14 -0
- package/bin/platformRbac/index.d.ts +6 -0
- package/bin/platformRbac/index.js +18 -0
- package/bin/rbac/enums/PoolKind.d.ts +16 -0
- package/bin/rbac/enums/PoolKind.js +20 -0
- package/bin/rbac/index.d.ts +1 -0
- package/bin/rbac/index.js +17 -0
- package/jest.config.js +8 -0
- package/package.json +5 -1
- package/src/benefitCenter/dtos/BackofficeInputLabelsUpdateRequest.ts +16 -0
- package/src/benefitCenter/dtos/BackofficeLeafHelpImageUpdateRequest.ts +13 -0
- package/src/benefitCenter/dtos/BackofficeProductEnabledUpdateRequest.ts +12 -0
- package/src/benefitCenter/dtos/BackofficeProductHelpImageUpdateRequest.ts +13 -0
- package/src/benefitCenter/dtos/BackofficeSubcategoryLogoUpdateRequest.ts +14 -0
- package/src/benefitCenter/dtos/LeafAssetUploadUrlRequest.ts +23 -0
- package/src/benefitCenter/dtos/LeafAssetUploadUrlResponse.ts +13 -0
- package/src/benefitCenter/dtos/ProductItem.ts +14 -0
- package/src/benefitCenter/enums/LeafAssetKindEnum.ts +12 -0
- package/src/benefitCenter/index.ts +9 -0
- package/src/cognitoBackofficeConnector/dtos/AppClientConfig.ts +22 -0
- package/src/cognitoBackofficeConnector/dtos/AuthEventResponse.ts +8 -0
- package/src/cognitoBackofficeConnector/dtos/AuthEventsRequest.ts +8 -0
- package/src/cognitoBackofficeConnector/dtos/AuthTokensResponse.ts +12 -0
- package/src/cognitoBackofficeConnector/dtos/ChangePasswordRequest.ts +9 -0
- package/src/cognitoBackofficeConnector/dtos/ConfirmForgotPasswordRequest.ts +11 -0
- package/src/cognitoBackofficeConnector/dtos/CreatePoolRequest.ts +30 -0
- package/src/cognitoBackofficeConnector/dtos/CreatePoolResponse.ts +13 -0
- package/src/cognitoBackofficeConnector/dtos/CreateUserRequest.ts +12 -0
- package/src/cognitoBackofficeConnector/dtos/CreateUserResponse.ts +11 -0
- package/src/cognitoBackofficeConnector/dtos/CustomAttributeSpec.ts +12 -0
- package/src/cognitoBackofficeConnector/dtos/DeletePoolRequest.ts +16 -0
- package/src/cognitoBackofficeConnector/dtos/DeleteUserRequest.ts +7 -0
- package/src/cognitoBackofficeConnector/dtos/ForgotPasswordRequest.ts +9 -0
- package/src/cognitoBackofficeConnector/dtos/HealthcheckResponse.ts +12 -0
- package/src/cognitoBackofficeConnector/dtos/InitiateAuthRequest.ts +11 -0
- package/src/cognitoBackofficeConnector/dtos/InitiateAuthResponse.ts +17 -0
- package/src/cognitoBackofficeConnector/dtos/MfaPoolConfig.ts +16 -0
- package/src/cognitoBackofficeConnector/dtos/MfaResetRequest.ts +7 -0
- package/src/cognitoBackofficeConnector/dtos/MfaVerifyResponse.ts +8 -0
- package/src/cognitoBackofficeConnector/dtos/PasswordPolicyConfig.ts +11 -0
- package/src/cognitoBackofficeConnector/dtos/RefreshTokensRequest.ts +9 -0
- package/src/cognitoBackofficeConnector/dtos/RefreshTokensResponse.ts +5 -0
- package/src/cognitoBackofficeConnector/dtos/ResendConfirmationRequest.ts +9 -0
- package/src/cognitoBackofficeConnector/dtos/ResendInvitationRequest.ts +7 -0
- package/src/cognitoBackofficeConnector/dtos/RespondToChallengeRequest.ts +12 -0
- package/src/cognitoBackofficeConnector/dtos/RespondToChallengeResponse.ts +14 -0
- package/src/cognitoBackofficeConnector/dtos/SetMfaPreferenceRequest.ts +12 -0
- package/src/cognitoBackofficeConnector/dtos/TotpBeginRequest.ts +8 -0
- package/src/cognitoBackofficeConnector/dtos/TotpBeginResponse.ts +4 -0
- package/src/cognitoBackofficeConnector/dtos/TotpVerifyRequest.ts +9 -0
- package/src/cognitoBackofficeConnector/dtos/UpdateEmailRequest.ts +8 -0
- package/src/cognitoBackofficeConnector/dtos/UpdateProfileRequest.ts +15 -0
- package/src/cognitoBackofficeConnector/dtos/UpdateUserAttributesRequest.ts +12 -0
- package/src/cognitoBackofficeConnector/dtos/UserActionRequest.ts +12 -0
- package/src/cognitoBackofficeConnector/dtos/UserDetailResponse.ts +14 -0
- package/src/cognitoBackofficeConnector/dtos/VerifyEmailRequest.ts +8 -0
- package/src/cognitoBackofficeConnector/enums/CognitoChallengeType.ts +26 -0
- package/src/cognitoBackofficeConnector/enums/CognitoUserStatus.ts +29 -0
- package/src/cognitoBackofficeConnector/index.ts +50 -0
- package/src/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.ts +29 -0
- package/src/cognitoBackofficeConnector/validators/NoTenantIdInCustomAttrs.ts +36 -0
- package/src/index.ts +8 -0
- package/src/platformRbac/dtos/AuthContext.ts +22 -0
- package/src/platformRbac/dtos/PermissionMeta.ts +20 -0
- package/src/platformRbac/dtos/RoleAssignmentInfo.ts +12 -0
- package/src/platformRbac/enums/Permission.ts +120 -0
- package/src/platformRbac/enums/PermissionCategory.ts +14 -0
- package/src/platformRbac/enums/PermissionScope.ts +10 -0
- package/src/platformRbac/index.ts +17 -0
- package/src/rbac/enums/PoolKind.ts +16 -0
- package/src/rbac/index.ts +1 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TotpVerifyRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class TotpVerifyRequest {
|
|
16
|
+
}
|
|
17
|
+
exports.TotpVerifyRequest = TotpVerifyRequest;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_transformer_1.Expose)(),
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], TotpVerifyRequest.prototype, "region", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_transformer_1.Expose)(),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], TotpVerifyRequest.prototype, "accessToken", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_transformer_1.Expose)(),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], TotpVerifyRequest.prototype, "userCode", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_transformer_1.Expose)(),
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], TotpVerifyRequest.prototype, "friendlyDeviceName", void 0);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UpdateEmailRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class UpdateEmailRequest {
|
|
16
|
+
}
|
|
17
|
+
exports.UpdateEmailRequest = UpdateEmailRequest;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_transformer_1.Expose)(),
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], UpdateEmailRequest.prototype, "region", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_transformer_1.Expose)(),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], UpdateEmailRequest.prototype, "accessToken", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_transformer_1.Expose)(),
|
|
32
|
+
(0, class_validator_1.IsEmail)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], UpdateEmailRequest.prototype, "newEmail", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* D3 ajuste 2: self-service profile update NO permite tocar `customAttributes`
|
|
3
|
+
* — eso es exclusivo del path admin (`UpdateUserAttributesRequest` con
|
|
4
|
+
* `NoTenantIdInCustomAttrs`). El self-service solo modifica campos personales
|
|
5
|
+
* benignos.
|
|
6
|
+
*/
|
|
7
|
+
export declare class UpdateProfileRequest {
|
|
8
|
+
region: string;
|
|
9
|
+
accessToken: string;
|
|
10
|
+
displayName?: string;
|
|
11
|
+
phoneNumber?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UpdateProfileRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* D3 ajuste 2: self-service profile update NO permite tocar `customAttributes`
|
|
17
|
+
* — eso es exclusivo del path admin (`UpdateUserAttributesRequest` con
|
|
18
|
+
* `NoTenantIdInCustomAttrs`). El self-service solo modifica campos personales
|
|
19
|
+
* benignos.
|
|
20
|
+
*/
|
|
21
|
+
class UpdateProfileRequest {
|
|
22
|
+
}
|
|
23
|
+
exports.UpdateProfileRequest = UpdateProfileRequest;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_transformer_1.Expose)(),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], UpdateProfileRequest.prototype, "region", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_transformer_1.Expose)(),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], UpdateProfileRequest.prototype, "accessToken", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_transformer_1.Expose)(),
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], UpdateProfileRequest.prototype, "displayName", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_transformer_1.Expose)(),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
(0, class_validator_1.IsString)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], UpdateProfileRequest.prototype, "phoneNumber", void 0);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UpdateUserAttributesRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const NoTenantIdInCustomAttrs_1 = require("../validators/NoTenantIdInCustomAttrs");
|
|
16
|
+
class UpdateUserAttributesRequest {
|
|
17
|
+
}
|
|
18
|
+
exports.UpdateUserAttributesRequest = UpdateUserAttributesRequest;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_transformer_1.Expose)(),
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], UpdateUserAttributesRequest.prototype, "userPoolId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], UpdateUserAttributesRequest.prototype, "region", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], UpdateUserAttributesRequest.prototype, "displayName", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_transformer_1.Expose)(),
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], UpdateUserAttributesRequest.prototype, "phoneNumber", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_transformer_1.Expose)(),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
(0, class_validator_1.IsObject)(),
|
|
47
|
+
(0, class_validator_1.Validate)(NoTenantIdInCustomAttrs_1.NoTenantIdInCustomAttrs),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], UpdateUserAttributesRequest.prototype, "customAttributes", void 0);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request shared para acciones admin que solo requieren identificar el pool
|
|
3
|
+
* (el `cognitoSub` viaja por path param del endpoint): disable, enable,
|
|
4
|
+
* global sign-out, password reset.
|
|
5
|
+
*/
|
|
6
|
+
export declare class UserActionRequest {
|
|
7
|
+
userPoolId: string;
|
|
8
|
+
region: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UserActionRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Request shared para acciones admin que solo requieren identificar el pool
|
|
17
|
+
* (el `cognitoSub` viaja por path param del endpoint): disable, enable,
|
|
18
|
+
* global sign-out, password reset.
|
|
19
|
+
*/
|
|
20
|
+
class UserActionRequest {
|
|
21
|
+
}
|
|
22
|
+
exports.UserActionRequest = UserActionRequest;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_transformer_1.Expose)(),
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], UserActionRequest.prototype, "userPoolId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], UserActionRequest.prototype, "region", void 0);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CognitoUserStatus } from '../enums/CognitoUserStatus';
|
|
2
|
+
export declare class UserDetailResponse {
|
|
3
|
+
cognitoSub: string;
|
|
4
|
+
email: string;
|
|
5
|
+
emailVerified: boolean;
|
|
6
|
+
status: CognitoUserStatus;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
displayName?: string;
|
|
9
|
+
phoneNumber?: string;
|
|
10
|
+
customAttributes?: Record<string, string>;
|
|
11
|
+
createdAt: number;
|
|
12
|
+
lastModifiedAt: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.VerifyEmailRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class VerifyEmailRequest {
|
|
16
|
+
}
|
|
17
|
+
exports.VerifyEmailRequest = VerifyEmailRequest;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_transformer_1.Expose)(),
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], VerifyEmailRequest.prototype, "region", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_transformer_1.Expose)(),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], VerifyEmailRequest.prototype, "accessToken", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_transformer_1.Expose)(),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], VerifyEmailRequest.prototype, "confirmationCode", void 0);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tipos de Cognito Challenge que el `cognito-backoffice-connector` propaga al
|
|
3
|
+
* caller (típicamente el BFF M18). Son los 4 valores canónicos del proyecto.
|
|
4
|
+
*
|
|
5
|
+
* Decisión A17 (MFA exclusivo): el proyecto soporta exclusivamente TOTP +
|
|
6
|
+
* Email OTP. Cualquier otro challenge que devuelva el SDK
|
|
7
|
+
* (`SELECT_MFA_TYPE`, `SMS_MFA`, `DEVICE_SRP_AUTH`, `DEVICE_PASSWORD_VERIFIER`,
|
|
8
|
+
* `CUSTOM_CHALLENGE`, `ADMIN_NO_SRP_AUTH`, etc.) NO se propaga como
|
|
9
|
+
* `challengeType` — se mapea a `CognitoUnexpectedError` con HTTP 502 en el
|
|
10
|
+
* service correspondiente.
|
|
11
|
+
*
|
|
12
|
+
* - `NEW_PASSWORD_REQUIRED` — el usuario fue creado con temp password y debe
|
|
13
|
+
* setear una definitiva en el primer login.
|
|
14
|
+
* - `MFA_SETUP` — el usuario debe enrolarse en MFA (TOTP o Email) antes de
|
|
15
|
+
* obtener tokens.
|
|
16
|
+
* - `SOFTWARE_TOKEN_MFA` — el usuario tiene TOTP enrolado y debe enviar el
|
|
17
|
+
* código del authenticator.
|
|
18
|
+
* - `EMAIL_OTP` — el usuario tiene Email MFA habilitado y debe enviar el OTP
|
|
19
|
+
* enviado al email.
|
|
20
|
+
*/
|
|
21
|
+
export declare enum CognitoChallengeType {
|
|
22
|
+
NEW_PASSWORD_REQUIRED = "NEW_PASSWORD_REQUIRED",
|
|
23
|
+
MFA_SETUP = "MFA_SETUP",
|
|
24
|
+
SOFTWARE_TOKEN_MFA = "SOFTWARE_TOKEN_MFA",
|
|
25
|
+
EMAIL_OTP = "EMAIL_OTP"
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CognitoChallengeType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Tipos de Cognito Challenge que el `cognito-backoffice-connector` propaga al
|
|
6
|
+
* caller (típicamente el BFF M18). Son los 4 valores canónicos del proyecto.
|
|
7
|
+
*
|
|
8
|
+
* Decisión A17 (MFA exclusivo): el proyecto soporta exclusivamente TOTP +
|
|
9
|
+
* Email OTP. Cualquier otro challenge que devuelva el SDK
|
|
10
|
+
* (`SELECT_MFA_TYPE`, `SMS_MFA`, `DEVICE_SRP_AUTH`, `DEVICE_PASSWORD_VERIFIER`,
|
|
11
|
+
* `CUSTOM_CHALLENGE`, `ADMIN_NO_SRP_AUTH`, etc.) NO se propaga como
|
|
12
|
+
* `challengeType` — se mapea a `CognitoUnexpectedError` con HTTP 502 en el
|
|
13
|
+
* service correspondiente.
|
|
14
|
+
*
|
|
15
|
+
* - `NEW_PASSWORD_REQUIRED` — el usuario fue creado con temp password y debe
|
|
16
|
+
* setear una definitiva en el primer login.
|
|
17
|
+
* - `MFA_SETUP` — el usuario debe enrolarse en MFA (TOTP o Email) antes de
|
|
18
|
+
* obtener tokens.
|
|
19
|
+
* - `SOFTWARE_TOKEN_MFA` — el usuario tiene TOTP enrolado y debe enviar el
|
|
20
|
+
* código del authenticator.
|
|
21
|
+
* - `EMAIL_OTP` — el usuario tiene Email MFA habilitado y debe enviar el OTP
|
|
22
|
+
* enviado al email.
|
|
23
|
+
*/
|
|
24
|
+
var CognitoChallengeType;
|
|
25
|
+
(function (CognitoChallengeType) {
|
|
26
|
+
CognitoChallengeType["NEW_PASSWORD_REQUIRED"] = "NEW_PASSWORD_REQUIRED";
|
|
27
|
+
CognitoChallengeType["MFA_SETUP"] = "MFA_SETUP";
|
|
28
|
+
CognitoChallengeType["SOFTWARE_TOKEN_MFA"] = "SOFTWARE_TOKEN_MFA";
|
|
29
|
+
CognitoChallengeType["EMAIL_OTP"] = "EMAIL_OTP";
|
|
30
|
+
})(CognitoChallengeType || (exports.CognitoChallengeType = CognitoChallengeType = {}));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Estados posibles de un usuario en un Cognito User Pool, según el tipo
|
|
3
|
+
* `UserStatusType` del SDK `@aws-sdk/client-cognito-identity-provider`.
|
|
4
|
+
*
|
|
5
|
+
* El SDK no expone enum value `DISABLED` — el equivalente operativo en Cognito
|
|
6
|
+
* es el flag boolean `enabled` del usuario (ver `CreateUserResponse.enabled`
|
|
7
|
+
* y `UserDetailResponse.enabled`), que es independiente del `status`.
|
|
8
|
+
*
|
|
9
|
+
* `EXTERNAL_PROVIDER` (federación SAML / OIDC) no se incluye porque el
|
|
10
|
+
* proyecto NO usa federación — el backoffice solo administra usuarios nativos
|
|
11
|
+
* del pool.
|
|
12
|
+
*
|
|
13
|
+
* - `UNCONFIRMED` — el usuario fue creado pero no completó la verificación de email.
|
|
14
|
+
* - `CONFIRMED` — usuario verificado, puede operar (sujeto a MFA si aplica).
|
|
15
|
+
* - `ARCHIVED` — usuario archivado por Cognito (no puede operar, no se borra).
|
|
16
|
+
* - `COMPROMISED` — flag de Cognito Advanced Security: credencial comprometida.
|
|
17
|
+
* - `UNKNOWN` — Cognito no determinó el estado (raro).
|
|
18
|
+
* - `RESET_REQUIRED` — el usuario debe resetear password antes del próximo login.
|
|
19
|
+
* - `FORCE_CHANGE_PASSWORD` — temp password vigente, requiere `NEW_PASSWORD_REQUIRED`.
|
|
20
|
+
*/
|
|
21
|
+
export declare enum CognitoUserStatus {
|
|
22
|
+
UNCONFIRMED = "UNCONFIRMED",
|
|
23
|
+
CONFIRMED = "CONFIRMED",
|
|
24
|
+
ARCHIVED = "ARCHIVED",
|
|
25
|
+
COMPROMISED = "COMPROMISED",
|
|
26
|
+
UNKNOWN = "UNKNOWN",
|
|
27
|
+
RESET_REQUIRED = "RESET_REQUIRED",
|
|
28
|
+
FORCE_CHANGE_PASSWORD = "FORCE_CHANGE_PASSWORD"
|
|
29
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CognitoUserStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Estados posibles de un usuario en un Cognito User Pool, según el tipo
|
|
6
|
+
* `UserStatusType` del SDK `@aws-sdk/client-cognito-identity-provider`.
|
|
7
|
+
*
|
|
8
|
+
* El SDK no expone enum value `DISABLED` — el equivalente operativo en Cognito
|
|
9
|
+
* es el flag boolean `enabled` del usuario (ver `CreateUserResponse.enabled`
|
|
10
|
+
* y `UserDetailResponse.enabled`), que es independiente del `status`.
|
|
11
|
+
*
|
|
12
|
+
* `EXTERNAL_PROVIDER` (federación SAML / OIDC) no se incluye porque el
|
|
13
|
+
* proyecto NO usa federación — el backoffice solo administra usuarios nativos
|
|
14
|
+
* del pool.
|
|
15
|
+
*
|
|
16
|
+
* - `UNCONFIRMED` — el usuario fue creado pero no completó la verificación de email.
|
|
17
|
+
* - `CONFIRMED` — usuario verificado, puede operar (sujeto a MFA si aplica).
|
|
18
|
+
* - `ARCHIVED` — usuario archivado por Cognito (no puede operar, no se borra).
|
|
19
|
+
* - `COMPROMISED` — flag de Cognito Advanced Security: credencial comprometida.
|
|
20
|
+
* - `UNKNOWN` — Cognito no determinó el estado (raro).
|
|
21
|
+
* - `RESET_REQUIRED` — el usuario debe resetear password antes del próximo login.
|
|
22
|
+
* - `FORCE_CHANGE_PASSWORD` — temp password vigente, requiere `NEW_PASSWORD_REQUIRED`.
|
|
23
|
+
*/
|
|
24
|
+
var CognitoUserStatus;
|
|
25
|
+
(function (CognitoUserStatus) {
|
|
26
|
+
CognitoUserStatus["UNCONFIRMED"] = "UNCONFIRMED";
|
|
27
|
+
CognitoUserStatus["CONFIRMED"] = "CONFIRMED";
|
|
28
|
+
CognitoUserStatus["ARCHIVED"] = "ARCHIVED";
|
|
29
|
+
CognitoUserStatus["COMPROMISED"] = "COMPROMISED";
|
|
30
|
+
CognitoUserStatus["UNKNOWN"] = "UNKNOWN";
|
|
31
|
+
CognitoUserStatus["RESET_REQUIRED"] = "RESET_REQUIRED";
|
|
32
|
+
CognitoUserStatus["FORCE_CHANGE_PASSWORD"] = "FORCE_CHANGE_PASSWORD";
|
|
33
|
+
})(CognitoUserStatus || (exports.CognitoUserStatus = CognitoUserStatus = {}));
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Módulo `cognitoBackofficeConnector` — DTOs, enums y validators para el Lambda
|
|
3
|
+
* `cognito-backoffice-connector` (backoffice multi-tenant Fiado).
|
|
4
|
+
*
|
|
5
|
+
* Es un módulo NUEVO y SEPARADO del módulo `cognitoConnector/` legacy que pertenece
|
|
6
|
+
* a otro Lambda Cognito Fiado (mantenido por yhonhansen). No reusar tipos del
|
|
7
|
+
* legacy aquí ni viceversa — los dominios divergieron y mezclarlos arrastraría
|
|
8
|
+
* acoplamiento histórico.
|
|
9
|
+
*/
|
|
10
|
+
export * from './enums/CognitoChallengeType';
|
|
11
|
+
export * from './enums/CognitoUserStatus';
|
|
12
|
+
export * from './validators/NoTenantIdInCustomAttrs';
|
|
13
|
+
export * from './validators/MfaTypesRequiresOne';
|
|
14
|
+
export * from './dtos/CreateUserRequest';
|
|
15
|
+
export * from './dtos/CreateUserResponse';
|
|
16
|
+
export * from './dtos/UpdateUserAttributesRequest';
|
|
17
|
+
export * from './dtos/UserActionRequest';
|
|
18
|
+
export * from './dtos/DeleteUserRequest';
|
|
19
|
+
export * from './dtos/ResendInvitationRequest';
|
|
20
|
+
export * from './dtos/UserDetailResponse';
|
|
21
|
+
export * from './dtos/AuthEventsRequest';
|
|
22
|
+
export * from './dtos/AuthEventResponse';
|
|
23
|
+
export * from './dtos/AuthTokensResponse';
|
|
24
|
+
export * from './dtos/InitiateAuthRequest';
|
|
25
|
+
export * from './dtos/InitiateAuthResponse';
|
|
26
|
+
export * from './dtos/RespondToChallengeRequest';
|
|
27
|
+
export * from './dtos/RespondToChallengeResponse';
|
|
28
|
+
export * from './dtos/RefreshTokensRequest';
|
|
29
|
+
export * from './dtos/RefreshTokensResponse';
|
|
30
|
+
export * from './dtos/ForgotPasswordRequest';
|
|
31
|
+
export * from './dtos/ConfirmForgotPasswordRequest';
|
|
32
|
+
export * from './dtos/ResendConfirmationRequest';
|
|
33
|
+
export * from './dtos/ChangePasswordRequest';
|
|
34
|
+
export * from './dtos/TotpBeginRequest';
|
|
35
|
+
export * from './dtos/TotpBeginResponse';
|
|
36
|
+
export * from './dtos/TotpVerifyRequest';
|
|
37
|
+
export * from './dtos/MfaVerifyResponse';
|
|
38
|
+
export * from './dtos/SetMfaPreferenceRequest';
|
|
39
|
+
export * from './dtos/MfaResetRequest';
|
|
40
|
+
export * from './dtos/UpdateEmailRequest';
|
|
41
|
+
export * from './dtos/VerifyEmailRequest';
|
|
42
|
+
export * from './dtos/UpdateProfileRequest';
|
|
43
|
+
export * from './dtos/HealthcheckResponse';
|
|
44
|
+
export * from './dtos/MfaPoolConfig';
|
|
45
|
+
export * from './dtos/PasswordPolicyConfig';
|
|
46
|
+
export * from './dtos/CustomAttributeSpec';
|
|
47
|
+
export * from './dtos/AppClientConfig';
|
|
48
|
+
export * from './dtos/CreatePoolRequest';
|
|
49
|
+
export * from './dtos/CreatePoolResponse';
|
|
50
|
+
export * from './dtos/DeletePoolRequest';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/**
|
|
18
|
+
* Módulo `cognitoBackofficeConnector` — DTOs, enums y validators para el Lambda
|
|
19
|
+
* `cognito-backoffice-connector` (backoffice multi-tenant Fiado).
|
|
20
|
+
*
|
|
21
|
+
* Es un módulo NUEVO y SEPARADO del módulo `cognitoConnector/` legacy que pertenece
|
|
22
|
+
* a otro Lambda Cognito Fiado (mantenido por yhonhansen). No reusar tipos del
|
|
23
|
+
* legacy aquí ni viceversa — los dominios divergieron y mezclarlos arrastraría
|
|
24
|
+
* acoplamiento histórico.
|
|
25
|
+
*/
|
|
26
|
+
__exportStar(require("./enums/CognitoChallengeType"), exports);
|
|
27
|
+
__exportStar(require("./enums/CognitoUserStatus"), exports);
|
|
28
|
+
__exportStar(require("./validators/NoTenantIdInCustomAttrs"), exports);
|
|
29
|
+
__exportStar(require("./validators/MfaTypesRequiresOne"), exports);
|
|
30
|
+
__exportStar(require("./dtos/CreateUserRequest"), exports);
|
|
31
|
+
__exportStar(require("./dtos/CreateUserResponse"), exports);
|
|
32
|
+
__exportStar(require("./dtos/UpdateUserAttributesRequest"), exports);
|
|
33
|
+
__exportStar(require("./dtos/UserActionRequest"), exports);
|
|
34
|
+
__exportStar(require("./dtos/DeleteUserRequest"), exports);
|
|
35
|
+
__exportStar(require("./dtos/ResendInvitationRequest"), exports);
|
|
36
|
+
__exportStar(require("./dtos/UserDetailResponse"), exports);
|
|
37
|
+
__exportStar(require("./dtos/AuthEventsRequest"), exports);
|
|
38
|
+
__exportStar(require("./dtos/AuthEventResponse"), exports);
|
|
39
|
+
__exportStar(require("./dtos/AuthTokensResponse"), exports);
|
|
40
|
+
__exportStar(require("./dtos/InitiateAuthRequest"), exports);
|
|
41
|
+
__exportStar(require("./dtos/InitiateAuthResponse"), exports);
|
|
42
|
+
__exportStar(require("./dtos/RespondToChallengeRequest"), exports);
|
|
43
|
+
__exportStar(require("./dtos/RespondToChallengeResponse"), exports);
|
|
44
|
+
__exportStar(require("./dtos/RefreshTokensRequest"), exports);
|
|
45
|
+
__exportStar(require("./dtos/RefreshTokensResponse"), exports);
|
|
46
|
+
__exportStar(require("./dtos/ForgotPasswordRequest"), exports);
|
|
47
|
+
__exportStar(require("./dtos/ConfirmForgotPasswordRequest"), exports);
|
|
48
|
+
__exportStar(require("./dtos/ResendConfirmationRequest"), exports);
|
|
49
|
+
__exportStar(require("./dtos/ChangePasswordRequest"), exports);
|
|
50
|
+
__exportStar(require("./dtos/TotpBeginRequest"), exports);
|
|
51
|
+
__exportStar(require("./dtos/TotpBeginResponse"), exports);
|
|
52
|
+
__exportStar(require("./dtos/TotpVerifyRequest"), exports);
|
|
53
|
+
__exportStar(require("./dtos/MfaVerifyResponse"), exports);
|
|
54
|
+
__exportStar(require("./dtos/SetMfaPreferenceRequest"), exports);
|
|
55
|
+
__exportStar(require("./dtos/MfaResetRequest"), exports);
|
|
56
|
+
__exportStar(require("./dtos/UpdateEmailRequest"), exports);
|
|
57
|
+
__exportStar(require("./dtos/VerifyEmailRequest"), exports);
|
|
58
|
+
__exportStar(require("./dtos/UpdateProfileRequest"), exports);
|
|
59
|
+
__exportStar(require("./dtos/HealthcheckResponse"), exports);
|
|
60
|
+
__exportStar(require("./dtos/MfaPoolConfig"), exports);
|
|
61
|
+
__exportStar(require("./dtos/PasswordPolicyConfig"), exports);
|
|
62
|
+
__exportStar(require("./dtos/CustomAttributeSpec"), exports);
|
|
63
|
+
__exportStar(require("./dtos/AppClientConfig"), exports);
|
|
64
|
+
__exportStar(require("./dtos/CreatePoolRequest"), exports);
|
|
65
|
+
__exportStar(require("./dtos/CreatePoolResponse"), exports);
|
|
66
|
+
__exportStar(require("./dtos/DeletePoolRequest"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ValidatorConstraintInterface, ValidationArguments } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Cross-field validator: si `requireMfa: true`, entonces `mfaTypes` debe tener
|
|
4
|
+
* al menos 1 elemento. Si `requireMfa: false`, `mfaTypes` puede ser vacío.
|
|
5
|
+
*
|
|
6
|
+
* Razón: cuando el pool nace con MFA habilitado, el connector llama
|
|
7
|
+
* `SetUserPoolMfaConfigCommand` con la lista de tipos del DTO. Si el array
|
|
8
|
+
* llega vacío con `requireMfa: true`, el SDK rechaza con InvalidParameterException
|
|
9
|
+
* y el pool queda en estado inconsistente (MfaConfiguration:'ON' sin tipos).
|
|
10
|
+
* Mejor rechazar en validación del DTO antes de tocar AWS.
|
|
11
|
+
*
|
|
12
|
+
* Ver pivote v1.4.1 TD-017 cerrado + spec doc §1 R3.
|
|
13
|
+
*/
|
|
14
|
+
export declare class MfaTypesRequiresOne implements ValidatorConstraintInterface {
|
|
15
|
+
validate(mfaTypes: unknown, args: ValidationArguments): boolean;
|
|
16
|
+
defaultMessage(): string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.MfaTypesRequiresOne = void 0;
|
|
10
|
+
const class_validator_1 = require("class-validator");
|
|
11
|
+
/**
|
|
12
|
+
* Cross-field validator: si `requireMfa: true`, entonces `mfaTypes` debe tener
|
|
13
|
+
* al menos 1 elemento. Si `requireMfa: false`, `mfaTypes` puede ser vacío.
|
|
14
|
+
*
|
|
15
|
+
* Razón: cuando el pool nace con MFA habilitado, el connector llama
|
|
16
|
+
* `SetUserPoolMfaConfigCommand` con la lista de tipos del DTO. Si el array
|
|
17
|
+
* llega vacío con `requireMfa: true`, el SDK rechaza con InvalidParameterException
|
|
18
|
+
* y el pool queda en estado inconsistente (MfaConfiguration:'ON' sin tipos).
|
|
19
|
+
* Mejor rechazar en validación del DTO antes de tocar AWS.
|
|
20
|
+
*
|
|
21
|
+
* Ver pivote v1.4.1 TD-017 cerrado + spec doc §1 R3.
|
|
22
|
+
*/
|
|
23
|
+
let MfaTypesRequiresOne = class MfaTypesRequiresOne {
|
|
24
|
+
validate(mfaTypes, args) {
|
|
25
|
+
const obj = args.object;
|
|
26
|
+
if (obj.requireMfa === true) {
|
|
27
|
+
return Array.isArray(mfaTypes) && mfaTypes.length >= 1;
|
|
28
|
+
}
|
|
29
|
+
// requireMfa: false → cualquier mfaTypes pasa.
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
defaultMessage() {
|
|
33
|
+
return 'mfaTypes requiere al menos un tipo cuando requireMfa=true';
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.MfaTypesRequiresOne = MfaTypesRequiresOne;
|
|
37
|
+
exports.MfaTypesRequiresOne = MfaTypesRequiresOne = __decorate([
|
|
38
|
+
(0, class_validator_1.ValidatorConstraint)({ name: 'MfaTypesRequiresOneWhenMfaRequired', async: false })
|
|
39
|
+
], MfaTypesRequiresOne);
|