@unifetch/fortnox 1.0.0 → 2.0.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.
@@ -0,0 +1,1723 @@
1
+
2
+ //#region src/request.ts
3
+ const METHODS = [
4
+ "get",
5
+ "post",
6
+ "put",
7
+ "delete",
8
+ "patch"
9
+ ];
10
+ async function request(reqOptions, initOptions) {
11
+ try {
12
+ let headers;
13
+ let baseUrl;
14
+ if ("accessToken" in initOptions) {
15
+ headers = { Authorization: `Bearer ${initOptions.accessToken}` };
16
+ baseUrl = "https://api.fortnox.se";
17
+ } else {
18
+ headers = {
19
+ "x-api-key": initOptions.proxy.apiKey,
20
+ "x-tenant-id": initOptions.proxy.tenantId
21
+ };
22
+ baseUrl = initOptions.proxy.baseUrl;
23
+ }
24
+ const searchParams = new URLSearchParams();
25
+ if (reqOptions.query) Object.entries(reqOptions.query).forEach(([key, value]) => {
26
+ searchParams.append(key, String(value));
27
+ });
28
+ let path = reqOptions.path;
29
+ if (reqOptions.params) Object.entries(reqOptions.params).forEach(([key, value]) => {
30
+ path = path.replace(`{${key}}`, encodeURIComponent(String(value)));
31
+ });
32
+ const url = `${baseUrl}${path}${searchParams.size > 0 ? `?${searchParams.toString()}` : ""}`;
33
+ const response = await fetch(url, {
34
+ method: reqOptions.method.toUpperCase(),
35
+ body: reqOptions.body ? JSON.stringify(reqOptions.body) : null,
36
+ headers
37
+ });
38
+ const responseData = await response.json();
39
+ if (response.status < 300) return {
40
+ error: null,
41
+ data: responseData
42
+ };
43
+ else return {
44
+ error: {
45
+ ErrorSource: "fortnox",
46
+ ErrorInformation: responseData.ErrorInformation
47
+ },
48
+ data: null
49
+ };
50
+ } catch (e) {
51
+ return {
52
+ error: {
53
+ ErrorSource: "unknown",
54
+ ErrorInformation: {
55
+ message: e instanceof Error ? e.message : String(e),
56
+ error: -1,
57
+ code: -1
58
+ }
59
+ },
60
+ data: null
61
+ };
62
+ }
63
+ }
64
+
65
+ //#endregion
66
+ //#region src/types/resource-operations.gen.ts
67
+ const RESOURCE_OPERATIONS = {
68
+ "absencetransactions": {
69
+ "getList": {
70
+ path: "/3/absencetransactions",
71
+ method: "get"
72
+ },
73
+ "create": {
74
+ path: "/3/absencetransactions",
75
+ method: "post"
76
+ },
77
+ "get": {
78
+ path: "/3/absencetransactions/{id}",
79
+ method: "get"
80
+ },
81
+ "update": {
82
+ path: "/3/absencetransactions/{id}",
83
+ method: "put"
84
+ },
85
+ "delete": {
86
+ path: "/3/absencetransactions/{id}",
87
+ method: "delete"
88
+ },
89
+ "listByEmployeeDateCode": {
90
+ path: "/3/absencetransactions/{id}/{Date}/{Code}",
91
+ method: "get"
92
+ }
93
+ },
94
+ "accountcharts": { "getList": {
95
+ path: "/3/accountcharts",
96
+ method: "get"
97
+ } },
98
+ "accounts": {
99
+ "getList": {
100
+ path: "/3/accounts",
101
+ method: "get"
102
+ },
103
+ "create": {
104
+ path: "/3/accounts",
105
+ method: "post"
106
+ },
107
+ "get": {
108
+ path: "/3/accounts/{Number}",
109
+ method: "get"
110
+ },
111
+ "update": {
112
+ path: "/3/accounts/{Number}",
113
+ method: "put"
114
+ },
115
+ "delete": {
116
+ path: "/3/accounts/{Number}",
117
+ method: "delete"
118
+ }
119
+ },
120
+ "archive": {
121
+ "getByPath": {
122
+ path: "/3/archive",
123
+ method: "get"
124
+ },
125
+ "upload": {
126
+ path: "/3/archive",
127
+ method: "post"
128
+ },
129
+ "deleteByPath": {
130
+ path: "/3/archive",
131
+ method: "delete"
132
+ },
133
+ "getById": {
134
+ path: "/3/archive/{id}",
135
+ method: "get"
136
+ },
137
+ "deleteById": {
138
+ path: "/3/archive/{id}",
139
+ method: "delete"
140
+ }
141
+ },
142
+ "articlefileconnections": {
143
+ "getList": {
144
+ path: "/3/articlefileconnections",
145
+ method: "get"
146
+ },
147
+ "create": {
148
+ path: "/3/articlefileconnections",
149
+ method: "post"
150
+ },
151
+ "get": {
152
+ path: "/3/articlefileconnections/{FileId}",
153
+ method: "get"
154
+ },
155
+ "delete": {
156
+ path: "/3/articlefileconnections/{FileId}",
157
+ method: "delete"
158
+ }
159
+ },
160
+ "articles": {
161
+ "getList": {
162
+ path: "/3/articles",
163
+ method: "get"
164
+ },
165
+ "create": {
166
+ path: "/3/articles",
167
+ method: "post"
168
+ },
169
+ "get": {
170
+ path: "/3/articles/{ArticleNumber}",
171
+ method: "get"
172
+ },
173
+ "update": {
174
+ path: "/3/articles/{ArticleNumber}",
175
+ method: "put"
176
+ },
177
+ "delete": {
178
+ path: "/3/articles/{ArticleNumber}",
179
+ method: "delete"
180
+ }
181
+ },
182
+ "articleurlconnections": {
183
+ "getList": {
184
+ path: "/3/articleurlconnections",
185
+ method: "get"
186
+ },
187
+ "create": {
188
+ path: "/3/articleurlconnections",
189
+ method: "post"
190
+ },
191
+ "get": {
192
+ path: "/3/articleurlconnections/{id}",
193
+ method: "get"
194
+ },
195
+ "update": {
196
+ path: "/3/articleurlconnections/{id}",
197
+ method: "put"
198
+ },
199
+ "delete": {
200
+ path: "/3/articleurlconnections/{id}",
201
+ method: "delete"
202
+ }
203
+ },
204
+ "assetfileconnections": {
205
+ "getList": {
206
+ path: "/3/assetfileconnections",
207
+ method: "get"
208
+ },
209
+ "create": {
210
+ path: "/3/assetfileconnections",
211
+ method: "post"
212
+ },
213
+ "delete": {
214
+ path: "/3/assetfileconnections/{FileId}",
215
+ method: "delete"
216
+ }
217
+ },
218
+ "assets": {
219
+ "getList": {
220
+ path: "/3/assets",
221
+ method: "get"
222
+ },
223
+ "create": {
224
+ path: "/3/assets",
225
+ method: "post"
226
+ },
227
+ "changeOb": {
228
+ path: "/3/assets/changeob/{Id}",
229
+ method: "put"
230
+ },
231
+ "depreciate": {
232
+ path: "/3/assets/depreciate",
233
+ method: "post"
234
+ },
235
+ "listDepreciations": {
236
+ path: "/3/assets/depreciations/{ToDate}",
237
+ method: "get"
238
+ },
239
+ "scrap": {
240
+ path: "/3/assets/scrap/{Id}",
241
+ method: "put"
242
+ },
243
+ "sell": {
244
+ path: "/3/assets/sell/{Id}",
245
+ method: "put"
246
+ },
247
+ "listTypes": {
248
+ path: "/3/assets/types",
249
+ method: "get"
250
+ },
251
+ "createType": {
252
+ path: "/3/assets/types",
253
+ method: "post"
254
+ },
255
+ "getType": {
256
+ path: "/3/assets/types/{id}",
257
+ method: "get"
258
+ },
259
+ "updateType": {
260
+ path: "/3/assets/types/{id}",
261
+ method: "put"
262
+ },
263
+ "deleteType": {
264
+ path: "/3/assets/types/{id}",
265
+ method: "delete"
266
+ },
267
+ "writeDown": {
268
+ path: "/3/assets/writedown/{Id}",
269
+ method: "put"
270
+ },
271
+ "writeUp": {
272
+ path: "/3/assets/writeup/{Id}",
273
+ method: "put"
274
+ },
275
+ "get": {
276
+ path: "/3/assets/{Id}",
277
+ method: "get"
278
+ },
279
+ "update": {
280
+ path: "/3/assets/{Id}",
281
+ method: "put"
282
+ },
283
+ "delete": {
284
+ path: "/3/assets/{Id}",
285
+ method: "delete"
286
+ }
287
+ },
288
+ "attendancetransactions": {
289
+ "getList": {
290
+ path: "/3/attendancetransactions",
291
+ method: "get"
292
+ },
293
+ "create": {
294
+ path: "/3/attendancetransactions",
295
+ method: "post"
296
+ },
297
+ "get": {
298
+ path: "/3/attendancetransactions/{id}",
299
+ method: "get"
300
+ },
301
+ "update": {
302
+ path: "/3/attendancetransactions/{id}",
303
+ method: "put"
304
+ },
305
+ "delete": {
306
+ path: "/3/attendancetransactions/{id}",
307
+ method: "delete"
308
+ },
309
+ "listByEmployeeDateCode": {
310
+ path: "/3/attendancetransactions/{id}/{Date}/{Code}",
311
+ method: "get"
312
+ }
313
+ },
314
+ "companyinformation": { "get": {
315
+ path: "/3/companyinformation",
316
+ method: "get"
317
+ } },
318
+ "contractaccruals": {
319
+ "getList": {
320
+ path: "/3/contractaccruals",
321
+ method: "get"
322
+ },
323
+ "create": {
324
+ path: "/3/contractaccruals",
325
+ method: "post"
326
+ },
327
+ "get": {
328
+ path: "/3/contractaccruals/{DocumentNumber}",
329
+ method: "get"
330
+ },
331
+ "update": {
332
+ path: "/3/contractaccruals/{DocumentNumber}",
333
+ method: "put"
334
+ },
335
+ "delete": {
336
+ path: "/3/contractaccruals/{DocumentNumber}",
337
+ method: "delete"
338
+ }
339
+ },
340
+ "contracts": {
341
+ "getList": {
342
+ path: "/3/contracts",
343
+ method: "get"
344
+ },
345
+ "create": {
346
+ path: "/3/contracts",
347
+ method: "post"
348
+ },
349
+ "get": {
350
+ path: "/3/contracts/{DocumentNumber}",
351
+ method: "get"
352
+ },
353
+ "update": {
354
+ path: "/3/contracts/{DocumentNumber}",
355
+ method: "put"
356
+ },
357
+ "createInvoice": {
358
+ path: "/3/contracts/{DocumentNumber}/createinvoice",
359
+ method: "put"
360
+ },
361
+ "finish": {
362
+ path: "/3/contracts/{DocumentNumber}/finish",
363
+ method: "put"
364
+ },
365
+ "increaseInvoiceCount": {
366
+ path: "/3/contracts/{DocumentNumber}/increaseinvoicecount",
367
+ method: "put"
368
+ }
369
+ },
370
+ "contracttemplates": {
371
+ "getList": {
372
+ path: "/3/contracttemplates",
373
+ method: "get"
374
+ },
375
+ "create": {
376
+ path: "/3/contracttemplates",
377
+ method: "post"
378
+ },
379
+ "get": {
380
+ path: "/3/contracttemplates/{TemplateNumber}",
381
+ method: "get"
382
+ },
383
+ "update": {
384
+ path: "/3/contracttemplates/{TemplateNumber}",
385
+ method: "put"
386
+ }
387
+ },
388
+ "costcenters": {
389
+ "getList": {
390
+ path: "/3/costcenters",
391
+ method: "get"
392
+ },
393
+ "create": {
394
+ path: "/3/costcenters",
395
+ method: "post"
396
+ },
397
+ "get": {
398
+ path: "/3/costcenters/{Code}",
399
+ method: "get"
400
+ },
401
+ "update": {
402
+ path: "/3/costcenters/{Code}",
403
+ method: "put"
404
+ },
405
+ "delete": {
406
+ path: "/3/costcenters/{Code}",
407
+ method: "delete"
408
+ }
409
+ },
410
+ "currencies": {
411
+ "getList": {
412
+ path: "/3/currencies",
413
+ method: "get"
414
+ },
415
+ "create": {
416
+ path: "/3/currencies",
417
+ method: "post"
418
+ },
419
+ "get": {
420
+ path: "/3/currencies/{Code}",
421
+ method: "get"
422
+ },
423
+ "update": {
424
+ path: "/3/currencies/{Code}",
425
+ method: "put"
426
+ },
427
+ "delete": {
428
+ path: "/3/currencies/{Code}",
429
+ method: "delete"
430
+ }
431
+ },
432
+ "customerreferences": {
433
+ "getList": {
434
+ path: "/3/customerreferences",
435
+ method: "get"
436
+ },
437
+ "create": {
438
+ path: "/3/customerreferences",
439
+ method: "post"
440
+ },
441
+ "get": {
442
+ path: "/3/customerreferences/{CustomerReferenceRowId}",
443
+ method: "get"
444
+ },
445
+ "update": {
446
+ path: "/3/customerreferences/{CustomerReferenceRowId}",
447
+ method: "put"
448
+ },
449
+ "delete": {
450
+ path: "/3/customerreferences/{CustomerReferenceRowId}",
451
+ method: "delete"
452
+ }
453
+ },
454
+ "customers": {
455
+ "getList": {
456
+ path: "/3/customers",
457
+ method: "get"
458
+ },
459
+ "create": {
460
+ path: "/3/customers",
461
+ method: "post"
462
+ },
463
+ "get": {
464
+ path: "/3/customers/{CustomerNumber}",
465
+ method: "get"
466
+ },
467
+ "update": {
468
+ path: "/3/customers/{CustomerNumber}",
469
+ method: "put"
470
+ },
471
+ "delete": {
472
+ path: "/3/customers/{CustomerNumber}",
473
+ method: "delete"
474
+ }
475
+ },
476
+ "emailsenders": {
477
+ "getList": {
478
+ path: "/3/emailsenders",
479
+ method: "get"
480
+ },
481
+ "addTrusted": {
482
+ path: "/3/emailsenders/trusted",
483
+ method: "post"
484
+ },
485
+ "removeTrusted": {
486
+ path: "/3/emailsenders/trusted/{Id}",
487
+ method: "delete"
488
+ }
489
+ },
490
+ "employees": {
491
+ "getList": {
492
+ path: "/3/employees",
493
+ method: "get"
494
+ },
495
+ "create": {
496
+ path: "/3/employees",
497
+ method: "post"
498
+ },
499
+ "get": {
500
+ path: "/3/employees/{EmployeeId}",
501
+ method: "get"
502
+ },
503
+ "update": {
504
+ path: "/3/employees/{EmployeeId}",
505
+ method: "put"
506
+ }
507
+ },
508
+ "euvatlimitregulation": { "get": {
509
+ path: "/3/euvatlimitregulation",
510
+ method: "get"
511
+ } },
512
+ "expenses": {
513
+ "getList": {
514
+ path: "/3/expenses",
515
+ method: "get"
516
+ },
517
+ "create": {
518
+ path: "/3/expenses",
519
+ method: "post"
520
+ },
521
+ "get": {
522
+ path: "/3/expenses/{ExpenseCode}",
523
+ method: "get"
524
+ }
525
+ },
526
+ "fileattachments": {
527
+ "getList": {
528
+ path: "/api/fileattachments/attachments-v1",
529
+ method: "get"
530
+ },
531
+ "attach": {
532
+ path: "/api/fileattachments/attachments-v1",
533
+ method: "post"
534
+ },
535
+ "getNumberOfAttachments": {
536
+ path: "/api/fileattachments/attachments-v1/numberofattachments",
537
+ method: "get"
538
+ },
539
+ "validateIncludedOnSend": {
540
+ path: "/api/fileattachments/attachments-v1/validateincludedonsend",
541
+ method: "post"
542
+ },
543
+ "update": {
544
+ path: "/api/fileattachments/attachments-v1/{attachmentId}",
545
+ method: "put"
546
+ },
547
+ "detach": {
548
+ path: "/api/fileattachments/attachments-v1/{attachmentId}",
549
+ method: "delete"
550
+ }
551
+ },
552
+ "financialyears": {
553
+ "getList": {
554
+ path: "/3/financialyears",
555
+ method: "get"
556
+ },
557
+ "create": {
558
+ path: "/3/financialyears",
559
+ method: "post"
560
+ },
561
+ "get": {
562
+ path: "/3/financialyears/{Id}",
563
+ method: "get"
564
+ }
565
+ },
566
+ "inbox": {
567
+ "getList": {
568
+ path: "/3/inbox",
569
+ method: "get"
570
+ },
571
+ "upload": {
572
+ path: "/3/inbox",
573
+ method: "post"
574
+ },
575
+ "get": {
576
+ path: "/3/inbox/{Id}",
577
+ method: "get"
578
+ },
579
+ "delete": {
580
+ path: "/3/inbox/{Id}",
581
+ method: "delete"
582
+ }
583
+ },
584
+ "integrationDeveloper": {
585
+ "listRatings": {
586
+ path: "/api/integration-developer/ratings-v1",
587
+ method: "get"
588
+ },
589
+ "getSalesForIntegration": {
590
+ path: "/api/integration-developer/sales-v1/{integrationId}",
591
+ method: "get"
592
+ },
593
+ "getUsersForIntegrationAndTenant": {
594
+ path: "/api/integration-developer/users/users-v1/{integrationId}/{tenantId}",
595
+ method: "get"
596
+ }
597
+ },
598
+ "integrationPartner": {
599
+ "getSalesForApp": {
600
+ path: "/api/integration-partner/apps/sales-v1/{appId}",
601
+ method: "get"
602
+ },
603
+ "getSalesForAppAndTenant": {
604
+ path: "/api/integration-partner/apps/sales-v1/{appId}/{tenantId}",
605
+ method: "get"
606
+ }
607
+ },
608
+ "invoiceaccruals": {
609
+ "getList": {
610
+ path: "/3/invoiceaccruals",
611
+ method: "get"
612
+ },
613
+ "create": {
614
+ path: "/3/invoiceaccruals",
615
+ method: "post"
616
+ },
617
+ "get": {
618
+ path: "/3/invoiceaccruals/{InvoiceNumber}",
619
+ method: "get"
620
+ },
621
+ "update": {
622
+ path: "/3/invoiceaccruals/{InvoiceNumber}",
623
+ method: "put"
624
+ },
625
+ "delete": {
626
+ path: "/3/invoiceaccruals/{InvoiceNumber}",
627
+ method: "delete"
628
+ }
629
+ },
630
+ "invoicepayments": {
631
+ "getList": {
632
+ path: "/3/invoicepayments",
633
+ method: "get"
634
+ },
635
+ "create": {
636
+ path: "/3/invoicepayments",
637
+ method: "post"
638
+ },
639
+ "get": {
640
+ path: "/3/invoicepayments/{Number}",
641
+ method: "get"
642
+ },
643
+ "update": {
644
+ path: "/3/invoicepayments/{Number}",
645
+ method: "put"
646
+ },
647
+ "delete": {
648
+ path: "/3/invoicepayments/{Number}",
649
+ method: "delete"
650
+ },
651
+ "bookkeep": {
652
+ path: "/3/invoicepayments/{Number}/bookkeep",
653
+ method: "put"
654
+ }
655
+ },
656
+ "invoices": {
657
+ "getList": {
658
+ path: "/3/invoices",
659
+ method: "get"
660
+ },
661
+ "create": {
662
+ path: "/3/invoices",
663
+ method: "post"
664
+ },
665
+ "get": {
666
+ path: "/3/invoices/{DocumentNumber}",
667
+ method: "get"
668
+ },
669
+ "update": {
670
+ path: "/3/invoices/{DocumentNumber}",
671
+ method: "put"
672
+ },
673
+ "bookkeep": {
674
+ path: "/3/invoices/{DocumentNumber}/bookkeep",
675
+ method: "put"
676
+ },
677
+ "cancel": {
678
+ path: "/3/invoices/{DocumentNumber}/cancel",
679
+ method: "put"
680
+ },
681
+ "credit": {
682
+ path: "/3/invoices/{DocumentNumber}/credit",
683
+ method: "put"
684
+ },
685
+ "sendEinvoice": {
686
+ path: "/3/invoices/{DocumentNumber}/einvoice",
687
+ method: "get"
688
+ },
689
+ "sendEmail": {
690
+ path: "/3/invoices/{DocumentNumber}/email",
691
+ method: "get"
692
+ },
693
+ "sendEprint": {
694
+ path: "/3/invoices/{DocumentNumber}/eprint",
695
+ method: "get"
696
+ },
697
+ "markAsSent": {
698
+ path: "/3/invoices/{DocumentNumber}/externalprint",
699
+ method: "put"
700
+ },
701
+ "getPreview": {
702
+ path: "/3/invoices/{DocumentNumber}/preview",
703
+ method: "get"
704
+ },
705
+ "print": {
706
+ path: "/3/invoices/{DocumentNumber}/print",
707
+ method: "get"
708
+ },
709
+ "printReminder": {
710
+ path: "/3/invoices/{DocumentNumber}/printreminder",
711
+ method: "get"
712
+ },
713
+ "setWarehouseReady": {
714
+ path: "/3/invoices/{DocumentNumber}/warehouseready",
715
+ method: "put"
716
+ }
717
+ },
718
+ "labels": {
719
+ "getList": {
720
+ path: "/3/labels",
721
+ method: "get"
722
+ },
723
+ "create": {
724
+ path: "/3/labels",
725
+ method: "post"
726
+ },
727
+ "update": {
728
+ path: "/3/labels/{Id}",
729
+ method: "put"
730
+ },
731
+ "delete": {
732
+ path: "/3/labels/{Id}",
733
+ method: "delete"
734
+ }
735
+ },
736
+ "me": { "get": {
737
+ path: "/3/me",
738
+ method: "get"
739
+ } },
740
+ "modesofpayments": {
741
+ "getList": {
742
+ path: "/3/modesofpayments",
743
+ method: "get"
744
+ },
745
+ "create": {
746
+ path: "/3/modesofpayments",
747
+ method: "post"
748
+ },
749
+ "get": {
750
+ path: "/3/modesofpayments/{Code}",
751
+ method: "get"
752
+ },
753
+ "update": {
754
+ path: "/3/modesofpayments/{Code}",
755
+ method: "put"
756
+ },
757
+ "delete": {
758
+ path: "/3/modesofpayments/{Code}",
759
+ method: "delete"
760
+ }
761
+ },
762
+ "noxfinansinvoices": {
763
+ "send": {
764
+ path: "/3/noxfinansinvoices",
765
+ method: "post"
766
+ },
767
+ "get": {
768
+ path: "/3/noxfinansinvoices/{InvoiceNumber}",
769
+ method: "get"
770
+ },
771
+ "pause": {
772
+ path: "/3/noxfinansinvoices/{InvoiceNumber}/pause",
773
+ method: "put"
774
+ },
775
+ "reportPayment": {
776
+ path: "/3/noxfinansinvoices/{InvoiceNumber}/report-payment",
777
+ method: "put"
778
+ },
779
+ "stop": {
780
+ path: "/3/noxfinansinvoices/{InvoiceNumber}/stop",
781
+ method: "put"
782
+ },
783
+ "takeFees": {
784
+ path: "/3/noxfinansinvoices/{InvoiceNumber}/take-fees",
785
+ method: "put"
786
+ },
787
+ "unpause": {
788
+ path: "/3/noxfinansinvoices/{InvoiceNumber}/unpause",
789
+ method: "put"
790
+ }
791
+ },
792
+ "offers": {
793
+ "getList": {
794
+ path: "/3/offers",
795
+ method: "get"
796
+ },
797
+ "create": {
798
+ path: "/3/offers",
799
+ method: "post"
800
+ },
801
+ "get": {
802
+ path: "/3/offers/{DocumentNumber}",
803
+ method: "get"
804
+ },
805
+ "update": {
806
+ path: "/3/offers/{DocumentNumber}",
807
+ method: "put"
808
+ },
809
+ "cancel": {
810
+ path: "/3/offers/{DocumentNumber}/cancel",
811
+ method: "put"
812
+ },
813
+ "createInvoice": {
814
+ path: "/3/offers/{DocumentNumber}/createinvoice",
815
+ method: "put"
816
+ },
817
+ "createOrder": {
818
+ path: "/3/offers/{DocumentNumber}/createorder",
819
+ method: "put"
820
+ },
821
+ "sendEmail": {
822
+ path: "/3/offers/{DocumentNumber}/email",
823
+ method: "get"
824
+ },
825
+ "markAsSent": {
826
+ path: "/3/offers/{DocumentNumber}/externalprint",
827
+ method: "put"
828
+ },
829
+ "getPreview": {
830
+ path: "/3/offers/{DocumentNumber}/preview",
831
+ method: "get"
832
+ },
833
+ "print": {
834
+ path: "/3/offers/{DocumentNumber}/print",
835
+ method: "get"
836
+ }
837
+ },
838
+ "orders": {
839
+ "getList": {
840
+ path: "/3/orders",
841
+ method: "get"
842
+ },
843
+ "create": {
844
+ path: "/3/orders",
845
+ method: "post"
846
+ },
847
+ "get": {
848
+ path: "/3/orders/{DocumentNumber}",
849
+ method: "get"
850
+ },
851
+ "update": {
852
+ path: "/3/orders/{DocumentNumber}",
853
+ method: "put"
854
+ },
855
+ "cancel": {
856
+ path: "/3/orders/{DocumentNumber}/cancel",
857
+ method: "put"
858
+ },
859
+ "createInvoice": {
860
+ path: "/3/orders/{DocumentNumber}/createinvoice",
861
+ method: "put"
862
+ },
863
+ "sendEmail": {
864
+ path: "/3/orders/{DocumentNumber}/email",
865
+ method: "get"
866
+ },
867
+ "markAsSent": {
868
+ path: "/3/orders/{DocumentNumber}/externalprint",
869
+ method: "put"
870
+ },
871
+ "getPreview": {
872
+ path: "/3/orders/{DocumentNumber}/preview",
873
+ method: "get"
874
+ },
875
+ "print": {
876
+ path: "/3/orders/{DocumentNumber}/print",
877
+ method: "get"
878
+ }
879
+ },
880
+ "predefinedaccounts": {
881
+ "getList": {
882
+ path: "/3/predefinedaccounts",
883
+ method: "get"
884
+ },
885
+ "get": {
886
+ path: "/3/predefinedaccounts/{name}",
887
+ method: "get"
888
+ },
889
+ "update": {
890
+ path: "/3/predefinedaccounts/{name}",
891
+ method: "put"
892
+ }
893
+ },
894
+ "predefinedvoucherseries": {
895
+ "getList": {
896
+ path: "/3/predefinedvoucherseries",
897
+ method: "get"
898
+ },
899
+ "get": {
900
+ path: "/3/predefinedvoucherseries/{Name}",
901
+ method: "get"
902
+ },
903
+ "update": {
904
+ path: "/3/predefinedvoucherseries/{Name}",
905
+ method: "put"
906
+ }
907
+ },
908
+ "pricelists": {
909
+ "getList": {
910
+ path: "/3/pricelists",
911
+ method: "get"
912
+ },
913
+ "create": {
914
+ path: "/3/pricelists",
915
+ method: "post"
916
+ },
917
+ "get": {
918
+ path: "/3/pricelists/{Code}",
919
+ method: "get"
920
+ },
921
+ "update": {
922
+ path: "/3/pricelists/{Code}",
923
+ method: "put"
924
+ }
925
+ },
926
+ "prices": {
927
+ "getList": {
928
+ path: "/3/prices",
929
+ method: "get"
930
+ },
931
+ "create": {
932
+ path: "/3/prices",
933
+ method: "post"
934
+ },
935
+ "getSubList": {
936
+ path: "/3/prices/sublist/{PriceList}/{ArticleNumber}",
937
+ method: "get"
938
+ },
939
+ "get": {
940
+ path: "/3/prices/{PriceList}/{ArticleNumber}",
941
+ method: "get"
942
+ },
943
+ "update": {
944
+ path: "/3/prices/{PriceList}/{ArticleNumber}",
945
+ method: "put"
946
+ },
947
+ "getByFromQuantity": {
948
+ path: "/3/prices/{PriceList}/{ArticleNumber}/{FromQuantity}",
949
+ method: "get"
950
+ },
951
+ "updateByFromQuantity": {
952
+ path: "/3/prices/{PriceList}/{ArticleNumber}/{FromQuantity}",
953
+ method: "put"
954
+ },
955
+ "deleteByFromQuantity": {
956
+ path: "/3/prices/{PriceList}/{ArticleNumber}/{FromQuantity}",
957
+ method: "delete"
958
+ }
959
+ },
960
+ "printtemplates": { "getList": {
961
+ path: "/3/printtemplates",
962
+ method: "get"
963
+ } },
964
+ "projects": {
965
+ "getList": {
966
+ path: "/3/projects",
967
+ method: "get"
968
+ },
969
+ "create": {
970
+ path: "/3/projects",
971
+ method: "post"
972
+ },
973
+ "get": {
974
+ path: "/3/projects/{ProjectNumber}",
975
+ method: "get"
976
+ },
977
+ "update": {
978
+ path: "/3/projects/{ProjectNumber}",
979
+ method: "put"
980
+ },
981
+ "delete": {
982
+ path: "/3/projects/{ProjectNumber}",
983
+ method: "delete"
984
+ }
985
+ },
986
+ "salarytransactions": {
987
+ "getList": {
988
+ path: "/3/salarytransactions",
989
+ method: "get"
990
+ },
991
+ "create": {
992
+ path: "/3/salarytransactions",
993
+ method: "post"
994
+ },
995
+ "get": {
996
+ path: "/3/salarytransactions/{SalaryRow}",
997
+ method: "get"
998
+ },
999
+ "update": {
1000
+ path: "/3/salarytransactions/{SalaryRow}",
1001
+ method: "put"
1002
+ },
1003
+ "delete": {
1004
+ path: "/3/salarytransactions/{SalaryRow}",
1005
+ method: "delete"
1006
+ }
1007
+ },
1008
+ "scheduletimes": {
1009
+ "get": {
1010
+ path: "/3/scheduletimes/{EmployeeId}/{Date}",
1011
+ method: "get"
1012
+ },
1013
+ "update": {
1014
+ path: "/3/scheduletimes/{EmployeeId}/{Date}",
1015
+ method: "put"
1016
+ },
1017
+ "resetDay": {
1018
+ path: "/3/scheduletimes/{EmployeeId}/{Date}/resetday",
1019
+ method: "put"
1020
+ }
1021
+ },
1022
+ "settings": {
1023
+ "getCompanySettings": {
1024
+ path: "/3/settings/company",
1025
+ method: "get"
1026
+ },
1027
+ "getLockedPeriod": {
1028
+ path: "/3/settings/lockedperiod",
1029
+ method: "get"
1030
+ }
1031
+ },
1032
+ "sie": { "get": {
1033
+ path: "/3/sie/{Type}",
1034
+ method: "get"
1035
+ } },
1036
+ "supplierinvoiceaccruals": {
1037
+ "getList": {
1038
+ path: "/3/supplierinvoiceaccruals",
1039
+ method: "get"
1040
+ },
1041
+ "create": {
1042
+ path: "/3/supplierinvoiceaccruals",
1043
+ method: "post"
1044
+ },
1045
+ "get": {
1046
+ path: "/3/supplierinvoiceaccruals/{SupplierInvoiceNumber}",
1047
+ method: "get"
1048
+ },
1049
+ "update": {
1050
+ path: "/3/supplierinvoiceaccruals/{SupplierInvoiceNumber}",
1051
+ method: "put"
1052
+ },
1053
+ "delete": {
1054
+ path: "/3/supplierinvoiceaccruals/{SupplierInvoiceNumber}",
1055
+ method: "delete"
1056
+ }
1057
+ },
1058
+ "supplierinvoiceexternalurlconnections": {
1059
+ "create": {
1060
+ path: "/3/supplierinvoiceexternalurlconnections",
1061
+ method: "post"
1062
+ },
1063
+ "get": {
1064
+ path: "/3/supplierinvoiceexternalurlconnections/{Id}",
1065
+ method: "get"
1066
+ },
1067
+ "update": {
1068
+ path: "/3/supplierinvoiceexternalurlconnections/{Id}",
1069
+ method: "put"
1070
+ },
1071
+ "delete": {
1072
+ path: "/3/supplierinvoiceexternalurlconnections/{Id}",
1073
+ method: "delete"
1074
+ }
1075
+ },
1076
+ "supplierinvoicefileconnections": {
1077
+ "getList": {
1078
+ path: "/3/supplierinvoicefileconnections",
1079
+ method: "get"
1080
+ },
1081
+ "create": {
1082
+ path: "/3/supplierinvoicefileconnections",
1083
+ method: "post"
1084
+ },
1085
+ "get": {
1086
+ path: "/3/supplierinvoicefileconnections/{FileId}",
1087
+ method: "get"
1088
+ },
1089
+ "delete": {
1090
+ path: "/3/supplierinvoicefileconnections/{FileId}",
1091
+ method: "delete"
1092
+ }
1093
+ },
1094
+ "supplierinvoicepayments": {
1095
+ "getList": {
1096
+ path: "/3/supplierinvoicepayments",
1097
+ method: "get"
1098
+ },
1099
+ "create": {
1100
+ path: "/3/supplierinvoicepayments",
1101
+ method: "post"
1102
+ },
1103
+ "get": {
1104
+ path: "/3/supplierinvoicepayments/{Number}",
1105
+ method: "get"
1106
+ },
1107
+ "update": {
1108
+ path: "/3/supplierinvoicepayments/{Number}",
1109
+ method: "put"
1110
+ },
1111
+ "delete": {
1112
+ path: "/3/supplierinvoicepayments/{Number}",
1113
+ method: "delete"
1114
+ },
1115
+ "bookkeep": {
1116
+ path: "/3/supplierinvoicepayments/{Number}/bookkeep",
1117
+ method: "put"
1118
+ }
1119
+ },
1120
+ "supplierinvoices": {
1121
+ "getList": {
1122
+ path: "/3/supplierinvoices",
1123
+ method: "get"
1124
+ },
1125
+ "create": {
1126
+ path: "/3/supplierinvoices",
1127
+ method: "post"
1128
+ },
1129
+ "get": {
1130
+ path: "/3/supplierinvoices/{GivenNumber}",
1131
+ method: "get"
1132
+ },
1133
+ "update": {
1134
+ path: "/3/supplierinvoices/{GivenNumber}",
1135
+ method: "put"
1136
+ },
1137
+ "approvalBookkeep": {
1138
+ path: "/3/supplierinvoices/{GivenNumber}/approvalbookkeep",
1139
+ method: "put"
1140
+ },
1141
+ "approvalPayment": {
1142
+ path: "/3/supplierinvoices/{GivenNumber}/approvalpayment",
1143
+ method: "put"
1144
+ },
1145
+ "bookkeep": {
1146
+ path: "/3/supplierinvoices/{GivenNumber}/bookkeep",
1147
+ method: "put"
1148
+ },
1149
+ "cancel": {
1150
+ path: "/3/supplierinvoices/{GivenNumber}/cancel",
1151
+ method: "put"
1152
+ },
1153
+ "credit": {
1154
+ path: "/3/supplierinvoices/{GivenNumber}/credit",
1155
+ method: "put"
1156
+ }
1157
+ },
1158
+ "suppliers": {
1159
+ "getList": {
1160
+ path: "/3/suppliers",
1161
+ method: "get"
1162
+ },
1163
+ "create": {
1164
+ path: "/3/suppliers",
1165
+ method: "post"
1166
+ },
1167
+ "get": {
1168
+ path: "/3/suppliers/{SupplierNumber}",
1169
+ method: "get"
1170
+ },
1171
+ "update": {
1172
+ path: "/3/suppliers/{SupplierNumber}",
1173
+ method: "put"
1174
+ }
1175
+ },
1176
+ "taxreductions": {
1177
+ "getList": {
1178
+ path: "/3/taxreductions",
1179
+ method: "get"
1180
+ },
1181
+ "create": {
1182
+ path: "/3/taxreductions",
1183
+ method: "post"
1184
+ },
1185
+ "get": {
1186
+ path: "/3/taxreductions/{Id}",
1187
+ method: "get"
1188
+ },
1189
+ "update": {
1190
+ path: "/3/taxreductions/{Id}",
1191
+ method: "put"
1192
+ },
1193
+ "delete": {
1194
+ path: "/3/taxreductions/{Id}",
1195
+ method: "delete"
1196
+ }
1197
+ },
1198
+ "termsofdeliveries": {
1199
+ "getList": {
1200
+ path: "/3/termsofdeliveries",
1201
+ method: "get"
1202
+ },
1203
+ "create": {
1204
+ path: "/3/termsofdeliveries",
1205
+ method: "post"
1206
+ },
1207
+ "get": {
1208
+ path: "/3/termsofdeliveries/{Code}",
1209
+ method: "get"
1210
+ },
1211
+ "update": {
1212
+ path: "/3/termsofdeliveries/{Code}",
1213
+ method: "put"
1214
+ }
1215
+ },
1216
+ "termsofpayments": {
1217
+ "getList": {
1218
+ path: "/3/termsofpayments",
1219
+ method: "get"
1220
+ },
1221
+ "create": {
1222
+ path: "/3/termsofpayments",
1223
+ method: "post"
1224
+ },
1225
+ "get": {
1226
+ path: "/3/termsofpayments/{Code}",
1227
+ method: "get"
1228
+ },
1229
+ "update": {
1230
+ path: "/3/termsofpayments/{Code}",
1231
+ method: "put"
1232
+ },
1233
+ "delete": {
1234
+ path: "/3/termsofpayments/{Code}",
1235
+ method: "delete"
1236
+ }
1237
+ },
1238
+ "time": {
1239
+ "listArticles": {
1240
+ path: "/api/time/articles-v1",
1241
+ method: "get"
1242
+ },
1243
+ "listRegistrations": {
1244
+ path: "/api/time/registrations-v2",
1245
+ method: "get"
1246
+ }
1247
+ },
1248
+ "units": {
1249
+ "getList": {
1250
+ path: "/3/units",
1251
+ method: "get"
1252
+ },
1253
+ "create": {
1254
+ path: "/3/units",
1255
+ method: "post"
1256
+ },
1257
+ "get": {
1258
+ path: "/3/units/{Code}",
1259
+ method: "get"
1260
+ },
1261
+ "update": {
1262
+ path: "/3/units/{Code}",
1263
+ method: "put"
1264
+ },
1265
+ "delete": {
1266
+ path: "/3/units/{Code}",
1267
+ method: "delete"
1268
+ }
1269
+ },
1270
+ "vacationdebtbasis": { "get": {
1271
+ path: "/3/vacationdebtbasis/{Year}/{Month}",
1272
+ method: "get"
1273
+ } },
1274
+ "voucherfileconnections": {
1275
+ "getList": {
1276
+ path: "/3/voucherfileconnections",
1277
+ method: "get"
1278
+ },
1279
+ "create": {
1280
+ path: "/3/voucherfileconnections",
1281
+ method: "post"
1282
+ },
1283
+ "get": {
1284
+ path: "/3/voucherfileconnections/{FileId}",
1285
+ method: "get"
1286
+ },
1287
+ "delete": {
1288
+ path: "/3/voucherfileconnections/{FileId}",
1289
+ method: "delete"
1290
+ }
1291
+ },
1292
+ "vouchers": {
1293
+ "getList": {
1294
+ path: "/3/vouchers",
1295
+ method: "get"
1296
+ },
1297
+ "create": {
1298
+ path: "/3/vouchers",
1299
+ method: "post"
1300
+ },
1301
+ "getSubList": {
1302
+ path: "/3/vouchers/sublist",
1303
+ method: "get"
1304
+ },
1305
+ "getSubListBySeries": {
1306
+ path: "/3/vouchers/sublist/{VoucherSeries}",
1307
+ method: "get"
1308
+ },
1309
+ "get": {
1310
+ path: "/3/vouchers/{VoucherSeries}/{VoucherNumber}",
1311
+ method: "get"
1312
+ }
1313
+ },
1314
+ "voucherseries": {
1315
+ "getList": {
1316
+ path: "/3/voucherseries",
1317
+ method: "get"
1318
+ },
1319
+ "create": {
1320
+ path: "/3/voucherseries",
1321
+ method: "post"
1322
+ },
1323
+ "get": {
1324
+ path: "/3/voucherseries/{Code}",
1325
+ method: "get"
1326
+ },
1327
+ "update": {
1328
+ path: "/3/voucherseries/{Code}",
1329
+ method: "put"
1330
+ }
1331
+ },
1332
+ "warehouse": {
1333
+ "listDeliveries": {
1334
+ path: "/api/warehouse/deliveries-v1",
1335
+ method: "get"
1336
+ },
1337
+ "createInbound": {
1338
+ path: "/api/warehouse/deliveries-v1/inbounddeliveries",
1339
+ method: "post"
1340
+ },
1341
+ "getInbound": {
1342
+ path: "/api/warehouse/deliveries-v1/inbounddeliveries/{id}",
1343
+ method: "get"
1344
+ },
1345
+ "updateInbound": {
1346
+ path: "/api/warehouse/deliveries-v1/inbounddeliveries/{id}",
1347
+ method: "put"
1348
+ },
1349
+ "updateInboundNote": {
1350
+ path: "/api/warehouse/deliveries-v1/inbounddeliveries/{id}",
1351
+ method: "patch"
1352
+ },
1353
+ "releaseInbound": {
1354
+ path: "/api/warehouse/deliveries-v1/inbounddeliveries/{id}/release",
1355
+ method: "put"
1356
+ },
1357
+ "voidInbound": {
1358
+ path: "/api/warehouse/deliveries-v1/inbounddeliveries/{id}/void",
1359
+ method: "put"
1360
+ },
1361
+ "createOutbound": {
1362
+ path: "/api/warehouse/deliveries-v1/outbounddeliveries",
1363
+ method: "post"
1364
+ },
1365
+ "getOutbound": {
1366
+ path: "/api/warehouse/deliveries-v1/outbounddeliveries/{id}",
1367
+ method: "get"
1368
+ },
1369
+ "updateOutbound": {
1370
+ path: "/api/warehouse/deliveries-v1/outbounddeliveries/{id}",
1371
+ method: "put"
1372
+ },
1373
+ "updateOutboundNote": {
1374
+ path: "/api/warehouse/deliveries-v1/outbounddeliveries/{id}",
1375
+ method: "patch"
1376
+ },
1377
+ "releaseOutbound": {
1378
+ path: "/api/warehouse/deliveries-v1/outbounddeliveries/{id}/release",
1379
+ method: "put"
1380
+ },
1381
+ "voidOutbound": {
1382
+ path: "/api/warehouse/deliveries-v1/outbounddeliveries/{id}/void",
1383
+ method: "put"
1384
+ },
1385
+ "listDocumentTypes": {
1386
+ path: "/api/warehouse/documentdeliveries/custom/documenttypes-v1",
1387
+ method: "get"
1388
+ },
1389
+ "createDocumentType": {
1390
+ path: "/api/warehouse/documentdeliveries/custom/documenttypes-v1",
1391
+ method: "post"
1392
+ },
1393
+ "getDocumentType": {
1394
+ path: "/api/warehouse/documentdeliveries/custom/documenttypes-v1/{type}",
1395
+ method: "get"
1396
+ },
1397
+ "getCustomInbound": {
1398
+ path: "/api/warehouse/documentdeliveries/custom/inbound-v1/{type}/{id}",
1399
+ method: "get"
1400
+ },
1401
+ "saveCustomInbound": {
1402
+ path: "/api/warehouse/documentdeliveries/custom/inbound-v1/{type}/{id}",
1403
+ method: "put"
1404
+ },
1405
+ "releaseCustomInbound": {
1406
+ path: "/api/warehouse/documentdeliveries/custom/inbound-v1/{type}/{id}/release",
1407
+ method: "put"
1408
+ },
1409
+ "voidCustomInbound": {
1410
+ path: "/api/warehouse/documentdeliveries/custom/inbound-v1/{type}/{id}/void",
1411
+ method: "put"
1412
+ },
1413
+ "getCustomOutbound": {
1414
+ path: "/api/warehouse/documentdeliveries/custom/outbound-v1/{type}/{id}",
1415
+ method: "get"
1416
+ },
1417
+ "saveCustomOutbound": {
1418
+ path: "/api/warehouse/documentdeliveries/custom/outbound-v1/{type}/{id}",
1419
+ method: "put"
1420
+ },
1421
+ "releaseCustomOutbound": {
1422
+ path: "/api/warehouse/documentdeliveries/custom/outbound-v1/{type}/{id}/release",
1423
+ method: "put"
1424
+ },
1425
+ "voidCustomOutbound": {
1426
+ path: "/api/warehouse/documentdeliveries/custom/outbound-v1/{type}/{id}/void",
1427
+ method: "put"
1428
+ },
1429
+ "listIncomingGoods": {
1430
+ path: "/api/warehouse/incominggoods-v1",
1431
+ method: "get"
1432
+ },
1433
+ "createIncomingGoods": {
1434
+ path: "/api/warehouse/incominggoods-v1",
1435
+ method: "post"
1436
+ },
1437
+ "getIncomingGoods": {
1438
+ path: "/api/warehouse/incominggoods-v1/{id}",
1439
+ method: "get"
1440
+ },
1441
+ "saveIncomingGoods": {
1442
+ path: "/api/warehouse/incominggoods-v1/{id}",
1443
+ method: "put"
1444
+ },
1445
+ "updateIncomingGoodsNote": {
1446
+ path: "/api/warehouse/incominggoods-v1/{id}",
1447
+ method: "patch"
1448
+ },
1449
+ "setIncomingGoodsCompleted": {
1450
+ path: "/api/warehouse/incominggoods-v1/{id}/completed",
1451
+ method: "put"
1452
+ },
1453
+ "releaseIncomingGoods": {
1454
+ path: "/api/warehouse/incominggoods-v1/{id}/release",
1455
+ method: "put"
1456
+ },
1457
+ "voidIncomingGoods": {
1458
+ path: "/api/warehouse/incominggoods-v1/{id}/void",
1459
+ method: "put"
1460
+ },
1461
+ "listProductionOrders": {
1462
+ path: "/api/warehouse/productionorders-v1",
1463
+ method: "get"
1464
+ },
1465
+ "createProductionOrder": {
1466
+ path: "/api/warehouse/productionorders-v1",
1467
+ method: "post"
1468
+ },
1469
+ "getBillOfMaterials": {
1470
+ path: "/api/warehouse/productionorders-v1/billofmaterials/{itemId}",
1471
+ method: "get"
1472
+ },
1473
+ "releaseProductionOrder": {
1474
+ path: "/api/warehouse/productionorders-v1/release/{id}",
1475
+ method: "put"
1476
+ },
1477
+ "voidProductionOrder": {
1478
+ path: "/api/warehouse/productionorders-v1/void/{id}",
1479
+ method: "put"
1480
+ },
1481
+ "getProductionOrder": {
1482
+ path: "/api/warehouse/productionorders-v1/{id}",
1483
+ method: "get"
1484
+ },
1485
+ "updateProductionOrder": {
1486
+ path: "/api/warehouse/productionorders-v1/{id}",
1487
+ method: "put"
1488
+ },
1489
+ "updateProductionOrderNote": {
1490
+ path: "/api/warehouse/productionorders-v1/{id}",
1491
+ method: "patch"
1492
+ },
1493
+ "listPurchaseOrders": {
1494
+ path: "/api/warehouse/purchaseorders-v1",
1495
+ method: "get"
1496
+ },
1497
+ "createPurchaseOrder": {
1498
+ path: "/api/warehouse/purchaseorders-v1",
1499
+ method: "post"
1500
+ },
1501
+ "getCsvReport": {
1502
+ path: "/api/warehouse/purchaseorders-v1/csv",
1503
+ method: "get"
1504
+ },
1505
+ "batchUpdateResponseState": {
1506
+ path: "/api/warehouse/purchaseorders-v1/response",
1507
+ method: "put"
1508
+ },
1509
+ "sendMany": {
1510
+ path: "/api/warehouse/purchaseorders-v1/sendpurchaseorders",
1511
+ method: "post"
1512
+ },
1513
+ "getPurchaseOrder": {
1514
+ path: "/api/warehouse/purchaseorders-v1/{id}",
1515
+ method: "get"
1516
+ },
1517
+ "updatePurchaseOrder": {
1518
+ path: "/api/warehouse/purchaseorders-v1/{id}",
1519
+ method: "put"
1520
+ },
1521
+ "setManuallyCompleted": {
1522
+ path: "/api/warehouse/purchaseorders-v1/{id}/complete",
1523
+ method: "put"
1524
+ },
1525
+ "setDropshipCompleted": {
1526
+ path: "/api/warehouse/purchaseorders-v1/{id}/dropshipcomplete",
1527
+ method: "put"
1528
+ },
1529
+ "getMatchedDocuments": {
1530
+ path: "/api/warehouse/purchaseorders-v1/{id}/matches",
1531
+ method: "get"
1532
+ },
1533
+ "getNotes": {
1534
+ path: "/api/warehouse/purchaseorders-v1/{id}/notes",
1535
+ method: "get"
1536
+ },
1537
+ "updatePartial": {
1538
+ path: "/api/warehouse/purchaseorders-v1/{id}/partial",
1539
+ method: "patch"
1540
+ },
1541
+ "updateResponseState": {
1542
+ path: "/api/warehouse/purchaseorders-v1/{id}/response",
1543
+ method: "put"
1544
+ },
1545
+ "send": {
1546
+ path: "/api/warehouse/purchaseorders-v1/{id}/send",
1547
+ method: "post"
1548
+ },
1549
+ "voidPurchaseOrder": {
1550
+ path: "/api/warehouse/purchaseorders-v1/{id}/void",
1551
+ method: "put"
1552
+ },
1553
+ "getStockBalance": {
1554
+ path: "/api/warehouse/status-v1/stockbalance",
1555
+ method: "get"
1556
+ },
1557
+ "listStockPoints": {
1558
+ path: "/api/warehouse/stockpoints-v1",
1559
+ method: "get"
1560
+ },
1561
+ "createStockPoint": {
1562
+ path: "/api/warehouse/stockpoints-v1",
1563
+ method: "post"
1564
+ },
1565
+ "getManyStockPoints": {
1566
+ path: "/api/warehouse/stockpoints-v1/multi",
1567
+ method: "get"
1568
+ },
1569
+ "getStockPoint": {
1570
+ path: "/api/warehouse/stockpoints-v1/{id}",
1571
+ method: "get"
1572
+ },
1573
+ "appendStockLocations": {
1574
+ path: "/api/warehouse/stockpoints-v1/{id}",
1575
+ method: "post"
1576
+ },
1577
+ "updateStockPoint": {
1578
+ path: "/api/warehouse/stockpoints-v1/{id}",
1579
+ method: "put"
1580
+ },
1581
+ "deleteStockPoint": {
1582
+ path: "/api/warehouse/stockpoints-v1/{id}",
1583
+ method: "delete"
1584
+ },
1585
+ "listStockLocations": {
1586
+ path: "/api/warehouse/stockpoints-v1/{id}/stocklocations",
1587
+ method: "get"
1588
+ },
1589
+ "listStockTakings": {
1590
+ path: "/api/warehouse/stocktaking-v1",
1591
+ method: "get"
1592
+ },
1593
+ "createStockTaking": {
1594
+ path: "/api/warehouse/stocktaking-v1",
1595
+ method: "post"
1596
+ },
1597
+ "getStockTaking": {
1598
+ path: "/api/warehouse/stocktaking-v1/{id}",
1599
+ method: "get"
1600
+ },
1601
+ "updateStockTaking": {
1602
+ path: "/api/warehouse/stocktaking-v1/{id}",
1603
+ method: "put"
1604
+ },
1605
+ "deleteStockTaking": {
1606
+ path: "/api/warehouse/stocktaking-v1/{id}",
1607
+ method: "delete"
1608
+ },
1609
+ "addRowsByFilter": {
1610
+ path: "/api/warehouse/stocktaking-v1/{id}/addrows",
1611
+ method: "post"
1612
+ },
1613
+ "getCandidateRows": {
1614
+ path: "/api/warehouse/stocktaking-v1/{id}/candidates",
1615
+ method: "get"
1616
+ },
1617
+ "releaseStockTaking": {
1618
+ path: "/api/warehouse/stocktaking-v1/{id}/release",
1619
+ method: "put"
1620
+ },
1621
+ "listRows": {
1622
+ path: "/api/warehouse/stocktaking-v1/{id}/rows",
1623
+ method: "get"
1624
+ },
1625
+ "addRows": {
1626
+ path: "/api/warehouse/stocktaking-v1/{id}/rows",
1627
+ method: "post"
1628
+ },
1629
+ "deleteRowsByFilter": {
1630
+ path: "/api/warehouse/stocktaking-v1/{id}/rows",
1631
+ method: "delete"
1632
+ },
1633
+ "deleteRow": {
1634
+ path: "/api/warehouse/stocktaking-v1/{id}/rows/{rowId}",
1635
+ method: "delete"
1636
+ },
1637
+ "voidStockTaking": {
1638
+ path: "/api/warehouse/stocktaking-v1/{id}/void",
1639
+ method: "put"
1640
+ },
1641
+ "createStockTransfer": {
1642
+ path: "/api/warehouse/stocktransfer-v1",
1643
+ method: "post"
1644
+ },
1645
+ "getStockTransfer": {
1646
+ path: "/api/warehouse/stocktransfer-v1/{id}",
1647
+ method: "get"
1648
+ },
1649
+ "updateStockTransfer": {
1650
+ path: "/api/warehouse/stocktransfer-v1/{id}",
1651
+ method: "put"
1652
+ },
1653
+ "releaseStockTransfer": {
1654
+ path: "/api/warehouse/stocktransfer-v1/{id}/release",
1655
+ method: "put"
1656
+ },
1657
+ "voidStockTransfer": {
1658
+ path: "/api/warehouse/stocktransfer-v1/{id}/void",
1659
+ method: "put"
1660
+ },
1661
+ "getActivationStatus": {
1662
+ path: "/api/warehouse/tenants-v4",
1663
+ method: "get"
1664
+ }
1665
+ },
1666
+ "wayofdeliveries": {
1667
+ "getList": {
1668
+ path: "/3/wayofdeliveries",
1669
+ method: "get"
1670
+ },
1671
+ "create": {
1672
+ path: "/3/wayofdeliveries",
1673
+ method: "post"
1674
+ },
1675
+ "get": {
1676
+ path: "/3/wayofdeliveries/{Code}",
1677
+ method: "get"
1678
+ },
1679
+ "update": {
1680
+ path: "/3/wayofdeliveries/{Code}",
1681
+ method: "put"
1682
+ },
1683
+ "delete": {
1684
+ path: "/3/wayofdeliveries/{Code}",
1685
+ method: "delete"
1686
+ }
1687
+ }
1688
+ };
1689
+
1690
+ //#endregion
1691
+ //#region src/create-fortnox.ts
1692
+ function createInitFortnox() {
1693
+ function initFortnox(initOptions) {
1694
+ const pathFn = (path) => {
1695
+ return Object.fromEntries(METHODS.map((method) => [method, (options) => request({
1696
+ path,
1697
+ method,
1698
+ ...options
1699
+ }, initOptions)]));
1700
+ };
1701
+ const client = { path: pathFn };
1702
+ for (const [resource, ops] of Object.entries(RESOURCE_OPERATIONS)) {
1703
+ const resourceMethods = {};
1704
+ for (const [opId, { path, method }] of Object.entries(ops)) resourceMethods[opId] = (options = {}) => request({
1705
+ path,
1706
+ method,
1707
+ ...options
1708
+ }, initOptions);
1709
+ client[resource] = resourceMethods;
1710
+ }
1711
+ return client;
1712
+ }
1713
+ return initFortnox;
1714
+ }
1715
+
1716
+ //#endregion
1717
+ Object.defineProperty(exports, 'createInitFortnox', {
1718
+ enumerable: true,
1719
+ get: function () {
1720
+ return createInitFortnox;
1721
+ }
1722
+ });
1723
+ //# sourceMappingURL=create-fortnox-BRQXlzrc.cjs.map