@peacom/core 0.0.1 → 0.0.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.
- package/package.json +5 -2
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -1
- package/src/lib/api/api.constant.d.ts +37 -0
- package/src/lib/api/api.constant.js +3 -0
- package/src/lib/api/api.constant.js.map +1 -0
- package/src/lib/api/core.api.d.ts +2 -0
- package/src/lib/api/core.api.js +24 -0
- package/src/lib/api/core.api.js.map +1 -0
- package/src/lib/api/index.d.ts +4 -0
- package/src/lib/api/index.js +8 -0
- package/src/lib/api/index.js.map +1 -0
- package/src/lib/api/micro-service.api.d.ts +2 -0
- package/src/lib/api/micro-service.api.js +24 -0
- package/src/lib/api/micro-service.api.js.map +1 -0
- package/src/lib/api/queue.api.d.ts +7 -0
- package/src/lib/api/queue.api.js +9 -0
- package/src/lib/api/queue.api.js.map +1 -0
- package/src/lib/error/FormError.d.ts +53 -0
- package/src/lib/error/FormError.js +58 -0
- package/src/lib/error/FormError.js.map +1 -0
- package/src/lib/error/HttpError.d.ts +4 -0
- package/src/lib/error/HttpError.js +12 -0
- package/src/lib/error/HttpError.js.map +1 -0
- package/src/lib/model/Message.d.ts +69 -1
- package/src/lib/model/Message.js +19 -1
- package/src/lib/model/Message.js.map +1 -1
- package/src/lib/model/queue/QueueMessage.d.ts +10 -0
- package/src/lib/model/queue/QueueMessage.js +3 -0
- package/src/lib/model/queue/QueueMessage.js.map +1 -0
- package/src/lib/model/queue/queue.constant.d.ts +5 -0
- package/src/lib/model/queue/queue.constant.js +10 -0
- package/src/lib/model/queue/queue.constant.js.map +1 -0
- package/src/lib/util/date/constant.d.ts +3 -0
- package/src/lib/util/date/constant.js +7 -0
- package/src/lib/util/date/constant.js.map +1 -0
- package/src/lib/util/date/date.util.d.ts +15 -0
- package/src/lib/util/date/date.util.js +41 -0
- package/src/lib/util/date/date.util.js.map +1 -0
- package/src/lib/util/index.d.ts +2 -0
- package/src/lib/util/index.js +6 -0
- package/src/lib/util/index.js.map +1 -0
- package/src/lib/util/message/message.util.d.ts +76 -0
- package/src/lib/util/message/message.util.js +52 -0
- package/src/lib/util/message/message.util.js.map +1 -0
- package/src/lib/util/string.util.d.ts +13 -0
- package/src/lib/util/string.util.js +108 -0
- package/src/lib/util/string.util.js.map +1 -0
package/package.json
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "@peacom/core",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.3",
|
4
4
|
"type": "commonjs",
|
5
|
+
"dependencies": {
|
6
|
+
"moment": "^2.29.4",
|
7
|
+
"moment-timezone": "^0.5.40"
|
8
|
+
},
|
5
9
|
"main": "./src/index.js",
|
6
10
|
"types": "./src/index.d.ts",
|
7
|
-
"dependencies": {},
|
8
11
|
"peerDependencies": {
|
9
12
|
"tslib": "2.4.1"
|
10
13
|
}
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
@@ -3,4 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
tslib_1.__exportStar(require("./lib/core"), exports);
|
5
5
|
tslib_1.__exportStar(require("./lib/model"), exports);
|
6
|
+
tslib_1.__exportStar(require("./lib/util"), exports);
|
7
|
+
tslib_1.__exportStar(require("./lib/api"), exports);
|
6
8
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/core/src/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,sDAA4B"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/core/src/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,sDAA4B;AAC5B,qDAA0B;AAC1B,oDAAyB"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { Application, PARTNER, SEND_MESSAGE_VIA } from '../model/';
|
2
|
+
import { RawMessage } from "../model/";
|
3
|
+
interface ApplicationInfo {
|
4
|
+
application: Application;
|
5
|
+
id: string;
|
6
|
+
}
|
7
|
+
interface Contact {
|
8
|
+
id: string;
|
9
|
+
name?: string;
|
10
|
+
phone?: string;
|
11
|
+
isSubscribed: boolean;
|
12
|
+
extraData: Record<string, unknown>;
|
13
|
+
avatarUrl?: string;
|
14
|
+
language: string;
|
15
|
+
country: string;
|
16
|
+
}
|
17
|
+
export interface ApiCoreHandleParams {
|
18
|
+
to: ApplicationInfo;
|
19
|
+
rawMessage: RawMessage;
|
20
|
+
replyToApplicationMessageId?: string;
|
21
|
+
sentTime: number;
|
22
|
+
extraData?: Record<string, unknown>;
|
23
|
+
applicationMessageId: string;
|
24
|
+
from: Contact;
|
25
|
+
}
|
26
|
+
export interface ApiChannelMessageParams {
|
27
|
+
applicationId: Application;
|
28
|
+
application: Record<string, unknown>;
|
29
|
+
partnerId: PARTNER;
|
30
|
+
rawMessage: RawMessage;
|
31
|
+
messageId: string;
|
32
|
+
receiverId: string;
|
33
|
+
sendVia: SEND_MESSAGE_VIA;
|
34
|
+
queueOption?: Record<string, unknown>;
|
35
|
+
}
|
36
|
+
export declare type LOG_FUNCTION = ((t: unknown) => void) | null;
|
37
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"api.constant.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/api/api.constant.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.handleCoreMessage = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const FormError_1 = require("../error/FormError");
|
6
|
+
const handleCoreMessage = (CORE_URL, params, log = null) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
7
|
+
if (log) {
|
8
|
+
log(`CORE REQUEST: ${CORE_URL} - ${JSON.stringify(params)}`);
|
9
|
+
}
|
10
|
+
const rs = yield fetch(CORE_URL, {
|
11
|
+
method: "POST",
|
12
|
+
body: JSON.stringify(params)
|
13
|
+
});
|
14
|
+
const bodyStr = yield rs.text();
|
15
|
+
if (log) {
|
16
|
+
log(`CORE RESPONSE: ${CORE_URL} - ${bodyStr}`);
|
17
|
+
}
|
18
|
+
if (!rs.ok) {
|
19
|
+
throw new FormError_1.FormError(JSON.parse(bodyStr));
|
20
|
+
}
|
21
|
+
return JSON.parse(bodyStr);
|
22
|
+
});
|
23
|
+
exports.handleCoreMessage = handleCoreMessage;
|
24
|
+
//# sourceMappingURL=core.api.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"core.api.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/api/core.api.ts"],"names":[],"mappings":";;;;AACA,kDAA6C;AAItC,MAAM,iBAAiB,GAAG,CAAO,QAAgB,EAAE,MAA2B,EAAE,MAAoB,IAAI,EAAE,EAAE;IACjH,IAAI,GAAG,EAAE;QACP,GAAG,CAAC,iBAAiB,QAAQ,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;KAC7D;IAED,MAAM,EAAE,GAAG,MAAM,KAAK,CAAC,QAAQ,EAAE;QAC/B,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;KAC7B,CAAC,CAAA;IACF,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;IAChC,IAAI,GAAG,EAAE;QACP,GAAG,CAAC,kBAAkB,QAAQ,MAAM,OAAO,EAAE,CAAC,CAAA;KAC/C;IAED,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACV,MAAM,IAAI,qBAAS,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;KACzC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;AAC5B,CAAC,CAAA,CAAA;AAlBY,QAAA,iBAAiB,qBAkB7B"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
tslib_1.__exportStar(require("./api.constant"), exports);
|
5
|
+
tslib_1.__exportStar(require("./queue.api"), exports);
|
6
|
+
tslib_1.__exportStar(require("./core.api"), exports);
|
7
|
+
tslib_1.__exportStar(require("./micro-service.api"), exports);
|
8
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/api/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8B;AAC9B,sDAA2B;AAC3B,qDAA0B;AAC1B,8DAAmC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.sendChannelMessage = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const FormError_1 = require("../error/FormError");
|
6
|
+
const sendChannelMessage = (MICROSERVICE_URL, params, log = null) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
7
|
+
if (log) {
|
8
|
+
log(`SERVICE REQUEST: ${MICROSERVICE_URL} - ${JSON.stringify(params)}`);
|
9
|
+
}
|
10
|
+
const rs = yield fetch(MICROSERVICE_URL, {
|
11
|
+
method: "POST",
|
12
|
+
body: JSON.stringify(params)
|
13
|
+
});
|
14
|
+
const bodyStr = yield rs.text();
|
15
|
+
if (log) {
|
16
|
+
log(`SERVICE RESPONSE: ${MICROSERVICE_URL} - ${bodyStr}`);
|
17
|
+
}
|
18
|
+
if (!rs.ok) {
|
19
|
+
throw new FormError_1.FormError(JSON.parse(bodyStr));
|
20
|
+
}
|
21
|
+
return JSON.parse(bodyStr);
|
22
|
+
});
|
23
|
+
exports.sendChannelMessage = sendChannelMessage;
|
24
|
+
//# sourceMappingURL=micro-service.api.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"micro-service.api.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/api/micro-service.api.ts"],"names":[],"mappings":";;;;AACA,kDAA6C;AAEtC,MAAM,kBAAkB,GAAG,CAAO,gBAAwB,EAAE,MAA+B,EAAE,MAAoB,IAAI,EAAE,EAAE;IAC9H,IAAI,GAAG,EAAE;QACP,GAAG,CAAC,oBAAoB,gBAAgB,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;KACxE;IAED,MAAM,EAAE,GAAG,MAAM,KAAK,CAAC,gBAAgB,EAAE;QACvC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;KAC7B,CAAC,CAAA;IACF,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;IAChC,IAAI,GAAG,EAAE;QACP,GAAG,CAAC,qBAAqB,gBAAgB,MAAM,OAAO,EAAE,CAAC,CAAA;KAC1D;IAED,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACV,MAAM,IAAI,qBAAS,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;KACzC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;AAC5B,CAAC,CAAA,CAAA;AAlBY,QAAA,kBAAkB,sBAkB9B"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { QueueMessageStatus } from "../model/queue/QueueMessage";
|
2
|
+
declare type addQueue = (name: string, data: unknown, opts?: unknown) => Promise<unknown>;
|
3
|
+
declare type Queue = {
|
4
|
+
add: addQueue;
|
5
|
+
};
|
6
|
+
export declare const queueAddMessageStatus: (queue: Queue, params: QueueMessageStatus, jobOpts: Record<string, unknown>) => Promise<unknown>;
|
7
|
+
export {};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.queueAddMessageStatus = void 0;
|
4
|
+
const queueAddMessageStatus = (queue, params, jobOpts) => {
|
5
|
+
const jobId = `${params.applicationId}_${params.applicationMessageId}_${params.status}_${params.date}`;
|
6
|
+
return queue.add(jobId, params, Object.assign(Object.assign({}, jobOpts), { jobId }));
|
7
|
+
};
|
8
|
+
exports.queueAddMessageStatus = queueAddMessageStatus;
|
9
|
+
//# sourceMappingURL=queue.api.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queue.api.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/api/queue.api.ts"],"names":[],"mappings":";;;AAYO,MAAM,qBAAqB,GAAG,CAAC,KAAY,EAAE,MAA0B,EAAE,OAAgC,EAAE,EAAE;IAClH,MAAM,KAAK,GAAG,GAAG,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,oBAAoB,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE,CAAA;IACtG,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,kCACzB,OAAO,KAAE,KAAK,IACjB,CAAA;AACJ,CAAC,CAAA;AALY,QAAA,qBAAqB,yBAKjC"}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { HttpError } from "./HttpError";
|
2
|
+
export declare enum HTTP_ERROR {
|
3
|
+
ACCESS_DENIED = 403,
|
4
|
+
NOT_FOUND = 404,
|
5
|
+
TIME_OUT = 402,
|
6
|
+
BAD_REQUEST = 400,
|
7
|
+
NOT_AUTHENTICATE = 401,
|
8
|
+
INTERNAL_SERVER_ERROR = 500
|
9
|
+
}
|
10
|
+
interface FieldError {
|
11
|
+
name: string;
|
12
|
+
code: string;
|
13
|
+
message: string;
|
14
|
+
}
|
15
|
+
export declare const FIELD_ERROR: {
|
16
|
+
INVALID: string;
|
17
|
+
EMAIL_NOT_ACTIVE: string;
|
18
|
+
USER_NOT_ACTIVE: string;
|
19
|
+
WRONG_PASSWORD: string;
|
20
|
+
USER_NOT_FOUND: string;
|
21
|
+
EMAIL_INVALID: string;
|
22
|
+
EMAIL_NOT_ALLOW_REGISTER: string;
|
23
|
+
INVALID_TOKEN: string;
|
24
|
+
EMAIL_NOT_FOUND: string;
|
25
|
+
EMAIL_EXISTED: string;
|
26
|
+
TOKEN_EXPIRED: string;
|
27
|
+
PASSWORD_NOT_MATCH: string;
|
28
|
+
SIGNED_URL_FAILED: string;
|
29
|
+
UPLOAD_FAILED: string;
|
30
|
+
USER_NAME_IS_EXITED: string;
|
31
|
+
CURRENT_PASSWORD_NOT_MATCH: string;
|
32
|
+
CURRENT_EMAIL_NOT_MATCH: string;
|
33
|
+
CONFIRM_EMAIL_NOT_MATCH: string;
|
34
|
+
NEW_EMAIL_SAME_OLD_EMAIL: string;
|
35
|
+
USERNAME_IS_A_REQUIRED_FIELD: string;
|
36
|
+
USER_NOT_ACTIVE_KYC: string;
|
37
|
+
EXISTED: string;
|
38
|
+
COMPANY_IS_NOT_ACTIVE: string;
|
39
|
+
BAD_REQUEST: string;
|
40
|
+
NOT_AUTHENTICATE: string;
|
41
|
+
FORBIDDEN_ERROR: string;
|
42
|
+
RESOURCE_NOT_FOUND: string;
|
43
|
+
INTERNAL_SERVER_ERROR: string;
|
44
|
+
SERVICE_UNAVAILABLE: string;
|
45
|
+
LOGIN_REQUIRED_OTP: string;
|
46
|
+
API_KEY_NOT_FOUND: string;
|
47
|
+
};
|
48
|
+
export declare class FormError extends HttpError {
|
49
|
+
errors: Array<FieldError>;
|
50
|
+
constructor(_errors: FieldError | Array<FieldError>);
|
51
|
+
}
|
52
|
+
export declare function badRequest(name: string, code: string, message: string): FormError;
|
53
|
+
export {};
|
@@ -0,0 +1,58 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.badRequest = exports.FormError = exports.FIELD_ERROR = exports.HTTP_ERROR = void 0;
|
4
|
+
const HttpError_1 = require("./HttpError");
|
5
|
+
var HTTP_ERROR;
|
6
|
+
(function (HTTP_ERROR) {
|
7
|
+
HTTP_ERROR[HTTP_ERROR["ACCESS_DENIED"] = 403] = "ACCESS_DENIED";
|
8
|
+
HTTP_ERROR[HTTP_ERROR["NOT_FOUND"] = 404] = "NOT_FOUND";
|
9
|
+
HTTP_ERROR[HTTP_ERROR["TIME_OUT"] = 402] = "TIME_OUT";
|
10
|
+
HTTP_ERROR[HTTP_ERROR["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
11
|
+
HTTP_ERROR[HTTP_ERROR["NOT_AUTHENTICATE"] = 401] = "NOT_AUTHENTICATE";
|
12
|
+
HTTP_ERROR[HTTP_ERROR["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
13
|
+
})(HTTP_ERROR = exports.HTTP_ERROR || (exports.HTTP_ERROR = {}));
|
14
|
+
exports.FIELD_ERROR = {
|
15
|
+
INVALID: 'INVALID',
|
16
|
+
EMAIL_NOT_ACTIVE: 'EMAIL_NOT_ACTIVE',
|
17
|
+
USER_NOT_ACTIVE: 'USER_NOT_ACTIVE',
|
18
|
+
WRONG_PASSWORD: 'WRONG_PASSWORD',
|
19
|
+
USER_NOT_FOUND: 'USER_NOT_FOUND',
|
20
|
+
EMAIL_INVALID: 'EMAIL_INVALID',
|
21
|
+
EMAIL_NOT_ALLOW_REGISTER: 'EMAIL_NOT_ALLOW_REGISTER',
|
22
|
+
INVALID_TOKEN: 'INVALID_TOKEN',
|
23
|
+
EMAIL_NOT_FOUND: 'EMAIL_NOT_FOUND',
|
24
|
+
EMAIL_EXISTED: 'EMAIL_EXISTED',
|
25
|
+
TOKEN_EXPIRED: 'TOKEN_EXPIRED',
|
26
|
+
PASSWORD_NOT_MATCH: 'PASSWORD_NOT_MATCH',
|
27
|
+
SIGNED_URL_FAILED: 'SIGNED_URL_FAILED',
|
28
|
+
UPLOAD_FAILED: 'UPLOAD_FAILED',
|
29
|
+
USER_NAME_IS_EXITED: 'USER_NAME_IS_EXITED',
|
30
|
+
CURRENT_PASSWORD_NOT_MATCH: 'CURRENT_PASSWORD_NOT_MATCH',
|
31
|
+
CURRENT_EMAIL_NOT_MATCH: 'CURRENT_EMAIL_NOT_MATCH',
|
32
|
+
CONFIRM_EMAIL_NOT_MATCH: 'CONFIRM_EMAIL_NOT_MATCH',
|
33
|
+
NEW_EMAIL_SAME_OLD_EMAIL: 'NEW_EMAIL_SAME_OLD_EMAIL',
|
34
|
+
USERNAME_IS_A_REQUIRED_FIELD: 'USERNAME_IS_A_REQUIRED_FIELD',
|
35
|
+
USER_NOT_ACTIVE_KYC: 'USER_NOT_ACTIVE_KYC',
|
36
|
+
EXISTED: 'EXISTED',
|
37
|
+
COMPANY_IS_NOT_ACTIVE: 'COMPANY_IS_NOT_ACTIVE',
|
38
|
+
BAD_REQUEST: 'BAD_REQUEST',
|
39
|
+
NOT_AUTHENTICATE: 'NOT_AUTHENTICATE',
|
40
|
+
FORBIDDEN_ERROR: 'FORBIDDEN_ERROR',
|
41
|
+
RESOURCE_NOT_FOUND: 'RESOURCE_NOT_FOUND',
|
42
|
+
INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR',
|
43
|
+
SERVICE_UNAVAILABLE: 'SERVICE_UNAVAILABLE',
|
44
|
+
LOGIN_REQUIRED_OTP: 'LOGIN_REQUIRED_OTP',
|
45
|
+
API_KEY_NOT_FOUND: 'API_KEY_NOT_FOUND'
|
46
|
+
};
|
47
|
+
class FormError extends HttpError_1.HttpError {
|
48
|
+
constructor(_errors) {
|
49
|
+
super(HTTP_ERROR.BAD_REQUEST, 'Bad request');
|
50
|
+
this.errors = Array.isArray(_errors) ? [..._errors] : [_errors];
|
51
|
+
}
|
52
|
+
}
|
53
|
+
exports.FormError = FormError;
|
54
|
+
function badRequest(name, code, message) {
|
55
|
+
return new FormError({ name, code, message });
|
56
|
+
}
|
57
|
+
exports.badRequest = badRequest;
|
58
|
+
//# sourceMappingURL=FormError.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FormError.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/error/FormError.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAEtC,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,+DAAmB,CAAA;IACnB,uDAAe,CAAA;IACf,qDAAc,CAAA;IACd,2DAAiB,CAAA;IACjB,qEAAsB,CAAA;IACtB,+EAA2B,CAAA;AAC7B,CAAC,EAPW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAOrB;AAQY,QAAA,WAAW,GAAG;IACzB,OAAO,EAAE,SAAS;IAClB,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,wBAAwB,EAAE,0BAA0B;IACpD,aAAa,EAAE,eAAe;IAC9B,eAAe,EAAE,iBAAiB;IAClC,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,kBAAkB,EAAE,oBAAoB;IACxC,iBAAiB,EAAE,mBAAmB;IACtC,aAAa,EAAE,eAAe;IAC9B,mBAAmB,EAAE,qBAAqB;IAC1C,0BAA0B,EAAE,4BAA4B;IACxD,uBAAuB,EAAE,yBAAyB;IAClD,uBAAuB,EAAE,yBAAyB;IAClD,wBAAwB,EAAE,0BAA0B;IACpD,4BAA4B,EAAE,8BAA8B;IAC5D,mBAAmB,EAAE,qBAAqB;IAC1C,OAAO,EAAE,SAAS;IAClB,qBAAqB,EAAE,uBAAuB;IAC9C,WAAW,EAAE,aAAa;IAC1B,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,kBAAkB,EAAE,oBAAoB;IACxC,qBAAqB,EAAE,uBAAuB;IAC9C,mBAAmB,EAAE,qBAAqB;IAC1C,kBAAkB,EAAE,oBAAoB;IACxC,iBAAiB,EAAE,mBAAmB;CACvC,CAAC;AAGF,MAAa,SAAU,SAAQ,qBAAS;IAGtC,YAAY,OAAuC;QACjD,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;QAC7C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;CACF;AAPD,8BAOC;AAED,SAAgB,UAAU,CAAC,IAAY,EAAE,IAAY,EAAE,OAAe;IACpE,OAAO,IAAI,SAAS,CAAC,EAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC,CAAC,CAAC;AAC9C,CAAC;AAFD,gCAEC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.HttpError = void 0;
|
4
|
+
class HttpError extends Error {
|
5
|
+
constructor(code, message) {
|
6
|
+
super(message);
|
7
|
+
Error.captureStackTrace(this, this.constructor);
|
8
|
+
this.code = code;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
exports.HttpError = HttpError;
|
12
|
+
//# sourceMappingURL=HttpError.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/error/HttpError.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAU,SAAQ,KAAK;IAGlC,YAAY,IAAY,EAAE,OAAe;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAChD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AARD,8BAQC"}
|
@@ -13,5 +13,73 @@ export declare enum MESSAGE_TYPE {
|
|
13
13
|
FILE = "file",
|
14
14
|
RICH_LINK = "richLink",
|
15
15
|
LIST_PICKER = "listPicker",
|
16
|
-
QUICK_REPLY = "quickReply"
|
16
|
+
QUICK_REPLY = "quickReply",
|
17
|
+
LOCATION = "location"
|
17
18
|
}
|
19
|
+
export declare enum SEND_MESSAGE_VIA {
|
20
|
+
QUEUE = 1,
|
21
|
+
DIRECTLY = 2
|
22
|
+
}
|
23
|
+
export declare enum MESSAGE_REACTION {
|
24
|
+
REPLY = 1,
|
25
|
+
LIKE = 2,
|
26
|
+
SUGGESTION_CLICK = 3
|
27
|
+
}
|
28
|
+
export declare enum SuggestionActionType {
|
29
|
+
OPEN_URL = "open-url",
|
30
|
+
REPLY = "reply",
|
31
|
+
DIAL = "dial"
|
32
|
+
}
|
33
|
+
export interface FileInfo {
|
34
|
+
type: string;
|
35
|
+
name: string;
|
36
|
+
size: number;
|
37
|
+
url: string;
|
38
|
+
uuid: string;
|
39
|
+
preview?: string;
|
40
|
+
}
|
41
|
+
export interface RawMessageSuggestion {
|
42
|
+
action: SuggestionActionType;
|
43
|
+
text: string;
|
44
|
+
postbackData: string;
|
45
|
+
}
|
46
|
+
export interface RichCard {
|
47
|
+
title?: string;
|
48
|
+
titleRow?: number;
|
49
|
+
description?: string;
|
50
|
+
descriptionRow?: number;
|
51
|
+
image?: string;
|
52
|
+
imageRow?: number;
|
53
|
+
suggestions: RawMessageSuggestion[];
|
54
|
+
}
|
55
|
+
export interface PickListItem {
|
56
|
+
title: string;
|
57
|
+
value: string;
|
58
|
+
subtitle?: string;
|
59
|
+
image?: string;
|
60
|
+
}
|
61
|
+
declare type ReceivedMessage = PickListItem;
|
62
|
+
declare type ReplyMessage = PickListItem;
|
63
|
+
export interface RawMessage {
|
64
|
+
type: MESSAGE_TYPE;
|
65
|
+
message?: string;
|
66
|
+
file?: FileInfo;
|
67
|
+
fileUrl?: string;
|
68
|
+
fileName?: string;
|
69
|
+
fileSize?: string | number;
|
70
|
+
trackingData?: "";
|
71
|
+
richCards?: RichCard[];
|
72
|
+
viberRichCardRow?: number;
|
73
|
+
viberRichCardCol?: number;
|
74
|
+
fileResolution?: string;
|
75
|
+
thumbnailUrl?: string;
|
76
|
+
thumbnailFile?: FileInfo;
|
77
|
+
suggestions?: Array<RawMessageSuggestion>;
|
78
|
+
allowMultiple?: boolean;
|
79
|
+
attachments?: Array<FileInfo>;
|
80
|
+
listPicker?: Array<PickListItem>;
|
81
|
+
receivedMessage?: ReceivedMessage;
|
82
|
+
replyMessage?: ReplyMessage;
|
83
|
+
richLinkUrl?: string;
|
84
|
+
}
|
85
|
+
export {};
|
package/src/lib/model/Message.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.MESSAGE_TYPE = exports.MESSAGE_STATUS = void 0;
|
3
|
+
exports.SuggestionActionType = exports.MESSAGE_REACTION = exports.SEND_MESSAGE_VIA = exports.MESSAGE_TYPE = exports.MESSAGE_STATUS = void 0;
|
4
4
|
var MESSAGE_STATUS;
|
5
5
|
(function (MESSAGE_STATUS) {
|
6
6
|
MESSAGE_STATUS[MESSAGE_STATUS["PENDING"] = 1] = "PENDING";
|
@@ -19,5 +19,23 @@ var MESSAGE_TYPE;
|
|
19
19
|
MESSAGE_TYPE["RICH_LINK"] = "richLink";
|
20
20
|
MESSAGE_TYPE["LIST_PICKER"] = "listPicker";
|
21
21
|
MESSAGE_TYPE["QUICK_REPLY"] = "quickReply";
|
22
|
+
MESSAGE_TYPE["LOCATION"] = "location";
|
22
23
|
})(MESSAGE_TYPE = exports.MESSAGE_TYPE || (exports.MESSAGE_TYPE = {}));
|
24
|
+
var SEND_MESSAGE_VIA;
|
25
|
+
(function (SEND_MESSAGE_VIA) {
|
26
|
+
SEND_MESSAGE_VIA[SEND_MESSAGE_VIA["QUEUE"] = 1] = "QUEUE";
|
27
|
+
SEND_MESSAGE_VIA[SEND_MESSAGE_VIA["DIRECTLY"] = 2] = "DIRECTLY";
|
28
|
+
})(SEND_MESSAGE_VIA = exports.SEND_MESSAGE_VIA || (exports.SEND_MESSAGE_VIA = {}));
|
29
|
+
var MESSAGE_REACTION;
|
30
|
+
(function (MESSAGE_REACTION) {
|
31
|
+
MESSAGE_REACTION[MESSAGE_REACTION["REPLY"] = 1] = "REPLY";
|
32
|
+
MESSAGE_REACTION[MESSAGE_REACTION["LIKE"] = 2] = "LIKE";
|
33
|
+
MESSAGE_REACTION[MESSAGE_REACTION["SUGGESTION_CLICK"] = 3] = "SUGGESTION_CLICK";
|
34
|
+
})(MESSAGE_REACTION = exports.MESSAGE_REACTION || (exports.MESSAGE_REACTION = {}));
|
35
|
+
var SuggestionActionType;
|
36
|
+
(function (SuggestionActionType) {
|
37
|
+
SuggestionActionType["OPEN_URL"] = "open-url";
|
38
|
+
SuggestionActionType["REPLY"] = "reply";
|
39
|
+
SuggestionActionType["DIAL"] = "dial";
|
40
|
+
})(SuggestionActionType = exports.SuggestionActionType || (exports.SuggestionActionType = {}));
|
23
41
|
//# sourceMappingURL=Message.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/model/Message.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,yDAAW,CAAA;IACX,yDAAW,CAAA;IACX,mDAAQ,CAAA;IACR,6DAAa,CAAA;IACb,mDAAQ,CAAA;AACV,CAAC,EANW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAMzB;AAED,IAAY,
|
1
|
+
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/model/Message.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,yDAAW,CAAA;IACX,yDAAW,CAAA;IACX,mDAAQ,CAAA;IACR,6DAAa,CAAA;IACb,mDAAQ,CAAA;AACV,CAAC,EANW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAMzB;AAED,IAAY,YAUX;AAVD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,uCAAuB,CAAA;IACvB,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,6BAAa,CAAA;IACb,sCAAsB,CAAA;IACtB,0CAA0B,CAAA;IAC1B,0CAA0B,CAAA;IAC1B,qCAAqB,CAAA;AACvB,CAAC,EAVW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAUvB;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,yDAAS,CAAA;IACT,+DAAY,CAAA;AACd,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B;AAED,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,yDAAS,CAAA;IACT,uDAAQ,CAAA;IACR,+EAAoB,CAAA;AACtB,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAED,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,6CAAqB,CAAA;IACrB,uCAAe,CAAA;IACf,qCAAa,CAAA;AACf,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Application } from "../";
|
2
|
+
import { MESSAGE_STATUS } from "../Message";
|
3
|
+
export interface QueueMessageStatus {
|
4
|
+
applicationMessageId: string;
|
5
|
+
applicationId: Application;
|
6
|
+
status: MESSAGE_STATUS;
|
7
|
+
date: number;
|
8
|
+
extraData: Record<string, unknown>;
|
9
|
+
deliveryStatus?: string;
|
10
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueueMessage.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/model/queue/QueueMessage.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.PEACOM_CORE_QUEUE = void 0;
|
4
|
+
var PEACOM_CORE_QUEUE;
|
5
|
+
(function (PEACOM_CORE_QUEUE) {
|
6
|
+
PEACOM_CORE_QUEUE["BILLING"] = "PEACOM_CORE_BILLING";
|
7
|
+
PEACOM_CORE_QUEUE["STATUS"] = "PEACOM_CORE_MESSAGE_STATUS";
|
8
|
+
PEACOM_CORE_QUEUE["FALLBACK"] = "PEACOM_CORE_FALLBACK";
|
9
|
+
})(PEACOM_CORE_QUEUE = exports.PEACOM_CORE_QUEUE || (exports.PEACOM_CORE_QUEUE = {}));
|
10
|
+
//# sourceMappingURL=queue.constant.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queue.constant.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/model/queue/queue.constant.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,oDAA+B,CAAA;IAC/B,0DAAqC,CAAA;IACrC,sDAAiC,CAAA;AACnC,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DATE_TIME_FORMAT = exports.DATE_FORMAT = exports.DEFAULT_TIME_ZONE = void 0;
|
4
|
+
exports.DEFAULT_TIME_ZONE = 'Asia/Ho_Chi_Minh';
|
5
|
+
exports.DATE_FORMAT = "YYYY-MM-DD";
|
6
|
+
exports.DATE_TIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
7
|
+
//# sourceMappingURL=constant.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constant.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/util/date/constant.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG,kBAAkB,CAAA;AACtC,QAAA,WAAW,GAAG,YAAY,CAAC;AAC3B,QAAA,gBAAgB,GAAG,qBAAqB,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import * as moment from "moment-timezone";
|
2
|
+
declare type DateType = Date | string;
|
3
|
+
export declare function formatDateTimeTZ(date: DateType, timezone?: string, format?: string): string;
|
4
|
+
export declare const getDate: (date: DateType, tz?: string) => moment.Moment;
|
5
|
+
export declare function endOfDate(date: DateType, tz?: string): Date;
|
6
|
+
export declare function startOfDate(date: DateType, tz?: string): Date;
|
7
|
+
/**
|
8
|
+
* Week start from sunday
|
9
|
+
* @param date
|
10
|
+
* @param tz
|
11
|
+
*/
|
12
|
+
export declare function startOfWeeks(date: DateType, tz?: string): Date;
|
13
|
+
export declare function endOfWeek(date: DateType, tz?: string): Date;
|
14
|
+
export declare function lastWeek(date: DateType, tz?: string): Date;
|
15
|
+
export {};
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.lastWeek = exports.endOfWeek = exports.startOfWeeks = exports.startOfDate = exports.endOfDate = exports.getDate = exports.formatDateTimeTZ = void 0;
|
4
|
+
const constant_1 = require("./constant");
|
5
|
+
const moment = require("moment-timezone");
|
6
|
+
function formatDateTimeTZ(date, timezone = constant_1.DEFAULT_TIME_ZONE, format = constant_1.DATE_TIME_FORMAT) {
|
7
|
+
return moment(date).tz(timezone).format(format);
|
8
|
+
}
|
9
|
+
exports.formatDateTimeTZ = formatDateTimeTZ;
|
10
|
+
const getDate = (date, tz = "") => {
|
11
|
+
if (!tz)
|
12
|
+
return moment(date);
|
13
|
+
return moment(date).tz(tz);
|
14
|
+
};
|
15
|
+
exports.getDate = getDate;
|
16
|
+
function endOfDate(date, tz = "") {
|
17
|
+
return (0, exports.getDate)(date, tz).endOf("date").toDate();
|
18
|
+
}
|
19
|
+
exports.endOfDate = endOfDate;
|
20
|
+
function startOfDate(date, tz = "") {
|
21
|
+
return (0, exports.getDate)(date, tz).startOf("date").toDate();
|
22
|
+
}
|
23
|
+
exports.startOfDate = startOfDate;
|
24
|
+
/**
|
25
|
+
* Week start from sunday
|
26
|
+
* @param date
|
27
|
+
* @param tz
|
28
|
+
*/
|
29
|
+
function startOfWeeks(date, tz = "") {
|
30
|
+
return (0, exports.getDate)(date, tz).startOf("week").toDate();
|
31
|
+
}
|
32
|
+
exports.startOfWeeks = startOfWeeks;
|
33
|
+
function endOfWeek(date, tz = "") {
|
34
|
+
return (0, exports.getDate)(date, tz).endOf("week").toDate();
|
35
|
+
}
|
36
|
+
exports.endOfWeek = endOfWeek;
|
37
|
+
function lastWeek(date, tz = "") {
|
38
|
+
return (0, exports.getDate)(date, tz).subtract(1, "week").startOf("week").toDate();
|
39
|
+
}
|
40
|
+
exports.lastWeek = lastWeek;
|
41
|
+
//# sourceMappingURL=date.util.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"date.util.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/util/date/date.util.ts"],"names":[],"mappings":";;;AAAA,yCAA+D;AAC/D,0CAA0C;AAI1C,SAAgB,gBAAgB,CAC9B,IAAc,EACd,QAAQ,GAAG,4BAAiB,EAC5B,MAAM,GAAG,2BAAgB;IAEzB,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAClD,CAAC;AAND,4CAMC;AAEM,MAAM,OAAO,GAAG,CAAC,IAAc,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;IACjD,IAAI,CAAC,EAAE;QAAE,OAAO,MAAM,CAAC,IAAI,CAAC,CAAA;IAC5B,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;AAC5B,CAAC,CAAA;AAHY,QAAA,OAAO,WAGnB;AAED,SAAgB,SAAS,CAAC,IAAc,EAAE,EAAE,GAAG,EAAE;IAC/C,OAAO,IAAA,eAAO,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAA;AACjD,CAAC;AAFD,8BAEC;AAED,SAAgB,WAAW,CAAC,IAAc,EAAE,EAAE,GAAG,EAAE;IACjD,OAAO,IAAA,eAAO,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC;AACpD,CAAC;AAFD,kCAEC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,IAAc,EAAE,EAAE,GAAG,EAAE;IAClD,OAAO,IAAA,eAAO,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAA;AACnD,CAAC;AAFD,oCAEC;AAED,SAAgB,SAAS,CAAC,IAAc,EAAE,EAAE,GAAG,EAAE;IAC/C,OAAO,IAAA,eAAO,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAA;AACjD,CAAC;AAFD,8BAEC;AAED,SAAgB,QAAQ,CAAC,IAAc,EAAE,EAAE,GAAG,EAAE;IAC9C,OAAO,IAAA,eAAO,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAA;AACvE,CAAC;AAFD,4BAEC"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
tslib_1.__exportStar(require("./message/message.util"), exports);
|
5
|
+
tslib_1.__exportStar(require("./string.util"), exports);
|
6
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/util/index.ts"],"names":[],"mappings":";;;AAAA,iEAAsC;AACtC,wDAA6B"}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import { MESSAGE_TYPE } from "../../model";
|
2
|
+
interface ImageMessage {
|
3
|
+
imageUrl: string;
|
4
|
+
fileName?: string;
|
5
|
+
fileSize?: number;
|
6
|
+
message?: string;
|
7
|
+
}
|
8
|
+
export declare const buildImageMessage: ({ imageUrl, fileName, fileSize, message }: ImageMessage, extra?: null) => {
|
9
|
+
type: string;
|
10
|
+
fileName: string;
|
11
|
+
fileSize: number | undefined;
|
12
|
+
fileUrl: string;
|
13
|
+
message: string;
|
14
|
+
extra: null;
|
15
|
+
};
|
16
|
+
interface VideoMessage {
|
17
|
+
fileUrl: string;
|
18
|
+
thumbnailUrl?: string;
|
19
|
+
duration?: number;
|
20
|
+
message?: string;
|
21
|
+
}
|
22
|
+
export declare const buildVideoMessage: ({ fileUrl, duration, thumbnailUrl, message }: VideoMessage, extra?: null) => {
|
23
|
+
type: MESSAGE_TYPE;
|
24
|
+
duration: number | undefined;
|
25
|
+
fileUrl: string;
|
26
|
+
thumbnailUrl: string | undefined;
|
27
|
+
message: string;
|
28
|
+
extra: null;
|
29
|
+
};
|
30
|
+
interface TextMessage {
|
31
|
+
attachments?: Array<any>;
|
32
|
+
message: string;
|
33
|
+
}
|
34
|
+
export declare const buildTextMessage: ({ message }: TextMessage, extra?: null) => {
|
35
|
+
type: MESSAGE_TYPE;
|
36
|
+
message: string;
|
37
|
+
extra: null;
|
38
|
+
};
|
39
|
+
interface Location {
|
40
|
+
longitude: number;
|
41
|
+
latitude: number;
|
42
|
+
}
|
43
|
+
interface LocationMessage {
|
44
|
+
location: Location;
|
45
|
+
message?: string;
|
46
|
+
}
|
47
|
+
export declare const buildLocationMessage: ({ location, message }: LocationMessage, extra?: null) => {
|
48
|
+
type: MESSAGE_TYPE;
|
49
|
+
message: string;
|
50
|
+
location: Location;
|
51
|
+
extra: null;
|
52
|
+
};
|
53
|
+
interface FileMessage {
|
54
|
+
fileUrl: string;
|
55
|
+
fileName: string;
|
56
|
+
fileSize?: number;
|
57
|
+
message?: string;
|
58
|
+
}
|
59
|
+
export declare const buildFileMessage: ({ message, fileUrl, fileName, fileSize }: FileMessage, extra?: null) => {
|
60
|
+
type: MESSAGE_TYPE;
|
61
|
+
message: string;
|
62
|
+
fileName: string;
|
63
|
+
fileUrl: string;
|
64
|
+
fileSize: number;
|
65
|
+
extra: null;
|
66
|
+
};
|
67
|
+
interface RichCardMessage {
|
68
|
+
richCards: Array<any>;
|
69
|
+
}
|
70
|
+
export declare const buildRichCardMessage: ({ richCards }: RichCardMessage, extra?: null) => {
|
71
|
+
message: string;
|
72
|
+
type: MESSAGE_TYPE;
|
73
|
+
richCards: any[];
|
74
|
+
extra: null;
|
75
|
+
};
|
76
|
+
export {};
|
@@ -0,0 +1,52 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.buildRichCardMessage = exports.buildFileMessage = exports.buildLocationMessage = exports.buildTextMessage = exports.buildVideoMessage = exports.buildImageMessage = void 0;
|
4
|
+
const model_1 = require("../../model");
|
5
|
+
const buildImageMessage = ({ imageUrl, fileName = "", fileSize, message = "" }, extra = null) => ({
|
6
|
+
type: "picture",
|
7
|
+
fileName: fileName,
|
8
|
+
fileSize: fileSize,
|
9
|
+
fileUrl: imageUrl,
|
10
|
+
message: message,
|
11
|
+
extra
|
12
|
+
});
|
13
|
+
exports.buildImageMessage = buildImageMessage;
|
14
|
+
const buildVideoMessage = ({ fileUrl, duration, thumbnailUrl, message = "" }, extra = null) => ({
|
15
|
+
type: model_1.MESSAGE_TYPE.VIDEO,
|
16
|
+
duration,
|
17
|
+
fileUrl,
|
18
|
+
thumbnailUrl,
|
19
|
+
message,
|
20
|
+
extra
|
21
|
+
});
|
22
|
+
exports.buildVideoMessage = buildVideoMessage;
|
23
|
+
const buildTextMessage = ({ message }, extra = null) => ({
|
24
|
+
type: model_1.MESSAGE_TYPE.TEXT,
|
25
|
+
message,
|
26
|
+
extra
|
27
|
+
});
|
28
|
+
exports.buildTextMessage = buildTextMessage;
|
29
|
+
const buildLocationMessage = ({ location, message = "" }, extra = null) => ({
|
30
|
+
type: model_1.MESSAGE_TYPE.LOCATION,
|
31
|
+
message,
|
32
|
+
location,
|
33
|
+
extra
|
34
|
+
});
|
35
|
+
exports.buildLocationMessage = buildLocationMessage;
|
36
|
+
const buildFileMessage = ({ message = "", fileUrl, fileName = "", fileSize = 0 }, extra = null) => ({
|
37
|
+
type: model_1.MESSAGE_TYPE.FILE,
|
38
|
+
message,
|
39
|
+
fileName,
|
40
|
+
fileUrl,
|
41
|
+
fileSize,
|
42
|
+
extra
|
43
|
+
});
|
44
|
+
exports.buildFileMessage = buildFileMessage;
|
45
|
+
const buildRichCardMessage = ({ richCards }, extra = null) => ({
|
46
|
+
message: "",
|
47
|
+
type: model_1.MESSAGE_TYPE.RICH_CARD,
|
48
|
+
richCards,
|
49
|
+
extra
|
50
|
+
});
|
51
|
+
exports.buildRichCardMessage = buildRichCardMessage;
|
52
|
+
//# sourceMappingURL=message.util.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"message.util.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/util/message/message.util.ts"],"names":[],"mappings":";;;AAAA,uCAAyC;AASlC,MAAM,iBAAiB,GAAG,CAAC,EAAC,QAAQ,EAAE,QAAQ,GAAG,EAAE,EAAE,QAAQ,EAAE,OAAO,GAAG,EAAE,EAAe,EAAE,KAAK,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC;IACnH,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,OAAO;IAChB,KAAK;CACN,CAAC,CAAC;AAPU,QAAA,iBAAiB,qBAO3B;AASI,MAAM,iBAAiB,GAAG,CAC/B,EAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,GAAG,EAAE,EAAe,EAC7D,KAAK,GAAG,IAAI,EACZ,EAAE,CAAC,CAAC;IACJ,IAAI,EAAE,oBAAY,CAAC,KAAK;IACxB,QAAQ;IACR,OAAO;IACP,YAAY;IACZ,OAAO;IACP,KAAK;CACN,CAAC,CAAC;AAVU,QAAA,iBAAiB,qBAU3B;AAQI,MAAM,gBAAgB,GAAG,CAAC,EAAC,OAAO,EAAc,EAAE,KAAK,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC;IACzE,IAAI,EAAE,oBAAY,CAAC,IAAI;IACvB,OAAO;IACP,KAAK;CACN,CAAC,CAAC;AAJU,QAAA,gBAAgB,oBAI1B;AAYI,MAAM,oBAAoB,GAAG,CAClC,EAAC,QAAQ,EAAE,OAAO,GAAG,EAAE,EAAkB,EACzC,KAAK,GAAG,IAAI,EACZ,EAAE,CAAC,CAAC;IACJ,IAAI,EAAE,oBAAY,CAAC,QAAQ;IAC3B,OAAO;IACP,QAAQ;IACR,KAAK;CACN,CAAC,CAAC;AARU,QAAA,oBAAoB,wBAQ9B;AAUI,MAAM,gBAAgB,GAAG,CAC9B,EAAC,OAAO,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,GAAG,EAAE,EAAE,QAAQ,GAAG,CAAC,EAAc,EACjE,KAAK,GAAG,IAAI,EACZ,EAAE,CAAC,CAAC;IACJ,IAAI,EAAE,oBAAY,CAAC,IAAI;IACvB,OAAO;IACP,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,KAAK;CACN,CAAC,CAAC;AAVU,QAAA,gBAAgB,oBAU1B;AAMI,MAAM,oBAAoB,GAAG,CAAC,EAAC,SAAS,EAAkB,EAAE,KAAK,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC;IACnF,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,oBAAY,CAAC,SAAS;IAC5B,SAAS;IACT,KAAK;CACN,CAAC,CAAC;AALU,QAAA,oBAAoB,wBAK9B"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export declare function generateRandomCode(length: number): string;
|
2
|
+
export declare const hasText: (str: string) => boolean;
|
3
|
+
export declare function markKey(keyStr: string): string;
|
4
|
+
export declare function unescapeHTML(str: string): string;
|
5
|
+
export declare const filterForNumberOnly: (str: string) => string;
|
6
|
+
export declare function isNumberOnly(str: string): boolean;
|
7
|
+
export declare function filterForInvalidCharacter(str: string, replaceCharacter?: string): string;
|
8
|
+
export declare function filterNotNumberAndDivideChar(str: string): string;
|
9
|
+
export declare function stringNumberToList(str: string): number[];
|
10
|
+
export declare function htmlEncode(rawStr: string): string;
|
11
|
+
export declare function filterNonAlphaNumeric(str: string): string;
|
12
|
+
export declare const leftString: (string: string, count: number) => string;
|
13
|
+
export declare const rightString: (string: string, count: number) => string;
|
@@ -0,0 +1,108 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.rightString = exports.leftString = exports.filterNonAlphaNumeric = exports.htmlEncode = exports.stringNumberToList = exports.filterNotNumberAndDivideChar = exports.filterForInvalidCharacter = exports.isNumberOnly = exports.filterForNumberOnly = exports.unescapeHTML = exports.markKey = exports.hasText = exports.generateRandomCode = void 0;
|
4
|
+
function generateRandomCode(length) {
|
5
|
+
let text = "";
|
6
|
+
const possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
7
|
+
for (let i = 0; i < length; i += 1)
|
8
|
+
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
9
|
+
return text;
|
10
|
+
}
|
11
|
+
exports.generateRandomCode = generateRandomCode;
|
12
|
+
const hasText = (str) => {
|
13
|
+
const testStr = `${str || ""}`;
|
14
|
+
return !!str && testStr.length > 0;
|
15
|
+
};
|
16
|
+
exports.hasText = hasText;
|
17
|
+
function markKey(keyStr) {
|
18
|
+
return `**** ${keyStr.substring(keyStr.length - 4, keyStr.length)}`;
|
19
|
+
}
|
20
|
+
exports.markKey = markKey;
|
21
|
+
const htmlEntities = {
|
22
|
+
nbsp: " ",
|
23
|
+
cent: "¢",
|
24
|
+
pound: "£",
|
25
|
+
yen: "¥",
|
26
|
+
euro: "€",
|
27
|
+
copy: "©",
|
28
|
+
reg: "®",
|
29
|
+
lt: "<",
|
30
|
+
gt: ">",
|
31
|
+
quot: '"',
|
32
|
+
amp: "&",
|
33
|
+
apos: "'"
|
34
|
+
};
|
35
|
+
function unescapeHTML(str) {
|
36
|
+
return str.replace(/&([^;]+);/g, (entity, entityCode) => {
|
37
|
+
let match;
|
38
|
+
if (entityCode in htmlEntities) {
|
39
|
+
return htmlEntities[entityCode];
|
40
|
+
}
|
41
|
+
// eslint-disable-next-line no-cond-assign
|
42
|
+
if ((match = entityCode.match(/^#x([\da-fA-F]+)$/))) {
|
43
|
+
return String.fromCharCode(parseInt(match[1], 16));
|
44
|
+
}
|
45
|
+
// eslint-disable-next-line no-cond-assign
|
46
|
+
if ((match = entityCode.match(/^#(\d+)$/))) {
|
47
|
+
// eslint-disable-next-line no-bitwise
|
48
|
+
return String.fromCharCode(~~match[1]);
|
49
|
+
}
|
50
|
+
return entity;
|
51
|
+
});
|
52
|
+
}
|
53
|
+
exports.unescapeHTML = unescapeHTML;
|
54
|
+
const filterForNumberOnly = (str) => str.replace(/\D+/g, "");
|
55
|
+
exports.filterForNumberOnly = filterForNumberOnly;
|
56
|
+
function isNumberOnly(str) {
|
57
|
+
const pattern = /^\d+$/;
|
58
|
+
return pattern.test(str);
|
59
|
+
}
|
60
|
+
exports.isNumberOnly = isNumberOnly;
|
61
|
+
function filterForInvalidCharacter(str, replaceCharacter = "_") {
|
62
|
+
let rs = str.replace(/[^\p{L}\s]/giu, " ");
|
63
|
+
rs = rs.trim();
|
64
|
+
rs = rs.replace(/ +/g, replaceCharacter);
|
65
|
+
return rs;
|
66
|
+
}
|
67
|
+
exports.filterForInvalidCharacter = filterForInvalidCharacter;
|
68
|
+
function filterNotNumberAndDivideChar(str) {
|
69
|
+
let rs = str.replace(/\D+/g, " ");
|
70
|
+
rs = rs.trim();
|
71
|
+
rs = rs.replace(/ +/g, ",");
|
72
|
+
return rs;
|
73
|
+
}
|
74
|
+
exports.filterNotNumberAndDivideChar = filterNotNumberAndDivideChar;
|
75
|
+
function stringNumberToList(str) {
|
76
|
+
return filterNotNumberAndDivideChar(str)
|
77
|
+
.split(/[ _\-,]/)
|
78
|
+
.filter((t) => (0, exports.hasText)(t))
|
79
|
+
.map((t) => Number(t));
|
80
|
+
}
|
81
|
+
exports.stringNumberToList = stringNumberToList;
|
82
|
+
function htmlEncode(rawStr) {
|
83
|
+
return rawStr.replace(/[\u00A0-\u9999<>&]/g, (i) => {
|
84
|
+
return `&#${i.charCodeAt(0)};`;
|
85
|
+
});
|
86
|
+
}
|
87
|
+
exports.htmlEncode = htmlEncode;
|
88
|
+
function filterNonAlphaNumeric(str) {
|
89
|
+
return str.replace(/\W/g, "");
|
90
|
+
}
|
91
|
+
exports.filterNonAlphaNumeric = filterNonAlphaNumeric;
|
92
|
+
const leftString = (string, count) => {
|
93
|
+
const str = `${string || ""}`;
|
94
|
+
if (str.length > count) {
|
95
|
+
return str.substring(0, count);
|
96
|
+
}
|
97
|
+
return str;
|
98
|
+
};
|
99
|
+
exports.leftString = leftString;
|
100
|
+
const rightString = (string, count) => {
|
101
|
+
const str = `${string || ""}`;
|
102
|
+
if (str.length > count) {
|
103
|
+
return str.substring(str.length - count);
|
104
|
+
}
|
105
|
+
return str;
|
106
|
+
};
|
107
|
+
exports.rightString = rightString;
|
108
|
+
//# sourceMappingURL=string.util.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"string.util.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/util/string.util.ts"],"names":[],"mappings":";;;AAAA,SAAgB,kBAAkB,CAAC,MAAc;IAC/C,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,MAAM,QAAQ,GACZ,gEAAgE,CAAC;IAEnE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC;QAChC,IAAI,IAAI,QAAQ,CAAC,MAA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