@wals-pro/n8n-nodes-weclapp 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +206 -0
- package/dist/credentials/WeclappApi.credentials.d.ts +10 -0
- package/dist/credentials/WeclappApi.credentials.js +56 -0
- package/dist/credentials/WeclappApi.credentials.js.map +1 -0
- package/dist/credentials/weclapp.dark.svg +19 -0
- package/dist/credentials/weclapp.light.svg +19 -0
- package/dist/nodes/Weclapp/GenericFunctions.d.ts +19 -0
- package/dist/nodes/Weclapp/GenericFunctions.js +287 -0
- package/dist/nodes/Weclapp/GenericFunctions.js.map +1 -0
- package/dist/nodes/Weclapp/SharedFields.d.ts +24 -0
- package/dist/nodes/Weclapp/SharedFields.js +348 -0
- package/dist/nodes/Weclapp/SharedFields.js.map +1 -0
- package/dist/nodes/Weclapp/Weclapp.node.d.ts +27 -0
- package/dist/nodes/Weclapp/Weclapp.node.js +231 -0
- package/dist/nodes/Weclapp/Weclapp.node.js.map +1 -0
- package/dist/nodes/Weclapp/actions/applyPayment.d.ts +9 -0
- package/dist/nodes/Weclapp/actions/applyPayment.js +64 -0
- package/dist/nodes/Weclapp/actions/applyPayment.js.map +1 -0
- package/dist/nodes/Weclapp/actions/articlePriceSync.d.ts +41 -0
- package/dist/nodes/Weclapp/actions/articlePriceSync.js +238 -0
- package/dist/nodes/Weclapp/actions/articlePriceSync.js.map +1 -0
- package/dist/nodes/Weclapp/actions/documentUpload.d.ts +3 -0
- package/dist/nodes/Weclapp/actions/documentUpload.js +90 -0
- package/dist/nodes/Weclapp/actions/documentUpload.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/ArticleDescription.d.ts +3 -0
- package/dist/nodes/Weclapp/descriptions/ArticleDescription.js +724 -0
- package/dist/nodes/Weclapp/descriptions/ArticleDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/BankDescription.d.ts +6 -0
- package/dist/nodes/Weclapp/descriptions/BankDescription.js +471 -0
- package/dist/nodes/Weclapp/descriptions/BankDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/CustomApiDescription.d.ts +4 -0
- package/dist/nodes/Weclapp/descriptions/CustomApiDescription.js +238 -0
- package/dist/nodes/Weclapp/descriptions/CustomApiDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/DocumentDescription.d.ts +3 -0
- package/dist/nodes/Weclapp/descriptions/DocumentDescription.js +976 -0
- package/dist/nodes/Weclapp/descriptions/DocumentDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/PartyDescription.d.ts +4 -0
- package/dist/nodes/Weclapp/descriptions/PartyDescription.js +408 -0
- package/dist/nodes/Weclapp/descriptions/PartyDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/ProductionOrderDescription.d.ts +4 -0
- package/dist/nodes/Weclapp/descriptions/ProductionOrderDescription.js +628 -0
- package/dist/nodes/Weclapp/descriptions/ProductionOrderDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/PurchaseInvoiceDescription.d.ts +3 -0
- package/dist/nodes/Weclapp/descriptions/PurchaseInvoiceDescription.js +559 -0
- package/dist/nodes/Weclapp/descriptions/PurchaseInvoiceDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/PurchaseOrderDescription.d.ts +3 -0
- package/dist/nodes/Weclapp/descriptions/PurchaseOrderDescription.js +681 -0
- package/dist/nodes/Weclapp/descriptions/PurchaseOrderDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/QuotationDescription.d.ts +3 -0
- package/dist/nodes/Weclapp/descriptions/QuotationDescription.js +1069 -0
- package/dist/nodes/Weclapp/descriptions/QuotationDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/SalesInvoiceDescription.d.ts +3 -0
- package/dist/nodes/Weclapp/descriptions/SalesInvoiceDescription.js +994 -0
- package/dist/nodes/Weclapp/descriptions/SalesInvoiceDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/SalesOrderDescription.d.ts +4 -0
- package/dist/nodes/Weclapp/descriptions/SalesOrderDescription.js +1122 -0
- package/dist/nodes/Weclapp/descriptions/SalesOrderDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/ShipmentDescription.d.ts +3 -0
- package/dist/nodes/Weclapp/descriptions/ShipmentDescription.js +502 -0
- package/dist/nodes/Weclapp/descriptions/ShipmentDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/TagUnitUserDescription.d.ts +9 -0
- package/dist/nodes/Weclapp/descriptions/TagUnitUserDescription.js +664 -0
- package/dist/nodes/Weclapp/descriptions/TagUnitUserDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/TicketDescription.d.ts +9 -0
- package/dist/nodes/Weclapp/descriptions/TicketDescription.js +745 -0
- package/dist/nodes/Weclapp/descriptions/TicketDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/WarehouseDescription.d.ts +35 -0
- package/dist/nodes/Weclapp/descriptions/WarehouseDescription.js +935 -0
- package/dist/nodes/Weclapp/descriptions/WarehouseDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/WebhookDescription.d.ts +4 -0
- package/dist/nodes/Weclapp/descriptions/WebhookDescription.js +411 -0
- package/dist/nodes/Weclapp/descriptions/WebhookDescription.js.map +1 -0
- package/dist/nodes/Weclapp/descriptions/index.d.ts +3 -0
- package/dist/nodes/Weclapp/descriptions/index.js +56 -0
- package/dist/nodes/Weclapp/descriptions/index.js.map +1 -0
- package/dist/nodes/Weclapp/generated/entityMetadata.d.ts +3 -0
- package/dist/nodes/Weclapp/generated/entityMetadata.js +368 -0
- package/dist/nodes/Weclapp/generated/entityMetadata.js.map +1 -0
- package/dist/nodes/Weclapp/generated/openapiMetadata.d.ts +3 -0
- package/dist/nodes/Weclapp/generated/openapiMetadata.js +212 -0
- package/dist/nodes/Weclapp/generated/openapiMetadata.js.map +1 -0
- package/dist/nodes/Weclapp/methods/customAttributes.d.ts +32 -0
- package/dist/nodes/Weclapp/methods/customAttributes.js +156 -0
- package/dist/nodes/Weclapp/methods/customAttributes.js.map +1 -0
- package/dist/nodes/Weclapp/methods/loadOptions.d.ts +3 -0
- package/dist/nodes/Weclapp/methods/loadOptions.js +107 -0
- package/dist/nodes/Weclapp/methods/loadOptions.js.map +1 -0
- package/dist/nodes/Weclapp/weclapp.dark.svg +19 -0
- package/dist/nodes/Weclapp/weclapp.light.svg +19 -0
- package/dist/nodes/WeclappTrigger/WeclappTrigger.node.d.ts +12 -0
- package/dist/nodes/WeclappTrigger/WeclappTrigger.node.js +198 -0
- package/dist/nodes/WeclappTrigger/WeclappTrigger.node.js.map +1 -0
- package/dist/nodes/WeclappTrigger/weclapp.dark.svg +19 -0
- package/dist/nodes/WeclappTrigger/weclapp.light.svg +19 -0
- package/dist/package.json +78 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +78 -0
|
@@ -0,0 +1,976 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.documentDescription = exports.documentOperations = void 0;
|
|
4
|
+
const SharedFields_1 = require("../SharedFields");
|
|
5
|
+
const GenericFunctions_1 = require("../GenericFunctions");
|
|
6
|
+
const documentTypeOptions = [
|
|
7
|
+
{ name: 'Article Datasheet', value: 'ARTICLE_DATASHEET' },
|
|
8
|
+
{ name: 'Article Label', value: 'ARTICLE_LABEL' },
|
|
9
|
+
{ name: 'Blanket Purchase Order', value: 'BLANKET_PURCHASE_ORDER' },
|
|
10
|
+
{ name: 'Blanket Sales Order', value: 'BLANKET_SALES_ORDER' },
|
|
11
|
+
{ name: 'Cancellation UBL', value: 'CANCELLATION_UBL' },
|
|
12
|
+
{ name: 'Cancellation XR', value: 'CANCELLATION_XR' },
|
|
13
|
+
{ name: 'Contract', value: 'CONTRACT' },
|
|
14
|
+
{ name: 'Credit Advice', value: 'CREDIT_ADVICE' },
|
|
15
|
+
{ name: 'Credit Advice Cancellation', value: 'CREDIT_ADVICE_CANCELLATION' },
|
|
16
|
+
{ name: 'Credit Advice Preliminary Invoice', value: 'CREDIT_ADVICE_PRELIMINARY_INVOICE' },
|
|
17
|
+
{ name: 'Credit Advice UBL', value: 'CREDIT_ADVICE_UBL' },
|
|
18
|
+
{ name: 'Credit Advice XR', value: 'CREDIT_ADVICE_XR' },
|
|
19
|
+
{ name: 'CRM Event Letter', value: 'CRM_EVENT_LETTER' },
|
|
20
|
+
{ name: 'Customer Article Price List', value: 'CUSTOMER_ARTICLE_PRICE_LIST' },
|
|
21
|
+
{ name: 'Dunning', value: 'DUNNING' },
|
|
22
|
+
{ name: 'Incoming Goods', value: 'INCOMING_GOODS' },
|
|
23
|
+
{ name: 'Incoming Goods From Return', value: 'INCOMING_GOODS_FROM_RETURN' },
|
|
24
|
+
{ name: 'Incoming Goods Returns Pickup Note', value: 'INCOMING_GOODS_RETURNS_PICKUP_NOTE' },
|
|
25
|
+
{ name: 'Inventory Taking', value: 'INVENTORY_TAKING' },
|
|
26
|
+
{ name: 'Performance Record', value: 'PERFORMANCE_RECORD' },
|
|
27
|
+
{ name: 'Production Order', value: 'PRODUCTION_ORDER' },
|
|
28
|
+
{ name: 'Purchase Invoice', value: 'PURCHASE_INVOICE' },
|
|
29
|
+
{ name: 'Purchase Invoice FatturaPA', value: 'PURCHASE_INVOICE_FATTURAPA' },
|
|
30
|
+
{ name: 'Purchase Invoice ZUGFeRD', value: 'PURCHASE_INVOICE_ZUGFERD' },
|
|
31
|
+
{ name: 'Purchase Order', value: 'PURCHASE_ORDER' },
|
|
32
|
+
{ name: 'Purchase Order Cancellation', value: 'PURCHASE_ORDER_CANCELLATION' },
|
|
33
|
+
{ name: 'Purchase Order Default', value: 'PURCHASE_ORDER_DEFAULT' },
|
|
34
|
+
{ name: 'Purchase Order Request', value: 'PURCHASE_ORDER_REQUEST' },
|
|
35
|
+
{ name: 'Purchase Order Request Offer Item CSV', value: 'PURCHASE_ORDER_REQUEST_OFFER_ITEM_CSV' },
|
|
36
|
+
{ name: 'Purchase Order Request Supplier Document', value: 'PURCHASE_ORDER_REQUEST_SUPPLIER_DOCUMENT' },
|
|
37
|
+
{ name: 'Quotation', value: 'QUOTATION' },
|
|
38
|
+
{ name: 'Quotation Default', value: 'QUOTATION_DEFAULT' },
|
|
39
|
+
{ name: 'Sales Invoice', value: 'SALES_INVOICE' },
|
|
40
|
+
{ name: 'Sales Invoice Cancellation', value: 'SALES_INVOICE_CANCELLATION' },
|
|
41
|
+
{ name: 'Sales Invoice Default', value: 'SALES_INVOICE_DEFAULT' },
|
|
42
|
+
{ name: 'Sales Invoice FatturaPA', value: 'SALES_INVOICE_FATTURAPA' },
|
|
43
|
+
{ name: 'Sales Invoice Preliminary', value: 'SALES_INVOICE_PRELIMINARY' },
|
|
44
|
+
{ name: 'Sales Invoice QR', value: 'SALES_INVOICE_QR' },
|
|
45
|
+
{ name: 'Sales Invoice UBL', value: 'SALES_INVOICE_UBL' },
|
|
46
|
+
{ name: 'Sales Invoice XR', value: 'SALES_INVOICE_XR' },
|
|
47
|
+
{ name: 'Sales Order', value: 'SALES_ORDER' },
|
|
48
|
+
{ name: 'Sales Order Default', value: 'SALES_ORDER_DEFAULT' },
|
|
49
|
+
{ name: 'Shipment Customs Declaration', value: 'SHIPMENT_CUSTOMS_DECLARATION' },
|
|
50
|
+
{ name: 'Shipment Delivery Label', value: 'SHIPMENT_DELIVERY_LABEL' },
|
|
51
|
+
{ name: 'Shipment Delivery Note', value: 'SHIPMENT_DELIVERY_NOTE' },
|
|
52
|
+
{ name: 'Shipment Delivery Note Default', value: 'SHIPMENT_DELIVERY_NOTE_DEFAULT' },
|
|
53
|
+
{ name: 'Shipment Picking List', value: 'SHIPMENT_PICKING_LIST' },
|
|
54
|
+
{ name: 'Shipment Proforma Invoice', value: 'SHIPMENT_PROFORMA_INVOICE' },
|
|
55
|
+
{ name: 'Shipment Return Delivery Note', value: 'SHIPMENT_RETURN_DELIVERY_NOTE' },
|
|
56
|
+
{ name: 'Shipment Return Label', value: 'SHIPMENT_RETURN_LABEL' },
|
|
57
|
+
{ name: 'Shipment Serial Numbers CSV', value: 'SHIPMENT_SERIAL_NUMBERS_CSV' },
|
|
58
|
+
{ name: 'Ticket', value: 'TICKET' },
|
|
59
|
+
{ name: 'ZUGFeRD Validation', value: 'ZUGFERD_VALIDATION' },
|
|
60
|
+
];
|
|
61
|
+
exports.documentOperations = [
|
|
62
|
+
{
|
|
63
|
+
displayName: 'Operation',
|
|
64
|
+
name: 'operation',
|
|
65
|
+
type: 'options',
|
|
66
|
+
noDataExpression: true,
|
|
67
|
+
displayOptions: {
|
|
68
|
+
show: {
|
|
69
|
+
resource: ['document'],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
options: [
|
|
73
|
+
{
|
|
74
|
+
name: 'Copy',
|
|
75
|
+
value: 'copy',
|
|
76
|
+
description: 'Copy a document to the same entity',
|
|
77
|
+
action: 'Copy document',
|
|
78
|
+
routing: {
|
|
79
|
+
request: {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
url: '=/document/id/{{$parameter["documentId"]}}/copy',
|
|
82
|
+
},
|
|
83
|
+
output: {
|
|
84
|
+
postReceive: [
|
|
85
|
+
{
|
|
86
|
+
type: 'rootProperty',
|
|
87
|
+
properties: {
|
|
88
|
+
property: 'result',
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'Copy to Entity',
|
|
97
|
+
value: 'copyToEntity',
|
|
98
|
+
description: 'Copy a document to a different entity',
|
|
99
|
+
action: 'Copy document to entity',
|
|
100
|
+
routing: {
|
|
101
|
+
request: {
|
|
102
|
+
method: 'POST',
|
|
103
|
+
url: '/document/copy',
|
|
104
|
+
},
|
|
105
|
+
output: {
|
|
106
|
+
postReceive: [
|
|
107
|
+
{
|
|
108
|
+
type: 'rootProperty',
|
|
109
|
+
properties: {
|
|
110
|
+
property: 'result',
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'Count',
|
|
119
|
+
value: 'count',
|
|
120
|
+
description: 'Count documents for an entity',
|
|
121
|
+
action: 'Count documents',
|
|
122
|
+
routing: {
|
|
123
|
+
request: {
|
|
124
|
+
method: 'GET',
|
|
125
|
+
url: '/document/count',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'Create',
|
|
131
|
+
value: 'create',
|
|
132
|
+
description: 'Create a new document metadata record (without file — use Upload to attach a file)',
|
|
133
|
+
action: 'Create document',
|
|
134
|
+
routing: {
|
|
135
|
+
request: {
|
|
136
|
+
method: 'POST',
|
|
137
|
+
url: '/document',
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: 'Delete',
|
|
143
|
+
value: 'delete',
|
|
144
|
+
description: 'Delete a document',
|
|
145
|
+
action: 'Delete document',
|
|
146
|
+
routing: {
|
|
147
|
+
request: {
|
|
148
|
+
method: 'DELETE',
|
|
149
|
+
url: '=/document/id/{{$parameter["documentId"]}}',
|
|
150
|
+
},
|
|
151
|
+
output: {
|
|
152
|
+
postReceive: [
|
|
153
|
+
{
|
|
154
|
+
type: 'set',
|
|
155
|
+
properties: {
|
|
156
|
+
value: '={{ { "deleted": true } }}',
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'Download',
|
|
165
|
+
value: 'download',
|
|
166
|
+
description: 'Download the current file binary of a document',
|
|
167
|
+
action: 'Download document',
|
|
168
|
+
routing: {
|
|
169
|
+
request: {
|
|
170
|
+
method: 'GET',
|
|
171
|
+
url: '=/document/id/{{$parameter["documentId"]}}/download',
|
|
172
|
+
encoding: 'arraybuffer',
|
|
173
|
+
returnFullResponse: true,
|
|
174
|
+
},
|
|
175
|
+
output: {
|
|
176
|
+
postReceive: [
|
|
177
|
+
{
|
|
178
|
+
type: 'binaryData',
|
|
179
|
+
properties: {
|
|
180
|
+
destinationProperty: 'data',
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: 'Download Document Version',
|
|
189
|
+
value: 'downloadDocumentVersion',
|
|
190
|
+
description: 'Download a specific version of a document (binary)',
|
|
191
|
+
action: 'Download document version',
|
|
192
|
+
routing: {
|
|
193
|
+
request: {
|
|
194
|
+
method: 'GET',
|
|
195
|
+
url: '=/document/id/{{$parameter["documentId"]}}/downloadDocumentVersion',
|
|
196
|
+
encoding: 'arraybuffer',
|
|
197
|
+
returnFullResponse: true,
|
|
198
|
+
},
|
|
199
|
+
output: {
|
|
200
|
+
postReceive: [
|
|
201
|
+
{
|
|
202
|
+
type: 'binaryData',
|
|
203
|
+
properties: {
|
|
204
|
+
destinationProperty: 'data',
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: 'Download Document Versions Zipped',
|
|
213
|
+
value: 'downloadDocumentVersionsZipped',
|
|
214
|
+
description: 'Download all or selected versions of a document as a ZIP archive (binary)',
|
|
215
|
+
action: 'Download document versions zipped',
|
|
216
|
+
routing: {
|
|
217
|
+
request: {
|
|
218
|
+
method: 'GET',
|
|
219
|
+
url: '=/document/id/{{$parameter["documentId"]}}/downloadDocumentVersionsZipped',
|
|
220
|
+
encoding: 'arraybuffer',
|
|
221
|
+
returnFullResponse: true,
|
|
222
|
+
},
|
|
223
|
+
output: {
|
|
224
|
+
postReceive: [
|
|
225
|
+
{
|
|
226
|
+
type: 'binaryData',
|
|
227
|
+
properties: {
|
|
228
|
+
destinationProperty: 'data',
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
],
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: 'Get',
|
|
237
|
+
value: 'get',
|
|
238
|
+
description: 'Retrieve a single document by ID',
|
|
239
|
+
action: 'Get document',
|
|
240
|
+
routing: {
|
|
241
|
+
request: {
|
|
242
|
+
method: 'GET',
|
|
243
|
+
url: '=/document/id/{{$parameter["documentId"]}}',
|
|
244
|
+
},
|
|
245
|
+
output: {
|
|
246
|
+
postReceive: [GenericFunctions_1.simplifyPostReceive],
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: 'Get Many',
|
|
252
|
+
value: 'list',
|
|
253
|
+
description: 'Retrieve a list of documents for an entity',
|
|
254
|
+
action: 'Get many documents',
|
|
255
|
+
routing: {
|
|
256
|
+
request: {
|
|
257
|
+
method: 'GET',
|
|
258
|
+
url: '/document',
|
|
259
|
+
},
|
|
260
|
+
...SharedFields_1.listPaginationRouting,
|
|
261
|
+
output: {
|
|
262
|
+
postReceive: [
|
|
263
|
+
{
|
|
264
|
+
type: 'rootProperty',
|
|
265
|
+
properties: {
|
|
266
|
+
property: 'result',
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
GenericFunctions_1.mergeAdditionalProperties,
|
|
270
|
+
GenericFunctions_1.simplifyPostReceive,
|
|
271
|
+
],
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
name: 'Update',
|
|
277
|
+
value: 'update',
|
|
278
|
+
description: 'Update document metadata',
|
|
279
|
+
action: 'Update document',
|
|
280
|
+
routing: {
|
|
281
|
+
request: {
|
|
282
|
+
method: 'PUT',
|
|
283
|
+
url: '=/document/id/{{$parameter["documentId"]}}',
|
|
284
|
+
qs: {
|
|
285
|
+
ignoreMissingProperties: true,
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: 'Upload',
|
|
292
|
+
value: 'upload',
|
|
293
|
+
description: 'Upload a new document file attached to an entity',
|
|
294
|
+
action: 'Upload document',
|
|
295
|
+
routing: {
|
|
296
|
+
request: {
|
|
297
|
+
method: 'POST',
|
|
298
|
+
url: '/document/upload',
|
|
299
|
+
},
|
|
300
|
+
output: {
|
|
301
|
+
postReceive: [
|
|
302
|
+
{
|
|
303
|
+
type: 'rootProperty',
|
|
304
|
+
properties: {
|
|
305
|
+
property: 'result',
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
],
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
name: 'Upload New Version',
|
|
314
|
+
value: 'uploadNewVersion',
|
|
315
|
+
description: 'Upload a new file version to an existing document',
|
|
316
|
+
action: 'Upload document new version',
|
|
317
|
+
routing: {
|
|
318
|
+
request: {
|
|
319
|
+
method: 'POST',
|
|
320
|
+
url: '=/document/id/{{$parameter["documentId"]}}/upload',
|
|
321
|
+
},
|
|
322
|
+
output: {
|
|
323
|
+
postReceive: [
|
|
324
|
+
{
|
|
325
|
+
type: 'rootProperty',
|
|
326
|
+
properties: {
|
|
327
|
+
property: 'result',
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
],
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
default: 'list',
|
|
336
|
+
},
|
|
337
|
+
];
|
|
338
|
+
const documentIdField = {
|
|
339
|
+
displayName: 'Document',
|
|
340
|
+
name: 'documentId',
|
|
341
|
+
type: 'resourceLocator',
|
|
342
|
+
default: { mode: 'list', value: '' },
|
|
343
|
+
required: true,
|
|
344
|
+
description: 'The document to operate on',
|
|
345
|
+
displayOptions: {
|
|
346
|
+
show: {
|
|
347
|
+
resource: ['document'],
|
|
348
|
+
operation: [
|
|
349
|
+
'get',
|
|
350
|
+
'update',
|
|
351
|
+
'delete',
|
|
352
|
+
'copy',
|
|
353
|
+
'download',
|
|
354
|
+
'downloadDocumentVersion',
|
|
355
|
+
'downloadDocumentVersionsZipped',
|
|
356
|
+
'uploadNewVersion',
|
|
357
|
+
],
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
modes: [
|
|
361
|
+
{
|
|
362
|
+
displayName: 'From List',
|
|
363
|
+
name: 'list',
|
|
364
|
+
type: 'list',
|
|
365
|
+
typeOptions: {
|
|
366
|
+
searchListMethod: 'searchDocuments',
|
|
367
|
+
searchable: true,
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
displayName: 'ID',
|
|
372
|
+
name: 'id',
|
|
373
|
+
type: 'string',
|
|
374
|
+
placeholder: 'e.g. 1234567890',
|
|
375
|
+
validation: [
|
|
376
|
+
{
|
|
377
|
+
type: 'regex',
|
|
378
|
+
properties: {
|
|
379
|
+
regex: '^[0-9]+$',
|
|
380
|
+
errorMessage: 'Document ID must be numeric',
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
],
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
displayName: 'URL',
|
|
387
|
+
name: 'url',
|
|
388
|
+
type: 'string',
|
|
389
|
+
placeholder: 'e.g. https://tenant.weclapp.com/webapp/api/v2/document/id/1234567890',
|
|
390
|
+
extractValue: {
|
|
391
|
+
type: 'regex',
|
|
392
|
+
regex: '/document/id/([0-9]+)',
|
|
393
|
+
},
|
|
394
|
+
validation: [
|
|
395
|
+
{
|
|
396
|
+
type: 'regex',
|
|
397
|
+
properties: {
|
|
398
|
+
regex: '/document/id/[0-9]+',
|
|
399
|
+
errorMessage: 'URL must contain /document/id/{id}',
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
],
|
|
403
|
+
},
|
|
404
|
+
],
|
|
405
|
+
};
|
|
406
|
+
const listEntityName = {
|
|
407
|
+
displayName: 'Entity Name',
|
|
408
|
+
name: 'entityName',
|
|
409
|
+
type: 'string',
|
|
410
|
+
required: true,
|
|
411
|
+
default: '',
|
|
412
|
+
description: 'The weclapp entity type the documents belong to (e.g. salesOrder, customer, article)',
|
|
413
|
+
placeholder: 'e.g. salesOrder',
|
|
414
|
+
displayOptions: {
|
|
415
|
+
show: {
|
|
416
|
+
resource: ['document'],
|
|
417
|
+
operation: ['list', 'count'],
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
routing: {
|
|
421
|
+
send: {
|
|
422
|
+
type: 'query',
|
|
423
|
+
property: 'entityName',
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
};
|
|
427
|
+
const listEntityId = {
|
|
428
|
+
displayName: 'Entity ID',
|
|
429
|
+
name: 'entityId',
|
|
430
|
+
type: 'string',
|
|
431
|
+
required: true,
|
|
432
|
+
default: '',
|
|
433
|
+
description: 'The ID of the entity the documents belong to',
|
|
434
|
+
placeholder: 'e.g. 1234567890',
|
|
435
|
+
displayOptions: {
|
|
436
|
+
show: {
|
|
437
|
+
resource: ['document'],
|
|
438
|
+
operation: ['list', 'count'],
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
routing: {
|
|
442
|
+
send: {
|
|
443
|
+
type: 'query',
|
|
444
|
+
property: 'entityId',
|
|
445
|
+
},
|
|
446
|
+
},
|
|
447
|
+
};
|
|
448
|
+
const listLimit = {
|
|
449
|
+
...SharedFields_1.limitField,
|
|
450
|
+
displayOptions: {
|
|
451
|
+
show: {
|
|
452
|
+
resource: ['document'],
|
|
453
|
+
operation: ['list'],
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
};
|
|
457
|
+
const listFilters = {
|
|
458
|
+
...SharedFields_1.filtersCollection,
|
|
459
|
+
displayOptions: {
|
|
460
|
+
show: {
|
|
461
|
+
resource: ['document'],
|
|
462
|
+
operation: ['list'],
|
|
463
|
+
},
|
|
464
|
+
},
|
|
465
|
+
};
|
|
466
|
+
const listSimplify = {
|
|
467
|
+
...SharedFields_1.simplifyField,
|
|
468
|
+
displayOptions: {
|
|
469
|
+
show: {
|
|
470
|
+
resource: ['document'],
|
|
471
|
+
operation: ['list', 'get'],
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
};
|
|
475
|
+
const listAdditionalFields = {
|
|
476
|
+
...SharedFields_1.additionalFields,
|
|
477
|
+
displayOptions: {
|
|
478
|
+
show: {
|
|
479
|
+
resource: ['document'],
|
|
480
|
+
operation: ['list', 'get'],
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
};
|
|
484
|
+
const createName = {
|
|
485
|
+
displayName: 'Name',
|
|
486
|
+
name: 'createName',
|
|
487
|
+
type: 'string',
|
|
488
|
+
required: true,
|
|
489
|
+
default: '',
|
|
490
|
+
description: 'Name/filename of the document',
|
|
491
|
+
displayOptions: {
|
|
492
|
+
show: {
|
|
493
|
+
resource: ['document'],
|
|
494
|
+
operation: ['create'],
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
|
+
routing: {
|
|
498
|
+
send: {
|
|
499
|
+
type: 'body',
|
|
500
|
+
property: 'name',
|
|
501
|
+
},
|
|
502
|
+
},
|
|
503
|
+
};
|
|
504
|
+
const createMediaType = {
|
|
505
|
+
displayName: 'Media Type',
|
|
506
|
+
name: 'createMediaType',
|
|
507
|
+
type: 'string',
|
|
508
|
+
required: true,
|
|
509
|
+
default: 'application/pdf',
|
|
510
|
+
description: 'MIME type of the document (e.g. application/pdf, image/png)',
|
|
511
|
+
placeholder: 'e.g. application/pdf',
|
|
512
|
+
displayOptions: {
|
|
513
|
+
show: {
|
|
514
|
+
resource: ['document'],
|
|
515
|
+
operation: ['create'],
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
routing: {
|
|
519
|
+
send: {
|
|
520
|
+
type: 'body',
|
|
521
|
+
property: 'mediaType',
|
|
522
|
+
},
|
|
523
|
+
},
|
|
524
|
+
};
|
|
525
|
+
const createAdditionalFields = {
|
|
526
|
+
displayName: 'Additional Fields',
|
|
527
|
+
name: 'createAdditionalFields',
|
|
528
|
+
type: 'collection',
|
|
529
|
+
placeholder: 'Add Field',
|
|
530
|
+
default: {},
|
|
531
|
+
displayOptions: {
|
|
532
|
+
show: {
|
|
533
|
+
resource: ['document'],
|
|
534
|
+
operation: ['create'],
|
|
535
|
+
},
|
|
536
|
+
},
|
|
537
|
+
options: [
|
|
538
|
+
{
|
|
539
|
+
displayName: 'Description',
|
|
540
|
+
name: 'description',
|
|
541
|
+
type: 'string',
|
|
542
|
+
default: '',
|
|
543
|
+
description: 'Description for the document',
|
|
544
|
+
routing: {
|
|
545
|
+
send: {
|
|
546
|
+
type: 'body',
|
|
547
|
+
property: 'description',
|
|
548
|
+
},
|
|
549
|
+
},
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
displayName: 'Document Type',
|
|
553
|
+
name: 'documentType',
|
|
554
|
+
type: 'options',
|
|
555
|
+
default: 'CONTRACT',
|
|
556
|
+
options: documentTypeOptions,
|
|
557
|
+
routing: {
|
|
558
|
+
send: {
|
|
559
|
+
type: 'body',
|
|
560
|
+
property: 'documentType',
|
|
561
|
+
},
|
|
562
|
+
},
|
|
563
|
+
},
|
|
564
|
+
],
|
|
565
|
+
};
|
|
566
|
+
const updateFields = {
|
|
567
|
+
displayName: 'Update Fields',
|
|
568
|
+
name: 'updateFields',
|
|
569
|
+
type: 'collection',
|
|
570
|
+
placeholder: 'Add Field',
|
|
571
|
+
default: {},
|
|
572
|
+
description: 'Fields to update on the document metadata',
|
|
573
|
+
displayOptions: {
|
|
574
|
+
show: {
|
|
575
|
+
resource: ['document'],
|
|
576
|
+
operation: ['update'],
|
|
577
|
+
},
|
|
578
|
+
},
|
|
579
|
+
options: [
|
|
580
|
+
{
|
|
581
|
+
displayName: 'Description',
|
|
582
|
+
name: 'description',
|
|
583
|
+
type: 'string',
|
|
584
|
+
default: '',
|
|
585
|
+
routing: {
|
|
586
|
+
send: {
|
|
587
|
+
type: 'body',
|
|
588
|
+
property: 'description',
|
|
589
|
+
},
|
|
590
|
+
},
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
displayName: 'Document Type',
|
|
594
|
+
name: 'documentType',
|
|
595
|
+
type: 'options',
|
|
596
|
+
default: 'CONTRACT',
|
|
597
|
+
options: documentTypeOptions,
|
|
598
|
+
routing: {
|
|
599
|
+
send: {
|
|
600
|
+
type: 'body',
|
|
601
|
+
property: 'documentType',
|
|
602
|
+
},
|
|
603
|
+
},
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
displayName: 'Name',
|
|
607
|
+
name: 'name',
|
|
608
|
+
type: 'string',
|
|
609
|
+
default: '',
|
|
610
|
+
description: 'Name/filename of the document',
|
|
611
|
+
routing: {
|
|
612
|
+
send: {
|
|
613
|
+
type: 'body',
|
|
614
|
+
property: 'name',
|
|
615
|
+
},
|
|
616
|
+
},
|
|
617
|
+
},
|
|
618
|
+
],
|
|
619
|
+
};
|
|
620
|
+
const copySourceDocumentId = {
|
|
621
|
+
displayName: 'Source Document ID',
|
|
622
|
+
name: 'copySourceDocumentId',
|
|
623
|
+
type: 'string',
|
|
624
|
+
required: true,
|
|
625
|
+
default: '',
|
|
626
|
+
description: 'ID of the source document to copy from',
|
|
627
|
+
placeholder: 'e.g. 1234567890',
|
|
628
|
+
displayOptions: {
|
|
629
|
+
show: {
|
|
630
|
+
resource: ['document'],
|
|
631
|
+
operation: ['copy'],
|
|
632
|
+
},
|
|
633
|
+
},
|
|
634
|
+
routing: {
|
|
635
|
+
send: {
|
|
636
|
+
type: 'body',
|
|
637
|
+
property: 'sourceDocumentId',
|
|
638
|
+
},
|
|
639
|
+
},
|
|
640
|
+
};
|
|
641
|
+
const copyComment = {
|
|
642
|
+
displayName: 'Comment',
|
|
643
|
+
name: 'copyComment',
|
|
644
|
+
type: 'string',
|
|
645
|
+
default: '',
|
|
646
|
+
description: 'Comment for the copied document',
|
|
647
|
+
displayOptions: {
|
|
648
|
+
show: {
|
|
649
|
+
resource: ['document'],
|
|
650
|
+
operation: ['copy'],
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
routing: {
|
|
654
|
+
send: {
|
|
655
|
+
type: 'body',
|
|
656
|
+
property: 'comment',
|
|
657
|
+
},
|
|
658
|
+
},
|
|
659
|
+
};
|
|
660
|
+
const copyToEntitySourceDocumentId = {
|
|
661
|
+
displayName: 'Source Document ID',
|
|
662
|
+
name: 'copyToEntitySourceDocumentId',
|
|
663
|
+
type: 'string',
|
|
664
|
+
required: true,
|
|
665
|
+
default: '',
|
|
666
|
+
description: 'ID of the source document to copy',
|
|
667
|
+
placeholder: 'e.g. 1234567890',
|
|
668
|
+
displayOptions: {
|
|
669
|
+
show: {
|
|
670
|
+
resource: ['document'],
|
|
671
|
+
operation: ['copyToEntity'],
|
|
672
|
+
},
|
|
673
|
+
},
|
|
674
|
+
routing: {
|
|
675
|
+
send: {
|
|
676
|
+
type: 'body',
|
|
677
|
+
property: 'sourceDocumentId',
|
|
678
|
+
},
|
|
679
|
+
},
|
|
680
|
+
};
|
|
681
|
+
const copyToEntityEntityName = {
|
|
682
|
+
displayName: 'Target Entity Name',
|
|
683
|
+
name: 'copyToEntityEntityName',
|
|
684
|
+
type: 'string',
|
|
685
|
+
required: true,
|
|
686
|
+
default: '',
|
|
687
|
+
description: 'The weclapp entity type to copy the document to (e.g. salesOrder, customer)',
|
|
688
|
+
placeholder: 'e.g. salesOrder',
|
|
689
|
+
displayOptions: {
|
|
690
|
+
show: {
|
|
691
|
+
resource: ['document'],
|
|
692
|
+
operation: ['copyToEntity'],
|
|
693
|
+
},
|
|
694
|
+
},
|
|
695
|
+
routing: {
|
|
696
|
+
send: {
|
|
697
|
+
type: 'body',
|
|
698
|
+
property: 'entityName',
|
|
699
|
+
},
|
|
700
|
+
},
|
|
701
|
+
};
|
|
702
|
+
const copyToEntityEntityId = {
|
|
703
|
+
displayName: 'Target Entity ID',
|
|
704
|
+
name: 'copyToEntityEntityId',
|
|
705
|
+
type: 'string',
|
|
706
|
+
required: true,
|
|
707
|
+
default: '',
|
|
708
|
+
description: 'The ID of the entity to copy the document to',
|
|
709
|
+
placeholder: 'e.g. 1234567890',
|
|
710
|
+
displayOptions: {
|
|
711
|
+
show: {
|
|
712
|
+
resource: ['document'],
|
|
713
|
+
operation: ['copyToEntity'],
|
|
714
|
+
},
|
|
715
|
+
},
|
|
716
|
+
routing: {
|
|
717
|
+
send: {
|
|
718
|
+
type: 'body',
|
|
719
|
+
property: 'entityId',
|
|
720
|
+
},
|
|
721
|
+
},
|
|
722
|
+
};
|
|
723
|
+
const downloadBinaryProperty = {
|
|
724
|
+
displayName: 'Put Output File in Field',
|
|
725
|
+
name: 'binaryPropertyName',
|
|
726
|
+
type: 'string',
|
|
727
|
+
required: true,
|
|
728
|
+
default: 'data',
|
|
729
|
+
description: 'The name of the output binary field to put the downloaded file in',
|
|
730
|
+
displayOptions: {
|
|
731
|
+
show: {
|
|
732
|
+
resource: ['document'],
|
|
733
|
+
operation: ['download', 'downloadDocumentVersion', 'downloadDocumentVersionsZipped'],
|
|
734
|
+
},
|
|
735
|
+
},
|
|
736
|
+
};
|
|
737
|
+
const downloadVersionId = {
|
|
738
|
+
displayName: 'Version ID',
|
|
739
|
+
name: 'downloadVersionId',
|
|
740
|
+
type: 'string',
|
|
741
|
+
default: '',
|
|
742
|
+
description: 'Specific version ID to download. Leave empty for the latest version.',
|
|
743
|
+
displayOptions: {
|
|
744
|
+
show: {
|
|
745
|
+
resource: ['document'],
|
|
746
|
+
operation: ['downloadDocumentVersion'],
|
|
747
|
+
},
|
|
748
|
+
},
|
|
749
|
+
routing: {
|
|
750
|
+
send: {
|
|
751
|
+
type: 'query',
|
|
752
|
+
property: 'versionId',
|
|
753
|
+
},
|
|
754
|
+
},
|
|
755
|
+
};
|
|
756
|
+
const downloadVersionsZippedOptions = {
|
|
757
|
+
displayName: 'Additional Options',
|
|
758
|
+
name: 'downloadZippedOptions',
|
|
759
|
+
type: 'collection',
|
|
760
|
+
placeholder: 'Add Option',
|
|
761
|
+
default: {},
|
|
762
|
+
displayOptions: {
|
|
763
|
+
show: {
|
|
764
|
+
resource: ['document'],
|
|
765
|
+
operation: ['downloadDocumentVersionsZipped'],
|
|
766
|
+
},
|
|
767
|
+
},
|
|
768
|
+
options: [
|
|
769
|
+
{
|
|
770
|
+
displayName: 'Filename',
|
|
771
|
+
name: 'filename',
|
|
772
|
+
type: 'string',
|
|
773
|
+
default: '',
|
|
774
|
+
description: 'Filename for the downloaded ZIP archive',
|
|
775
|
+
routing: {
|
|
776
|
+
send: {
|
|
777
|
+
type: 'query',
|
|
778
|
+
property: 'filename',
|
|
779
|
+
},
|
|
780
|
+
},
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
displayName: 'Version IDs',
|
|
784
|
+
name: 'ids',
|
|
785
|
+
type: 'string',
|
|
786
|
+
default: '',
|
|
787
|
+
description: 'Comma-separated version IDs to include in the ZIP (e.g. 123,456). Leave empty to include all versions.',
|
|
788
|
+
routing: {
|
|
789
|
+
send: {
|
|
790
|
+
type: 'query',
|
|
791
|
+
property: 'ids',
|
|
792
|
+
},
|
|
793
|
+
},
|
|
794
|
+
},
|
|
795
|
+
],
|
|
796
|
+
};
|
|
797
|
+
const uploadBinaryProperty = {
|
|
798
|
+
displayName: 'Binary Property',
|
|
799
|
+
name: 'uploadBinaryPropertyName',
|
|
800
|
+
type: 'string',
|
|
801
|
+
required: true,
|
|
802
|
+
default: 'data',
|
|
803
|
+
description: 'Name of the binary property containing the file to upload',
|
|
804
|
+
displayOptions: {
|
|
805
|
+
show: {
|
|
806
|
+
resource: ['document'],
|
|
807
|
+
operation: ['upload'],
|
|
808
|
+
},
|
|
809
|
+
},
|
|
810
|
+
};
|
|
811
|
+
const uploadEntityName = {
|
|
812
|
+
displayName: 'Entity Name',
|
|
813
|
+
name: 'uploadEntityName',
|
|
814
|
+
type: 'string',
|
|
815
|
+
required: true,
|
|
816
|
+
default: '',
|
|
817
|
+
description: 'The weclapp entity type the document belongs to (e.g. salesOrder, customer, article)',
|
|
818
|
+
placeholder: 'e.g. salesOrder',
|
|
819
|
+
displayOptions: {
|
|
820
|
+
show: {
|
|
821
|
+
resource: ['document'],
|
|
822
|
+
operation: ['upload'],
|
|
823
|
+
},
|
|
824
|
+
},
|
|
825
|
+
routing: {
|
|
826
|
+
send: {
|
|
827
|
+
type: 'query',
|
|
828
|
+
property: 'entityName',
|
|
829
|
+
},
|
|
830
|
+
},
|
|
831
|
+
};
|
|
832
|
+
const uploadEntityId = {
|
|
833
|
+
displayName: 'Entity ID',
|
|
834
|
+
name: 'uploadEntityId',
|
|
835
|
+
type: 'string',
|
|
836
|
+
required: true,
|
|
837
|
+
default: '',
|
|
838
|
+
description: 'The ID of the entity the document belongs to',
|
|
839
|
+
placeholder: 'e.g. 1234567890',
|
|
840
|
+
displayOptions: {
|
|
841
|
+
show: {
|
|
842
|
+
resource: ['document'],
|
|
843
|
+
operation: ['upload'],
|
|
844
|
+
},
|
|
845
|
+
},
|
|
846
|
+
routing: {
|
|
847
|
+
send: {
|
|
848
|
+
type: 'query',
|
|
849
|
+
property: 'entityId',
|
|
850
|
+
},
|
|
851
|
+
},
|
|
852
|
+
};
|
|
853
|
+
const uploadDocumentName = {
|
|
854
|
+
displayName: 'Document Name',
|
|
855
|
+
name: 'uploadDocumentName',
|
|
856
|
+
type: 'string',
|
|
857
|
+
required: true,
|
|
858
|
+
default: '',
|
|
859
|
+
description: 'Name/filename for the uploaded document',
|
|
860
|
+
displayOptions: {
|
|
861
|
+
show: {
|
|
862
|
+
resource: ['document'],
|
|
863
|
+
operation: ['upload'],
|
|
864
|
+
},
|
|
865
|
+
},
|
|
866
|
+
routing: {
|
|
867
|
+
send: {
|
|
868
|
+
type: 'query',
|
|
869
|
+
property: 'name',
|
|
870
|
+
},
|
|
871
|
+
},
|
|
872
|
+
};
|
|
873
|
+
const uploadAdditionalOptions = {
|
|
874
|
+
displayName: 'Additional Options',
|
|
875
|
+
name: 'uploadAdditionalOptions',
|
|
876
|
+
type: 'collection',
|
|
877
|
+
placeholder: 'Add Option',
|
|
878
|
+
default: {},
|
|
879
|
+
displayOptions: {
|
|
880
|
+
show: {
|
|
881
|
+
resource: ['document'],
|
|
882
|
+
operation: ['upload'],
|
|
883
|
+
},
|
|
884
|
+
},
|
|
885
|
+
options: [
|
|
886
|
+
{
|
|
887
|
+
displayName: 'Description',
|
|
888
|
+
name: 'description',
|
|
889
|
+
type: 'string',
|
|
890
|
+
default: '',
|
|
891
|
+
description: 'Description for the uploaded document',
|
|
892
|
+
routing: {
|
|
893
|
+
send: {
|
|
894
|
+
type: 'query',
|
|
895
|
+
property: 'description',
|
|
896
|
+
},
|
|
897
|
+
},
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
displayName: 'Document Type',
|
|
901
|
+
name: 'documentType',
|
|
902
|
+
type: 'options',
|
|
903
|
+
default: 'CONTRACT',
|
|
904
|
+
options: documentTypeOptions,
|
|
905
|
+
routing: {
|
|
906
|
+
send: {
|
|
907
|
+
type: 'query',
|
|
908
|
+
property: 'documentType',
|
|
909
|
+
},
|
|
910
|
+
},
|
|
911
|
+
},
|
|
912
|
+
],
|
|
913
|
+
};
|
|
914
|
+
const uploadNewVersionBinaryProperty = {
|
|
915
|
+
displayName: 'Binary Property',
|
|
916
|
+
name: 'uploadNewVersionBinaryPropertyName',
|
|
917
|
+
type: 'string',
|
|
918
|
+
required: true,
|
|
919
|
+
default: 'data',
|
|
920
|
+
description: 'Name of the binary property containing the new file version to upload',
|
|
921
|
+
displayOptions: {
|
|
922
|
+
show: {
|
|
923
|
+
resource: ['document'],
|
|
924
|
+
operation: ['uploadNewVersion'],
|
|
925
|
+
},
|
|
926
|
+
},
|
|
927
|
+
};
|
|
928
|
+
const uploadNewVersionComment = {
|
|
929
|
+
displayName: 'Comment',
|
|
930
|
+
name: 'uploadNewVersionComment',
|
|
931
|
+
type: 'string',
|
|
932
|
+
default: '',
|
|
933
|
+
description: 'Comment describing the new version',
|
|
934
|
+
displayOptions: {
|
|
935
|
+
show: {
|
|
936
|
+
resource: ['document'],
|
|
937
|
+
operation: ['uploadNewVersion'],
|
|
938
|
+
},
|
|
939
|
+
},
|
|
940
|
+
routing: {
|
|
941
|
+
send: {
|
|
942
|
+
type: 'query',
|
|
943
|
+
property: 'comment',
|
|
944
|
+
},
|
|
945
|
+
},
|
|
946
|
+
};
|
|
947
|
+
exports.documentDescription = [
|
|
948
|
+
...exports.documentOperations,
|
|
949
|
+
documentIdField,
|
|
950
|
+
listEntityName,
|
|
951
|
+
listEntityId,
|
|
952
|
+
listLimit,
|
|
953
|
+
listFilters,
|
|
954
|
+
listSimplify,
|
|
955
|
+
listAdditionalFields,
|
|
956
|
+
createName,
|
|
957
|
+
createMediaType,
|
|
958
|
+
createAdditionalFields,
|
|
959
|
+
updateFields,
|
|
960
|
+
copySourceDocumentId,
|
|
961
|
+
copyComment,
|
|
962
|
+
copyToEntitySourceDocumentId,
|
|
963
|
+
copyToEntityEntityName,
|
|
964
|
+
copyToEntityEntityId,
|
|
965
|
+
downloadBinaryProperty,
|
|
966
|
+
downloadVersionId,
|
|
967
|
+
downloadVersionsZippedOptions,
|
|
968
|
+
uploadBinaryProperty,
|
|
969
|
+
uploadEntityName,
|
|
970
|
+
uploadEntityId,
|
|
971
|
+
uploadDocumentName,
|
|
972
|
+
uploadAdditionalOptions,
|
|
973
|
+
uploadNewVersionBinaryProperty,
|
|
974
|
+
uploadNewVersionComment,
|
|
975
|
+
];
|
|
976
|
+
//# sourceMappingURL=DocumentDescription.js.map
|