@dawntech/dispatcher 0.0.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/.prettierignore +4 -0
- package/.prettierrc +7 -0
- package/README.md +3 -0
- package/dist/chunk-64334IMD.mjs +2 -0
- package/dist/chunk-64334IMD.mjs.map +1 -0
- package/dist/chunk-6IAFH374.mjs +2 -0
- package/dist/chunk-6IAFH374.mjs.map +1 -0
- package/dist/chunk-HYW2O7ZX.mjs +2 -0
- package/dist/chunk-HYW2O7ZX.mjs.map +1 -0
- package/dist/chunk-OR34YAY3.mjs +2 -0
- package/dist/chunk-OR34YAY3.mjs.map +1 -0
- package/dist/chunk-OXXLVJVC.mjs +2 -0
- package/dist/chunk-OXXLVJVC.mjs.map +1 -0
- package/dist/chunk-QA6PFVGP.mjs +2 -0
- package/dist/chunk-QA6PFVGP.mjs.map +1 -0
- package/dist/chunk-SLZLYBPB.mjs +2 -0
- package/dist/chunk-SLZLYBPB.mjs.map +1 -0
- package/dist/chunk-UFUGEIFL.mjs +2 -0
- package/dist/chunk-UFUGEIFL.mjs.map +1 -0
- package/dist/chunk-XLRB2LAD.mjs +2 -0
- package/dist/chunk-XLRB2LAD.mjs.map +1 -0
- package/dist/chunk-YDWZJWCU.mjs +2 -0
- package/dist/chunk-YDWZJWCU.mjs.map +1 -0
- package/dist/core/Blip.d.mts +84 -0
- package/dist/core/Blip.js +2 -0
- package/dist/core/Blip.js.map +1 -0
- package/dist/core/Blip.mjs +2 -0
- package/dist/core/Blip.mjs.map +1 -0
- package/dist/core/Dispatcher.d.mts +52 -0
- package/dist/core/Dispatcher.js +2 -0
- package/dist/core/Dispatcher.js.map +1 -0
- package/dist/core/Dispatcher.mjs +2 -0
- package/dist/core/Dispatcher.mjs.map +1 -0
- package/dist/core/DispatcherDescriptor.d.mts +23 -0
- package/dist/core/DispatcherDescriptor.js +2 -0
- package/dist/core/DispatcherDescriptor.js.map +1 -0
- package/dist/core/DispatcherDescriptor.mjs +2 -0
- package/dist/core/DispatcherDescriptor.mjs.map +1 -0
- package/dist/core/DispatcherMonitor.d.mts +52 -0
- package/dist/core/DispatcherMonitor.js +2 -0
- package/dist/core/DispatcherMonitor.js.map +1 -0
- package/dist/core/DispatcherMonitor.mjs +2 -0
- package/dist/core/DispatcherMonitor.mjs.map +1 -0
- package/dist/core/DispatcherQuery.d.mts +14 -0
- package/dist/core/DispatcherQuery.js +2 -0
- package/dist/core/DispatcherQuery.js.map +1 -0
- package/dist/core/DispatcherQuery.mjs +2 -0
- package/dist/core/DispatcherQuery.mjs.map +1 -0
- package/dist/core/DispatcherRepository.d.mts +47 -0
- package/dist/core/DispatcherRepository.js +2 -0
- package/dist/core/DispatcherRepository.js.map +1 -0
- package/dist/core/DispatcherRepository.mjs +2 -0
- package/dist/core/DispatcherRepository.mjs.map +1 -0
- package/dist/core/DispatcherStateMachine.d.mts +20 -0
- package/dist/core/DispatcherStateMachine.js +2 -0
- package/dist/core/DispatcherStateMachine.js.map +1 -0
- package/dist/core/DispatcherStateMachine.mjs +2 -0
- package/dist/core/DispatcherStateMachine.mjs.map +1 -0
- package/dist/errors/index.d.mts +54 -0
- package/dist/errors/index.js +2 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/index.mjs +2 -0
- package/dist/errors/index.mjs.map +1 -0
- package/dist/index.d.mts +11 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/server.d.mts +2 -0
- package/dist/server.js +2 -0
- package/dist/server.js.map +1 -0
- package/dist/server.mjs +2 -0
- package/dist/server.mjs.map +1 -0
- package/dist/types/blip.d.mts +127 -0
- package/dist/types/blip.js +2 -0
- package/dist/types/blip.js.map +1 -0
- package/dist/types/blip.mjs +2 -0
- package/dist/types/blip.mjs.map +1 -0
- package/dist/types/index.d.mts +155 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/index.mjs +2 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/utils/logger.d.mts +73 -0
- package/dist/utils/logger.js +2 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/logger.mjs +2 -0
- package/dist/utils/logger.mjs.map +1 -0
- package/jest.config.js +48 -0
- package/package.json +81 -0
- package/tsconfig.json +22 -0
- package/tsconfig.test.json +10 -0
- package/tsup.config.js +10 -0
- package/types/core/Blip.d.ts.map +1 -0
- package/types/core/Dispatcher.d.ts.map +1 -0
- package/types/core/DispatcherDescriptor.d.ts.map +1 -0
- package/types/core/DispatcherMonitor.d.ts.map +1 -0
- package/types/core/DispatcherQuery.d.ts.map +1 -0
- package/types/core/DispatcherRepository.d.ts.map +1 -0
- package/types/core/DispatcherStateMachine.d.ts.map +1 -0
- package/types/errors/index.d.ts.map +1 -0
- package/types/index.d.ts.map +1 -0
- package/types/server.d.ts.map +1 -0
- package/types/types/blip.d.ts.map +1 -0
- package/types/types/index.d.ts.map +1 -0
- package/types/utils/logger.d.ts.map +1 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for Blip Platform API
|
|
3
|
+
* Based on the LIME protocol and Blip extensions
|
|
4
|
+
*/
|
|
5
|
+
declare namespace Vnd {
|
|
6
|
+
namespace Lime {
|
|
7
|
+
enum Method {
|
|
8
|
+
GET = "get",
|
|
9
|
+
SET = "set",
|
|
10
|
+
DELETE = "delete",
|
|
11
|
+
OBSERVE = "observe",
|
|
12
|
+
SUBSCRIBE = "subscribe",
|
|
13
|
+
MERGE = "merge"
|
|
14
|
+
}
|
|
15
|
+
enum Status {
|
|
16
|
+
SUCCESS = "success",
|
|
17
|
+
FAILURE = "failure"
|
|
18
|
+
}
|
|
19
|
+
namespace Transport {
|
|
20
|
+
namespace Payload {
|
|
21
|
+
interface Request<T = any> {
|
|
22
|
+
id?: string;
|
|
23
|
+
to?: string;
|
|
24
|
+
method: Method;
|
|
25
|
+
uri: string;
|
|
26
|
+
type?: string;
|
|
27
|
+
resource?: T;
|
|
28
|
+
}
|
|
29
|
+
interface Response<T = any> {
|
|
30
|
+
id?: string;
|
|
31
|
+
from?: string;
|
|
32
|
+
to?: string;
|
|
33
|
+
method?: Method;
|
|
34
|
+
status: Status;
|
|
35
|
+
type?: string;
|
|
36
|
+
resource?: T;
|
|
37
|
+
reason?: {
|
|
38
|
+
code: number;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
interface Message<T = any> {
|
|
45
|
+
id?: string;
|
|
46
|
+
to: string;
|
|
47
|
+
from?: string;
|
|
48
|
+
type: string;
|
|
49
|
+
content: T;
|
|
50
|
+
}
|
|
51
|
+
namespace Command {
|
|
52
|
+
interface Resource<T = any> {
|
|
53
|
+
[key: string]: T;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
namespace Iris {
|
|
58
|
+
interface ThreadMessage {
|
|
59
|
+
id: string;
|
|
60
|
+
direction: 'sent' | 'received';
|
|
61
|
+
type: string;
|
|
62
|
+
content: any;
|
|
63
|
+
date: string;
|
|
64
|
+
status?: string;
|
|
65
|
+
[key: string]: any;
|
|
66
|
+
}
|
|
67
|
+
interface Contact {
|
|
68
|
+
identity: string;
|
|
69
|
+
name?: string;
|
|
70
|
+
email?: string;
|
|
71
|
+
phoneNumber?: string;
|
|
72
|
+
taxDocument?: string;
|
|
73
|
+
gender?: string;
|
|
74
|
+
city?: string;
|
|
75
|
+
extras?: Record<string, string>;
|
|
76
|
+
[key: string]: any;
|
|
77
|
+
}
|
|
78
|
+
interface EventTrack {
|
|
79
|
+
category: string;
|
|
80
|
+
action: string;
|
|
81
|
+
contact?: {
|
|
82
|
+
identity: string;
|
|
83
|
+
};
|
|
84
|
+
extras?: any;
|
|
85
|
+
count?: number;
|
|
86
|
+
}
|
|
87
|
+
interface Ticket {
|
|
88
|
+
id: string;
|
|
89
|
+
sequentialId: number;
|
|
90
|
+
ownerIdentity: string;
|
|
91
|
+
customerIdentity: string;
|
|
92
|
+
providerIdentity: string;
|
|
93
|
+
status: string;
|
|
94
|
+
storageDate: string;
|
|
95
|
+
externalId?: string;
|
|
96
|
+
rating?: number;
|
|
97
|
+
team?: string;
|
|
98
|
+
agentIdentity?: string;
|
|
99
|
+
closedDate?: string;
|
|
100
|
+
transfers?: number;
|
|
101
|
+
[key: string]: any;
|
|
102
|
+
}
|
|
103
|
+
namespace ActiveCampaign {
|
|
104
|
+
interface AudienceSummary {
|
|
105
|
+
total: number;
|
|
106
|
+
sent: number;
|
|
107
|
+
failed: number;
|
|
108
|
+
scheduled: number;
|
|
109
|
+
canceled: number;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
interface BlipConfig {
|
|
115
|
+
botUrl: string;
|
|
116
|
+
botKey: string;
|
|
117
|
+
timeout?: number;
|
|
118
|
+
maxRetries?: number;
|
|
119
|
+
}
|
|
120
|
+
interface DateInterval {
|
|
121
|
+
from?: Date;
|
|
122
|
+
to: Date;
|
|
123
|
+
}
|
|
124
|
+
type PartiallyOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
125
|
+
type PartiallyRequiredStrict<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
|
126
|
+
|
|
127
|
+
export { type BlipConfig, type DateInterval, type PartiallyOptional, type PartiallyRequiredStrict, Vnd };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var u=(r,e)=>{for(var n in e)a(r,n,{get:e[n],enumerable:!0})},y=(r,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of p(e))!m.call(r,t)&&t!==n&&a(r,t,{get:()=>e[t],enumerable:!(s=c(e,t))||s.enumerable});return r};var d=r=>y(a({},"__esModule",{value:!0}),r);var x={};u(x,{Vnd:()=>o});module.exports=d(x);var o;(e=>{let r;(t=>{let n;(i=>(i.GET="get",i.SET="set",i.DELETE="delete",i.OBSERVE="observe",i.SUBSCRIBE="subscribe",i.MERGE="merge"))(n=t.Method||(t.Method={}));let s;(g=>(g.SUCCESS="success",g.FAILURE="failure"))(s=t.Status||(t.Status={}))})(r=e.Lime||(e.Lime={}))})(o||(o={}));0&&(module.exports={Vnd});
|
|
2
|
+
//# sourceMappingURL=blip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/blip.ts"],"sourcesContent":["/**\n * Type definitions for Blip Platform API\n * Based on the LIME protocol and Blip extensions\n */\n\nexport namespace Vnd {\n export namespace Lime {\n export enum Method {\n GET = 'get',\n SET = 'set',\n DELETE = 'delete',\n OBSERVE = 'observe',\n SUBSCRIBE = 'subscribe',\n MERGE = 'merge',\n }\n\n export enum Status {\n SUCCESS = 'success',\n FAILURE = 'failure',\n }\n\n export namespace Transport {\n export namespace Payload {\n export interface Request<T = any> {\n id?: string;\n to?: string;\n method: Method;\n uri: string;\n type?: string;\n resource?: T;\n }\n\n export interface Response<T = any> {\n id?: string;\n from?: string;\n to?: string;\n method?: Method;\n status: Status;\n type?: string;\n resource?: T;\n reason?: {\n code: number;\n description: string;\n };\n }\n }\n }\n\n export interface Message<T = any> {\n id?: string;\n to: string;\n from?: string;\n type: string;\n content: T;\n }\n\n export namespace Command {\n export interface Resource<T = any> {\n [key: string]: T;\n }\n }\n }\n\n export namespace Iris {\n export interface ThreadMessage {\n id: string;\n direction: 'sent' | 'received';\n type: string;\n content: any;\n date: string;\n status?: string;\n [key: string]: any;\n }\n\n export interface Contact {\n identity: string;\n name?: string;\n email?: string;\n phoneNumber?: string;\n taxDocument?: string;\n gender?: string;\n city?: string;\n extras?: Record<string, string>;\n [key: string]: any;\n }\n\n export interface EventTrack {\n category: string;\n action: string;\n contact?: {\n identity: string;\n };\n extras?: any;\n count?: number;\n }\n\n export interface Ticket {\n id: string;\n sequentialId: number;\n ownerIdentity: string;\n customerIdentity: string;\n providerIdentity: string;\n status: string;\n storageDate: string;\n externalId?: string;\n rating?: number;\n team?: string;\n agentIdentity?: string;\n closedDate?: string;\n transfers?: number;\n [key: string]: any;\n }\n\n export namespace ActiveCampaign {\n export interface AudienceSummary {\n total: number;\n sent: number;\n failed: number;\n scheduled: number;\n canceled: number;\n }\n }\n }\n}\n\nexport interface BlipConfig {\n botUrl: string;\n botKey: string;\n timeout?: number;\n maxRetries?: number;\n}\n\nexport interface DateInterval {\n from?: Date;\n to: Date;\n}\n\nexport type PartiallyOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\nexport type PartiallyRequiredStrict<T, K extends keyof T> = T & Required<Pick<T, K>>;\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,SAAAE,IAAA,eAAAC,EAAAH,GAKO,IAAUE,MAAV,CACE,IAAUE,MAAV,CACE,IAAKC,OACVA,EAAA,IAAM,MACNA,EAAA,IAAM,MACNA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,MAAQ,UANEA,EAAAD,EAAA,SAAAA,EAAA,YASL,IAAKE,OACVA,EAAA,QAAU,UACVA,EAAA,QAAU,YAFAA,EAAAF,EAAA,SAAAA,EAAA,cAVGA,EAAAF,EAAA,OAAAA,EAAA,YADFA,MAAA","names":["blip_exports","__export","Vnd","__toCommonJS","Lime","Method","Status"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { Vnd } from './blip.mjs';
|
|
2
|
+
|
|
3
|
+
type Contact = Omit<Vnd.Iris.Contact, 'identity'>;
|
|
4
|
+
type MessageData = {
|
|
5
|
+
type: string;
|
|
6
|
+
content: Record<string, any> | string;
|
|
7
|
+
};
|
|
8
|
+
type MessagePayload = Record<string, any> | Array<any> | string;
|
|
9
|
+
declare enum MessageState {
|
|
10
|
+
INIT = "INIT",
|
|
11
|
+
DISPATCHED = "DISPATCHED",
|
|
12
|
+
SCHEDULED = "SCHEDULED",
|
|
13
|
+
QUEUED = "QUEUED",
|
|
14
|
+
FINAL = "FINAL"
|
|
15
|
+
}
|
|
16
|
+
declare enum MessageStatus {
|
|
17
|
+
INIT = "INIT",
|
|
18
|
+
PENDING = "PENDING",
|
|
19
|
+
SENDING = "SENDING",
|
|
20
|
+
DELIVERED = "DELIVERED",
|
|
21
|
+
READ = "READ",
|
|
22
|
+
REPLIED = "REPLIED",
|
|
23
|
+
FAILED = "FAILED",
|
|
24
|
+
CANCELED = "CANCELED"
|
|
25
|
+
}
|
|
26
|
+
declare enum DispatchState {
|
|
27
|
+
ACCEPTED = "accepted",
|
|
28
|
+
DISPATCHED = "dispatched",
|
|
29
|
+
RECEIVED = "received",
|
|
30
|
+
CONSUMED = "consumed",
|
|
31
|
+
FAILED = "failed"
|
|
32
|
+
}
|
|
33
|
+
interface Message {
|
|
34
|
+
messageId: string;
|
|
35
|
+
contactId: string;
|
|
36
|
+
descriptorId: string;
|
|
37
|
+
payload: MessageData;
|
|
38
|
+
status: MessageStatus;
|
|
39
|
+
state: MessageState;
|
|
40
|
+
attempts?: number;
|
|
41
|
+
retries?: number;
|
|
42
|
+
options?: MessageOptions;
|
|
43
|
+
expiresAt?: string;
|
|
44
|
+
scheduledTo?: string;
|
|
45
|
+
sentAt?: string;
|
|
46
|
+
acceptedAt?: string;
|
|
47
|
+
lastDispatchAttemptAt?: string;
|
|
48
|
+
createdAt: string;
|
|
49
|
+
deliveredAt?: string;
|
|
50
|
+
readAt?: string;
|
|
51
|
+
repliedAt?: string;
|
|
52
|
+
failedAt?: string;
|
|
53
|
+
error?: string;
|
|
54
|
+
}
|
|
55
|
+
interface Shift {
|
|
56
|
+
days: number;
|
|
57
|
+
start: string;
|
|
58
|
+
end: string;
|
|
59
|
+
gmt?: string;
|
|
60
|
+
}
|
|
61
|
+
declare enum Weekdays {
|
|
62
|
+
MONDAY = 1,
|
|
63
|
+
TUESDAY = 2,
|
|
64
|
+
WEDNESDAY = 4,
|
|
65
|
+
THURSDAY = 8,
|
|
66
|
+
FRIDAY = 16,
|
|
67
|
+
SATURDAY = 32,
|
|
68
|
+
SUNDAY = 64
|
|
69
|
+
}
|
|
70
|
+
interface Intent {
|
|
71
|
+
intent: string;
|
|
72
|
+
dueDate?: string;
|
|
73
|
+
event?: string;
|
|
74
|
+
payload?: any | null;
|
|
75
|
+
expired?: {
|
|
76
|
+
event?: string;
|
|
77
|
+
intent?: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
type CallbackEvent = 'dispatch' | 'sending' | 'delivered' | 'failed' | 'read' | 'replied' | 'scheduled' | 'retry' | 'evicted' | 'canceled';
|
|
81
|
+
type ConnectionConfig = {
|
|
82
|
+
contract: string;
|
|
83
|
+
key: string;
|
|
84
|
+
};
|
|
85
|
+
interface MessageOptions {
|
|
86
|
+
shifts?: Array<Shift>;
|
|
87
|
+
contact?: Contact;
|
|
88
|
+
state?: {
|
|
89
|
+
stateId: string;
|
|
90
|
+
botId: string;
|
|
91
|
+
botIds?: Array<string>;
|
|
92
|
+
};
|
|
93
|
+
intent?: string | Intent;
|
|
94
|
+
finalStatus?: 'DELIVERED' | 'READ' | 'REPLIED';
|
|
95
|
+
}
|
|
96
|
+
interface DispatchMessageOptions extends MessageOptions {
|
|
97
|
+
schedule?: string;
|
|
98
|
+
}
|
|
99
|
+
interface DispatcherOptions {
|
|
100
|
+
maxRetries?: number;
|
|
101
|
+
retryIntervals?: number[];
|
|
102
|
+
retention?: number;
|
|
103
|
+
timeouts?: {
|
|
104
|
+
pending?: number;
|
|
105
|
+
sending?: number;
|
|
106
|
+
};
|
|
107
|
+
batchSize?: number;
|
|
108
|
+
pollingIntervals?: {
|
|
109
|
+
scheduled?: number;
|
|
110
|
+
pending?: number;
|
|
111
|
+
sending?: number;
|
|
112
|
+
delivered?: number;
|
|
113
|
+
read?: number;
|
|
114
|
+
queue?: number;
|
|
115
|
+
};
|
|
116
|
+
maxQueueSize?: number;
|
|
117
|
+
rateLimits?: {
|
|
118
|
+
global?: {
|
|
119
|
+
points: number;
|
|
120
|
+
duration: number;
|
|
121
|
+
};
|
|
122
|
+
message?: {
|
|
123
|
+
points: number;
|
|
124
|
+
duration: number;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
interface QueryFilter {
|
|
129
|
+
contactId?: string;
|
|
130
|
+
descriptorId?: string;
|
|
131
|
+
status?: MessageStatus | MessageStatus[];
|
|
132
|
+
state?: MessageState | MessageState[];
|
|
133
|
+
size?: number;
|
|
134
|
+
skip?: number;
|
|
135
|
+
}
|
|
136
|
+
interface DispatcherMetrics {
|
|
137
|
+
total: number;
|
|
138
|
+
byState: {
|
|
139
|
+
[key in MessageState]?: number;
|
|
140
|
+
};
|
|
141
|
+
byStatus: {
|
|
142
|
+
[key in MessageStatus]?: number;
|
|
143
|
+
};
|
|
144
|
+
cumulative: {
|
|
145
|
+
dispatched: number;
|
|
146
|
+
delivered: number;
|
|
147
|
+
failed: number;
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @deprecated Use DispatcherOptions instead
|
|
152
|
+
*/
|
|
153
|
+
type MessageDispatcherOptions = DispatcherOptions;
|
|
154
|
+
|
|
155
|
+
export { type CallbackEvent, type ConnectionConfig, type Contact, type DispatchMessageOptions, DispatchState, type DispatcherMetrics, type DispatcherOptions, type Intent, type Message, type MessageData, type MessageDispatcherOptions, type MessageOptions, type MessagePayload, MessageState, MessageStatus, type QueryFilter, type Shift, Weekdays };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var I=(i,n)=>{for(var o in n)a(i,o,{get:n[o],enumerable:!0})},b=(i,n,o,p)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of c(n))!m.call(i,s)&&s!==o&&a(i,s,{get:()=>n[s],enumerable:!(p=D(n,s))||p.enumerable});return i};var A=i=>b(a({},"__esModule",{value:!0}),i);var l={};I(l,{DispatchState:()=>E,MessageState:()=>d,MessageStatus:()=>g,Weekdays:()=>u});module.exports=A(l);var d=(e=>(e.INIT="INIT",e.DISPATCHED="DISPATCHED",e.SCHEDULED="SCHEDULED",e.QUEUED="QUEUED",e.FINAL="FINAL",e))(d||{}),g=(r=>(r.INIT="INIT",r.PENDING="PENDING",r.SENDING="SENDING",r.DELIVERED="DELIVERED",r.READ="READ",r.REPLIED="REPLIED",r.FAILED="FAILED",r.CANCELED="CANCELED",r))(g||{}),E=(e=>(e.ACCEPTED="accepted",e.DISPATCHED="dispatched",e.RECEIVED="received",e.CONSUMED="consumed",e.FAILED="failed",e))(E||{}),u=(t=>(t[t.MONDAY=1]="MONDAY",t[t.TUESDAY=2]="TUESDAY",t[t.WEDNESDAY=4]="WEDNESDAY",t[t.THURSDAY=8]="THURSDAY",t[t.FRIDAY=16]="FRIDAY",t[t.SATURDAY=32]="SATURDAY",t[t.SUNDAY=64]="SUNDAY",t))(u||{});0&&(module.exports={DispatchState,MessageState,MessageStatus,Weekdays});
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["import { Vnd } from './blip';\n\nexport type Contact = Omit<Vnd.Iris.Contact, 'identity'>;\n\nexport type MessageData = {\n type: string;\n content: Record<string, any> | string;\n};\n\nexport type MessagePayload = Record<string, any> | Array<any> | string;\n\nexport enum MessageState {\n INIT = 'INIT',\n DISPATCHED = 'DISPATCHED',\n SCHEDULED = 'SCHEDULED',\n QUEUED = 'QUEUED',\n FINAL = 'FINAL',\n}\n\nexport enum MessageStatus {\n INIT = 'INIT',\n PENDING = 'PENDING',\n SENDING = 'SENDING',\n DELIVERED = 'DELIVERED',\n READ = 'READ',\n REPLIED = 'REPLIED',\n FAILED = 'FAILED',\n CANCELED = 'CANCELED',\n}\n\nexport enum DispatchState {\n ACCEPTED = 'accepted',\n DISPATCHED = 'dispatched',\n RECEIVED = 'received',\n CONSUMED = 'consumed',\n FAILED = 'failed',\n}\n\nexport interface Message {\n messageId: string;\n contactId: string;\n descriptorId: string;\n\n payload: MessageData;\n status: MessageStatus;\n state: MessageState;\n\n attempts?: number;\n retries?: number;\n\n options?: MessageOptions; // Persisted options for scheduled/retried messages\n\n expiresAt?: string; // ISO 8601 datetime\n\n scheduledTo?: string; // ISO 8601 datetime\n sentAt?: string; // ISO 8601 datetime\n acceptedAt?: string; // ISO 8601 datetime - When message was accepted by gateway (SENDING status)\n lastDispatchAttemptAt?: string; // ISO 8601 datetime - When last dispatch attempt started\n createdAt: string; // ISO 8601 datetime\n deliveredAt?: string; // ISO 8601 datetime\n readAt?: string; // ISO 8601 datetime\n repliedAt?: string; // ISO 8601 datetime\n failedAt?: string; // ISO 8601 datetime\n\n error?: string;\n}\n\nexport interface Shift {\n days: number; // Bitmask: use Weekdays enum (e.g., Weekdays.MONDAY | Weekdays.FRIDAY) or manual (31=Mon-Fri)\n start: string; // HH:mm format (e.g., \"09:00\")\n end: string; // HH:mm format (e.g., \"18:00\")\n gmt?: string; // Timezone offset (default: \"-3\" for BRT)\n}\n\nexport enum Weekdays {\n MONDAY = 1,\n TUESDAY = 2,\n WEDNESDAY = 4,\n THURSDAY = 8,\n FRIDAY = 16,\n SATURDAY = 32,\n SUNDAY = 64,\n}\n\nexport interface Intent {\n intent: string;\n dueDate?: string;\n event?: string;\n payload?: any | null;\n expired?: {\n event?: string;\n intent?: string;\n };\n}\n\nexport type CallbackEvent =\n | 'dispatch' // Before message send process begins\n | 'sending' // MessageStatus.SENDING - message accepted by gateway\n | 'delivered' // MessageStatus.DELIVERED - message successfully delivered\n | 'failed' // MessageStatus.FAILED - message failed permanently\n | 'read' // MessageStatus.READ - message read by recipient\n | 'replied' // MessageStatus.REPLIED - recipient replied\n | 'scheduled' // MessageState.SCHEDULED - message scheduled\n | 'retry' // Retry attempt scheduled\n | 'evicted' // Message evicted from state machine due to TTL\n | 'canceled'; // Message canceled before send\n\nexport type ConnectionConfig = {\n contract: string; // Contract ID (without https:// prefix)\n key: string; // Bot authorization key\n};\n\nexport interface MessageOptions {\n shifts?: Array<Shift>; // Business hours constraints\n contact?: Contact;\n state?: {\n // Bot state to set after send\n stateId: string;\n botId: string;\n botIds?: Array<string>; // Bot IDs to reset before setting state\n };\n intent?: string | Intent; // Intent to trigger after send\n finalStatus?: 'DELIVERED' | 'READ' | 'REPLIED'; // Default: 'DELIVERED'\n}\n\nexport interface DispatchMessageOptions extends MessageOptions {\n schedule?: string; // ISO 8601 datetime to schedule send\n}\n\nexport interface DispatcherOptions {\n maxRetries?: number; // Default: 0\n retryIntervals?: number[]; // Default: [1000, 5000, 15000] (exponential backoff in ms)\n\n // Storage Duration (Redis TTL)\n retention?: number; // Default: 3600000 ms (1 hour) - Time to keep message in storage after creation/dispatch\n\n // State Constraints (Force transition to FAILED)\n timeouts?: {\n pending?: number; // Default: 10000 ms (10 seconds)\n sending?: number; // Default: 60000 ms (60 seconds)\n };\n\n batchSize?: number; // Default: 100 messages per polling cycle\n pollingIntervals?: {\n scheduled?: number; // Default: 5000 ms\n pending?: number; // Default: 5000 ms\n sending?: number; // Default: 10000 ms\n delivered?: number; // Default: 1800000 ms (30 minutes)\n read?: number; // Default: 3600000 ms (60 minutes)\n queue?: number; // Default: 100 ms\n };\n maxQueueSize?: number; // Maximum number of pending/scheduled messages. Oldest evicted if exceeded.\n rateLimits?: {\n global?: { points: number; duration: number }; // Global rate limit (requests per duration)\n message?: { points: number; duration: number }; // Message sending rate limit (requests per duration)\n };\n}\n\nexport interface QueryFilter {\n contactId?: string;\n descriptorId?: string;\n status?: MessageStatus | MessageStatus[];\n state?: MessageState | MessageState[];\n size?: number;\n skip?: number;\n}\n\nexport interface DispatcherMetrics {\n total: number;\n byState: {\n [key in MessageState]?: number;\n };\n byStatus: {\n [key in MessageStatus]?: number;\n };\n cumulative: {\n dispatched: number;\n delivered: number;\n failed: number;\n };\n}\n\n/**\n * @deprecated Use DispatcherOptions instead\n */\nexport type MessageDispatcherOptions = DispatcherOptions;\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,EAAA,iBAAAC,EAAA,kBAAAC,EAAA,aAAAC,IAAA,eAAAC,EAAAN,GAWO,IAAKG,OACVA,EAAA,KAAO,OACPA,EAAA,WAAa,aACbA,EAAA,UAAY,YACZA,EAAA,OAAS,SACTA,EAAA,MAAQ,QALEA,OAAA,IAQAC,OACVA,EAAA,KAAO,OACPA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,KAAO,OACPA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,SAAW,WARDA,OAAA,IAWAF,OACVA,EAAA,SAAW,WACXA,EAAA,WAAa,aACbA,EAAA,SAAW,WACXA,EAAA,SAAW,WACXA,EAAA,OAAS,SALCA,OAAA,IA4CAG,OACVA,IAAA,OAAS,GAAT,SACAA,IAAA,QAAU,GAAV,UACAA,IAAA,UAAY,GAAZ,YACAA,IAAA,SAAW,GAAX,WACAA,IAAA,OAAS,IAAT,SACAA,IAAA,SAAW,IAAX,WACAA,IAAA,OAAS,IAAT,SAPUA,OAAA","names":["types_exports","__export","DispatchState","MessageState","MessageStatus","Weekdays","__toCommonJS"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger utility using the 'debug' package.
|
|
3
|
+
*
|
|
4
|
+
* This module provides a configurable logger based on the 'debug' package.
|
|
5
|
+
* By default, all logging is disabled. To enable logging, set the DEBUG
|
|
6
|
+
* environment variable.
|
|
7
|
+
*
|
|
8
|
+
* The DEBUG variable can be a single namespace or a comma-separated list of
|
|
9
|
+
* namespaces. Wildcards are supported.
|
|
10
|
+
*
|
|
11
|
+
* For example:
|
|
12
|
+
* - `DEBUG=blip-api` enables all logs for the 'blip-api' scope.
|
|
13
|
+
* - `DEBUG=blip-api:*` enables all sub-scopes under 'blip-api'.
|
|
14
|
+
* - `DEBUG=*` enables all logs.
|
|
15
|
+
*
|
|
16
|
+
* The logger exposes different levels (debug, info, warn, error), which are
|
|
17
|
+
* different namespaces.
|
|
18
|
+
*
|
|
19
|
+
* Example usage:
|
|
20
|
+
* ```
|
|
21
|
+
* import { getLogger } from './logger';
|
|
22
|
+
*
|
|
23
|
+
* const logger = getLogger('my-feature');
|
|
24
|
+
*
|
|
25
|
+
* logger.info('This is an info message');
|
|
26
|
+
* logger.error('This is an error');
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* To see the output, run your application with:
|
|
30
|
+
* `DEBUG=my-feature:* node your-app.js`
|
|
31
|
+
*/
|
|
32
|
+
declare const LogLevels: {
|
|
33
|
+
debug: string;
|
|
34
|
+
info: string;
|
|
35
|
+
warn: string;
|
|
36
|
+
error: string;
|
|
37
|
+
};
|
|
38
|
+
type LogLevel = keyof typeof LogLevels;
|
|
39
|
+
type LogFunction = (...args: any[]) => void;
|
|
40
|
+
interface Logger {
|
|
41
|
+
debug: LogFunction;
|
|
42
|
+
info: LogFunction;
|
|
43
|
+
warn: LogFunction;
|
|
44
|
+
error: LogFunction;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Creates a logger with a specific scope.
|
|
48
|
+
*
|
|
49
|
+
* @param scope - The scope for the logger (e.g., 'blip-api', 'dispatcher').
|
|
50
|
+
* @returns A logger object with methods for each log level.
|
|
51
|
+
*/
|
|
52
|
+
declare function getLogger(scope: string): Logger;
|
|
53
|
+
/**
|
|
54
|
+
* Enables logging for a specific scope and level.
|
|
55
|
+
* This is a convenience function to programmatically enable logging,
|
|
56
|
+
* equivalent to setting the DEBUG environment variable.
|
|
57
|
+
*
|
|
58
|
+
* @param scope - The scope to enable (e.g., 'blip-api').
|
|
59
|
+
* @param level - The minimum log level to enable (e.g., 'info').
|
|
60
|
+
*/
|
|
61
|
+
declare function enableLogger(namespaces: string): void;
|
|
62
|
+
/**
|
|
63
|
+
* Disables all logging.
|
|
64
|
+
*/
|
|
65
|
+
declare function disableLogger(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Get all registered logger scopes.
|
|
68
|
+
*
|
|
69
|
+
* @returns An array of all registered scopes.
|
|
70
|
+
*/
|
|
71
|
+
declare function getAllScopes(): string[];
|
|
72
|
+
|
|
73
|
+
export { type LogLevel, LogLevels, type Logger, disableLogger, enableLogger, getAllScopes, getLogger };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var l=Object.create;var u=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var $=(n,e)=>{for(var o in e)u(n,o,{get:e[o],enumerable:!0})},a=(n,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of d(e))!y.call(n,r)&&r!==o&&u(n,r,{get:()=>e[r],enumerable:!(i=L(e,r))||i.enumerable});return n};var p=(n,e,o)=>(o=n!=null?l(b(n)):{},a(e||!n||!n.__esModule?u(o,"default",{value:n,enumerable:!0}):o,n)),w=n=>a(u({},"__esModule",{value:!0}),n);var A={};$(A,{LogLevels:()=>g,disableLogger:()=>m,enableLogger:()=>v,getAllScopes:()=>I,getLogger:()=>F});module.exports=w(A);var t=p(require("debug")),g={debug:"debug",info:"info",warn:"warn",error:"error"},s=new Map;function x(n){if(n==null)return n;if(typeof n=="object")try{return JSON.stringify(n,null,2)}catch{return n}return n}function c(n){return(...e)=>{let o=e.map(x);n(...o)}}function F(n){if(!s.has(n)){let e=(0,t.default)(`${n}:${g.debug}`),o=(0,t.default)(`${n}:${g.info}`),i=(0,t.default)(`${n}:${g.warn}`),r=(0,t.default)(`${n}:${g.error}`);r.log=console.error.bind(console);let f={debug:c(e),info:c(o),warn:c(i),error:c(r)};s.set(n,f)}return s.get(n)}function v(n){let e=t.default.disable();t.default.enable(`${e},${n}`)}function m(){t.default.disable()}function I(){return Array.from(s.keys())}0&&(module.exports={LogLevels,disableLogger,enableLogger,getAllScopes,getLogger});
|
|
2
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/logger.ts"],"sourcesContent":["/**\n * Logger utility using the 'debug' package.\n *\n * This module provides a configurable logger based on the 'debug' package.\n * By default, all logging is disabled. To enable logging, set the DEBUG\n * environment variable.\n *\n * The DEBUG variable can be a single namespace or a comma-separated list of\n * namespaces. Wildcards are supported.\n *\n * For example:\n * - `DEBUG=blip-api` enables all logs for the 'blip-api' scope.\n * - `DEBUG=blip-api:*` enables all sub-scopes under 'blip-api'.\n * - `DEBUG=*` enables all logs.\n *\n * The logger exposes different levels (debug, info, warn, error), which are\n * different namespaces.\n *\n * Example usage:\n * ```\n * import { getLogger } from './logger';\n *\n * const logger = getLogger('my-feature');\n *\n * logger.info('This is an info message');\n * logger.error('This is an error');\n * ```\n *\n * To see the output, run your application with:\n * `DEBUG=my-feature:* node your-app.js`\n */\n\nimport debug from 'debug';\n\n// Define the available log levels\nexport const LogLevels = {\n debug: 'debug',\n info: 'info',\n warn: 'warn',\n error: 'error',\n};\n\nexport type LogLevel = keyof typeof LogLevels;\n\ntype LogFunction = (...args: any[]) => void;\n\nexport interface Logger {\n debug: LogFunction;\n info: LogFunction;\n warn: LogFunction;\n error: LogFunction;\n}\n\nconst loggers = new Map<string, Logger>();\n\nfunction serializeArg(arg: any): any {\n if (arg === null || arg === undefined) return arg;\n if (typeof arg === 'object') {\n try {\n return JSON.stringify(arg, null, 2);\n } catch (e) {\n return arg;\n }\n }\n return arg;\n}\n\nfunction createLogFunction(debugInstance: debug.Debugger): LogFunction {\n return (...args: any[]) => {\n const serialized = args.map(serializeArg);\n (debugInstance as any)(...serialized);\n };\n}\n\n/**\n * Creates a logger with a specific scope.\n *\n * @param scope - The scope for the logger (e.g., 'blip-api', 'dispatcher').\n * @returns A logger object with methods for each log level.\n */\nexport function getLogger(scope: string): Logger {\n if (!loggers.has(scope)) {\n const debugInstance = debug(`${scope}:${LogLevels.debug}`);\n const infoInstance = debug(`${scope}:${LogLevels.info}`);\n const warnInstance = debug(`${scope}:${LogLevels.warn}`);\n const errorInstance = debug(`${scope}:${LogLevels.error}`);\n\n errorInstance.log = console.error.bind(console);\n\n const logger: Logger = {\n debug: createLogFunction(debugInstance),\n info: createLogFunction(infoInstance),\n warn: createLogFunction(warnInstance),\n error: createLogFunction(errorInstance),\n };\n\n loggers.set(scope, logger);\n }\n return loggers.get(scope)!;\n}\n\n/**\n * Enables logging for a specific scope and level.\n * This is a convenience function to programmatically enable logging,\n * equivalent to setting the DEBUG environment variable.\n *\n * @param scope - The scope to enable (e.g., 'blip-api').\n * @param level - The minimum log level to enable (e.g., 'info').\n */\nexport function enableLogger(namespaces: string): void {\n const currentDebug = debug.disable();\n debug.enable(`${currentDebug},${namespaces}`);\n}\n\n/**\n * Disables all logging.\n */\nexport function disableLogger(): void {\n debug.disable();\n}\n\n/**\n * Get all registered logger scopes.\n *\n * @returns An array of all registered scopes.\n */\nexport function getAllScopes(): string[] {\n return Array.from(loggers.keys());\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,iBAAAC,EAAA,cAAAC,IAAA,eAAAC,EAAAP,GAgCA,IAAAQ,EAAkB,oBAGLN,EAAY,CACvB,MAAO,QACP,KAAM,OACN,KAAM,OACN,MAAO,OACT,EAaMO,EAAU,IAAI,IAEpB,SAASC,EAAaC,EAAe,CACnC,GAAIA,GAAQ,KAA2B,OAAOA,EAC9C,GAAI,OAAOA,GAAQ,SACjB,GAAI,CACF,OAAO,KAAK,UAAUA,EAAK,KAAM,CAAC,CACpC,MAAY,CACV,OAAOA,CACT,CAEF,OAAOA,CACT,CAEA,SAASC,EAAkBC,EAA4C,CACrE,MAAO,IAAIC,IAAgB,CACzB,IAAMC,EAAaD,EAAK,IAAIJ,CAAY,EACvCG,EAAsB,GAAGE,CAAU,CACtC,CACF,CAQO,SAAST,EAAUU,EAAuB,CAC/C,GAAI,CAACP,EAAQ,IAAIO,CAAK,EAAG,CACvB,IAAMH,KAAgB,EAAAI,SAAM,GAAGD,CAAK,IAAId,EAAU,KAAK,EAAE,EACnDgB,KAAe,EAAAD,SAAM,GAAGD,CAAK,IAAId,EAAU,IAAI,EAAE,EACjDiB,KAAe,EAAAF,SAAM,GAAGD,CAAK,IAAId,EAAU,IAAI,EAAE,EACjDkB,KAAgB,EAAAH,SAAM,GAAGD,CAAK,IAAId,EAAU,KAAK,EAAE,EAEzDkB,EAAc,IAAM,QAAQ,MAAM,KAAK,OAAO,EAE9C,IAAMC,EAAiB,CACrB,MAAOT,EAAkBC,CAAa,EACtC,KAAMD,EAAkBM,CAAY,EACpC,KAAMN,EAAkBO,CAAY,EACpC,MAAOP,EAAkBQ,CAAa,CACxC,EAEAX,EAAQ,IAAIO,EAAOK,CAAM,CAC3B,CACA,OAAOZ,EAAQ,IAAIO,CAAK,CAC1B,CAUO,SAASZ,EAAakB,EAA0B,CACrD,IAAMC,EAAe,EAAAN,QAAM,QAAQ,EACnC,EAAAA,QAAM,OAAO,GAAGM,CAAY,IAAID,CAAU,EAAE,CAC9C,CAKO,SAASnB,GAAsB,CACpC,EAAAc,QAAM,QAAQ,CAChB,CAOO,SAASZ,GAAyB,CACvC,OAAO,MAAM,KAAKI,EAAQ,KAAK,CAAC,CAClC","names":["logger_exports","__export","LogLevels","disableLogger","enableLogger","getAllScopes","getLogger","__toCommonJS","import_debug","loggers","serializeArg","arg","createLogFunction","debugInstance","args","serialized","scope","debug","infoInstance","warnInstance","errorInstance","logger","namespaces","currentDebug"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** @type {import('jest').Config} */
|
|
2
|
+
export default {
|
|
3
|
+
preset: 'ts-jest/presets/default-esm',
|
|
4
|
+
testEnvironment: 'node',
|
|
5
|
+
extensionsToTreatAsEsm: ['.ts'],
|
|
6
|
+
moduleNameMapper: {
|
|
7
|
+
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
8
|
+
},
|
|
9
|
+
transform: {
|
|
10
|
+
'^.+\\.tsx?$': [
|
|
11
|
+
'ts-jest',
|
|
12
|
+
{
|
|
13
|
+
useESM: true,
|
|
14
|
+
tsconfig: 'tsconfig.test.json',
|
|
15
|
+
diagnostics: false,
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
'^.+\\.js$': [
|
|
19
|
+
'ts-jest',
|
|
20
|
+
{
|
|
21
|
+
useESM: true,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
testMatch: [
|
|
26
|
+
'**/tests/**/*.ts',
|
|
27
|
+
],
|
|
28
|
+
collectCoverageFrom: [
|
|
29
|
+
'src/**/*.ts',
|
|
30
|
+
'!src/index.ts',
|
|
31
|
+
'!src/types/**',
|
|
32
|
+
],
|
|
33
|
+
coverageThreshold: {
|
|
34
|
+
global: {
|
|
35
|
+
branches: 70,
|
|
36
|
+
functions: 70,
|
|
37
|
+
lines: 70,
|
|
38
|
+
statements: 70,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
testTimeout: 10000,
|
|
42
|
+
clearMocks: true,
|
|
43
|
+
resetMocks: true,
|
|
44
|
+
restoreMocks: true,
|
|
45
|
+
transformIgnorePatterns: [
|
|
46
|
+
'node_modules/(?!uuid)',
|
|
47
|
+
],
|
|
48
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dawntech/dispatcher",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A TypeScript Node.js package for sending push messages in conversational chatbots on the Blip platform.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"@types/body-parser": "^1.19.6",
|
|
10
|
+
"@types/cors": "^2.8.19",
|
|
11
|
+
"@types/debug": "^4.1.12",
|
|
12
|
+
"@types/express": "^5.0.6",
|
|
13
|
+
"@types/ioredis": "^4.28.10",
|
|
14
|
+
"@types/jest": "^29.5.14",
|
|
15
|
+
"@types/lodash": "^4.17.20",
|
|
16
|
+
"@types/node": "^20.19.24",
|
|
17
|
+
"husky": "^9.1.7",
|
|
18
|
+
"jest": "^29.7.0",
|
|
19
|
+
"lint-staged": "^16.2.6",
|
|
20
|
+
"prettier": "^3.6.2",
|
|
21
|
+
"ts-jest": "^29.2.5",
|
|
22
|
+
"tsup": "^8.5.1",
|
|
23
|
+
"tsx": "^4.7.0",
|
|
24
|
+
"typescript": "^5.3.0"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [],
|
|
27
|
+
"author": "",
|
|
28
|
+
"license": "ISC",
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=24.0.0"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"axios": "^1.13.1",
|
|
34
|
+
"body-parser": "^2.2.2",
|
|
35
|
+
"bullmq": "^5.67.1",
|
|
36
|
+
"cors": "^2.8.6",
|
|
37
|
+
"debug": "^4.4.3",
|
|
38
|
+
"dotenv": "^17.2.3",
|
|
39
|
+
"express": "^5.2.1",
|
|
40
|
+
"ioredis": "^5.9.2",
|
|
41
|
+
"lodash": "^4.17.21",
|
|
42
|
+
"rate-limiter-flexible": "^9.0.1",
|
|
43
|
+
"redis": "^5.9.0",
|
|
44
|
+
"uuid": "^13.0.0"
|
|
45
|
+
},
|
|
46
|
+
"lint-staged": {
|
|
47
|
+
"*.ts": "prettier --write"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"start": "node dist/index.js",
|
|
51
|
+
"build": "tsup",
|
|
52
|
+
"build:watch": "tsup --watch",
|
|
53
|
+
"dev": "tsx watch src/server.ts",
|
|
54
|
+
"test:basic": "tsx tests/integration/scenarios/1-basic-send.ts",
|
|
55
|
+
"test:contact": "tsx tests/integration/scenarios/2-contact-update.ts",
|
|
56
|
+
"test:schedule": "tsx tests/integration/scenarios/3-scheduling.ts",
|
|
57
|
+
"test:status": "tsx tests/integration/scenarios/4-status-config.ts",
|
|
58
|
+
"test:intent": "tsx tests/integration/scenarios/5-intent.ts",
|
|
59
|
+
"test:rate-limit": "tsx tests/integration/scenarios/6-rate-limiting.ts",
|
|
60
|
+
"test:high-load": "tsx tests/integration/scenarios/7-high-load.ts",
|
|
61
|
+
"test:retries": "tsx tests/integration/scenarios/8-retries.ts",
|
|
62
|
+
"test:expiry": "tsx tests/integration/scenarios/9-expiration.ts",
|
|
63
|
+
"test:cluster": "tsx tests/integration/scenarios/10-cluster.ts",
|
|
64
|
+
"test:monitor": "tsx tests/integration/scenarios/11-monitor.ts",
|
|
65
|
+
"test": "jest",
|
|
66
|
+
"test:watch": "jest --watch",
|
|
67
|
+
"test:coverage": "jest --coverage",
|
|
68
|
+
"test:blip-api": "tsx tests/blip-api.ts",
|
|
69
|
+
"clean": "rm -rf dist",
|
|
70
|
+
"setup": "bash scripts/setup.sh",
|
|
71
|
+
"docker:up": "docker-compose up -d",
|
|
72
|
+
"docker:down": "docker-compose down",
|
|
73
|
+
"docker:logs": "docker-compose logs -f",
|
|
74
|
+
"docker:redis-cli": "docker-compose exec redis redis-cli",
|
|
75
|
+
"docker:clean": "docker-compose down -v",
|
|
76
|
+
"docker:restart": "docker-compose restart",
|
|
77
|
+
"docker:tools": "docker-compose --profile tools up -d",
|
|
78
|
+
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
|
|
79
|
+
"format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\""
|
|
80
|
+
}
|
|
81
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["ES2020"],
|
|
6
|
+
"types": ["node", "jest"],
|
|
7
|
+
"outDir": "./dist",
|
|
8
|
+
"rootDir": "./src",
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"declarationMap": true,
|
|
11
|
+
"declarationDir": "./types",
|
|
12
|
+
"sourceMap": true,
|
|
13
|
+
"strict": true,
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"forceConsistentCasingInFileNames": true,
|
|
17
|
+
"moduleResolution": "node",
|
|
18
|
+
"resolveJsonModule": true
|
|
19
|
+
},
|
|
20
|
+
"include": ["src/**/*"],
|
|
21
|
+
"exclude": ["node_modules", "dist", "examples", "tests"]
|
|
22
|
+
}
|
package/tsup.config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blip.d.ts","sourceRoot":"","sources":["../../src/core/Blip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAK/D,qBAAa,IAAI;IACf,OAAO,CAAC,MAAM,CAAgB;IAE9B;;;;;OAKG;gBACS,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,MAAc;IA+BlE;;OAEG;YACW,WAAW;IA+BzB;;OAEG;YACW,WAAW;IAiBzB;;;;OAIG;IACG,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG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