@zohoim/client-sdk 1.0.0-canned01 → 1.0.0-canned02
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { validateSchema } from '../../../core/utils';
|
|
2
|
-
import { CannedMessageStatus } from '../../enum';
|
|
2
|
+
import { CannedMessageStatus, CannedMessageType } from '../../enum';
|
|
3
3
|
import { CannedMessageSchema } from '../../schema';
|
|
4
4
|
import { Actor } from '../Actor';
|
|
5
5
|
export default class CannedMessage {
|
|
@@ -52,6 +52,26 @@ export default class CannedMessage {
|
|
|
52
52
|
return status === CannedMessageStatus.PENDING;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
static isUnknown(status) {
|
|
56
|
+
return status === CannedMessageStatus.UNKNOWN;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static isPartiallyApproved(status) {
|
|
60
|
+
return status === CannedMessageStatus.PARTIALLY_APPROVED;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
static isDeletionInProgress(status) {
|
|
64
|
+
return status === CannedMessageStatus.DELETION_IN_PROGRESS;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
static isDeletionFailed(status) {
|
|
68
|
+
return status === CannedMessageStatus.DELETION_FAILED;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static isTemplate(type) {
|
|
72
|
+
return type === CannedMessageType.TEMPLATE;
|
|
73
|
+
}
|
|
74
|
+
|
|
55
75
|
toJSON() {
|
|
56
76
|
return { ...this.data
|
|
57
77
|
};
|
|
@@ -2,6 +2,16 @@ const CannedMessageStatus = {
|
|
|
2
2
|
APPROVED: 'APPROVED',
|
|
3
3
|
PENDING: 'PENDING',
|
|
4
4
|
REJECTED: 'REJECTED',
|
|
5
|
-
FAILED: 'FAILED'
|
|
5
|
+
FAILED: 'FAILED',
|
|
6
|
+
DELETION_IN_PROGRESS: 'DELETION_IN_PROGRESS',
|
|
7
|
+
DELETION_FAILED: 'DELETION_FAILED',
|
|
8
|
+
PARTIALLY_APPROVED: 'PARTIALLY_APPROVED',
|
|
9
|
+
UNKNOWN: 'UNKNOWN',
|
|
10
|
+
IN_APPEAL: 'IN_APPEAL',
|
|
11
|
+
PENDING_DELETION: 'PENDING_DELETION',
|
|
12
|
+
DELETED: 'DELETED',
|
|
13
|
+
DISABLED: 'DISABLED',
|
|
14
|
+
PAUSED: 'PAUSED',
|
|
15
|
+
LIMIT_EXCEEDED: 'LIMIT_EXCEEDED'
|
|
6
16
|
};
|
|
7
17
|
export default CannedMessageStatus;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
const TemplateItemButtonType = {
|
|
2
2
|
QUICK_REPLY: 'QUICK_REPLY',
|
|
3
3
|
URL: 'URL',
|
|
4
|
-
PHONE_NUMBER: 'PHONE_NUMBER'
|
|
4
|
+
PHONE_NUMBER: 'PHONE_NUMBER',
|
|
5
|
+
OTP: 'OTP',
|
|
6
|
+
CATALOG: 'CATALOG',
|
|
7
|
+
MPM: 'MPM',
|
|
8
|
+
CALL_PERMISSION_REQUEST: 'CALL_PERMISSION_REQUEST',
|
|
9
|
+
VOICE_CALL: 'VOICE_CALL'
|
|
5
10
|
};
|
|
6
11
|
export default TemplateItemButtonType;
|