@exado/n8n-nodes-exado 0.1.0

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 (71) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +132 -0
  3. package/dist/credentials/ExadoApi.credentials.d.ts +9 -0
  4. package/dist/credentials/ExadoApi.credentials.js +48 -0
  5. package/dist/credentials/ExadoApi.credentials.js.map +1 -0
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.js +3 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/nodes/Exado/Exado.node.d.ts +17 -0
  10. package/dist/nodes/Exado/Exado.node.js +709 -0
  11. package/dist/nodes/Exado/Exado.node.js.map +1 -0
  12. package/dist/nodes/Exado/ExadoTrigger.node.d.ts +5 -0
  13. package/dist/nodes/Exado/ExadoTrigger.node.js +123 -0
  14. package/dist/nodes/Exado/ExadoTrigger.node.js.map +1 -0
  15. package/dist/nodes/Exado/descriptions/ChatCompletionDescription.d.ts +3 -0
  16. package/dist/nodes/Exado/descriptions/ChatCompletionDescription.js +181 -0
  17. package/dist/nodes/Exado/descriptions/ChatCompletionDescription.js.map +1 -0
  18. package/dist/nodes/Exado/descriptions/ChatDescription.d.ts +3 -0
  19. package/dist/nodes/Exado/descriptions/ChatDescription.js +78 -0
  20. package/dist/nodes/Exado/descriptions/ChatDescription.js.map +1 -0
  21. package/dist/nodes/Exado/descriptions/ConversationConfigDescription.d.ts +3 -0
  22. package/dist/nodes/Exado/descriptions/ConversationConfigDescription.js +115 -0
  23. package/dist/nodes/Exado/descriptions/ConversationConfigDescription.js.map +1 -0
  24. package/dist/nodes/Exado/descriptions/ConversationDescription.d.ts +3 -0
  25. package/dist/nodes/Exado/descriptions/ConversationDescription.js +102 -0
  26. package/dist/nodes/Exado/descriptions/ConversationDescription.js.map +1 -0
  27. package/dist/nodes/Exado/descriptions/ConversationTemplateDescription.d.ts +3 -0
  28. package/dist/nodes/Exado/descriptions/ConversationTemplateDescription.js +97 -0
  29. package/dist/nodes/Exado/descriptions/ConversationTemplateDescription.js.map +1 -0
  30. package/dist/nodes/Exado/descriptions/DocumentDescription.d.ts +3 -0
  31. package/dist/nodes/Exado/descriptions/DocumentDescription.js +221 -0
  32. package/dist/nodes/Exado/descriptions/DocumentDescription.js.map +1 -0
  33. package/dist/nodes/Exado/descriptions/EmbeddingDescription.d.ts +3 -0
  34. package/dist/nodes/Exado/descriptions/EmbeddingDescription.js +56 -0
  35. package/dist/nodes/Exado/descriptions/EmbeddingDescription.js.map +1 -0
  36. package/dist/nodes/Exado/descriptions/FaqTopicDescription.d.ts +3 -0
  37. package/dist/nodes/Exado/descriptions/FaqTopicDescription.js +89 -0
  38. package/dist/nodes/Exado/descriptions/FaqTopicDescription.js.map +1 -0
  39. package/dist/nodes/Exado/descriptions/FolderDescription.d.ts +3 -0
  40. package/dist/nodes/Exado/descriptions/FolderDescription.js +81 -0
  41. package/dist/nodes/Exado/descriptions/FolderDescription.js.map +1 -0
  42. package/dist/nodes/Exado/descriptions/GroupDescription.d.ts +3 -0
  43. package/dist/nodes/Exado/descriptions/GroupDescription.js +29 -0
  44. package/dist/nodes/Exado/descriptions/GroupDescription.js.map +1 -0
  45. package/dist/nodes/Exado/descriptions/MetadataDescription.d.ts +3 -0
  46. package/dist/nodes/Exado/descriptions/MetadataDescription.js +116 -0
  47. package/dist/nodes/Exado/descriptions/MetadataDescription.js.map +1 -0
  48. package/dist/nodes/Exado/descriptions/ModelDescription.d.ts +3 -0
  49. package/dist/nodes/Exado/descriptions/ModelDescription.js +30 -0
  50. package/dist/nodes/Exado/descriptions/ModelDescription.js.map +1 -0
  51. package/dist/nodes/Exado/descriptions/QuickDescription.d.ts +3 -0
  52. package/dist/nodes/Exado/descriptions/QuickDescription.js +35 -0
  53. package/dist/nodes/Exado/descriptions/QuickDescription.js.map +1 -0
  54. package/dist/nodes/Exado/exado.svg +4 -0
  55. package/dist/nodes/Exado/helpers/pagination.d.ts +4 -0
  56. package/dist/nodes/Exado/helpers/pagination.js +33 -0
  57. package/dist/nodes/Exado/helpers/pagination.js.map +1 -0
  58. package/dist/nodes/Exado/helpers/request.d.ts +15 -0
  59. package/dist/nodes/Exado/helpers/request.js +101 -0
  60. package/dist/nodes/Exado/helpers/request.js.map +1 -0
  61. package/dist/nodes/Exado/helpers/sse.d.ts +12 -0
  62. package/dist/nodes/Exado/helpers/sse.js +87 -0
  63. package/dist/nodes/Exado/helpers/sse.js.map +1 -0
  64. package/dist/nodes/Exado/helpers/upload.d.ts +2 -0
  65. package/dist/nodes/Exado/helpers/upload.js +24 -0
  66. package/dist/nodes/Exado/helpers/upload.js.map +1 -0
  67. package/dist/nodes/Exado/methods/loadOptions.d.ts +8 -0
  68. package/dist/nodes/Exado/methods/loadOptions.js +95 -0
  69. package/dist/nodes/Exado/methods/loadOptions.js.map +1 -0
  70. package/dist/tsconfig.tsbuildinfo +1 -0
  71. package/package.json +66 -0
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.folderFields = exports.folderOperations = void 0;
4
+ const SHOW = { resource: ['folder'] };
5
+ exports.folderOperations = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: { show: SHOW },
12
+ options: [
13
+ { name: 'Create', value: 'create', action: 'Create a folder' },
14
+ { name: 'List Children', value: 'listChildren', action: 'List folder children' },
15
+ { name: 'Rename', value: 'rename', action: 'Rename a folder' },
16
+ ],
17
+ default: 'listChildren',
18
+ },
19
+ ];
20
+ exports.folderFields = [
21
+ {
22
+ displayName: 'Name',
23
+ name: 'name',
24
+ type: 'string',
25
+ default: '',
26
+ required: true,
27
+ displayOptions: { show: { ...SHOW, operation: ['create'] } },
28
+ },
29
+ {
30
+ displayName: 'Parent Path',
31
+ name: 'parentPath',
32
+ type: 'string',
33
+ default: '/',
34
+ displayOptions: { show: { ...SHOW, operation: ['create', 'rename'] } },
35
+ },
36
+ {
37
+ displayName: 'Group Names or IDs',
38
+ name: 'groups',
39
+ type: 'multiOptions',
40
+ typeOptions: { loadOptionsMethod: 'getGroups' },
41
+ default: [],
42
+ displayOptions: { show: { ...SHOW, operation: ['create'] } },
43
+ description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
44
+ },
45
+ {
46
+ displayName: 'Path',
47
+ name: 'path',
48
+ type: 'string',
49
+ default: '/',
50
+ displayOptions: { show: { ...SHOW, operation: ['listChildren'] } },
51
+ },
52
+ {
53
+ displayName: 'State',
54
+ name: 'state',
55
+ type: 'options',
56
+ options: [
57
+ { name: 'All', value: 'all' },
58
+ { name: 'Open', value: 'open' },
59
+ { name: 'Closed', value: 'closed' },
60
+ ],
61
+ default: 'all',
62
+ displayOptions: { show: { ...SHOW, operation: ['listChildren'] } },
63
+ },
64
+ {
65
+ displayName: 'Old Name',
66
+ name: 'oldName',
67
+ type: 'string',
68
+ default: '',
69
+ required: true,
70
+ displayOptions: { show: { ...SHOW, operation: ['rename'] } },
71
+ },
72
+ {
73
+ displayName: 'New Name',
74
+ name: 'newName',
75
+ type: 'string',
76
+ default: '',
77
+ required: true,
78
+ displayOptions: { show: { ...SHOW, operation: ['rename'] } },
79
+ },
80
+ ];
81
+ //# sourceMappingURL=FolderDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FolderDescription.js","sourceRoot":"","sources":["../../../../nodes/Exado/descriptions/FolderDescription.ts"],"names":[],"mappings":";;;AAEA,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;AAEzB,QAAA,gBAAgB,GAAsB;IAClD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,EAAE,IAAI,EAAE,IAAI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AAE,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE;KAClE;IACD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;YAC7B,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;YAC/B,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;SACnC;QACD,OAAO,EAAE,KAAK;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE;KAClE;IACD;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE;KAC5D;IACD;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE;KAC5D;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const groupOperations: INodeProperties[];
3
+ export declare const groupFields: INodeProperties[];
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.groupFields = exports.groupOperations = void 0;
4
+ const SHOW = { resource: ['group'] };
5
+ exports.groupOperations = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: { show: SHOW },
12
+ options: [
13
+ { name: 'Get Many', value: 'getAll', action: 'List all groups' },
14
+ { name: 'Get', value: 'get', action: 'Get a group' },
15
+ ],
16
+ default: 'getAll',
17
+ },
18
+ ];
19
+ exports.groupFields = [
20
+ {
21
+ displayName: 'Group ID',
22
+ name: 'groupId',
23
+ type: 'string',
24
+ default: '',
25
+ required: true,
26
+ displayOptions: { show: { ...SHOW, operation: ['get'] } },
27
+ },
28
+ ];
29
+ //# sourceMappingURL=GroupDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GroupDescription.js","sourceRoot":"","sources":["../../../../nodes/Exado/descriptions/GroupDescription.ts"],"names":[],"mappings":";;;AAEA,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAExB,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;QAC9B,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE;YAChE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE;SACpD;QACD,OAAO,EAAE,QAAQ;KACjB;CACD,CAAC;AAEW,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE;KACzD;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const metadataOperations: INodeProperties[];
3
+ export declare const metadataFields: INodeProperties[];
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.metadataFields = exports.metadataOperations = void 0;
4
+ const SHOW = { resource: ['metadata'] };
5
+ exports.metadataOperations = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: { show: SHOW },
12
+ options: [
13
+ { name: 'Create', value: 'create', action: 'Create a metadata definition' },
14
+ { name: 'Delete', value: 'delete', action: 'Delete a metadata definition' },
15
+ {
16
+ name: 'Generate',
17
+ value: 'generate',
18
+ action: 'Queue metadata generation for a document',
19
+ },
20
+ { name: 'Get', value: 'get', action: 'Get a metadata definition' },
21
+ { name: 'Get Many', value: 'getAll', action: 'Get many metadata definitions' },
22
+ {
23
+ name: 'Pending Status',
24
+ value: 'pendingStatus',
25
+ action: 'Get the pending metadata count',
26
+ },
27
+ { name: 'Update', value: 'update', action: 'Update a metadata definition' },
28
+ ],
29
+ default: 'getAll',
30
+ },
31
+ ];
32
+ exports.metadataFields = [
33
+ {
34
+ displayName: 'Title',
35
+ name: 'title',
36
+ type: 'string',
37
+ default: '',
38
+ required: true,
39
+ displayOptions: { show: { ...SHOW, operation: ['create'] } },
40
+ },
41
+ {
42
+ displayName: 'Query',
43
+ name: 'query',
44
+ type: 'string',
45
+ typeOptions: { rows: 3 },
46
+ default: '',
47
+ required: true,
48
+ displayOptions: { show: { ...SHOW, operation: ['create'] } },
49
+ description: 'The prompt used to extract this metadata field from a document',
50
+ },
51
+ {
52
+ displayName: 'Group Names or IDs',
53
+ name: 'groupIds',
54
+ type: 'multiOptions',
55
+ typeOptions: { loadOptionsMethod: 'getGroups' },
56
+ default: [],
57
+ displayOptions: { show: { ...SHOW, operation: ['create'] } },
58
+ description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
59
+ },
60
+ {
61
+ displayName: 'Metadata ID',
62
+ name: 'metadataId',
63
+ type: 'string',
64
+ default: '',
65
+ required: true,
66
+ displayOptions: { show: { ...SHOW, operation: ['get', 'update', 'delete'] } },
67
+ },
68
+ {
69
+ displayName: 'Document ID',
70
+ name: 'documentId',
71
+ type: 'string',
72
+ default: '',
73
+ required: true,
74
+ displayOptions: { show: { ...SHOW, operation: ['generate'] } },
75
+ },
76
+ {
77
+ displayName: 'Update Fields',
78
+ name: 'updateFields',
79
+ type: 'collection',
80
+ placeholder: 'Add Field',
81
+ default: {},
82
+ displayOptions: { show: { ...SHOW, operation: ['update'] } },
83
+ options: [
84
+ { displayName: 'Title', name: 'title', type: 'string', default: '' },
85
+ { displayName: 'Query', name: 'query', type: 'string', default: '' },
86
+ {
87
+ displayName: 'Group Names or IDs',
88
+ name: 'group_ids',
89
+ type: 'multiOptions',
90
+ typeOptions: { loadOptionsMethod: 'getGroups' },
91
+ default: [],
92
+ description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
93
+ },
94
+ ],
95
+ },
96
+ {
97
+ displayName: 'Return All',
98
+ name: 'returnAll',
99
+ type: 'boolean',
100
+ description: 'Whether to return all results or only up to a given limit',
101
+ default: false,
102
+ displayOptions: { show: { ...SHOW, operation: ['getAll'] } },
103
+ },
104
+ {
105
+ displayName: 'Limit',
106
+ name: 'limit',
107
+ type: 'number',
108
+ typeOptions: {
109
+ minValue: 1,
110
+ },
111
+ description: 'Max number of results to return',
112
+ default: 50,
113
+ displayOptions: { show: { ...SHOW, operation: ['getAll'], returnAll: [false] } },
114
+ },
115
+ ];
116
+ //# sourceMappingURL=MetadataDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MetadataDescription.js","sourceRoot":"","sources":["../../../../nodes/Exado/descriptions/MetadataDescription.ts"],"names":[],"mappings":";;;AAEA,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;AAE3B,QAAA,kBAAkB,GAAsB;IACpD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;QAC9B,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,8BAA8B,EAAE;YAC3E,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,8BAA8B,EAAE;YAC3E;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,MAAM,EAAE,0CAA0C;aAClD;YACD,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,2BAA2B,EAAE;YAClE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,+BAA+B,EAAE;YAC9E;gBACC,IAAI,EAAE,gBAAgB;gBACtB,KAAK,EAAE,eAAe;gBACtB,MAAM,EAAE,gCAAgC;aACxC;YACD,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,8BAA8B,EAAE;SAC3E;QACD,OAAO,EAAE,QAAQ;KACjB;CACD,CAAC;AAEW,QAAA,cAAc,GAAsB;IAChD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,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Properties[];
3
+ export declare const modelFields: INodeProperties[];
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.modelFields = exports.modelOperations = void 0;
4
+ const SHOW = { resource: ['model'] };
5
+ exports.modelOperations = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: { show: SHOW },
12
+ options: [
13
+ {
14
+ name: 'List Available',
15
+ value: 'listAvailable',
16
+ description: 'List models with provider, quantization, context length, streaming support',
17
+ action: 'List available models',
18
+ },
19
+ {
20
+ name: 'List OpenAI-Compatible',
21
+ value: 'listOpenAiCompatible',
22
+ description: 'Mirror of OpenAI\'s GET /v1/models response',
23
+ action: 'List open ai compatible models',
24
+ },
25
+ ],
26
+ default: 'listAvailable',
27
+ },
28
+ ];
29
+ exports.modelFields = [];
30
+ //# sourceMappingURL=ModelDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelDescription.js","sourceRoot":"","sources":["../../../../nodes/Exado/descriptions/ModelDescription.ts"],"names":[],"mappings":";;;AAEA,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAExB,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;QAC9B,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,gBAAgB;gBACtB,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,4EAA4E;gBACzF,MAAM,EAAE,uBAAuB;aAC/B;YACD;gBACC,IAAI,EAAE,wBAAwB;gBAC9B,KAAK,EAAE,sBAAsB;gBAC7B,WAAW,EAAE,6CAA6C;gBAC1D,MAAM,EAAE,gCAAgC;aACxC;SACD;QACD,OAAO,EAAE,eAAe;KACxB;CACD,CAAC;AAEW,QAAA,WAAW,GAAsB,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const quickOperations: INodeProperties[];
3
+ export declare const quickFields: INodeProperties[];
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.quickFields = exports.quickOperations = void 0;
4
+ const SHOW = { resource: ['quick'] };
5
+ exports.quickOperations = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: { show: SHOW },
12
+ options: [
13
+ {
14
+ name: 'Quick Ask',
15
+ value: 'quickAsk',
16
+ description: 'One-shot LLM call with no conversation history or RAG context',
17
+ action: 'Quick ask',
18
+ },
19
+ ],
20
+ default: 'quickAsk',
21
+ },
22
+ ];
23
+ exports.quickFields = [
24
+ {
25
+ displayName: 'Query',
26
+ name: 'query',
27
+ type: 'string',
28
+ typeOptions: { rows: 3 },
29
+ default: '',
30
+ required: true,
31
+ displayOptions: { show: { ...SHOW, operation: ['quickAsk'] } },
32
+ description: 'Text the model should answer',
33
+ },
34
+ ];
35
+ //# sourceMappingURL=QuickDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuickDescription.js","sourceRoot":"","sources":["../../../../nodes/Exado/descriptions/QuickDescription.ts"],"names":[],"mappings":";;;AAEA,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAExB,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;QAC9B,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,+DAA+D;gBAC5E,MAAM,EAAE,WAAW;aACnB;SACD;QACD,OAAO,EAAE,UAAU;KACnB;CACD,CAAC;AAEW,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;QACxB,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE;QAC9D,WAAW,EAAE,8BAA8B;KAC3C;CACD,CAAC"}
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" width="60" height="60" role="img" aria-label="Exado">
2
+ <rect width="60" height="60" rx="12" fill="#0F172A"/>
3
+ <path d="M14 18 H46 V25 H22 V28 H42 V35 H22 V42 H46 V49 H14 Z" fill="#38BDF8"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ import type { IDataObject, IExecuteFunctions, IHttpRequestMethods, ILoadOptionsFunctions, IPollFunctions } from 'n8n-workflow';
2
+ type PageContext = IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions;
3
+ export declare function exadoApiRequestAllItems(this: PageContext, method: IHttpRequestMethods, endpoint: string, arrayKey: string, qs?: IDataObject, limit?: number): Promise<IDataObject[]>;
4
+ export {};
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.exadoApiRequestAllItems = exadoApiRequestAllItems;
4
+ const request_1 = require("./request");
5
+ const MAX_PAGE_SIZE = 100;
6
+ async function exadoApiRequestAllItems(method, endpoint, arrayKey, qs = {}, limit) {
7
+ var _a, _b, _c;
8
+ const items = [];
9
+ let page = 1;
10
+ const pageSize = MAX_PAGE_SIZE;
11
+ while (true) {
12
+ const response = (await request_1.exadoApiRequestRaw.call(this, method, endpoint, {
13
+ qs: { ...qs, page, limit: pageSize },
14
+ }));
15
+ const data = ((_a = response.data) !== null && _a !== void 0 ? _a : response);
16
+ const batch = ((_b = data[arrayKey]) !== null && _b !== void 0 ? _b : []);
17
+ items.push(...batch);
18
+ if (limit !== undefined && items.length >= limit) {
19
+ return items.slice(0, limit);
20
+ }
21
+ const pagination = ((_c = data.pagination) !== null && _c !== void 0 ? _c : {});
22
+ const hasNext = pagination.has_next === true || pagination.hasNext === true;
23
+ if (!hasNext) {
24
+ if (batch.length < pageSize)
25
+ return items;
26
+ }
27
+ page += 1;
28
+ if (page > 1000) {
29
+ return items;
30
+ }
31
+ }
32
+ }
33
+ //# sourceMappingURL=pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../../../nodes/Exado/helpers/pagination.ts"],"names":[],"mappings":";;AAwBA,0DAqCC;AArDD,uCAA+C;AAI/C,MAAM,aAAa,GAAG,GAAG,CAAC;AAYnB,KAAK,UAAU,uBAAuB,CAE5C,MAA2B,EAC3B,QAAgB,EAChB,QAAgB,EAChB,KAAkB,EAAE,EACpB,KAAc;;IAEd,MAAM,KAAK,GAAkB,EAAE,CAAC;IAChC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,MAAM,QAAQ,GAAG,aAAa,CAAC;IAE/B,OAAO,IAAI,EAAE,CAAC;QACb,MAAM,QAAQ,GAAG,CAAC,MAAM,4BAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE;YACvE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;SACpC,CAAC,CAAgB,CAAC;QAEnB,MAAM,IAAI,GAAG,CAAC,MAAA,QAAQ,CAAC,IAAI,mCAAI,QAAQ,CAAgB,CAAC;QACxD,MAAM,KAAK,GAAG,CAAC,MAAA,IAAI,CAAC,QAAQ,CAAC,mCAAI,EAAE,CAAkB,CAAC;QACtD,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;QAErB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC;YAClD,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAC9B,CAAC;QAED,MAAM,UAAU,GAAG,CAAC,MAAA,IAAI,CAAC,UAAU,mCAAI,EAAE,CAAgB,CAAC;QAC1D,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,KAAK,IAAI,IAAI,UAAU,CAAC,OAAO,KAAK,IAAI,CAAC;QAC5E,IAAI,CAAC,OAAO,EAAE,CAAC;YACd,IAAI,KAAK,CAAC,MAAM,GAAG,QAAQ;gBAAE,OAAO,KAAK,CAAC;QAC3C,CAAC;QAED,IAAI,IAAI,CAAC,CAAC;QACV,IAAI,IAAI,GAAG,IAAI,EAAE,CAAC;YAEjB,OAAO,KAAK,CAAC;QACd,CAAC;IACF,CAAC;AACF,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions, IPollFunctions, IDataObject, IHttpRequestMethods } from 'n8n-workflow';
2
+ type ExadoContext = IExecuteFunctions | IHookFunctions | ILoadOptionsFunctions | IPollFunctions;
3
+ export interface ExadoRequestOptions {
4
+ body?: IDataObject | IDataObject[] | string | Buffer;
5
+ qs?: IDataObject;
6
+ headers?: IDataObject;
7
+ formData?: IDataObject;
8
+ encoding?: 'arraybuffer' | 'stream' | 'text' | 'json' | null;
9
+ returnFullResponse?: boolean;
10
+ json?: boolean;
11
+ }
12
+ export declare function exadoApiRequest(this: ExadoContext, method: IHttpRequestMethods, endpoint: string, options?: ExadoRequestOptions, itemIndex?: number): Promise<unknown>;
13
+ export declare function exadoApiRequestRaw(this: ExadoContext, method: IHttpRequestMethods, endpoint: string, options?: ExadoRequestOptions, itemIndex?: number): Promise<IDataObject>;
14
+ export declare function unwrapEnvelope(response: unknown): unknown;
15
+ export {};
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.exadoApiRequest = exadoApiRequest;
4
+ exports.exadoApiRequestRaw = exadoApiRequestRaw;
5
+ exports.unwrapEnvelope = unwrapEnvelope;
6
+ const n8n_workflow_1 = require("n8n-workflow");
7
+ function normalizeBaseUrl(raw) {
8
+ return raw.replace(/\/+$/, '');
9
+ }
10
+ function buildUrl(baseUrl, endpoint) {
11
+ const cleanBase = normalizeBaseUrl(baseUrl);
12
+ const path = endpoint.startsWith('/') ? endpoint : `/${endpoint}`;
13
+ const prefixed = path.startsWith('/api/') || path === '/api' ? path : `/api${path}`;
14
+ return `${cleanBase}${prefixed}`;
15
+ }
16
+ async function exadoApiRequest(method, endpoint, options = {}, itemIndex) {
17
+ var _a;
18
+ const credentials = (await this.getCredentials('exadoApi'));
19
+ const url = buildUrl(credentials.baseUrl, endpoint);
20
+ const requestOptions = {
21
+ method,
22
+ url,
23
+ json: (_a = options.json) !== null && _a !== void 0 ? _a : true,
24
+ };
25
+ if (options.body !== undefined) {
26
+ requestOptions.body = options.body;
27
+ }
28
+ if (options.qs !== undefined) {
29
+ requestOptions.qs = options.qs;
30
+ }
31
+ if (options.headers !== undefined) {
32
+ requestOptions.headers = options.headers;
33
+ }
34
+ if (options.formData !== undefined) {
35
+ requestOptions.formData = options.formData;
36
+ requestOptions.json = false;
37
+ }
38
+ if (options.encoding !== undefined) {
39
+ requestOptions.encoding = options.encoding;
40
+ }
41
+ if (options.returnFullResponse) {
42
+ requestOptions.returnFullResponse = true;
43
+ }
44
+ try {
45
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, 'exadoApi', requestOptions);
46
+ if (options.returnFullResponse || options.encoding === 'stream') {
47
+ return response;
48
+ }
49
+ return unwrapEnvelope(response);
50
+ }
51
+ catch (error) {
52
+ throw toNodeApiError.call(this, error, endpoint, itemIndex);
53
+ }
54
+ }
55
+ async function exadoApiRequestRaw(method, endpoint, options = {}, itemIndex) {
56
+ var _a;
57
+ const credentials = (await this.getCredentials('exadoApi'));
58
+ const url = buildUrl(credentials.baseUrl, endpoint);
59
+ const requestOptions = {
60
+ method,
61
+ url,
62
+ json: (_a = options.json) !== null && _a !== void 0 ? _a : true,
63
+ };
64
+ if (options.body !== undefined)
65
+ requestOptions.body = options.body;
66
+ if (options.qs !== undefined)
67
+ requestOptions.qs = options.qs;
68
+ if (options.headers !== undefined)
69
+ requestOptions.headers = options.headers;
70
+ try {
71
+ const response = (await this.helpers.httpRequestWithAuthentication.call(this, 'exadoApi', requestOptions));
72
+ return response;
73
+ }
74
+ catch (error) {
75
+ throw toNodeApiError.call(this, error, endpoint, itemIndex);
76
+ }
77
+ }
78
+ function unwrapEnvelope(response) {
79
+ if (!response || typeof response !== 'object')
80
+ return response;
81
+ const obj = response;
82
+ if ('success' in obj && 'data' in obj) {
83
+ return obj.data;
84
+ }
85
+ return response;
86
+ }
87
+ function toNodeApiError(error, endpoint, itemIndex) {
88
+ var _a, _b, _c, _d;
89
+ const node = this.getNode();
90
+ if (error instanceof n8n_workflow_1.NodeApiError)
91
+ return error;
92
+ const errObj = (error !== null && error !== void 0 ? error : {});
93
+ const status = (_d = (_c = (_a = errObj.statusCode) !== null && _a !== void 0 ? _a : (_b = errObj.response) === null || _b === void 0 ? void 0 : _b.statusCode) !== null && _c !== void 0 ? _c : errObj.httpCode) !== null && _d !== void 0 ? _d : 'unknown';
94
+ const description = `Endpoint: ${endpoint}`;
95
+ return new n8n_workflow_1.NodeApiError(node, errObj, {
96
+ message: `Exado API error (${status})`,
97
+ description,
98
+ itemIndex,
99
+ });
100
+ }
101
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../nodes/Exado/helpers/request.ts"],"names":[],"mappings":";;AAwDA,0CAkDC;AAMD,gDA6BC;AAOD,wCAOC;AAjJD,+CAA4C;AAqB5C,SAAS,gBAAgB,CAAC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AAA,MAAA,MAAA,MAAM,CAAC,UAAU,mCAAI,MAAA,MAAM,CAAC,QAAQ,0CAAE,UAAU,mCAAI,MAAM,CAAC,QAAQ,mCAAI,SAAS,CAAC;IAClF,MAAM,WAAW,GAAG,aAAa,QAAQ,EAAE,CAAC;IAC5C,OAAO,IAAI,2BAAY,CAAC,IAAI,EAAE,MAAM,EAAE;QACrC,OAAO,EAAE,oBAAoB,MAAM,GAAG;QACtC,WAAW;QACX,SAAS;KACT,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Readable } from 'stream';
2
+ export interface SseParseOptions {
3
+ parseJson?: boolean;
4
+ }
5
+ export interface SseFrame {
6
+ raw: string;
7
+ json?: Record<string, unknown>;
8
+ isError?: boolean;
9
+ errorMessage?: string;
10
+ }
11
+ export declare function parseSseStream(stream: Readable, options?: SseParseOptions): AsyncGenerator<SseFrame, void, void>;
12
+ export declare function extractDeltaText(json: Record<string, unknown> | undefined): string;
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseSseStream = parseSseStream;
4
+ exports.extractDeltaText = extractDeltaText;
5
+ const DONE_SENTINEL = '[DONE]';
6
+ const ERROR_PREFIX = '[ERROR]';
7
+ async function* parseSseStream(stream, options = {}) {
8
+ let buffer = '';
9
+ for await (const chunk of stream) {
10
+ buffer += typeof chunk === 'string' ? chunk : Buffer.from(chunk).toString('utf-8');
11
+ let separatorIndex;
12
+ while ((separatorIndex = nextFrameBoundary(buffer)) !== -1) {
13
+ const rawFrame = buffer.slice(0, separatorIndex);
14
+ buffer = buffer.slice(separatorIndex + boundaryLength(buffer, separatorIndex));
15
+ const frame = extractFramePayload(rawFrame);
16
+ if (frame === null)
17
+ continue;
18
+ if (frame === DONE_SENTINEL)
19
+ return;
20
+ yield buildFrame(frame, options);
21
+ }
22
+ }
23
+ const tail = extractFramePayload(buffer);
24
+ if (tail !== null && tail !== DONE_SENTINEL) {
25
+ yield buildFrame(tail, options);
26
+ }
27
+ }
28
+ function nextFrameBoundary(buffer) {
29
+ const lf = buffer.indexOf('\n\n');
30
+ const crlf = buffer.indexOf('\r\n\r\n');
31
+ if (lf === -1)
32
+ return crlf;
33
+ if (crlf === -1)
34
+ return lf;
35
+ return Math.min(lf, crlf);
36
+ }
37
+ function boundaryLength(buffer, index) {
38
+ return buffer.startsWith('\r\n\r\n', index) ? 4 : 2;
39
+ }
40
+ function extractFramePayload(rawFrame) {
41
+ if (!rawFrame)
42
+ return null;
43
+ const lines = rawFrame.split(/\r?\n/);
44
+ const data = [];
45
+ for (const line of lines) {
46
+ if (line.startsWith(':'))
47
+ continue;
48
+ if (line.startsWith('data:')) {
49
+ data.push(line.slice(5).replace(/^ /, ''));
50
+ }
51
+ }
52
+ if (data.length === 0)
53
+ return null;
54
+ return data.join('\n');
55
+ }
56
+ function buildFrame(payload, options) {
57
+ if (payload.startsWith(ERROR_PREFIX)) {
58
+ return {
59
+ raw: payload,
60
+ isError: true,
61
+ errorMessage: payload.slice(ERROR_PREFIX.length).trim(),
62
+ };
63
+ }
64
+ if (options.parseJson) {
65
+ try {
66
+ return { raw: payload, json: JSON.parse(payload) };
67
+ }
68
+ catch {
69
+ }
70
+ }
71
+ return { raw: payload };
72
+ }
73
+ function extractDeltaText(json) {
74
+ if (!json)
75
+ return '';
76
+ const choices = json.choices;
77
+ if (!Array.isArray(choices) || choices.length === 0)
78
+ return '';
79
+ const first = choices[0];
80
+ const delta = first.delta;
81
+ if (delta && typeof delta.content === 'string')
82
+ return delta.content;
83
+ if (typeof first.text === 'string')
84
+ return first.text;
85
+ return '';
86
+ }
87
+ //# sourceMappingURL=sse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sse.js","sourceRoot":"","sources":["../../../../nodes/Exado/helpers/sse.ts"],"names":[],"mappings":";;AA8BA,wCA2BC;AA0DD,4CASC;AAtGD,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,MAAM,YAAY,GAAG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AC,CAAC,IAAI,EAAE;SACvD,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACvB,IAAI,CAAC;YACJ,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAA4B,EAAE,CAAC;QAC/E,CAAC;QAAC,MAAM,CAAC;QAET,CAAC;IACF,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AACzB,CAAC;AAOD,SAAgB,gBAAgB,CAAC,IAAyC;IACzE,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAqD,CAAC;IAC3E,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC/D,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,KAAK,GAAG,KAAK,CAAC,KAA4C,CAAC;IACjE,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC,OAAO,CAAC;IACrE,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC,IAAI,CAAC;IACtD,OAAO,EAAE,CAAC;AACX,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IDataObject, IExecuteFunctions } from 'n8n-workflow';
2
+ export declare function buildUploadFormData(this: IExecuteFunctions, itemIndex: number, binaryPropertyName: string, extra?: IDataObject): Promise<IDataObject>;