@zauru-sdk/graphql 1.0.4

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/src/index.ts ADDED
@@ -0,0 +1,1822 @@
1
+ export type FormDocumentType =
2
+ | "payee"
3
+ | "item"
4
+ | "bundle"
5
+ | "entry"
6
+ | "shipment"
7
+ | "invoice"
8
+ | "credit_note"
9
+ | "payment"
10
+ | "purchase_order"
11
+ | "discharge"
12
+ | "charge"
13
+ | "reception"
14
+ | "case"
15
+ | "piecework"
16
+ | "payroll_run"
17
+ | "payroll"
18
+ | "personal_time_off_request"
19
+ | "work_contract"
20
+ | "work_contract_termination"
21
+ | "incident"
22
+ | "item_category"
23
+ | "employee"
24
+ | "contract";
25
+
26
+ export type FormFieldType =
27
+ | "section"
28
+ | "zauru_data"
29
+ | "text"
30
+ | "multi_line_text"
31
+ | "number"
32
+ | "percentage"
33
+ | "email"
34
+ | "url"
35
+ | "yes_no"
36
+ | "date"
37
+ | "hour"
38
+ | "country"
39
+ | "currency"
40
+ | "gt_departamentos"
41
+ | "gt_municipios"
42
+ | "single_select_options"
43
+ | "multi_select_options"
44
+ | "image"
45
+ | "pdf"
46
+ | "file"
47
+ | "fixed_columns_table"
48
+ | "fixed_rows_table";
49
+
50
+ export type ReceptionDetailsGraphQL = {
51
+ id: number;
52
+ purchase_order_detail_id: number;
53
+ quantity: number;
54
+ item_id: number;
55
+ lot_delivered_quantity: number;
56
+ lot_description: string;
57
+ lot_expire: string;
58
+ lot_name: string;
59
+ };
60
+
61
+ export type ReceptionGraphQL = {
62
+ id: number;
63
+ received: boolean;
64
+ voided: boolean;
65
+ received_at: string;
66
+ purchase_order_id: number;
67
+ needs_transit: boolean;
68
+ invoice_number: string;
69
+ memo: string;
70
+ agency_id: number;
71
+ entity_id: number;
72
+ reception_details: ReceptionDetailsGraphQL[];
73
+ };
74
+
75
+ export type PurchaseOrderDetailsGraphQL = {
76
+ item_id: number;
77
+ id: number;
78
+ reference: string;
79
+ unit_cost: number;
80
+ booked_quantity: number;
81
+ delivered_quantity: number;
82
+ tag_id: number;
83
+ item: ItemGraphQL;
84
+ };
85
+
86
+ export type LotStockGraphQL = {
87
+ id: number;
88
+ available: number;
89
+ incoming: number;
90
+ outgoing: number;
91
+ agency_id: number;
92
+ lot_id: number;
93
+ lot: LotGraphQL;
94
+ };
95
+
96
+ export type LotGraphQL = {
97
+ id: number;
98
+ name: string;
99
+ description: string;
100
+ item_id: number;
101
+ expires: string;
102
+ lot_stocks: LotStockGraphQL[];
103
+ };
104
+
105
+ export type MovementGraphQL = {
106
+ id: number;
107
+ serial_id: string;
108
+ item_id: number;
109
+ booked_quantity: number;
110
+ delivered_quantity: number;
111
+ reference: string;
112
+ lot_id: number;
113
+ lot: LotGraphQL;
114
+ };
115
+
116
+ export type ShipmentGraphQL = {
117
+ id: number;
118
+ zid: number;
119
+ id_number: string;
120
+ reference: string;
121
+ planned_delivery: string;
122
+ agency_from_id: number;
123
+ agency_to_id: number;
124
+ transporter_id: number;
125
+ created_at: string;
126
+ needs_transport: boolean;
127
+ payee_id: number;
128
+ income: boolean;
129
+ booker_id: number;
130
+ shipped: boolean;
131
+ shipper_id: number;
132
+ delivered: boolean;
133
+ delivered_at: string;
134
+ voided: boolean;
135
+ returned: boolean;
136
+ memo: string;
137
+ movements: MovementGraphQL[];
138
+ };
139
+
140
+ export type ShipmentPurchaseOrderGraphQL = {
141
+ shipment_id: number;
142
+ shipment: ShipmentGraphQL;
143
+ };
144
+
145
+ export type TaggingGraphQL = {
146
+ id: number;
147
+ tag_id: number;
148
+ taggeable_id: number;
149
+ taggeable_type: string;
150
+ };
151
+
152
+ export type PurchaseOrderGraphQL = {
153
+ id: number;
154
+ created_at: string;
155
+ due: string;
156
+ id_number: string;
157
+ memo: string;
158
+ authorized: boolean;
159
+ payee_id: number;
160
+ purchaser_id: number;
161
+ origin: string;
162
+ transport_type: string;
163
+ reference: string;
164
+ issue_date: string;
165
+ shipping_date: string;
166
+ charge_term_id: number;
167
+ agency_id: number;
168
+ currency_id: number;
169
+ incoterm_id: number;
170
+ entity_id: number;
171
+ incoterm_destination: string;
172
+ voided: boolean;
173
+ received: boolean;
174
+ taxable: boolean;
175
+ import: boolean;
176
+ discount: number;
177
+ other_charges: number;
178
+ delivery_date: string;
179
+ webapp_table_rowables?: {
180
+ webapp_rows?: {
181
+ data?: {
182
+ [key: string]: any;
183
+ };
184
+ };
185
+ };
186
+ purchase_order_details: PurchaseOrderDetailsGraphQL[];
187
+ lots: LotGraphQL[];
188
+ receptions: ReceptionGraphQL[];
189
+ shipment_purchase_orders: ShipmentPurchaseOrderGraphQL[];
190
+ taggings: TaggingGraphQL[];
191
+ };
192
+
193
+ export type TagGraphQL = {
194
+ id: number;
195
+ zid: number;
196
+ name: string;
197
+ description: string;
198
+ };
199
+
200
+ export type DocumentAutomaticNumberGraphQL = {
201
+ id: number;
202
+ active: boolean;
203
+ variable_doc_number: number;
204
+ variable_doc_number_digits: number;
205
+ fixed_doc_number: string;
206
+ field_for_doc_number: string;
207
+ };
208
+
209
+ const getLast100Receptions = `
210
+ query getLast100Receptions($agencyId: Int) @cached {
211
+ purchase_orders(limit: 100, order_by: {created_at: desc}, where: {voided: {_eq: false}, agency_id: {_eq: $agencyId}}) {
212
+ id
213
+ created_at
214
+ due
215
+ id_number
216
+ memo
217
+ payee_id
218
+ issue_date
219
+ discount
220
+ authorized
221
+ received
222
+ transport_type
223
+ purchase_order_details {
224
+ item_id
225
+ id
226
+ reference
227
+ booked_quantity
228
+ delivered_quantity
229
+ }
230
+ lots(where: {active: {_eq: true}}) {
231
+ id
232
+ name
233
+ description
234
+ item_id
235
+ }
236
+ }
237
+ }
238
+ `;
239
+
240
+ const getPurchaseOrderByIdNumber = `
241
+ query getPurchaseOrderByIdNumber($id_number: String) @cached {
242
+ purchase_orders(where: {id_number: {_eq: $id_number}}) {
243
+ id
244
+ created_at
245
+ due
246
+ id_number
247
+ memo
248
+ payee_id
249
+ transport_type
250
+ reference
251
+ incoterm_destination
252
+ issue_date
253
+ voided
254
+ received
255
+ discount
256
+ other_charges
257
+ webapp_table_rowables {
258
+ webapp_rows {
259
+ data
260
+ }
261
+ }
262
+ purchase_order_details {
263
+ item_id
264
+ id
265
+ reference
266
+ booked_quantity
267
+ delivered_quantity
268
+ }
269
+ lots(where: {active: {_eq: true}}) {
270
+ id
271
+ description
272
+ }
273
+ receptions {
274
+ id
275
+ received
276
+ voided
277
+ }
278
+ shipments {
279
+ shipment_id
280
+ }
281
+ }
282
+ }
283
+ `;
284
+
285
+ const getPurchaseOrder = (
286
+ config: { withLotStocks: boolean } = { withLotStocks: false }
287
+ ) => `
288
+ query getPurchaseOrder($id: Int) @cached {
289
+ purchase_orders(where: {id: {_eq: $id}}) {
290
+ id
291
+ agency_id
292
+ entity_id
293
+ created_at
294
+ due
295
+ id_number
296
+ memo
297
+ payee_id
298
+ transport_type
299
+ reference
300
+ incoterm_destination
301
+ issue_date
302
+ voided
303
+ received
304
+ discount
305
+ delivery_date
306
+ other_charges
307
+ webapp_table_rowables {
308
+ webapp_rows {
309
+ data
310
+ }
311
+ }
312
+ purchase_order_details {
313
+ item_id
314
+ id
315
+ reference
316
+ booked_quantity
317
+ delivered_quantity
318
+ item {
319
+ name
320
+ }
321
+ }
322
+ lots(where: {active: {_eq: true}}) {
323
+ id
324
+ name
325
+ description
326
+ ${
327
+ config.withLotStocks
328
+ ? `lot_stocks {
329
+ id
330
+ available
331
+ incoming
332
+ outgoing
333
+ agency_id
334
+ }`
335
+ : ""
336
+ }
337
+ }
338
+ receptions {
339
+ id
340
+ received
341
+ voided
342
+ agency_id
343
+ entity_id
344
+ reception_details {
345
+ purchase_order_detail_id
346
+ item_id
347
+ lot_delivered_quantity
348
+ lot_description
349
+ lot_expire
350
+ lot_name
351
+ }
352
+ }
353
+ shipment_purchase_orders {
354
+ shipment_id
355
+ }
356
+ }
357
+ }
358
+ `;
359
+
360
+ const getShipmentsByToAgencyLast100 = `
361
+ query getShipmentsByToAgencyLast100(
362
+ $agency_to_id: Int
363
+ ){
364
+ shipments(limit: 100, order_by: {id: desc}, where: {voided: {_eq: false}, shipped: {_eq: false}, delivered: {_eq: false}, agency_to_id: {_eq: $agency_to_id}}) {
365
+ id
366
+ zid
367
+ id_number
368
+ reference
369
+ needs_transport
370
+ payee_id
371
+ income
372
+ booker_id
373
+ agency_from_id
374
+ agency_to_id
375
+ transporter_id
376
+ created_at
377
+ movements {
378
+ id
379
+ booked_quantity
380
+ delivered_quantity
381
+ reference
382
+ lot {
383
+ id
384
+ name
385
+ description
386
+ }
387
+ }
388
+ }
389
+ }
390
+ `;
391
+
392
+ const getLotsByName = `
393
+ query getLots($name: String, $entity_id: Int){
394
+ lots (limit: 100, order_by: {id: desc}, where: {entity_id: {_eq: $entity_id}, name: {_eq: $name}}) {
395
+ id
396
+ name
397
+ description
398
+ }
399
+ }
400
+ `;
401
+
402
+ const getLotStocksByAgencyId = `
403
+ query getLotStocksByAgencyId($agency_id: Int){
404
+ lot_stocks (
405
+ order_by: { id: desc },
406
+ where: { agency_id: { _eq: $agency_id }}
407
+ ){
408
+ id
409
+ available
410
+ lot_id
411
+ lot {
412
+ id
413
+ item_id
414
+ expires
415
+ }
416
+ }
417
+ }
418
+ `;
419
+
420
+ const getPurchaseOrdersBetweenDates = (
421
+ config: {
422
+ agencyFilter?: boolean;
423
+ payeeCategoryFilter?: boolean;
424
+ itemIdFilter?: boolean;
425
+ consolidateIdFilter?: boolean;
426
+ lotItemIdExclusion?: number;
427
+ poDetailTagId?: number;
428
+ withLotStocks?: boolean;
429
+ } = {
430
+ agencyFilter: false,
431
+ payeeCategoryFilter: false,
432
+ itemIdFilter: false,
433
+ consolidateIdFilter: false,
434
+ withLotStocks: false,
435
+ }
436
+ ) => `
437
+ query getPurchaseOrdersBetweenDates(
438
+ $agencyId: Int,
439
+ $startDate: timestamp,
440
+ $endDate: timestamp,
441
+ $lotItemIdExclusion: Int = null,
442
+ $poDetailTagId: Int = null,
443
+ $payeeCategoryId: Int = null
444
+ ) {
445
+ purchase_orders(
446
+ order_by: {id: desc},
447
+ where: {
448
+ ${config.agencyFilter ? "agency_id: {_eq: $agencyId}," : ""}
449
+ ${
450
+ config.payeeCategoryFilter
451
+ ? "payee: {payee_category: {id: {_eq: $payeeCategoryId}}}},"
452
+ : ""
453
+ }
454
+ ${
455
+ config.itemIdFilter
456
+ ? "purchase_order_details: {item_id: {_eq: 10}},"
457
+ : ""
458
+ }
459
+ ${
460
+ config.lotItemIdExclusion
461
+ ? "lots: {item_id: {_neq: $lotItemIdExclusion}},"
462
+ : ""
463
+ }
464
+ ${
465
+ config.poDetailTagId
466
+ ? "purchase_order_details: {tag_id: {_eq: $poDetailTagId}},"
467
+ : ""
468
+ }
469
+ ${config.consolidateIdFilter ? "consolidate_id: {_is_null: true}," : ""}
470
+ created_at: {_gte: $startDate, _lte: $endDate}
471
+ }
472
+ ) {
473
+ id
474
+ created_at
475
+ due
476
+ id_number
477
+ memo
478
+ payee_id
479
+ issue_date
480
+ agency_id
481
+ discount
482
+ consolidate_id
483
+ purchase_order_details {
484
+ item_id
485
+ id
486
+ reference
487
+ booked_quantity
488
+ delivered_quantity
489
+ }
490
+ lots(where: {active: {_eq: true}}){
491
+ id
492
+ name
493
+ description
494
+ ${
495
+ config.withLotStocks
496
+ ? `lot_stocks {
497
+ id
498
+ available
499
+ incoming
500
+ outgoing
501
+ agency_id
502
+ }`
503
+ : ""
504
+ }
505
+ }
506
+ shipment_purchase_orders {
507
+ shipment {
508
+ id
509
+ zid
510
+ id_number
511
+ reference
512
+ needs_transport
513
+ payee_id
514
+ income
515
+ booker_id
516
+ agency_from_id
517
+ agency_to_id
518
+ }
519
+ }
520
+ }
521
+ }
522
+ `;
523
+
524
+ export type PayeeGraphQL = {
525
+ id: number;
526
+ id_number: string;
527
+ name: string;
528
+ tin: string;
529
+ email: string;
530
+ phone: string;
531
+ active: boolean;
532
+ service_provider: boolean;
533
+ payee_category_id: number;
534
+ buyer: boolean;
535
+ vendor: boolean;
536
+ currency_id: number;
537
+ allowed_payment_terms: AllowedPaymentTermGraphQL[];
538
+ address_line_1: string;
539
+ };
540
+
541
+ const getPayees = `
542
+ query getPayees {
543
+ payees {
544
+ id
545
+ id_number
546
+ name
547
+ tin
548
+ vendor
549
+ address_line_1
550
+ }
551
+ }
552
+ `;
553
+
554
+ const getProviders = `
555
+ query getProviders {
556
+ payees (where: {vendor: {_eq: true}}) {
557
+ id
558
+ id_number
559
+ name
560
+ tin
561
+ address_line_1
562
+ }
563
+ }
564
+ `;
565
+
566
+ export type AgencyGraphQL = {
567
+ id: number;
568
+ name: string;
569
+ };
570
+
571
+ const getAgencies = `
572
+ query getAgencies {
573
+ agencies {
574
+ id
575
+ name
576
+ }
577
+ }
578
+ `;
579
+
580
+ export type WebAppRowGraphQL<T> = {
581
+ id: number;
582
+ data: T;
583
+ created_at: string;
584
+ };
585
+
586
+ const getWebAppRow = `
587
+ query getWebAppRow($id: Int){
588
+ webapp_rows(where: {id: {_eq: $id}}) {
589
+ data
590
+ }
591
+ }
592
+ `;
593
+
594
+ const getWebAppRowsByWebAppTableId = `
595
+ query getWebAppRowsByWebAppTableId ($webapp_table_id: Int) {
596
+ webapp_rows (where: {webapp_table_id: {_eq: $webapp_table_id }}) {
597
+ id
598
+ data
599
+ created_at
600
+ }
601
+ }
602
+ `;
603
+
604
+ export type PayeeCategoryGraphQL = {
605
+ id: number;
606
+ name: string;
607
+ notes: string;
608
+ vendor: boolean;
609
+ payees_count: number;
610
+ price_list_id: number;
611
+ price_list: PriceListGraphQL;
612
+ payees: PayeeGraphQL[];
613
+ };
614
+
615
+ const getPayeeCategoryById = `
616
+ query getPayeeCategoryById ($id: Int) {
617
+ payee_categories (where: {id: {_eq: $id }}) {
618
+ payees (order_by: { id: desc }) {
619
+ id
620
+ name
621
+ id_number
622
+ email
623
+ phone
624
+ tin
625
+ active
626
+ address_line_1
627
+ }
628
+ }
629
+ }
630
+ `;
631
+
632
+ const getPayeeCategoriesByNotesMatch = (match: string) => `
633
+ query getPayeeCategoriesByNotesMatch {
634
+ payee_categories(where: {notes: {_ilike: "%${match}%" }}) {
635
+ id
636
+ name
637
+ notes
638
+ payees_count
639
+ price_list_id
640
+ price_list {
641
+ id
642
+ name
643
+ }
644
+ payees(order_by: {id: desc}) {
645
+ id
646
+ name
647
+ id_number
648
+ email
649
+ phone
650
+ tin
651
+ active
652
+ payee_category_id
653
+ allowed_payment_terms {
654
+ payment_term_id
655
+ }
656
+ }
657
+ }
658
+ }
659
+ `;
660
+
661
+ const getPayeeCategories = `
662
+ query getPayeeCategories {
663
+ payee_categories {
664
+ id
665
+ name
666
+ notes
667
+ payees_count
668
+ price_list_id
669
+ }
670
+ }
671
+ `;
672
+
673
+ const getProviderCategories = `
674
+ query getProviderCategories {
675
+ payee_categories (where: {vendor: {_eq: true}}) {
676
+ id
677
+ name
678
+ notes
679
+ payees_count
680
+ price_list_id
681
+ }
682
+ }
683
+ `;
684
+
685
+ const getClientCategories = `
686
+ query getClientCategories {
687
+ payee_categories (where: {vendor: {_eq: false}}) {
688
+ id
689
+ name
690
+ notes
691
+ payees_count
692
+ price_list_id
693
+ }
694
+ }
695
+ `;
696
+
697
+ const getPayeeById = `
698
+ query getPayeeById ($id: Int) {
699
+ payees (where: {id: {_eq: $id }}) {
700
+ id
701
+ name
702
+ id_number
703
+ email
704
+ phone
705
+ tin
706
+ active
707
+ address_line_1
708
+ }
709
+ }
710
+ `;
711
+
712
+ export type ItemCategoryGraphQL = {
713
+ id: number;
714
+ name: string;
715
+ notes: string;
716
+ items: ItemGraphQL[];
717
+ items_count: number;
718
+ item_super_category_id: number;
719
+ color: string;
720
+ };
721
+
722
+ export type ItemSuperCategoryGraphQL = {
723
+ id: number;
724
+ name: string;
725
+ description: string;
726
+ item_categories: ItemCategoryGraphQL[];
727
+ };
728
+
729
+ const getSuperCategoryById = `
730
+ query getSuperCategoryById ($id: Int) {
731
+ item_super_categories (where: {id: {_eq: $id }}) {
732
+ item_categories {
733
+ id
734
+ name
735
+ notes
736
+ items_count
737
+ }
738
+ }
739
+ }
740
+ `;
741
+
742
+ const getItemCategoryById = `
743
+ query getItemCategoryById ($id: Int) {
744
+ item_categories (where: {id: {_eq: $id }}) {
745
+ id
746
+ name
747
+ notes
748
+ items_count
749
+ }
750
+ }
751
+ `;
752
+
753
+ export type StockGraphQL = {
754
+ id: number;
755
+ available: number;
756
+ incoming: number;
757
+ outgoing: number;
758
+ };
759
+
760
+ export type ItemGraphQL = {
761
+ id: number;
762
+ name: string;
763
+ stocks_only_integer: boolean;
764
+ code: string;
765
+ item_category_id: number;
766
+ measurement_unit: string;
767
+ description: string;
768
+ active: boolean;
769
+ color: string;
770
+ stockable: boolean;
771
+ product_type: number;
772
+ sellable: boolean;
773
+ quotable: boolean;
774
+ ecommerce: boolean;
775
+ purchasable: boolean;
776
+ weight: number;
777
+ pays_vat: boolean;
778
+ stocks: StockGraphQL[];
779
+ item_category: ItemCategoryGraphQL;
780
+ };
781
+
782
+ const getItemsByCategory = `
783
+ query getItemsByCategory ($id: Int) {
784
+ item_categories (where: {id: {_eq: $id }}) {
785
+ items (where: {active: {_eq: true }}) {
786
+ id,
787
+ name,
788
+ stocks_only_integer,
789
+ code
790
+ product_type
791
+ }
792
+ }
793
+ }
794
+ `;
795
+
796
+ const getItems = `
797
+ query getItems {
798
+ items (where: {active: {_eq: true }}) {
799
+ id,
800
+ name
801
+ }
802
+ }
803
+ `;
804
+
805
+ const getItemsBySuperCategory = `
806
+ query getItemsBySuperCategory ($id: Int, $agency_id: Int) {
807
+ item_super_categories (where: {id: {_eq: $id }}, order_by: {id: desc}) {
808
+ item_categories {
809
+ items (where: {active: {_eq: true }}) {
810
+ id,
811
+ name,
812
+ stocks_only_integer,
813
+ code,
814
+ item_category_id,
815
+ measurement_unit,
816
+ description
817
+ product_type
818
+ stocks(where: {agency_id: {_eq: $agency_id}}, order_by: {id: desc}) {
819
+ available
820
+ id
821
+ incoming
822
+ outgoing
823
+ }
824
+ }
825
+ }
826
+ }
827
+ }
828
+ `;
829
+
830
+ export type ConsolidateGraphQL = {
831
+ id: number;
832
+ id_number: string;
833
+ created_at: string;
834
+ name: string;
835
+ purchase_orders: PurchaseOrderGraphQL[];
836
+ };
837
+
838
+ const getConsolidatesBetweenDates = `
839
+ query getConsolidatesBetweenDates ($startDate: timestamp, $endDate: timestamp) {
840
+ consolidates (order_by: {id: desc}, where: {created_at: {_gte: $startDate, _lte: $endDate}}) {
841
+ id
842
+ id_number
843
+ created_at
844
+ name
845
+ purchase_orders {
846
+ id
847
+ due
848
+ }
849
+ }
850
+ }
851
+ `;
852
+
853
+ export type EmployeeGraphQL = {
854
+ id: number;
855
+ name: string;
856
+ entity_id: number;
857
+ agency_id: number;
858
+ user_id: number;
859
+ email: string;
860
+ };
861
+
862
+ const getEmployeeProfile = `
863
+ query getEmployeeProfile ($id: Int) {
864
+ employees(where: {id: {_eq: $id}}) {
865
+ agency_id
866
+ email
867
+ entity_id
868
+ id
869
+ name
870
+ user_id
871
+ }
872
+ }
873
+ `;
874
+
875
+ const getEmployeesByAgencyId = `
876
+ query getEmployeesByAgencyId ($id: Int) {
877
+ employees(where: {agency_id: {_eq: $id}}) {
878
+ name
879
+ id
880
+ user_id
881
+ }
882
+ }
883
+ `;
884
+
885
+ export type BundleDetailsGraphQL = {
886
+ id: number;
887
+ item_id: number;
888
+ quantity: number;
889
+ //campos del sistema
890
+ _destroy?: boolean;
891
+ };
892
+
893
+ export type BundleGraphQL = {
894
+ id: number;
895
+ code: string;
896
+ description: string;
897
+ name: string;
898
+ updated_at: string;
899
+ item_category_id: number;
900
+ image5: string;
901
+ bundle_details_count: number;
902
+ force_as_service_for_document_external_storage_service: boolean;
903
+ bundle_details: BundleDetailsGraphQL[];
904
+ };
905
+
906
+ const getBundlesByItemCategoryId = `
907
+ query getBundlesByItemCategoryId ($id: Int) {
908
+ bundles(where: {active: {_eq: true}, item_category_id: {_eq: $id}}) {
909
+ id
910
+ code
911
+ description
912
+ name
913
+ updated_at
914
+ image5
915
+ bundle_details_count
916
+ bundle_details {
917
+ id
918
+ item_id
919
+ quantity
920
+ }
921
+ }
922
+ }
923
+ `;
924
+
925
+ const getBundleByName = `
926
+ query getBundleByName ($name: String) {
927
+ bundles (where: {name: {_eq: $name }}) {
928
+ id
929
+ }
930
+ }
931
+ `;
932
+
933
+ const getItemByName = `
934
+ query getItemByName ($name: String) {
935
+ items (where: {active: {_eq: true }, name: {_eq: $name }}) {
936
+ id
937
+ name
938
+ stocks_only_integer
939
+ code
940
+ product_type
941
+ }
942
+ }
943
+ `;
944
+
945
+ const getShipments = (wheres: string[] = []) => {
946
+ const additionalWheres = wheres.join(",");
947
+ return `query getShipments {
948
+ shipments (${
949
+ additionalWheres.length > 0 ? `where: {${additionalWheres}},` : ""
950
+ } order_by: {id: desc}) {
951
+ id
952
+ id_number
953
+ reference
954
+ needs_transport
955
+ payee_id
956
+ booker_id
957
+ shipped
958
+ shipper_id
959
+ delivered
960
+ delivered_at
961
+ voided
962
+ returned
963
+ memo
964
+ planned_delivery
965
+ }
966
+ }
967
+ `;
968
+ };
969
+
970
+ export type InvoiceDetailsGraphQL = {
971
+ id: number;
972
+ bundle_id: number;
973
+ item_bundle_name: string;
974
+ item_bundle_description: string;
975
+ item_id: number;
976
+ price: number;
977
+ unit_price: number;
978
+ quantity: number;
979
+ //campos del sistema
980
+ _destroy?: boolean;
981
+ };
982
+
983
+ export type TaggingInvoiceGraphQL = {
984
+ id: number;
985
+ invoice_id: number;
986
+ tag_id: number;
987
+ };
988
+
989
+ export type InvoiceGraphQL = {
990
+ id: number;
991
+ zid: number;
992
+ id_number: string;
993
+ order_number: string;
994
+ invoice_number: string;
995
+ reference: string;
996
+ date: string;
997
+ paid: boolean;
998
+ subtotal: number;
999
+ currency_id: number;
1000
+ total: number;
1001
+ payee_id: number;
1002
+ seller_id: number;
1003
+ memo: string;
1004
+ payment_term_id: number;
1005
+ issued: boolean;
1006
+ agency_id: number;
1007
+ invoice_details: InvoiceDetailsGraphQL[];
1008
+ payee: PayeeGraphQL;
1009
+ submission_invoices: SubmissionInvoicesGraphQL[];
1010
+ tagging_invoices: TaggingInvoiceGraphQL[];
1011
+ };
1012
+
1013
+ export type FormFieldOptionsGraphQL = {
1014
+ id: number;
1015
+ label: string;
1016
+ position: number;
1017
+ value: string;
1018
+ };
1019
+
1020
+ export type FormFieldTableHeaderGraphQL = {
1021
+ id: number;
1022
+ name: string;
1023
+ cell_type: "text" | "multi_line_text" | "number" | "yes_no";
1024
+ position: number;
1025
+ };
1026
+
1027
+ export type FormFieldGraphQL = {
1028
+ id: number;
1029
+ form_id: number;
1030
+ name: string;
1031
+ field_type: FormFieldType;
1032
+ hint: string;
1033
+ required: boolean;
1034
+ default_value: string;
1035
+ position: number;
1036
+ print_var_name: string;
1037
+ settings_form_field_options: Partial<FormFieldOptionsGraphQL>[];
1038
+ settings_form_field_table_headers: Partial<FormFieldTableHeaderGraphQL>[];
1039
+ };
1040
+
1041
+ export type FormSubmissionValueGraphQL = {
1042
+ id: number;
1043
+ form_field_id: number;
1044
+ groups_path: string;
1045
+ value: string;
1046
+ form_submission_id: number;
1047
+ settings_form_field: FormFieldGraphQL;
1048
+ };
1049
+
1050
+ export type FormSubmissionGraphQL = {
1051
+ id: number;
1052
+ zid: number;
1053
+ reference: string;
1054
+ version: number;
1055
+ settings_form_submission_values: FormSubmissionValueGraphQL[];
1056
+ settings_form: FormGraphQL;
1057
+ created_at: string;
1058
+ form_id: number;
1059
+ id_number: string;
1060
+ voided: boolean;
1061
+ user_id: number;
1062
+ };
1063
+
1064
+ export type SubmissionInvoicesGraphQL = {
1065
+ id: number;
1066
+ invoice_id: number;
1067
+ form_submission_id: number;
1068
+ settings_form_submission: FormSubmissionGraphQL;
1069
+ invoice: InvoiceGraphQL;
1070
+ created_at: string;
1071
+ };
1072
+
1073
+ export type SubmissionCasesGraphQL = {
1074
+ id: number;
1075
+ case_id: number;
1076
+ form_submission_id: number;
1077
+ settings_form_submission: FormSubmissionGraphQL;
1078
+ case: CaseGraphQL;
1079
+ };
1080
+
1081
+ export type FormGraphQL = {
1082
+ id: number;
1083
+ zid: number;
1084
+ version: number;
1085
+ document_type: FormDocumentType;
1086
+ active: boolean;
1087
+ name: string;
1088
+ description: string;
1089
+ settings_form_fields: Partial<FormFieldGraphQL>[];
1090
+ };
1091
+
1092
+ const getFormByName = `
1093
+ query getFormByName ($name: String) {
1094
+ settings_forms (
1095
+ where: {name: {_eq: $name }},
1096
+ order_by: {zid: desc, version: desc}
1097
+ ) {
1098
+ id
1099
+ zid
1100
+ name
1101
+ description
1102
+ version
1103
+ active
1104
+ settings_form_fields (order_by: {position: asc}) {
1105
+ id
1106
+ name
1107
+ field_type
1108
+ hint
1109
+ required
1110
+ default_value
1111
+ position
1112
+ print_var_name
1113
+ form_id
1114
+ settings_form_field_options {
1115
+ id
1116
+ label
1117
+ position
1118
+ value
1119
+ }
1120
+ }
1121
+ }
1122
+ }
1123
+ `;
1124
+
1125
+ const getForms = `
1126
+ query getForms {
1127
+ settings_forms (
1128
+ order_by: {zid: desc, version: desc}
1129
+ ) {
1130
+ id
1131
+ zid
1132
+ name
1133
+ description
1134
+ version
1135
+ active
1136
+ settings_form_fields (order_by: {position: asc}) {
1137
+ id
1138
+ name
1139
+ field_type
1140
+ hint
1141
+ required
1142
+ default_value
1143
+ position
1144
+ print_var_name
1145
+ form_id
1146
+ settings_form_field_options {
1147
+ id
1148
+ label
1149
+ position
1150
+ value
1151
+ }
1152
+ }
1153
+ }
1154
+ }
1155
+ `;
1156
+
1157
+ const getFormsByDocumentType = (filters: { formZid?: number } = {}) => `
1158
+ query getFormsByDocumentType ($document_type: String) {
1159
+ settings_forms (
1160
+ where: {
1161
+ ${filters?.formZid ? `zid: {_eq: ${filters?.formZid}},` : ""}
1162
+ document_type: {_eq: $document_type}
1163
+ },
1164
+ order_by: {zid: desc, version: desc}
1165
+ ) {
1166
+ id
1167
+ zid
1168
+ name
1169
+ description
1170
+ version
1171
+ active
1172
+ settings_form_fields (order_by: {position: asc}) {
1173
+ id
1174
+ name
1175
+ field_type
1176
+ hint
1177
+ required
1178
+ default_value
1179
+ position
1180
+ print_var_name
1181
+ form_id
1182
+ settings_form_field_table_headers {
1183
+ id
1184
+ name
1185
+ cell_type
1186
+ position
1187
+ }
1188
+ settings_form_field_options {
1189
+ id
1190
+ label
1191
+ position
1192
+ value
1193
+ }
1194
+ }
1195
+ }
1196
+ }
1197
+ `;
1198
+
1199
+ const getMyCaseFormSubmissions = (
1200
+ filters: { formZid?: number; caseId?: number } = {}
1201
+ ) => `
1202
+ query getMyCaseFormSubmissions ($responsible_id: Int) {
1203
+ submission_cases (
1204
+ limit: 500,
1205
+ where: {
1206
+ settings_form_submission: {
1207
+ ${
1208
+ filters?.formZid
1209
+ ? `settings_form: {zid: {_eq: ${filters?.formZid}}},`
1210
+ : ""
1211
+ }
1212
+ voided: {_eq: false}
1213
+ },
1214
+ case: {
1215
+ ${filters?.caseId ? `id: {_eq: ${filters?.caseId}},` : ""}
1216
+ responsible_id: {_eq: $responsible_id}
1217
+ }
1218
+ },
1219
+ order_by: {id: desc})
1220
+ {
1221
+ id
1222
+ case_id
1223
+ form_submission_id
1224
+ case {
1225
+ id
1226
+ id_number
1227
+ reference
1228
+ date
1229
+ symptom
1230
+ solution
1231
+ memo
1232
+ client {
1233
+ name
1234
+ address_line_1
1235
+ }
1236
+ }
1237
+ settings_form_submission {
1238
+ id
1239
+ zid
1240
+ reference
1241
+ created_at
1242
+ version
1243
+ id_number
1244
+ user_id
1245
+ settings_form_submission_values {
1246
+ id
1247
+ form_field_id
1248
+ value
1249
+ settings_form_field {
1250
+ id
1251
+ name
1252
+ print_var_name
1253
+ field_type
1254
+ settings_form_field_options {
1255
+ id
1256
+ label
1257
+ position
1258
+ value
1259
+ }
1260
+ }
1261
+ }
1262
+ settings_form {
1263
+ id
1264
+ name
1265
+ zid
1266
+ description
1267
+ created_at
1268
+ version
1269
+ }
1270
+ }
1271
+ }
1272
+ }
1273
+ `;
1274
+
1275
+ const getFormSubmissionById = `
1276
+ query getFormSubmissionById ($formId: bigint) {
1277
+ settings_form_submissions (where: {id: { _eq: $formId }}) {
1278
+ id
1279
+ zid
1280
+ reference
1281
+ created_at
1282
+ version
1283
+ id_number
1284
+ settings_form {
1285
+ id
1286
+ name
1287
+ description
1288
+ }
1289
+ settings_form_submission_values {
1290
+ id
1291
+ form_field_id
1292
+ value
1293
+ settings_form_field {
1294
+ id
1295
+ name
1296
+ print_var_name
1297
+ field_type
1298
+ settings_form_field_options {
1299
+ id
1300
+ label
1301
+ position
1302
+ value
1303
+ }
1304
+ }
1305
+ }
1306
+ }
1307
+ }
1308
+ `;
1309
+
1310
+ const getInvoiceFormSubmissionsByAgencyId = (filters?: {
1311
+ seller_id?: number | string;
1312
+ payee_id_number_search?: string;
1313
+ some_field_value?: string;
1314
+ item_ids?: number[];
1315
+ bundle_ids?: number[];
1316
+ startDate?: string;
1317
+ endDate?: string;
1318
+ }) => {
1319
+ return `
1320
+ query getInvoiceFormSubmissionsByAgencyId (
1321
+ $agency_id: Int
1322
+ ) {
1323
+ submission_invoices(
1324
+ where: {
1325
+ settings_form_submission: {
1326
+ ${
1327
+ filters?.some_field_value
1328
+ ? `settings_form_submission_values: {
1329
+ value: { _eq: "${filters?.some_field_value}" }
1330
+ },`
1331
+ : ""
1332
+ }
1333
+ voided: {_eq: false}
1334
+ },
1335
+ ${
1336
+ filters?.startDate?.length && filters?.endDate?.length
1337
+ ? `created_at: { _gte: "${filters?.startDate}", _lte: "${filters?.endDate}" },`
1338
+ : ""
1339
+ }
1340
+ invoice: {
1341
+ agency_id: {_eq: $agency_id},
1342
+ ${filters?.seller_id ? `seller_id: {_eq: ${filters?.seller_id} },` : ""}
1343
+ ${
1344
+ filters?.payee_id_number_search
1345
+ ? `payee: { id_number: { _ilike: "%${filters?.payee_id_number_search}%"} },`
1346
+ : ""
1347
+ }
1348
+ ${
1349
+ filters?.item_ids?.length
1350
+ ? `invoice_details: {item_id: {_in: [${filters?.item_ids?.join(
1351
+ ","
1352
+ )}]}}`
1353
+ : ""
1354
+ }
1355
+ ${
1356
+ filters?.bundle_ids?.length
1357
+ ? `invoice_details: {bundle_id: {_in: [${filters?.bundle_ids?.join(
1358
+ ","
1359
+ )}]}}`
1360
+ : ""
1361
+ }
1362
+ voided: {_eq: false}
1363
+ }
1364
+ },
1365
+ order_by: {id: desc}
1366
+ )
1367
+ {
1368
+ id
1369
+ invoice_id
1370
+ form_submission_id
1371
+ created_at
1372
+ invoice {
1373
+ id_number
1374
+ date
1375
+ currency_id
1376
+ order_number
1377
+ seller_id
1378
+ payee_id
1379
+ payee {
1380
+ id_number
1381
+ name
1382
+ }
1383
+ }
1384
+ settings_form_submission {
1385
+ id
1386
+ zid
1387
+ reference
1388
+ created_at
1389
+ version
1390
+ id_number
1391
+ settings_form_submission_values {
1392
+ id
1393
+ form_field_id
1394
+ value
1395
+ settings_form_field {
1396
+ id
1397
+ name
1398
+ print_var_name
1399
+ settings_form_field_options {
1400
+ id
1401
+ label
1402
+ position
1403
+ value
1404
+ }
1405
+ }
1406
+ }
1407
+ settings_form {
1408
+ id
1409
+ name
1410
+ zid
1411
+ description
1412
+ created_at
1413
+ version
1414
+ }
1415
+ }
1416
+ }
1417
+ }
1418
+ `;
1419
+ };
1420
+
1421
+ const getLastInvoiceFormSubmission = (filters: { formZid?: number } = {}) => `
1422
+ query getLastInvoiceFormSubmission {
1423
+ submission_invoices(
1424
+ where: {
1425
+ settings_form_submission: {
1426
+ ${
1427
+ filters?.formZid
1428
+ ? `settings_form: {zid: {_eq: ${filters?.formZid}}},`
1429
+ : ""
1430
+ }
1431
+ voided: {_eq: false}
1432
+ }
1433
+ },
1434
+ order_by: {id: desc},
1435
+ limit: 1
1436
+ ) {
1437
+ settings_form_submission {
1438
+ id
1439
+ id_number
1440
+ }
1441
+ }
1442
+ }
1443
+ `;
1444
+
1445
+ const getInvoiceFormSubmissionsByInvoiceId = (
1446
+ filters: { formZid?: number } = {}
1447
+ ) => `
1448
+ query getInvoiceFormSubmissionsByInvoiceId ($invoice_id: bigint) {
1449
+ submission_invoices(
1450
+ where: {
1451
+ invoice_id: {_eq: $invoice_id},
1452
+ settings_form_submission: {
1453
+ ${
1454
+ filters?.formZid
1455
+ ? `settings_form: {zid: {_eq: ${filters?.formZid}}},`
1456
+ : ""
1457
+ }
1458
+ voided: {_eq: false}
1459
+ }
1460
+ },
1461
+ order_by: {id: desc}
1462
+ ) {
1463
+ id
1464
+ invoice_id
1465
+ form_submission_id
1466
+ created_at
1467
+ settings_form_submission {
1468
+ id
1469
+ zid
1470
+ reference
1471
+ created_at
1472
+ version
1473
+ id_number
1474
+ settings_form_submission_values {
1475
+ id
1476
+ form_field_id
1477
+ value
1478
+ settings_form_field {
1479
+ id
1480
+ name
1481
+ print_var_name
1482
+ settings_form_field_options {
1483
+ id
1484
+ label
1485
+ position
1486
+ value
1487
+ }
1488
+ }
1489
+ }
1490
+ settings_form {
1491
+ id
1492
+ name
1493
+ zid
1494
+ description
1495
+ created_at
1496
+ version
1497
+ }
1498
+ }
1499
+ }
1500
+ }
1501
+ `;
1502
+
1503
+ export type PriceListGraphQL = {
1504
+ id: number;
1505
+ active: boolean;
1506
+ name: string;
1507
+ description: string;
1508
+ client_exclusive: boolean;
1509
+ payee_categories: PayeeCategoryGraphQL[];
1510
+ };
1511
+
1512
+ export type CurrencyGraphQL = {
1513
+ id: number;
1514
+ name: string;
1515
+ prefix: string;
1516
+ code: string;
1517
+ country: string;
1518
+ plural_name: string;
1519
+ };
1520
+
1521
+ const getCurrencies = `
1522
+ query getCurrencies {
1523
+ currencies {
1524
+ id
1525
+ name
1526
+ prefix
1527
+ code
1528
+ country
1529
+ plural_name
1530
+ }
1531
+ }
1532
+ `;
1533
+
1534
+ export type SuggestedPriceGraphQL = {
1535
+ id: number;
1536
+ current: boolean;
1537
+ currency_id: number;
1538
+ amount: number;
1539
+ bundle_id: number;
1540
+ item_id: number;
1541
+ notes: string;
1542
+ price_list_id: number;
1543
+ flexible_price: boolean;
1544
+ item: ItemGraphQL;
1545
+ price_list: PriceListGraphQL;
1546
+ };
1547
+
1548
+ const getSuggestedPrices = (
1549
+ config: {
1550
+ notNullPriceList: boolean;
1551
+ withItems: boolean;
1552
+ withItemCategories: boolean;
1553
+ } = {
1554
+ notNullPriceList: false,
1555
+ withItems: false,
1556
+ withItemCategories: false,
1557
+ }
1558
+ ) => `
1559
+ query getSuggestedPrices {
1560
+ suggested_prices ${
1561
+ config?.notNullPriceList
1562
+ ? "(where: {price_list_id: {_is_null: false}})"
1563
+ : ""
1564
+ } {
1565
+ id
1566
+ current
1567
+ currency_id
1568
+ amount
1569
+ bundle_id
1570
+ item_id
1571
+ notes
1572
+ price_list_id
1573
+ flexible_price
1574
+ price_list {
1575
+ payee_categories {
1576
+ id
1577
+ }
1578
+ }
1579
+ ${
1580
+ config?.withItems
1581
+ ? `item {
1582
+ id
1583
+ name
1584
+ stocks_only_integer
1585
+ code
1586
+ product_type
1587
+ ${
1588
+ config?.withItemCategories
1589
+ ? `
1590
+ item_category {
1591
+ id
1592
+ name
1593
+ notes
1594
+ items_count
1595
+ }
1596
+ `
1597
+ : ""
1598
+ }
1599
+ }`
1600
+ : ""
1601
+ }
1602
+ }
1603
+ }
1604
+ `;
1605
+
1606
+ export type AllowedPaymentTermGraphQL = {
1607
+ id: number;
1608
+ payee_category_id: number;
1609
+ payment_term_id: number;
1610
+ };
1611
+
1612
+ export type PaymentTermGraphQL = {
1613
+ id: number;
1614
+ active: boolean;
1615
+ memo: string;
1616
+ name: string;
1617
+ applicable_to_uncategorized_payees: boolean;
1618
+ account_from_id: number;
1619
+ account_to_id: number;
1620
+ allowed_payment_terms: AllowedPaymentTermGraphQL[];
1621
+ };
1622
+
1623
+ const getPaymentTerms = `
1624
+ query getPaymentTerms {
1625
+ payment_terms {
1626
+ active
1627
+ id
1628
+ memo
1629
+ name
1630
+ }
1631
+ }
1632
+ `;
1633
+
1634
+ const getPaymentTermById = `
1635
+ query getPaymentTermById ($id: Int) {
1636
+ payment_terms (where: {id: {_eq: $id }}) {
1637
+ active
1638
+ id
1639
+ memo
1640
+ name
1641
+ account_from_id
1642
+ account_to_id
1643
+ allowed_payment_terms {
1644
+ payee_category_id
1645
+ }
1646
+ }
1647
+ }
1648
+ `;
1649
+
1650
+ const getInvoicesByAgencyId = `
1651
+ query getInvoicesByAgencyId($id: Int) {
1652
+ invoices(limit: 1000, where: {agency_id: {_eq: $id}, voided: {_eq: false}}, order_by: {id: desc}) {
1653
+ id
1654
+ zid
1655
+ id_number
1656
+ currency_id
1657
+ date
1658
+ payee_id
1659
+ total
1660
+ subtotal
1661
+ seller_id
1662
+ order_number
1663
+ memo
1664
+ issued
1665
+ invoice_number
1666
+ id_number
1667
+ payment_term_id
1668
+ reference
1669
+ submission_invoices {
1670
+ id
1671
+ settings_form_submission {
1672
+ zid
1673
+ voided
1674
+ settings_form {
1675
+ id
1676
+ zid
1677
+ }
1678
+ }
1679
+ }
1680
+ invoice_details {
1681
+ bundle_id
1682
+ id
1683
+ item_bundle_name
1684
+ item_bundle_description
1685
+ item_id
1686
+ price
1687
+ quantity
1688
+ unit_price
1689
+ }
1690
+ payee {
1691
+ name
1692
+ payee_category_id
1693
+ }
1694
+ }
1695
+ }
1696
+ `;
1697
+
1698
+ export type CaseInvoiceGraphQL = {
1699
+ invoice: InvoiceGraphQL;
1700
+ case: CaseGraphQL;
1701
+ };
1702
+
1703
+ export type CaseSupplyGraphQL = {
1704
+ id: number;
1705
+ quantity: number;
1706
+ item_id: number;
1707
+ };
1708
+
1709
+ export type CaseGraphQL = {
1710
+ id: number;
1711
+ id_number: string;
1712
+ reference: string;
1713
+ serial_id: number;
1714
+ critical: boolean;
1715
+ date: string;
1716
+ client: PayeeGraphQL;
1717
+ closing_expected_at: string;
1718
+ contact_method_id: number;
1719
+ symptom: string;
1720
+ solution: string;
1721
+ warranty: boolean;
1722
+ courtesy: boolean;
1723
+ memo: string;
1724
+ closed: boolean;
1725
+ closed_at: string;
1726
+ seller_id: number;
1727
+ closer_id: number;
1728
+ client_id: number;
1729
+ case_supplies: CaseSupplyGraphQL[];
1730
+ case_invoices: CaseInvoiceGraphQL[];
1731
+ };
1732
+
1733
+ const getCasesByResponsibleId = (wheres: string[] = []) => {
1734
+ const additionalWheres = wheres.join(",");
1735
+ return `
1736
+ query getCasesByResponsibleId($responsible_id: Int) {
1737
+ cases(where: {responsible_id: {_eq: $responsible_id}${
1738
+ additionalWheres.length > 0 ? "," : ""
1739
+ }${additionalWheres}}, order_by: {id: desc}) {
1740
+ id
1741
+ id_number
1742
+ serial_id
1743
+ critical
1744
+ reference
1745
+ date
1746
+ closing_expected_at
1747
+ contact_method_id
1748
+ symptom
1749
+ solution
1750
+ memo
1751
+ closed
1752
+ closed_at
1753
+ seller_id
1754
+ closer_id
1755
+ client_id
1756
+ warranty
1757
+ courtesy
1758
+ client {
1759
+ name
1760
+ address_line_1
1761
+ }
1762
+ case_invoices {
1763
+ invoice {
1764
+ id
1765
+ paid
1766
+ }
1767
+ }
1768
+ case_supplies {
1769
+ id
1770
+ item_id
1771
+ }
1772
+ }
1773
+ }
1774
+ `;
1775
+ };
1776
+
1777
+ export default {
1778
+ getLast100Receptions,
1779
+ getPayees,
1780
+ getItems,
1781
+ getPurchaseOrder,
1782
+ getPurchaseOrdersBetweenDates,
1783
+ getAgencies,
1784
+ getWebAppRow,
1785
+ getPayeeCategoryById,
1786
+ getPayeeById,
1787
+ getSuperCategoryById,
1788
+ getItemCategoryById,
1789
+ getConsolidatesBetweenDates,
1790
+ getWebAppRowsByWebAppTableId,
1791
+ getPurchaseOrderByIdNumber,
1792
+ getItemsByCategory,
1793
+ getItemsBySuperCategory,
1794
+ getEmployeeProfile,
1795
+ getBundlesByItemCategoryId,
1796
+ getItemByName,
1797
+ getFormByName,
1798
+ getBundleByName,
1799
+ getPayeeCategoriesByNotesMatch,
1800
+ getPayeeCategories,
1801
+ getProviderCategories,
1802
+ getCurrencies,
1803
+ getSuggestedPrices,
1804
+ getPaymentTerms,
1805
+ getEmployeesByAgencyId,
1806
+ getInvoicesByAgencyId,
1807
+ getForms,
1808
+ getFormsByDocumentType,
1809
+ getInvoiceFormSubmissionsByAgencyId,
1810
+ getInvoiceFormSubmissionsByInvoiceId,
1811
+ getPaymentTermById,
1812
+ getProviders,
1813
+ getCasesByResponsibleId,
1814
+ getMyCaseFormSubmissions,
1815
+ getClientCategories,
1816
+ getShipmentsByToAgencyLast100,
1817
+ getLotsByName,
1818
+ getFormSubmissionById,
1819
+ getLastInvoiceFormSubmission,
1820
+ getLotStocksByAgencyId,
1821
+ getShipments,
1822
+ };