cecon-interfaces 1.8.83 → 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 (40) 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/fesm2022/cecon-interfaces.mjs +231 -1
  14. package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
  15. package/dist/index.d.ts +9 -0
  16. package/dist/index.js +9 -0
  17. package/dist/n8n/entities/chat-api-callback.entity.d.ts +75 -0
  18. package/dist/n8n/entities/chat-api-callback.entity.js +77 -0
  19. package/dist/n8n/entities/chat-context.entity.d.ts +49 -0
  20. package/dist/n8n/entities/chat-context.entity.js +40 -0
  21. package/dist/n8n/entities/chat-response.entity.d.ts +77 -0
  22. package/dist/n8n/entities/chat-response.entity.js +68 -0
  23. package/dist/n8n/entities/chat-trigger.entity.d.ts +47 -0
  24. package/dist/n8n/entities/chat-trigger.entity.js +43 -0
  25. package/dist/n8n/entities/index.d.ts +3 -0
  26. package/dist/n8n/entities/index.js +9 -0
  27. package/dist/n8n/index.d.ts +10 -0
  28. package/dist/n8n/index.js +28 -0
  29. package/dist/n8n/interfaces/i-chat-api-callback.d.ts +65 -0
  30. package/dist/n8n/interfaces/i-chat-api-callback.js +2 -0
  31. package/dist/n8n/interfaces/i-chat-context.d.ts +47 -0
  32. package/dist/n8n/interfaces/i-chat-context.js +2 -0
  33. package/dist/n8n/interfaces/i-chat-response.d.ts +50 -0
  34. package/dist/n8n/interfaces/i-chat-response.js +2 -0
  35. package/dist/n8n/interfaces/i-chat-trigger.d.ts +45 -0
  36. package/dist/n8n/interfaces/i-chat-trigger.js +2 -0
  37. package/dist/n8n/interfaces/index.d.ts +3 -0
  38. package/dist/n8n/interfaces/index.js +2 -0
  39. package/docs/examples/n8n-api-callback-example.md +1 -0
  40. 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 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.8.83",
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",