@orchesty/connector-wflow 2.0.0 → 2.0.1
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/CHANGELOG.md +6 -0
- package/package.json +6 -3
- package/coverage/clover.xml +0 -382
- package/coverage/coverage-final.json +0 -18
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -161
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/src/Batch/WflowSubscribeWebhookBatch.ts.html +0 -337
- package/coverage/lcov-report/src/Batch/WflowUnsubscribeWebhookBatch.ts.html +0 -262
- package/coverage/lcov-report/src/Batch/index.html +0 -131
- package/coverage/lcov-report/src/Connector/WflowGetDocumentConnector.ts.html +0 -1105
- package/coverage/lcov-report/src/Connector/WflowGetDocumentMainFileConnector.ts.html +0 -205
- package/coverage/lcov-report/src/Connector/WflowGetDocumentTypesConnector.ts.html +0 -292
- package/coverage/lcov-report/src/Connector/WflowGetOrganizationsConnector.ts.html +0 -205
- package/coverage/lcov-report/src/Connector/WflowPatchAccountingRulesConnector.ts.html +0 -244
- package/coverage/lcov-report/src/Connector/WflowPatchChartOfAccountsConnector.ts.html +0 -211
- package/coverage/lcov-report/src/Connector/WflowPatchContractsConnector.ts.html +0 -211
- package/coverage/lcov-report/src/Connector/WflowPatchCostCentersConnector.ts.html +0 -211
- package/coverage/lcov-report/src/Connector/WflowPatchSeriesConnector.ts.html +0 -268
- package/coverage/lcov-report/src/Connector/WflowPatchVatControlStatementLinesConnector.ts.html +0 -211
- package/coverage/lcov-report/src/Connector/WflowPatchVatReturnLinesConnector.ts.html +0 -214
- package/coverage/lcov-report/src/Connector/WflowPutDocumentConnector.ts.html +0 -532
- package/coverage/lcov-report/src/Connector/WflowUpdateDocumentStateConnector.ts.html +0 -193
- package/coverage/lcov-report/src/Connector/index.html +0 -296
- package/coverage/lcov-report/src/WflowApplication.ts.html +0 -538
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/test/dataProvider.ts.html +0 -307
- package/coverage/lcov-report/test/index.html +0 -116
- package/coverage/lcov.info +0 -614
- package/dist/Batch/WflowSubscribeWebhookBatch.d.ts +0 -7
- package/dist/Batch/WflowSubscribeWebhookBatch.js +0 -57
- package/dist/Batch/WflowUnsubscribeWebhookBatch.d.ts +0 -7
- package/dist/Batch/WflowUnsubscribeWebhookBatch.js +0 -47
- package/dist/Connector/WflowGetDocumentConnector.d.ts +0 -310
- package/dist/Connector/WflowGetDocumentConnector.js +0 -24
- package/dist/Connector/WflowGetDocumentMainFileConnector.d.ts +0 -13
- package/dist/Connector/WflowGetDocumentMainFileConnector.js +0 -25
- package/dist/Connector/WflowGetDocumentTypesConnector.d.ts +0 -36
- package/dist/Connector/WflowGetDocumentTypesConnector.js +0 -28
- package/dist/Connector/WflowGetOrganizationsConnector.d.ts +0 -15
- package/dist/Connector/WflowGetOrganizationsConnector.js +0 -27
- package/dist/Connector/WflowPatchAccountingRulesConnector.d.ts +0 -17
- package/dist/Connector/WflowPatchAccountingRulesConnector.js +0 -24
- package/dist/Connector/WflowPatchChartOfAccountsConnector.d.ts +0 -15
- package/dist/Connector/WflowPatchChartOfAccountsConnector.js +0 -24
- package/dist/Connector/WflowPatchContractsConnector.d.ts +0 -15
- package/dist/Connector/WflowPatchContractsConnector.js +0 -24
- package/dist/Connector/WflowPatchCostCentersConnector.d.ts +0 -15
- package/dist/Connector/WflowPatchCostCentersConnector.js +0 -24
- package/dist/Connector/WflowPatchSeriesConnector.d.ts +0 -19
- package/dist/Connector/WflowPatchSeriesConnector.js +0 -24
- package/dist/Connector/WflowPatchVatControlStatementLinesConnector.d.ts +0 -15
- package/dist/Connector/WflowPatchVatControlStatementLinesConnector.js +0 -24
- package/dist/Connector/WflowPatchVatReturnLinesConnector.d.ts +0 -16
- package/dist/Connector/WflowPatchVatReturnLinesConnector.js +0 -24
- package/dist/Connector/WflowPutDocumentConnector.d.ts +0 -117
- package/dist/Connector/WflowPutDocumentConnector.js +0 -31
- package/dist/Connector/WflowUpdateDocumentStateConnector.d.ts +0 -11
- package/dist/Connector/WflowUpdateDocumentStateConnector.js +0 -24
- package/dist/WflowApplication.d.ts +0 -41
- package/dist/WflowApplication.js +0 -133
- package/dist/package.json +0 -23
- package/tsconfig.prod.tsbuildinfo +0 -1
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
-
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
-
export declare const NAME = "wflow-get-document-connector";
|
|
4
|
-
export default class WflowGetDocumentConnector extends AConnector {
|
|
5
|
-
getName(): string;
|
|
6
|
-
processAction(dto: ProcessDto<IInput>): Promise<ProcessDto<IOutput>>;
|
|
7
|
-
}
|
|
8
|
-
export interface IInput {
|
|
9
|
-
documentId: string;
|
|
10
|
-
}
|
|
11
|
-
export interface IOutput {
|
|
12
|
-
id: string;
|
|
13
|
-
serie: Serie;
|
|
14
|
-
number: string;
|
|
15
|
-
internalCode: string;
|
|
16
|
-
vatDocumentCode: string;
|
|
17
|
-
variableSymbol: string;
|
|
18
|
-
constantSymbol: string;
|
|
19
|
-
specificSymbol: string;
|
|
20
|
-
issueDate: string;
|
|
21
|
-
dueDate: string;
|
|
22
|
-
vatDate: string;
|
|
23
|
-
acceptDate: string;
|
|
24
|
-
caseDate: string;
|
|
25
|
-
validFrom: string;
|
|
26
|
-
validTo: string;
|
|
27
|
-
effectiveFrom: string;
|
|
28
|
-
effectiveTo: string;
|
|
29
|
-
signatureDate: string;
|
|
30
|
-
reviewDate: string;
|
|
31
|
-
accountTerm: string;
|
|
32
|
-
vatTerm: string;
|
|
33
|
-
taxExclusiveAmount: number;
|
|
34
|
-
totalAmount: number;
|
|
35
|
-
roundingAmount: number;
|
|
36
|
-
totalAmountFC: number;
|
|
37
|
-
advanceAmount: number;
|
|
38
|
-
currency: string;
|
|
39
|
-
partnerIC: string;
|
|
40
|
-
partnerVAT: string;
|
|
41
|
-
partnerLocalVAT: string;
|
|
42
|
-
partnerName: string;
|
|
43
|
-
partnerAddress: string;
|
|
44
|
-
partnerEmail: string;
|
|
45
|
-
accountNo: string;
|
|
46
|
-
bankCode: string;
|
|
47
|
-
iban: string;
|
|
48
|
-
bic: string;
|
|
49
|
-
meIC: string;
|
|
50
|
-
exchangeRate: number;
|
|
51
|
-
exchangeRateUnits: number;
|
|
52
|
-
tag: string;
|
|
53
|
-
orderNo: string;
|
|
54
|
-
description: string;
|
|
55
|
-
contactPersonName: string;
|
|
56
|
-
contactPersonEmail: string;
|
|
57
|
-
remainsToDeliverAmount: number;
|
|
58
|
-
invoiceType: string;
|
|
59
|
-
expectedDeliveryDate: string;
|
|
60
|
-
accountCode: string;
|
|
61
|
-
doNotPay: boolean;
|
|
62
|
-
created: string;
|
|
63
|
-
updated: string;
|
|
64
|
-
lastAction: string;
|
|
65
|
-
removed: string;
|
|
66
|
-
locked: boolean;
|
|
67
|
-
approvalStatus: string;
|
|
68
|
-
flowStatus: string;
|
|
69
|
-
payment: {
|
|
70
|
-
paidAmount: number;
|
|
71
|
-
paidDate: string;
|
|
72
|
-
paymentStatus: string;
|
|
73
|
-
paymentOrderAmount: number;
|
|
74
|
-
paymentOrderStatus: string;
|
|
75
|
-
activePaymentRequestDate: string;
|
|
76
|
-
};
|
|
77
|
-
dataSource: string;
|
|
78
|
-
source: string;
|
|
79
|
-
createdBy: string;
|
|
80
|
-
series: string;
|
|
81
|
-
type: {
|
|
82
|
-
id: string;
|
|
83
|
-
name: string;
|
|
84
|
-
kind: string;
|
|
85
|
-
default: boolean;
|
|
86
|
-
erpExclude: boolean;
|
|
87
|
-
filesExtendName: boolean;
|
|
88
|
-
docCreatingMethod: string;
|
|
89
|
-
autoStamp: string;
|
|
90
|
-
serie: Serie;
|
|
91
|
-
sequence: {
|
|
92
|
-
id: string;
|
|
93
|
-
entity: string;
|
|
94
|
-
description: string;
|
|
95
|
-
fixedPart: string;
|
|
96
|
-
counter: string;
|
|
97
|
-
};
|
|
98
|
-
invoiceType: string;
|
|
99
|
-
};
|
|
100
|
-
partner: {
|
|
101
|
-
id: string;
|
|
102
|
-
externalId: string;
|
|
103
|
-
ic: string;
|
|
104
|
-
vat: string;
|
|
105
|
-
name: string;
|
|
106
|
-
address: string;
|
|
107
|
-
localVAT: string;
|
|
108
|
-
note: string;
|
|
109
|
-
phoneNo: string;
|
|
110
|
-
mailAddress: string;
|
|
111
|
-
deliveryPeriod: number;
|
|
112
|
-
minOrderTotal: number;
|
|
113
|
-
toleranceRate: number;
|
|
114
|
-
language: string;
|
|
115
|
-
isValid: boolean;
|
|
116
|
-
businessRegisterRegistration: string;
|
|
117
|
-
customer: boolean;
|
|
118
|
-
supplier: boolean;
|
|
119
|
-
};
|
|
120
|
-
deliveryLocation: {
|
|
121
|
-
id: string;
|
|
122
|
-
externalId: string;
|
|
123
|
-
code: string;
|
|
124
|
-
description: string;
|
|
125
|
-
isValid: boolean;
|
|
126
|
-
address: string;
|
|
127
|
-
contact: string;
|
|
128
|
-
};
|
|
129
|
-
accounting: Accounting;
|
|
130
|
-
vaTs: {
|
|
131
|
-
rate: number;
|
|
132
|
-
type: string;
|
|
133
|
-
base: number;
|
|
134
|
-
tax: number;
|
|
135
|
-
}[];
|
|
136
|
-
lines: {
|
|
137
|
-
id: string;
|
|
138
|
-
totalAmount: number;
|
|
139
|
-
totalAmountFC: number;
|
|
140
|
-
accountCode: string;
|
|
141
|
-
currency: string;
|
|
142
|
-
description: string;
|
|
143
|
-
quantity: number;
|
|
144
|
-
unitPrice: number;
|
|
145
|
-
measureUnit: string;
|
|
146
|
-
vatType: string;
|
|
147
|
-
vatRate: number;
|
|
148
|
-
order: number;
|
|
149
|
-
approval: {
|
|
150
|
-
level: number;
|
|
151
|
-
team: {
|
|
152
|
-
id: string;
|
|
153
|
-
name: string;
|
|
154
|
-
description: string;
|
|
155
|
-
system: boolean;
|
|
156
|
-
};
|
|
157
|
-
identity: {
|
|
158
|
-
login: string;
|
|
159
|
-
firstName: string;
|
|
160
|
-
lastName: string;
|
|
161
|
-
fullName: string;
|
|
162
|
-
};
|
|
163
|
-
date: string;
|
|
164
|
-
status: string;
|
|
165
|
-
};
|
|
166
|
-
changedAfterApprove: boolean;
|
|
167
|
-
accounting: Accounting;
|
|
168
|
-
code: string;
|
|
169
|
-
costCenter: CostCenter;
|
|
170
|
-
contract: Contract;
|
|
171
|
-
activity: Activity;
|
|
172
|
-
}[];
|
|
173
|
-
transactionId: string;
|
|
174
|
-
expenseCardId: string;
|
|
175
|
-
}
|
|
176
|
-
interface Serie {
|
|
177
|
-
id: string;
|
|
178
|
-
externalId: string;
|
|
179
|
-
code: string;
|
|
180
|
-
description: string;
|
|
181
|
-
isValid: boolean;
|
|
182
|
-
kind: string;
|
|
183
|
-
invoiceType: string;
|
|
184
|
-
}
|
|
185
|
-
interface Accounting {
|
|
186
|
-
businessItemCode: string;
|
|
187
|
-
accountingRule: {
|
|
188
|
-
id: string;
|
|
189
|
-
externalId: string;
|
|
190
|
-
code: string;
|
|
191
|
-
description: string;
|
|
192
|
-
isValid: boolean;
|
|
193
|
-
kind: string;
|
|
194
|
-
};
|
|
195
|
-
activity: Activity;
|
|
196
|
-
businessCase: {
|
|
197
|
-
id: string;
|
|
198
|
-
externalId: string;
|
|
199
|
-
code: string;
|
|
200
|
-
description: string;
|
|
201
|
-
isValid: boolean;
|
|
202
|
-
};
|
|
203
|
-
cardDocumentType: {
|
|
204
|
-
id: string;
|
|
205
|
-
externalId: string;
|
|
206
|
-
code: string;
|
|
207
|
-
description: string;
|
|
208
|
-
isValid: boolean;
|
|
209
|
-
};
|
|
210
|
-
cashDocumentType: {
|
|
211
|
-
id: string;
|
|
212
|
-
externalId: string;
|
|
213
|
-
code: string;
|
|
214
|
-
description: string;
|
|
215
|
-
isValid: boolean;
|
|
216
|
-
};
|
|
217
|
-
cashRegister: {
|
|
218
|
-
id: string;
|
|
219
|
-
externalId: string;
|
|
220
|
-
code: string;
|
|
221
|
-
description: string;
|
|
222
|
-
isValid: boolean;
|
|
223
|
-
};
|
|
224
|
-
contraAccount: {
|
|
225
|
-
id: string;
|
|
226
|
-
externalId: string;
|
|
227
|
-
code: string;
|
|
228
|
-
description: string;
|
|
229
|
-
isValid: boolean;
|
|
230
|
-
};
|
|
231
|
-
contract: Contract;
|
|
232
|
-
costCenter: CostCenter;
|
|
233
|
-
employee: {
|
|
234
|
-
id: string;
|
|
235
|
-
externalId: string;
|
|
236
|
-
code: string;
|
|
237
|
-
description: string;
|
|
238
|
-
isValid: boolean;
|
|
239
|
-
};
|
|
240
|
-
paymentMethod: {
|
|
241
|
-
id: string;
|
|
242
|
-
externalId: string;
|
|
243
|
-
code: string;
|
|
244
|
-
description: string;
|
|
245
|
-
isValid: boolean;
|
|
246
|
-
kind: string;
|
|
247
|
-
};
|
|
248
|
-
project: {
|
|
249
|
-
id: string;
|
|
250
|
-
externalId: string;
|
|
251
|
-
code: string;
|
|
252
|
-
description: string;
|
|
253
|
-
isValid: boolean;
|
|
254
|
-
};
|
|
255
|
-
vatControlStatementLine: {
|
|
256
|
-
id: string;
|
|
257
|
-
externalId: string;
|
|
258
|
-
code: string;
|
|
259
|
-
description: string;
|
|
260
|
-
isValid: boolean;
|
|
261
|
-
};
|
|
262
|
-
vatReturnLine: {
|
|
263
|
-
id: string;
|
|
264
|
-
externalId: string;
|
|
265
|
-
code: string;
|
|
266
|
-
description: string;
|
|
267
|
-
isValid: boolean;
|
|
268
|
-
reverseCharge: boolean;
|
|
269
|
-
};
|
|
270
|
-
vatReverseChargeCode: {
|
|
271
|
-
id: string;
|
|
272
|
-
externalId: string;
|
|
273
|
-
code: string;
|
|
274
|
-
description: string;
|
|
275
|
-
isValid: boolean;
|
|
276
|
-
};
|
|
277
|
-
vehicle: {
|
|
278
|
-
id: string;
|
|
279
|
-
externalId: string;
|
|
280
|
-
code: string;
|
|
281
|
-
description: string;
|
|
282
|
-
isValid: boolean;
|
|
283
|
-
};
|
|
284
|
-
vatSupplyModeCode: string;
|
|
285
|
-
vatApplyReductionCoefficient: boolean;
|
|
286
|
-
vatFixedAssets: boolean;
|
|
287
|
-
vatMode: string;
|
|
288
|
-
}
|
|
289
|
-
interface CostCenter {
|
|
290
|
-
id: string;
|
|
291
|
-
externalId: string;
|
|
292
|
-
code: string;
|
|
293
|
-
description: string;
|
|
294
|
-
isValid: boolean;
|
|
295
|
-
}
|
|
296
|
-
export interface Contract {
|
|
297
|
-
id: string;
|
|
298
|
-
externalId: string;
|
|
299
|
-
code: string;
|
|
300
|
-
description: string;
|
|
301
|
-
isValid: boolean;
|
|
302
|
-
}
|
|
303
|
-
export interface Activity {
|
|
304
|
-
id: string;
|
|
305
|
-
externalId: string;
|
|
306
|
-
code: string;
|
|
307
|
-
description: string;
|
|
308
|
-
isValid: boolean;
|
|
309
|
-
}
|
|
310
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NAME = void 0;
|
|
7
|
-
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
-
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
-
const WflowApplication_1 = require("../WflowApplication");
|
|
10
|
-
exports.NAME = `${WflowApplication_1.NAME}-get-document-connector`;
|
|
11
|
-
class WflowGetDocumentConnector extends AConnector_1.default {
|
|
12
|
-
getName() {
|
|
13
|
-
return exports.NAME;
|
|
14
|
-
}
|
|
15
|
-
async processAction(dto) {
|
|
16
|
-
const app = this.getApplication();
|
|
17
|
-
const applicationInstall = await this.getApplicationInstallFromProcess(dto);
|
|
18
|
-
const { documentId } = dto.getJsonData();
|
|
19
|
-
const request = app.getRequestDto(dto, applicationInstall, HttpMethods_1.HttpMethods.GET, `/${app.getOrganization(applicationInstall)}/documents/${documentId}`);
|
|
20
|
-
const response = (await this.getSender().send(request)).getJsonBody();
|
|
21
|
-
return dto.setNewJsonData(response);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.default = WflowGetDocumentConnector;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
-
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
-
export declare const NAME = "wflow-get-document-main-file-connector";
|
|
4
|
-
export default class WflowGetDocumentMainFileConnector extends AConnector {
|
|
5
|
-
getName(): string;
|
|
6
|
-
processAction(dto: ProcessDto<IInput>): Promise<ProcessDto<IOutput>>;
|
|
7
|
-
}
|
|
8
|
-
export interface IInput {
|
|
9
|
-
documentId: string;
|
|
10
|
-
}
|
|
11
|
-
export interface IOutput {
|
|
12
|
-
file: string;
|
|
13
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NAME = void 0;
|
|
7
|
-
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
-
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
-
const Headers_1 = require("@orchesty/nodejs-sdk/dist/lib/Utils/Headers");
|
|
10
|
-
const WflowApplication_1 = require("../WflowApplication");
|
|
11
|
-
exports.NAME = `${WflowApplication_1.NAME}-get-document-main-file-connector`;
|
|
12
|
-
class WflowGetDocumentMainFileConnector extends AConnector_1.default {
|
|
13
|
-
getName() {
|
|
14
|
-
return exports.NAME;
|
|
15
|
-
}
|
|
16
|
-
async processAction(dto) {
|
|
17
|
-
const { documentId } = dto.getJsonData();
|
|
18
|
-
const application = this.getApplication();
|
|
19
|
-
const applicationInstall = await this.getApplicationInstallFromProcess(dto);
|
|
20
|
-
const requestDto = application.getRequestDto(dto, applicationInstall, HttpMethods_1.HttpMethods.GET, `/${application.getOrganization(applicationInstall)}/documents/${documentId}/files/main/download`).addHeaders({ [Headers_1.CommonHeaders.ACCEPT]: 'application/octet-stream' });
|
|
21
|
-
const responseDto = await this.getSender().send(requestDto, [200]);
|
|
22
|
-
return dto.setNewJsonData({ file: responseDto.getBuffer().toString('base64') });
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.default = WflowGetDocumentMainFileConnector;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
-
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
-
export declare const NAME = "wflow-get-document-types-connector";
|
|
4
|
-
export default class WflowGetDocumentTypesConnector extends AConnector {
|
|
5
|
-
private readonly useInForm;
|
|
6
|
-
constructor(useInForm?: boolean);
|
|
7
|
-
getName(): string;
|
|
8
|
-
processAction(dto: ProcessDto): Promise<ProcessDto<IOutput[]>>;
|
|
9
|
-
}
|
|
10
|
-
export interface IOutput {
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
kind: string;
|
|
14
|
-
default: boolean;
|
|
15
|
-
erpExclude: boolean;
|
|
16
|
-
filesExtendName: boolean;
|
|
17
|
-
docCreatingMethod: string;
|
|
18
|
-
autoStamp: string;
|
|
19
|
-
serie?: {
|
|
20
|
-
id: string;
|
|
21
|
-
externalId?: string;
|
|
22
|
-
code?: string;
|
|
23
|
-
description?: string;
|
|
24
|
-
isValid?: boolean;
|
|
25
|
-
kind?: string;
|
|
26
|
-
invoiceType?: string;
|
|
27
|
-
};
|
|
28
|
-
sequence?: {
|
|
29
|
-
id: string;
|
|
30
|
-
entity?: string;
|
|
31
|
-
description?: string;
|
|
32
|
-
fixedPart?: string;
|
|
33
|
-
counter?: string;
|
|
34
|
-
};
|
|
35
|
-
invoiceType?: string;
|
|
36
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NAME = void 0;
|
|
7
|
-
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
-
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
-
const WflowApplication_1 = require("../WflowApplication");
|
|
10
|
-
exports.NAME = `${WflowApplication_1.NAME}-get-document-types-connector`;
|
|
11
|
-
class WflowGetDocumentTypesConnector extends AConnector_1.default {
|
|
12
|
-
useInForm;
|
|
13
|
-
constructor(useInForm = false) {
|
|
14
|
-
super();
|
|
15
|
-
this.useInForm = useInForm;
|
|
16
|
-
}
|
|
17
|
-
getName() {
|
|
18
|
-
return exports.NAME;
|
|
19
|
-
}
|
|
20
|
-
async processAction(dto) {
|
|
21
|
-
const application = this.getApplication();
|
|
22
|
-
const applicationInstall = await this.getApplicationInstallFromProcess(dto, this.useInForm ? null : true);
|
|
23
|
-
const requestDto = application.getRequestDto(dto, applicationInstall, HttpMethods_1.HttpMethods.GET, `/${application.getOrganization(applicationInstall)}/documents/types?pageSize=100`);
|
|
24
|
-
const responseDto = await this.getSender().send(requestDto);
|
|
25
|
-
return dto.setNewJsonData(responseDto.getJsonBody().items);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.default = WflowGetDocumentTypesConnector;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
-
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
-
export declare const NAME = "wflow-get-organizations-connector";
|
|
4
|
-
export default class WflowGetOrganizationsConnector extends AConnector {
|
|
5
|
-
private readonly useInForm;
|
|
6
|
-
constructor(useInForm?: boolean);
|
|
7
|
-
getName(): string;
|
|
8
|
-
processAction(dto: ProcessDto): Promise<ProcessDto<IOutput[]>>;
|
|
9
|
-
}
|
|
10
|
-
export interface IOutput {
|
|
11
|
-
name: string;
|
|
12
|
-
baseURL: string;
|
|
13
|
-
subdomain: string;
|
|
14
|
-
trialExpiration?: string;
|
|
15
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NAME = void 0;
|
|
7
|
-
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
-
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
-
const WflowApplication_1 = require("../WflowApplication");
|
|
10
|
-
exports.NAME = `${WflowApplication_1.NAME}-get-organizations-connector`;
|
|
11
|
-
class WflowGetOrganizationsConnector extends AConnector_1.default {
|
|
12
|
-
useInForm;
|
|
13
|
-
constructor(useInForm = false) {
|
|
14
|
-
super();
|
|
15
|
-
this.useInForm = useInForm;
|
|
16
|
-
}
|
|
17
|
-
getName() {
|
|
18
|
-
return exports.NAME;
|
|
19
|
-
}
|
|
20
|
-
async processAction(dto) {
|
|
21
|
-
const app = this.getApplication();
|
|
22
|
-
const request = await app.getRequestDto(dto, await this.getApplicationInstallFromProcess(dto, this.useInForm ? null : true), HttpMethods_1.HttpMethods.GET, '/user/myorganizations');
|
|
23
|
-
const response = (await this.getSender().send(request)).getJsonBody();
|
|
24
|
-
return dto.setNewJsonData(response);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.default = WflowGetOrganizationsConnector;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
-
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
-
export declare const NAME = "wflow-patch-accounting-rules-connector";
|
|
4
|
-
export default class WflowPatchAccountingRulesConnector extends AConnector {
|
|
5
|
-
getName(): string;
|
|
6
|
-
processAction(dto: ProcessDto<IInput | IInput[]>): Promise<ProcessDto<IOutput>>;
|
|
7
|
-
}
|
|
8
|
-
export type DocumentKind = 'IncomingInvoice' | 'OutgoingInvoice' | 'ExpenditureCashSlip' | 'SupplierOrder' | 'CustomerOrder' | 'Other' | 'Contract' | 'IncomeCashReceipt';
|
|
9
|
-
export interface IInput {
|
|
10
|
-
id?: string | null;
|
|
11
|
-
externalId?: string | null;
|
|
12
|
-
code?: string | null;
|
|
13
|
-
description?: string | null;
|
|
14
|
-
isValid?: boolean;
|
|
15
|
-
kind?: DocumentKind;
|
|
16
|
-
}
|
|
17
|
-
export type IOutput = IInput | IInput[];
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NAME = void 0;
|
|
7
|
-
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
-
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
-
const WflowApplication_1 = require("../WflowApplication");
|
|
10
|
-
exports.NAME = `${WflowApplication_1.NAME}-patch-accounting-rules-connector`;
|
|
11
|
-
class WflowPatchAccountingRulesConnector extends AConnector_1.default {
|
|
12
|
-
getName() {
|
|
13
|
-
return exports.NAME;
|
|
14
|
-
}
|
|
15
|
-
async processAction(dto) {
|
|
16
|
-
const data = dto.getJsonData();
|
|
17
|
-
const application = this.getApplication();
|
|
18
|
-
const applicationInstall = await this.getApplicationInstallFromProcess(dto);
|
|
19
|
-
const requestDto = application.getRequestDto(dto, applicationInstall, HttpMethods_1.HttpMethods.PATCH, `/${application.getOrganization(applicationInstall)}/registers/accountingrules`, Array.isArray(data) ? data : [data]);
|
|
20
|
-
await this.getSender().send(requestDto, [200]);
|
|
21
|
-
return dto;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.default = WflowPatchAccountingRulesConnector;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
-
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
-
export declare const NAME = "wflow-patch-chart-of-accounts-connector";
|
|
4
|
-
export default class WflowPatchChartOfAccountsConnector extends AConnector {
|
|
5
|
-
getName(): string;
|
|
6
|
-
processAction(dto: ProcessDto<IInput | IInput[]>): Promise<ProcessDto<IOutput>>;
|
|
7
|
-
}
|
|
8
|
-
export interface IInput {
|
|
9
|
-
id?: string | null;
|
|
10
|
-
externalId?: string | null;
|
|
11
|
-
code?: string | null;
|
|
12
|
-
description?: string | null;
|
|
13
|
-
isValid?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export type IOutput = IInput | IInput[];
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NAME = void 0;
|
|
7
|
-
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
-
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
-
const WflowApplication_1 = require("../WflowApplication");
|
|
10
|
-
exports.NAME = `${WflowApplication_1.NAME}-patch-chart-of-accounts-connector`;
|
|
11
|
-
class WflowPatchChartOfAccountsConnector extends AConnector_1.default {
|
|
12
|
-
getName() {
|
|
13
|
-
return exports.NAME;
|
|
14
|
-
}
|
|
15
|
-
async processAction(dto) {
|
|
16
|
-
const data = dto.getJsonData();
|
|
17
|
-
const application = this.getApplication();
|
|
18
|
-
const applicationInstall = await this.getApplicationInstallFromProcess(dto);
|
|
19
|
-
const requestDto = application.getRequestDto(dto, applicationInstall, HttpMethods_1.HttpMethods.PATCH, `/${application.getOrganization(applicationInstall)}/registers/chartofaccounts`, Array.isArray(data) ? data : [data]);
|
|
20
|
-
await this.getSender().send(requestDto, [200]);
|
|
21
|
-
return dto;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.default = WflowPatchChartOfAccountsConnector;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
-
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
-
export declare const NAME = "wflow-patch-contracts-connector";
|
|
4
|
-
export default class WflowPatchContractsConnector extends AConnector {
|
|
5
|
-
getName(): string;
|
|
6
|
-
processAction(dto: ProcessDto<IInput | IInput[]>): Promise<ProcessDto<IOutput>>;
|
|
7
|
-
}
|
|
8
|
-
export interface IInput {
|
|
9
|
-
id?: string | null;
|
|
10
|
-
externalId?: string | null;
|
|
11
|
-
code?: string | null;
|
|
12
|
-
description?: string | null;
|
|
13
|
-
isValid?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export type IOutput = IInput | IInput[];
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NAME = void 0;
|
|
7
|
-
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
-
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
-
const WflowApplication_1 = require("../WflowApplication");
|
|
10
|
-
exports.NAME = `${WflowApplication_1.NAME}-patch-contracts-connector`;
|
|
11
|
-
class WflowPatchContractsConnector extends AConnector_1.default {
|
|
12
|
-
getName() {
|
|
13
|
-
return exports.NAME;
|
|
14
|
-
}
|
|
15
|
-
async processAction(dto) {
|
|
16
|
-
const data = dto.getJsonData();
|
|
17
|
-
const application = this.getApplication();
|
|
18
|
-
const applicationInstall = await this.getApplicationInstallFromProcess(dto);
|
|
19
|
-
const requestDto = application.getRequestDto(dto, applicationInstall, HttpMethods_1.HttpMethods.PATCH, `/${application.getOrganization(applicationInstall)}/registers/contracts`, Array.isArray(data) ? data : [data]);
|
|
20
|
-
await this.getSender().send(requestDto, [200]);
|
|
21
|
-
return dto;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.default = WflowPatchContractsConnector;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
-
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
-
export declare const NAME = "wflow-patch-cost-centers-connector";
|
|
4
|
-
export default class WflowPatchCostCentersConnector extends AConnector {
|
|
5
|
-
getName(): string;
|
|
6
|
-
processAction(dto: ProcessDto<IInput | IInput[]>): Promise<ProcessDto<IOutput>>;
|
|
7
|
-
}
|
|
8
|
-
export interface IInput {
|
|
9
|
-
id?: string | null;
|
|
10
|
-
externalId?: string | null;
|
|
11
|
-
code?: string | null;
|
|
12
|
-
description?: string | null;
|
|
13
|
-
isValid?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export type IOutput = IInput | IInput[];
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NAME = void 0;
|
|
7
|
-
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
-
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
-
const WflowApplication_1 = require("../WflowApplication");
|
|
10
|
-
exports.NAME = `${WflowApplication_1.NAME}-patch-cost-centers-connector`;
|
|
11
|
-
class WflowPatchCostCentersConnector extends AConnector_1.default {
|
|
12
|
-
getName() {
|
|
13
|
-
return exports.NAME;
|
|
14
|
-
}
|
|
15
|
-
async processAction(dto) {
|
|
16
|
-
const data = dto.getJsonData();
|
|
17
|
-
const application = this.getApplication();
|
|
18
|
-
const applicationInstall = await this.getApplicationInstallFromProcess(dto);
|
|
19
|
-
const requestDto = application.getRequestDto(dto, applicationInstall, HttpMethods_1.HttpMethods.PATCH, `/${application.getOrganization(applicationInstall)}/registers/costcenters`, Array.isArray(data) ? data : [data]);
|
|
20
|
-
await this.getSender().send(requestDto, [200]);
|
|
21
|
-
return dto;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.default = WflowPatchCostCentersConnector;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
-
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
-
export declare const NAME = "wflow-patch-series-connector";
|
|
4
|
-
export default class WflowPatchSeriesConnector extends AConnector {
|
|
5
|
-
getName(): string;
|
|
6
|
-
processAction(dto: ProcessDto<IInput | IInput[]>): Promise<ProcessDto<IOutput>>;
|
|
7
|
-
}
|
|
8
|
-
export type DocumentKind = 'IncomingInvoice' | 'OutgoingInvoice' | 'ExpenditureCashSlip' | 'SupplierOrder' | 'CustomerOrder' | 'Other' | 'Contract' | 'IncomeCashReceipt';
|
|
9
|
-
export type InvoiceType = 'TaxInvoice' | 'CreditNote' | 'DebitNote' | 'Proforma' | 'TaxInvoicePayment';
|
|
10
|
-
export interface IInput {
|
|
11
|
-
id?: string | null;
|
|
12
|
-
externalId?: string | null;
|
|
13
|
-
code?: string | null;
|
|
14
|
-
description?: string | null;
|
|
15
|
-
isValid?: boolean;
|
|
16
|
-
kind?: DocumentKind;
|
|
17
|
-
invoiceType?: InvoiceType;
|
|
18
|
-
}
|
|
19
|
-
export type IOutput = IInput | IInput[];
|