@ikonintegration/module-contractor-api 1.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.
Files changed (2) hide show
  1. package/Api.ts +1969 -0
  2. package/package.json +16 -0
package/Api.ts ADDED
@@ -0,0 +1,1969 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /*
4
+ * ---------------------------------------------------------------
5
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
6
+ * ## ##
7
+ * ## AUTHOR: acacode ##
8
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
9
+ * ---------------------------------------------------------------
10
+ */
11
+
12
+ /** Default API Error response */
13
+ export interface ErrorResponse {
14
+ /** Error message */
15
+ err: string
16
+ /** Error code */
17
+ errCode: string
18
+ }
19
+
20
+ export interface InputN1Jw8Pelom {
21
+ /**
22
+ * Unique code identifier (1-50 alphanumeric characters)
23
+ * @minLength 1
24
+ * @maxLength 50
25
+ * @pattern ^[a-zA-Z0-9]+$
26
+ * @example "ACC001"
27
+ */
28
+ codeID: string
29
+ /**
30
+ * ID of the department this code belongs to
31
+ * @minLength 1
32
+ * @example "DEPT-2a1b3c4d5e6f"
33
+ */
34
+ departmentID: string
35
+ /**
36
+ * Description of the code (1-255 characters)
37
+ * @minLength 1
38
+ * @maxLength 255
39
+ * @example "Consulting services for safety audits"
40
+ */
41
+ description: string
42
+ }
43
+
44
+ export interface InputBpxvmw183C {
45
+ /**
46
+ * Updated description of the code (1-255 characters)
47
+ * @minLength 1
48
+ * @maxLength 255
49
+ * @example "Updated consulting services description"
50
+ */
51
+ description: string
52
+ }
53
+
54
+ export interface InputU6Bgra15Uy {
55
+ /**
56
+ * Full name of the contractor
57
+ * @minLength 1
58
+ * @example "Jane Smith"
59
+ */
60
+ name: string
61
+ /**
62
+ * Email address of the contractor (must be unique)
63
+ * @format email
64
+ * @example "jane.smith@example.com"
65
+ */
66
+ email: string
67
+ /**
68
+ * Phone number of the contractor
69
+ * @example "+1-604-555-1234"
70
+ */
71
+ phone?: string
72
+ /**
73
+ * List of hourly job rates (at least one required)
74
+ * @minItems 1
75
+ */
76
+ jobRates: {
77
+ /**
78
+ * Description of the job rate
79
+ * @minLength 1
80
+ * @example "Senior Instructor"
81
+ */
82
+ description: string
83
+ /**
84
+ * Hourly rate value in dollars (must be greater than zero)
85
+ * @min 0
86
+ * @exclusiveMin true
87
+ * @example 75
88
+ */
89
+ hourlyValue: number
90
+ }[]
91
+ }
92
+
93
+ export interface InputGr9Lchaxob {
94
+ /**
95
+ * Maximum nightly accommodation amount (positive, up to two decimal places)
96
+ * @min 0
97
+ * @exclusiveMin true
98
+ * @example 150
99
+ */
100
+ accommodationNightly?: number
101
+ /**
102
+ * Maximum breakfast meal amount (positive, up to two decimal places)
103
+ * @min 0
104
+ * @exclusiveMin true
105
+ * @example 20
106
+ */
107
+ mealBreakfast?: number
108
+ /**
109
+ * Maximum lunch meal amount (positive, up to two decimal places)
110
+ * @min 0
111
+ * @exclusiveMin true
112
+ * @example 25
113
+ */
114
+ mealLunch?: number
115
+ /**
116
+ * Maximum dinner meal amount (positive, up to two decimal places)
117
+ * @min 0
118
+ * @exclusiveMin true
119
+ * @example 40
120
+ */
121
+ mealDinner?: number
122
+ /**
123
+ * Maximum transportation amount (positive, up to two decimal places)
124
+ * @min 0
125
+ * @exclusiveMin true
126
+ * @example 100
127
+ */
128
+ transportationMax?: number
129
+ }
130
+
131
+ export interface InputHifqzcj5Po {
132
+ /**
133
+ * The contractor's local status. Set to 'active' to enable or 'disabled' to disable the account.
134
+ * @example "active"
135
+ */
136
+ status: InputHifqzcj5PoStatusEnum
137
+ }
138
+
139
+ export interface Input8I2W1Iyb6R {
140
+ /**
141
+ * Name of the department (1-150 characters)
142
+ * @minLength 1
143
+ * @maxLength 150
144
+ * @example "Engineering"
145
+ */
146
+ name: string
147
+ /**
148
+ * Contact email addresses for the department (1-10 valid emails)
149
+ * @maxItems 10
150
+ * @minItems 1
151
+ * @example ["eng-lead@bccsa.ca","eng-admin@bccsa.ca"]
152
+ */
153
+ contactEmails: string[]
154
+ }
155
+
156
+ export interface InputF5Mrt7Alvxl {
157
+ /**
158
+ * Updated name of the department (1-150 characters)
159
+ * @minLength 1
160
+ * @maxLength 150
161
+ * @example "Engineering Services"
162
+ */
163
+ name?: string
164
+ /**
165
+ * Updated contact email addresses for the department (1-10 valid emails)
166
+ * @maxItems 10
167
+ * @minItems 1
168
+ * @example ["eng-lead@bccsa.ca"]
169
+ */
170
+ contactEmails?: string[]
171
+ }
172
+
173
+ export interface Input3Y606Jegxm {
174
+ /**
175
+ * The user ID of the administrator to associate with the department
176
+ * @minLength 1
177
+ * @example "USR-2RvYIFNJR3CrJHKO0NqgGa1EwcS"
178
+ */
179
+ userID: string
180
+ }
181
+
182
+ export interface InputUivsl0J1Jwg {
183
+ /**
184
+ * Mileage rate in dollars per kilometre (positive, up to two decimal places)
185
+ * @min 0
186
+ * @exclusiveMin true
187
+ * @example 0.65
188
+ */
189
+ mileageRate: number
190
+ }
191
+
192
+ export interface Input0L32Mfaw1Ji {
193
+ /**
194
+ * Maximum nightly accommodation amount (positive, up to two decimal places)
195
+ * @min 0
196
+ * @exclusiveMin true
197
+ * @example 150
198
+ */
199
+ accommodationNightly: number
200
+ /**
201
+ * Maximum breakfast meal amount (positive, up to two decimal places)
202
+ * @min 0
203
+ * @exclusiveMin true
204
+ * @example 20
205
+ */
206
+ mealBreakfast: number
207
+ /**
208
+ * Maximum lunch meal amount (positive, up to two decimal places)
209
+ * @min 0
210
+ * @exclusiveMin true
211
+ * @example 25
212
+ */
213
+ mealLunch: number
214
+ /**
215
+ * Maximum dinner meal amount (positive, up to two decimal places)
216
+ * @min 0
217
+ * @exclusiveMin true
218
+ * @example 40
219
+ */
220
+ mealDinner: number
221
+ /**
222
+ * Maximum transportation amount (positive, up to two decimal places)
223
+ * @min 0
224
+ * @exclusiveMin true
225
+ * @example 100
226
+ */
227
+ transportationMax: number
228
+ }
229
+
230
+ export interface Input4Ylvvi4Qiv {
231
+ /**
232
+ * Number of days between reminder emails (positive integer)
233
+ * @min 0
234
+ * @exclusiveMin true
235
+ * @example 7
236
+ */
237
+ reminderIntervalDays: number
238
+ }
239
+
240
+ /** Create a new draft submission */
241
+ export interface Input1E4Ziwqngl {
242
+ /**
243
+ * Department ID
244
+ * @minLength 1
245
+ * @example "DEPT-abc123"
246
+ */
247
+ departmentID: string
248
+ /**
249
+ * Submission description
250
+ * @minLength 1
251
+ * @example "Monthly consulting invoice"
252
+ */
253
+ description: string
254
+ /**
255
+ * Submission date (epoch ms)
256
+ * @example 1700000000000
257
+ */
258
+ date: number
259
+ /**
260
+ * Submission type
261
+ * @example "Submission"
262
+ */
263
+ type: Input1E4ZiwqnglTypeEnum
264
+ /**
265
+ * Invoice number or "N/A"
266
+ * @minLength 1
267
+ * @example "INV-2024-001"
268
+ */
269
+ invoiceNumber: string
270
+ /**
271
+ * Contract number or "N/A"
272
+ * @minLength 1
273
+ * @example "CNTR-001"
274
+ */
275
+ contractNumber: string
276
+ /**
277
+ * PO number (optional)
278
+ * @example "PO-5678"
279
+ */
280
+ poNumber?: string
281
+ /**
282
+ * Service invoice line items
283
+ * @default []
284
+ */
285
+ invoices?: {
286
+ /**
287
+ * Invoice description
288
+ * @minLength 1
289
+ * @example "Consulting services"
290
+ */
291
+ description: string
292
+ /**
293
+ * Time worked in hours
294
+ * @min 0
295
+ * @exclusiveMin true
296
+ * @example 8
297
+ */
298
+ timeInHours: number
299
+ /**
300
+ * Hourly rate from contractor profile
301
+ * @min 0
302
+ * @exclusiveMin true
303
+ * @example 75
304
+ */
305
+ hourlyRate: number
306
+ /**
307
+ * Tax amount
308
+ * @min 0
309
+ * @default 0
310
+ * @example 30
311
+ */
312
+ taxAmount?: number
313
+ /**
314
+ * PO number for this invoice
315
+ * @example "PO-1234"
316
+ */
317
+ poNumber?: string
318
+ /**
319
+ * File attachments for this invoice
320
+ * @default []
321
+ */
322
+ attachments?: {
323
+ /**
324
+ * Unique file identifier
325
+ * @example "file-abc123"
326
+ */
327
+ fileID: string
328
+ /**
329
+ * Original file name
330
+ * @example "invoice.pdf"
331
+ */
332
+ fileName: string
333
+ /**
334
+ * MIME content type
335
+ * @example "application/pdf"
336
+ */
337
+ contentType: string
338
+ /**
339
+ * File size in bytes
340
+ * @example 102400
341
+ */
342
+ size: number
343
+ /**
344
+ * Upload timestamp (epoch ms)
345
+ * @example 1700000000000
346
+ */
347
+ uploadedOn: number
348
+ }[]
349
+ }[]
350
+ /**
351
+ * Expense reimbursement line items
352
+ * @default []
353
+ */
354
+ expenses?: {
355
+ /**
356
+ * Expense description
357
+ * @minLength 1
358
+ * @example "Hotel stay"
359
+ */
360
+ description: string
361
+ /**
362
+ * Expense date (epoch ms)
363
+ * @example 1700000000000
364
+ */
365
+ date: number
366
+ /**
367
+ * Expense type
368
+ * @example "Accommodation"
369
+ */
370
+ type: Input1E4ZiwqnglTypeEnum1
371
+ /**
372
+ * Pre-tax amount
373
+ * @min 0
374
+ * @example 150
375
+ */
376
+ preTaxAmount: number
377
+ /**
378
+ * Tax amount
379
+ * @min 0
380
+ * @default 0
381
+ * @example 7.5
382
+ */
383
+ taxAmount?: number
384
+ /**
385
+ * Number of nights (Accommodation)
386
+ * @min 0
387
+ * @exclusiveMin true
388
+ * @example 2
389
+ */
390
+ nights?: number
391
+ /**
392
+ * Meal type (Meal expenses)
393
+ * @example "Lunch"
394
+ */
395
+ mealType?: Input1E4ZiwqnglMealTypeEnum
396
+ /**
397
+ * Number of kilometres (Mileage)
398
+ * @min 0
399
+ * @exclusiveMin true
400
+ * @example 100
401
+ */
402
+ numKilometres?: number
403
+ /**
404
+ * Transportation type (Transportation expenses)
405
+ * @example "Taxi"
406
+ */
407
+ transportationType?: Input1E4ZiwqnglTransportationTypeEnum
408
+ /**
409
+ * File attachments for this expense
410
+ * @default []
411
+ */
412
+ attachments?: {
413
+ /**
414
+ * Unique file identifier
415
+ * @example "file-abc123"
416
+ */
417
+ fileID: string
418
+ /**
419
+ * Original file name
420
+ * @example "invoice.pdf"
421
+ */
422
+ fileName: string
423
+ /**
424
+ * MIME content type
425
+ * @example "application/pdf"
426
+ */
427
+ contentType: string
428
+ /**
429
+ * File size in bytes
430
+ * @example 102400
431
+ */
432
+ size: number
433
+ /**
434
+ * Upload timestamp (epoch ms)
435
+ * @example 1700000000000
436
+ */
437
+ uploadedOn: number
438
+ }[]
439
+ }[]
440
+ }
441
+
442
+ /** Update an existing submission */
443
+ export interface InputD6Uic9Wivl {
444
+ /**
445
+ * Submission description
446
+ * @minLength 1
447
+ */
448
+ description?: string
449
+ /** Submission date (epoch ms) */
450
+ date?: number
451
+ /** Submission type */
452
+ type?: InputD6Uic9WivlTypeEnum
453
+ /**
454
+ * Invoice number or "N/A"
455
+ * @minLength 1
456
+ */
457
+ invoiceNumber?: string
458
+ /**
459
+ * Contract number or "N/A"
460
+ * @minLength 1
461
+ */
462
+ contractNumber?: string
463
+ /** PO number (optional) */
464
+ poNumber?: string
465
+ /**
466
+ * Department ID
467
+ * @minLength 1
468
+ */
469
+ departmentID?: string
470
+ /** Updated service invoice line items */
471
+ invoices?: {
472
+ /**
473
+ * Invoice description
474
+ * @minLength 1
475
+ * @example "Consulting services"
476
+ */
477
+ description: string
478
+ /**
479
+ * Time worked in hours
480
+ * @min 0
481
+ * @exclusiveMin true
482
+ * @example 8
483
+ */
484
+ timeInHours: number
485
+ /**
486
+ * Hourly rate from contractor profile
487
+ * @min 0
488
+ * @exclusiveMin true
489
+ * @example 75
490
+ */
491
+ hourlyRate: number
492
+ /**
493
+ * Tax amount
494
+ * @min 0
495
+ * @default 0
496
+ * @example 30
497
+ */
498
+ taxAmount?: number
499
+ /**
500
+ * PO number for this invoice
501
+ * @example "PO-1234"
502
+ */
503
+ poNumber?: string
504
+ /**
505
+ * File attachments for this invoice
506
+ * @default []
507
+ */
508
+ attachments?: {
509
+ /**
510
+ * Unique file identifier
511
+ * @example "file-abc123"
512
+ */
513
+ fileID: string
514
+ /**
515
+ * Original file name
516
+ * @example "invoice.pdf"
517
+ */
518
+ fileName: string
519
+ /**
520
+ * MIME content type
521
+ * @example "application/pdf"
522
+ */
523
+ contentType: string
524
+ /**
525
+ * File size in bytes
526
+ * @example 102400
527
+ */
528
+ size: number
529
+ /**
530
+ * Upload timestamp (epoch ms)
531
+ * @example 1700000000000
532
+ */
533
+ uploadedOn: number
534
+ }[]
535
+ }[]
536
+ /** Updated expense reimbursement line items */
537
+ expenses?: {
538
+ /**
539
+ * Expense description
540
+ * @minLength 1
541
+ * @example "Hotel stay"
542
+ */
543
+ description: string
544
+ /**
545
+ * Expense date (epoch ms)
546
+ * @example 1700000000000
547
+ */
548
+ date: number
549
+ /**
550
+ * Expense type
551
+ * @example "Accommodation"
552
+ */
553
+ type: InputD6Uic9WivlTypeEnum1
554
+ /**
555
+ * Pre-tax amount
556
+ * @min 0
557
+ * @example 150
558
+ */
559
+ preTaxAmount: number
560
+ /**
561
+ * Tax amount
562
+ * @min 0
563
+ * @default 0
564
+ * @example 7.5
565
+ */
566
+ taxAmount?: number
567
+ /**
568
+ * Number of nights (Accommodation)
569
+ * @min 0
570
+ * @exclusiveMin true
571
+ * @example 2
572
+ */
573
+ nights?: number
574
+ /**
575
+ * Meal type (Meal expenses)
576
+ * @example "Lunch"
577
+ */
578
+ mealType?: InputD6Uic9WivlMealTypeEnum
579
+ /**
580
+ * Number of kilometres (Mileage)
581
+ * @min 0
582
+ * @exclusiveMin true
583
+ * @example 100
584
+ */
585
+ numKilometres?: number
586
+ /**
587
+ * Transportation type (Transportation expenses)
588
+ * @example "Taxi"
589
+ */
590
+ transportationType?: InputD6Uic9WivlTransportationTypeEnum
591
+ /**
592
+ * File attachments for this expense
593
+ * @default []
594
+ */
595
+ attachments?: {
596
+ /**
597
+ * Unique file identifier
598
+ * @example "file-abc123"
599
+ */
600
+ fileID: string
601
+ /**
602
+ * Original file name
603
+ * @example "invoice.pdf"
604
+ */
605
+ fileName: string
606
+ /**
607
+ * MIME content type
608
+ * @example "application/pdf"
609
+ */
610
+ contentType: string
611
+ /**
612
+ * File size in bytes
613
+ * @example 102400
614
+ */
615
+ size: number
616
+ /**
617
+ * Upload timestamp (epoch ms)
618
+ * @example 1700000000000
619
+ */
620
+ uploadedOn: number
621
+ }[]
622
+ }[]
623
+ }
624
+
625
+ export interface InputQqc4Xl7Nr3 {
626
+ /** Array of codes to assign to the submission sections */
627
+ codes: {
628
+ /** The section to assign the code to */
629
+ section: InputQqc4Xl7Nr3SectionEnum
630
+ /**
631
+ * The code ID to assign
632
+ * @minLength 1
633
+ * @example "CODE-abc123"
634
+ */
635
+ codeID: string
636
+ /**
637
+ * Optional note for this code assignment (max 500 chars)
638
+ * @maxLength 500
639
+ * @example "Consulting fees"
640
+ */
641
+ note?: string
642
+ }[]
643
+ }
644
+
645
+ /** Request a presigned upload URL for a file attachment */
646
+ export interface InputNiqys3Oiwd {
647
+ /**
648
+ * ID of the invoice or expense line item
649
+ * @minLength 1
650
+ * @example "INV-abc123"
651
+ */
652
+ lineItemID: string
653
+ /**
654
+ * MIME content type of the file
655
+ * @minLength 1
656
+ * @example "application/pdf"
657
+ */
658
+ contentType: string
659
+ /**
660
+ * File size in bytes
661
+ * @min 0
662
+ * @exclusiveMin true
663
+ * @example 102400
664
+ */
665
+ contentLength: number
666
+ /**
667
+ * Original file name
668
+ * @minLength 1
669
+ * @example "invoice.pdf"
670
+ */
671
+ fileName: string
672
+ }
673
+
674
+ export interface Input9Zqht4Idck {
675
+ /**
676
+ * PO number to set on the submission
677
+ * @example "PO-5678"
678
+ */
679
+ poNumber: string
680
+ }
681
+
682
+ export interface InputRx3Tqfjstsk {
683
+ /**
684
+ * The ID of the new department to reassign to
685
+ * @minLength 1
686
+ * @example "DEPT-abc123"
687
+ */
688
+ departmentID: string
689
+ }
690
+
691
+ export interface InputVl61Mvkana {
692
+ /**
693
+ * Google reCAPTCHA verification token
694
+ * @example "03AGdBq26..."
695
+ */
696
+ recaptchaToken: string
697
+ /**
698
+ * Guest contractor name
699
+ * @minLength 1
700
+ * @example "Jane Smith"
701
+ */
702
+ name: string
703
+ /**
704
+ * Guest contractor email address
705
+ * @format email
706
+ * @example "jane@example.com"
707
+ */
708
+ email: string
709
+ /**
710
+ * Guest contractor phone number
711
+ * @minLength 1
712
+ * @example "604-555-0100"
713
+ */
714
+ phone: string
715
+ /**
716
+ * Invoice date (timestamp)
717
+ * @example 1700000000000
718
+ */
719
+ date: number
720
+ /**
721
+ * Invoice description
722
+ * @minLength 1
723
+ * @example "Safety consulting services"
724
+ */
725
+ description: string
726
+ /**
727
+ * Department to assign the submission to
728
+ * @minLength 1
729
+ * @example "DEPT-abc123"
730
+ */
731
+ departmentID: string
732
+ /**
733
+ * Invoice amount in dollars (pre-tax)
734
+ * @min 0
735
+ * @exclusiveMin true
736
+ * @example 500
737
+ */
738
+ amount: number
739
+ /**
740
+ * Tax amount in dollars
741
+ * @min 0
742
+ * @default 0
743
+ * @example 25
744
+ */
745
+ taxAmount?: number
746
+ /** Single PDF attachment (max 1 MB) */
747
+ attachment: {
748
+ /**
749
+ * Unique file identifier
750
+ * @example "file-abc123"
751
+ */
752
+ fileID: string
753
+ /**
754
+ * Original file name
755
+ * @example "invoice.pdf"
756
+ */
757
+ fileName: string
758
+ /**
759
+ * Content type (must be application/pdf for guest)
760
+ * @example "application/pdf"
761
+ */
762
+ contentType: InputVl61MvkanaContentTypeEnum
763
+ /**
764
+ * File size in bytes (max 1 MB)
765
+ * @max 1048576
766
+ * @example 51200
767
+ */
768
+ size: number
769
+ /**
770
+ * Upload timestamp
771
+ * @example 1700000000000
772
+ */
773
+ uploadedOn: number
774
+ }
775
+ }
776
+
777
+ /**
778
+ * The contractor's local status. Set to 'active' to enable or 'disabled' to disable the account.
779
+ * @example "active"
780
+ */
781
+ export enum InputHifqzcj5PoStatusEnum {
782
+ Active = 'active',
783
+ Disabled = 'disabled',
784
+ }
785
+
786
+ /**
787
+ * Submission type
788
+ * @example "Submission"
789
+ */
790
+ export enum Input1E4ZiwqnglTypeEnum {
791
+ Submission = 'Submission',
792
+ Reimbursement = 'Reimbursement',
793
+ }
794
+
795
+ /**
796
+ * Expense type
797
+ * @example "Accommodation"
798
+ */
799
+ export enum Input1E4ZiwqnglTypeEnum1 {
800
+ Accommodation = 'Accommodation',
801
+ Meal = 'Meal',
802
+ Mileage = 'Mileage',
803
+ Transportation = 'Transportation',
804
+ Other = 'Other',
805
+ }
806
+
807
+ /**
808
+ * Meal type (Meal expenses)
809
+ * @example "Lunch"
810
+ */
811
+ export enum Input1E4ZiwqnglMealTypeEnum {
812
+ Breakfast = 'Breakfast',
813
+ Lunch = 'Lunch',
814
+ Dinner = 'Dinner',
815
+ }
816
+
817
+ /**
818
+ * Transportation type (Transportation expenses)
819
+ * @example "Taxi"
820
+ */
821
+ export enum Input1E4ZiwqnglTransportationTypeEnum {
822
+ AirTravel = 'Air travel',
823
+ Taxi = 'Taxi',
824
+ Ferry = 'Ferry',
825
+ Rental = 'Rental',
826
+ Other = 'Other',
827
+ }
828
+
829
+ /** Submission type */
830
+ export enum InputD6Uic9WivlTypeEnum {
831
+ Submission = 'Submission',
832
+ Reimbursement = 'Reimbursement',
833
+ }
834
+
835
+ /**
836
+ * Expense type
837
+ * @example "Accommodation"
838
+ */
839
+ export enum InputD6Uic9WivlTypeEnum1 {
840
+ Accommodation = 'Accommodation',
841
+ Meal = 'Meal',
842
+ Mileage = 'Mileage',
843
+ Transportation = 'Transportation',
844
+ Other = 'Other',
845
+ }
846
+
847
+ /**
848
+ * Meal type (Meal expenses)
849
+ * @example "Lunch"
850
+ */
851
+ export enum InputD6Uic9WivlMealTypeEnum {
852
+ Breakfast = 'Breakfast',
853
+ Lunch = 'Lunch',
854
+ Dinner = 'Dinner',
855
+ }
856
+
857
+ /**
858
+ * Transportation type (Transportation expenses)
859
+ * @example "Taxi"
860
+ */
861
+ export enum InputD6Uic9WivlTransportationTypeEnum {
862
+ AirTravel = 'Air travel',
863
+ Taxi = 'Taxi',
864
+ Ferry = 'Ferry',
865
+ Rental = 'Rental',
866
+ Other = 'Other',
867
+ }
868
+
869
+ /** The section to assign the code to */
870
+ export enum InputQqc4Xl7Nr3SectionEnum {
871
+ Service = 'Service',
872
+ Reimbursement = 'Reimbursement',
873
+ }
874
+
875
+ /**
876
+ * Content type (must be application/pdf for guest)
877
+ * @example "application/pdf"
878
+ */
879
+ export enum InputVl61MvkanaContentTypeEnum {
880
+ ApplicationPdf = 'application/pdf',
881
+ }
882
+
883
+ export type CreateCodeData = any
884
+
885
+ export type CreateCodeError = ErrorResponse
886
+
887
+ export type UpdateCodeData = any
888
+
889
+ export type UpdateCodeError = ErrorResponse
890
+
891
+ export type DeleteCodeData = any
892
+
893
+ export type DeleteCodeError = ErrorResponse
894
+
895
+ export type ListCodesData = any
896
+
897
+ export type ListCodesError = ErrorResponse
898
+
899
+ export type CreateContractorData = any
900
+
901
+ export type CreateContractorError = ErrorResponse
902
+
903
+ export type GetContractorData = any
904
+
905
+ export type GetContractorError = ErrorResponse
906
+
907
+ export type UpdateRatesData = any
908
+
909
+ export type UpdateRatesError = ErrorResponse
910
+
911
+ export type CreateResetPasswordData = any
912
+
913
+ export type CreateResetPasswordError = ErrorResponse
914
+
915
+ export type UpdateStatusData = any
916
+
917
+ export type UpdateStatusError = ErrorResponse
918
+
919
+ export interface ListContractorsParams {
920
+ /**
921
+ * Search term (minimum 2 characters)
922
+ * @minLength 2
923
+ * @example "john"
924
+ */
925
+ q: string
926
+ /**
927
+ * Search field type: name for begins_with match, email for exact match
928
+ * @example "name"
929
+ */
930
+ type: TypeEnum
931
+ }
932
+
933
+ /**
934
+ * Search field type: name for begins_with match, email for exact match
935
+ * @example "name"
936
+ */
937
+ export enum TypeEnum {
938
+ Name = 'name',
939
+ Email = 'email',
940
+ }
941
+
942
+ export type ListContractorsData = any
943
+
944
+ export type ListContractorsError = ErrorResponse
945
+
946
+ /**
947
+ * Search field type: name for begins_with match, email for exact match
948
+ * @example "name"
949
+ */
950
+ export enum ListContractorsParams1TypeEnum {
951
+ Name = 'name',
952
+ Email = 'email',
953
+ }
954
+
955
+ export type CreateDepartmentData = any
956
+
957
+ export type CreateDepartmentError = ErrorResponse
958
+
959
+ export type UpdateDepartmentData = any
960
+
961
+ export type UpdateDepartmentError = ErrorResponse
962
+
963
+ export type DeleteDepartmentData = any
964
+
965
+ export type DeleteDepartmentError = ErrorResponse
966
+
967
+ export type CreateAdminData = any
968
+
969
+ export type CreateAdminError = ErrorResponse
970
+
971
+ export type DeleteAdminData = any
972
+
973
+ export type DeleteAdminError = ErrorResponse
974
+
975
+ export type ListDepartmentsData = any
976
+
977
+ export type ListDepartmentsError = ErrorResponse
978
+
979
+ export type ListSettingsData = any
980
+
981
+ export type ListSettingsError = ErrorResponse
982
+
983
+ export type UpdateRatesResult = any
984
+
985
+ export type UpdateRatesFail = ErrorResponse
986
+
987
+ export type UpdateMaximumsData = any
988
+
989
+ export type UpdateMaximumsError = ErrorResponse
990
+
991
+ export type UpdateRemindersData = any
992
+
993
+ export type UpdateRemindersError = ErrorResponse
994
+
995
+ export type CreateSubmissionData = any
996
+
997
+ export type CreateSubmissionError = ErrorResponse
998
+
999
+ export type GetSubmissionData = any
1000
+
1001
+ export type GetSubmissionError = ErrorResponse
1002
+
1003
+ export type UpdateSubmissionData = any
1004
+
1005
+ export type UpdateSubmissionError = ErrorResponse
1006
+
1007
+ export type DeleteSubmissionData = any
1008
+
1009
+ export type DeleteSubmissionError = ErrorResponse
1010
+
1011
+ export type CreateApproveData = any
1012
+
1013
+ export type CreateApproveError = ErrorResponse
1014
+
1015
+ export type UpdateCodesData = any
1016
+
1017
+ export type UpdateCodesError = ErrorResponse
1018
+
1019
+ export type CreateFileData = any
1020
+
1021
+ export type CreateFileError = ErrorResponse
1022
+
1023
+ export type GetFileData = any
1024
+
1025
+ export type GetFileError = ErrorResponse
1026
+
1027
+ export type CreatePaidData = any
1028
+
1029
+ export type CreatePaidError = ErrorResponse
1030
+
1031
+ export type GetPdfData = any
1032
+
1033
+ export type GetPdfError = ErrorResponse
1034
+
1035
+ export type PutSubmissionData = any
1036
+
1037
+ export type PutSubmissionError = ErrorResponse
1038
+
1039
+ export type CreateReassignData = any
1040
+
1041
+ export type CreateReassignError = ErrorResponse
1042
+
1043
+ export type CreateRejectData = any
1044
+
1045
+ export type CreateRejectError = ErrorResponse
1046
+
1047
+ export type CreateSubmitData = any
1048
+
1049
+ export type CreateSubmitError = ErrorResponse
1050
+
1051
+ export type CreateGuestData = any
1052
+
1053
+ export type CreateGuestError = ErrorResponse
1054
+
1055
+ export interface ListSubmissionsParams {
1056
+ /**
1057
+ * Filter by submission status
1058
+ * @example "Submitted"
1059
+ */
1060
+ status?: StatusEnum
1061
+ /**
1062
+ * Filter by department ID
1063
+ * @example "DEPT-abc123"
1064
+ */
1065
+ departmentID?: string
1066
+ /**
1067
+ * Filter by contractor user ID
1068
+ * @example "USR-xyz789"
1069
+ */
1070
+ contractorID?: string
1071
+ /**
1072
+ * Filter by submission type
1073
+ * @example "Submission"
1074
+ */
1075
+ type?: TypeEnum1
1076
+ /**
1077
+ * Filter from date (epoch ms)
1078
+ * @example 1700000000000
1079
+ */
1080
+ fromDate?: number | null
1081
+ /**
1082
+ * Filter to date (epoch ms)
1083
+ * @example 1710000000000
1084
+ */
1085
+ toDate?: number | null
1086
+ /** Pagination cursor from previous response */
1087
+ cursor?: string
1088
+ /**
1089
+ * Number of results per page (max 50)
1090
+ * @min 1
1091
+ * @max 50
1092
+ * @default 50
1093
+ * @example 50
1094
+ */
1095
+ limit?: number
1096
+ }
1097
+
1098
+ /**
1099
+ * Filter by submission status
1100
+ * @example "Submitted"
1101
+ */
1102
+ export enum StatusEnum {
1103
+ Draft = 'Draft',
1104
+ Submitted = 'Submitted',
1105
+ AdministratorApproved = 'Administrator_Approved',
1106
+ Rejected = 'Rejected',
1107
+ PaymentPending = 'Payment_Pending',
1108
+ Paid = 'Paid',
1109
+ }
1110
+
1111
+ /**
1112
+ * Filter by submission type
1113
+ * @example "Submission"
1114
+ */
1115
+ export enum TypeEnum1 {
1116
+ Submission = 'Submission',
1117
+ Reimbursement = 'Reimbursement',
1118
+ }
1119
+
1120
+ export type ListSubmissionsData = any
1121
+
1122
+ export type ListSubmissionsError = ErrorResponse
1123
+
1124
+ /**
1125
+ * Filter by submission status
1126
+ * @example "Submitted"
1127
+ */
1128
+ export enum ListSubmissionsParams1StatusEnum {
1129
+ Draft = 'Draft',
1130
+ Submitted = 'Submitted',
1131
+ AdministratorApproved = 'Administrator_Approved',
1132
+ Rejected = 'Rejected',
1133
+ PaymentPending = 'Payment_Pending',
1134
+ Paid = 'Paid',
1135
+ }
1136
+
1137
+ /**
1138
+ * Filter by submission type
1139
+ * @example "Submission"
1140
+ */
1141
+ export enum ListSubmissionsParams1TypeEnum {
1142
+ Submission = 'Submission',
1143
+ Reimbursement = 'Reimbursement',
1144
+ }
1145
+
1146
+ export type ListExportData = any
1147
+
1148
+ export type ListExportError = ErrorResponse
1149
+
1150
+ import type { AxiosInstance, AxiosRequestConfig, HeadersDefaults, ResponseType } from 'axios'
1151
+ import axios from 'axios'
1152
+
1153
+ export type QueryParamsType = Record<string | number, any>
1154
+
1155
+ export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'params' | 'url' | 'responseType'> {
1156
+ /** set parameter to `true` for call `securityWorker` for this request */
1157
+ secure?: boolean
1158
+ /** request path */
1159
+ path: string
1160
+ /** content type of request body */
1161
+ type?: ContentType
1162
+ /** query params */
1163
+ query?: QueryParamsType
1164
+ /** format of response (i.e. response.json() -> format: "json") */
1165
+ format?: ResponseType
1166
+ /** request body */
1167
+ body?: unknown
1168
+ }
1169
+
1170
+ export type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>
1171
+
1172
+ export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> {
1173
+ securityWorker?: (
1174
+ securityData: SecurityDataType | null
1175
+ ) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void
1176
+ secure?: boolean
1177
+ format?: ResponseType
1178
+ }
1179
+
1180
+ export enum ContentType {
1181
+ Json = 'application/json',
1182
+ FormData = 'multipart/form-data',
1183
+ UrlEncoded = 'application/x-www-form-urlencoded',
1184
+ Text = 'text/plain',
1185
+ }
1186
+
1187
+ export class HttpClient<SecurityDataType = unknown> {
1188
+ public instance: AxiosInstance
1189
+ private securityData: SecurityDataType | null = null
1190
+ private securityWorker?: ApiConfig<SecurityDataType>['securityWorker']
1191
+ private secure?: boolean
1192
+ private format?: ResponseType
1193
+
1194
+ constructor({ securityWorker, secure, format, ...axiosConfig }: ApiConfig<SecurityDataType> = {}) {
1195
+ this.instance = axios.create({ ...axiosConfig, baseURL: axiosConfig.baseURL || 'http://localhost:8080' })
1196
+ this.secure = secure
1197
+ this.format = format
1198
+ this.securityWorker = securityWorker
1199
+ }
1200
+
1201
+ public setSecurityData = (data: SecurityDataType | null) => {
1202
+ this.securityData = data
1203
+ }
1204
+
1205
+ protected mergeRequestParams(params1: AxiosRequestConfig, params2?: AxiosRequestConfig): AxiosRequestConfig {
1206
+ const method = params1.method || (params2 && params2.method)
1207
+
1208
+ return {
1209
+ ...this.instance.defaults,
1210
+ ...params1,
1211
+ ...(params2 || {}),
1212
+ headers: {
1213
+ ...((method && this.instance.defaults.headers[method.toLowerCase() as keyof HeadersDefaults]) || {}),
1214
+ ...(params1.headers || {}),
1215
+ ...((params2 && params2.headers) || {}),
1216
+ },
1217
+ }
1218
+ }
1219
+
1220
+ protected stringifyFormItem(formItem: unknown) {
1221
+ if (typeof formItem === 'object' && formItem !== null) {
1222
+ return JSON.stringify(formItem)
1223
+ } else {
1224
+ return `${formItem}`
1225
+ }
1226
+ }
1227
+
1228
+ protected createFormData(input: Record<string, unknown>): FormData {
1229
+ if (input instanceof FormData) {
1230
+ return input
1231
+ }
1232
+ return Object.keys(input || {}).reduce((formData, key) => {
1233
+ const property = input[key]
1234
+ const propertyContent: any[] = property instanceof Array ? property : [property]
1235
+
1236
+ for (const formItem of propertyContent) {
1237
+ const isFileType = formItem instanceof Blob || formItem instanceof File
1238
+ formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem))
1239
+ }
1240
+
1241
+ return formData
1242
+ }, new FormData())
1243
+ }
1244
+
1245
+ public request = async <T = any, _E = any>({
1246
+ secure,
1247
+ path,
1248
+ type,
1249
+ query,
1250
+ format,
1251
+ body,
1252
+ ...params
1253
+ }: FullRequestParams): Promise<T> => {
1254
+ const secureParams =
1255
+ ((typeof secure === 'boolean' ? secure : this.secure) &&
1256
+ this.securityWorker &&
1257
+ (await this.securityWorker(this.securityData))) ||
1258
+ {}
1259
+ const requestParams = this.mergeRequestParams(params, secureParams)
1260
+ const responseFormat = format || this.format || undefined
1261
+
1262
+ if (type === ContentType.FormData && body && body !== null && typeof body === 'object') {
1263
+ body = this.createFormData(body as Record<string, unknown>)
1264
+ }
1265
+
1266
+ if (type === ContentType.Text && body && body !== null && typeof body !== 'string') {
1267
+ body = JSON.stringify(body)
1268
+ }
1269
+
1270
+ return this.instance
1271
+ .request({
1272
+ ...requestParams,
1273
+ headers: {
1274
+ ...(requestParams.headers || {}),
1275
+ ...(type ? { 'Content-Type': type } : {}),
1276
+ },
1277
+ params: query,
1278
+ responseType: responseFormat,
1279
+ data: body,
1280
+ url: path,
1281
+ })
1282
+ .then(response => response.data)
1283
+ }
1284
+ }
1285
+
1286
+ /**
1287
+ * @title Contractor Module API
1288
+ * @version 1.0.0
1289
+ * @baseUrl http://localhost:8080
1290
+ * @contact Ikon Integration <ikon@ikonintegration.com> (http://example.com)
1291
+ */
1292
+ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
1293
+ code = {
1294
+ /**
1295
+ * @description Creates a new charging code associated with a department. Only Super Administrators can create codes.
1296
+ *
1297
+ * @tags Codes
1298
+ * @name CreateCode
1299
+ * @summary Create Code
1300
+ * @request POST:/code
1301
+ * @secure
1302
+ */
1303
+ createCode: (data: InputN1Jw8Pelom, params: RequestParams = {}) =>
1304
+ this.request<CreateCodeData, CreateCodeError>({
1305
+ path: `/code`,
1306
+ method: 'POST',
1307
+ body: data,
1308
+ secure: true,
1309
+ type: ContentType.Json,
1310
+ ...params,
1311
+ }),
1312
+
1313
+ /**
1314
+ * @description Updates an existing charging code description. Only Super Administrators can update codes.
1315
+ *
1316
+ * @tags Codes
1317
+ * @name UpdateCode
1318
+ * @summary Update Code
1319
+ * @request PUT:/code/{codeID}
1320
+ * @secure
1321
+ */
1322
+ updateCode: (codeId: string, data: InputBpxvmw183C, params: RequestParams = {}) =>
1323
+ this.request<UpdateCodeData, UpdateCodeError>({
1324
+ path: `/code/${codeId}`,
1325
+ method: 'PUT',
1326
+ body: data,
1327
+ secure: true,
1328
+ type: ContentType.Json,
1329
+ ...params,
1330
+ }),
1331
+
1332
+ /**
1333
+ * @description Deletes a charging code. Prevents deletion if the code is referenced by existing submissions. Only Super Administrators can delete codes.
1334
+ *
1335
+ * @tags Codes
1336
+ * @name DeleteCode
1337
+ * @summary Delete Code
1338
+ * @request DELETE:/code/{codeID}
1339
+ * @secure
1340
+ */
1341
+ deleteCode: (codeId: string, params: RequestParams = {}) =>
1342
+ this.request<DeleteCodeData, DeleteCodeError>({
1343
+ path: `/code/${codeId}`,
1344
+ method: 'DELETE',
1345
+ secure: true,
1346
+ ...params,
1347
+ }),
1348
+ }
1349
+ codes = {
1350
+ /**
1351
+ * @description Returns all codes or codes filtered by department. Administrators and above can list codes.
1352
+ *
1353
+ * @tags Codes
1354
+ * @name ListCodes
1355
+ * @summary List Codes
1356
+ * @request GET:/codes
1357
+ * @secure
1358
+ */
1359
+ listCodes: (params: RequestParams = {}) =>
1360
+ this.request<ListCodesData, ListCodesError>({
1361
+ path: `/codes`,
1362
+ method: 'GET',
1363
+ secure: true,
1364
+ ...params,
1365
+ }),
1366
+ }
1367
+ contractor = {
1368
+ /**
1369
+ * @description Creates a new contractor account. Requires a unique email address and at least one job rate. Only Administrators and Super Administrators can create contractor accounts.
1370
+ *
1371
+ * @tags Contractors
1372
+ * @name CreateContractor
1373
+ * @summary Create Contractor
1374
+ * @request POST:/contractor
1375
+ * @secure
1376
+ */
1377
+ createContractor: (data: InputU6Bgra15Uy, params: RequestParams = {}) =>
1378
+ this.request<CreateContractorData, CreateContractorError>({
1379
+ path: `/contractor`,
1380
+ method: 'POST',
1381
+ body: data,
1382
+ secure: true,
1383
+ type: ContentType.Json,
1384
+ ...params,
1385
+ }),
1386
+
1387
+ /**
1388
+ * @description View a contractor profile. Contractors can view their own profile (includes effective rates). Administrators can view any contractor profile.
1389
+ *
1390
+ * @tags Contractors
1391
+ * @name GetContractor
1392
+ * @summary View Contractor Profile
1393
+ * @request GET:/contractor/{userID}
1394
+ * @secure
1395
+ */
1396
+ getContractor: (userId: string, params: RequestParams = {}) =>
1397
+ this.request<GetContractorData, GetContractorError>({
1398
+ path: `/contractor/${userId}`,
1399
+ method: 'GET',
1400
+ secure: true,
1401
+ ...params,
1402
+ }),
1403
+
1404
+ /**
1405
+ * @description Sets user-specific rate maximums for a contractor. Only Administrators and Super Administrators can set rates. Values must be positive numbers with up to two decimal places.
1406
+ *
1407
+ * @tags Contractors
1408
+ * @name UpdateRates
1409
+ * @summary Set Contractor Rates
1410
+ * @request PUT:/contractor/{userID}/rates
1411
+ * @secure
1412
+ */
1413
+ updateRates: (userId: string, data: InputGr9Lchaxob, params: RequestParams = {}) =>
1414
+ this.request<UpdateRatesData, UpdateRatesError>({
1415
+ path: `/contractor/${userId}/rates`,
1416
+ method: 'PUT',
1417
+ body: data,
1418
+ secure: true,
1419
+ type: ContentType.Json,
1420
+ ...params,
1421
+ }),
1422
+
1423
+ /**
1424
+ * @description Triggers a password reset for the specified contractor. Only Administrators and Super Administrators can trigger password resets.
1425
+ *
1426
+ * @tags Contractors
1427
+ * @name CreateResetPassword
1428
+ * @summary Reset Contractor Password
1429
+ * @request POST:/contractor/{userID}/reset-password
1430
+ * @secure
1431
+ */
1432
+ createResetPassword: (userId: string, params: RequestParams = {}) =>
1433
+ this.request<CreateResetPasswordData, CreateResetPasswordError>({
1434
+ path: `/contractor/${userId}/reset-password`,
1435
+ method: 'POST',
1436
+ secure: true,
1437
+ ...params,
1438
+ }),
1439
+
1440
+ /**
1441
+ * @description Sets a contractor's local status to active or disabled. Disabling prevents all API access while preserving the IDM account. Only Administrators and Super Administrators can toggle status.
1442
+ *
1443
+ * @tags Contractors
1444
+ * @name UpdateStatus
1445
+ * @summary Enable/Disable Contractor
1446
+ * @request PUT:/contractor/{userID}/status
1447
+ * @secure
1448
+ */
1449
+ updateStatus: (userId: string, data: InputHifqzcj5Po, params: RequestParams = {}) =>
1450
+ this.request<UpdateStatusData, UpdateStatusError>({
1451
+ path: `/contractor/${userId}/status`,
1452
+ method: 'PUT',
1453
+ body: data,
1454
+ secure: true,
1455
+ type: ContentType.Json,
1456
+ ...params,
1457
+ }),
1458
+ }
1459
+ contractors = {
1460
+ /**
1461
+ * @description Search contractors by name (partial match) or email (exact match). Minimum 2 characters required.
1462
+ *
1463
+ * @tags Contractors
1464
+ * @name ListContractors
1465
+ * @summary Search Contractors
1466
+ * @request GET:/contractors
1467
+ * @secure
1468
+ */
1469
+ listContractors: (query: ListContractorsParams, params: RequestParams = {}) =>
1470
+ this.request<ListContractorsData, ListContractorsError>({
1471
+ path: `/contractors`,
1472
+ method: 'GET',
1473
+ query: query,
1474
+ secure: true,
1475
+ ...params,
1476
+ }),
1477
+ }
1478
+ department = {
1479
+ /**
1480
+ * @description Creates a new department. Requires a name (1-150 chars) and contact emails (max 10). SYSADMIN only.
1481
+ *
1482
+ * @tags Departments
1483
+ * @name CreateDepartment
1484
+ * @summary Create Department
1485
+ * @request POST:/department
1486
+ * @secure
1487
+ */
1488
+ createDepartment: (data: Input8I2W1Iyb6R, params: RequestParams = {}) =>
1489
+ this.request<CreateDepartmentData, CreateDepartmentError>({
1490
+ path: `/department`,
1491
+ method: 'POST',
1492
+ body: data,
1493
+ secure: true,
1494
+ type: ContentType.Json,
1495
+ ...params,
1496
+ }),
1497
+
1498
+ /**
1499
+ * @description Updates an existing department name and/or contact emails. SYSADMIN only.
1500
+ *
1501
+ * @tags Departments
1502
+ * @name UpdateDepartment
1503
+ * @summary Update Department
1504
+ * @request PUT:/department/{departmentID}
1505
+ * @secure
1506
+ */
1507
+ updateDepartment: (departmentId: string, data: InputF5Mrt7Alvxl, params: RequestParams = {}) =>
1508
+ this.request<UpdateDepartmentData, UpdateDepartmentError>({
1509
+ path: `/department/${departmentId}`,
1510
+ method: 'PUT',
1511
+ body: data,
1512
+ secure: true,
1513
+ type: ContentType.Json,
1514
+ ...params,
1515
+ }),
1516
+
1517
+ /**
1518
+ * @description Deletes a department. Prevents deletion if department has active codes or associated administrators. SYSADMIN only.
1519
+ *
1520
+ * @tags Departments
1521
+ * @name DeleteDepartment
1522
+ * @summary Delete Department
1523
+ * @request DELETE:/department/{departmentID}
1524
+ * @secure
1525
+ */
1526
+ deleteDepartment: (departmentId: string, params: RequestParams = {}) =>
1527
+ this.request<DeleteDepartmentData, DeleteDepartmentError>({
1528
+ path: `/department/${departmentId}`,
1529
+ method: 'DELETE',
1530
+ secure: true,
1531
+ ...params,
1532
+ }),
1533
+
1534
+ /**
1535
+ * @description Associates an administrator with a department. Each administrator can only belong to one department. SYSADMIN only.
1536
+ *
1537
+ * @tags Departments
1538
+ * @name CreateAdmin
1539
+ * @summary Associate Admin with Department
1540
+ * @request POST:/department/{departmentID}/admin
1541
+ * @secure
1542
+ */
1543
+ createAdmin: (departmentId: string, data: Input3Y606Jegxm, params: RequestParams = {}) =>
1544
+ this.request<CreateAdminData, CreateAdminError>({
1545
+ path: `/department/${departmentId}/admin`,
1546
+ method: 'POST',
1547
+ body: data,
1548
+ secure: true,
1549
+ type: ContentType.Json,
1550
+ ...params,
1551
+ }),
1552
+
1553
+ /**
1554
+ * @description Removes an administrator association from a department. SYSADMIN only.
1555
+ *
1556
+ * @tags Departments
1557
+ * @name DeleteAdmin
1558
+ * @summary Remove Admin from Department
1559
+ * @request DELETE:/department/{departmentID}/admin/{userID}
1560
+ * @secure
1561
+ */
1562
+ deleteAdmin: (departmentId: string, userId: string, params: RequestParams = {}) =>
1563
+ this.request<DeleteAdminData, DeleteAdminError>({
1564
+ path: `/department/${departmentId}/admin/${userId}`,
1565
+ method: 'DELETE',
1566
+ secure: true,
1567
+ ...params,
1568
+ }),
1569
+ }
1570
+ departments = {
1571
+ /**
1572
+ * @description Returns all departments. Available to ADMIN and SYSADMIN users.
1573
+ *
1574
+ * @tags Departments
1575
+ * @name ListDepartments
1576
+ * @summary List All Departments
1577
+ * @request GET:/departments
1578
+ * @secure
1579
+ */
1580
+ listDepartments: (params: RequestParams = {}) =>
1581
+ this.request<ListDepartmentsData, ListDepartmentsError>({
1582
+ path: `/departments`,
1583
+ method: 'GET',
1584
+ secure: true,
1585
+ ...params,
1586
+ }),
1587
+ }
1588
+ settings = {
1589
+ /**
1590
+ * @description Retrieves system settings. Administrators have read-only access. Super Administrators have full access.
1591
+ *
1592
+ * @tags Settings
1593
+ * @name ListSettings
1594
+ * @summary Get System Settings
1595
+ * @request GET:/settings
1596
+ * @secure
1597
+ */
1598
+ listSettings: (params: RequestParams = {}) =>
1599
+ this.request<ListSettingsData, ListSettingsError>({
1600
+ path: `/settings`,
1601
+ method: 'GET',
1602
+ secure: true,
1603
+ ...params,
1604
+ }),
1605
+
1606
+ /**
1607
+ * @description Updates the system-wide mileage rate. Only Super Administrators can modify system settings.
1608
+ *
1609
+ * @tags Settings
1610
+ * @name UpdateRates
1611
+ * @summary Update Mileage Rate
1612
+ * @request PUT:/settings/rates
1613
+ * @secure
1614
+ */
1615
+ updateRates: (data: InputUivsl0J1Jwg, params: RequestParams = {}) =>
1616
+ this.request<UpdateRatesResult, UpdateRatesFail>({
1617
+ path: `/settings/rates`,
1618
+ method: 'PUT',
1619
+ body: data,
1620
+ secure: true,
1621
+ type: ContentType.Json,
1622
+ ...params,
1623
+ }),
1624
+
1625
+ /**
1626
+ * @description Updates all system-wide expense maximums (accommodation, meals, transportation). Only Super Administrators can modify system settings.
1627
+ *
1628
+ * @tags Settings
1629
+ * @name UpdateMaximums
1630
+ * @summary Update Expense Maximums
1631
+ * @request PUT:/settings/maximums
1632
+ * @secure
1633
+ */
1634
+ updateMaximums: (data: Input0L32Mfaw1Ji, params: RequestParams = {}) =>
1635
+ this.request<UpdateMaximumsData, UpdateMaximumsError>({
1636
+ path: `/settings/maximums`,
1637
+ method: 'PUT',
1638
+ body: data,
1639
+ secure: true,
1640
+ type: ContentType.Json,
1641
+ ...params,
1642
+ }),
1643
+
1644
+ /**
1645
+ * @description Updates the reminder interval (in days) for pending submission notifications. Only Super Administrators can modify system settings.
1646
+ *
1647
+ * @tags Settings
1648
+ * @name UpdateReminders
1649
+ * @summary Update Reminder Interval
1650
+ * @request PUT:/settings/reminders
1651
+ * @secure
1652
+ */
1653
+ updateReminders: (data: Input4Ylvvi4Qiv, params: RequestParams = {}) =>
1654
+ this.request<UpdateRemindersData, UpdateRemindersError>({
1655
+ path: `/settings/reminders`,
1656
+ method: 'PUT',
1657
+ body: data,
1658
+ secure: true,
1659
+ type: ContentType.Json,
1660
+ ...params,
1661
+ }),
1662
+ }
1663
+ submission = {
1664
+ /**
1665
+ * @description Creates a new draft submission for the authenticated contractor. Validates invoice number uniqueness, calculates totals, and validates expenses against configured maximums.
1666
+ *
1667
+ * @tags Submissions
1668
+ * @name CreateSubmission
1669
+ * @summary Create draft submission
1670
+ * @request POST:/submission
1671
+ * @secure
1672
+ */
1673
+ createSubmission: (data: Input1E4Ziwqngl, params: RequestParams = {}) =>
1674
+ this.request<CreateSubmissionData, CreateSubmissionError>({
1675
+ path: `/submission`,
1676
+ method: 'POST',
1677
+ body: data,
1678
+ secure: true,
1679
+ type: ContentType.Json,
1680
+ ...params,
1681
+ }),
1682
+
1683
+ /**
1684
+ * @description Returns a single submission with all invoices, expenses, and assigned codes. Access is scoped by role: contractors see only their own, admins see their department, accountants/superadmins see any.
1685
+ *
1686
+ * @tags Submissions
1687
+ * @name GetSubmission
1688
+ * @summary View submission detail
1689
+ * @request GET:/submission/{submissionID}
1690
+ * @secure
1691
+ */
1692
+ getSubmission: (submissionId: string, params: RequestParams = {}) =>
1693
+ this.request<GetSubmissionData, GetSubmissionError>({
1694
+ path: `/submission/${submissionId}`,
1695
+ method: 'GET',
1696
+ secure: true,
1697
+ ...params,
1698
+ }),
1699
+
1700
+ /**
1701
+ * @description Updates an existing submission. Edit permissions are determined by the caller role and the submission status. Contractors can fully edit Draft/Rejected submissions and update only PO on Submitted/Administrator_Approved. Admins can edit non-calculated fields on non-Paid submissions. Recalculates totals when line items change.
1702
+ *
1703
+ * @tags Submissions
1704
+ * @name UpdateSubmission
1705
+ * @summary Update submission
1706
+ * @request PUT:/submission/{submissionID}
1707
+ * @secure
1708
+ */
1709
+ updateSubmission: (submissionId: string, data: InputD6Uic9Wivl, params: RequestParams = {}) =>
1710
+ this.request<UpdateSubmissionData, UpdateSubmissionError>({
1711
+ path: `/submission/${submissionId}`,
1712
+ method: 'PUT',
1713
+ body: data,
1714
+ secure: true,
1715
+ type: ContentType.Json,
1716
+ ...params,
1717
+ }),
1718
+
1719
+ /**
1720
+ * @description Deletes a submission and all related invoices, expenses, and codes. Admin/SuperAdmin only. Cannot delete paid submissions. Notifies the contractor and any reviewing accountant.
1721
+ *
1722
+ * @tags Submissions
1723
+ * @name DeleteSubmission
1724
+ * @summary Delete submission
1725
+ * @request DELETE:/submission/{submissionID}
1726
+ * @secure
1727
+ */
1728
+ deleteSubmission: (submissionId: string, params: RequestParams = {}) =>
1729
+ this.request<DeleteSubmissionData, DeleteSubmissionError>({
1730
+ path: `/submission/${submissionId}`,
1731
+ method: 'DELETE',
1732
+ secure: true,
1733
+ ...params,
1734
+ }),
1735
+
1736
+ /**
1737
+ * @description Admin: transitions Submitted → Administrator_Approved (notifies accountants + contractor). Accountant: transitions Administrator_Approved → Payment_Pending (notifies contractor).
1738
+ *
1739
+ * @tags Submissions
1740
+ * @name CreateApprove
1741
+ * @summary Approve a submission
1742
+ * @request POST:/submission/{submissionID}/approve
1743
+ * @secure
1744
+ */
1745
+ createApprove: (submissionId: string, params: RequestParams = {}) =>
1746
+ this.request<CreateApproveData, CreateApproveError>({
1747
+ path: `/submission/${submissionId}/approve`,
1748
+ method: 'POST',
1749
+ secure: true,
1750
+ ...params,
1751
+ }),
1752
+
1753
+ /**
1754
+ * @description Assigns codes to Service and/or Reimbursement sections of a submission with optional notes. Only codes belonging to the submission's assigned department are allowed. Admin only.
1755
+ *
1756
+ * @tags Submissions
1757
+ * @name UpdateCodes
1758
+ * @summary Assign codes to submission sections
1759
+ * @request PUT:/submission/{submissionID}/codes
1760
+ * @secure
1761
+ */
1762
+ updateCodes: (submissionId: string, data: InputQqc4Xl7Nr3, params: RequestParams = {}) =>
1763
+ this.request<UpdateCodesData, UpdateCodesError>({
1764
+ path: `/submission/${submissionId}/codes`,
1765
+ method: 'PUT',
1766
+ body: data,
1767
+ secure: true,
1768
+ type: ContentType.Json,
1769
+ ...params,
1770
+ }),
1771
+
1772
+ /**
1773
+ * @description Validates file constraints (size, type, count) and returns a presigned S3 URL for uploading a file attachment to a submission line item.
1774
+ *
1775
+ * @tags Submissions
1776
+ * @name CreateFile
1777
+ * @summary Get presigned upload URL for a file attachment
1778
+ * @request POST:/submission/{submissionID}/file
1779
+ * @secure
1780
+ */
1781
+ createFile: (submissionId: string, data: InputNiqys3Oiwd, params: RequestParams = {}) =>
1782
+ this.request<CreateFileData, CreateFileError>({
1783
+ path: `/submission/${submissionId}/file`,
1784
+ method: 'POST',
1785
+ body: data,
1786
+ secure: true,
1787
+ type: ContentType.Json,
1788
+ ...params,
1789
+ }),
1790
+
1791
+ /**
1792
+ * @description Returns a presigned S3 URL for downloading a file attachment associated with a submission line item.
1793
+ *
1794
+ * @tags Submissions
1795
+ * @name GetFile
1796
+ * @summary Get presigned download URL for a file attachment
1797
+ * @request GET:/submission/{submissionID}/file/{fileID}
1798
+ * @secure
1799
+ */
1800
+ getFile: (submissionId: string, fileId: string, params: RequestParams = {}) =>
1801
+ this.request<GetFileData, GetFileError>({
1802
+ path: `/submission/${submissionId}/file/${fileId}`,
1803
+ method: 'GET',
1804
+ secure: true,
1805
+ ...params,
1806
+ }),
1807
+
1808
+ /**
1809
+ * @description Transitions a Payment_Pending submission to Paid. Only Accountants may perform this action. Notifies the approving administrator.
1810
+ *
1811
+ * @tags Submissions
1812
+ * @name CreatePaid
1813
+ * @summary Mark a submission as paid
1814
+ * @request POST:/submission/{submissionID}/paid
1815
+ * @secure
1816
+ */
1817
+ createPaid: (submissionId: string, params: RequestParams = {}) =>
1818
+ this.request<CreatePaidData, CreatePaidError>({
1819
+ path: `/submission/${submissionId}/paid`,
1820
+ method: 'POST',
1821
+ secure: true,
1822
+ ...params,
1823
+ }),
1824
+
1825
+ /**
1826
+ * @description Generates and returns a PDF summary of the submission including invoices, expenses, and assigned codes. Returns the PDF as a base64-encoded string.
1827
+ *
1828
+ * @tags Submissions
1829
+ * @name GetPdf
1830
+ * @summary Generate submission summary PDF
1831
+ * @request GET:/submission/{submissionID}/pdf
1832
+ * @secure
1833
+ */
1834
+ getPdf: (submissionId: string, params: RequestParams = {}) =>
1835
+ this.request<GetPdfData, GetPdfError>({
1836
+ path: `/submission/${submissionId}/pdf`,
1837
+ method: 'GET',
1838
+ secure: true,
1839
+ ...params,
1840
+ }),
1841
+
1842
+ /**
1843
+ * @description Updates the PO number on a submission. Contractors can update PO on Submitted or Administrator_Approved submissions. Admins can update PO on any non-Paid submission.
1844
+ *
1845
+ * @tags Submissions
1846
+ * @name PutSubmission
1847
+ * @summary Update submission PO number
1848
+ * @request PUT:/submission/{submissionID}/po
1849
+ * @secure
1850
+ */
1851
+ putSubmission: (submissionId: string, data: Input9Zqht4Idck, params: RequestParams = {}) =>
1852
+ this.request<PutSubmissionData, PutSubmissionError>({
1853
+ path: `/submission/${submissionId}/po`,
1854
+ method: 'PUT',
1855
+ body: data,
1856
+ secure: true,
1857
+ type: ContentType.Json,
1858
+ ...params,
1859
+ }),
1860
+
1861
+ /**
1862
+ * @description Reassigns a submission to a new department. Removes all codes from the original department. Notifies new department admins and the contractor. Admin/SuperAdmin only.
1863
+ *
1864
+ * @tags Submissions
1865
+ * @name CreateReassign
1866
+ * @summary Reassign submission to a different department
1867
+ * @request POST:/submission/{submissionID}/reassign
1868
+ * @secure
1869
+ */
1870
+ createReassign: (submissionId: string, data: InputRx3Tqfjstsk, params: RequestParams = {}) =>
1871
+ this.request<CreateReassignData, CreateReassignError>({
1872
+ path: `/submission/${submissionId}/reassign`,
1873
+ method: 'POST',
1874
+ body: data,
1875
+ secure: true,
1876
+ type: ContentType.Json,
1877
+ ...params,
1878
+ }),
1879
+
1880
+ /**
1881
+ * @description Admin rejects a Submitted submission; Accountant rejects an Administrator_Approved submission. RSA-sourced submissions cannot be rejected. Notifies the contractor.
1882
+ *
1883
+ * @tags Submissions
1884
+ * @name CreateReject
1885
+ * @summary Reject a submission
1886
+ * @request POST:/submission/{submissionID}/reject
1887
+ * @secure
1888
+ */
1889
+ createReject: (submissionId: string, params: RequestParams = {}) =>
1890
+ this.request<CreateRejectData, CreateRejectError>({
1891
+ path: `/submission/${submissionId}/reject`,
1892
+ method: 'POST',
1893
+ secure: true,
1894
+ ...params,
1895
+ }),
1896
+
1897
+ /**
1898
+ * @description Transitions a Draft or Rejected submission to Submitted. Only the owning contractor may submit. Routes the submission to department administrators and sends notifications.
1899
+ *
1900
+ * @tags Submissions
1901
+ * @name CreateSubmit
1902
+ * @summary Submit a draft or rejected submission
1903
+ * @request POST:/submission/{submissionID}/submit
1904
+ * @secure
1905
+ */
1906
+ createSubmit: (submissionId: string, params: RequestParams = {}) =>
1907
+ this.request<CreateSubmitData, CreateSubmitError>({
1908
+ path: `/submission/${submissionId}/submit`,
1909
+ method: 'POST',
1910
+ secure: true,
1911
+ ...params,
1912
+ }),
1913
+
1914
+ /**
1915
+ * @description Public endpoint for guest contractors to submit a single invoice without authentication. Requires reCAPTCHA verification. The submission goes directly to Submitted status (no Draft).
1916
+ *
1917
+ * @tags Submissions
1918
+ * @name CreateGuest
1919
+ * @summary Submit guest invoice
1920
+ * @request POST:/submission/guest
1921
+ * @secure
1922
+ */
1923
+ createGuest: (data: InputVl61Mvkana, params: RequestParams = {}) =>
1924
+ this.request<CreateGuestData, CreateGuestError>({
1925
+ path: `/submission/guest`,
1926
+ method: 'POST',
1927
+ body: data,
1928
+ secure: true,
1929
+ type: ContentType.Json,
1930
+ ...params,
1931
+ }),
1932
+ }
1933
+ submissions = {
1934
+ /**
1935
+ * @description Search submissions with role-based scoping. Contractors see only their own submissions. Administrators see submissions for their department. Accountants and Super Administrators see all submissions.
1936
+ *
1937
+ * @tags Submissions
1938
+ * @name ListSubmissions
1939
+ * @summary Search Submissions
1940
+ * @request GET:/submissions
1941
+ * @secure
1942
+ */
1943
+ listSubmissions: (query: ListSubmissionsParams, params: RequestParams = {}) =>
1944
+ this.request<ListSubmissionsData, ListSubmissionsError>({
1945
+ path: `/submissions`,
1946
+ method: 'GET',
1947
+ query: query,
1948
+ secure: true,
1949
+ ...params,
1950
+ }),
1951
+
1952
+ /**
1953
+ * @description Generate an Excel export of submissions scoped by role. Contractors see only their own submissions. Administrators see their department. Accountants and Super Administrators see all. Maximum 10,000 rows.
1954
+ *
1955
+ * @tags Submissions
1956
+ * @name ListExport
1957
+ * @summary Export Submissions to Excel
1958
+ * @request GET:/submissions/export
1959
+ * @secure
1960
+ */
1961
+ listExport: (params: RequestParams = {}) =>
1962
+ this.request<ListExportData, ListExportError>({
1963
+ path: `/submissions/export`,
1964
+ method: 'GET',
1965
+ secure: true,
1966
+ ...params,
1967
+ }),
1968
+ }
1969
+ }