@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,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceNotifyIntensityEnum = void 0;
|
|
4
|
+
var DeviceNotifyIntensityEnum;
|
|
5
|
+
(function (DeviceNotifyIntensityEnum) {
|
|
6
|
+
DeviceNotifyIntensityEnum["BANNER"] = "BANNER";
|
|
7
|
+
DeviceNotifyIntensityEnum["FULLSCREEN"] = "FULLSCREEN";
|
|
8
|
+
})(DeviceNotifyIntensityEnum || (exports.DeviceNotifyIntensityEnum = DeviceNotifyIntensityEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceReleaseReasonEnum = void 0;
|
|
4
|
+
var DeviceReleaseReasonEnum;
|
|
5
|
+
(function (DeviceReleaseReasonEnum) {
|
|
6
|
+
DeviceReleaseReasonEnum["CREDIT_PAID_OFF"] = "CREDIT_PAID_OFF";
|
|
7
|
+
DeviceReleaseReasonEnum["ACCOUNTING_WRITE_OFF"] = "ACCOUNTING_WRITE_OFF";
|
|
8
|
+
DeviceReleaseReasonEnum["OTHER"] = "OTHER";
|
|
9
|
+
})(DeviceReleaseReasonEnum || (exports.DeviceReleaseReasonEnum = DeviceReleaseReasonEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceServiceDeactivateReasonEnum = void 0;
|
|
4
|
+
var DeviceServiceDeactivateReasonEnum;
|
|
5
|
+
(function (DeviceServiceDeactivateReasonEnum) {
|
|
6
|
+
DeviceServiceDeactivateReasonEnum["TENURE_END"] = "TENURE_END";
|
|
7
|
+
DeviceServiceDeactivateReasonEnum["CASH_SALE"] = "CASH_SALE";
|
|
8
|
+
DeviceServiceDeactivateReasonEnum["OTHER"] = "OTHER";
|
|
9
|
+
})(DeviceServiceDeactivateReasonEnum || (exports.DeviceServiceDeactivateReasonEnum = DeviceServiceDeactivateReasonEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare 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,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MdmDeviceStatusEnum = void 0;
|
|
4
|
+
var MdmDeviceStatusEnum;
|
|
5
|
+
(function (MdmDeviceStatusEnum) {
|
|
6
|
+
MdmDeviceStatusEnum["NOT_ENROLLED"] = "NOT_ENROLLED";
|
|
7
|
+
MdmDeviceStatusEnum["ENROLLMENT_PENDING"] = "ENROLLMENT_PENDING";
|
|
8
|
+
MdmDeviceStatusEnum["ACTIVE"] = "ACTIVE";
|
|
9
|
+
MdmDeviceStatusEnum["NOTIFIED"] = "NOTIFIED";
|
|
10
|
+
MdmDeviceStatusEnum["APPS_RESTRICTED"] = "APPS_RESTRICTED";
|
|
11
|
+
MdmDeviceStatusEnum["LOCKED"] = "LOCKED";
|
|
12
|
+
MdmDeviceStatusEnum["RELEASED"] = "RELEASED";
|
|
13
|
+
MdmDeviceStatusEnum["UNKNOWN"] = "UNKNOWN";
|
|
14
|
+
})(MdmDeviceStatusEnum || (exports.MdmDeviceStatusEnum = MdmDeviceStatusEnum = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare 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,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MdmErrorCodeEnum = void 0;
|
|
4
|
+
var MdmErrorCodeEnum;
|
|
5
|
+
(function (MdmErrorCodeEnum) {
|
|
6
|
+
MdmErrorCodeEnum["PROVIDER_NOT_SUPPORTED"] = "PROVIDER_NOT_SUPPORTED";
|
|
7
|
+
MdmErrorCodeEnum["DEVICE_NOT_FOUND"] = "DEVICE_NOT_FOUND";
|
|
8
|
+
MdmErrorCodeEnum["DEVICE_NOT_ENROLLED"] = "DEVICE_NOT_ENROLLED";
|
|
9
|
+
MdmErrorCodeEnum["INVALID_REQUEST"] = "INVALID_REQUEST";
|
|
10
|
+
MdmErrorCodeEnum["PROVIDER_ERROR"] = "PROVIDER_ERROR";
|
|
11
|
+
MdmErrorCodeEnum["PROVIDER_TIMEOUT"] = "PROVIDER_TIMEOUT";
|
|
12
|
+
MdmErrorCodeEnum["PROVIDER_RATE_LIMITED"] = "PROVIDER_RATE_LIMITED";
|
|
13
|
+
MdmErrorCodeEnum["PROVIDER_TRANSIENT_ERROR"] = "PROVIDER_TRANSIENT_ERROR";
|
|
14
|
+
MdmErrorCodeEnum["PROVIDER_UNREACHABLE"] = "PROVIDER_UNREACHABLE";
|
|
15
|
+
MdmErrorCodeEnum["PROVIDER_CLIENT_ERROR"] = "PROVIDER_CLIENT_ERROR";
|
|
16
|
+
MdmErrorCodeEnum["AUTH_FAILED"] = "AUTH_FAILED";
|
|
17
|
+
MdmErrorCodeEnum["FORBIDDEN"] = "FORBIDDEN";
|
|
18
|
+
MdmErrorCodeEnum["RESOURCE_NOT_FOUND"] = "RESOURCE_NOT_FOUND";
|
|
19
|
+
MdmErrorCodeEnum["CONFLICT"] = "CONFLICT";
|
|
20
|
+
MdmErrorCodeEnum["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
|
|
21
|
+
})(MdmErrorCodeEnum || (exports.MdmErrorCodeEnum = MdmErrorCodeEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MdmOperationStatusEnum = void 0;
|
|
4
|
+
var MdmOperationStatusEnum;
|
|
5
|
+
(function (MdmOperationStatusEnum) {
|
|
6
|
+
MdmOperationStatusEnum["SUCCESS"] = "SUCCESS";
|
|
7
|
+
MdmOperationStatusEnum["PENDING"] = "PENDING";
|
|
8
|
+
MdmOperationStatusEnum["ERROR"] = "ERROR";
|
|
9
|
+
})(MdmOperationStatusEnum || (exports.MdmOperationStatusEnum = MdmOperationStatusEnum = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare 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
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MdmOperationTypeEnum = void 0;
|
|
4
|
+
var MdmOperationTypeEnum;
|
|
5
|
+
(function (MdmOperationTypeEnum) {
|
|
6
|
+
MdmOperationTypeEnum["STATUS"] = "STATUS";
|
|
7
|
+
MdmOperationTypeEnum["LAST_SEEN"] = "LAST_SEEN";
|
|
8
|
+
MdmOperationTypeEnum["PIN_UNLOCK"] = "PIN_UNLOCK";
|
|
9
|
+
MdmOperationTypeEnum["LOCK"] = "LOCK";
|
|
10
|
+
MdmOperationTypeEnum["UNLOCK"] = "UNLOCK";
|
|
11
|
+
MdmOperationTypeEnum["NOTIFY"] = "NOTIFY";
|
|
12
|
+
MdmOperationTypeEnum["ENROLL"] = "ENROLL";
|
|
13
|
+
MdmOperationTypeEnum["RELEASE"] = "RELEASE";
|
|
14
|
+
MdmOperationTypeEnum["ARCHIVE"] = "ARCHIVE";
|
|
15
|
+
MdmOperationTypeEnum["DEACTIVATE"] = "DEACTIVATE";
|
|
16
|
+
MdmOperationTypeEnum["RESTRICT_APPS"] = "RESTRICT_APPS";
|
|
17
|
+
MdmOperationTypeEnum["AUTO_LOCK_SCHEDULE"] = "AUTO_LOCK_SCHEDULE";
|
|
18
|
+
MdmOperationTypeEnum["LOG"] = "LOG";
|
|
19
|
+
})(MdmOperationTypeEnum || (exports.MdmOperationTypeEnum = MdmOperationTypeEnum = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MdmProviderEnum = void 0;
|
|
4
|
+
var MdmProviderEnum;
|
|
5
|
+
(function (MdmProviderEnum) {
|
|
6
|
+
MdmProviderEnum["TRUSTONIC"] = "TRUSTONIC";
|
|
7
|
+
MdmProviderEnum["DATACULTR"] = "DATACULTR";
|
|
8
|
+
})(MdmProviderEnum || (exports.MdmProviderEnum = MdmProviderEnum = {}));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export * from "./dtos/MdmError";
|
|
2
|
+
export * from "./dtos/DeviceLockScreenMessage";
|
|
3
|
+
export * from "./dtos/DeviceNotifyRequest";
|
|
4
|
+
export * from "./dtos/DeviceNotifyResponse";
|
|
5
|
+
export * from "./dtos/DeviceRestrictAppsRequest";
|
|
6
|
+
export * from "./dtos/DeviceRestrictAppsResponse";
|
|
7
|
+
export * from "./dtos/DeviceLockRequest";
|
|
8
|
+
export * from "./dtos/DeviceLockResponse";
|
|
9
|
+
export * from "./dtos/DeviceUnlockRequest";
|
|
10
|
+
export * from "./dtos/DeviceUnlockResponse";
|
|
11
|
+
export * from "./dtos/DevicePinUnlockRequest";
|
|
12
|
+
export * from "./dtos/DevicePinUnlockResponse";
|
|
13
|
+
export * from "./dtos/DeviceStatusRequest";
|
|
14
|
+
export * from "./dtos/DeviceStatusResponse";
|
|
15
|
+
export * from "./dtos/DeviceEnrollRequest";
|
|
16
|
+
export * from "./dtos/DeviceEnrollInitiateResponse";
|
|
17
|
+
export * from "./dtos/DeviceEnrollStatusRequest";
|
|
18
|
+
export * from "./dtos/DeviceEnrollStatusResponse";
|
|
19
|
+
export * from "./dtos/DeviceReleaseRequest";
|
|
20
|
+
export * from "./dtos/DeviceReleaseInitiateResponse";
|
|
21
|
+
export * from "./dtos/DeviceReleaseStatusRequest";
|
|
22
|
+
export * from "./dtos/DeviceReleaseStatusResponse";
|
|
23
|
+
export * from "./dtos/DeviceServiceDeactivateRequest";
|
|
24
|
+
export * from "./dtos/DeviceServiceDeactivateInitiateResponse";
|
|
25
|
+
export * from "./dtos/DeviceServiceDeactivateStatusRequest";
|
|
26
|
+
export * from "./dtos/DeviceServiceDeactivateStatusResponse";
|
|
27
|
+
export * from "./dtos/DeviceArchiveRequest";
|
|
28
|
+
export * from "./dtos/DeviceArchiveResponse";
|
|
29
|
+
export * from "./dtos/DeviceAutoLockScheduleRequest";
|
|
30
|
+
export * from "./dtos/DeviceAutoLockScheduleResponse";
|
|
31
|
+
export * from "./dtos/DeviceLastSeenRequest";
|
|
32
|
+
export * from "./dtos/DeviceLastSeenResponse";
|
|
33
|
+
export * from "./dtos/DeviceLogRequest";
|
|
34
|
+
export * from "./dtos/DeviceLogResponse";
|
|
35
|
+
export * from "./dtos/DeviceLogEntry";
|
|
36
|
+
export * from "./dtos/DeviceEnrollmentCompletedEvent";
|
|
37
|
+
export * from "./dtos/DeviceReleaseCompletedEvent";
|
|
38
|
+
export * from "./enums/DeviceLockModeEnum";
|
|
39
|
+
export * from "./enums/DeviceNotifyIntensityEnum";
|
|
40
|
+
export * from "./enums/DeviceEnrollmentModeEnum";
|
|
41
|
+
export * from "./enums/DeviceReleaseReasonEnum";
|
|
42
|
+
export * from "./enums/DeviceServiceDeactivateReasonEnum";
|
|
43
|
+
export * from "./enums/MdmDeviceStatusEnum";
|
|
44
|
+
export * from "./enums/MdmOperationStatusEnum";
|
|
45
|
+
export * from "./enums/MdmErrorCodeEnum";
|
|
46
|
+
export * from "./enums/MdmProviderEnum";
|
|
47
|
+
export * from "./enums/MdmOperationTypeEnum";
|
package/bin/mdm/index.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
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/MdmError"), exports);
|
|
19
|
+
__exportStar(require("./dtos/DeviceLockScreenMessage"), exports);
|
|
20
|
+
// dtos — bloque A (cobranza)
|
|
21
|
+
__exportStar(require("./dtos/DeviceNotifyRequest"), exports);
|
|
22
|
+
__exportStar(require("./dtos/DeviceNotifyResponse"), exports);
|
|
23
|
+
__exportStar(require("./dtos/DeviceRestrictAppsRequest"), exports);
|
|
24
|
+
__exportStar(require("./dtos/DeviceRestrictAppsResponse"), exports);
|
|
25
|
+
__exportStar(require("./dtos/DeviceLockRequest"), exports);
|
|
26
|
+
__exportStar(require("./dtos/DeviceLockResponse"), exports);
|
|
27
|
+
__exportStar(require("./dtos/DeviceUnlockRequest"), exports);
|
|
28
|
+
__exportStar(require("./dtos/DeviceUnlockResponse"), exports);
|
|
29
|
+
__exportStar(require("./dtos/DevicePinUnlockRequest"), exports);
|
|
30
|
+
__exportStar(require("./dtos/DevicePinUnlockResponse"), exports);
|
|
31
|
+
// dtos — bloque B (consulta)
|
|
32
|
+
__exportStar(require("./dtos/DeviceStatusRequest"), exports);
|
|
33
|
+
__exportStar(require("./dtos/DeviceStatusResponse"), exports);
|
|
34
|
+
// dtos — bloque C (ciclo de vida)
|
|
35
|
+
__exportStar(require("./dtos/DeviceEnrollRequest"), exports);
|
|
36
|
+
__exportStar(require("./dtos/DeviceEnrollInitiateResponse"), exports);
|
|
37
|
+
__exportStar(require("./dtos/DeviceEnrollStatusRequest"), exports);
|
|
38
|
+
__exportStar(require("./dtos/DeviceEnrollStatusResponse"), exports);
|
|
39
|
+
__exportStar(require("./dtos/DeviceReleaseRequest"), exports);
|
|
40
|
+
__exportStar(require("./dtos/DeviceReleaseInitiateResponse"), exports);
|
|
41
|
+
__exportStar(require("./dtos/DeviceReleaseStatusRequest"), exports);
|
|
42
|
+
__exportStar(require("./dtos/DeviceReleaseStatusResponse"), exports);
|
|
43
|
+
__exportStar(require("./dtos/DeviceServiceDeactivateRequest"), exports);
|
|
44
|
+
__exportStar(require("./dtos/DeviceServiceDeactivateInitiateResponse"), exports);
|
|
45
|
+
__exportStar(require("./dtos/DeviceServiceDeactivateStatusRequest"), exports);
|
|
46
|
+
__exportStar(require("./dtos/DeviceServiceDeactivateStatusResponse"), exports);
|
|
47
|
+
__exportStar(require("./dtos/DeviceArchiveRequest"), exports);
|
|
48
|
+
__exportStar(require("./dtos/DeviceArchiveResponse"), exports);
|
|
49
|
+
// dtos — bloque D (datacultr-specific)
|
|
50
|
+
__exportStar(require("./dtos/DeviceAutoLockScheduleRequest"), exports);
|
|
51
|
+
__exportStar(require("./dtos/DeviceAutoLockScheduleResponse"), exports);
|
|
52
|
+
__exportStar(require("./dtos/DeviceLastSeenRequest"), exports);
|
|
53
|
+
__exportStar(require("./dtos/DeviceLastSeenResponse"), exports);
|
|
54
|
+
__exportStar(require("./dtos/DeviceLogRequest"), exports);
|
|
55
|
+
__exportStar(require("./dtos/DeviceLogResponse"), exports);
|
|
56
|
+
__exportStar(require("./dtos/DeviceLogEntry"), exports);
|
|
57
|
+
// dtos — eventos entrantes (webhooks de datacultr)
|
|
58
|
+
__exportStar(require("./dtos/DeviceEnrollmentCompletedEvent"), exports);
|
|
59
|
+
__exportStar(require("./dtos/DeviceReleaseCompletedEvent"), exports);
|
|
60
|
+
// enums
|
|
61
|
+
__exportStar(require("./enums/DeviceLockModeEnum"), exports);
|
|
62
|
+
__exportStar(require("./enums/DeviceNotifyIntensityEnum"), exports);
|
|
63
|
+
__exportStar(require("./enums/DeviceEnrollmentModeEnum"), exports);
|
|
64
|
+
__exportStar(require("./enums/DeviceReleaseReasonEnum"), exports);
|
|
65
|
+
__exportStar(require("./enums/DeviceServiceDeactivateReasonEnum"), exports);
|
|
66
|
+
__exportStar(require("./enums/MdmDeviceStatusEnum"), exports);
|
|
67
|
+
__exportStar(require("./enums/MdmOperationStatusEnum"), exports);
|
|
68
|
+
__exportStar(require("./enums/MdmErrorCodeEnum"), exports);
|
|
69
|
+
__exportStar(require("./enums/MdmProviderEnum"), exports);
|
|
70
|
+
__exportStar(require("./enums/MdmOperationTypeEnum"), exports);
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { CalcTypeEnum } from "../enums/CalcTypeEnum";
|
|
|
4
4
|
export interface CreatePayableRequest {
|
|
5
5
|
directoryIdSponsor: string;
|
|
6
6
|
directoryIdClient?: string;
|
|
7
|
-
calcType
|
|
7
|
+
calcType?: CalcTypeEnum;
|
|
8
8
|
concept: ReportConceptEnum;
|
|
9
9
|
dateAccountCreate?: string;
|
|
10
10
|
amountEarned: number;
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Dominio MDM — DTOs prototipo
|
|
2
|
+
|
|
3
|
+
> ⚠️ **TEMPORAL.** Estos archivos están aquí como prototipo. **Antes de usarlos en producción** deben moverse a `fiado-type-kit/src/mdm/` para no violar el anti-pattern `DTO_LOCAL` (los DTOs son contrato entre microservicios y no deben vivir locales al lambda).
|
|
4
|
+
|
|
5
|
+
## Qué es esto
|
|
6
|
+
|
|
7
|
+
DTOs y enums para el servicio MDM (Mobile Device Management) de SureKeep. Son agnósticos al proveedor — la misma forma sirve para Trustonic, Datacultr o cualquier otro proveedor que se integre en el futuro.
|
|
8
|
+
|
|
9
|
+
## Convenciones
|
|
10
|
+
|
|
11
|
+
Sigue el estándar `@fiado/type-kit`:
|
|
12
|
+
|
|
13
|
+
- **Idioma:** inglés (CamelCase para clases, camelCase para propiedades, UPPER_SNAKE_CASE para enums).
|
|
14
|
+
- **Forma:** clases, no `type` ni `interface`.
|
|
15
|
+
- **Request DTOs:** decoradores `@Expose()` de `class-transformer` + decoradores de `class-validator` (`@IsString`, `@IsEnum`, `@IsOptional`, etc.).
|
|
16
|
+
- **Response DTOs:** sin decoradores (los genera el backend).
|
|
17
|
+
- **Enums:** valores en `UPPER_SNAKE_CASE`.
|
|
18
|
+
|
|
19
|
+
## Estructura
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
mdm/
|
|
23
|
+
├── dtos/
|
|
24
|
+
│ ├── DeviceLockRequest.ts ← Request DTO con validación
|
|
25
|
+
│ ├── DeviceLockResponse.ts ← Response DTO sin validación
|
|
26
|
+
│ ├── DeviceLockScreenMessage.ts ← DTO compartido (nested)
|
|
27
|
+
│ ├── MdmError.ts ← Error tipado compartido
|
|
28
|
+
│ └── ...
|
|
29
|
+
├── enums/
|
|
30
|
+
│ ├── DeviceLockModeEnum.ts
|
|
31
|
+
│ ├── MdmDeviceStatusEnum.ts
|
|
32
|
+
│ └── ...
|
|
33
|
+
└── index.ts ← barrel export
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Uso temporal
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { DeviceLockRequest } from "./mdm";
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Uso definitivo (cuando esté en el type-kit)
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
import { DeviceLockRequest } from "@fiado/type-kit/bin/mdm";
|
|
46
|
+
// o como namespace:
|
|
47
|
+
import { Mdm } from "@fiado/type-kit";
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Acciones soportadas
|
|
51
|
+
|
|
52
|
+
| Acción | Trustonic | Datacultr |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| DeviceNotify | HEADSUP / FULLSCREEN | Notification (con `notification_code`) |
|
|
55
|
+
| DeviceRestrictApps | ⚠️ Por confirmar configuración | Nudge (App Block) |
|
|
56
|
+
| DeviceLock (FIRM) | Lock LOCK | Bulk Lock |
|
|
57
|
+
| DeviceLock (TEMPORARY) | Lock DIMISSABLE | ❌ Error: no soporta |
|
|
58
|
+
| DeviceUnlock | Unlock | Unlock |
|
|
59
|
+
| DevicePinUnlock | PIN Unlock | get_device_passcode |
|
|
60
|
+
| DeviceStatus | Device Info | Device Status by IMEI |
|
|
61
|
+
| DeviceEnroll | Upload + Activate (síncrono) | Registra y espera webhook |
|
|
62
|
+
| DeviceRelease | Release | Release |
|
|
63
|
+
| DeviceServiceDeactivate | Deactivate Service | ❌ Error: no soporta |
|
|
64
|
+
| DeviceArchive | Archive | ❌ Error: no soporta |
|
|
65
|
+
| DeviceAutoLockSchedule | ❌ Error: no soporta postpaid | Adhoc Auto Lock |
|
|
66
|
+
| DeviceLastSeen | (incluido en Device Info) | Device Last Seen |
|
|
67
|
+
| DeviceLog | ❌ Error: no expone | Device Log |
|
|
68
|
+
|
|
69
|
+
## Eventos entrantes (solo Datacultr)
|
|
70
|
+
|
|
71
|
+
- `DeviceEnrollmentCompletedEvent` — Enrollment Webhook
|
|
72
|
+
- `DeviceReleaseCompletedEvent` — Release Webhook
|
|
73
|
+
|
|
74
|
+
Trustonic no emite webhooks (según el PDF oficial v2.0.1). Para Trustonic se debe pollear `Upload Status` y `Device Info`.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
*Mantenido en este repo solo como prototipo. Subir al `fiado-type-kit` antes de producción.*
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty } from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class DeviceArchiveRequest {
|
|
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 DeviceArchiveResponse {
|
|
5
|
+
imei: string;
|
|
6
|
+
operationReference: string;
|
|
7
|
+
status: MdmOperationStatusEnum;
|
|
8
|
+
archivedAt?: string;
|
|
9
|
+
error?: MdmError;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty, IsISO8601 } from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class DeviceAutoLockScheduleRequest {
|
|
5
|
+
@Expose()
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
imei: string;
|
|
9
|
+
|
|
10
|
+
@Expose()
|
|
11
|
+
@IsISO8601()
|
|
12
|
+
lockAt: string;
|
|
13
|
+
|
|
14
|
+
@Expose()
|
|
15
|
+
@IsString()
|
|
16
|
+
@IsNotEmpty()
|
|
17
|
+
operationReference: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
2
|
+
import { MdmError } from "./MdmError";
|
|
3
|
+
|
|
4
|
+
export class DeviceAutoLockScheduleResponse {
|
|
5
|
+
imei: string;
|
|
6
|
+
operationReference: string;
|
|
7
|
+
status: MdmOperationStatusEnum;
|
|
8
|
+
scheduledFor?: string;
|
|
9
|
+
error?: MdmError;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
2
|
+
import { MdmError } from "./MdmError";
|
|
3
|
+
|
|
4
|
+
export class DeviceEnrollInitiateResponse {
|
|
5
|
+
imei: string;
|
|
6
|
+
operationReference: string;
|
|
7
|
+
status: MdmOperationStatusEnum;
|
|
8
|
+
error?: MdmError;
|
|
9
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty, IsOptional, IsNumber, IsPositive, IsUUID } from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class DeviceEnrollRequest {
|
|
5
|
+
@Expose()
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
imei: string;
|
|
9
|
+
|
|
10
|
+
@Expose()
|
|
11
|
+
@IsString()
|
|
12
|
+
@IsOptional()
|
|
13
|
+
imei2?: string;
|
|
14
|
+
|
|
15
|
+
@Expose()
|
|
16
|
+
@IsString()
|
|
17
|
+
@IsOptional()
|
|
18
|
+
brand?: string;
|
|
19
|
+
|
|
20
|
+
@Expose()
|
|
21
|
+
@IsString()
|
|
22
|
+
@IsOptional()
|
|
23
|
+
model?: string;
|
|
24
|
+
|
|
25
|
+
@Expose()
|
|
26
|
+
@IsUUID()
|
|
27
|
+
creditId: string;
|
|
28
|
+
|
|
29
|
+
@Expose()
|
|
30
|
+
@IsNumber()
|
|
31
|
+
@IsPositive()
|
|
32
|
+
termMonths: number;
|
|
33
|
+
|
|
34
|
+
@Expose()
|
|
35
|
+
@IsString()
|
|
36
|
+
@IsNotEmpty()
|
|
37
|
+
operationReference: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsString, IsNotEmpty } from "class-validator";
|
|
3
|
+
|
|
4
|
+
export class DeviceEnrollStatusRequest {
|
|
5
|
+
@Expose()
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsNotEmpty()
|
|
8
|
+
imei: string;
|
|
9
|
+
|
|
10
|
+
@Expose()
|
|
11
|
+
@IsString()
|
|
12
|
+
@IsNotEmpty()
|
|
13
|
+
operationReference: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
2
|
+
import { DeviceEnrollmentModeEnum } from "../enums/DeviceEnrollmentModeEnum";
|
|
3
|
+
import { MdmError } from "./MdmError";
|
|
4
|
+
|
|
5
|
+
export class DeviceEnrollStatusResponse {
|
|
6
|
+
imei: string;
|
|
7
|
+
operationReference: string;
|
|
8
|
+
status: MdmOperationStatusEnum;
|
|
9
|
+
enrolledAt?: string;
|
|
10
|
+
enrollmentMode?: DeviceEnrollmentModeEnum;
|
|
11
|
+
enrollmentId?: string;
|
|
12
|
+
brand?: string;
|
|
13
|
+
model?: string;
|
|
14
|
+
error?: MdmError;
|
|
15
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Expose, Type } from "class-transformer";
|
|
2
|
+
import {
|
|
3
|
+
IsString,
|
|
4
|
+
IsNotEmpty,
|
|
5
|
+
IsEnum,
|
|
6
|
+
IsOptional,
|
|
7
|
+
IsNumber,
|
|
8
|
+
IsPositive,
|
|
9
|
+
ValidateNested,
|
|
10
|
+
IsUrl
|
|
11
|
+
} from "class-validator";
|
|
12
|
+
import { DeviceLockModeEnum } from "../enums/DeviceLockModeEnum";
|
|
13
|
+
import { DeviceLockScreenMessage } from "./DeviceLockScreenMessage";
|
|
14
|
+
|
|
15
|
+
export class DeviceLockRequest {
|
|
16
|
+
@Expose()
|
|
17
|
+
@IsString()
|
|
18
|
+
@IsNotEmpty()
|
|
19
|
+
imei: string;
|
|
20
|
+
|
|
21
|
+
@Expose()
|
|
22
|
+
@IsEnum(DeviceLockModeEnum)
|
|
23
|
+
mode: DeviceLockModeEnum;
|
|
24
|
+
|
|
25
|
+
@Expose()
|
|
26
|
+
@IsNumber()
|
|
27
|
+
@IsPositive()
|
|
28
|
+
@IsOptional()
|
|
29
|
+
durationSeconds?: number;
|
|
30
|
+
|
|
31
|
+
@Expose()
|
|
32
|
+
@IsOptional()
|
|
33
|
+
@ValidateNested()
|
|
34
|
+
@Type(() => DeviceLockScreenMessage)
|
|
35
|
+
screenMessage?: DeviceLockScreenMessage;
|
|
36
|
+
|
|
37
|
+
@Expose()
|
|
38
|
+
@IsUrl()
|
|
39
|
+
@IsOptional()
|
|
40
|
+
paymentLink?: string;
|
|
41
|
+
|
|
42
|
+
@Expose()
|
|
43
|
+
@IsString()
|
|
44
|
+
@IsNotEmpty()
|
|
45
|
+
operationReference: string;
|
|
46
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DeviceLockModeEnum } from "../enums/DeviceLockModeEnum";
|
|
2
|
+
import { MdmOperationStatusEnum } from "../enums/MdmOperationStatusEnum";
|
|
3
|
+
import { MdmError } from "./MdmError";
|
|
4
|
+
|
|
5
|
+
export class DeviceLockResponse {
|
|
6
|
+
imei: string;
|
|
7
|
+
operationReference: string;
|
|
8
|
+
status: MdmOperationStatusEnum;
|
|
9
|
+
lockedAt?: string;
|
|
10
|
+
appliedMode?: DeviceLockModeEnum;
|
|
11
|
+
error?: MdmError;
|
|
12
|
+
}
|