@fiado/type-kit 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class ContactInfoCreateRequest {
|
|
2
|
+
contact: string;
|
|
3
|
+
createDate: string;
|
|
4
|
+
directoryId: string;
|
|
5
|
+
isApp: boolean;
|
|
6
|
+
isDeleted: boolean;
|
|
7
|
+
isPrincipal: boolean;
|
|
8
|
+
isSMS: boolean;
|
|
9
|
+
isVoice: boolean;
|
|
10
|
+
isWhatsApp: boolean;
|
|
11
|
+
note: string;
|
|
12
|
+
tenantId: string;
|
|
13
|
+
typeOfContactId: string;
|
|
14
|
+
typeOfDirectoryId: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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.ContactInfoCreateRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const regex_1 = require("../../helpers/constans/regex");
|
|
15
|
+
const TypeOfContactIdEnum_1 = require("../enums/TypeOfContactIdEnum");
|
|
16
|
+
const directory_1 = require("../../directory");
|
|
17
|
+
class ContactInfoCreateRequest {
|
|
18
|
+
}
|
|
19
|
+
exports.ContactInfoCreateRequest = ContactInfoCreateRequest;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], ContactInfoCreateRequest.prototype, "contact", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.Matches)(regex_1.regexIso8601, {
|
|
26
|
+
message: 'createDate must be a valid ISO 8601 date string',
|
|
27
|
+
}),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], ContactInfoCreateRequest.prototype, "createDate", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.Matches)(regex_1.regexUuidV4, {
|
|
32
|
+
message: 'directoryId must be a valid UUID v4',
|
|
33
|
+
}),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], ContactInfoCreateRequest.prototype, "directoryId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsBoolean)(),
|
|
38
|
+
__metadata("design:type", Boolean)
|
|
39
|
+
], ContactInfoCreateRequest.prototype, "isApp", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsBoolean)(),
|
|
42
|
+
__metadata("design:type", Boolean)
|
|
43
|
+
], ContactInfoCreateRequest.prototype, "isDeleted", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsBoolean)(),
|
|
46
|
+
__metadata("design:type", Boolean)
|
|
47
|
+
], ContactInfoCreateRequest.prototype, "isPrincipal", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsBoolean)(),
|
|
50
|
+
__metadata("design:type", Boolean)
|
|
51
|
+
], ContactInfoCreateRequest.prototype, "isSMS", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsBoolean)(),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], ContactInfoCreateRequest.prototype, "isVoice", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsBoolean)(),
|
|
58
|
+
__metadata("design:type", Boolean)
|
|
59
|
+
], ContactInfoCreateRequest.prototype, "isWhatsApp", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsString)(),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], ContactInfoCreateRequest.prototype, "note", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_validator_1.IsString)(),
|
|
66
|
+
(0, class_validator_1.Length)(1, 100),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], ContactInfoCreateRequest.prototype, "tenantId", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsEnum)(TypeOfContactIdEnum_1.TypeOfContactIdEnum),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], ContactInfoCreateRequest.prototype, "typeOfContactId", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsEnum)(directory_1.TypeOfDirectoryId),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], ContactInfoCreateRequest.prototype, "typeOfDirectoryId", void 0);
|
package/package.json
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import { IsBoolean, IsString,Length, Matches, IsEnum } from 'class-validator';
|
|
4
|
+
import { regexIso8601, regexUuidV4 } from '../../helpers/constans/regex';
|
|
5
|
+
import { TypeOfContactIdEnum } from '../enums/TypeOfContactIdEnum';
|
|
6
|
+
import { TypeOfDirectoryId } from '../../directory';
|
|
7
|
+
|
|
8
|
+
export class ContactInfoCreateRequest {
|
|
9
|
+
@IsString()
|
|
10
|
+
contact: string;
|
|
11
|
+
|
|
12
|
+
@Matches(regexIso8601,
|
|
13
|
+
{
|
|
14
|
+
message: 'createDate must be a valid ISO 8601 date string',
|
|
15
|
+
})
|
|
16
|
+
createDate: string;
|
|
17
|
+
|
|
18
|
+
@Matches(regexUuidV4,
|
|
19
|
+
{
|
|
20
|
+
message: 'directoryId must be a valid UUID v4',
|
|
21
|
+
})
|
|
22
|
+
directoryId: string;
|
|
23
|
+
|
|
24
|
+
@IsBoolean()
|
|
25
|
+
isApp: boolean;
|
|
26
|
+
|
|
27
|
+
@IsBoolean()
|
|
28
|
+
isDeleted: boolean;
|
|
29
|
+
|
|
30
|
+
@IsBoolean()
|
|
31
|
+
isPrincipal: boolean;
|
|
32
|
+
|
|
33
|
+
@IsBoolean()
|
|
34
|
+
isSMS: boolean;
|
|
35
|
+
|
|
36
|
+
@IsBoolean()
|
|
37
|
+
isVoice: boolean;
|
|
38
|
+
|
|
39
|
+
@IsBoolean()
|
|
40
|
+
isWhatsApp: boolean;
|
|
41
|
+
|
|
42
|
+
@IsString()
|
|
43
|
+
note: string;
|
|
44
|
+
|
|
45
|
+
@IsString()
|
|
46
|
+
@Length(1, 100)
|
|
47
|
+
tenantId: string;
|
|
48
|
+
|
|
49
|
+
@IsEnum(TypeOfContactIdEnum)
|
|
50
|
+
typeOfContactId: string;
|
|
51
|
+
|
|
52
|
+
@IsEnum(TypeOfDirectoryId)
|
|
53
|
+
typeOfDirectoryId: string;
|
|
54
|
+
}
|