@fiado/type-kit 1.0.4 → 1.0.6

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.
Files changed (88) hide show
  1. package/bin/account/dtos/AccountResponse.d.ts +21 -0
  2. package/bin/account/dtos/AccountResponse.js +85 -0
  3. package/bin/account/dtos/CreateAccountRequest.d.ts +14 -0
  4. package/bin/account/dtos/CreateAccountRequest.js +65 -0
  5. package/bin/account/dtos/CreatePockeRequest.d.ts +4 -0
  6. package/bin/account/dtos/CreatePockeRequest.js +31 -0
  7. package/bin/account/dtos/PocketResponse.d.ts +0 -0
  8. package/bin/account/dtos/PocketResponse.js +0 -0
  9. package/bin/account/enums/AccountStatus.d.ts +5 -0
  10. package/bin/account/enums/AccountStatus.js +9 -0
  11. package/bin/account/index.d.ts +4 -0
  12. package/bin/account/index.js +22 -0
  13. package/bin/address/dtos/AddressBase.d.ts +34 -0
  14. package/bin/address/dtos/AddressBase.js +163 -0
  15. package/bin/address/dtos/AddressResponse.d.ts +7 -0
  16. package/bin/address/dtos/AddressResponse.js +47 -0
  17. package/bin/address/dtos/CreateAddressRequest.d.ts +3 -0
  18. package/bin/address/dtos/CreateAddressRequest.js +7 -0
  19. package/bin/address/dtos/Geometry.d.ts +3 -0
  20. package/bin/address/dtos/Geometry.js +2 -0
  21. package/bin/address/dtos/Place.d.ts +21 -0
  22. package/bin/address/dtos/Place.js +112 -0
  23. package/bin/address/dtos/Shipping.d.ts +11 -0
  24. package/bin/address/dtos/Shipping.js +57 -0
  25. package/bin/address/dtos/Timezone.d.ts +4 -0
  26. package/bin/address/dtos/Timezone.js +2 -0
  27. package/bin/address/enums/AddressProvider.d.ts +9 -0
  28. package/bin/address/enums/AddressProvider.js +13 -0
  29. package/bin/address/enums/AddressStatus.d.ts +9 -0
  30. package/bin/address/enums/AddressStatus.js +13 -0
  31. package/bin/address/index.d.ts +8 -1
  32. package/bin/address/index.js +10 -1
  33. package/bin/card/dtos/CardActivateRequest.d.ts +4 -0
  34. package/bin/card/dtos/CardActivateRequest.js +26 -0
  35. package/bin/card/dtos/CardApplicationRequest.d.ts +6 -0
  36. package/bin/card/dtos/CardApplicationRequest.js +34 -0
  37. package/bin/card/dtos/CardUpdateRequest.d.ts +5 -0
  38. package/bin/card/dtos/CardUpdateRequest.js +28 -0
  39. package/bin/card/dtos/CreateCardRequest.d.ts +34 -0
  40. package/bin/card/dtos/CreateCardRequest.js +176 -0
  41. package/bin/card/index.d.ts +11 -0
  42. package/bin/card/index.js +8 -4
  43. package/bin/card/validations/CardUpdateKeyConstraint.js +1 -2
  44. package/bin/card/validations/IsPhoneNumberConstraint.d.ts +6 -0
  45. package/bin/card/validations/IsPhoneNumberConstraint.js +36 -0
  46. package/bin/country/enums/Country.d.ts +4 -0
  47. package/bin/country/enums/Country.js +8 -0
  48. package/bin/country/enums/CountryId.js +1 -0
  49. package/bin/country/index.d.ts +1 -0
  50. package/bin/country/index.js +3 -0
  51. package/bin/directory/enums/TypeOfDirectoryId.d.ts +5 -0
  52. package/bin/directory/enums/TypeOfDirectoryId.js +9 -0
  53. package/bin/directory/index.d.ts +1 -0
  54. package/bin/directory/index.js +19 -0
  55. package/bin/helpers/constans/regex.d.ts +1 -0
  56. package/bin/helpers/constans/regex.js +3 -1
  57. package/bin/index.d.ts +5 -15
  58. package/bin/index.js +17 -17
  59. package/package.json +1 -1
  60. package/src/account/dtos/AccountResponse.ts +60 -0
  61. package/src/account/dtos/CreateAccountRequest.ts +45 -0
  62. package/src/account/dtos/CreatePockeRequest.ts +19 -0
  63. package/src/account/enums/AccountStatus.ts +7 -0
  64. package/src/account/index.ts +11 -0
  65. package/src/address/dtos/AddressBase.ts +131 -0
  66. package/src/address/dtos/AddressResponse.ts +41 -0
  67. package/src/address/dtos/CreateAddressRequest.ts +7 -0
  68. package/src/address/dtos/Geometry.ts +5 -0
  69. package/src/address/dtos/Place.ts +84 -0
  70. package/src/address/dtos/{AddressShippingDto.ts → Shipping.ts} +1 -1
  71. package/src/address/dtos/Timezone.ts +6 -0
  72. package/src/address/enums/AddressProvider.ts +10 -0
  73. package/src/address/enums/AddressStatus.ts +10 -0
  74. package/src/address/index.ts +12 -1
  75. package/src/card/dtos/{CardActivateRequestDto.ts → CardActivateRequest.ts} +1 -1
  76. package/src/card/dtos/{CardApplicationRequestDto.ts → CardApplicationRequest.ts} +4 -4
  77. package/src/card/dtos/{CardUpdateRequestDto.ts → CardUpdateRequest.ts} +1 -1
  78. package/src/card/dtos/{CreateCardRequestDto.ts → CreateCardRequest.ts} +4 -4
  79. package/src/card/index.ts +15 -0
  80. package/src/card/validations/CardUpdateKeyConstraint.ts +3 -5
  81. package/src/card/validations/IsPhoneNumberConstraint.ts +26 -0
  82. package/src/country/enums/Country.ts +6 -0
  83. package/src/country/enums/CountryId.ts +3 -0
  84. package/src/country/index.ts +6 -1
  85. package/src/directory/enums/TypeOfDirectoryId.ts +7 -0
  86. package/src/directory/index.ts +7 -0
  87. package/src/helpers/constans/regex.ts +2 -0
  88. package/src/index.ts +5 -18
@@ -0,0 +1,21 @@
1
+ import { Provider } from '../../provider/enums/Provider';
2
+ import { Country } from '../../country/enums/Country';
3
+ import { AccountStatus } from '../enums/AccountStatus';
4
+ import { TypeOfDirectoryId } from '../../directory/enums/TypeOfDirectoryId';
5
+ export declare class AccountResponse {
6
+ id: string;
7
+ typeOfAccountId: string;
8
+ externalAccountId: string;
9
+ externalSubAccountId: string | null;
10
+ provider: Provider;
11
+ directoryId: string;
12
+ typeOfDirectoryId: TypeOfDirectoryId;
13
+ currentBalance: number;
14
+ balanceLock: number;
15
+ countryId: Country;
16
+ createDate: string;
17
+ lastUpdateDate: string;
18
+ accountNumber: string;
19
+ routingNumber: string;
20
+ status: AccountStatus;
21
+ }
@@ -0,0 +1,85 @@
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.AccountResponse = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const Provider_1 = require("../../provider/enums/Provider");
15
+ const Country_1 = require("../../country/enums/Country");
16
+ const AccountStatus_1 = require("../enums/AccountStatus");
17
+ const TypeOfDirectoryId_1 = require("../../directory/enums/TypeOfDirectoryId");
18
+ class AccountResponse {
19
+ }
20
+ exports.AccountResponse = AccountResponse;
21
+ __decorate([
22
+ (0, class_validator_1.IsString)(),
23
+ __metadata("design:type", String)
24
+ ], AccountResponse.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsOptional)(),
27
+ (0, class_validator_1.IsString)(),
28
+ __metadata("design:type", String)
29
+ ], AccountResponse.prototype, "typeOfAccountId", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsOptional)(),
32
+ (0, class_validator_1.IsString)(),
33
+ __metadata("design:type", String)
34
+ ], AccountResponse.prototype, "externalAccountId", void 0);
35
+ __decorate([
36
+ (0, class_validator_1.IsOptional)(),
37
+ (0, class_validator_1.IsString)(),
38
+ __metadata("design:type", String)
39
+ ], AccountResponse.prototype, "externalSubAccountId", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.IsEnum)(Provider_1.Provider),
42
+ __metadata("design:type", String)
43
+ ], AccountResponse.prototype, "provider", void 0);
44
+ __decorate([
45
+ (0, class_validator_1.IsString)(),
46
+ __metadata("design:type", String)
47
+ ], AccountResponse.prototype, "directoryId", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsEnum)(TypeOfDirectoryId_1.TypeOfDirectoryId),
50
+ __metadata("design:type", String)
51
+ ], AccountResponse.prototype, "typeOfDirectoryId", void 0);
52
+ __decorate([
53
+ (0, class_validator_1.IsNumber)(),
54
+ __metadata("design:type", Number)
55
+ ], AccountResponse.prototype, "currentBalance", void 0);
56
+ __decorate([
57
+ (0, class_validator_1.IsNumber)(),
58
+ __metadata("design:type", Number)
59
+ ], AccountResponse.prototype, "balanceLock", void 0);
60
+ __decorate([
61
+ (0, class_validator_1.IsEnum)(Country_1.Country),
62
+ __metadata("design:type", String)
63
+ ], AccountResponse.prototype, "countryId", void 0);
64
+ __decorate([
65
+ (0, class_validator_1.IsDateString)(),
66
+ __metadata("design:type", String)
67
+ ], AccountResponse.prototype, "createDate", void 0);
68
+ __decorate([
69
+ (0, class_validator_1.IsDateString)(),
70
+ __metadata("design:type", String)
71
+ ], AccountResponse.prototype, "lastUpdateDate", void 0);
72
+ __decorate([
73
+ (0, class_validator_1.IsOptional)(),
74
+ (0, class_validator_1.IsString)(),
75
+ __metadata("design:type", String)
76
+ ], AccountResponse.prototype, "accountNumber", void 0);
77
+ __decorate([
78
+ (0, class_validator_1.IsOptional)(),
79
+ (0, class_validator_1.IsString)(),
80
+ __metadata("design:type", String)
81
+ ], AccountResponse.prototype, "routingNumber", void 0);
82
+ __decorate([
83
+ (0, class_validator_1.IsEnum)(AccountStatus_1.AccountStatus),
84
+ __metadata("design:type", String)
85
+ ], AccountResponse.prototype, "status", void 0);
@@ -0,0 +1,14 @@
1
+ import { AddressResponse } from "../../address/dtos/AddressResponse";
2
+ import { Country } from "../../country/enums/Country";
3
+ export declare class CreateAccountRequest {
4
+ directoryId: string;
5
+ typeOfDirectoryId: string;
6
+ firstName: string;
7
+ lastName: string;
8
+ phoneNumber: string;
9
+ address: AddressResponse;
10
+ email: string;
11
+ dob: string;
12
+ documentNumber: string;
13
+ countryId: Country;
14
+ }
@@ -0,0 +1,65 @@
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.CreateAccountRequest = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const AddressResponse_1 = require("../../address/dtos/AddressResponse");
15
+ const Country_1 = require("../../country/enums/Country");
16
+ const regex_1 = require("../../helpers/constans/regex");
17
+ const TypeOfDirectoryId_1 = require("../../directory/enums/TypeOfDirectoryId");
18
+ const IsPhoneNumberConstraint_1 = require("../../card/validations/IsPhoneNumberConstraint");
19
+ class CreateAccountRequest {
20
+ }
21
+ exports.CreateAccountRequest = CreateAccountRequest;
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.Matches)(regex_1.regexUuidV4, {
25
+ message: 'directoryId must be a valid UUID v4',
26
+ }),
27
+ __metadata("design:type", String)
28
+ ], CreateAccountRequest.prototype, "directoryId", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsEnum)(TypeOfDirectoryId_1.TypeOfDirectoryId),
31
+ __metadata("design:type", String)
32
+ ], CreateAccountRequest.prototype, "typeOfDirectoryId", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsString)(),
35
+ __metadata("design:type", String)
36
+ ], CreateAccountRequest.prototype, "firstName", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsString)(),
39
+ __metadata("design:type", String)
40
+ ], CreateAccountRequest.prototype, "lastName", void 0);
41
+ __decorate([
42
+ (0, IsPhoneNumberConstraint_1.IsPhoneNumberFiado)(),
43
+ __metadata("design:type", String)
44
+ ], CreateAccountRequest.prototype, "phoneNumber", void 0);
45
+ __decorate([
46
+ (0, class_validator_1.ValidateNested)(),
47
+ __metadata("design:type", AddressResponse_1.AddressResponse)
48
+ ], CreateAccountRequest.prototype, "address", void 0);
49
+ __decorate([
50
+ (0, class_validator_1.IsEmail)(),
51
+ __metadata("design:type", String)
52
+ ], CreateAccountRequest.prototype, "email", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsDateString)(),
55
+ __metadata("design:type", String)
56
+ ], CreateAccountRequest.prototype, "dob", void 0);
57
+ __decorate([
58
+ (0, class_validator_1.IsString)(),
59
+ (0, class_validator_1.Length)(1, 30),
60
+ __metadata("design:type", String)
61
+ ], CreateAccountRequest.prototype, "documentNumber", void 0);
62
+ __decorate([
63
+ (0, class_validator_1.IsEnum)(Country_1.Country),
64
+ __metadata("design:type", String)
65
+ ], CreateAccountRequest.prototype, "countryId", void 0);
@@ -0,0 +1,4 @@
1
+ export declare class CreatePocketRequest {
2
+ beneficiaryDirectoryId?: string;
3
+ accountId: string;
4
+ }
@@ -0,0 +1,31 @@
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.CreatePocketRequest = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const regex_1 = require("../../helpers/constans/regex");
15
+ class CreatePocketRequest {
16
+ }
17
+ exports.CreatePocketRequest = CreatePocketRequest;
18
+ __decorate([
19
+ (0, class_validator_1.IsString)(),
20
+ (0, class_validator_1.Matches)(regex_1.regexUuidV4, {
21
+ message: 'beneficiaryDirectoryId must be a valid UUID v4',
22
+ }),
23
+ __metadata("design:type", String)
24
+ ], CreatePocketRequest.prototype, "beneficiaryDirectoryId", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ (0, class_validator_1.Matches)(regex_1.regexUuidV4, {
28
+ message: 'accountId must be a valid UUID v4',
29
+ }),
30
+ __metadata("design:type", String)
31
+ ], CreatePocketRequest.prototype, "accountId", void 0);
File without changes
File without changes
@@ -0,0 +1,5 @@
1
+ export declare enum AccountStatus {
2
+ ACTIVE = "ACTIVE",
3
+ INACTIVE = "INACTIVE",
4
+ BLOCKED = "BLOCKED"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountStatus = void 0;
4
+ var AccountStatus;
5
+ (function (AccountStatus) {
6
+ AccountStatus["ACTIVE"] = "ACTIVE";
7
+ AccountStatus["INACTIVE"] = "INACTIVE";
8
+ AccountStatus["BLOCKED"] = "BLOCKED";
9
+ })(AccountStatus || (exports.AccountStatus = AccountStatus = {}));
@@ -0,0 +1,4 @@
1
+ export * from './dtos/AccountResponse';
2
+ export * from './dtos/CreateAccountRequest';
3
+ export * from './dtos/CreatePockeRequest';
4
+ export * from './enums/AccountStatus';
@@ -0,0 +1,22 @@
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/AccountResponse"), exports);
19
+ __exportStar(require("./dtos/CreateAccountRequest"), exports);
20
+ __exportStar(require("./dtos/CreatePockeRequest"), exports);
21
+ //enums
22
+ __exportStar(require("./enums/AccountStatus"), exports);
@@ -0,0 +1,34 @@
1
+ import { TypeOfDirectoryId } from "../../directory/enums/TypeOfDirectoryId";
2
+ import { AddressProvider } from "../enums/AddressProvider";
3
+ import { AddressStatus } from "../enums/AddressStatus";
4
+ import { Place } from "./Place";
5
+ import { CountryId } from '../../country/enums/CountryId';
6
+ export declare class AddressBase {
7
+ id?: string;
8
+ distance?: number;
9
+ createdBy: TypeOfDirectoryId;
10
+ directoryId: string;
11
+ isPrincipal: boolean;
12
+ tag?: string;
13
+ tenantId: string;
14
+ typeOfAddressId: string;
15
+ typeOfDirectoryId: TypeOfDirectoryId;
16
+ provider: AddressProvider;
17
+ place: Place;
18
+ validFrom: string;
19
+ validUntil?: string;
20
+ addressStatus: AddressStatus;
21
+ additionalInformation?: string;
22
+ helpNeeded: boolean;
23
+ internalNumber?: string;
24
+ countryId: CountryId;
25
+ street?: string;
26
+ addressNumber?: string;
27
+ municipality?: string;
28
+ subMunicipality?: string;
29
+ neighborhood?: string;
30
+ subRegion?: string;
31
+ region?: string;
32
+ postalCode?: string;
33
+ country: string;
34
+ }
@@ -0,0 +1,163 @@
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.AddressBase = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const TypeOfDirectoryId_1 = require("../../directory/enums/TypeOfDirectoryId");
15
+ const AddressProvider_1 = require("../enums/AddressProvider");
16
+ const AddressStatus_1 = require("../enums/AddressStatus");
17
+ const Place_1 = require("./Place");
18
+ const CountryId_1 = require("../../country/enums/CountryId");
19
+ const regex_1 = require("../../helpers/constans/regex");
20
+ class AddressBase {
21
+ }
22
+ exports.AddressBase = AddressBase;
23
+ __decorate([
24
+ (0, class_validator_1.IsOptional)(),
25
+ (0, class_validator_1.IsString)(),
26
+ (0, class_validator_1.Matches)(regex_1.regexUuidV4, {
27
+ message: 'id must be a valid UUID v4',
28
+ }),
29
+ __metadata("design:type", String)
30
+ ], AddressBase.prototype, "id", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsNumber)(),
33
+ (0, class_validator_1.IsOptional)(),
34
+ __metadata("design:type", Number)
35
+ ], AddressBase.prototype, "distance", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsEnum)(TypeOfDirectoryId_1.TypeOfDirectoryId),
38
+ __metadata("design:type", String)
39
+ ], AddressBase.prototype, "createdBy", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.IsString)(),
42
+ (0, class_validator_1.Matches)(regex_1.regexUuidV4, {
43
+ message: 'directoryId must be a valid UUID v4',
44
+ }),
45
+ __metadata("design:type", String)
46
+ ], AddressBase.prototype, "directoryId", void 0);
47
+ __decorate([
48
+ (0, class_validator_1.IsBoolean)(),
49
+ __metadata("design:type", Boolean)
50
+ ], AddressBase.prototype, "isPrincipal", void 0);
51
+ __decorate([
52
+ (0, class_validator_1.IsOptional)(),
53
+ (0, class_validator_1.IsString)(),
54
+ (0, class_validator_1.Length)(1, 100),
55
+ __metadata("design:type", String)
56
+ ], AddressBase.prototype, "tag", void 0);
57
+ __decorate([
58
+ (0, class_validator_1.IsString)(),
59
+ (0, class_validator_1.Length)(1, 100),
60
+ __metadata("design:type", String)
61
+ ], AddressBase.prototype, "tenantId", void 0);
62
+ __decorate([
63
+ (0, class_validator_1.IsString)(),
64
+ __metadata("design:type", String)
65
+ ], AddressBase.prototype, "typeOfAddressId", void 0);
66
+ __decorate([
67
+ (0, class_validator_1.IsEnum)(TypeOfDirectoryId_1.TypeOfDirectoryId),
68
+ __metadata("design:type", String)
69
+ ], AddressBase.prototype, "typeOfDirectoryId", void 0);
70
+ __decorate([
71
+ (0, class_validator_1.IsEnum)(AddressProvider_1.AddressProvider),
72
+ __metadata("design:type", String)
73
+ ], AddressBase.prototype, "provider", void 0);
74
+ __decorate([
75
+ (0, class_validator_1.ValidateNested)(),
76
+ __metadata("design:type", Place_1.Place)
77
+ ], AddressBase.prototype, "place", void 0);
78
+ __decorate([
79
+ (0, class_validator_1.IsString)(),
80
+ (0, class_validator_1.Matches)(regex_1.regexIso8601, {
81
+ message: 'validFrom must be a valid ISO 8601 date string',
82
+ }),
83
+ __metadata("design:type", String)
84
+ ], AddressBase.prototype, "validFrom", void 0);
85
+ __decorate([
86
+ (0, class_validator_1.IsOptional)(),
87
+ (0, class_validator_1.IsString)(),
88
+ (0, class_validator_1.Matches)(regex_1.regexIso8601, {
89
+ message: 'validUntil must be a valid ISO 8601 date string',
90
+ }),
91
+ __metadata("design:type", String)
92
+ ], AddressBase.prototype, "validUntil", void 0);
93
+ __decorate([
94
+ (0, class_validator_1.IsEnum)(AddressStatus_1.AddressStatus),
95
+ __metadata("design:type", String)
96
+ ], AddressBase.prototype, "addressStatus", void 0);
97
+ __decorate([
98
+ (0, class_validator_1.IsOptional)(),
99
+ (0, class_validator_1.IsString)(),
100
+ (0, class_validator_1.Length)(1, 200),
101
+ __metadata("design:type", String)
102
+ ], AddressBase.prototype, "additionalInformation", void 0);
103
+ __decorate([
104
+ (0, class_validator_1.IsBoolean)(),
105
+ __metadata("design:type", Boolean)
106
+ ], AddressBase.prototype, "helpNeeded", void 0);
107
+ __decorate([
108
+ (0, class_validator_1.IsOptional)(),
109
+ (0, class_validator_1.IsString)(),
110
+ (0, class_validator_1.Length)(1, 10),
111
+ __metadata("design:type", String)
112
+ ], AddressBase.prototype, "internalNumber", void 0);
113
+ __decorate([
114
+ (0, class_validator_1.IsEnum)(CountryId_1.CountryId),
115
+ __metadata("design:type", String)
116
+ ], AddressBase.prototype, "countryId", void 0);
117
+ __decorate([
118
+ (0, class_validator_1.IsString)(),
119
+ (0, class_validator_1.Length)(1, 100),
120
+ __metadata("design:type", String)
121
+ ], AddressBase.prototype, "street", void 0);
122
+ __decorate([
123
+ (0, class_validator_1.IsString)(),
124
+ (0, class_validator_1.Length)(1, 10),
125
+ __metadata("design:type", String)
126
+ ], AddressBase.prototype, "addressNumber", void 0);
127
+ __decorate([
128
+ (0, class_validator_1.IsOptional)(),
129
+ (0, class_validator_1.IsString)(),
130
+ (0, class_validator_1.Length)(2, 60),
131
+ __metadata("design:type", String)
132
+ ], AddressBase.prototype, "municipality", void 0);
133
+ __decorate([
134
+ (0, class_validator_1.IsOptional)(),
135
+ (0, class_validator_1.IsString)(),
136
+ __metadata("design:type", String)
137
+ ], AddressBase.prototype, "subMunicipality", void 0);
138
+ __decorate([
139
+ (0, class_validator_1.IsOptional)(),
140
+ (0, class_validator_1.IsString)(),
141
+ (0, class_validator_1.Length)(2, 60),
142
+ __metadata("design:type", String)
143
+ ], AddressBase.prototype, "neighborhood", void 0);
144
+ __decorate([
145
+ (0, class_validator_1.IsOptional)(),
146
+ (0, class_validator_1.IsString)(),
147
+ (0, class_validator_1.Length)(2, 60),
148
+ __metadata("design:type", String)
149
+ ], AddressBase.prototype, "subRegion", void 0);
150
+ __decorate([
151
+ (0, class_validator_1.IsString)(),
152
+ (0, class_validator_1.Length)(5, 10),
153
+ __metadata("design:type", String)
154
+ ], AddressBase.prototype, "region", void 0);
155
+ __decorate([
156
+ (0, class_validator_1.IsString)(),
157
+ (0, class_validator_1.Length)(5, 10),
158
+ __metadata("design:type", String)
159
+ ], AddressBase.prototype, "postalCode", void 0);
160
+ __decorate([
161
+ (0, class_validator_1.IsEnum)(CountryId_1.CountryId),
162
+ __metadata("design:type", String)
163
+ ], AddressBase.prototype, "country", void 0);
@@ -0,0 +1,7 @@
1
+ import { AddressBase } from './AddressBase';
2
+ export declare class AddressResponse extends AddressBase {
3
+ id: string;
4
+ createDate: string;
5
+ updateDate?: string;
6
+ updatedBy?: string;
7
+ }
@@ -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.AddressResponse = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const regex_1 = require("../../helpers/constans/regex");
15
+ const AddressBase_1 = require("./AddressBase");
16
+ class AddressResponse extends AddressBase_1.AddressBase {
17
+ }
18
+ exports.AddressResponse = AddressResponse;
19
+ __decorate([
20
+ (0, class_validator_1.IsString)(),
21
+ (0, class_validator_1.Matches)(regex_1.regexUuidV4, {
22
+ message: 'id must be a valid UUID v4',
23
+ }),
24
+ __metadata("design:type", String)
25
+ ], AddressResponse.prototype, "id", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsOptional)(),
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.Matches)(regex_1.regexIso8601, {
30
+ message: 'createDate must be a valid ISO 8601 date string',
31
+ }),
32
+ __metadata("design:type", String)
33
+ ], AddressResponse.prototype, "createDate", void 0);
34
+ __decorate([
35
+ (0, class_validator_1.IsOptional)(),
36
+ (0, class_validator_1.IsString)(),
37
+ (0, class_validator_1.Matches)(regex_1.regexIso8601, {
38
+ message: 'updateDate must be a valid ISO 8601 date string',
39
+ }),
40
+ __metadata("design:type", String)
41
+ ], AddressResponse.prototype, "updateDate", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsOptional)(),
44
+ (0, class_validator_1.IsString)(),
45
+ (0, class_validator_1.Length)(1, 100),
46
+ __metadata("design:type", String)
47
+ ], AddressResponse.prototype, "updatedBy", void 0);
@@ -0,0 +1,3 @@
1
+ import { AddressBase } from "./AddressBase";
2
+ export declare class CreateAddressRequest extends AddressBase {
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateAddressRequest = void 0;
4
+ const AddressBase_1 = require("./AddressBase");
5
+ class CreateAddressRequest extends AddressBase_1.AddressBase {
6
+ }
7
+ exports.CreateAddressRequest = CreateAddressRequest;
@@ -0,0 +1,3 @@
1
+ export type Geometry = {
2
+ point: [number, number];
3
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ import { Geometry } from "./Geometry";
2
+ import { Timezone } from "./Timezone";
3
+ export declare class Place {
4
+ geometry: Geometry;
5
+ addressNumber?: string;
6
+ categories?: string[];
7
+ country?: string;
8
+ interpolated: boolean;
9
+ label?: string;
10
+ municipality?: string;
11
+ neighborhood?: string;
12
+ postalCode?: string;
13
+ region?: string;
14
+ street?: string;
15
+ subMunicipality?: string;
16
+ subRegion?: string;
17
+ supplementalCategories?: string[];
18
+ timezone?: Timezone;
19
+ unitNumber?: string;
20
+ unitType?: string;
21
+ }