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

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 (80) hide show
  1. package/README.md +223 -64
  2. package/dist/credentials/CraftDocumentsApi.credentials.d.ts +9 -0
  3. package/dist/credentials/CraftDocumentsApi.credentials.js +31 -0
  4. package/dist/credentials/CraftDocumentsApi.credentials.js.map +1 -0
  5. package/dist/nodes/CraftDailyNotes/resources/collection/addItems.js +33 -7
  6. package/dist/nodes/CraftDailyNotes/resources/collection/addItems.js.map +1 -1
  7. package/dist/nodes/CraftDailyNotes/resources/collection/deleteItems.js +1 -1
  8. package/dist/nodes/CraftDailyNotes/resources/collection/deleteItems.js.map +1 -1
  9. package/dist/nodes/CraftDailyNotes/resources/collection/updateItems.js +40 -7
  10. package/dist/nodes/CraftDailyNotes/resources/collection/updateItems.js.map +1 -1
  11. package/dist/nodes/CraftDocuments/CraftDocuments.node.d.ts +12 -0
  12. package/dist/nodes/CraftDocuments/CraftDocuments.node.js +83 -0
  13. package/dist/nodes/CraftDocuments/CraftDocuments.node.js.map +1 -0
  14. package/dist/nodes/CraftDocuments/CraftDocuments.node.json +22 -0
  15. package/dist/nodes/CraftDocuments/loadOptions/getCollections.d.ts +2 -0
  16. package/dist/nodes/CraftDocuments/loadOptions/getCollections.js +18 -0
  17. package/dist/nodes/CraftDocuments/loadOptions/getCollections.js.map +1 -0
  18. package/dist/nodes/CraftDocuments/loadOptions/getDocuments.d.ts +2 -0
  19. package/dist/nodes/CraftDocuments/loadOptions/getDocuments.js +18 -0
  20. package/dist/nodes/CraftDocuments/loadOptions/getDocuments.js.map +1 -0
  21. package/dist/nodes/CraftDocuments/resources/block/delete.d.ts +2 -0
  22. package/dist/nodes/CraftDocuments/resources/block/delete.js +24 -0
  23. package/dist/nodes/CraftDocuments/resources/block/delete.js.map +1 -0
  24. package/dist/nodes/CraftDocuments/resources/block/get.d.ts +2 -0
  25. package/dist/nodes/CraftDocuments/resources/block/get.js +91 -0
  26. package/dist/nodes/CraftDocuments/resources/block/get.js.map +1 -0
  27. package/dist/nodes/CraftDocuments/resources/block/index.d.ts +2 -0
  28. package/dist/nodes/CraftDocuments/resources/block/index.js +104 -0
  29. package/dist/nodes/CraftDocuments/resources/block/index.js.map +1 -0
  30. package/dist/nodes/CraftDocuments/resources/block/insert.d.ts +3 -0
  31. package/dist/nodes/CraftDocuments/resources/block/insert.js +117 -0
  32. package/dist/nodes/CraftDocuments/resources/block/insert.js.map +1 -0
  33. package/dist/nodes/CraftDocuments/resources/block/move.d.ts +2 -0
  34. package/dist/nodes/CraftDocuments/resources/block/move.js +81 -0
  35. package/dist/nodes/CraftDocuments/resources/block/move.js.map +1 -0
  36. package/dist/nodes/CraftDocuments/resources/block/search.d.ts +2 -0
  37. package/dist/nodes/CraftDocuments/resources/block/search.js +96 -0
  38. package/dist/nodes/CraftDocuments/resources/block/search.js.map +1 -0
  39. package/dist/nodes/CraftDocuments/resources/block/update.d.ts +2 -0
  40. package/dist/nodes/CraftDocuments/resources/block/update.js +85 -0
  41. package/dist/nodes/CraftDocuments/resources/block/update.js.map +1 -0
  42. package/dist/nodes/CraftDocuments/resources/collection/addItems.d.ts +2 -0
  43. package/dist/nodes/CraftDocuments/resources/collection/addItems.js +60 -0
  44. package/dist/nodes/CraftDocuments/resources/collection/addItems.js.map +1 -0
  45. package/dist/nodes/CraftDocuments/resources/collection/deleteItems.d.ts +2 -0
  46. package/dist/nodes/CraftDocuments/resources/collection/deleteItems.js +36 -0
  47. package/dist/nodes/CraftDocuments/resources/collection/deleteItems.js.map +1 -0
  48. package/dist/nodes/CraftDocuments/resources/collection/getItems.d.ts +2 -0
  49. package/dist/nodes/CraftDocuments/resources/collection/getItems.js +37 -0
  50. package/dist/nodes/CraftDocuments/resources/collection/getItems.js.map +1 -0
  51. package/dist/nodes/CraftDocuments/resources/collection/getSchema.d.ts +2 -0
  52. package/dist/nodes/CraftDocuments/resources/collection/getSchema.js +45 -0
  53. package/dist/nodes/CraftDocuments/resources/collection/getSchema.js.map +1 -0
  54. package/dist/nodes/CraftDocuments/resources/collection/index.d.ts +2 -0
  55. package/dist/nodes/CraftDocuments/resources/collection/index.js +101 -0
  56. package/dist/nodes/CraftDocuments/resources/collection/index.js.map +1 -0
  57. package/dist/nodes/CraftDocuments/resources/collection/list.d.ts +2 -0
  58. package/dist/nodes/CraftDocuments/resources/collection/list.js +60 -0
  59. package/dist/nodes/CraftDocuments/resources/collection/list.js.map +1 -0
  60. package/dist/nodes/CraftDocuments/resources/collection/updateItems.d.ts +2 -0
  61. package/dist/nodes/CraftDocuments/resources/collection/updateItems.js +67 -0
  62. package/dist/nodes/CraftDocuments/resources/collection/updateItems.js.map +1 -0
  63. package/dist/nodes/CraftDocuments/resources/document/index.d.ts +2 -0
  64. package/dist/nodes/CraftDocuments/resources/document/index.js +31 -0
  65. package/dist/nodes/CraftDocuments/resources/document/index.js.map +1 -0
  66. package/dist/nodes/CraftDocuments/resources/document/list.d.ts +2 -0
  67. package/dist/nodes/CraftDocuments/resources/document/list.js +15 -0
  68. package/dist/nodes/CraftDocuments/resources/document/list.js.map +1 -0
  69. package/dist/nodes/CraftDocuments/resources/search/index.d.ts +2 -0
  70. package/dist/nodes/CraftDocuments/resources/search/index.js +110 -0
  71. package/dist/nodes/CraftDocuments/resources/search/index.js.map +1 -0
  72. package/dist/nodes/CraftDocuments/shared/transport.d.ts +2 -0
  73. package/dist/nodes/CraftDocuments/shared/transport.js +20 -0
  74. package/dist/nodes/CraftDocuments/shared/transport.js.map +1 -0
  75. package/dist/package.json +11 -6
  76. package/dist/tsconfig.tsbuildinfo +1 -1
  77. package/package.json +11 -6
  78. package/dist/nodes/CraftDailyNotes/shared/blockBuilder.d.ts +0 -18
  79. package/dist/nodes/CraftDailyNotes/shared/blockBuilder.js +0 -191
  80. package/dist/nodes/CraftDailyNotes/shared/blockBuilder.js.map +0 -1
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCollections = getCollections;
4
+ const transport_1 = require("../shared/transport");
5
+ async function getCollections() {
6
+ const response = (await transport_1.craftApiRequest.call(this, 'GET', '/collections'));
7
+ if (!(response === null || response === void 0 ? void 0 : response.items) || !Array.isArray(response.items)) {
8
+ return [];
9
+ }
10
+ return response.items.map((collection) => ({
11
+ name: collection.name || `Collection ${collection.key}`,
12
+ value: collection.key,
13
+ description: collection.documentId
14
+ ? `In document: ${collection.documentId}`
15
+ : `ID: ${collection.key}`,
16
+ }));
17
+ }
18
+ //# sourceMappingURL=getCollections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCollections.js","sourceRoot":"","sources":["../../../../nodes/CraftDocuments/loadOptions/getCollections.ts"],"names":[],"mappings":";;AAyBA,wCAoBC;AAxCD,mDAAsD;AAoB/C,KAAK,UAAU,cAAc;IAGnC,MAAM,QAAQ,GAAG,CAAC,MAAM,2BAAe,CAAC,IAAI,CAC3C,IAAI,EACJ,KAAK,EACL,cAAc,CACd,CAAmC,CAAC;IAErC,IAAI,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,CAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACxD,OAAO,EAAE,CAAC;IACX,CAAC;IAED,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAC1C,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,cAAc,UAAU,CAAC,GAAG,EAAE;QACvD,KAAK,EAAE,UAAU,CAAC,GAAG;QACrB,WAAW,EAAE,UAAU,CAAC,UAAU;YACjC,CAAC,CAAC,gBAAgB,UAAU,CAAC,UAAU,EAAE;YACzC,CAAC,CAAC,OAAO,UAAU,CAAC,GAAG,EAAE;KAC1B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
2
+ export declare function getDocuments(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDocuments = getDocuments;
4
+ const transport_1 = require("../shared/transport");
5
+ async function getDocuments() {
6
+ const response = (await transport_1.craftApiRequest.call(this, 'GET', '/documents'));
7
+ if (!(response === null || response === void 0 ? void 0 : response.items) || !Array.isArray(response.items)) {
8
+ return [];
9
+ }
10
+ return response.items
11
+ .filter((doc) => !doc.isDeleted)
12
+ .map((doc) => ({
13
+ name: doc.title || `Document ${doc.id}`,
14
+ value: doc.id,
15
+ description: `ID: ${doc.id}`,
16
+ }));
17
+ }
18
+ //# sourceMappingURL=getDocuments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDocuments.js","sourceRoot":"","sources":["../../../../nodes/CraftDocuments/loadOptions/getDocuments.ts"],"names":[],"mappings":";;AAqBA,oCAqBC;AArCD,mDAAsD;AAgB/C,KAAK,UAAU,YAAY;IAGjC,MAAM,QAAQ,GAAG,CAAC,MAAM,2BAAe,CAAC,IAAI,CAC3C,IAAI,EACJ,KAAK,EACL,YAAY,CACZ,CAAiC,CAAC;IAEnC,IAAI,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,CAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACxD,OAAO,EAAE,CAAC;IACX,CAAC;IAGD,OAAO,QAAQ,CAAC,KAAK;SACnB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC;SAC/B,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACd,IAAI,EAAE,GAAG,CAAC,KAAK,IAAI,YAAY,GAAG,CAAC,EAAE,EAAE;QACvC,KAAK,EAAE,GAAG,CAAC,EAAE;QACb,WAAW,EAAE,OAAO,GAAG,CAAC,EAAE,EAAE;KAC5B,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const blockDeleteDescription: INodeProperties[];
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.blockDeleteDescription = void 0;
4
+ const showOnlyForBlockDelete = { operation: ['delete'], resource: ['block'] };
5
+ exports.blockDeleteDescription = [
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 delete. Provide as comma-separated values or JSON array.',
14
+ displayOptions: { show: showOnlyForBlockDelete },
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
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/block/delete.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,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,iCAAiC;QAC9C,WAAW,EACV,uEAAuE;QACxE,cAAc,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE;QAChD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,UAAU;gBACpB,KAAK,EACJ,6FAA6F;aAC9F;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const blockGetDescription: INodeProperties[];
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.blockGetDescription = void 0;
4
+ const showOnlyForBlockGet = { operation: ['get'], resource: ['block'] };
5
+ exports.blockGetDescription = [
6
+ {
7
+ displayName: 'Document or Block ID',
8
+ name: 'blockId',
9
+ type: 'string',
10
+ default: '',
11
+ required: true,
12
+ placeholder: 'doc-123 or block-uuid',
13
+ description: 'The ID of the document or block to fetch. Use "List Documents" to discover available document IDs.',
14
+ displayOptions: { show: showOnlyForBlockGet },
15
+ routing: {
16
+ send: {
17
+ type: 'query',
18
+ property: 'id',
19
+ },
20
+ },
21
+ },
22
+ {
23
+ displayName: 'Max Depth',
24
+ name: 'maxDepth',
25
+ type: 'number',
26
+ typeOptions: {
27
+ minValue: -1,
28
+ maxValue: 10,
29
+ },
30
+ default: -1,
31
+ description: 'Maximum depth of nested content to fetch. -1 for all descendants, 0 for only the block itself.',
32
+ displayOptions: { show: showOnlyForBlockGet },
33
+ routing: {
34
+ send: {
35
+ type: 'query',
36
+ property: 'maxDepth',
37
+ },
38
+ },
39
+ },
40
+ {
41
+ displayName: 'Response Format',
42
+ name: 'responseFormat',
43
+ type: 'options',
44
+ options: [
45
+ {
46
+ name: 'JSON (Structured)',
47
+ value: 'json',
48
+ description: 'Returns structured block data with IDs and properties',
49
+ },
50
+ {
51
+ name: 'Markdown (Text)',
52
+ value: 'markdown',
53
+ description: 'Returns rendered markdown content',
54
+ },
55
+ ],
56
+ default: 'json',
57
+ description: 'Format of the response',
58
+ displayOptions: { show: showOnlyForBlockGet },
59
+ routing: {
60
+ request: {
61
+ headers: {
62
+ Accept: '={{ $value === "markdown" ? "text/markdown" : "application/json" }}',
63
+ },
64
+ },
65
+ },
66
+ },
67
+ {
68
+ displayName: 'Additional Options',
69
+ name: 'additionalOptions',
70
+ type: 'collection',
71
+ placeholder: 'Add Option',
72
+ default: {},
73
+ displayOptions: { show: showOnlyForBlockGet },
74
+ options: [
75
+ {
76
+ displayName: 'Fetch Metadata',
77
+ name: 'fetchMetadata',
78
+ type: 'boolean',
79
+ default: false,
80
+ description: 'Whether to include metadata (comments, timestamps, authors) for the blocks',
81
+ routing: {
82
+ send: {
83
+ type: 'query',
84
+ property: 'fetchMetadata',
85
+ },
86
+ },
87
+ },
88
+ ],
89
+ },
90
+ ];
91
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/block/get.ts"],"names":[],"mappings":";;;AAQA,MAAM,mBAAmB,GAAG,EAAE,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAE3D,QAAA,mBAAmB,GAAsB;IAErD;QACC,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,uBAAuB;QACpC,WAAW,EAAE,oGAAoG;QACjH,cAAc,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE;QAC7C,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,IAAI;aACd;SACD;KACD;IAGD;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,gGAAgG;QACjG,cAAc,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE;QAC7C,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,UAAU;aACpB;SACD;KACD;IAGD;QACC,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,mBAAmB;gBACzB,KAAK,EAAE,MAAM;gBACb,WAAW,EAAE,uDAAuD;aACpE;YACD;gBACC,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,mCAAmC;aAChD;SACD;QACD,OAAO,EAAE,MAAM;QACf,WAAW,EAAE,wBAAwB;QACrC,cAAc,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE;QAC7C,OAAO,EAAE;YACR,OAAO,EAAE;gBACR,OAAO,EAAE;oBACR,MAAM,EAAE,qEAAqE;iBAC7E;aACD;SACD;KACD;IAGD;QACC,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE;QAC7C,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,WAAW,EACV,4EAA4E;gBAC7E,OAAO,EAAE;oBACR,IAAI,EAAE;wBACL,IAAI,EAAE,OAAO;wBACb,QAAQ,EAAE,eAAe;qBACzB;iBACD;aACD;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const blockDescription: INodeProperties[];
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.blockDescription = void 0;
4
+ const get_1 = require("./get");
5
+ const insert_1 = require("./insert");
6
+ const update_1 = require("./update");
7
+ const delete_1 = require("./delete");
8
+ const move_1 = require("./move");
9
+ const search_1 = require("./search");
10
+ const showOnlyForBlocks = { resource: ['block'] };
11
+ exports.blockDescription = [
12
+ {
13
+ displayName: 'Operation',
14
+ name: 'operation',
15
+ type: 'options',
16
+ noDataExpression: true,
17
+ displayOptions: { show: showOnlyForBlocks },
18
+ options: [
19
+ {
20
+ name: 'Delete',
21
+ value: 'delete',
22
+ action: 'Delete blocks from a document',
23
+ description: 'Delete blocks by their IDs',
24
+ routing: {
25
+ request: {
26
+ method: 'DELETE',
27
+ url: '/blocks',
28
+ },
29
+ },
30
+ },
31
+ {
32
+ name: 'Get',
33
+ value: 'get',
34
+ action: 'Get blocks from a document',
35
+ description: 'Fetch content from documents by document or block ID',
36
+ routing: {
37
+ request: {
38
+ method: 'GET',
39
+ url: '/blocks',
40
+ },
41
+ },
42
+ },
43
+ {
44
+ name: 'Insert',
45
+ value: 'insert',
46
+ action: 'Insert blocks into a document',
47
+ description: 'Insert content into a document',
48
+ routing: {
49
+ request: {
50
+ method: 'POST',
51
+ url: '/blocks',
52
+ },
53
+ send: {
54
+ preSend: [insert_1.blockInsertPreSend],
55
+ },
56
+ },
57
+ },
58
+ {
59
+ name: 'Move',
60
+ value: 'move',
61
+ action: 'Move blocks',
62
+ description: 'Move blocks to reorder or move between documents',
63
+ routing: {
64
+ request: {
65
+ method: 'PUT',
66
+ url: '/blocks/move',
67
+ },
68
+ },
69
+ },
70
+ {
71
+ name: 'Search in Document',
72
+ value: 'searchInDocument',
73
+ action: 'Search in a specific document',
74
+ description: 'Search content within a specific document using regex',
75
+ routing: {
76
+ request: {
77
+ method: 'GET',
78
+ url: '/blocks/search',
79
+ },
80
+ },
81
+ },
82
+ {
83
+ name: 'Update',
84
+ value: 'update',
85
+ action: 'Update blocks in a document',
86
+ description: 'Update content in documents',
87
+ routing: {
88
+ request: {
89
+ method: 'PUT',
90
+ url: '/blocks',
91
+ },
92
+ },
93
+ },
94
+ ],
95
+ default: 'get',
96
+ },
97
+ ...get_1.blockGetDescription,
98
+ ...insert_1.blockInsertDescription,
99
+ ...update_1.blockUpdateDescription,
100
+ ...delete_1.blockDeleteDescription,
101
+ ...move_1.blockMoveDescription,
102
+ ...search_1.blockSearchDescription,
103
+ ];
104
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/block/index.ts"],"names":[],"mappings":";;;AAMA,+BAA4C;AAC5C,qCAAsE;AACtE,qCAAkD;AAClD,qCAAkD;AAClD,iCAA8C;AAC9C,qCAAkD;AAElD,MAAM,iBAAiB,GAAG,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAErC,QAAA,gBAAgB,GAAsB;IAElD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE;QAC3C,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,+BAA+B;gBACvC,WAAW,EAAE,4BAA4B;gBACzC,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,QAAQ;wBAChB,GAAG,EAAE,SAAS;qBACd;iBACD;aACD;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,4BAA4B;gBACpC,WAAW,EAAE,sDAAsD;gBACnE,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,SAAS;qBACd;iBACD;aACD;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,+BAA+B;gBACvC,WAAW,EAAE,gCAAgC;gBAC7C,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,MAAM;wBACd,GAAG,EAAE,SAAS;qBACd;oBACD,IAAI,EAAE;wBACL,OAAO,EAAE,CAAC,2BAAkB,CAAC;qBAC7B;iBACD;aACD;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,aAAa;gBACrB,WAAW,EAAE,kDAAkD;gBAC/D,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,cAAc;qBACnB;iBACD;aACD;YACD;gBACC,IAAI,EAAE,oBAAoB;gBAC1B,KAAK,EAAE,kBAAkB;gBACzB,MAAM,EAAE,+BAA+B;gBACvC,WAAW,EAAE,uDAAuD;gBACpE,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,gBAAgB;qBACrB;iBACD;aACD;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,6BAA6B;gBACrC,WAAW,EAAE,6BAA6B;gBAC1C,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,SAAS;qBACd;iBACD;aACD;SACD;QACD,OAAO,EAAE,KAAK;KACd;IAGD,GAAG,yBAAmB;IACtB,GAAG,+BAAsB;IACzB,GAAG,+BAAsB;IACzB,GAAG,+BAAsB;IACzB,GAAG,2BAAoB;IACvB,GAAG,+BAAsB;CACzB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties, IExecuteSingleFunctions, IHttpRequestOptions } from 'n8n-workflow';
2
+ export declare function blockInsertPreSend(this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
3
+ export declare const blockInsertDescription: INodeProperties[];
@@ -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,YA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E,IAAI,EAAE,iBAAiB,EAAE,KAAK,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,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IAAI,EAAE,QAAQ;wBACd,OAAO,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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IAAI,EAAE,OAAO;wBACb,QAAQ,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[];