@fiado/type-kit 3.19.0 → 3.20.1
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/card/validations/CardUpdateKeyConstraint.js +2 -2
- package/bin/card/validations/IsPhoneNumberConstraint.js +2 -2
- package/bin/comission-business/dtos/CreatePayableRequest.d.ts +1 -1
- package/bin/index.d.ts +1 -0
- package/bin/index.js +9 -18
- package/bin/mdm/dtos/DeviceArchiveRequest.d.ts +4 -0
- package/bin/mdm/dtos/DeviceArchiveRequest.js +29 -0
- package/bin/mdm/dtos/DeviceArchiveResponse.d.ts +9 -0
- package/bin/mdm/dtos/DeviceArchiveResponse.js +6 -0
- package/bin/mdm/dtos/DeviceAutoLockScheduleRequest.d.ts +5 -0
- package/bin/mdm/dtos/DeviceAutoLockScheduleRequest.js +34 -0
- package/bin/mdm/dtos/DeviceAutoLockScheduleResponse.d.ts +9 -0
- package/bin/mdm/dtos/DeviceAutoLockScheduleResponse.js +6 -0
- package/bin/mdm/dtos/DeviceEnrollInitiateResponse.d.ts +8 -0
- package/bin/mdm/dtos/DeviceEnrollInitiateResponse.js +6 -0
- package/bin/mdm/dtos/DeviceEnrollRequest.d.ts +9 -0
- package/bin/mdm/dtos/DeviceEnrollRequest.js +58 -0
- package/bin/mdm/dtos/DeviceEnrollStatusRequest.d.ts +4 -0
- package/bin/mdm/dtos/DeviceEnrollStatusRequest.js +29 -0
- package/bin/mdm/dtos/DeviceEnrollStatusResponse.d.ts +14 -0
- package/bin/mdm/dtos/DeviceEnrollStatusResponse.js +6 -0
- package/bin/mdm/dtos/DeviceEnrollmentCompletedEvent.d.ts +8 -0
- package/bin/mdm/dtos/DeviceEnrollmentCompletedEvent.js +6 -0
- package/bin/mdm/dtos/DeviceLastSeenRequest.d.ts +3 -0
- package/bin/mdm/dtos/DeviceLastSeenRequest.js +23 -0
- package/bin/mdm/dtos/DeviceLastSeenResponse.d.ts +8 -0
- package/bin/mdm/dtos/DeviceLastSeenResponse.js +6 -0
- package/bin/mdm/dtos/DeviceLockRequest.d.ts +10 -0
- package/bin/mdm/dtos/DeviceLockRequest.js +56 -0
- package/bin/mdm/dtos/DeviceLockResponse.d.ts +11 -0
- package/bin/mdm/dtos/DeviceLockResponse.js +6 -0
- package/bin/mdm/dtos/DeviceLockScreenMessage.d.ts +4 -0
- package/bin/mdm/dtos/DeviceLockScreenMessage.js +29 -0
- package/bin/mdm/dtos/DeviceLogEntry.d.ts +5 -0
- package/bin/mdm/dtos/DeviceLogEntry.js +6 -0
- package/bin/mdm/dtos/DeviceLogRequest.d.ts +5 -0
- package/bin/mdm/dtos/DeviceLogRequest.js +35 -0
- package/bin/mdm/dtos/DeviceLogResponse.d.ts +9 -0
- package/bin/mdm/dtos/DeviceLogResponse.js +6 -0
- package/bin/mdm/dtos/DeviceNotifyRequest.d.ts +22 -0
- package/bin/mdm/dtos/DeviceNotifyRequest.js +53 -0
- package/bin/mdm/dtos/DeviceNotifyResponse.d.ts +9 -0
- package/bin/mdm/dtos/DeviceNotifyResponse.js +6 -0
- package/bin/mdm/dtos/DevicePinUnlockRequest.d.ts +5 -0
- package/bin/mdm/dtos/DevicePinUnlockRequest.js +35 -0
- package/bin/mdm/dtos/DevicePinUnlockResponse.d.ts +11 -0
- package/bin/mdm/dtos/DevicePinUnlockResponse.js +6 -0
- package/bin/mdm/dtos/DeviceReleaseCompletedEvent.d.ts +6 -0
- package/bin/mdm/dtos/DeviceReleaseCompletedEvent.js +6 -0
- package/bin/mdm/dtos/DeviceReleaseInitiateResponse.d.ts +9 -0
- package/bin/mdm/dtos/DeviceReleaseInitiateResponse.js +6 -0
- package/bin/mdm/dtos/DeviceReleaseRequest.d.ts +7 -0
- package/bin/mdm/dtos/DeviceReleaseRequest.js +41 -0
- package/bin/mdm/dtos/DeviceReleaseStatusRequest.d.ts +4 -0
- package/bin/mdm/dtos/DeviceReleaseStatusRequest.js +29 -0
- package/bin/mdm/dtos/DeviceReleaseStatusResponse.d.ts +9 -0
- package/bin/mdm/dtos/DeviceReleaseStatusResponse.js +6 -0
- package/bin/mdm/dtos/DeviceRestrictAppsRequest.d.ts +5 -0
- package/bin/mdm/dtos/DeviceRestrictAppsRequest.js +35 -0
- package/bin/mdm/dtos/DeviceRestrictAppsResponse.d.ts +9 -0
- package/bin/mdm/dtos/DeviceRestrictAppsResponse.js +6 -0
- package/bin/mdm/dtos/DeviceServiceDeactivateInitiateResponse.d.ts +8 -0
- package/bin/mdm/dtos/DeviceServiceDeactivateInitiateResponse.js +6 -0
- package/bin/mdm/dtos/DeviceServiceDeactivateRequest.d.ts +6 -0
- package/bin/mdm/dtos/DeviceServiceDeactivateRequest.js +35 -0
- package/bin/mdm/dtos/DeviceServiceDeactivateStatusRequest.d.ts +4 -0
- package/bin/mdm/dtos/DeviceServiceDeactivateStatusRequest.js +29 -0
- package/bin/mdm/dtos/DeviceServiceDeactivateStatusResponse.d.ts +9 -0
- package/bin/mdm/dtos/DeviceServiceDeactivateStatusResponse.js +6 -0
- package/bin/mdm/dtos/DeviceStatusRequest.d.ts +3 -0
- package/bin/mdm/dtos/DeviceStatusRequest.js +23 -0
- package/bin/mdm/dtos/DeviceStatusResponse.d.ts +15 -0
- package/bin/mdm/dtos/DeviceStatusResponse.js +6 -0
- package/bin/mdm/dtos/DeviceUnlockRequest.d.ts +4 -0
- package/bin/mdm/dtos/DeviceUnlockRequest.js +29 -0
- package/bin/mdm/dtos/DeviceUnlockResponse.d.ts +9 -0
- package/bin/mdm/dtos/DeviceUnlockResponse.js +6 -0
- package/bin/mdm/dtos/MdmError.d.ts +6 -0
- package/bin/mdm/dtos/MdmError.js +6 -0
- package/bin/mdm/enums/DeviceEnrollmentModeEnum.d.ts +4 -0
- package/bin/mdm/enums/DeviceEnrollmentModeEnum.js +8 -0
- package/bin/mdm/enums/DeviceLockModeEnum.d.ts +4 -0
- package/bin/mdm/enums/DeviceLockModeEnum.js +8 -0
- package/bin/mdm/enums/DeviceNotifyIntensityEnum.d.ts +4 -0
- package/bin/mdm/enums/DeviceNotifyIntensityEnum.js +8 -0
- package/bin/mdm/enums/DeviceReleaseReasonEnum.d.ts +5 -0
- package/bin/mdm/enums/DeviceReleaseReasonEnum.js +9 -0
- package/bin/mdm/enums/DeviceServiceDeactivateReasonEnum.d.ts +5 -0
- package/bin/mdm/enums/DeviceServiceDeactivateReasonEnum.js +9 -0
- package/bin/mdm/enums/MdmDeviceStatusEnum.d.ts +10 -0
- package/bin/mdm/enums/MdmDeviceStatusEnum.js +14 -0
- package/bin/mdm/enums/MdmErrorCodeEnum.d.ts +17 -0
- package/bin/mdm/enums/MdmErrorCodeEnum.js +21 -0
- package/bin/mdm/enums/MdmOperationStatusEnum.d.ts +5 -0
- package/bin/mdm/enums/MdmOperationStatusEnum.js +9 -0
- package/bin/mdm/enums/MdmOperationTypeEnum.d.ts +15 -0
- package/bin/mdm/enums/MdmOperationTypeEnum.js +19 -0
- package/bin/mdm/enums/MdmProviderEnum.d.ts +4 -0
- package/bin/mdm/enums/MdmProviderEnum.js +8 -0
- package/bin/mdm/index.d.ts +47 -0
- package/bin/mdm/index.js +70 -0
- package/package.json +1 -1
- package/src/comission-business/dtos/CreatePayableRequest.ts +1 -1
- package/src/index.ts +1 -0
- package/src/mdm/README.md +78 -0
- package/src/mdm/dtos/DeviceArchiveRequest.ts +14 -0
- package/src/mdm/dtos/DeviceArchiveResponse.ts +10 -0
- package/src/mdm/dtos/DeviceAutoLockScheduleRequest.ts +18 -0
- package/src/mdm/dtos/DeviceAutoLockScheduleResponse.ts +10 -0
- package/src/mdm/dtos/DeviceEnrollInitiateResponse.ts +9 -0
- package/src/mdm/dtos/DeviceEnrollRequest.ts +38 -0
- package/src/mdm/dtos/DeviceEnrollStatusRequest.ts +14 -0
- package/src/mdm/dtos/DeviceEnrollStatusResponse.ts +15 -0
- package/src/mdm/dtos/DeviceEnrollmentCompletedEvent.ts +8 -0
- package/src/mdm/dtos/DeviceLastSeenRequest.ts +9 -0
- package/src/mdm/dtos/DeviceLastSeenResponse.ts +9 -0
- package/src/mdm/dtos/DeviceLockRequest.ts +46 -0
- package/src/mdm/dtos/DeviceLockResponse.ts +12 -0
- package/src/mdm/dtos/DeviceLockScreenMessage.ts +14 -0
- package/src/mdm/dtos/DeviceLogEntry.ts +5 -0
- package/src/mdm/dtos/DeviceLogRequest.ts +19 -0
- package/src/mdm/dtos/DeviceLogResponse.ts +10 -0
- package/src/mdm/dtos/DeviceNotifyRequest.ts +47 -0
- package/src/mdm/dtos/DeviceNotifyResponse.ts +10 -0
- package/src/mdm/dtos/DevicePinUnlockRequest.ts +19 -0
- package/src/mdm/dtos/DevicePinUnlockResponse.ts +12 -0
- package/src/mdm/dtos/DeviceReleaseCompletedEvent.ts +6 -0
- package/src/mdm/dtos/DeviceReleaseInitiateResponse.ts +10 -0
- package/src/mdm/dtos/DeviceReleaseRequest.ts +24 -0
- package/src/mdm/dtos/DeviceReleaseStatusRequest.ts +14 -0
- package/src/mdm/dtos/DeviceReleaseStatusResponse.ts +10 -0
- package/src/mdm/dtos/DeviceRestrictAppsRequest.ts +19 -0
- package/src/mdm/dtos/DeviceRestrictAppsResponse.ts +10 -0
- package/src/mdm/dtos/DeviceServiceDeactivateInitiateResponse.ts +9 -0
- package/src/mdm/dtos/DeviceServiceDeactivateRequest.ts +19 -0
- package/src/mdm/dtos/DeviceServiceDeactivateStatusRequest.ts +14 -0
- package/src/mdm/dtos/DeviceServiceDeactivateStatusResponse.ts +10 -0
- package/src/mdm/dtos/DeviceStatusRequest.ts +9 -0
- package/src/mdm/dtos/DeviceStatusResponse.ts +16 -0
- package/src/mdm/dtos/DeviceUnlockRequest.ts +14 -0
- package/src/mdm/dtos/DeviceUnlockResponse.ts +10 -0
- package/src/mdm/dtos/MdmError.ts +7 -0
- package/src/mdm/enums/DeviceEnrollmentModeEnum.ts +4 -0
- package/src/mdm/enums/DeviceLockModeEnum.ts +4 -0
- package/src/mdm/enums/DeviceNotifyIntensityEnum.ts +4 -0
- package/src/mdm/enums/DeviceReleaseReasonEnum.ts +5 -0
- package/src/mdm/enums/DeviceServiceDeactivateReasonEnum.ts +5 -0
- package/src/mdm/enums/MdmDeviceStatusEnum.ts +10 -0
- package/src/mdm/enums/MdmErrorCodeEnum.ts +17 -0
- package/src/mdm/enums/MdmOperationStatusEnum.ts +5 -0
- package/src/mdm/enums/MdmOperationTypeEnum.ts +15 -0
- package/src/mdm/enums/MdmProviderEnum.ts +4 -0
- package/src/mdm/index.ts +60 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty } from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class DeviceLockScreenMessage {
|
|
5
|
+
@Expose()
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
title: string;
|
|
9
|
+
|
|
10
|
+
@Expose()
|
|
11
|
+
@IsString()
|
|
12
|
+
@IsNotEmpty()
|
|
13
|
+
content: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty, IsISO8601, IsOptional } from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class DeviceLogRequest {
|
|
5
|
+
@Expose()
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
imei: string;
|
|
9
|
+
|
|
10
|
+
@Expose()
|
|
11
|
+
@IsISO8601()
|
|
12
|
+
@IsOptional()
|
|
13
|
+
from?: string;
|
|
14
|
+
|
|
15
|
+
@Expose()
|
|
16
|
+
@IsISO8601()
|
|
17
|
+
@IsOptional()
|
|
18
|
+
to?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
2
|
+
import { DeviceLogEntry } from "./DeviceLogEntry";
|
|
3
|
+
import { MdmError } from "./MdmError";
|
|
4
|
+
|
|
5
|
+
export class DeviceLogResponse {
|
|
6
|
+
imei: string;
|
|
7
|
+
status: MdmOperationStatusEnum;
|
|
8
|
+
entries?: DeviceLogEntry[];
|
|
9
|
+
error?: MdmError;
|
|
10
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty, IsEnum } from "class-validator";
|
|
3
|
+
import { DeviceNotifyIntensityEnum } from "../enums/DeviceNotifyIntensityEnum";
|
|
4
|
+
|
|
5
|
+
export class DeviceNotifyRequest {
|
|
6
|
+
@Expose()
|
|
7
|
+
@IsString()
|
|
8
|
+
@IsNotEmpty()
|
|
9
|
+
imei: string;
|
|
10
|
+
|
|
11
|
+
@Expose()
|
|
12
|
+
@IsEnum(DeviceNotifyIntensityEnum)
|
|
13
|
+
intensity: DeviceNotifyIntensityEnum;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Código de notificación del catálogo (usado por Datacultr en su catálogo de mensajes
|
|
17
|
+
* predefinidos). Trustonic lo ignora porque exige texto crudo en `title + content`.
|
|
18
|
+
* Ver `trustonic-connector/docs/ARCHITECTURE.md` §7.6.
|
|
19
|
+
*/
|
|
20
|
+
@Expose()
|
|
21
|
+
@IsString()
|
|
22
|
+
@IsNotEmpty()
|
|
23
|
+
notificationCode: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Título de la notificación. Usado por Trustonic (`notificationTitle`). Datacultr lo
|
|
27
|
+
* ignora — el texto del título vive en su catálogo indexado por `notificationCode`.
|
|
28
|
+
*/
|
|
29
|
+
@Expose()
|
|
30
|
+
@IsString()
|
|
31
|
+
@IsNotEmpty()
|
|
32
|
+
title: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Cuerpo de la notificación. Usado por Trustonic (`notificationContent`). Datacultr lo
|
|
36
|
+
* ignora.
|
|
37
|
+
*/
|
|
38
|
+
@Expose()
|
|
39
|
+
@IsString()
|
|
40
|
+
@IsNotEmpty()
|
|
41
|
+
content: string;
|
|
42
|
+
|
|
43
|
+
@Expose()
|
|
44
|
+
@IsString()
|
|
45
|
+
@IsNotEmpty()
|
|
46
|
+
operationReference: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
2
|
+
import { MdmError } from "./MdmError";
|
|
3
|
+
|
|
4
|
+
export class DeviceNotifyResponse {
|
|
5
|
+
imei: string;
|
|
6
|
+
operationReference: string;
|
|
7
|
+
status: MdmOperationStatusEnum;
|
|
8
|
+
sentAt?: string;
|
|
9
|
+
error?: MdmError;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty, IsOptional } from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class DevicePinUnlockRequest {
|
|
5
|
+
@Expose()
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
imei: string;
|
|
9
|
+
|
|
10
|
+
@Expose()
|
|
11
|
+
@IsString()
|
|
12
|
+
@IsOptional()
|
|
13
|
+
devicePasskey?: string;
|
|
14
|
+
|
|
15
|
+
@Expose()
|
|
16
|
+
@IsString()
|
|
17
|
+
@IsNotEmpty()
|
|
18
|
+
operationReference: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
2
|
+
import { MdmError } from "./MdmError";
|
|
3
|
+
|
|
4
|
+
export class DevicePinUnlockResponse {
|
|
5
|
+
imei: string;
|
|
6
|
+
operationReference: string;
|
|
7
|
+
status: MdmOperationStatusEnum;
|
|
8
|
+
pin?: string;
|
|
9
|
+
validitySeconds?: number;
|
|
10
|
+
generatedAt?: string;
|
|
11
|
+
error?: MdmError;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
2
|
+
import { MdmError } from "./MdmError";
|
|
3
|
+
|
|
4
|
+
export class DeviceReleaseInitiateResponse {
|
|
5
|
+
imei: string;
|
|
6
|
+
operationReference: string;
|
|
7
|
+
status: MdmOperationStatusEnum;
|
|
8
|
+
releasedAt?: string;
|
|
9
|
+
error?: MdmError;
|
|
10
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty, IsEnum, IsOptional } from "class-validator";
|
|
3
|
+
import { DeviceReleaseReasonEnum } from "../enums/DeviceReleaseReasonEnum";
|
|
4
|
+
|
|
5
|
+
export class DeviceReleaseRequest {
|
|
6
|
+
@Expose()
|
|
7
|
+
@IsString()
|
|
8
|
+
@IsNotEmpty()
|
|
9
|
+
imei: string;
|
|
10
|
+
|
|
11
|
+
@Expose()
|
|
12
|
+
@IsEnum(DeviceReleaseReasonEnum)
|
|
13
|
+
reason: DeviceReleaseReasonEnum;
|
|
14
|
+
|
|
15
|
+
@Expose()
|
|
16
|
+
@IsString()
|
|
17
|
+
@IsOptional()
|
|
18
|
+
comment?: string;
|
|
19
|
+
|
|
20
|
+
@Expose()
|
|
21
|
+
@IsString()
|
|
22
|
+
@IsNotEmpty()
|
|
23
|
+
operationReference: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty } from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class DeviceReleaseStatusRequest {
|
|
5
|
+
@Expose()
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
imei: string;
|
|
9
|
+
|
|
10
|
+
@Expose()
|
|
11
|
+
@IsString()
|
|
12
|
+
@IsNotEmpty()
|
|
13
|
+
operationReference: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
2
|
+
import { MdmError } from "./MdmError";
|
|
3
|
+
|
|
4
|
+
export class DeviceReleaseStatusResponse {
|
|
5
|
+
imei: string;
|
|
6
|
+
operationReference: string;
|
|
7
|
+
status: MdmOperationStatusEnum;
|
|
8
|
+
releasedAt?: string;
|
|
9
|
+
error?: MdmError;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty } from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class DeviceRestrictAppsRequest {
|
|
5
|
+
@Expose()
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
imei: string;
|
|
9
|
+
|
|
10
|
+
@Expose()
|
|
11
|
+
@IsString()
|
|
12
|
+
@IsNotEmpty()
|
|
13
|
+
restrictionCode: string;
|
|
14
|
+
|
|
15
|
+
@Expose()
|
|
16
|
+
@IsString()
|
|
17
|
+
@IsNotEmpty()
|
|
18
|
+
operationReference: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
2
|
+
import { MdmError } from "./MdmError";
|
|
3
|
+
|
|
4
|
+
export class DeviceRestrictAppsResponse {
|
|
5
|
+
imei: string;
|
|
6
|
+
operationReference: string;
|
|
7
|
+
status: MdmOperationStatusEnum;
|
|
8
|
+
appliedAt?: string;
|
|
9
|
+
error?: MdmError;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
2
|
+
import { MdmError } from "./MdmError";
|
|
3
|
+
|
|
4
|
+
export class DeviceServiceDeactivateInitiateResponse {
|
|
5
|
+
imei: string;
|
|
6
|
+
operationReference: string;
|
|
7
|
+
status: MdmOperationStatusEnum;
|
|
8
|
+
error?: MdmError;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty, IsEnum } from "class-validator";
|
|
3
|
+
import { DeviceServiceDeactivateReasonEnum } from "../enums/DeviceServiceDeactivateReasonEnum";
|
|
4
|
+
|
|
5
|
+
export class DeviceServiceDeactivateRequest {
|
|
6
|
+
@Expose()
|
|
7
|
+
@IsString()
|
|
8
|
+
@IsNotEmpty()
|
|
9
|
+
imei: string;
|
|
10
|
+
|
|
11
|
+
@Expose()
|
|
12
|
+
@IsEnum(DeviceServiceDeactivateReasonEnum)
|
|
13
|
+
reason: DeviceServiceDeactivateReasonEnum;
|
|
14
|
+
|
|
15
|
+
@Expose()
|
|
16
|
+
@IsString()
|
|
17
|
+
@IsNotEmpty()
|
|
18
|
+
operationReference: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty } from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class DeviceServiceDeactivateStatusRequest {
|
|
5
|
+
@Expose()
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
imei: string;
|
|
9
|
+
|
|
10
|
+
@Expose()
|
|
11
|
+
@IsString()
|
|
12
|
+
@IsNotEmpty()
|
|
13
|
+
operationReference: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
2
|
+
import { MdmError } from "./MdmError";
|
|
3
|
+
|
|
4
|
+
export class DeviceServiceDeactivateStatusResponse {
|
|
5
|
+
imei: string;
|
|
6
|
+
operationReference: string;
|
|
7
|
+
status: MdmOperationStatusEnum;
|
|
8
|
+
deactivatedAt?: string;
|
|
9
|
+
error?: MdmError;
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MdmDeviceStatusEnum } from "../enums/MdmDeviceStatusEnum";
|
|
2
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
3
|
+
import { MdmError } from "./MdmError";
|
|
4
|
+
|
|
5
|
+
export class DeviceStatusResponse {
|
|
6
|
+
imei: string;
|
|
7
|
+
status: MdmOperationStatusEnum;
|
|
8
|
+
deviceStatus?: MdmDeviceStatusEnum;
|
|
9
|
+
brand?: string;
|
|
10
|
+
model?: string;
|
|
11
|
+
marketName?: string;
|
|
12
|
+
lastSeenAt?: string;
|
|
13
|
+
lastTransition?: string;
|
|
14
|
+
enrolledAt?: string;
|
|
15
|
+
error?: MdmError;
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty } from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class DeviceUnlockRequest {
|
|
5
|
+
@Expose()
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
imei: string;
|
|
9
|
+
|
|
10
|
+
@Expose()
|
|
11
|
+
@IsString()
|
|
12
|
+
@IsNotEmpty()
|
|
13
|
+
operationReference: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
2
|
+
import { MdmError } from "./MdmError";
|
|
3
|
+
|
|
4
|
+
export class DeviceUnlockResponse {
|
|
5
|
+
imei: string;
|
|
6
|
+
operationReference: string;
|
|
7
|
+
status: MdmOperationStatusEnum;
|
|
8
|
+
unlockedAt?: string;
|
|
9
|
+
error?: MdmError;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export enum MdmDeviceStatusEnum {
|
|
2
|
+
NOT_ENROLLED = "NOT_ENROLLED",
|
|
3
|
+
ENROLLMENT_PENDING = "ENROLLMENT_PENDING",
|
|
4
|
+
ACTIVE = "ACTIVE",
|
|
5
|
+
NOTIFIED = "NOTIFIED",
|
|
6
|
+
APPS_RESTRICTED = "APPS_RESTRICTED",
|
|
7
|
+
LOCKED = "LOCKED",
|
|
8
|
+
RELEASED = "RELEASED",
|
|
9
|
+
UNKNOWN = "UNKNOWN"
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export enum MdmErrorCodeEnum {
|
|
2
|
+
PROVIDER_NOT_SUPPORTED = "PROVIDER_NOT_SUPPORTED",
|
|
3
|
+
DEVICE_NOT_FOUND = "DEVICE_NOT_FOUND",
|
|
4
|
+
DEVICE_NOT_ENROLLED = "DEVICE_NOT_ENROLLED",
|
|
5
|
+
INVALID_REQUEST = "INVALID_REQUEST",
|
|
6
|
+
PROVIDER_ERROR = "PROVIDER_ERROR",
|
|
7
|
+
PROVIDER_TIMEOUT = "PROVIDER_TIMEOUT",
|
|
8
|
+
PROVIDER_RATE_LIMITED = "PROVIDER_RATE_LIMITED",
|
|
9
|
+
PROVIDER_TRANSIENT_ERROR = "PROVIDER_TRANSIENT_ERROR",
|
|
10
|
+
PROVIDER_UNREACHABLE = "PROVIDER_UNREACHABLE",
|
|
11
|
+
PROVIDER_CLIENT_ERROR = "PROVIDER_CLIENT_ERROR",
|
|
12
|
+
AUTH_FAILED = "AUTH_FAILED",
|
|
13
|
+
FORBIDDEN = "FORBIDDEN",
|
|
14
|
+
RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND",
|
|
15
|
+
CONFLICT = "CONFLICT",
|
|
16
|
+
UNKNOWN_ERROR = "UNKNOWN_ERROR"
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export enum MdmOperationTypeEnum {
|
|
2
|
+
STATUS = "STATUS",
|
|
3
|
+
LAST_SEEN = "LAST_SEEN",
|
|
4
|
+
PIN_UNLOCK = "PIN_UNLOCK",
|
|
5
|
+
LOCK = "LOCK",
|
|
6
|
+
UNLOCK = "UNLOCK",
|
|
7
|
+
NOTIFY = "NOTIFY",
|
|
8
|
+
ENROLL = "ENROLL",
|
|
9
|
+
RELEASE = "RELEASE",
|
|
10
|
+
ARCHIVE = "ARCHIVE",
|
|
11
|
+
DEACTIVATE = "DEACTIVATE",
|
|
12
|
+
RESTRICT_APPS = "RESTRICT_APPS",
|
|
13
|
+
AUTO_LOCK_SCHEDULE = "AUTO_LOCK_SCHEDULE",
|
|
14
|
+
LOG = "LOG"
|
|
15
|
+
}
|
package/src/mdm/index.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// dtos
|
|
2
|
+
export * from "./dtos/MdmError";
|
|
3
|
+
export * from "./dtos/DeviceLockScreenMessage";
|
|
4
|
+
|
|
5
|
+
// dtos — bloque A (cobranza)
|
|
6
|
+
export * from "./dtos/DeviceNotifyRequest";
|
|
7
|
+
export * from "./dtos/DeviceNotifyResponse";
|
|
8
|
+
export * from "./dtos/DeviceRestrictAppsRequest";
|
|
9
|
+
export * from "./dtos/DeviceRestrictAppsResponse";
|
|
10
|
+
export * from "./dtos/DeviceLockRequest";
|
|
11
|
+
export * from "./dtos/DeviceLockResponse";
|
|
12
|
+
export * from "./dtos/DeviceUnlockRequest";
|
|
13
|
+
export * from "./dtos/DeviceUnlockResponse";
|
|
14
|
+
export * from "./dtos/DevicePinUnlockRequest";
|
|
15
|
+
export * from "./dtos/DevicePinUnlockResponse";
|
|
16
|
+
|
|
17
|
+
// dtos — bloque B (consulta)
|
|
18
|
+
export * from "./dtos/DeviceStatusRequest";
|
|
19
|
+
export * from "./dtos/DeviceStatusResponse";
|
|
20
|
+
|
|
21
|
+
// dtos — bloque C (ciclo de vida)
|
|
22
|
+
export * from "./dtos/DeviceEnrollRequest";
|
|
23
|
+
export * from "./dtos/DeviceEnrollInitiateResponse";
|
|
24
|
+
export * from "./dtos/DeviceEnrollStatusRequest";
|
|
25
|
+
export * from "./dtos/DeviceEnrollStatusResponse";
|
|
26
|
+
export * from "./dtos/DeviceReleaseRequest";
|
|
27
|
+
export * from "./dtos/DeviceReleaseInitiateResponse";
|
|
28
|
+
export * from "./dtos/DeviceReleaseStatusRequest";
|
|
29
|
+
export * from "./dtos/DeviceReleaseStatusResponse";
|
|
30
|
+
export * from "./dtos/DeviceServiceDeactivateRequest";
|
|
31
|
+
export * from "./dtos/DeviceServiceDeactivateInitiateResponse";
|
|
32
|
+
export * from "./dtos/DeviceServiceDeactivateStatusRequest";
|
|
33
|
+
export * from "./dtos/DeviceServiceDeactivateStatusResponse";
|
|
34
|
+
export * from "./dtos/DeviceArchiveRequest";
|
|
35
|
+
export * from "./dtos/DeviceArchiveResponse";
|
|
36
|
+
|
|
37
|
+
// dtos — bloque D (datacultr-specific)
|
|
38
|
+
export * from "./dtos/DeviceAutoLockScheduleRequest";
|
|
39
|
+
export * from "./dtos/DeviceAutoLockScheduleResponse";
|
|
40
|
+
export * from "./dtos/DeviceLastSeenRequest";
|
|
41
|
+
export * from "./dtos/DeviceLastSeenResponse";
|
|
42
|
+
export * from "./dtos/DeviceLogRequest";
|
|
43
|
+
export * from "./dtos/DeviceLogResponse";
|
|
44
|
+
export * from "./dtos/DeviceLogEntry";
|
|
45
|
+
|
|
46
|
+
// dtos — eventos entrantes (webhooks de datacultr)
|
|
47
|
+
export * from "./dtos/DeviceEnrollmentCompletedEvent";
|
|
48
|
+
export * from "./dtos/DeviceReleaseCompletedEvent";
|
|
49
|
+
|
|
50
|
+
// enums
|
|
51
|
+
export * from "./enums/DeviceLockModeEnum";
|
|
52
|
+
export * from "./enums/DeviceNotifyIntensityEnum";
|
|
53
|
+
export * from "./enums/DeviceEnrollmentModeEnum";
|
|
54
|
+
export * from "./enums/DeviceReleaseReasonEnum";
|
|
55
|
+
export * from "./enums/DeviceServiceDeactivateReasonEnum";
|
|
56
|
+
export * from "./enums/MdmDeviceStatusEnum";
|
|
57
|
+
export * from "./enums/MdmOperationStatusEnum";
|
|
58
|
+
export * from "./enums/MdmErrorCodeEnum";
|
|
59
|
+
export * from "./enums/MdmProviderEnum";
|
|
60
|
+
export * from "./enums/MdmOperationTypeEnum";
|