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