n8n-nodes-2kw 5.3.0-dev.22
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/LICENSE +21 -0
- package/README.md +129 -0
- package/dist/credentials/TwoKwApi.credentials.d.ts +9 -0
- package/dist/credentials/TwoKwApi.credentials.js +43 -0
- package/dist/credentials/TwoKwApi.credentials.js.map +1 -0
- package/dist/nodes/TwoKw/TwoKw.node.d.ts +9 -0
- package/dist/nodes/TwoKw/TwoKw.node.js +76 -0
- package/dist/nodes/TwoKw/TwoKw.node.js.map +1 -0
- package/dist/nodes/TwoKw/descriptions/document.d.ts +3 -0
- package/dist/nodes/TwoKw/descriptions/document.js +128 -0
- package/dist/nodes/TwoKw/descriptions/document.js.map +1 -0
- package/dist/nodes/TwoKw/descriptions/extraction.d.ts +3 -0
- package/dist/nodes/TwoKw/descriptions/extraction.js +173 -0
- package/dist/nodes/TwoKw/descriptions/extraction.js.map +1 -0
- package/dist/nodes/TwoKw/descriptions/index.d.ts +3 -0
- package/dist/nodes/TwoKw/descriptions/index.js +35 -0
- package/dist/nodes/TwoKw/descriptions/index.js.map +1 -0
- package/dist/nodes/TwoKw/descriptions/prompt.d.ts +3 -0
- package/dist/nodes/TwoKw/descriptions/prompt.js +113 -0
- package/dist/nodes/TwoKw/descriptions/prompt.js.map +1 -0
- package/dist/nodes/TwoKw/descriptions/schema.d.ts +3 -0
- package/dist/nodes/TwoKw/descriptions/schema.js +45 -0
- package/dist/nodes/TwoKw/descriptions/schema.js.map +1 -0
- package/dist/nodes/TwoKw/descriptions/transcription.d.ts +3 -0
- package/dist/nodes/TwoKw/descriptions/transcription.js +76 -0
- package/dist/nodes/TwoKw/descriptions/transcription.js.map +1 -0
- package/dist/nodes/TwoKw/icon.svg +4 -0
- package/dist/nodes/TwoKw/methods.d.ts +11 -0
- package/dist/nodes/TwoKw/methods.js +95 -0
- package/dist/nodes/TwoKw/methods.js.map +1 -0
- package/dist/nodes/TwoKw/operations/document.d.ts +2 -0
- package/dist/nodes/TwoKw/operations/document.js +64 -0
- package/dist/nodes/TwoKw/operations/document.js.map +1 -0
- package/dist/nodes/TwoKw/operations/extraction.d.ts +2 -0
- package/dist/nodes/TwoKw/operations/extraction.js +92 -0
- package/dist/nodes/TwoKw/operations/extraction.js.map +1 -0
- package/dist/nodes/TwoKw/operations/prompt.d.ts +2 -0
- package/dist/nodes/TwoKw/operations/prompt.js +48 -0
- package/dist/nodes/TwoKw/operations/prompt.js.map +1 -0
- package/dist/nodes/TwoKw/operations/schema.d.ts +2 -0
- package/dist/nodes/TwoKw/operations/schema.js +18 -0
- package/dist/nodes/TwoKw/operations/schema.js.map +1 -0
- package/dist/nodes/TwoKw/operations/transcription.d.ts +2 -0
- package/dist/nodes/TwoKw/operations/transcription.js +42 -0
- package/dist/nodes/TwoKw/operations/transcription.js.map +1 -0
- package/dist/nodes/TwoKw/polling.d.ts +8 -0
- package/dist/nodes/TwoKw/polling.js +17 -0
- package/dist/nodes/TwoKw/polling.js.map +1 -0
- package/dist/nodes/TwoKw/splitConvert.d.ts +10 -0
- package/dist/nodes/TwoKw/splitConvert.js +20 -0
- package/dist/nodes/TwoKw/splitConvert.js.map +1 -0
- package/dist/nodes/TwoKw/transport.d.ts +17 -0
- package/dist/nodes/TwoKw/transport.js +51 -0
- package/dist/nodes/TwoKw/transport.js.map +1 -0
- package/index.js +8 -0
- package/package.json +62 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resourceProperties = exports.resourceField = void 0;
|
|
4
|
+
const schema_1 = require("./schema");
|
|
5
|
+
const prompt_1 = require("./prompt");
|
|
6
|
+
const extraction_1 = require("./extraction");
|
|
7
|
+
const document_1 = require("./document");
|
|
8
|
+
const transcription_1 = require("./transcription");
|
|
9
|
+
exports.resourceField = {
|
|
10
|
+
displayName: 'Resource',
|
|
11
|
+
name: 'resource',
|
|
12
|
+
type: 'options',
|
|
13
|
+
noDataExpression: true,
|
|
14
|
+
default: 'schema',
|
|
15
|
+
options: [
|
|
16
|
+
{ name: 'Schema', value: 'schema' },
|
|
17
|
+
{ name: 'Prompt', value: 'prompt' },
|
|
18
|
+
{ name: 'Extraction', value: 'extraction' },
|
|
19
|
+
{ name: 'Document', value: 'document' },
|
|
20
|
+
{ name: 'Transcription', value: 'transcription' },
|
|
21
|
+
],
|
|
22
|
+
};
|
|
23
|
+
exports.resourceProperties = [
|
|
24
|
+
schema_1.schemaOperations,
|
|
25
|
+
...schema_1.schemaFields,
|
|
26
|
+
prompt_1.promptOperations,
|
|
27
|
+
...prompt_1.promptFields,
|
|
28
|
+
extraction_1.extractionOperations,
|
|
29
|
+
...extraction_1.extractionFields,
|
|
30
|
+
document_1.documentOperations,
|
|
31
|
+
...document_1.documentFields,
|
|
32
|
+
transcription_1.transcriptionOperations,
|
|
33
|
+
...transcription_1.transcriptionFields,
|
|
34
|
+
];
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/TwoKw/descriptions/index.ts"],"names":[],"mappings":";;;AACA,qCAA0D;AAC1D,qCAA0D;AAC1D,6CAAsE;AACtE,yCAAgE;AAChE,mDAA+E;AAElE,QAAA,aAAa,GAAoB;IAC5C,WAAW,EAAE,UAAU;IACvB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE,IAAI;IACtB,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE;QACP,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;QACnC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;QACnC,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;QAC3C,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;QACvC,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;KAClD;CACF,CAAC;AAEW,QAAA,kBAAkB,GAAsB;IACnD,yBAAgB;IAChB,GAAG,qBAAY;IACf,yBAAgB;IAChB,GAAG,qBAAY;IACf,iCAAoB;IACpB,GAAG,6BAAgB;IACnB,6BAAkB;IAClB,GAAG,yBAAc;IACjB,uCAAuB;IACvB,GAAG,mCAAmB;CACvB,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.promptFields = exports.promptOperations = void 0;
|
|
4
|
+
exports.promptOperations = {
|
|
5
|
+
displayName: 'Operation',
|
|
6
|
+
name: 'operation',
|
|
7
|
+
type: 'options',
|
|
8
|
+
noDataExpression: true,
|
|
9
|
+
displayOptions: { show: { resource: ['prompt'] } },
|
|
10
|
+
default: 'get',
|
|
11
|
+
options: [
|
|
12
|
+
{ name: 'Get', value: 'get', description: 'Retrieve prompt metadata', action: 'Get a prompt' },
|
|
13
|
+
{
|
|
14
|
+
name: 'Compile',
|
|
15
|
+
value: 'compile',
|
|
16
|
+
description: 'Compile a prompt with variables',
|
|
17
|
+
action: 'Compile a prompt',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'Resolve',
|
|
21
|
+
value: 'resolve',
|
|
22
|
+
description: 'Get the active prompt content (no variable interpolation)',
|
|
23
|
+
action: 'Resolve a prompt',
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
const promptResourceLocator = {
|
|
28
|
+
displayName: 'Prompt',
|
|
29
|
+
name: 'prompt',
|
|
30
|
+
type: 'resourceLocator',
|
|
31
|
+
default: { mode: 'list', value: '' },
|
|
32
|
+
required: true,
|
|
33
|
+
displayOptions: { show: { resource: ['prompt'] } },
|
|
34
|
+
description: 'Pick from a list or paste a prompt ID',
|
|
35
|
+
modes: [
|
|
36
|
+
{
|
|
37
|
+
displayName: 'From List',
|
|
38
|
+
name: 'list',
|
|
39
|
+
type: 'list',
|
|
40
|
+
typeOptions: { searchListMethod: 'searchPrompts', searchable: true },
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayName: 'By ID',
|
|
44
|
+
name: 'id',
|
|
45
|
+
type: 'string',
|
|
46
|
+
placeholder: 'e041c4fa-7dcc-4db5-b5b3-c104285b73c9',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
exports.promptFields = [
|
|
51
|
+
promptResourceLocator,
|
|
52
|
+
{
|
|
53
|
+
displayName: 'Variables',
|
|
54
|
+
name: 'variables',
|
|
55
|
+
type: 'json',
|
|
56
|
+
default: '{}',
|
|
57
|
+
displayOptions: { show: { resource: ['prompt'], operation: ['compile'] } },
|
|
58
|
+
description: 'JSON object of variables to interpolate into the prompt template',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
displayName: 'Version ID',
|
|
62
|
+
name: 'versionId',
|
|
63
|
+
type: 'string',
|
|
64
|
+
default: '',
|
|
65
|
+
description: 'Optional. Pin to a specific version. Mutually exclusive with Label.',
|
|
66
|
+
displayOptions: { show: { resource: ['prompt'], operation: ['compile'] } },
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
displayName: 'Label',
|
|
70
|
+
name: 'label',
|
|
71
|
+
type: 'resourceLocator',
|
|
72
|
+
default: { mode: 'list', value: '' },
|
|
73
|
+
description: 'Optional. Compile the version associated with this label (e.g. "prod"). Mutually exclusive with Version ID.',
|
|
74
|
+
displayOptions: { show: { resource: ['prompt'], operation: ['compile'] } },
|
|
75
|
+
modes: [
|
|
76
|
+
{
|
|
77
|
+
displayName: 'From List',
|
|
78
|
+
name: 'list',
|
|
79
|
+
type: 'list',
|
|
80
|
+
typeOptions: { searchListMethod: 'searchPromptLabels', searchable: false },
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
displayName: 'By Name',
|
|
84
|
+
name: 'id',
|
|
85
|
+
type: 'string',
|
|
86
|
+
placeholder: 'prod',
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
displayName: 'Label',
|
|
92
|
+
name: 'resolveLabel',
|
|
93
|
+
type: 'resourceLocator',
|
|
94
|
+
default: { mode: 'list', value: '' },
|
|
95
|
+
description: 'Optional. Pin to a specific labelled version. Leave empty for the active version.',
|
|
96
|
+
displayOptions: { show: { resource: ['prompt'], operation: ['resolve'] } },
|
|
97
|
+
modes: [
|
|
98
|
+
{
|
|
99
|
+
displayName: 'From List',
|
|
100
|
+
name: 'list',
|
|
101
|
+
type: 'list',
|
|
102
|
+
typeOptions: { searchListMethod: 'searchPromptLabels', searchable: false },
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
displayName: 'By Name',
|
|
106
|
+
name: 'id',
|
|
107
|
+
type: 'string',
|
|
108
|
+
placeholder: 'prod',
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
];
|
|
113
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../nodes/TwoKw/descriptions/prompt.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAoB;IAC/C,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE;IAClD,OAAO,EAAE,KAAK;IACd,OAAO,EAAE;QACP,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,0BAA0B,EAAE,MAAM,EAAE,cAAc,EAAE;QAC9F;YACE,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;YACh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BACtB,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,MAAM;aACpB;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schemaFields = exports.schemaOperations = void 0;
|
|
4
|
+
exports.schemaOperations = {
|
|
5
|
+
displayName: 'Operation',
|
|
6
|
+
name: 'operation',
|
|
7
|
+
type: 'options',
|
|
8
|
+
noDataExpression: true,
|
|
9
|
+
displayOptions: { show: { resource: ['schema'] } },
|
|
10
|
+
default: 'get',
|
|
11
|
+
options: [
|
|
12
|
+
{
|
|
13
|
+
name: 'Get',
|
|
14
|
+
value: 'get',
|
|
15
|
+
description: 'Retrieve a schema by ID',
|
|
16
|
+
action: 'Get a schema',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
};
|
|
20
|
+
exports.schemaFields = [
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Schema',
|
|
23
|
+
name: 'schema',
|
|
24
|
+
type: 'resourceLocator',
|
|
25
|
+
default: { mode: 'list', value: '' },
|
|
26
|
+
required: true,
|
|
27
|
+
displayOptions: { show: { resource: ['schema'], operation: ['get'] } },
|
|
28
|
+
description: 'Pick from a list or paste a schema ID',
|
|
29
|
+
modes: [
|
|
30
|
+
{
|
|
31
|
+
displayName: 'From List',
|
|
32
|
+
name: 'list',
|
|
33
|
+
type: 'list',
|
|
34
|
+
typeOptions: { searchListMethod: 'searchSchemas', searchable: true },
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
displayName: 'By ID',
|
|
38
|
+
name: 'id',
|
|
39
|
+
type: 'string',
|
|
40
|
+
placeholder: '78af6e26-30b4-4677-bb3f-a2494444380c',
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
];
|
|
45
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../nodes/TwoKw/descriptions/schema.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAoB;IAC/C,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE;IAClD,OAAO,EAAE,KAAK;IACd,OAAO,EAAE;QACP;YACE,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,KAAK;YACZ,WAAW,EAAE,yBAAyB;YACtC,MAAM,EAAE,cAAc;SACvB;KACF;CACF,CAAC;AAEW,QAAA,YAAY,GAAsB;IAC7C;QACE,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;QACpC,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE;QACtE,WAAW,EAAE,uCAAuC;QACpD,KAAK,EAAE;YACL;gBACE,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,EAAE,gBAAgB,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE;aACrE;YACD;gBACE,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sCAAsC;aACpD;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transcriptionFields = exports.transcriptionOperations = void 0;
|
|
4
|
+
exports.transcriptionOperations = {
|
|
5
|
+
displayName: 'Operation',
|
|
6
|
+
name: 'operation',
|
|
7
|
+
type: 'options',
|
|
8
|
+
noDataExpression: true,
|
|
9
|
+
displayOptions: { show: { resource: ['transcription'] } },
|
|
10
|
+
default: 'transcribe',
|
|
11
|
+
options: [
|
|
12
|
+
{
|
|
13
|
+
name: 'Transcribe',
|
|
14
|
+
value: 'transcribe',
|
|
15
|
+
description: 'Transcribe audio to text',
|
|
16
|
+
action: 'Transcribe audio',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
};
|
|
20
|
+
exports.transcriptionFields = [
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Binary Property Name',
|
|
23
|
+
name: 'binaryPropertyName',
|
|
24
|
+
type: 'string',
|
|
25
|
+
required: true,
|
|
26
|
+
default: 'data',
|
|
27
|
+
displayOptions: { show: { resource: ['transcription'], operation: ['transcribe'] } },
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
displayName: 'Model',
|
|
31
|
+
name: 'model',
|
|
32
|
+
type: 'string',
|
|
33
|
+
required: true,
|
|
34
|
+
default: 'openai/whisper-1',
|
|
35
|
+
displayOptions: { show: { resource: ['transcription'], operation: ['transcribe'] } },
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
displayName: 'Language',
|
|
39
|
+
name: 'language',
|
|
40
|
+
type: 'string',
|
|
41
|
+
default: '',
|
|
42
|
+
description: 'ISO-639-1 code (e.g. en, de). Optional.',
|
|
43
|
+
displayOptions: { show: { resource: ['transcription'], operation: ['transcribe'] } },
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
displayName: 'Prompt',
|
|
47
|
+
name: 'prompt',
|
|
48
|
+
type: 'string',
|
|
49
|
+
default: '',
|
|
50
|
+
description: 'Optional context text to bias transcription',
|
|
51
|
+
displayOptions: { show: { resource: ['transcription'], operation: ['transcribe'] } },
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
displayName: 'Response Format',
|
|
55
|
+
name: 'responseFormat',
|
|
56
|
+
type: 'options',
|
|
57
|
+
default: 'json',
|
|
58
|
+
options: [
|
|
59
|
+
{ name: 'JSON', value: 'json' },
|
|
60
|
+
{ name: 'Text', value: 'text' },
|
|
61
|
+
{ name: 'SRT', value: 'srt' },
|
|
62
|
+
{ name: 'Verbose JSON', value: 'verbose_json' },
|
|
63
|
+
{ name: 'VTT', value: 'vtt' },
|
|
64
|
+
],
|
|
65
|
+
displayOptions: { show: { resource: ['transcription'], operation: ['transcribe'] } },
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
displayName: 'Temperature',
|
|
69
|
+
name: 'temperature',
|
|
70
|
+
type: 'string',
|
|
71
|
+
default: '',
|
|
72
|
+
description: 'Optional sampling temperature (0–1)',
|
|
73
|
+
displayOptions: { show: { resource: ['transcription'], operation: ['transcribe'] } },
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
//# sourceMappingURL=transcription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcription.js","sourceRoot":"","sources":["../../../../nodes/TwoKw/descriptions/transcription.ts"],"names":[],"mappings":";;;AAEa,QAAA,uBAAuB,GAAoB;IACtD,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;IACzD,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE;QACP;YACE,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,0BAA0B;YACvC,MAAM,EAAE,kBAAkB;SAC3B;KACF;CACF,CAAC;AAEW,QAAA,mBAAmB,GAAsB;IACpD;QACE,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE,oBAAoB;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K,EAAE,KAAK,EAAE,KAAK,EAAE;YAC7B,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;YAC/C,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;SAC9B;QACD,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,SAAS,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE;KACrF;IACD;QACE,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,qCAAqC;QAClD,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE,SAAS,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE;KACrF;CACF,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" width="60" height="60">
|
|
2
|
+
<rect width="60" height="60" rx="12" fill="#0F172A"/>
|
|
3
|
+
<text x="50%" y="55%" font-family="Inter, system-ui, sans-serif" font-size="22" font-weight="700" fill="#F8FAFC" text-anchor="middle" dominant-baseline="middle">2kw</text>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow';
|
|
2
|
+
export declare const methods: {
|
|
3
|
+
listSearch: {
|
|
4
|
+
searchSchemas(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
|
|
5
|
+
searchPrompts(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
|
|
6
|
+
searchSchemaVersions(this: ILoadOptionsFunctions): Promise<INodeListSearchResult>;
|
|
7
|
+
searchSchemaLabels(this: ILoadOptionsFunctions): Promise<INodeListSearchResult>;
|
|
8
|
+
searchPromptVersions(this: ILoadOptionsFunctions): Promise<INodeListSearchResult>;
|
|
9
|
+
searchPromptLabels(this: ILoadOptionsFunctions): Promise<INodeListSearchResult>;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.methods = void 0;
|
|
4
|
+
const transport_1 = require("./transport");
|
|
5
|
+
async function backboneGet(ctx, path, query) {
|
|
6
|
+
const credentials = (await ctx.getCredentials('2kwApi'));
|
|
7
|
+
const baseUrl = String(credentials.baseUrl).replace(/\/+$/, '');
|
|
8
|
+
return ctx.helpers.httpRequestWithAuthentication.call(ctx, '2kwApi', {
|
|
9
|
+
method: 'GET',
|
|
10
|
+
url: `${baseUrl}${path}`,
|
|
11
|
+
qs: query,
|
|
12
|
+
json: true,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function pageQuery(filter) {
|
|
16
|
+
const q = { page: 0, size: 100 };
|
|
17
|
+
if (filter && filter.length > 0)
|
|
18
|
+
q.search = filter;
|
|
19
|
+
return q;
|
|
20
|
+
}
|
|
21
|
+
function readParentId(ctx, name) {
|
|
22
|
+
return (0, transport_1.extractResourceId)(ctx.getCurrentNodeParameter(name));
|
|
23
|
+
}
|
|
24
|
+
function formatVersion(v) {
|
|
25
|
+
const num = typeof v.versionNumber === 'number' ? `v${v.versionNumber}` : 'v?';
|
|
26
|
+
const active = v.isActive ? ' (active)' : '';
|
|
27
|
+
const desc = v.changeDescription ? ` — ${v.changeDescription}` : '';
|
|
28
|
+
return `${num}${active}${desc}`;
|
|
29
|
+
}
|
|
30
|
+
exports.methods = {
|
|
31
|
+
listSearch: {
|
|
32
|
+
async searchSchemas(filter) {
|
|
33
|
+
const data = (await backboneGet(this, '/v1/schemas', pageQuery(filter)));
|
|
34
|
+
return {
|
|
35
|
+
results: (data.content ?? []).map((s) => ({ name: s.name, value: s.id })),
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
async searchPrompts(filter) {
|
|
39
|
+
const data = (await backboneGet(this, '/v1/prompts', pageQuery(filter)));
|
|
40
|
+
return {
|
|
41
|
+
results: (data.content ?? []).map((p) => ({ name: p.name, value: p.id })),
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
async searchSchemaVersions() {
|
|
45
|
+
const schemaId = readParentId(this, 'schema');
|
|
46
|
+
if (!schemaId)
|
|
47
|
+
return { results: [] };
|
|
48
|
+
const data = (await backboneGet(this, `/v1/schemas/${encodeURIComponent(schemaId)}/versions`, {
|
|
49
|
+
page: 0,
|
|
50
|
+
size: 100,
|
|
51
|
+
}));
|
|
52
|
+
return {
|
|
53
|
+
results: (data.content ?? []).map((v) => ({ name: formatVersion(v), value: v.id })),
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
async searchSchemaLabels() {
|
|
57
|
+
const schemaId = readParentId(this, 'schema');
|
|
58
|
+
if (!schemaId)
|
|
59
|
+
return { results: [] };
|
|
60
|
+
const data = (await backboneGet(this, `/v1/schemas/${encodeURIComponent(schemaId)}/labels`));
|
|
61
|
+
return {
|
|
62
|
+
results: (data ?? [])
|
|
63
|
+
.filter((l) => !!l.schemaVersionId)
|
|
64
|
+
.map((l) => ({
|
|
65
|
+
name: typeof l.versionNumber === 'number'
|
|
66
|
+
? `${l.name} (v${l.versionNumber})`
|
|
67
|
+
: l.name,
|
|
68
|
+
value: l.schemaVersionId,
|
|
69
|
+
})),
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
async searchPromptVersions() {
|
|
73
|
+
const promptId = readParentId(this, 'prompt');
|
|
74
|
+
if (!promptId)
|
|
75
|
+
return { results: [] };
|
|
76
|
+
const data = (await backboneGet(this, `/v1/prompts/${encodeURIComponent(promptId)}/versions`, {
|
|
77
|
+
page: 0,
|
|
78
|
+
size: 100,
|
|
79
|
+
}));
|
|
80
|
+
return {
|
|
81
|
+
results: (data.content ?? []).map((v) => ({ name: formatVersion(v), value: v.id })),
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
async searchPromptLabels() {
|
|
85
|
+
const promptId = readParentId(this, 'prompt');
|
|
86
|
+
if (!promptId)
|
|
87
|
+
return { results: [] };
|
|
88
|
+
const data = (await backboneGet(this, `/v1/prompts/${encodeURIComponent(promptId)}/labels`));
|
|
89
|
+
return {
|
|
90
|
+
results: (data ?? []).map((l) => ({ name: l.name, value: l.name })),
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=methods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../nodes/TwoKw/methods.ts"],"names":[],"mappings":";;;AACA,2CAAgD;AAOhD,KAAK,UAAU,WAAW,CACxB,GAA0B,EAC1B,IAAY,EACZ,KAAmB;IAEnB,MAAM,WAAW,GAAG,CAAC,MAAM,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAgC,CAAC;IACxF,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAChE,OAAO,GAAG,CAAC,OAAO,CAAC,6BAA6B,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE;QACnE,MAAM,EAAE,KAAK;QACb,GAAG,EAAE,GAAG,OAAO,GAAG,IAAI,EAAE;QACxB,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,IAAI;KACX,CAAC,CAAC;AACL,CAAC;AAED,SAAS,SAAS,CAAC,MAAe;IAChC,MAAM,CAAC,GAAgB,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IAC9C,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;IACnD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,YAA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CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;aACpE,CAAC;QACJ,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executeDocument = executeDocument;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const transport_1 = require("../transport");
|
|
6
|
+
const splitConvert_1 = require("../splitConvert");
|
|
7
|
+
async function executeDocument(itemIndex, operation) {
|
|
8
|
+
if (operation === 'convertSource') {
|
|
9
|
+
const sourceType = this.getNodeParameter('sourceType', itemIndex);
|
|
10
|
+
const pipeline = this.getNodeParameter('pipeline', itemIndex);
|
|
11
|
+
const outputFormats = this.getNodeParameter('outputFormats', itemIndex);
|
|
12
|
+
let source;
|
|
13
|
+
if (sourceType === 'url') {
|
|
14
|
+
const url = this.getNodeParameter('sourceUrl', itemIndex);
|
|
15
|
+
const rawHeaders = this.getNodeParameter('sourceHeaders', itemIndex);
|
|
16
|
+
const headers = typeof rawHeaders === 'string'
|
|
17
|
+
? JSON.parse(rawHeaders || '{}')
|
|
18
|
+
: rawHeaders;
|
|
19
|
+
source = { kind: 'http', url };
|
|
20
|
+
if (Object.keys(headers).length > 0)
|
|
21
|
+
source.headers = headers;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
source = {
|
|
25
|
+
kind: 'base64',
|
|
26
|
+
content: this.getNodeParameter('sourceData', itemIndex),
|
|
27
|
+
mimeType: this.getNodeParameter('sourceMimeType', itemIndex),
|
|
28
|
+
filename: this.getNodeParameter('sourceFilename', itemIndex),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const response = (await (0, transport_1.apiRequest)(this, 'POST', '/v1/convert/source', {
|
|
32
|
+
body: {
|
|
33
|
+
sources: [source],
|
|
34
|
+
options: { pipeline, options: { outputFormats } },
|
|
35
|
+
},
|
|
36
|
+
}));
|
|
37
|
+
return (0, splitConvert_1.splitConvertResponse)(response, itemIndex);
|
|
38
|
+
}
|
|
39
|
+
if (operation !== 'convert') {
|
|
40
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown document operation: ${operation}`, {
|
|
41
|
+
itemIndex,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
// Convert (multipart) op
|
|
45
|
+
const propertyName = this.getNodeParameter('binaryPropertyName', itemIndex);
|
|
46
|
+
const outputFormats = this.getNodeParameter('outputFormats', itemIndex);
|
|
47
|
+
const item = this.getInputData()[itemIndex];
|
|
48
|
+
const binaryEntry = item.binary?.[propertyName];
|
|
49
|
+
if (!binaryEntry) {
|
|
50
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Binary property "${propertyName}" not found on input item`, { itemIndex });
|
|
51
|
+
}
|
|
52
|
+
const buffer = await this.helpers.getBinaryDataBuffer(itemIndex, propertyName);
|
|
53
|
+
const response = (await (0, transport_1.apiRequest)(this, 'POST', '/v1/convert/file', {
|
|
54
|
+
formData: { options: JSON.stringify({ options: { outputFormats } }) },
|
|
55
|
+
binary: {
|
|
56
|
+
fieldName: 'files',
|
|
57
|
+
buffer,
|
|
58
|
+
filename: binaryEntry.fileName ?? 'document',
|
|
59
|
+
mimeType: binaryEntry.mimeType ?? 'application/octet-stream',
|
|
60
|
+
},
|
|
61
|
+
}));
|
|
62
|
+
return (0, splitConvert_1.splitConvertResponse)(response, itemIndex);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.js","sourceRoot":"","sources":["../../../../nodes/TwoKw/operations/document.ts"],"names":[],"mappings":";;AAQA,0CAsEC;AA9ED,+CAIsB;AACtB,4CAA0C;AAC1C,kDAAuD;AAEhD,KAAK,UAAU,eAAe,C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E,EAAE,CAAC,EAAE;QACrE,MAAM,EAAE;YACN,SAAS,EAAE,OAAO;YAClB,MAAM;YACN,QAAQ,EAAE,WAAW,CAAC,QAAQ,IAAI,UAAU;YAC5C,QAAQ,EAAE,WAAW,CAAC,QAAQ,IAAI,0BAA0B;SAC7D;KACF,CAAC,CAA+C,CAAC;IAElD,OAAO,IAAA,mCAAoB,EAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executeExtraction = executeExtraction;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const transport_1 = require("../transport");
|
|
6
|
+
const polling_1 = require("../polling");
|
|
7
|
+
async function executeExtraction(itemIndex, operation) {
|
|
8
|
+
if (operation === 'get') {
|
|
9
|
+
const extractionId = this.getNodeParameter('extractionId', itemIndex);
|
|
10
|
+
const result = await (0, transport_1.apiRequest)(this, 'GET', '/v1/extractions/{id}', {
|
|
11
|
+
pathParams: { id: extractionId },
|
|
12
|
+
});
|
|
13
|
+
return [{ json: result, pairedItem: itemIndex }];
|
|
14
|
+
}
|
|
15
|
+
if (operation === 'estimate') {
|
|
16
|
+
const schemaId = (0, transport_1.extractResourceId)(this.getNodeParameter('schema', itemIndex));
|
|
17
|
+
const schemaVersionId = (0, transport_1.extractResourceId)(this.getNodeParameter('schemaVersion', itemIndex));
|
|
18
|
+
const inputText = this.getNodeParameter('estimateInputText', itemIndex);
|
|
19
|
+
const body = { schemaId, inputText };
|
|
20
|
+
if (schemaVersionId)
|
|
21
|
+
body.schemaVersionId = schemaVersionId;
|
|
22
|
+
const result = await (0, transport_1.apiRequest)(this, 'POST', '/v1/extractions/estimate', { body });
|
|
23
|
+
return [{ json: result, pairedItem: itemIndex }];
|
|
24
|
+
}
|
|
25
|
+
if (operation !== 'run') {
|
|
26
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown extraction operation: ${operation}`, {
|
|
27
|
+
itemIndex,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
// run path
|
|
31
|
+
const schemaId = (0, transport_1.extractResourceId)(this.getNodeParameter('schema', itemIndex));
|
|
32
|
+
const schemaVersionId = (0, transport_1.extractResourceId)(this.getNodeParameter('schemaVersion', itemIndex));
|
|
33
|
+
const model = this.getNodeParameter('model', itemIndex);
|
|
34
|
+
const inputText = this.getNodeParameter('inputText', itemIndex);
|
|
35
|
+
const useBinaryImages = this.getNodeParameter('useBinaryImages', itemIndex);
|
|
36
|
+
const waitForCompletion = this.getNodeParameter('waitForCompletion', itemIndex);
|
|
37
|
+
const inputImages = [];
|
|
38
|
+
if (useBinaryImages) {
|
|
39
|
+
const binaryProperties = (this.getNodeParameter('binaryProperties', itemIndex) || '')
|
|
40
|
+
.split(',')
|
|
41
|
+
.map((p) => p.trim())
|
|
42
|
+
.filter((p) => p.length > 0);
|
|
43
|
+
if (binaryProperties.length > 10) {
|
|
44
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Maximum 10 binary images per extraction', {
|
|
45
|
+
itemIndex,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
const item = this.getInputData()[itemIndex];
|
|
49
|
+
for (const propertyName of binaryProperties) {
|
|
50
|
+
const binaryEntry = item.binary?.[propertyName];
|
|
51
|
+
if (!binaryEntry) {
|
|
52
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Binary property "${propertyName}" not found on input item`, { itemIndex });
|
|
53
|
+
}
|
|
54
|
+
const buffer = await this.helpers.getBinaryDataBuffer(itemIndex, propertyName);
|
|
55
|
+
inputImages.push({ data: buffer.toString('base64'), mimeType: binaryEntry.mimeType });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (!inputText && inputImages.length === 0) {
|
|
59
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Provide inputText or images for extraction', { itemIndex });
|
|
60
|
+
}
|
|
61
|
+
const body = { schemaId, model };
|
|
62
|
+
if (schemaVersionId)
|
|
63
|
+
body.schemaVersionId = schemaVersionId;
|
|
64
|
+
if (inputText)
|
|
65
|
+
body.inputText = inputText;
|
|
66
|
+
if (inputImages.length > 0)
|
|
67
|
+
body.inputImages = inputImages;
|
|
68
|
+
if (!waitForCompletion) {
|
|
69
|
+
// Sync path — exact v1 behaviour.
|
|
70
|
+
const result = await (0, transport_1.apiRequest)(this, 'POST', '/v1/extractions', { body });
|
|
71
|
+
return [{ json: result, pairedItem: itemIndex }];
|
|
72
|
+
}
|
|
73
|
+
// Async + poll path.
|
|
74
|
+
const pollIntervalSec = this.getNodeParameter('pollIntervalSec', itemIndex);
|
|
75
|
+
const pollTimeoutSec = this.getNodeParameter('pollTimeoutSec', itemIndex);
|
|
76
|
+
const submitted = (await (0, transport_1.apiRequest)(this, 'POST', '/v1/extractions/async', { body }));
|
|
77
|
+
if (!submitted.id) {
|
|
78
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Async extraction submission did not return an id', { itemIndex });
|
|
79
|
+
}
|
|
80
|
+
const final = await (0, polling_1.pollUntilTerminal)(() => (0, transport_1.apiRequest)(this, 'GET', '/v1/extractions/{id}', {
|
|
81
|
+
pathParams: { id: submitted.id },
|
|
82
|
+
}), {
|
|
83
|
+
intervalMs: Math.max(1, Math.floor(pollIntervalSec * 1000)),
|
|
84
|
+
timeoutMs: Math.max(1, Math.floor(pollTimeoutSec * 1000)),
|
|
85
|
+
terminalStatuses: ['COMPLETED', 'FAILED'],
|
|
86
|
+
});
|
|
87
|
+
if (final.status === 'FAILED') {
|
|
88
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Extraction failed: ${JSON.stringify(final)}`, { itemIndex });
|
|
89
|
+
}
|
|
90
|
+
return [{ json: final, pairedItem: itemIndex }];
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=extraction.js.map
|
|
@@ -0,0 +1 @@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