@tom-schorn/n8n-nodes-paperless 0.1.3

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 (163) hide show
  1. package/LICENSE.md +23 -0
  2. package/README.md +122 -0
  3. package/dist/credentials/PaperlessApi.credentials.d.ts +8 -0
  4. package/dist/credentials/PaperlessApi.credentials.js +38 -0
  5. package/dist/credentials/PaperlessApi.credentials.js.map +1 -0
  6. package/dist/nodes/Paperless/Paperless.node.d.ts +4 -0
  7. package/dist/nodes/Paperless/Paperless.node.js +24 -0
  8. package/dist/nodes/Paperless/Paperless.node.js.map +1 -0
  9. package/dist/nodes/Paperless/Paperless.node.json +14 -0
  10. package/dist/nodes/Paperless/v2/PaperlessV2.node.d.ts +10 -0
  11. package/dist/nodes/Paperless/v2/PaperlessV2.node.js +56 -0
  12. package/dist/nodes/Paperless/v2/PaperlessV2.node.js.map +1 -0
  13. package/dist/nodes/Paperless/v2/actions/asn/asn.resource.d.ts +4 -0
  14. package/dist/nodes/Paperless/v2/actions/asn/asn.resource.js +60 -0
  15. package/dist/nodes/Paperless/v2/actions/asn/asn.resource.js.map +1 -0
  16. package/dist/nodes/Paperless/v2/actions/asn/next.operation.d.ts +3 -0
  17. package/dist/nodes/Paperless/v2/actions/asn/next.operation.js +14 -0
  18. package/dist/nodes/Paperless/v2/actions/asn/next.operation.js.map +1 -0
  19. package/dist/nodes/Paperless/v2/actions/correspondent/correspondent.resource.d.ts +8 -0
  20. package/dist/nodes/Paperless/v2/actions/correspondent/correspondent.resource.js +91 -0
  21. package/dist/nodes/Paperless/v2/actions/correspondent/correspondent.resource.js.map +1 -0
  22. package/dist/nodes/Paperless/v2/actions/correspondent/create.operation.d.ts +3 -0
  23. package/dist/nodes/Paperless/v2/actions/correspondent/create.operation.js +67 -0
  24. package/dist/nodes/Paperless/v2/actions/correspondent/create.operation.js.map +1 -0
  25. package/dist/nodes/Paperless/v2/actions/correspondent/get.operation.d.ts +3 -0
  26. package/dist/nodes/Paperless/v2/actions/correspondent/get.operation.js +56 -0
  27. package/dist/nodes/Paperless/v2/actions/correspondent/get.operation.js.map +1 -0
  28. package/dist/nodes/Paperless/v2/actions/correspondent/list.operation.d.ts +3 -0
  29. package/dist/nodes/Paperless/v2/actions/correspondent/list.operation.js +21 -0
  30. package/dist/nodes/Paperless/v2/actions/correspondent/list.operation.js.map +1 -0
  31. package/dist/nodes/Paperless/v2/actions/correspondent/remove.operation.d.ts +3 -0
  32. package/dist/nodes/Paperless/v2/actions/correspondent/remove.operation.js +56 -0
  33. package/dist/nodes/Paperless/v2/actions/correspondent/remove.operation.js.map +1 -0
  34. package/dist/nodes/Paperless/v2/actions/correspondent/update.operation.d.ts +3 -0
  35. package/dist/nodes/Paperless/v2/actions/correspondent/update.operation.js +107 -0
  36. package/dist/nodes/Paperless/v2/actions/correspondent/update.operation.js.map +1 -0
  37. package/dist/nodes/Paperless/v2/actions/custom_field/create.operation.d.ts +3 -0
  38. package/dist/nodes/Paperless/v2/actions/custom_field/create.operation.js +116 -0
  39. package/dist/nodes/Paperless/v2/actions/custom_field/create.operation.js.map +1 -0
  40. package/dist/nodes/Paperless/v2/actions/custom_field/custom_field.resource.d.ts +8 -0
  41. package/dist/nodes/Paperless/v2/actions/custom_field/custom_field.resource.js +91 -0
  42. package/dist/nodes/Paperless/v2/actions/custom_field/custom_field.resource.js.map +1 -0
  43. package/dist/nodes/Paperless/v2/actions/custom_field/get.operation.d.ts +3 -0
  44. package/dist/nodes/Paperless/v2/actions/custom_field/get.operation.js +56 -0
  45. package/dist/nodes/Paperless/v2/actions/custom_field/get.operation.js.map +1 -0
  46. package/dist/nodes/Paperless/v2/actions/custom_field/list.operation.d.ts +3 -0
  47. package/dist/nodes/Paperless/v2/actions/custom_field/list.operation.js +21 -0
  48. package/dist/nodes/Paperless/v2/actions/custom_field/list.operation.js.map +1 -0
  49. package/dist/nodes/Paperless/v2/actions/custom_field/remove.operation.d.ts +3 -0
  50. package/dist/nodes/Paperless/v2/actions/custom_field/remove.operation.js +56 -0
  51. package/dist/nodes/Paperless/v2/actions/custom_field/remove.operation.js.map +1 -0
  52. package/dist/nodes/Paperless/v2/actions/custom_field/update.operation.d.ts +3 -0
  53. package/dist/nodes/Paperless/v2/actions/custom_field/update.operation.js +128 -0
  54. package/dist/nodes/Paperless/v2/actions/custom_field/update.operation.js.map +1 -0
  55. package/dist/nodes/Paperless/v2/actions/document/create.operation.d.ts +3 -0
  56. package/dist/nodes/Paperless/v2/actions/document/create.operation.js +209 -0
  57. package/dist/nodes/Paperless/v2/actions/document/create.operation.js.map +1 -0
  58. package/dist/nodes/Paperless/v2/actions/document/document.resource.d.ts +13 -0
  59. package/dist/nodes/Paperless/v2/actions/document/document.resource.js +131 -0
  60. package/dist/nodes/Paperless/v2/actions/document/document.resource.js.map +1 -0
  61. package/dist/nodes/Paperless/v2/actions/document/get.operation.d.ts +3 -0
  62. package/dist/nodes/Paperless/v2/actions/document/get.operation.js +77 -0
  63. package/dist/nodes/Paperless/v2/actions/document/get.operation.js.map +1 -0
  64. package/dist/nodes/Paperless/v2/actions/document/get_history.operation.d.ts +3 -0
  65. package/dist/nodes/Paperless/v2/actions/document/get_history.operation.js +86 -0
  66. package/dist/nodes/Paperless/v2/actions/document/get_history.operation.js.map +1 -0
  67. package/dist/nodes/Paperless/v2/actions/document/get_metadata.operation.d.ts +3 -0
  68. package/dist/nodes/Paperless/v2/actions/document/get_metadata.operation.js +79 -0
  69. package/dist/nodes/Paperless/v2/actions/document/get_metadata.operation.js.map +1 -0
  70. package/dist/nodes/Paperless/v2/actions/document/get_metadata_suggestions.operation.d.ts +3 -0
  71. package/dist/nodes/Paperless/v2/actions/document/get_metadata_suggestions.operation.js +119 -0
  72. package/dist/nodes/Paperless/v2/actions/document/get_metadata_suggestions.operation.js.map +1 -0
  73. package/dist/nodes/Paperless/v2/actions/document/get_preview.operation.d.ts +3 -0
  74. package/dist/nodes/Paperless/v2/actions/document/get_preview.operation.js +84 -0
  75. package/dist/nodes/Paperless/v2/actions/document/get_preview.operation.js.map +1 -0
  76. package/dist/nodes/Paperless/v2/actions/document/get_sharelink.operation.d.ts +3 -0
  77. package/dist/nodes/Paperless/v2/actions/document/get_sharelink.operation.js +79 -0
  78. package/dist/nodes/Paperless/v2/actions/document/get_sharelink.operation.js.map +1 -0
  79. package/dist/nodes/Paperless/v2/actions/document/list.operation.d.ts +3 -0
  80. package/dist/nodes/Paperless/v2/actions/document/list.operation.js +21 -0
  81. package/dist/nodes/Paperless/v2/actions/document/list.operation.js.map +1 -0
  82. package/dist/nodes/Paperless/v2/actions/document/remove.operation.d.ts +3 -0
  83. package/dist/nodes/Paperless/v2/actions/document/remove.operation.js +77 -0
  84. package/dist/nodes/Paperless/v2/actions/document/remove.operation.js.map +1 -0
  85. package/dist/nodes/Paperless/v2/actions/document/update.operation.d.ts +3 -0
  86. package/dist/nodes/Paperless/v2/actions/document/update.operation.js +368 -0
  87. package/dist/nodes/Paperless/v2/actions/document/update.operation.js.map +1 -0
  88. package/dist/nodes/Paperless/v2/actions/document_note/create.operation.d.ts +3 -0
  89. package/dist/nodes/Paperless/v2/actions/document_note/create.operation.js +98 -0
  90. package/dist/nodes/Paperless/v2/actions/document_note/create.operation.js.map +1 -0
  91. package/dist/nodes/Paperless/v2/actions/document_note/document_note.resource.d.ts +6 -0
  92. package/dist/nodes/Paperless/v2/actions/document_note/document_note.resource.js +75 -0
  93. package/dist/nodes/Paperless/v2/actions/document_note/document_note.resource.js.map +1 -0
  94. package/dist/nodes/Paperless/v2/actions/document_note/list.operation.d.ts +3 -0
  95. package/dist/nodes/Paperless/v2/actions/document_note/list.operation.js +86 -0
  96. package/dist/nodes/Paperless/v2/actions/document_note/list.operation.js.map +1 -0
  97. package/dist/nodes/Paperless/v2/actions/document_note/remove.operation.d.ts +3 -0
  98. package/dist/nodes/Paperless/v2/actions/document_note/remove.operation.js +123 -0
  99. package/dist/nodes/Paperless/v2/actions/document_note/remove.operation.js.map +1 -0
  100. package/dist/nodes/Paperless/v2/actions/document_type/create.operation.d.ts +3 -0
  101. package/dist/nodes/Paperless/v2/actions/document_type/create.operation.js +67 -0
  102. package/dist/nodes/Paperless/v2/actions/document_type/create.operation.js.map +1 -0
  103. package/dist/nodes/Paperless/v2/actions/document_type/document_type.resource.d.ts +8 -0
  104. package/dist/nodes/Paperless/v2/actions/document_type/document_type.resource.js +91 -0
  105. package/dist/nodes/Paperless/v2/actions/document_type/document_type.resource.js.map +1 -0
  106. package/dist/nodes/Paperless/v2/actions/document_type/get.operation.d.ts +3 -0
  107. package/dist/nodes/Paperless/v2/actions/document_type/get.operation.js +56 -0
  108. package/dist/nodes/Paperless/v2/actions/document_type/get.operation.js.map +1 -0
  109. package/dist/nodes/Paperless/v2/actions/document_type/list.operation.d.ts +3 -0
  110. package/dist/nodes/Paperless/v2/actions/document_type/list.operation.js +21 -0
  111. package/dist/nodes/Paperless/v2/actions/document_type/list.operation.js.map +1 -0
  112. package/dist/nodes/Paperless/v2/actions/document_type/remove.operation.d.ts +3 -0
  113. package/dist/nodes/Paperless/v2/actions/document_type/remove.operation.js +56 -0
  114. package/dist/nodes/Paperless/v2/actions/document_type/remove.operation.js.map +1 -0
  115. package/dist/nodes/Paperless/v2/actions/document_type/update.operation.d.ts +3 -0
  116. package/dist/nodes/Paperless/v2/actions/document_type/update.operation.js +111 -0
  117. package/dist/nodes/Paperless/v2/actions/document_type/update.operation.js.map +1 -0
  118. package/dist/nodes/Paperless/v2/actions/node.type.d.ts +12 -0
  119. package/dist/nodes/Paperless/v2/actions/node.type.js +3 -0
  120. package/dist/nodes/Paperless/v2/actions/node.type.js.map +1 -0
  121. package/dist/nodes/Paperless/v2/actions/router.d.ts +2 -0
  122. package/dist/nodes/Paperless/v2/actions/router.js +92 -0
  123. package/dist/nodes/Paperless/v2/actions/router.js.map +1 -0
  124. package/dist/nodes/Paperless/v2/actions/tag/create.operation.d.ts +3 -0
  125. package/dist/nodes/Paperless/v2/actions/tag/create.operation.js +67 -0
  126. package/dist/nodes/Paperless/v2/actions/tag/create.operation.js.map +1 -0
  127. package/dist/nodes/Paperless/v2/actions/tag/get.operation.d.ts +3 -0
  128. package/dist/nodes/Paperless/v2/actions/tag/get.operation.js +56 -0
  129. package/dist/nodes/Paperless/v2/actions/tag/get.operation.js.map +1 -0
  130. package/dist/nodes/Paperless/v2/actions/tag/list.operation.d.ts +3 -0
  131. package/dist/nodes/Paperless/v2/actions/tag/list.operation.js +21 -0
  132. package/dist/nodes/Paperless/v2/actions/tag/list.operation.js.map +1 -0
  133. package/dist/nodes/Paperless/v2/actions/tag/remove.operation.d.ts +3 -0
  134. package/dist/nodes/Paperless/v2/actions/tag/remove.operation.js +56 -0
  135. package/dist/nodes/Paperless/v2/actions/tag/remove.operation.js.map +1 -0
  136. package/dist/nodes/Paperless/v2/actions/tag/tag.resource.d.ts +8 -0
  137. package/dist/nodes/Paperless/v2/actions/tag/tag.resource.js +91 -0
  138. package/dist/nodes/Paperless/v2/actions/tag/tag.resource.js.map +1 -0
  139. package/dist/nodes/Paperless/v2/actions/tag/update.operation.d.ts +3 -0
  140. package/dist/nodes/Paperless/v2/actions/tag/update.operation.js +107 -0
  141. package/dist/nodes/Paperless/v2/actions/tag/update.operation.js.map +1 -0
  142. package/dist/nodes/Paperless/v2/actions/task/get.operation.d.ts +3 -0
  143. package/dist/nodes/Paperless/v2/actions/task/get.operation.js +38 -0
  144. package/dist/nodes/Paperless/v2/actions/task/get.operation.js.map +1 -0
  145. package/dist/nodes/Paperless/v2/actions/task/task.resource.d.ts +4 -0
  146. package/dist/nodes/Paperless/v2/actions/task/task.resource.js +59 -0
  147. package/dist/nodes/Paperless/v2/actions/task/task.resource.js.map +1 -0
  148. package/dist/nodes/Paperless/v2/actions/version.d.ts +2 -0
  149. package/dist/nodes/Paperless/v2/actions/version.js +117 -0
  150. package/dist/nodes/Paperless/v2/actions/version.js.map +1 -0
  151. package/dist/nodes/Paperless/v2/methods/index.d.ts +1 -0
  152. package/dist/nodes/Paperless/v2/methods/index.js +38 -0
  153. package/dist/nodes/Paperless/v2/methods/index.js.map +1 -0
  154. package/dist/nodes/Paperless/v2/methods/listSearch.d.ts +8 -0
  155. package/dist/nodes/Paperless/v2/methods/listSearch.js +71 -0
  156. package/dist/nodes/Paperless/v2/methods/listSearch.js.map +1 -0
  157. package/dist/nodes/Paperless/v2/paperless-ngx.svg +1 -0
  158. package/dist/nodes/Paperless/v2/transport/index.d.ts +3 -0
  159. package/dist/nodes/Paperless/v2/transport/index.js +50 -0
  160. package/dist/nodes/Paperless/v2/transport/index.js.map +1 -0
  161. package/dist/package.json +74 -0
  162. package/index.js +0 -0
  163. package/package.json +74 -0
package/LICENSE.md ADDED
@@ -0,0 +1,23 @@
1
+ Copyright 2022 n8n
2
+ Copyright 2026 Tom Schorn
3
+
4
+ This project is a fork of chezmoi-sh/n8n-nodes-paperless and includes
5
+ modifications by Tom Schorn. Original work licensed under the MIT License.
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
8
+ this software and associated documentation files (the "Software"), to deal in
9
+ the Software without restriction, including without limitation the rights to
10
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
11
+ of the Software, and to permit persons to whom the Software is furnished to do
12
+ so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,122 @@
1
+ <!-- trunk-ignore-all(markdownlint/MD041) -->
2
+
3
+ ![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)
4
+
5
+ # n8n-nodes-paperless
6
+
7
+ <!-- trunk-ignore-begin(markdownlint/MD033) -->
8
+ <div align="center">
9
+ <img
10
+ src="https://raw.githubusercontent.com/chezmoi-sh/n8n-nodes-paperless/refs/heads/main/nodes/Paperless/v2/paperless-ngx.svg"
11
+ alt="Paperless Icon"
12
+ height="50px"
13
+ >
14
+ </div>
15
+ <!-- trunk-ignore-end(markdownlint/MD033) -->
16
+
17
+ This is a n8n community node. It lets you use [Paperless-ngx](https://docs.paperless-ngx.com/) in your n8n workflows.
18
+
19
+ Paperless-ngx is a document management system that transforms your physical documents into a searchable online archive so you can keep your paper documents, but lose the cabinet.
20
+
21
+ > [!NOTE]
22
+ > This is an actively maintained fork of [chezmoi-sh/n8n-nodes-paperless](https://github.com/chezmoi-sh/n8n-nodes-paperless), continuing development with bug fixes and additional features. Licensed under MIT.
23
+
24
+ [Installation](#installation)
25
+ [Operations](#operations)
26
+ [Credentials](#credentials)
27
+ [Compatibility](#compatibility)
28
+ [Resources](#resources)
29
+
30
+ ## Installation
31
+
32
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
33
+
34
+ > [!NOTE]
35
+ > This node requires the `form-data` package for handling multipart/form-data requests. It will be automatically installed as a dependency if not already present in your n8n installation.
36
+
37
+ ## Operations
38
+
39
+ The node supports the following resources and operations:
40
+
41
+ ### ASN (Archival Series Number)
42
+
43
+ - Get next ASN
44
+
45
+ ### Correspondent
46
+
47
+ - Create/Update/Delete correspondent
48
+ - Get a correspondent
49
+ - List all correspondents
50
+
51
+ ### Custom Field
52
+
53
+ - Create/Update/Delete custom field
54
+ - Get a custom field
55
+ - List all custom fields
56
+
57
+ ### Document
58
+
59
+ - Create/Update/Delete document
60
+ - Get a document
61
+ - Get document history
62
+ - Get document metadata
63
+ - Get metadata suggestions
64
+ - Get document preview
65
+ - Get document share links
66
+ - List all documents
67
+
68
+ ### Document Metadata
69
+
70
+ - Get metadata suggestions
71
+
72
+ ### Document Note
73
+
74
+ - Create/Delete document note
75
+ - List document notes
76
+
77
+ ### Document Type
78
+
79
+ - Create/Update/Delete document type
80
+ - Get a document type
81
+ - List all document types
82
+
83
+ ### Tag
84
+
85
+ - Create/Update/Delete tag
86
+ - Get a tag
87
+ - List all tags
88
+
89
+ ### Task
90
+
91
+ - Get a task
92
+
93
+ ## AI Tools
94
+
95
+ This node can also be used to interact with the [AI tools agent](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/tools-agent/). However, keep in mind that it is currently not officially supported by n8n and needs some changes to the n8n codebase to work. For more details, see [this issue](https://github.com/n8n-io/n8n/issues/12593).
96
+
97
+ ## Credentials
98
+
99
+ You need to provide the following to authenticate:
100
+
101
+ - Paperless-ngx instance URL
102
+ - API token
103
+
104
+ To get your API token:
105
+
106
+ 1. Login to your Paperless-ngx instance
107
+ 2. Go to your user settings
108
+ 3. Create a new API token
109
+
110
+ ## Compatibility
111
+
112
+ Requires n8n version 1.0.0 or later and Paperless-ngx version 2.14.0 or later. Earlier versions may work but are not officially supported or tested.
113
+
114
+ ## Resources
115
+
116
+ - [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
117
+ - [Paperless-ngx documentation](https://docs.paperless-ngx.com/)
118
+ - [Paperless-ngx API documentation](https://docs.paperless-ngx.com/api/)
119
+
120
+ ## License
121
+
122
+ [MIT](./LICENSE.md)
@@ -0,0 +1,8 @@
1
+ import { ICredentialType, INodeProperties, IAuthenticateGeneric } from 'n8n-workflow';
2
+ export declare class PaperlessApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaperlessApi = void 0;
4
+ class PaperlessApi {
5
+ constructor() {
6
+ this.name = 'paperlessApi';
7
+ this.displayName = 'Paperless-ngx API';
8
+ this.documentationUrl = 'https://docs.paperless-ngx.com/api/#authorization';
9
+ this.properties = [
10
+ {
11
+ name: 'url',
12
+ displayName: 'Paperless-ngx API URL',
13
+ default: 'http://paperless:8000/api',
14
+ required: true,
15
+ type: 'string',
16
+ validateType: 'url',
17
+ },
18
+ {
19
+ name: 'apiKey',
20
+ displayName: 'Paperless-ngx API Key',
21
+ default: '',
22
+ required: true,
23
+ type: 'string',
24
+ typeOptions: { password: true },
25
+ },
26
+ ];
27
+ this.authenticate = {
28
+ type: 'generic',
29
+ properties: {
30
+ headers: {
31
+ Authorization: '=Token {{$credentials.apiKey}}',
32
+ },
33
+ },
34
+ };
35
+ }
36
+ }
37
+ exports.PaperlessApi = PaperlessApi;
38
+ //# sourceMappingURL=PaperlessApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaperlessApi.credentials.js","sourceRoot":"","sources":["../../credentials/PaperlessApi.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,YAAY;IAAzB;QACC,SAAI,GAAG,cAAc,CAAC;QAEtB,gBAAW,GAAG,mBAAmB,CAAC;QAClC,qBAAgB,GAAG,mDAAmD,CAAC;QACvE,eAAU,GAAsB;YAC/B;gBACC,IAAI,EAAE,KAAK;gBACX,WAAW,EAAE,uBAAuB;gBACpC,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAQ;gBACd,YAAY,EAAE,KAAK;aACnB;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uBAAuB;gBACpC,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;aAC/B;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,gCAAgC;iBAC/C;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAhCD,oCAgCC"}
@@ -0,0 +1,4 @@
1
+ import { VersionedNodeType } from 'n8n-workflow';
2
+ export declare class Paperless extends VersionedNodeType {
3
+ constructor();
4
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Paperless = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const PaperlessV2_node_1 = require("./v2/PaperlessV2.node");
6
+ class Paperless extends n8n_workflow_1.VersionedNodeType {
7
+ constructor() {
8
+ const baseDescription = {
9
+ displayName: 'Paperless-ngx',
10
+ name: 'paperless',
11
+ defaultVersion: 2,
12
+ description: 'Consume documents and metadata from Paperless-ngx API',
13
+ group: ['input'],
14
+ icon: 'file:paperless-ngx.svg',
15
+ usableAsTool: true,
16
+ };
17
+ const nodeVersions = {
18
+ 2: new PaperlessV2_node_1.PaperlessV2(baseDescription),
19
+ };
20
+ super(nodeVersions, baseDescription);
21
+ }
22
+ }
23
+ exports.Paperless = Paperless;
24
+ //# sourceMappingURL=Paperless.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Paperless.node.js","sourceRoot":"","sources":["../../../nodes/Paperless/Paperless.node.ts"],"names":[],"mappings":";;;AACA,+CAA+F;AAC/F,4DAAoD;AAEpD,MAAa,SAAU,SAAQ,gCAAiB;IAC/C;QACC,MAAM,eAAe,GAA6B;YACjD,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,WAAW;YACjB,cAAc,EAAE,CAAC;YACjB,WAAW,EAAE,uDAAuD;YACpE,KAAK,EAAE,CAAC,OAAO,CAAC;YAChB,IAAI,EAAE,wBAAwB;YAC9B,YAAY,EAAE,IAAI;SAClB,CAAC;QAEF,MAAM,YAAY,GAAuC;YACxD,CAAC,EAAE,IAAI,8BAAW,CAAC,eAAe,CAAC;SACnC,CAAC;QAEF,KAAK,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;IACtC,CAAC;CACD;AAlBD,8BAkBC"}
@@ -0,0 +1,14 @@
1
+ {
2
+ "node": "n8n-nodes-base.paperless-ngx",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Data & Storage"],
6
+ "resources": {
7
+ "credentialDocumentation": [],
8
+ "primaryDocumentation": [
9
+ {
10
+ "url": "https://docs.paperless-ngx.com/"
11
+ }
12
+ ]
13
+ }
14
+ }
@@ -0,0 +1,10 @@
1
+ import type { IExecuteFunctions, INodeType, INodeTypeDescription, INodeTypeBaseDescription, INodeExecutionData } from 'n8n-workflow';
2
+ import { listSearch } from './methods';
3
+ export declare class PaperlessV2 implements INodeType {
4
+ description: INodeTypeDescription;
5
+ constructor(baseDescription: INodeTypeBaseDescription);
6
+ methods: {
7
+ listSearch: typeof listSearch;
8
+ };
9
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
10
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.PaperlessV2 = void 0;
37
+ const router_1 = require("./actions/router");
38
+ const version = __importStar(require("./actions/version"));
39
+ const methods_1 = require("./methods");
40
+ class PaperlessV2 {
41
+ constructor(baseDescription) {
42
+ this.methods = {
43
+ listSearch: methods_1.listSearch,
44
+ };
45
+ this.description = {
46
+ ...baseDescription,
47
+ ...version.description,
48
+ usableAsTool: true,
49
+ };
50
+ }
51
+ async execute() {
52
+ return await router_1.router.call(this);
53
+ }
54
+ }
55
+ exports.PaperlessV2 = PaperlessV2;
56
+ //# sourceMappingURL=PaperlessV2.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaperlessV2.node.js","sourceRoot":"","sources":["../../../../nodes/Paperless/v2/PaperlessV2.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,6CAA0C;AAC1C,2DAA6C;AAC7C,uCAAuC;AAEvC,MAAa,WAAW;IAGvB,YAAY,eAAyC;QAQrD,YAAO,GAAG;YACT,UAAU,EAAV,oBAAU;SACV,CAAC;QATD,IAAI,CAAC,WAAW,GAAG;YAClB,GAAG,eAAe;YAClB,GAAG,OAAO,CAAC,WAAW;YACtB,YAAY,EAAE,IAAI;SAClB,CAAC;IACH,CAAC;IAMD,KAAK,CAAC,OAAO;QACZ,OAAO,MAAM,eAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACD;AAlBD,kCAkBC"}
@@ -0,0 +1,4 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ import * as next from './next.operation';
3
+ export { next };
4
+ export declare const description: INodeProperties[];
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.description = exports.next = void 0;
37
+ const next = __importStar(require("./next.operation"));
38
+ exports.next = next;
39
+ exports.description = [
40
+ {
41
+ displayName: 'Operation',
42
+ name: 'operation',
43
+ default: 'next',
44
+ displayOptions: {
45
+ show: { resource: ['asn'] },
46
+ },
47
+ noDataExpression: true,
48
+ options: [
49
+ {
50
+ name: 'Next',
51
+ value: 'next',
52
+ description: 'Get next ASN',
53
+ action: 'Get the next ASN',
54
+ },
55
+ ],
56
+ type: 'options',
57
+ },
58
+ ...next.description,
59
+ ];
60
+ //# sourceMappingURL=asn.resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asn.resource.js","sourceRoot":"","sources":["../../../../../../nodes/Paperless/v2/actions/asn/asn.resource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uDAAyC;AAEhC,oBAAI;AAEA,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,MAAM;QACf,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE;SAC3B;QACD,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;gBACb,WAAW,EAAE,cAAc;gBAC3B,MAAM,EAAE,kBAAkB;aAC1B;SACD;QACD,IAAI,EAAE,SAAS;KACf;IACD,GAAG,IAAI,CAAC,WAAW;CACnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];
3
+ export declare function execute(this: IExecuteFunctions, itemIndex: number): Promise<INodeExecutionData>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../transport");
6
+ exports.description = [];
7
+ async function execute(itemIndex) {
8
+ const endpoint = '/documents/next_asn/';
9
+ const response = (await transport_1.apiRequest.call(this, itemIndex, 'GET', endpoint));
10
+ return {
11
+ json: { results: [response] },
12
+ };
13
+ }
14
+ //# sourceMappingURL=next.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next.operation.js","sourceRoot":"","sources":["../../../../../../nodes/Paperless/v2/actions/asn/next.operation.ts"],"names":[],"mappings":";;;AAKA,0BAUC;AAdD,+CAA6C;AAEhC,QAAA,WAAW,GAAsB,EAAE,CAAC;AAE1C,KAAK,UAAU,OAAO,CAE5B,SAAiB;IAEjB,MAAM,QAAQ,GAAG,sBAAsB,CAAC;IACxC,MAAM,QAAQ,GAAG,CAAC,MAAM,sBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAW,CAAC;IAErF,OAAO;QACN,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE;KAC7B,CAAC;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ import * as create from './create.operation';
3
+ import * as get from './get.operation';
4
+ import * as list from './list.operation';
5
+ import * as remove from './remove.operation';
6
+ import * as update from './update.operation';
7
+ export { create, get, list, remove, update };
8
+ export declare const description: INodeProperties[];
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.description = exports.update = exports.remove = exports.list = exports.get = exports.create = void 0;
37
+ const create = __importStar(require("./create.operation"));
38
+ exports.create = create;
39
+ const get = __importStar(require("./get.operation"));
40
+ exports.get = get;
41
+ const list = __importStar(require("./list.operation"));
42
+ exports.list = list;
43
+ const remove = __importStar(require("./remove.operation"));
44
+ exports.remove = remove;
45
+ const update = __importStar(require("./update.operation"));
46
+ exports.update = update;
47
+ exports.description = [
48
+ {
49
+ displayName: 'Operation',
50
+ name: 'operation',
51
+ default: 'list',
52
+ displayOptions: {
53
+ show: { resource: ['correspondent'] },
54
+ },
55
+ noDataExpression: true,
56
+ options: [
57
+ {
58
+ name: 'Create a Correspondent',
59
+ value: 'create',
60
+ action: 'Create a new correspondent',
61
+ },
62
+ {
63
+ name: 'Delete a Correspondent',
64
+ value: 'remove',
65
+ action: 'Delete a correspondent',
66
+ },
67
+ {
68
+ name: 'Get a Correspondent',
69
+ value: 'get',
70
+ action: 'Get a correspondent',
71
+ },
72
+ {
73
+ name: 'List Correspondents',
74
+ value: 'list',
75
+ action: 'List all correspondents',
76
+ },
77
+ {
78
+ name: 'Update a Correspondent',
79
+ value: 'update',
80
+ action: 'Update a correspondent',
81
+ },
82
+ ],
83
+ type: 'options',
84
+ },
85
+ ...create.description,
86
+ ...get.description,
87
+ ...list.description,
88
+ ...remove.description,
89
+ ...update.description,
90
+ ];
91
+ //# sourceMappingURL=correspondent.resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"correspondent.resource.js","sourceRoot":"","sources":["../../../../../../nodes/Paperless/v2/actions/correspondent/correspondent.resource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,2DAA6C;AAMpC,wBAAM;AALf,qDAAuC;AAKtB,kBAAG;AAJpB,uDAAyC;AAInB,oBAAI;AAH1B,2DAA6C;AAGjB,wBAAM;AAFlC,2DAA6C;AAET,wBAAM;AAE7B,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,MAAM;QACf,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE;SACrC;QACD,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,wBAAwB;gBAC9B,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,4BAA4B;aACpC;YACD;gBACC,IAAI,EAAE,wBAAwB;gBAC9B,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,wBAAwB;aAChC;YACD;gBACC,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,qBAAqB;aAC7B;YACD;gBACC,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,yBAAyB;aACjC;YACD;gBACC,IAAI,EAAE,wBAAwB;gBAC9B,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,wBAAwB;aAChC;SACD;QACD,IAAI,EAAE,SAAS;KACf;IACD,GAAG,MAAM,CAAC,WAAW;IACrB,GAAG,GAAG,CAAC,WAAW;IAClB,GAAG,IAAI,CAAC,WAAW;IACnB,GAAG,MAAM,CAAC,WAAW;IACrB,GAAG,MAAM,CAAC,WAAW;CACrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];
3
+ export declare function execute(this: IExecuteFunctions, itemIndex: number): Promise<INodeExecutionData>;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../transport");
6
+ exports.description = [
7
+ {
8
+ displayName: 'Name',
9
+ name: 'name',
10
+ displayOptions: {
11
+ show: {
12
+ resource: ['correspondent'],
13
+ operation: ['create'],
14
+ },
15
+ },
16
+ placeholder: 'Name of the correspondent',
17
+ required: true,
18
+ type: 'string',
19
+ default: '',
20
+ },
21
+ {
22
+ displayName: 'Matching Algorithm',
23
+ name: 'matching_algorithm',
24
+ default: 6,
25
+ displayOptions: {
26
+ show: {
27
+ resource: ['correspondent'],
28
+ operation: ['create'],
29
+ },
30
+ },
31
+ options: [
32
+ { name: 'None: Disable matching', value: 0 },
33
+ { name: 'Any: Document contains any of these words (space separated)', value: 1 },
34
+ { name: 'All: Document contains all of these words (space separated)', value: 2 },
35
+ { name: 'Exact: Document contains this string', value: 3 },
36
+ { name: 'Regular Expression: Document Matches This Regular Expression', value: 4 },
37
+ { name: 'Fuzzy: Document contains a word similar to this word', value: 5 },
38
+ { name: 'Auto: Learn matching automatically', value: 6 },
39
+ ],
40
+ type: 'options',
41
+ },
42
+ {
43
+ displayName: 'Matching Expression',
44
+ name: 'match',
45
+ default: '',
46
+ displayOptions: {
47
+ show: {
48
+ resource: ['correspondent'],
49
+ operation: ['create'],
50
+ matching_algorithm: [1, 2, 3, 4, 5],
51
+ },
52
+ },
53
+ placeholder: 'Matching expression to match',
54
+ type: 'string',
55
+ },
56
+ ];
57
+ async function execute(itemIndex) {
58
+ const endpoint = `/correspondents/`;
59
+ const body = {
60
+ name: this.getNodeParameter('name', itemIndex),
61
+ matching_algorithm: this.getNodeParameter('matching_algorithm', itemIndex),
62
+ match: this.getNodeParameter('match', itemIndex, ''),
63
+ };
64
+ const response = (await transport_1.apiRequest.call(this, itemIndex, 'POST', endpoint, body));
65
+ return { json: { results: [response] } };
66
+ }
67
+ //# sourceMappingURL=create.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.operation.js","sourceRoot":"","sources":["../../../../../../nodes/Paperless/v2/actions/correspondent/create.operation.ts"],"names":[],"mappings":";;;AAuDA,0BAcC;AApED,+CAA6C;AAEhC,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,eAAe,CAAC;gBAC3B,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,WAAW,EAAE,2BAA2B;QACxC,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;KACX;IACD;QACC,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,CAAC;QACV,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,eAAe,CAAC;gBAC3B,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,wBAAwB,EAAE,KAAK,EAAE,CAAC,EAAE;YAC5C,EAAE,IAAI,EAAE,6DAA6D,EAAE,KAAK,EAAE,CAAC,EAAE;YACjF,EAAE,IAAI,EAAE,6DAA6D,EAAE,KAAK,EAAE,CAAC,EAAE;YACjF,EAAE,IAAI,EAAE,sCAAsC,EAAE,KAAK,EAAE,CAAC,EAAE;YAC1D,EAAE,IAAI,EAAE,8DAA8D,EAAE,KAAK,EAAE,CAAC,EAAE;YAClF,EAAE,IAAI,EAAE,sDAAsD,EAAE,KAAK,EAAE,CAAC,EAAE;YAC1E,EAAE,IAAI,EAAE,oCAAoC,EAAE,KAAK,EAAE,CAAC,EAAE;SACxD;QACD,IAAI,EAAE,SAAS;KACf;IACD;QACC,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,eAAe,CAAC;gBAC3B,SAAS,EAAE,CAAC,QAAQ,CAAC;gBACrB,kBAAkB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;aACnC;SACD;QACD,WAAW,EAAE,8BAA8B;QAC3C,IAAI,EAAE,QAAQ;KACd;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAE5B,SAAiB;IAEjB,MAAM,QAAQ,GAAG,kBAAkB,CAAC;IACpC,MAAM,IAAI,GAAG;QACZ,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC;QAC9C,kBAAkB,EAAE,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,SAAS,CAAC;QAC1E,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC;KACpD,CAAC;IAEF,MAAM,QAAQ,GAAG,CAAC,MAAM,sBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAQ,CAAC;IAEzF,OAAO,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];
3
+ export declare function execute(this: IExecuteFunctions, itemIndex: number): Promise<INodeExecutionData>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../transport");
6
+ exports.description = [
7
+ {
8
+ displayName: 'ID',
9
+ name: 'id',
10
+ default: { mode: 'list', value: '' },
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['correspondent'],
14
+ operation: ['get'],
15
+ },
16
+ },
17
+ modes: [
18
+ {
19
+ displayName: 'From List',
20
+ name: 'list',
21
+ placeholder: `Select a Correspondent...`,
22
+ type: 'list',
23
+ typeOptions: {
24
+ searchListMethod: 'correspondentSearch',
25
+ searchFilterRequired: false,
26
+ searchable: true,
27
+ },
28
+ },
29
+ {
30
+ displayName: 'By ID',
31
+ name: 'id',
32
+ placeholder: `Enter Correspondent ID...`,
33
+ type: 'string',
34
+ validation: [
35
+ {
36
+ type: 'regex',
37
+ properties: {
38
+ regex: '^[1-9][0-9]*$',
39
+ errorMessage: 'The ID must be a positive integer',
40
+ },
41
+ },
42
+ ],
43
+ },
44
+ ],
45
+ placeholder: 'ID of the correspondent',
46
+ required: true,
47
+ type: 'resourceLocator',
48
+ },
49
+ ];
50
+ async function execute(itemIndex) {
51
+ const id = this.getNodeParameter('id', itemIndex).value;
52
+ const endpoint = `/correspondents/${id}/`;
53
+ const response = (await transport_1.apiRequest.call(this, itemIndex, 'GET', endpoint));
54
+ return { json: { results: [response] } };
55
+ }
56
+ //# sourceMappingURL=get.operation.js.map