cecon-interfaces 1.8.82 → 1.8.84

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 (48) hide show
  1. package/dist/esm2022/index.mjs +10 -1
  2. package/dist/esm2022/n8n/entities/chat-api-callback.entity.mjs +91 -0
  3. package/dist/esm2022/n8n/entities/chat-context.entity.mjs +36 -0
  4. package/dist/esm2022/n8n/entities/chat-response.entity.mjs +64 -0
  5. package/dist/esm2022/n8n/entities/chat-trigger.entity.mjs +39 -0
  6. package/dist/esm2022/n8n/entities/index.mjs +4 -0
  7. package/dist/esm2022/n8n/index.mjs +13 -0
  8. package/dist/esm2022/n8n/interfaces/i-chat-api-callback.mjs +2 -0
  9. package/dist/esm2022/n8n/interfaces/i-chat-context.mjs +2 -0
  10. package/dist/esm2022/n8n/interfaces/i-chat-response.mjs +2 -0
  11. package/dist/esm2022/n8n/interfaces/i-chat-trigger.mjs +2 -0
  12. package/dist/esm2022/n8n/interfaces/index.mjs +2 -0
  13. package/dist/esm2022/payio/activation-key/entities/activation-key.entity.mjs +5 -3
  14. package/dist/esm2022/payio/activation-key/enums/activation-key-status.enum.mjs +2 -1
  15. package/dist/esm2022/payio/activation-key/interfaces/i-activation-key.mjs +1 -1
  16. package/dist/fesm2022/cecon-interfaces.mjs +236 -3
  17. package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
  18. package/dist/index.d.ts +9 -0
  19. package/dist/index.js +9 -0
  20. package/dist/n8n/entities/chat-api-callback.entity.d.ts +75 -0
  21. package/dist/n8n/entities/chat-api-callback.entity.js +77 -0
  22. package/dist/n8n/entities/chat-context.entity.d.ts +49 -0
  23. package/dist/n8n/entities/chat-context.entity.js +40 -0
  24. package/dist/n8n/entities/chat-response.entity.d.ts +77 -0
  25. package/dist/n8n/entities/chat-response.entity.js +68 -0
  26. package/dist/n8n/entities/chat-trigger.entity.d.ts +47 -0
  27. package/dist/n8n/entities/chat-trigger.entity.js +43 -0
  28. package/dist/n8n/entities/index.d.ts +3 -0
  29. package/dist/n8n/entities/index.js +9 -0
  30. package/dist/n8n/index.d.ts +10 -0
  31. package/dist/n8n/index.js +28 -0
  32. package/dist/n8n/interfaces/i-chat-api-callback.d.ts +65 -0
  33. package/dist/n8n/interfaces/i-chat-api-callback.js +2 -0
  34. package/dist/n8n/interfaces/i-chat-context.d.ts +47 -0
  35. package/dist/n8n/interfaces/i-chat-context.js +2 -0
  36. package/dist/n8n/interfaces/i-chat-response.d.ts +50 -0
  37. package/dist/n8n/interfaces/i-chat-response.js +2 -0
  38. package/dist/n8n/interfaces/i-chat-trigger.d.ts +45 -0
  39. package/dist/n8n/interfaces/i-chat-trigger.js +2 -0
  40. package/dist/n8n/interfaces/index.d.ts +3 -0
  41. package/dist/n8n/interfaces/index.js +2 -0
  42. package/dist/payio/activation-key/entities/activation-key.entity.d.ts +2 -0
  43. package/dist/payio/activation-key/entities/activation-key.entity.js +4 -2
  44. package/dist/payio/activation-key/enums/activation-key-status.enum.d.ts +1 -0
  45. package/dist/payio/activation-key/enums/activation-key-status.enum.js +1 -0
  46. package/dist/payio/activation-key/interfaces/i-activation-key.d.ts +2 -0
  47. package/docs/examples/n8n-api-callback-example.md +1 -0
  48. package/package.json +1 -1
@@ -0,0 +1,47 @@
1
+ export interface IN8nChatContext {
2
+ contextId: string;
3
+ sessionId: string;
4
+ userId: string;
5
+ platform: string;
6
+ messageHistory: Array<{
7
+ messageId: string;
8
+ message: string;
9
+ messageType: string;
10
+ timestamp: Date;
11
+ sender: 'user' | 'bot';
12
+ metadata?: any;
13
+ }>;
14
+ conversationState: {
15
+ currentFlow?: string;
16
+ currentStep?: string;
17
+ isActive: boolean;
18
+ lastActivity: Date;
19
+ variables?: Record<string, any>;
20
+ };
21
+ userData: {
22
+ name?: string;
23
+ email?: string;
24
+ phone?: string;
25
+ preferences?: Record<string, any>;
26
+ customFields?: Record<string, any>;
27
+ };
28
+ sessionConfig: {
29
+ timeout?: number;
30
+ maxMessages?: number;
31
+ language?: string;
32
+ timezone?: string;
33
+ };
34
+ metrics?: {
35
+ totalMessages: number;
36
+ userMessages: number;
37
+ botMessages: number;
38
+ sessionDuration?: number;
39
+ firstMessageAt: Date;
40
+ lastMessageAt: Date;
41
+ };
42
+ timestamps: {
43
+ createdAt: Date;
44
+ updatedAt: Date;
45
+ expiresAt?: Date;
46
+ };
47
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,50 @@
1
+ import { IN8nChatApiCallback } from './i-chat-api-callback';
2
+ export interface IN8nChatResponse {
3
+ responseId: string;
4
+ originalMessageId: string;
5
+ sessionId: string;
6
+ userId: string;
7
+ message: string;
8
+ messageType: 'text' | 'image' | 'audio' | 'video' | 'document' | 'template' | 'quick_reply' | 'button';
9
+ timestamp: Date;
10
+ platform: string;
11
+ responseData?: {
12
+ buttons?: Array<{
13
+ id: string;
14
+ text: string;
15
+ type: 'reply' | 'url' | 'call';
16
+ payload?: string;
17
+ url?: string;
18
+ phoneNumber?: string;
19
+ apiCallback?: IN8nChatApiCallback;
20
+ }>;
21
+ quickReplies?: Array<{
22
+ id: string;
23
+ text: string;
24
+ payload?: string;
25
+ apiCallback?: IN8nChatApiCallback;
26
+ }>;
27
+ template?: {
28
+ type: string;
29
+ elements: any[];
30
+ };
31
+ media?: {
32
+ url: string;
33
+ type: string;
34
+ caption?: string;
35
+ filename?: string;
36
+ };
37
+ };
38
+ delivery: {
39
+ priority: 'low' | 'normal' | 'high';
40
+ delay?: number;
41
+ retryAttempts?: number;
42
+ };
43
+ metadata?: {
44
+ automated: boolean;
45
+ botName?: string;
46
+ workflowId?: string;
47
+ nodeId?: string;
48
+ };
49
+ status: 'queued' | 'sent' | 'delivered' | 'read' | 'failed';
50
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,45 @@
1
+ export interface IN8nChatTrigger {
2
+ messageId: string;
3
+ sessionId: string;
4
+ userId: string;
5
+ message: string;
6
+ messageType: 'text' | 'image' | 'audio' | 'video' | 'document' | 'location' | 'contact' | 'sticker' | 'emoji';
7
+ timestamp: Date;
8
+ platform: string;
9
+ user: {
10
+ id: string;
11
+ name: string;
12
+ phone?: string;
13
+ email?: string;
14
+ avatar?: string;
15
+ language?: string;
16
+ };
17
+ conversation: {
18
+ id: string;
19
+ title?: string;
20
+ isGroup: boolean;
21
+ participantCount?: number;
22
+ };
23
+ metadata: {
24
+ isForwarded?: boolean;
25
+ isReply?: boolean;
26
+ replyToMessageId?: string;
27
+ hasMedia?: boolean;
28
+ mediaUrl?: string;
29
+ mediaType?: string;
30
+ location?: {
31
+ latitude: number;
32
+ longitude: number;
33
+ address?: string;
34
+ };
35
+ };
36
+ webhook: {
37
+ id: string;
38
+ url: string;
39
+ headers?: Record<string, string>;
40
+ };
41
+ rawData?: any;
42
+ tags?: string[];
43
+ customData?: Record<string, any>;
44
+ status: 'pending' | 'processing' | 'completed' | 'error';
45
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export { IN8nChatContext } from './i-chat-context';
2
+ export { IN8nChatResponse } from './i-chat-response';
3
+ export { IN8nChatTrigger } from './i-chat-trigger';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,6 +10,8 @@ export declare class PayioActivationKeyEntity implements IPayioActivationKey {
10
10
  companyName: string | null;
11
11
  createdAt: Date;
12
12
  createdBy: string | null;
13
+ distributionDate: Date | null;
14
+ distributedBy: string | null;
13
15
  deviceId: string | null;
14
16
  distributorId: string | null;
15
17
  distributorKey: string | null;
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PayioActivationKeyEntity = void 0;
4
4
  var activation_key_status_enum_1 = require("../enums/activation-key-status.enum");
5
5
  var PayioActivationKeyEntity = /** @class */ (function () {
6
- // #endregion Properties (20)
6
+ // #endregion Properties (22)
7
7
  // #region Constructors (1)
8
8
  function PayioActivationKeyEntity(data) {
9
- // #region Properties (20)
9
+ // #region Properties (22)
10
10
  this.activationDate = null;
11
11
  this.activationReleasedId = '';
12
12
  this.appId = null;
@@ -16,6 +16,8 @@ var PayioActivationKeyEntity = /** @class */ (function () {
16
16
  this.companyName = null;
17
17
  this.createdAt = new Date();
18
18
  this.createdBy = null;
19
+ this.distributionDate = null;
20
+ this.distributedBy = null;
19
21
  this.deviceId = null;
20
22
  this.distributorId = null;
21
23
  this.distributorKey = null;
@@ -1,6 +1,7 @@
1
1
  export declare enum EPayuioActivationStatus {
2
2
  NONE = "NONE",
3
3
  PENDING = "PENDING",
4
+ IN_DISTRIBUTION = "IN_DISTRIBUTION",
4
5
  ACTIVE = "ACTIVE",
5
6
  EXPIRED = "EXPIRED",
6
7
  CANCELLED = "CANCELLED",
@@ -5,6 +5,7 @@ var EPayuioActivationStatus;
5
5
  (function (EPayuioActivationStatus) {
6
6
  EPayuioActivationStatus["NONE"] = "NONE";
7
7
  EPayuioActivationStatus["PENDING"] = "PENDING";
8
+ EPayuioActivationStatus["IN_DISTRIBUTION"] = "IN_DISTRIBUTION";
8
9
  EPayuioActivationStatus["ACTIVE"] = "ACTIVE";
9
10
  EPayuioActivationStatus["EXPIRED"] = "EXPIRED";
10
11
  EPayuioActivationStatus["CANCELLED"] = "CANCELLED";
@@ -9,6 +9,8 @@ export interface IPayioActivationKey {
9
9
  companyName: string | null;
10
10
  createdAt: Date;
11
11
  createdBy: string | null;
12
+ distributionDate: Date | null;
13
+ distributedBy: string | null;
12
14
  sandbox: boolean;
13
15
  deviceId: string | null;
14
16
  distributorId: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.8.82",
3
+ "version": "1.8.84",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",