redai-automation-web-sdk 1.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.
Files changed (190) hide show
  1. package/README.md +715 -0
  2. package/dist/client/AutomationWebClient.d.ts +188 -0
  3. package/dist/client/AutomationWebClient.d.ts.map +1 -0
  4. package/dist/client/AutomationWebClient.js +370 -0
  5. package/dist/client/AutomationWebClient.js.map +1 -0
  6. package/dist/client/index.d.ts +5 -0
  7. package/dist/client/index.d.ts.map +1 -0
  8. package/dist/client/index.js +21 -0
  9. package/dist/client/index.js.map +1 -0
  10. package/dist/index.d.ts +20 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +86 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/services/auth/auth.service.d.ts +78 -0
  15. package/dist/services/auth/auth.service.d.ts.map +1 -0
  16. package/dist/services/auth/auth.service.js +227 -0
  17. package/dist/services/auth/auth.service.js.map +1 -0
  18. package/dist/services/auth/index.d.ts +5 -0
  19. package/dist/services/auth/index.d.ts.map +1 -0
  20. package/dist/services/auth/index.js +21 -0
  21. package/dist/services/auth/index.js.map +1 -0
  22. package/dist/services/bulk/bulk.service.d.ts +201 -0
  23. package/dist/services/bulk/bulk.service.d.ts.map +1 -0
  24. package/dist/services/bulk/bulk.service.js +114 -0
  25. package/dist/services/bulk/bulk.service.js.map +1 -0
  26. package/dist/services/bulk/index.d.ts +5 -0
  27. package/dist/services/bulk/index.d.ts.map +1 -0
  28. package/dist/services/bulk/index.js +21 -0
  29. package/dist/services/bulk/index.js.map +1 -0
  30. package/dist/services/conversations/conversations.service.d.ts +187 -0
  31. package/dist/services/conversations/conversations.service.d.ts.map +1 -0
  32. package/dist/services/conversations/conversations.service.js +119 -0
  33. package/dist/services/conversations/conversations.service.js.map +1 -0
  34. package/dist/services/conversations/index.d.ts +6 -0
  35. package/dist/services/conversations/index.d.ts.map +1 -0
  36. package/dist/services/conversations/index.js +13 -0
  37. package/dist/services/conversations/index.js.map +1 -0
  38. package/dist/services/friends/friends.service.d.ts +499 -0
  39. package/dist/services/friends/friends.service.d.ts.map +1 -0
  40. package/dist/services/friends/friends.service.js +288 -0
  41. package/dist/services/friends/friends.service.js.map +1 -0
  42. package/dist/services/friends/index.d.ts +6 -0
  43. package/dist/services/friends/index.d.ts.map +1 -0
  44. package/dist/services/friends/index.js +10 -0
  45. package/dist/services/friends/index.js.map +1 -0
  46. package/dist/services/groups/groups.service.d.ts +366 -0
  47. package/dist/services/groups/groups.service.d.ts.map +1 -0
  48. package/dist/services/groups/groups.service.js +250 -0
  49. package/dist/services/groups/groups.service.js.map +1 -0
  50. package/dist/services/groups/index.d.ts +6 -0
  51. package/dist/services/groups/index.d.ts.map +1 -0
  52. package/dist/services/groups/index.js +10 -0
  53. package/dist/services/groups/index.js.map +1 -0
  54. package/dist/services/messaging/index.d.ts +6 -0
  55. package/dist/services/messaging/index.d.ts.map +1 -0
  56. package/dist/services/messaging/index.js +10 -0
  57. package/dist/services/messaging/index.js.map +1 -0
  58. package/dist/services/messaging/messaging.service.d.ts +186 -0
  59. package/dist/services/messaging/messaging.service.d.ts.map +1 -0
  60. package/dist/services/messaging/messaging.service.js +212 -0
  61. package/dist/services/messaging/messaging.service.js.map +1 -0
  62. package/dist/services/user-info/index.d.ts +6 -0
  63. package/dist/services/user-info/index.d.ts.map +1 -0
  64. package/dist/services/user-info/index.js +10 -0
  65. package/dist/services/user-info/index.js.map +1 -0
  66. package/dist/services/user-info/user-info.service.d.ts +168 -0
  67. package/dist/services/user-info/user-info.service.d.ts.map +1 -0
  68. package/dist/services/user-info/user-info.service.js +85 -0
  69. package/dist/services/user-info/user-info.service.js.map +1 -0
  70. package/dist/services/webhook/index.d.ts +6 -0
  71. package/dist/services/webhook/index.d.ts.map +1 -0
  72. package/dist/services/webhook/index.js +10 -0
  73. package/dist/services/webhook/index.js.map +1 -0
  74. package/dist/services/webhook/webhook.service.d.ts +303 -0
  75. package/dist/services/webhook/webhook.service.d.ts.map +1 -0
  76. package/dist/services/webhook/webhook.service.js +133 -0
  77. package/dist/services/webhook/webhook.service.js.map +1 -0
  78. package/dist/types/auth.types.d.ts +384 -0
  79. package/dist/types/auth.types.d.ts.map +1 -0
  80. package/dist/types/auth.types.js +28 -0
  81. package/dist/types/auth.types.js.map +1 -0
  82. package/dist/types/bulk.types.d.ts +553 -0
  83. package/dist/types/bulk.types.d.ts.map +1 -0
  84. package/dist/types/bulk.types.js +31 -0
  85. package/dist/types/bulk.types.js.map +1 -0
  86. package/dist/types/common.types.d.ts +301 -0
  87. package/dist/types/common.types.d.ts.map +1 -0
  88. package/dist/types/common.types.js +58 -0
  89. package/dist/types/common.types.js.map +1 -0
  90. package/dist/types/friends.types.d.ts +566 -0
  91. package/dist/types/friends.types.d.ts.map +1 -0
  92. package/dist/types/friends.types.js +39 -0
  93. package/dist/types/friends.types.js.map +1 -0
  94. package/dist/types/index.d.ts +12 -0
  95. package/dist/types/index.d.ts.map +1 -0
  96. package/dist/types/index.js +38 -0
  97. package/dist/types/index.js.map +1 -0
  98. package/dist/types/job/event-job.types.d.ts +147 -0
  99. package/dist/types/job/event-job.types.d.ts.map +1 -0
  100. package/dist/types/job/event-job.types.js +7 -0
  101. package/dist/types/job/event-job.types.js.map +1 -0
  102. package/dist/types/job/friend-group-job.types.d.ts +183 -0
  103. package/dist/types/job/friend-group-job.types.d.ts.map +1 -0
  104. package/dist/types/job/friend-group-job.types.js +7 -0
  105. package/dist/types/job/friend-group-job.types.js.map +1 -0
  106. package/dist/types/job/index.d.ts +88 -0
  107. package/dist/types/job/index.d.ts.map +1 -0
  108. package/dist/types/job/index.js +260 -0
  109. package/dist/types/job/index.js.map +1 -0
  110. package/dist/types/job/message-job.types.d.ts +181 -0
  111. package/dist/types/job/message-job.types.d.ts.map +1 -0
  112. package/dist/types/job/message-job.types.js +7 -0
  113. package/dist/types/job/message-job.types.js.map +1 -0
  114. package/dist/types/job/system-job.types.d.ts +235 -0
  115. package/dist/types/job/system-job.types.d.ts.map +1 -0
  116. package/dist/types/job/system-job.types.js +7 -0
  117. package/dist/types/job/system-job.types.js.map +1 -0
  118. package/dist/types/job/webhook-job.types.d.ts +219 -0
  119. package/dist/types/job/webhook-job.types.d.ts.map +1 -0
  120. package/dist/types/job/webhook-job.types.js +202 -0
  121. package/dist/types/job/webhook-job.types.js.map +1 -0
  122. package/dist/types/messaging.types.d.ts +565 -0
  123. package/dist/types/messaging.types.d.ts.map +1 -0
  124. package/dist/types/messaging.types.js +34 -0
  125. package/dist/types/messaging.types.js.map +1 -0
  126. package/dist/types/webhook/delivered-message.d.ts +47 -0
  127. package/dist/types/webhook/delivered-message.d.ts.map +1 -0
  128. package/dist/types/webhook/delivered-message.js +34 -0
  129. package/dist/types/webhook/delivered-message.js.map +1 -0
  130. package/dist/types/webhook/enums.d.ts +149 -0
  131. package/dist/types/webhook/enums.d.ts.map +1 -0
  132. package/dist/types/webhook/enums.js +160 -0
  133. package/dist/types/webhook/enums.js.map +1 -0
  134. package/dist/types/webhook/friend-event.d.ts +134 -0
  135. package/dist/types/webhook/friend-event.d.ts.map +1 -0
  136. package/dist/types/webhook/friend-event.js +79 -0
  137. package/dist/types/webhook/friend-event.js.map +1 -0
  138. package/dist/types/webhook/group-event.d.ts +223 -0
  139. package/dist/types/webhook/group-event.d.ts.map +1 -0
  140. package/dist/types/webhook/group-event.js +69 -0
  141. package/dist/types/webhook/group-event.js.map +1 -0
  142. package/dist/types/webhook/index.d.ts +25 -0
  143. package/dist/types/webhook/index.d.ts.map +1 -0
  144. package/dist/types/webhook/index.js +46 -0
  145. package/dist/types/webhook/index.js.map +1 -0
  146. package/dist/types/webhook/message.d.ts +123 -0
  147. package/dist/types/webhook/message.d.ts.map +1 -0
  148. package/dist/types/webhook/message.js +39 -0
  149. package/dist/types/webhook/message.js.map +1 -0
  150. package/dist/types/webhook/reaction.d.ts +40 -0
  151. package/dist/types/webhook/reaction.d.ts.map +1 -0
  152. package/dist/types/webhook/reaction.js +24 -0
  153. package/dist/types/webhook/reaction.js.map +1 -0
  154. package/dist/types/webhook/seen-message.d.ts +46 -0
  155. package/dist/types/webhook/seen-message.d.ts.map +1 -0
  156. package/dist/types/webhook/seen-message.js +34 -0
  157. package/dist/types/webhook/seen-message.js.map +1 -0
  158. package/dist/types/webhook/typing.d.ts +44 -0
  159. package/dist/types/webhook/typing.d.ts.map +1 -0
  160. package/dist/types/webhook/typing.js +35 -0
  161. package/dist/types/webhook/typing.js.map +1 -0
  162. package/dist/types/webhook/undo.d.ts +48 -0
  163. package/dist/types/webhook/undo.d.ts.map +1 -0
  164. package/dist/types/webhook/undo.js +24 -0
  165. package/dist/types/webhook/undo.js.map +1 -0
  166. package/dist/types/webhook.types.d.ts +451 -0
  167. package/dist/types/webhook.types.d.ts.map +1 -0
  168. package/dist/types/webhook.types.js +223 -0
  169. package/dist/types/webhook.types.js.map +1 -0
  170. package/dist/utils/event.utils.d.ts +119 -0
  171. package/dist/utils/event.utils.d.ts.map +1 -0
  172. package/dist/utils/event.utils.js +306 -0
  173. package/dist/utils/event.utils.js.map +1 -0
  174. package/dist/utils/format.utils.d.ts +128 -0
  175. package/dist/utils/format.utils.d.ts.map +1 -0
  176. package/dist/utils/format.utils.js +312 -0
  177. package/dist/utils/format.utils.js.map +1 -0
  178. package/dist/utils/http.utils.d.ts +111 -0
  179. package/dist/utils/http.utils.d.ts.map +1 -0
  180. package/dist/utils/http.utils.js +336 -0
  181. package/dist/utils/http.utils.js.map +1 -0
  182. package/dist/utils/index.d.ts +8 -0
  183. package/dist/utils/index.d.ts.map +1 -0
  184. package/dist/utils/index.js +24 -0
  185. package/dist/utils/index.js.map +1 -0
  186. package/dist/utils/validation.utils.d.ts +118 -0
  187. package/dist/utils/validation.utils.d.ts.map +1 -0
  188. package/dist/utils/validation.utils.js +326 -0
  189. package/dist/utils/validation.utils.js.map +1 -0
  190. package/package.json +88 -0
@@ -0,0 +1,235 @@
1
+ /**
2
+ * System Event Job Types
3
+ * 100% khớp với automation-web system event jobs
4
+ */
5
+ import { BaseZaloWebhookEvent, ZaloWebhookEventType, ZaloConnectionStatus, BaseQueueJob } from './webhook-job.types';
6
+ /**
7
+ * Connection Status Event Data
8
+ */
9
+ export interface ZaloConnectionStatusData {
10
+ status: ZaloConnectionStatus;
11
+ previousStatus?: ZaloConnectionStatus;
12
+ timestamp: number;
13
+ reason?: string;
14
+ reconnectAttempts?: number;
15
+ lastConnectedAt?: number;
16
+ metadata?: Record<string, any>;
17
+ }
18
+ /**
19
+ * Connection status event interfaces - 4 variants
20
+ */
21
+ export interface ZaloConnectionStatusConnectedEvent extends BaseZaloWebhookEvent {
22
+ eventType: ZaloWebhookEventType.CONNECTION_STATUS_CONNECTED;
23
+ data: ZaloConnectionStatusData & {
24
+ status: ZaloConnectionStatus.CONNECTED;
25
+ };
26
+ }
27
+ export interface ZaloConnectionStatusDisconnectedEvent extends BaseZaloWebhookEvent {
28
+ eventType: ZaloWebhookEventType.CONNECTION_STATUS_DISCONNECTED;
29
+ data: ZaloConnectionStatusData & {
30
+ status: ZaloConnectionStatus.DISCONNECTED;
31
+ };
32
+ }
33
+ export interface ZaloConnectionStatusReconnectingEvent extends BaseZaloWebhookEvent {
34
+ eventType: ZaloWebhookEventType.CONNECTION_STATUS_RECONNECTING;
35
+ data: ZaloConnectionStatusData & {
36
+ status: ZaloConnectionStatus.RECONNECTING;
37
+ };
38
+ }
39
+ export interface ZaloConnectionStatusLoggedOutEvent extends BaseZaloWebhookEvent {
40
+ eventType: ZaloWebhookEventType.CONNECTION_STATUS_LOGGED_OUT;
41
+ data: ZaloConnectionStatusData & {
42
+ status: ZaloConnectionStatus.LOGGED_OUT;
43
+ };
44
+ }
45
+ /**
46
+ * Union type for all connection status events
47
+ */
48
+ export type ZaloConnectionStatusEvent = ZaloConnectionStatusConnectedEvent | ZaloConnectionStatusDisconnectedEvent | ZaloConnectionStatusReconnectingEvent | ZaloConnectionStatusLoggedOutEvent;
49
+ /**
50
+ * Upload Attachment Event Data
51
+ */
52
+ export interface ZaloUploadAttachmentData {
53
+ attachmentId: string;
54
+ fileName: string;
55
+ fileSize: number;
56
+ fileType: string;
57
+ uploadUrl?: string;
58
+ downloadUrl?: string;
59
+ progress?: number;
60
+ error?: string;
61
+ timestamp: number;
62
+ metadata?: Record<string, any>;
63
+ }
64
+ /**
65
+ * Upload attachment event interfaces - 3 variants
66
+ */
67
+ export interface ZaloUploadAttachmentInProgressEvent extends BaseZaloWebhookEvent {
68
+ eventType: ZaloWebhookEventType.UPLOAD_ATTACHMENT_IN_PROGRESS;
69
+ data: ZaloUploadAttachmentData & {
70
+ progress: number;
71
+ };
72
+ }
73
+ export interface ZaloUploadAttachmentCompletedEvent extends BaseZaloWebhookEvent {
74
+ eventType: ZaloWebhookEventType.UPLOAD_ATTACHMENT_COMPLETED;
75
+ data: ZaloUploadAttachmentData & {
76
+ downloadUrl: string;
77
+ progress: 100;
78
+ };
79
+ }
80
+ export interface ZaloUploadAttachmentFailedEvent extends BaseZaloWebhookEvent {
81
+ eventType: ZaloWebhookEventType.UPLOAD_ATTACHMENT_FAILED;
82
+ data: ZaloUploadAttachmentData & {
83
+ error: string;
84
+ };
85
+ }
86
+ /**
87
+ * Union type for all upload attachment events
88
+ */
89
+ export type ZaloUploadAttachmentEvent = ZaloUploadAttachmentInProgressEvent | ZaloUploadAttachmentCompletedEvent | ZaloUploadAttachmentFailedEvent;
90
+ /**
91
+ * Cipher Key Event Data
92
+ */
93
+ export interface ZaloCipherKeyData {
94
+ threadId: string;
95
+ keyId: string;
96
+ keyVersion: number;
97
+ algorithm: string;
98
+ expiresAt?: number;
99
+ timestamp: number;
100
+ metadata?: Record<string, any>;
101
+ }
102
+ /**
103
+ * Cipher key event interfaces - 4 variants
104
+ */
105
+ export interface ZaloCipherKeyUpdatedInUserEvent extends BaseZaloWebhookEvent {
106
+ eventType: ZaloWebhookEventType.CIPHER_KEY_UPDATED_IN_USER;
107
+ data: ZaloCipherKeyData;
108
+ }
109
+ export interface ZaloCipherKeyUpdatedInGroupEvent extends BaseZaloWebhookEvent {
110
+ eventType: ZaloWebhookEventType.CIPHER_KEY_UPDATED_IN_GROUP;
111
+ data: ZaloCipherKeyData;
112
+ }
113
+ export interface ZaloCipherKeyExpiredInUserEvent extends BaseZaloWebhookEvent {
114
+ eventType: ZaloWebhookEventType.CIPHER_KEY_EXPIRED_IN_USER;
115
+ data: ZaloCipherKeyData;
116
+ }
117
+ export interface ZaloCipherKeyExpiredInGroupEvent extends BaseZaloWebhookEvent {
118
+ eventType: ZaloWebhookEventType.CIPHER_KEY_EXPIRED_IN_GROUP;
119
+ data: ZaloCipherKeyData;
120
+ }
121
+ /**
122
+ * Union type for all cipher key events
123
+ */
124
+ export type ZaloCipherKeyEvent = ZaloCipherKeyUpdatedInUserEvent | ZaloCipherKeyUpdatedInGroupEvent | ZaloCipherKeyExpiredInUserEvent | ZaloCipherKeyExpiredInGroupEvent;
125
+ /**
126
+ * Error Event Data
127
+ */
128
+ export interface ZaloErrorData {
129
+ errorCode: string;
130
+ errorMessage: string;
131
+ errorStack?: string;
132
+ context?: Record<string, any>;
133
+ timestamp: number;
134
+ severity: 'low' | 'medium' | 'high' | 'critical';
135
+ recoverable: boolean;
136
+ metadata?: Record<string, any>;
137
+ }
138
+ /**
139
+ * Error event interfaces - 6 variants
140
+ */
141
+ export interface ZaloErrorSystemEvent extends BaseZaloWebhookEvent {
142
+ eventType: ZaloWebhookEventType.ERROR_SYSTEM;
143
+ data: ZaloErrorData;
144
+ }
145
+ export interface ZaloErrorNetworkEvent extends BaseZaloWebhookEvent {
146
+ eventType: ZaloWebhookEventType.ERROR_NETWORK;
147
+ data: ZaloErrorData;
148
+ }
149
+ export interface ZaloErrorAuthenticationEvent extends BaseZaloWebhookEvent {
150
+ eventType: ZaloWebhookEventType.ERROR_AUTHENTICATION;
151
+ data: ZaloErrorData;
152
+ }
153
+ export interface ZaloErrorValidationEvent extends BaseZaloWebhookEvent {
154
+ eventType: ZaloWebhookEventType.ERROR_VALIDATION;
155
+ data: ZaloErrorData;
156
+ }
157
+ export interface ZaloErrorBusinessLogicEvent extends BaseZaloWebhookEvent {
158
+ eventType: ZaloWebhookEventType.ERROR_BUSINESS_LOGIC;
159
+ data: ZaloErrorData;
160
+ }
161
+ export interface ZaloErrorUnknownEvent extends BaseZaloWebhookEvent {
162
+ eventType: ZaloWebhookEventType.ERROR_UNKNOWN;
163
+ data: ZaloErrorData;
164
+ }
165
+ /**
166
+ * Union type for all error events
167
+ */
168
+ export type ZaloErrorEvent = ZaloErrorSystemEvent | ZaloErrorNetworkEvent | ZaloErrorAuthenticationEvent | ZaloErrorValidationEvent | ZaloErrorBusinessLogicEvent | ZaloErrorUnknownEvent;
169
+ /**
170
+ * Old Messages Event Data
171
+ */
172
+ export interface ZaloOldMessagesData {
173
+ threadId: string;
174
+ messages: Array<{
175
+ messageId: string;
176
+ content: string;
177
+ timestamp: number;
178
+ fromId: string;
179
+ fromName: string;
180
+ }>;
181
+ totalCount: number;
182
+ hasMore: boolean;
183
+ timestamp: number;
184
+ }
185
+ /**
186
+ * Old messages event interface
187
+ */
188
+ export interface ZaloOldMessagesEvent extends BaseZaloWebhookEvent {
189
+ eventType: ZaloWebhookEventType.OLD_MESSAGES;
190
+ data: ZaloOldMessagesData;
191
+ }
192
+ /**
193
+ * Union type for all system events
194
+ */
195
+ export type ZaloSystemEvent = ZaloConnectionStatusEvent | ZaloUploadAttachmentEvent | ZaloCipherKeyEvent | ZaloErrorEvent | ZaloOldMessagesEvent;
196
+ /**
197
+ * Connection Status Queue Job
198
+ */
199
+ export interface ConnectionStatusQueueJob extends BaseQueueJob<ZaloConnectionStatusEvent> {
200
+ name: 'connection-status-event';
201
+ data: ZaloConnectionStatusEvent;
202
+ }
203
+ /**
204
+ * Upload Attachment Queue Job
205
+ */
206
+ export interface UploadAttachmentQueueJob extends BaseQueueJob<ZaloUploadAttachmentEvent> {
207
+ name: 'upload-attachment-event';
208
+ data: ZaloUploadAttachmentEvent;
209
+ }
210
+ /**
211
+ * Cipher Key Queue Job
212
+ */
213
+ export interface CipherKeyQueueJob extends BaseQueueJob<ZaloCipherKeyEvent> {
214
+ name: 'cipher-key-event';
215
+ data: ZaloCipherKeyEvent;
216
+ }
217
+ /**
218
+ * Error Queue Job
219
+ */
220
+ export interface ErrorQueueJob extends BaseQueueJob<ZaloErrorEvent> {
221
+ name: 'error-event';
222
+ data: ZaloErrorEvent;
223
+ }
224
+ /**
225
+ * Old Messages Queue Job
226
+ */
227
+ export interface OldMessagesQueueJob extends BaseQueueJob<ZaloOldMessagesEvent> {
228
+ name: 'old-messages-event';
229
+ data: ZaloOldMessagesEvent;
230
+ }
231
+ /**
232
+ * Union type for all system queue jobs
233
+ */
234
+ export type SystemQueueJobUnion = ConnectionStatusQueueJob | UploadAttachmentQueueJob | CipherKeyQueueJob | ErrorQueueJob | OldMessagesQueueJob;
235
+ //# sourceMappingURL=system-job.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-job.types.d.ts","sourceRoot":"","sources":["../../../src/types/job/system-job.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIrH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,kCAAmC,SAAQ,oBAAoB;IAC9E,SAAS,EAAE,oBAAoB,CAAC,2BAA2B,CAAC;IAC5D,IAAI,EAAE,wBAAwB,GAAG;QAC/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AAY,CAAC,kBAAkB,CAAC;IACzE,IAAI,EAAE,kBAAkB,CAAC;IACzB,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,YAAY,CAAC,cAAc,CAAC;IACjE,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,oBAAoB,CAAC;IAC7E,IAAI,EAAE,oBAAoB,CAAC;IAC3B,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,wBAAwB,GACxB,wBAAwB,GACxB,iBAAiB,GACjB,aAAa,GACb,mBAAmB,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * System Event Job Types
4
+ * 100% khớp với automation-web system event jobs
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ //# sourceMappingURL=system-job.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-job.types.js","sourceRoot":"","sources":["../../../src/types/job/system-job.types.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
@@ -0,0 +1,219 @@
1
+ /**
2
+ * Webhook Job Types
3
+ * 100% khớp với automation-web/src/shared/types/zalo-webhook-events.types.ts
4
+ * Cấu trúc job khi đưa vào queue
5
+ */
6
+ /**
7
+ * Thread Type enum
8
+ */
9
+ export declare enum ZaloThreadType {
10
+ USER = "user",
11
+ GROUP = "group"
12
+ }
13
+ /**
14
+ * Connection Status enum
15
+ */
16
+ export declare enum ZaloConnectionStatus {
17
+ CONNECTED = "connected",
18
+ DISCONNECTED = "disconnected",
19
+ RECONNECTING = "reconnecting",
20
+ LOGGED_OUT = "logged_out"
21
+ }
22
+ /**
23
+ * Event Type enum - Chuẩn hóa tất cả event types
24
+ */
25
+ export declare enum ZaloWebhookEventType {
26
+ TEXT_MESSAGE_SENT_TO_USER = "text-message-sent-to-user",
27
+ TEXT_MESSAGE_SENT_TO_GROUP = "text-message-sent-to-group",
28
+ TEXT_MESSAGE_RECEIVED_FROM_USER = "text-message-received-from-user",
29
+ TEXT_MESSAGE_RECEIVED_FROM_GROUP = "text-message-received-from-group",
30
+ IMAGE_MESSAGE_SENT_TO_USER = "image-message-sent-to-user",
31
+ IMAGE_MESSAGE_SENT_TO_GROUP = "image-message-sent-to-group",
32
+ IMAGE_MESSAGE_RECEIVED_FROM_USER = "image-message-received-from-user",
33
+ IMAGE_MESSAGE_RECEIVED_FROM_GROUP = "image-message-received-from-group",
34
+ VIDEO_MESSAGE_SENT_TO_USER = "video-message-sent-to-user",
35
+ VIDEO_MESSAGE_SENT_TO_GROUP = "video-message-sent-to-group",
36
+ VIDEO_MESSAGE_RECEIVED_FROM_USER = "video-message-received-from-user",
37
+ VIDEO_MESSAGE_RECEIVED_FROM_GROUP = "video-message-received-from-group",
38
+ VOICE_MESSAGE_SENT_TO_USER = "voice-message-sent-to-user",
39
+ VOICE_MESSAGE_SENT_TO_GROUP = "voice-message-sent-to-group",
40
+ VOICE_MESSAGE_RECEIVED_FROM_USER = "voice-message-received-from-user",
41
+ VOICE_MESSAGE_RECEIVED_FROM_GROUP = "voice-message-received-from-group",
42
+ FILE_MESSAGE_SENT_TO_USER = "file-message-sent-to-user",
43
+ FILE_MESSAGE_SENT_TO_GROUP = "file-message-sent-to-group",
44
+ FILE_MESSAGE_RECEIVED_FROM_USER = "file-message-received-from-user",
45
+ FILE_MESSAGE_RECEIVED_FROM_GROUP = "file-message-received-from-group",
46
+ STICKER_MESSAGE_SENT_TO_USER = "sticker-message-sent-to-user",
47
+ STICKER_MESSAGE_SENT_TO_GROUP = "sticker-message-sent-to-group",
48
+ STICKER_MESSAGE_RECEIVED_FROM_USER = "sticker-message-received-from-user",
49
+ STICKER_MESSAGE_RECEIVED_FROM_GROUP = "sticker-message-received-from-group",
50
+ LOCATION_MESSAGE_SENT_TO_USER = "location-message-sent-to-user",
51
+ LOCATION_MESSAGE_SENT_TO_GROUP = "location-message-sent-to-group",
52
+ LOCATION_MESSAGE_RECEIVED_FROM_USER = "location-message-received-from-user",
53
+ LOCATION_MESSAGE_RECEIVED_FROM_GROUP = "location-message-received-from-group",
54
+ GIF_MESSAGE_SENT_TO_USER = "gif-message-sent-to-user",
55
+ GIF_MESSAGE_SENT_TO_GROUP = "gif-message-sent-to-group",
56
+ GIF_MESSAGE_RECEIVED_FROM_USER = "gif-message-received-from-user",
57
+ GIF_MESSAGE_RECEIVED_FROM_GROUP = "gif-message-received-from-group",
58
+ LINK_MESSAGE_SENT_TO_USER = "link-message-sent-to-user",
59
+ LINK_MESSAGE_SENT_TO_GROUP = "link-message-sent-to-group",
60
+ LINK_MESSAGE_RECEIVED_FROM_USER = "link-message-received-from-user",
61
+ LINK_MESSAGE_RECEIVED_FROM_GROUP = "link-message-received-from-group",
62
+ DOODLE_MESSAGE_SENT_TO_USER = "doodle-message-sent-to-user",
63
+ DOODLE_MESSAGE_SENT_TO_GROUP = "doodle-message-sent-to-group",
64
+ DOODLE_MESSAGE_RECEIVED_FROM_USER = "doodle-message-received-from-user",
65
+ DOODLE_MESSAGE_RECEIVED_FROM_GROUP = "doodle-message-received-from-group",
66
+ RECOMMENDED_MESSAGE_SENT_TO_USER = "recommended-message-sent-to-user",
67
+ RECOMMENDED_MESSAGE_SENT_TO_GROUP = "recommended-message-sent-to-group",
68
+ RECOMMENDED_MESSAGE_RECEIVED_FROM_USER = "recommended-message-received-from-user",
69
+ RECOMMENDED_MESSAGE_RECEIVED_FROM_GROUP = "recommended-message-received-from-group",
70
+ OLD_MESSAGES = "old-messages",
71
+ TYPING_BY_SELF_IN_USER = "typing-by-self-in-user",
72
+ TYPING_BY_SELF_IN_GROUP = "typing-by-self-in-group",
73
+ TYPING_BY_OTHER_IN_USER = "typing-by-other-in-user",
74
+ TYPING_BY_OTHER_IN_GROUP = "typing-by-other-in-group",
75
+ SEEN_MESSAGES_BY_SELF_IN_USER = "seen-messages-by-self-in-user",
76
+ SEEN_MESSAGES_BY_SELF_IN_GROUP = "seen-messages-by-self-in-group",
77
+ SEEN_MESSAGES_BY_OTHER_IN_USER = "seen-messages-by-other-in-user",
78
+ SEEN_MESSAGES_BY_OTHER_IN_GROUP = "seen-messages-by-other-in-group",
79
+ DELIVERED_MESSAGES_BY_SELF_IN_USER = "delivered-messages-by-self-in-user",
80
+ DELIVERED_MESSAGES_BY_SELF_IN_GROUP = "delivered-messages-by-self-in-group",
81
+ DELIVERED_MESSAGES_BY_OTHER_IN_USER = "delivered-messages-by-other-in-user",
82
+ DELIVERED_MESSAGES_BY_OTHER_IN_GROUP = "delivered-messages-by-other-in-group",
83
+ REACTION_BY_SELF_IN_USER = "reaction-by-self-in-user",
84
+ REACTION_BY_SELF_IN_GROUP = "reaction-by-self-in-group",
85
+ REACTION_BY_OTHER_IN_USER = "reaction-by-other-in-user",
86
+ REACTION_BY_OTHER_IN_GROUP = "reaction-by-other-in-group",
87
+ OLD_REACTIONS_BY_SELF_IN_USER = "old-reactions-by-self-in-user",
88
+ OLD_REACTIONS_BY_SELF_IN_GROUP = "old-reactions-by-self-in-group",
89
+ OLD_REACTIONS_BY_OTHER_IN_USER = "old-reactions-by-other-in-user",
90
+ OLD_REACTIONS_BY_OTHER_IN_GROUP = "old-reactions-by-other-in-group",
91
+ FRIEND_EVENT_ADD = "friend-event-add",
92
+ FRIEND_EVENT_REMOVE = "friend-event-remove",
93
+ FRIEND_EVENT_REQUEST = "friend-event-request",
94
+ FRIEND_EVENT_UNDO_REQUEST = "friend-event-undo-request",
95
+ FRIEND_EVENT_REJECT_REQUEST = "friend-event-reject-request",
96
+ FRIEND_EVENT_SEEN_REQUEST = "friend-event-seen-request",
97
+ FRIEND_EVENT_BLOCK = "friend-event-block",
98
+ FRIEND_EVENT_UNBLOCK = "friend-event-unblock",
99
+ FRIEND_EVENT_BLOCK_CALL = "friend-event-block-call",
100
+ FRIEND_EVENT_UNBLOCK_CALL = "friend-event-unblock-call",
101
+ FRIEND_EVENT_PIN_UNPIN = "friend-event-pin-unpin",
102
+ FRIEND_EVENT_PIN_CREATE = "friend-event-pin-create",
103
+ FRIEND_EVENT_UNKNOWN = "friend-event-unknown",
104
+ GROUP_EVENT_JOIN_REQUEST = "group-event-join-request",
105
+ GROUP_EVENT_JOIN = "group-event-join",
106
+ GROUP_EVENT_LEAVE = "group-event-leave",
107
+ GROUP_EVENT_REMOVE_MEMBER = "group-event-remove-member",
108
+ GROUP_EVENT_BLOCK_MEMBER = "group-event-block-member",
109
+ GROUP_EVENT_UPDATE_SETTING = "group-event-update-setting",
110
+ GROUP_EVENT_UPDATE = "group-event-update",
111
+ GROUP_EVENT_NEW_LINK = "group-event-new-link",
112
+ GROUP_EVENT_ADD_ADMIN = "group-event-add-admin",
113
+ GROUP_EVENT_REMOVE_ADMIN = "group-event-remove-admin",
114
+ GROUP_EVENT_NEW_PIN_TOPIC = "group-event-new-pin-topic",
115
+ GROUP_EVENT_UPDATE_PIN_TOPIC = "group-event-update-pin-topic",
116
+ GROUP_EVENT_REORDER_PIN_TOPIC = "group-event-reorder-pin-topic",
117
+ GROUP_EVENT_UPDATE_BOARD = "group-event-update-board",
118
+ GROUP_EVENT_REMOVE_BOARD = "group-event-remove-board",
119
+ GROUP_EVENT_UPDATE_TOPIC = "group-event-update-topic",
120
+ GROUP_EVENT_UNPIN_TOPIC = "group-event-unpin-topic",
121
+ GROUP_EVENT_REMOVE_TOPIC = "group-event-remove-topic",
122
+ GROUP_EVENT_ACCEPT_REMIND = "group-event-accept-remind",
123
+ GROUP_EVENT_REJECT_REMIND = "group-event-reject-remind",
124
+ GROUP_EVENT_REMIND_TOPIC = "group-event-remind-topic",
125
+ GROUP_EVENT_UPDATE_AVATAR = "group-event-update-avatar",
126
+ GROUP_EVENT_UNKNOWN = "group-event-unknown",
127
+ UNDO_BY_SELF_IN_USER = "undo-by-self-in-user",
128
+ UNDO_BY_SELF_IN_GROUP = "undo-by-self-in-group",
129
+ UNDO_BY_OTHER_IN_USER = "undo-by-other-in-user",
130
+ UNDO_BY_OTHER_IN_GROUP = "undo-by-other-in-group",
131
+ CONNECTION_STATUS_CONNECTED = "connection-status-connected",
132
+ CONNECTION_STATUS_DISCONNECTED = "connection-status-disconnected",
133
+ CONNECTION_STATUS_RECONNECTING = "connection-status-reconnecting",
134
+ CONNECTION_STATUS_LOGGED_OUT = "connection-status-logged-out",
135
+ UPLOAD_ATTACHMENT_IN_PROGRESS = "upload-attachment-in-progress",
136
+ UPLOAD_ATTACHMENT_COMPLETED = "upload-attachment-completed",
137
+ UPLOAD_ATTACHMENT_FAILED = "upload-attachment-failed",
138
+ CIPHER_KEY_UPDATED_IN_USER = "cipher-key-updated-in-user",
139
+ CIPHER_KEY_UPDATED_IN_GROUP = "cipher-key-updated-in-group",
140
+ CIPHER_KEY_EXPIRED_IN_USER = "cipher-key-expired-in-user",
141
+ CIPHER_KEY_EXPIRED_IN_GROUP = "cipher-key-expired-in-group",
142
+ ERROR_SYSTEM = "error-system",
143
+ ERROR_NETWORK = "error-network",
144
+ ERROR_AUTHENTICATION = "error-authentication",
145
+ ERROR_VALIDATION = "error-validation",
146
+ ERROR_BUSINESS_LOGIC = "error-business-logic",
147
+ ERROR_UNKNOWN = "error-unknown"
148
+ }
149
+ /**
150
+ * Base webhook event interface - Cấu trúc job chuẩn
151
+ */
152
+ export interface BaseZaloWebhookEvent {
153
+ sessionId: string;
154
+ userUuid: string;
155
+ timestamp: number;
156
+ eventType: ZaloWebhookEventType;
157
+ metadata?: Record<string, any>;
158
+ }
159
+ /**
160
+ * Job Priority enum
161
+ */
162
+ export declare enum JobPriority {
163
+ LOW = 1,
164
+ NORMAL = 2,
165
+ HIGH = 3,
166
+ CRITICAL = 4
167
+ }
168
+ /**
169
+ * Job Status enum
170
+ */
171
+ export declare enum JobStatus {
172
+ WAITING = "waiting",
173
+ ACTIVE = "active",
174
+ COMPLETED = "completed",
175
+ FAILED = "failed",
176
+ DELAYED = "delayed",
177
+ PAUSED = "paused"
178
+ }
179
+ /**
180
+ * Queue Job Configuration
181
+ */
182
+ export interface QueueJobConfig {
183
+ priority?: JobPriority;
184
+ delay?: number;
185
+ attempts?: number;
186
+ backoff?: {
187
+ type: 'fixed' | 'exponential';
188
+ delay: number;
189
+ };
190
+ removeOnComplete?: number | boolean;
191
+ removeOnFail?: number | boolean;
192
+ jobId?: string;
193
+ }
194
+ /**
195
+ * Base Queue Job Interface - Cấu trúc job khi đưa vào queue
196
+ */
197
+ export interface BaseQueueJob<T = any> {
198
+ id?: string;
199
+ name: string;
200
+ data: T;
201
+ opts?: QueueJobConfig;
202
+ progress?: number;
203
+ returnvalue?: any;
204
+ failedReason?: string;
205
+ stacktrace?: string[];
206
+ attemptsMade?: number;
207
+ delay?: number;
208
+ timestamp?: number;
209
+ processedOn?: number;
210
+ finishedOn?: number;
211
+ }
212
+ /**
213
+ * Webhook Queue Job - Job cụ thể cho webhook events
214
+ */
215
+ export interface WebhookQueueJob extends BaseQueueJob<BaseZaloWebhookEvent> {
216
+ name: 'webhook-event';
217
+ data: BaseZaloWebhookEvent;
218
+ }
219
+ //# sourceMappingURL=webhook-job.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-job.types.d.ts","sourceRoot":"","sources":["../../../src/types/job/webhook-job.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,oBAAY,cAAc;IACxB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,UAAU,eAAe;CAC1B;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAE9B,yBAAyB,8BAA8B;IACvD,0BAA0B,+BAA+B;IACzD,+BAA+B,oCAAoC;IACnE,gCAAgC,qCAAqC;IAGrE,0BAA0B,+BAA+B;IACzD,2BAA2B,gCAAgC;IAC3D,gCAAgC,qCAA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