n8n-nodes-craft-daily-notes 1.0.24 → 1.0.26

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 (79) hide show
  1. package/dist/credentials/CraftDocumentsApi.credentials.d.ts +9 -0
  2. package/dist/credentials/CraftDocumentsApi.credentials.js +31 -0
  3. package/dist/credentials/CraftDocumentsApi.credentials.js.map +1 -0
  4. package/dist/nodes/CraftDailyNotes/resources/collection/addItems.js +33 -7
  5. package/dist/nodes/CraftDailyNotes/resources/collection/addItems.js.map +1 -1
  6. package/dist/nodes/CraftDailyNotes/resources/collection/deleteItems.js +1 -1
  7. package/dist/nodes/CraftDailyNotes/resources/collection/deleteItems.js.map +1 -1
  8. package/dist/nodes/CraftDailyNotes/resources/collection/updateItems.js +40 -7
  9. package/dist/nodes/CraftDailyNotes/resources/collection/updateItems.js.map +1 -1
  10. package/dist/nodes/CraftDocuments/CraftDocuments.node.d.ts +12 -0
  11. package/dist/nodes/CraftDocuments/CraftDocuments.node.js +83 -0
  12. package/dist/nodes/CraftDocuments/CraftDocuments.node.js.map +1 -0
  13. package/dist/nodes/CraftDocuments/CraftDocuments.node.json +22 -0
  14. package/dist/nodes/CraftDocuments/loadOptions/getCollections.d.ts +2 -0
  15. package/dist/nodes/CraftDocuments/loadOptions/getCollections.js +18 -0
  16. package/dist/nodes/CraftDocuments/loadOptions/getCollections.js.map +1 -0
  17. package/dist/nodes/CraftDocuments/loadOptions/getDocuments.d.ts +2 -0
  18. package/dist/nodes/CraftDocuments/loadOptions/getDocuments.js +18 -0
  19. package/dist/nodes/CraftDocuments/loadOptions/getDocuments.js.map +1 -0
  20. package/dist/nodes/CraftDocuments/resources/block/delete.d.ts +2 -0
  21. package/dist/nodes/CraftDocuments/resources/block/delete.js +24 -0
  22. package/dist/nodes/CraftDocuments/resources/block/delete.js.map +1 -0
  23. package/dist/nodes/CraftDocuments/resources/block/get.d.ts +2 -0
  24. package/dist/nodes/CraftDocuments/resources/block/get.js +91 -0
  25. package/dist/nodes/CraftDocuments/resources/block/get.js.map +1 -0
  26. package/dist/nodes/CraftDocuments/resources/block/index.d.ts +2 -0
  27. package/dist/nodes/CraftDocuments/resources/block/index.js +104 -0
  28. package/dist/nodes/CraftDocuments/resources/block/index.js.map +1 -0
  29. package/dist/nodes/CraftDocuments/resources/block/insert.d.ts +3 -0
  30. package/dist/nodes/CraftDocuments/resources/block/insert.js +117 -0
  31. package/dist/nodes/CraftDocuments/resources/block/insert.js.map +1 -0
  32. package/dist/nodes/CraftDocuments/resources/block/move.d.ts +2 -0
  33. package/dist/nodes/CraftDocuments/resources/block/move.js +81 -0
  34. package/dist/nodes/CraftDocuments/resources/block/move.js.map +1 -0
  35. package/dist/nodes/CraftDocuments/resources/block/search.d.ts +2 -0
  36. package/dist/nodes/CraftDocuments/resources/block/search.js +96 -0
  37. package/dist/nodes/CraftDocuments/resources/block/search.js.map +1 -0
  38. package/dist/nodes/CraftDocuments/resources/block/update.d.ts +2 -0
  39. package/dist/nodes/CraftDocuments/resources/block/update.js +85 -0
  40. package/dist/nodes/CraftDocuments/resources/block/update.js.map +1 -0
  41. package/dist/nodes/CraftDocuments/resources/collection/addItems.d.ts +2 -0
  42. package/dist/nodes/CraftDocuments/resources/collection/addItems.js +60 -0
  43. package/dist/nodes/CraftDocuments/resources/collection/addItems.js.map +1 -0
  44. package/dist/nodes/CraftDocuments/resources/collection/deleteItems.d.ts +2 -0
  45. package/dist/nodes/CraftDocuments/resources/collection/deleteItems.js +36 -0
  46. package/dist/nodes/CraftDocuments/resources/collection/deleteItems.js.map +1 -0
  47. package/dist/nodes/CraftDocuments/resources/collection/getItems.d.ts +2 -0
  48. package/dist/nodes/CraftDocuments/resources/collection/getItems.js +37 -0
  49. package/dist/nodes/CraftDocuments/resources/collection/getItems.js.map +1 -0
  50. package/dist/nodes/CraftDocuments/resources/collection/getSchema.d.ts +2 -0
  51. package/dist/nodes/CraftDocuments/resources/collection/getSchema.js +45 -0
  52. package/dist/nodes/CraftDocuments/resources/collection/getSchema.js.map +1 -0
  53. package/dist/nodes/CraftDocuments/resources/collection/index.d.ts +2 -0
  54. package/dist/nodes/CraftDocuments/resources/collection/index.js +101 -0
  55. package/dist/nodes/CraftDocuments/resources/collection/index.js.map +1 -0
  56. package/dist/nodes/CraftDocuments/resources/collection/list.d.ts +2 -0
  57. package/dist/nodes/CraftDocuments/resources/collection/list.js +60 -0
  58. package/dist/nodes/CraftDocuments/resources/collection/list.js.map +1 -0
  59. package/dist/nodes/CraftDocuments/resources/collection/updateItems.d.ts +2 -0
  60. package/dist/nodes/CraftDocuments/resources/collection/updateItems.js +67 -0
  61. package/dist/nodes/CraftDocuments/resources/collection/updateItems.js.map +1 -0
  62. package/dist/nodes/CraftDocuments/resources/document/index.d.ts +2 -0
  63. package/dist/nodes/CraftDocuments/resources/document/index.js +31 -0
  64. package/dist/nodes/CraftDocuments/resources/document/index.js.map +1 -0
  65. package/dist/nodes/CraftDocuments/resources/document/list.d.ts +2 -0
  66. package/dist/nodes/CraftDocuments/resources/document/list.js +15 -0
  67. package/dist/nodes/CraftDocuments/resources/document/list.js.map +1 -0
  68. package/dist/nodes/CraftDocuments/resources/search/index.d.ts +2 -0
  69. package/dist/nodes/CraftDocuments/resources/search/index.js +110 -0
  70. package/dist/nodes/CraftDocuments/resources/search/index.js.map +1 -0
  71. package/dist/nodes/CraftDocuments/shared/transport.d.ts +2 -0
  72. package/dist/nodes/CraftDocuments/shared/transport.js +20 -0
  73. package/dist/nodes/CraftDocuments/shared/transport.js.map +1 -0
  74. package/dist/package.json +11 -6
  75. package/dist/tsconfig.tsbuildinfo +1 -1
  76. package/package.json +11 -6
  77. package/dist/nodes/CraftDailyNotes/shared/blockBuilder.d.ts +0 -18
  78. package/dist/nodes/CraftDailyNotes/shared/blockBuilder.js +0 -191
  79. package/dist/nodes/CraftDailyNotes/shared/blockBuilder.js.map +0 -1
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.blockInsertDescription = void 0;
4
+ exports.blockInsertPreSend = blockInsertPreSend;
5
+ const showOnlyForBlockInsert = { operation: ['insert'], resource: ['block'] };
6
+ function buildPositionObject(context) {
7
+ let positionType = 'end';
8
+ let targetPageId = '';
9
+ let referenceBlockId = '';
10
+ try {
11
+ positionType = context.getNodeParameter('positionType', 'end');
12
+ targetPageId = context.getNodeParameter('targetPageId', '');
13
+ referenceBlockId = context.getNodeParameter('referenceBlockId', '');
14
+ }
15
+ catch {
16
+ }
17
+ const position = {
18
+ position: positionType || 'end',
19
+ pageId: targetPageId,
20
+ };
21
+ if (['before', 'after'].includes(positionType) && referenceBlockId) {
22
+ position.referenceBlockId = referenceBlockId;
23
+ }
24
+ return position;
25
+ }
26
+ async function blockInsertPreSend(requestOptions) {
27
+ const position = buildPositionObject(this);
28
+ let markdownContent = '';
29
+ try {
30
+ const rawValue = this.getNodeParameter('markdownContent', '');
31
+ if (typeof rawValue === 'string') {
32
+ markdownContent = rawValue;
33
+ }
34
+ else if (rawValue) {
35
+ markdownContent = String(rawValue);
36
+ }
37
+ }
38
+ catch {
39
+ markdownContent = '';
40
+ }
41
+ const requestBody = {
42
+ blocks: [
43
+ {
44
+ type: 'text',
45
+ markdown: markdownContent,
46
+ },
47
+ ],
48
+ position: {
49
+ position: String(position.position || 'end'),
50
+ pageId: String(position.pageId || ''),
51
+ },
52
+ };
53
+ if (position.referenceBlockId) {
54
+ requestBody.position.referenceBlockId = String(position.referenceBlockId);
55
+ }
56
+ requestOptions.body = JSON.stringify(requestBody);
57
+ requestOptions.headers = {
58
+ 'Content-Type': 'application/json',
59
+ 'Accept': 'application/json',
60
+ };
61
+ return requestOptions;
62
+ }
63
+ exports.blockInsertDescription = [
64
+ {
65
+ displayName: 'Target Document/Page ID',
66
+ name: 'targetPageId',
67
+ type: 'string',
68
+ default: '',
69
+ required: true,
70
+ placeholder: 'doc-123',
71
+ description: 'The ID of the document or page to insert into. Use "List Documents" to find available IDs.',
72
+ displayOptions: { show: showOnlyForBlockInsert },
73
+ },
74
+ {
75
+ displayName: 'Markdown Content',
76
+ name: 'markdownContent',
77
+ type: 'string',
78
+ typeOptions: {
79
+ rows: 10,
80
+ },
81
+ default: '',
82
+ required: true,
83
+ placeholder: '# Meeting Notes\n\n- Discussed timeline\n- Assigned tasks\n\n```javascript\nconsole.log("code blocks work too!");\n```\n\nNext steps...',
84
+ description: 'Paste markdown content. Craft API automatically parses it into proper blocks (headers, code, lists, etc.).',
85
+ displayOptions: { show: showOnlyForBlockInsert },
86
+ },
87
+ {
88
+ displayName: 'Insert Position',
89
+ name: 'positionType',
90
+ type: 'options',
91
+ noDataExpression: true,
92
+ options: [
93
+ { name: 'End of Document', value: 'end' },
94
+ { name: 'Start of Document', value: 'start' },
95
+ { name: 'Before Block', value: 'before' },
96
+ { name: 'After Block', value: 'after' },
97
+ ],
98
+ default: 'end',
99
+ description: 'Where to insert the content in the document',
100
+ displayOptions: { show: showOnlyForBlockInsert },
101
+ },
102
+ {
103
+ displayName: 'Reference Block ID',
104
+ name: 'referenceBlockId',
105
+ type: 'string',
106
+ default: '',
107
+ placeholder: 'Block UUID',
108
+ description: 'The block ID to position relative to (required for before/after)',
109
+ displayOptions: {
110
+ show: {
111
+ ...showOnlyForBlockInsert,
112
+ positionType: ['before', 'after'],
113
+ },
114
+ },
115
+ },
116
+ ];
117
+ //# sourceMappingURL=insert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insert.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/block/insert.ts"],"names":[],"mappings":";;;AAsDA,gDAmDC;AAzFD,MAAM,sBAAsB,GAAG,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAM9E,SAAS,mBAAmB,CAAC,OAAgC;IAC5D,IAAI,YAAY,GAAG,KAAK,CAAC;IACzB,IAAI,YAAY,GAAG,EAAE,CAAC;IACtB,IA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AAK,EAAE,KAAK,EAAE;YACzC,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE;YAC7C,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE;YACzC,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE;SACvC;QACD,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,6CAA6C;QAC1D,cAAc,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE;KAChD;IAGD;QACC,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,YAAY;QACzB,WAAW,EAAE,kEAAkE;QAC/E,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,GAAG,sBAAsB;gBACzB,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;aACjC;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const blockMoveDescription: INodeProperties[];
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.blockMoveDescription = void 0;
4
+ const showOnlyForBlockMove = { operation: ['move'], resource: ['block'] };
5
+ exports.blockMoveDescription = [
6
+ {
7
+ displayName: 'Block IDs',
8
+ name: 'blockIds',
9
+ type: 'string',
10
+ default: '',
11
+ required: true,
12
+ placeholder: 'ID1, ID2, ID3 or ["ID1", "ID2"]',
13
+ description: 'Block IDs to move. Provide as comma-separated values or JSON array.',
14
+ displayOptions: { show: showOnlyForBlockMove },
15
+ routing: {
16
+ send: {
17
+ type: 'body',
18
+ property: 'blockIds',
19
+ value: '={{ $value.startsWith("[") ? JSON.parse($value) : $value.split(",").map(id => id.trim()) }}',
20
+ },
21
+ },
22
+ },
23
+ {
24
+ displayName: 'Position',
25
+ name: 'position',
26
+ type: 'fixedCollection',
27
+ default: {},
28
+ placeholder: 'Add Position',
29
+ displayOptions: { show: showOnlyForBlockMove },
30
+ options: [
31
+ {
32
+ name: 'positionValues',
33
+ displayName: 'Position',
34
+ values: [
35
+ {
36
+ displayName: 'Position Type',
37
+ name: 'position',
38
+ type: 'options',
39
+ options: [
40
+ { name: 'End', value: 'end', description: 'Move to the end of the document' },
41
+ { name: 'Start', value: 'start', description: 'Move to the start of the document' },
42
+ { name: 'Before', value: 'before', description: 'Move before a specific block' },
43
+ { name: 'After', value: 'after', description: 'Move after a specific block' },
44
+ ],
45
+ default: 'end',
46
+ },
47
+ {
48
+ displayName: 'Target Document/Page ID',
49
+ name: 'pageId',
50
+ type: 'string',
51
+ default: '',
52
+ required: true,
53
+ placeholder: 'doc-123',
54
+ description: 'Which document/page to move the blocks to',
55
+ },
56
+ {
57
+ displayName: 'Reference Block ID',
58
+ name: 'referenceBlockId',
59
+ type: 'string',
60
+ default: '',
61
+ placeholder: 'Block ID (UUID)',
62
+ description: 'The block ID to position relative to (required for before/after)',
63
+ displayOptions: {
64
+ show: {
65
+ position: ['before', 'after'],
66
+ },
67
+ },
68
+ },
69
+ ],
70
+ },
71
+ ],
72
+ routing: {
73
+ send: {
74
+ type: 'body',
75
+ property: 'position',
76
+ value: '={{ $value.positionValues ? { position: $value.positionValues.position, pageId: $value.positionValues.pageId, ...(["before", "after"].includes($value.positionValues.position) && $value.positionValues.referenceBlockId ? { referenceBlockId: $value.positionValues.referenceBlockId } : {}) } : { position: "end", pageId: "" } }}',
77
+ },
78
+ },
79
+ },
80
+ ];
81
+ //# sourceMappingURL=move.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"move.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/block/move.ts"],"names":[],"mappings":";;;AAQA,MAAM,oBAAoB,GAAG,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAE7D,QAAA,oBAA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,EAAE,EAAE;wBACX,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,SAAS;wBACtB,WAAW,EAAE,2CAA2C;qBACxD;oBACD;wBACC,WAAW,EAAE,oBAAoB;wBACjC,IAAI,EAAE,kBAAkB;wBACxB,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,EAAE;wBACX,WAAW,EAAE,iBAAiB;wBAC9B,WAAW,EAAE,kEAAkE;wBAC/E,cAAc,EAAE;4BACf,IAAI,EAAE;gCACL,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;6BAC7B;yBACD;qBACD;iBACD;aACD;SACD;QACD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,UAAU;gBAEpB,KAAK,EACJ,sUAAsU;aACvU;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const blockSearchDescription: INodeProperties[];
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.blockSearchDescription = void 0;
4
+ const showOnlyForBlockSearch = { operation: ['searchInDocument'], resource: ['block'] };
5
+ exports.blockSearchDescription = [
6
+ {
7
+ displayName: 'Document ID',
8
+ name: 'documentId',
9
+ type: 'string',
10
+ default: '',
11
+ required: true,
12
+ placeholder: 'doc-123',
13
+ description: 'The document ID to search within. Use "List Documents" to find available IDs.',
14
+ displayOptions: { show: showOnlyForBlockSearch },
15
+ routing: {
16
+ send: {
17
+ type: 'query',
18
+ property: 'documentId',
19
+ },
20
+ },
21
+ },
22
+ {
23
+ displayName: 'Search Pattern',
24
+ name: 'pattern',
25
+ type: 'string',
26
+ default: '',
27
+ required: true,
28
+ placeholder: 'meeting|agenda',
29
+ description: 'The search pattern. Supports NodeJS regular expressions.',
30
+ displayOptions: { show: showOnlyForBlockSearch },
31
+ routing: {
32
+ send: {
33
+ type: 'query',
34
+ property: 'pattern',
35
+ },
36
+ },
37
+ },
38
+ {
39
+ displayName: 'Options',
40
+ name: 'searchOptions',
41
+ type: 'collection',
42
+ placeholder: 'Add Option',
43
+ default: {},
44
+ displayOptions: { show: showOnlyForBlockSearch },
45
+ options: [
46
+ {
47
+ displayName: 'Case Sensitive',
48
+ name: 'caseSensitive',
49
+ type: 'boolean',
50
+ default: false,
51
+ description: 'Whether the search should be case sensitive',
52
+ routing: {
53
+ send: {
54
+ type: 'query',
55
+ property: 'caseSensitive',
56
+ },
57
+ },
58
+ },
59
+ {
60
+ displayName: 'Blocks Before',
61
+ name: 'beforeBlockCount',
62
+ type: 'number',
63
+ typeOptions: {
64
+ minValue: 0,
65
+ maxValue: 5,
66
+ },
67
+ default: 0,
68
+ description: 'Number of blocks to include before each match for context',
69
+ routing: {
70
+ send: {
71
+ type: 'query',
72
+ property: 'beforeBlockCount',
73
+ },
74
+ },
75
+ },
76
+ {
77
+ displayName: 'Blocks After',
78
+ name: 'afterBlockCount',
79
+ type: 'number',
80
+ typeOptions: {
81
+ minValue: 0,
82
+ maxValue: 5,
83
+ },
84
+ default: 0,
85
+ description: 'Number of blocks to include after each match for context',
86
+ routing: {
87
+ send: {
88
+ type: 'query',
89
+ property: 'afterBlockCount',
90
+ },
91
+ },
92
+ },
93
+ ],
94
+ },
95
+ ];
96
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/block/search.ts"],"names":[],"mappings":";;;AAQA,MAAM,sBAAsB,GAAG,EAAE,SAAS,EAAE,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAE3E,QAAA,sBAAsB,GAAsB;IAExD;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE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,EAAE,kBAAkB;qBAC5B;iBACD;aACD;YACD;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,CAAC;iBACX;gBACD,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,0DAA0D;gBACvE,OAAO,EAAE;oBACR,IAAI,EAAE;wBACL,IAAI,EAAE,OAAO;wBACb,QAAQ,EAAE,iBAAiB;qBAC3B;iBACD;aACD;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const blockUpdateDescription: INodeProperties[];
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.blockUpdateDescription = void 0;
4
+ const showOnlyForBlockUpdate = { operation: ['update'], resource: ['block'] };
5
+ exports.blockUpdateDescription = [
6
+ {
7
+ displayName: 'Blocks to Update',
8
+ name: 'blocksToUpdate',
9
+ type: 'fixedCollection',
10
+ typeOptions: {
11
+ multipleValues: true,
12
+ },
13
+ default: {},
14
+ placeholder: 'Add Block',
15
+ displayOptions: { show: showOnlyForBlockUpdate },
16
+ options: [
17
+ {
18
+ name: 'blockValues',
19
+ displayName: 'Block',
20
+ values: [
21
+ {
22
+ displayName: 'Block ID',
23
+ name: 'id',
24
+ type: 'string',
25
+ default: '',
26
+ required: true,
27
+ placeholder: 'E21E3640-FBD2-4887-BD1B-B1FFE1781168',
28
+ description: 'The UUID of the block to update',
29
+ },
30
+ {
31
+ displayName: 'New Markdown',
32
+ name: 'markdown',
33
+ type: 'string',
34
+ typeOptions: {
35
+ rows: 4,
36
+ },
37
+ default: '',
38
+ description: 'The new markdown content for the block',
39
+ },
40
+ {
41
+ displayName: 'Text Style',
42
+ name: 'textStyle',
43
+ type: 'options',
44
+ options: [
45
+ { name: 'Body', value: 'body' },
46
+ { name: 'Caption', value: 'caption' },
47
+ { name: 'Card', value: 'card' },
48
+ { name: "Don't Change", value: '', description: 'Keep current text style' },
49
+ { name: 'Heading 1', value: 'h1' },
50
+ { name: 'Heading 2', value: 'h2' },
51
+ { name: 'Heading 3', value: 'h3' },
52
+ { name: 'Heading 4', value: 'h4' },
53
+ { name: 'Page', value: 'page' },
54
+ ],
55
+ default: '',
56
+ description: 'The text style for the block. Code blocks are auto-detected from ``` markdown syntax.',
57
+ },
58
+ {
59
+ displayName: 'List Style',
60
+ name: 'listStyle',
61
+ type: 'options',
62
+ options: [
63
+ { name: 'Bullet', value: 'bullet' },
64
+ { name: "Don't Change", value: '', description: 'Keep current list style' },
65
+ { name: 'None', value: 'none' },
66
+ { name: 'Numbered', value: 'numbered' },
67
+ { name: 'Todo', value: 'todo' },
68
+ { name: 'Toggle', value: 'toggle' },
69
+ ],
70
+ default: '',
71
+ description: 'The list style for the block',
72
+ },
73
+ ],
74
+ },
75
+ ],
76
+ routing: {
77
+ send: {
78
+ type: 'body',
79
+ property: 'blocks',
80
+ value: '={{ $value.blockValues ? $value.blockValues.map(b => { const block = { id: b.id }; if (b.markdown) block.markdown = b.markdown; if (b.textStyle && b.textStyle !== "") block.textStyle = b.textStyle; if (b.listStyle && b.listStyle !== "") block.listStyle = b.listStyle; return block; }) : [] }}',
81
+ },
82
+ },
83
+ },
84
+ ];
85
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/block/update.ts"],"names":[],"mappings":";;;AAQA,MAAM,sBAAsB,GAAG,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAEjE,QAAA,sBAAsB,GAAsB;IAExD;QACC,WAAW,EAAE,kBAAkB;QAC/B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE;YACZ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AI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;yBAC/B;wBACD,OAAO,EAAE,EAAE;wBACX,WAAW,EAAE,uFAAuF;qBACpG;oBACD;wBACC,WAAW,EAAE,YAAY;wBACzB,IAAI,EAAE,WAAW;wBACjB,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACR,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;4BACnC,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE;4BAC3E,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;4BAC/B,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;4BACvC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;4BAC/B,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;yBACnC;wBACD,OAAO,EAAE,EAAE;wBACX,WAAW,EAAE,8BAA8B;qBAC3C;iBACD;aACD;SACD;QACD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,QAAQ;gBAElB,KAAK,EACJ,sSAAsS;aACvS;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const collectionAddItemsDescription: INodeProperties[];
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.collectionAddItemsDescription = void 0;
4
+ const showOnlyForCollectionAddItems = { operation: ['addItems'], resource: ['collection'] };
5
+ exports.collectionAddItemsDescription = [
6
+ {
7
+ displayName: 'Collection Name or ID',
8
+ name: 'collectionId',
9
+ type: 'options',
10
+ typeOptions: {
11
+ loadOptionsMethod: 'getCollections',
12
+ },
13
+ default: '',
14
+ required: true,
15
+ description: 'Select a collection from your documents. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
16
+ displayOptions: { show: showOnlyForCollectionAddItems },
17
+ },
18
+ {
19
+ displayName: 'Items',
20
+ name: 'items',
21
+ type: 'fixedCollection',
22
+ typeOptions: {
23
+ multipleValues: true,
24
+ },
25
+ default: {},
26
+ placeholder: 'Add Item',
27
+ displayOptions: { show: showOnlyForCollectionAddItems },
28
+ options: [
29
+ {
30
+ name: 'itemValues',
31
+ displayName: 'Item',
32
+ values: [
33
+ {
34
+ displayName: 'Title',
35
+ name: 'title',
36
+ type: 'string',
37
+ default: '',
38
+ required: true,
39
+ description: 'The title for the new item',
40
+ },
41
+ {
42
+ displayName: 'Properties (JSON)',
43
+ name: 'properties',
44
+ type: 'json',
45
+ default: '{}',
46
+ description: 'Additional properties for the item as JSON object. Schema depends on collection.',
47
+ },
48
+ ],
49
+ },
50
+ ],
51
+ routing: {
52
+ send: {
53
+ type: 'body',
54
+ property: 'items',
55
+ value: '={{ $value.itemValues ? $value.itemValues.map(item => ({ title: item.title, properties: typeof item.properties === "string" ? JSON.parse(item.properties || "{}") : (item.properties || {}) })) : [] }}',
56
+ },
57
+ },
58
+ },
59
+ ];
60
+ //# sourceMappingURL=addItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addItems.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/collection/addItems.ts"],"names":[],"mappings":";;;AAQA,MAAM,6BAA6B,GAAG,EAAE,SAAS,EAAE,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;AAE/E,QAAA,6BAA6B,GAAsB;IAE/D;QACC,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,gBAAgB;SACnC;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,0JAA0J;QACvK,cAAc,EAAE,EAAE,IAAI,EAAE,6BAA6B,EAAE;KACvD;IAED;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE;YACZ,cAAc,EAAE,IAAI;SACpB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,UAAU;QACvB,cAAc,EAAE,EAAE,IAAI,EAAE,6BAA6B,EAAE;QACvD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,YAAY;gBAClB,WAAW,EAAE,MAAM;gBACnB,MAAM,EAAE;oBACP;wBACC,WAAW,EAAE,OAAO;wBACpB,IAAI,EAAE,OAAO;wBACb,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,EAAE;wBACX,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,4BAA4B;qBACzC;oBACD;wBACC,WAAW,EAAE,mBAAmB;wBAChC,IAAI,EAAE,YAAY;wBAClB,IAAI,EAAE,MAAM;wBACZ,OAAO,EAAE,IAAI;wBACb,WAAW,EAAE,kFAAkF;qBAC/F;iBACD;aACD;SACD;QACD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,OAAO;gBACjB,KAAK,EACJ,yMAAyM;aAC1M;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const collectionDeleteItemsDescription: INodeProperties[];
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.collectionDeleteItemsDescription = void 0;
4
+ const showOnlyForCollectionDeleteItems = { operation: ['deleteItems'], resource: ['collection'] };
5
+ exports.collectionDeleteItemsDescription = [
6
+ {
7
+ displayName: 'Collection Name or ID',
8
+ name: 'collectionId',
9
+ type: 'options',
10
+ typeOptions: {
11
+ loadOptionsMethod: 'getCollections',
12
+ },
13
+ default: '',
14
+ required: true,
15
+ description: 'Select a collection from your documents. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
16
+ displayOptions: { show: showOnlyForCollectionDeleteItems },
17
+ },
18
+ {
19
+ displayName: 'Item IDs',
20
+ name: 'idsToDelete',
21
+ type: 'string',
22
+ default: '',
23
+ required: true,
24
+ placeholder: 'ID1, ID2, ID3 or ["ID1", "ID2"]',
25
+ description: 'Item IDs to delete. Provide as comma-separated values or JSON array.',
26
+ displayOptions: { show: showOnlyForCollectionDeleteItems },
27
+ routing: {
28
+ send: {
29
+ type: 'body',
30
+ property: 'idsToDelete',
31
+ value: '={{ $value.startsWith("[") ? JSON.parse($value) : $value.split(",").map(id => id.trim()) }}',
32
+ },
33
+ },
34
+ },
35
+ ];
36
+ //# sourceMappingURL=deleteItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteItems.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/collection/deleteItems.ts"],"names":[],"mappings":";;;AAQA,MAAM,gCAAgC,GAAG,EAAE,SAAS,EAAE,CAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;AAErF,QAAA,gCAAgC,GAAsB;IAElE;QACC,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,gBAAgB;SACnC;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,0JAA0J;QACvK,cAAc,EAAE,EAAE,IAAI,EAAE,gCAAgC,EAAE;KAC1D;IAED;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,iCAAiC;QAC9C,WAAW,EAAE,sEAAsE;QACnF,cAAc,EAAE,EAAE,IAAI,EAAE,gCAAgC,EAAE;QAC1D,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,aAAa;gBACvB,KAAK,EACJ,6FAA6F;aAC9F;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const collectionGetItemsDescription: INodeProperties[];
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.collectionGetItemsDescription = void 0;
4
+ const showOnlyForCollectionGetItems = { operation: ['getItems'], resource: ['collection'] };
5
+ exports.collectionGetItemsDescription = [
6
+ {
7
+ displayName: 'Collection Name or ID',
8
+ name: 'collectionId',
9
+ type: 'options',
10
+ typeOptions: {
11
+ loadOptionsMethod: 'getCollections',
12
+ },
13
+ default: '',
14
+ required: true,
15
+ description: 'Select a collection from your documents. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
16
+ displayOptions: { show: showOnlyForCollectionGetItems },
17
+ },
18
+ {
19
+ displayName: 'Max Depth',
20
+ name: 'maxDepth',
21
+ type: 'number',
22
+ typeOptions: {
23
+ minValue: -1,
24
+ maxValue: 10,
25
+ },
26
+ default: -1,
27
+ description: 'Maximum depth of nested content to fetch. -1 for all descendants, 0 for only item properties.',
28
+ displayOptions: { show: showOnlyForCollectionGetItems },
29
+ routing: {
30
+ send: {
31
+ type: 'query',
32
+ property: 'maxDepth',
33
+ },
34
+ },
35
+ },
36
+ ];
37
+ //# sourceMappingURL=getItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getItems.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/collection/getItems.ts"],"names":[],"mappings":";;;AAQA,MAAM,6BAA6B,GAAG,EAAE,SAAS,EAAE,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;AAE/E,QAAA,6BAA6B,GAAsB;IAE/D;QACC,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,gBAAgB;SACnC;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,0JAA0J;QACvK,cAAc,EAAE,EAAE,IAAI,EAAE,6BAA6B,EAAE;KACvD;IAED;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACZ,QAAQ,EAAE,CAAC,CAAC;YACZ,QAAQ,EAAE,EAAE;SACZ;QACD,OAAO,EAAE,CAAC,CAAC;QACX,WAAW,EACV,+FAA+F;QAChG,cAAc,EAAE,EAAE,IAAI,EAAE,6BAA6B,EAAE;QACvD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,UAAU;aACpB;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const collectionGetSchemaDescription: INodeProperties[];
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.collectionGetSchemaDescription = void 0;
4
+ const showOnlyForCollectionGetSchema = { operation: ['getSchema'], resource: ['collection'] };
5
+ exports.collectionGetSchemaDescription = [
6
+ {
7
+ displayName: 'Collection Name or ID',
8
+ name: 'collectionId',
9
+ type: 'options',
10
+ typeOptions: {
11
+ loadOptionsMethod: 'getCollections',
12
+ },
13
+ default: '',
14
+ required: true,
15
+ description: 'Select a collection from your documents. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
16
+ displayOptions: { show: showOnlyForCollectionGetSchema },
17
+ },
18
+ {
19
+ displayName: 'Schema Format',
20
+ name: 'format',
21
+ type: 'options',
22
+ options: [
23
+ {
24
+ name: 'JSON Schema (for Validation)',
25
+ value: 'json-schema-items',
26
+ description: 'Returns JSON Schema for validating collection items',
27
+ },
28
+ {
29
+ name: 'Schema Structure',
30
+ value: 'schema',
31
+ description: 'Returns the collection schema structure (name, properties, types)',
32
+ },
33
+ ],
34
+ default: 'json-schema-items',
35
+ description: 'Format of the schema response',
36
+ displayOptions: { show: showOnlyForCollectionGetSchema },
37
+ routing: {
38
+ send: {
39
+ type: 'query',
40
+ property: 'format',
41
+ },
42
+ },
43
+ },
44
+ ];
45
+ //# sourceMappingURL=getSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSchema.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/collection/getSchema.ts"],"names":[],"mappings":";;;AAQA,MAAM,8BAA8B,GAAG,EAAE,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;AAEjF,QAAA,8BAA8B,GAAsB;IAEhE;QACC,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,gBAAgB;SACnC;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,0JAA0J;QACvK,cAAc,EAAE,EAAE,IAAI,EAAE,8BAA8B,EAAE;KACxD;IAED;QACC,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,8BAA8B;gBACpC,KAAK,EAAE,mBAAmB;gBAC1B,WAAW,EAAE,qDAAqD;aAClE;YACD;gBACC,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,mEAAmE;aAChF;SACD;QACD,OAAO,EAAE,mBAAmB;QAC5B,WAAW,EAAE,+BAA+B;QAC5C,cAAc,EAAE,EAAE,IAAI,EAAE,8BAA8B,EAAE;QACxD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,QAAQ;aAClB;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const collectionDescription: INodeProperties[];