@fiado/type-kit 1.0.58 → 1.0.60
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/bin/account/dtos/AccountCreateRequest.d.ts +2 -2
- package/bin/account/dtos/AccountCreateRequest.js +6 -6
- package/bin/card/enums/DeliveryChannel.d.ts +5 -0
- package/bin/card/enums/DeliveryChannel.js +9 -0
- package/bin/card/enums/ExternalShippingStatus.d.ts +14 -0
- package/bin/card/enums/ExternalShippingStatus.js +18 -0
- package/bin/card/enums/ExternalShippingStatusDetails.d.ts +54 -0
- package/bin/card/enums/ExternalShippingStatusDetails.js +58 -0
- package/bin/card/index.d.ts +3 -0
- package/bin/card/index.js +3 -0
- package/bin/group/dtos/GroupDirectoryRetationsUpdateRequest.d.ts +3 -0
- package/bin/group/dtos/GroupDirectoryRetationsUpdateRequest.js +22 -0
- package/bin/index.d.ts +1 -0
- package/bin/index.js +2 -1
- package/bin/tern/dtos/TernAddress.d.ts +8 -0
- package/bin/tern/dtos/TernAddress.js +40 -0
- package/bin/tern/dtos/TernCreateAccountRequest.d.ts +7 -0
- package/bin/tern/dtos/TernCreateAccountRequest.js +33 -0
- package/bin/tern/dtos/TernCreateAccountResponse.d.ts +5 -0
- package/bin/tern/dtos/TernCreateAccountResponse.js +25 -0
- package/bin/tern/dtos/TernCreateUserRequest.d.ts +15 -0
- package/bin/tern/dtos/TernCreateUserRequest.js +70 -0
- package/bin/tern/dtos/TernCreateUserResponse.d.ts +8 -0
- package/bin/tern/dtos/TernCreateUserResponse.js +37 -0
- package/bin/tern/dtos/TernGetAccountRequest.d.ts +5 -0
- package/bin/tern/dtos/TernGetAccountRequest.js +25 -0
- package/bin/tern/dtos/TernGetAccountResponse.d.ts +22 -0
- package/bin/tern/dtos/TernGetAccountResponse.js +87 -0
- package/bin/tern/dtos/TernGetUserRequest.d.ts +3 -0
- package/bin/tern/dtos/TernGetUserRequest.js +20 -0
- package/bin/tern/dtos/TernGetUserResponse.d.ts +24 -0
- package/bin/tern/dtos/TernGetUserResponse.js +96 -0
- package/bin/tern/enums/TernAccountStatusEnum.d.ts +4 -0
- package/bin/tern/enums/TernAccountStatusEnum.js +8 -0
- package/bin/tern/enums/TernAccountTypeEnum.d.ts +5 -0
- package/bin/tern/enums/TernAccountTypeEnum.js +9 -0
- package/bin/tern/index.d.ts +11 -0
- package/bin/tern/index.js +29 -0
- package/package.json +1 -1
- package/src/account/dtos/AccountCreateRequest.ts +7 -7
- package/src/card/enums/DeliveryChannel.ts +7 -0
- package/src/card/enums/ExternalShippingStatus.ts +15 -0
- package/src/card/enums/ExternalShippingStatusDetails.ts +54 -0
- package/src/card/index.ts +5 -0
- package/src/index.ts +1 -0
- package/src/tern/dtos/TernAddress.ts +21 -0
- package/src/tern/dtos/TernCreateAccountRequest.ts +16 -0
- package/src/tern/dtos/TernCreateAccountResponse.ts +10 -0
- package/src/tern/dtos/TernCreateUserRequest.ts +47 -0
- package/src/tern/dtos/TernCreateUserResponse.ts +19 -0
- package/src/tern/dtos/TernGetAccountRequest.ts +10 -0
- package/src/tern/dtos/TernGetAccountResponse.ts +57 -0
- package/src/tern/dtos/TernGetUserRequest.ts +6 -0
- package/src/tern/dtos/TernGetUserResponse.ts +64 -0
- package/src/tern/enums/TernAccountStatusEnum.ts +4 -0
- package/src/tern/enums/TernAccountTypeEnum.ts +5 -0
- package/src/tern/index.ts +14 -0
|
@@ -0,0 +1,87 @@
|
|
|
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.TernGetAccountResponse = void 0;
|
|
13
|
+
const TernAccountTypeEnum_1 = require("../enums/TernAccountTypeEnum");
|
|
14
|
+
const TernAddress_1 = require("./TernAddress");
|
|
15
|
+
const TernAccountStatusEnum_1 = require("../enums/TernAccountStatusEnum");
|
|
16
|
+
const class_validator_1 = require("class-validator");
|
|
17
|
+
class TernGetAccountResponse {
|
|
18
|
+
}
|
|
19
|
+
exports.TernGetAccountResponse = TernGetAccountResponse;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], TernGetAccountResponse.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], TernGetAccountResponse.prototype, "businessId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], TernGetAccountResponse.prototype, "userId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], TernGetAccountResponse.prototype, "name", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], TernGetAccountResponse.prototype, "accountNumber", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], TernGetAccountResponse.prototype, "routingNumber", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsEnum)(TernAccountTypeEnum_1.TernAccountTypeEnum),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], TernGetAccountResponse.prototype, "accountType", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsBoolean)(),
|
|
50
|
+
__metadata("design:type", Boolean)
|
|
51
|
+
], TernGetAccountResponse.prototype, "active", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsBoolean)(),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], TernGetAccountResponse.prototype, "isPrimary", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsString)(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], TernGetAccountResponse.prototype, "createdDate", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsString)(),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], TernGetAccountResponse.prototype, "updatedDate", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_validator_1.IsString)(),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], TernGetAccountResponse.prototype, "deletedDate", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_validator_1.IsString)(),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], TernGetAccountResponse.prototype, "updatedBy", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, class_validator_1.IsNumber)(),
|
|
74
|
+
__metadata("design:type", Number)
|
|
75
|
+
], TernGetAccountResponse.prototype, "balance", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, class_validator_1.ValidateNested)(),
|
|
78
|
+
__metadata("design:type", TernAddress_1.TernAddress)
|
|
79
|
+
], TernGetAccountResponse.prototype, "address", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, class_validator_1.IsString)(),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], TernGetAccountResponse.prototype, "kybStatus", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, class_validator_1.IsEnum)(TernAccountStatusEnum_1.TernAccountStatusEnum),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], TernGetAccountResponse.prototype, "statusName", void 0);
|
|
@@ -0,0 +1,20 @@
|
|
|
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.TernGetUserRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class TernGetUserRequest {
|
|
15
|
+
}
|
|
16
|
+
exports.TernGetUserRequest = TernGetUserRequest;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], TernGetUserRequest.prototype, "externalUserId", void 0);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SexDocument } from "../../identity";
|
|
2
|
+
import { TernAccountStatusEnum } from "../enums/TernAccountStatusEnum";
|
|
3
|
+
import { TernAddress } from "./TernAddress";
|
|
4
|
+
export declare class TernGetUserResponse {
|
|
5
|
+
id: string;
|
|
6
|
+
typeOfUserId: string;
|
|
7
|
+
dob: string;
|
|
8
|
+
name: string;
|
|
9
|
+
lastName: string;
|
|
10
|
+
phoneNumber: string;
|
|
11
|
+
email: string;
|
|
12
|
+
address?: TernAddress;
|
|
13
|
+
status: TernAccountStatusEnum;
|
|
14
|
+
sex?: SexDocument;
|
|
15
|
+
documentNumber: string;
|
|
16
|
+
typeOfDocumentId?: string;
|
|
17
|
+
countryId: string;
|
|
18
|
+
userAccountIds?: string[];
|
|
19
|
+
createdDate?: string;
|
|
20
|
+
updatedDate?: string;
|
|
21
|
+
deletedDate?: string;
|
|
22
|
+
updatedBy?: string;
|
|
23
|
+
accountIds?: number[];
|
|
24
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
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.TernGetUserResponse = void 0;
|
|
13
|
+
const identity_1 = require("../../identity");
|
|
14
|
+
const TernAccountStatusEnum_1 = require("../enums/TernAccountStatusEnum");
|
|
15
|
+
const TernAddress_1 = require("./TernAddress");
|
|
16
|
+
const class_validator_1 = require("class-validator");
|
|
17
|
+
const IsPhoneNumberConstraint_1 = require("../../card/validations/IsPhoneNumberConstraint");
|
|
18
|
+
class TernGetUserResponse {
|
|
19
|
+
}
|
|
20
|
+
exports.TernGetUserResponse = TernGetUserResponse;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], TernGetUserResponse.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], TernGetUserResponse.prototype, "typeOfUserId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], TernGetUserResponse.prototype, "dob", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], TernGetUserResponse.prototype, "name", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsString)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], TernGetUserResponse.prototype, "lastName", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, IsPhoneNumberConstraint_1.IsPhoneNumberFiado)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], TernGetUserResponse.prototype, "phoneNumber", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsEmail)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], TernGetUserResponse.prototype, "email", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.ValidateNested)(),
|
|
51
|
+
__metadata("design:type", TernAddress_1.TernAddress)
|
|
52
|
+
], TernGetUserResponse.prototype, "address", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsEnum)(TernAccountStatusEnum_1.TernAccountStatusEnum),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], TernGetUserResponse.prototype, "status", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_validator_1.IsEnum)(identity_1.SexDocument),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], TernGetUserResponse.prototype, "sex", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, class_validator_1.IsString)(),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], TernGetUserResponse.prototype, "documentNumber", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, class_validator_1.IsString)(),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], TernGetUserResponse.prototype, "typeOfDocumentId", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsString)(),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], TernGetUserResponse.prototype, "countryId", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsArray)(),
|
|
75
|
+
__metadata("design:type", Array)
|
|
76
|
+
], TernGetUserResponse.prototype, "userAccountIds", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_validator_1.IsString)(),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], TernGetUserResponse.prototype, "createdDate", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.IsString)(),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], TernGetUserResponse.prototype, "updatedDate", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, class_validator_1.IsString)(),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], TernGetUserResponse.prototype, "deletedDate", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, class_validator_1.IsString)(),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], TernGetUserResponse.prototype, "updatedBy", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, class_validator_1.IsArray)(),
|
|
95
|
+
__metadata("design:type", Array)
|
|
96
|
+
], TernGetUserResponse.prototype, "accountIds", void 0);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TernAccountStatusEnum = void 0;
|
|
4
|
+
var TernAccountStatusEnum;
|
|
5
|
+
(function (TernAccountStatusEnum) {
|
|
6
|
+
TernAccountStatusEnum["ACTIVE"] = "ACTIVE";
|
|
7
|
+
TernAccountStatusEnum["INACTIVE"] = "INACTIVE";
|
|
8
|
+
})(TernAccountStatusEnum || (exports.TernAccountStatusEnum = TernAccountStatusEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TernAccountTypeEnum = void 0;
|
|
4
|
+
var TernAccountTypeEnum;
|
|
5
|
+
(function (TernAccountTypeEnum) {
|
|
6
|
+
TernAccountTypeEnum["CARD_ISSUING"] = "Card Issuing";
|
|
7
|
+
TernAccountTypeEnum["USER"] = "USER";
|
|
8
|
+
TernAccountTypeEnum["BUSINESS"] = "BUSINESS";
|
|
9
|
+
})(TernAccountTypeEnum || (exports.TernAccountTypeEnum = TernAccountTypeEnum = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './dtos/TernCreateUserRequest';
|
|
2
|
+
export * from './dtos/TernCreateUserResponse';
|
|
3
|
+
export * from './dtos/TernCreateAccountRequest';
|
|
4
|
+
export * from './dtos/TernCreateAccountResponse';
|
|
5
|
+
export * from './dtos/TernGetAccountRequest';
|
|
6
|
+
export * from './dtos/TernGetAccountResponse';
|
|
7
|
+
export * from './dtos/TernGetUserRequest';
|
|
8
|
+
export * from './dtos/TernGetUserResponse';
|
|
9
|
+
export * from './dtos/TernAddress';
|
|
10
|
+
export * from './enums/TernAccountTypeEnum';
|
|
11
|
+
export * from './enums/TernAccountStatusEnum';
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
// DTOs
|
|
18
|
+
__exportStar(require("./dtos/TernCreateUserRequest"), exports);
|
|
19
|
+
__exportStar(require("./dtos/TernCreateUserResponse"), exports);
|
|
20
|
+
__exportStar(require("./dtos/TernCreateAccountRequest"), exports);
|
|
21
|
+
__exportStar(require("./dtos/TernCreateAccountResponse"), exports);
|
|
22
|
+
__exportStar(require("./dtos/TernGetAccountRequest"), exports);
|
|
23
|
+
__exportStar(require("./dtos/TernGetAccountResponse"), exports);
|
|
24
|
+
__exportStar(require("./dtos/TernGetUserRequest"), exports);
|
|
25
|
+
__exportStar(require("./dtos/TernGetUserResponse"), exports);
|
|
26
|
+
__exportStar(require("./dtos/TernAddress"), exports);
|
|
27
|
+
// ENUMS
|
|
28
|
+
__exportStar(require("./enums/TernAccountTypeEnum"), exports);
|
|
29
|
+
__exportStar(require("./enums/TernAccountStatusEnum"), exports);
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IsEmail, IsEnum, IsString,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import {IsDateString, IsEmail, IsEnum, IsString, Length, Matches, ValidateNested} from 'class-validator';
|
|
2
|
+
import {AddressResponse} from "../../address";
|
|
3
|
+
import {Country} from "../../country";
|
|
4
|
+
import {regexUuidV4} from '../../helpers/constans/regex';
|
|
5
|
+
import {TypeOfDirectoryId} from '../../directory';
|
|
6
|
+
import {IsPhoneNumberFiado} from '../../card/validations/IsPhoneNumberConstraint';
|
|
7
|
+
import {SexDocument} from '../../identity';
|
|
8
8
|
|
|
9
9
|
export class AccountCreateRequest {
|
|
10
10
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
export enum ExternalShippingStatus {
|
|
3
|
+
CREATED = "CREATED",
|
|
4
|
+
PENDING = "PENDING",
|
|
5
|
+
TRACKED = "TRACKED",
|
|
6
|
+
REJECTED = "REJECTED",
|
|
7
|
+
IN_TRANSIT = "IN_TRANSIT",
|
|
8
|
+
FAILED_DELIVERY_ATTEMPT = "FAILED_DELIVERY_ATTEMPT",
|
|
9
|
+
DELIVERED = "DELIVERED",
|
|
10
|
+
NOT_DELIVERED = "NOT_DELIVERED",
|
|
11
|
+
START_OF_CUSTODY = "START_OF_CUSTODY",
|
|
12
|
+
DESTRUCTION = "DESTRUCTION",
|
|
13
|
+
ACCIDENT = "ACCIDENT",
|
|
14
|
+
UNKNOWN = "UNKNOWN",
|
|
15
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export enum ExternalShippingStatusDetail {
|
|
2
|
+
CREATED = "CREATED",
|
|
3
|
+
PENDING = "PENDING",
|
|
4
|
+
READY_FOR_DISTRIBUTION = "READY_FOR_DISTRIBUTION",
|
|
5
|
+
ROAD_TO_PICKUP = "ROAD_TO_PICKUP",
|
|
6
|
+
UNSUCCESSFUL_PICKUP = "UNSUCCESSFUL_PICKUP",
|
|
7
|
+
ROAD_TO_RETURN = "ROAD_TO_RETURN",
|
|
8
|
+
UNSUCCESSFUL_RETURN = "UNSUCCESSFUL_RETURN",
|
|
9
|
+
REJECTED = "REJECTED",
|
|
10
|
+
SHIPMENT_SENT = "SHIPMENT_SENT",
|
|
11
|
+
SHIPMENT_CONFIRMED = "SHIPMENT_CONFIRMED",
|
|
12
|
+
IN_TRANSIT = "IN_TRANSIT",
|
|
13
|
+
RECEIVED_BY_CARRIER = "RECEIVED_BY_CARRIER",
|
|
14
|
+
FAILED_DELIVERY_ATTEMPT = "FAILED_DELIVERY_ATTEMPT",
|
|
15
|
+
WRONG_ADDRESS = "WRONG_ADDRESS",
|
|
16
|
+
DELIVERED = "DELIVERED",
|
|
17
|
+
NOT_DELIVERED = "NOT_DELIVERED",
|
|
18
|
+
DESTRUCTION = "DESTRUCTION",
|
|
19
|
+
ACCIDENT = "ACCIDENT",
|
|
20
|
+
STOLEN = "STOLEN",
|
|
21
|
+
VISIT_SCHEDULED = "VISIT_SCHEDULED",
|
|
22
|
+
CALL_SCHEDULED = "CALL_SCHEDULED",
|
|
23
|
+
VISIT_CONFIRMED = "VISIT_CONFIRMED",
|
|
24
|
+
CALL_FAILED_UNKNOWN = "CALL_FAILED_UNKNOWN",
|
|
25
|
+
NO_ACCESS = "NO_ACCESS",
|
|
26
|
+
FAILED_VISIT_DEAD = "FAILED_VISIT_DEAD",
|
|
27
|
+
WRONG_OPERATOR_ZONE = "WRONG_OPERATOR_ZONE",
|
|
28
|
+
CALL_RESCHEDULED = "CALL_RESCHEDULED",
|
|
29
|
+
CALL_FAILED_DEAD = "CALL_FAILED_DEAD",
|
|
30
|
+
CALL_FAILED = "CALL_FAILED",
|
|
31
|
+
WHATSAPP_FAILED = "WHATSAPP_FAILED",
|
|
32
|
+
COURIER_FAILED = "COURIER_FAILED",
|
|
33
|
+
MISSING_DOCUMENTS = "MISSING_DOCUMENTS",
|
|
34
|
+
RETURNED_TO_WAREHOUSE = "RETURNED_TO_WAREHOUSE",
|
|
35
|
+
CLIENT_NOT_PRESENT = "CLIENT_NOT_PRESENT",
|
|
36
|
+
INCOMPLETE_ADDRESS = "INCOMPLETE_ADDRESS",
|
|
37
|
+
COVERAGE = "COVERAGE",
|
|
38
|
+
OPERATOR_REASSIGNED = "OPERATOR_REASSIGNED",
|
|
39
|
+
CLIENT_UNKNOWN = "CLIENT_UNKNOWN",
|
|
40
|
+
NO_CALL = "NO_CALL",
|
|
41
|
+
ZONE_PROBLEMS = "ZONE_PROBLEMS",
|
|
42
|
+
CLIENT_WORK = "CLIENT_WORK",
|
|
43
|
+
FRAUD = "FRAUD",
|
|
44
|
+
FRAUD_CLIENT = "FRAUD_CLIENT",
|
|
45
|
+
MISSING_NUMBER = "MISSING_NUMBER",
|
|
46
|
+
CLIENT_CANCELED = "CLIENT_CANCELED",
|
|
47
|
+
DESTROYED_BY_CLIENT = "DESTROYED_BY_CLIENT",
|
|
48
|
+
WEATHER = "WEATHER",
|
|
49
|
+
LOST = "LOST",
|
|
50
|
+
CLIENT_TRIP = "CLIENT_TRIP",
|
|
51
|
+
FAILED_VISIT_UNKNOWN = "FAILED_VISIT_UNKNOWN",
|
|
52
|
+
RETURNED = "RETURNED",
|
|
53
|
+
OTHER = "OTHER",
|
|
54
|
+
}
|
package/src/card/index.ts
CHANGED
|
@@ -24,5 +24,10 @@ export * from './enums/CreditOrDebit'
|
|
|
24
24
|
export * from './enums/ShippingStatus'
|
|
25
25
|
export * from './enums/Status'
|
|
26
26
|
export * from './enums/VirtualOrPhysical'
|
|
27
|
+
export * from './enums/DeliveryChannel'
|
|
28
|
+
export * from './enums/ExternalShippingStatus'
|
|
29
|
+
export * from './enums/ExternalShippingStatusDetails'
|
|
30
|
+
|
|
31
|
+
|
|
27
32
|
|
|
28
33
|
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {IsString} from "class-validator";
|
|
2
|
+
|
|
3
|
+
export class TernAddress {
|
|
4
|
+
@IsString()
|
|
5
|
+
address1?: string;
|
|
6
|
+
|
|
7
|
+
@IsString()
|
|
8
|
+
address2?: string;
|
|
9
|
+
|
|
10
|
+
@IsString()
|
|
11
|
+
city?: string;
|
|
12
|
+
|
|
13
|
+
@IsString()
|
|
14
|
+
province?: string;
|
|
15
|
+
|
|
16
|
+
@IsString()
|
|
17
|
+
postalCode?: string;
|
|
18
|
+
|
|
19
|
+
@IsString()
|
|
20
|
+
country?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {TernAccountTypeEnum} from "../enums/TernAccountTypeEnum";
|
|
2
|
+
import {IsEnum, IsString} from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class TernCreateAccountRequest {
|
|
5
|
+
@IsString()
|
|
6
|
+
externalUserId?: string;
|
|
7
|
+
|
|
8
|
+
@IsString()
|
|
9
|
+
name: string;
|
|
10
|
+
|
|
11
|
+
@IsString()
|
|
12
|
+
lastName: string;
|
|
13
|
+
|
|
14
|
+
@IsEnum(TernAccountTypeEnum)
|
|
15
|
+
type: TernAccountTypeEnum;
|
|
16
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {SexDocument} from "../../identity";
|
|
2
|
+
import {IsDateString, IsEmail, IsEnum, IsString, Length, Matches, ValidateNested} from "class-validator";
|
|
3
|
+
import {regexUuidV4} from "../../helpers/constans/regex";
|
|
4
|
+
import {TypeOfDirectoryId} from "../../directory";
|
|
5
|
+
import {IsPhoneNumberFiado} from "../../card/validations/IsPhoneNumberConstraint";
|
|
6
|
+
import {AddressResponse} from "../../address";
|
|
7
|
+
|
|
8
|
+
export class TernCreateUserRequest {
|
|
9
|
+
@IsString()
|
|
10
|
+
@Matches(regexUuidV4,
|
|
11
|
+
{
|
|
12
|
+
message: 'directoryId must be a valid UUID v4',
|
|
13
|
+
})
|
|
14
|
+
directoryId: string;
|
|
15
|
+
|
|
16
|
+
@IsEnum(TypeOfDirectoryId)
|
|
17
|
+
typeOfDirectoryId: string;
|
|
18
|
+
|
|
19
|
+
@IsString()
|
|
20
|
+
firstName: string;
|
|
21
|
+
|
|
22
|
+
@IsString()
|
|
23
|
+
lastName: string;
|
|
24
|
+
|
|
25
|
+
@IsPhoneNumberFiado()
|
|
26
|
+
phoneNumber: string;
|
|
27
|
+
|
|
28
|
+
@ValidateNested()
|
|
29
|
+
address: AddressResponse;
|
|
30
|
+
|
|
31
|
+
@IsEmail()
|
|
32
|
+
email: string;
|
|
33
|
+
|
|
34
|
+
@IsDateString()
|
|
35
|
+
dob: string;
|
|
36
|
+
|
|
37
|
+
@IsString()
|
|
38
|
+
@Length(1, 30)
|
|
39
|
+
documentNumber: string;
|
|
40
|
+
|
|
41
|
+
@IsString()
|
|
42
|
+
@Length(1, 30)
|
|
43
|
+
documentType?: string;
|
|
44
|
+
|
|
45
|
+
@IsEnum(SexDocument)
|
|
46
|
+
gender?: SexDocument;
|
|
47
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {Provider} from "../../provider";
|
|
2
|
+
import {IsEnum, IsString} from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class TernCreateUserResponse {
|
|
5
|
+
@IsString()
|
|
6
|
+
externalUserId: string;
|
|
7
|
+
|
|
8
|
+
@IsString()
|
|
9
|
+
externalAccountId?: string;
|
|
10
|
+
|
|
11
|
+
@IsEnum(Provider)
|
|
12
|
+
provider: Provider;
|
|
13
|
+
|
|
14
|
+
@IsString()
|
|
15
|
+
accountNumber?: string;
|
|
16
|
+
|
|
17
|
+
@IsString()
|
|
18
|
+
routingNumber?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {TernAccountTypeEnum} from "../enums/TernAccountTypeEnum";
|
|
2
|
+
import {IsEnum, IsString} from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class TernGetAccountRequest {
|
|
5
|
+
@IsString()
|
|
6
|
+
externalAccountId: string;
|
|
7
|
+
|
|
8
|
+
@IsEnum(TernAccountTypeEnum)
|
|
9
|
+
accountType?: TernAccountTypeEnum;
|
|
10
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {TernAccountTypeEnum} from "../enums/TernAccountTypeEnum";
|
|
2
|
+
import {TernAddress} from "./TernAddress";
|
|
3
|
+
import {TernAccountStatusEnum} from "../enums/TernAccountStatusEnum";
|
|
4
|
+
import {IsBoolean, IsEnum, IsNumber, IsString, ValidateNested} from "class-validator";
|
|
5
|
+
|
|
6
|
+
export class TernGetAccountResponse {
|
|
7
|
+
@IsString()
|
|
8
|
+
id: string;
|
|
9
|
+
|
|
10
|
+
@IsString()
|
|
11
|
+
businessId: string;
|
|
12
|
+
|
|
13
|
+
@IsString()
|
|
14
|
+
userId: string;
|
|
15
|
+
|
|
16
|
+
@IsString()
|
|
17
|
+
name: string;
|
|
18
|
+
|
|
19
|
+
@IsString()
|
|
20
|
+
accountNumber: string;
|
|
21
|
+
|
|
22
|
+
@IsString()
|
|
23
|
+
routingNumber: string;
|
|
24
|
+
|
|
25
|
+
@IsEnum(TernAccountTypeEnum)
|
|
26
|
+
accountType: TernAccountTypeEnum;
|
|
27
|
+
|
|
28
|
+
@IsBoolean()
|
|
29
|
+
active: boolean;
|
|
30
|
+
|
|
31
|
+
@IsBoolean()
|
|
32
|
+
isPrimary: boolean;
|
|
33
|
+
|
|
34
|
+
@IsString()
|
|
35
|
+
createdDate: string;
|
|
36
|
+
|
|
37
|
+
@IsString()
|
|
38
|
+
updatedDate: string;
|
|
39
|
+
|
|
40
|
+
@IsString()
|
|
41
|
+
deletedDate: string;
|
|
42
|
+
|
|
43
|
+
@IsString()
|
|
44
|
+
updatedBy: string;
|
|
45
|
+
|
|
46
|
+
@IsNumber()
|
|
47
|
+
balance: number;
|
|
48
|
+
|
|
49
|
+
@ValidateNested()
|
|
50
|
+
address?: TernAddress;
|
|
51
|
+
|
|
52
|
+
@IsString()
|
|
53
|
+
kybStatus?: string;
|
|
54
|
+
|
|
55
|
+
@IsEnum(TernAccountStatusEnum)
|
|
56
|
+
statusName?: TernAccountStatusEnum;
|
|
57
|
+
}
|