@ikonintegration/module-contractor-api 1.0.16 → 1.0.18

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/Api.ts CHANGED
@@ -17,66 +17,6 @@ export interface ErrorResponse {
17
17
  errCode: string
18
18
  }
19
19
 
20
- export interface CreateCodeSchema {
21
- /** Unique code identifier (1-50 alphanumeric characters) */
22
- codeID: CodeIDSchema
23
- /**
24
- * ID of the department this code belongs to
25
- * @minLength 1
26
- * @example "DEPT-2a1b3c4d5e6f"
27
- */
28
- departmentID: string
29
- /**
30
- * Description of the code (1-255 characters)
31
- * @minLength 1
32
- * @maxLength 255
33
- * @example "Consulting services for safety audits"
34
- */
35
- description: string
36
- }
37
-
38
- /**
39
- * Unique code identifier (1-50 alphanumeric characters)
40
- * @minLength 1
41
- * @maxLength 50
42
- * @pattern ^[a-zA-Z0-9]+$
43
- * @example "ACC001"
44
- */
45
- export type CodeIDSchema = string
46
-
47
- /** Created code */
48
- export interface PostCodeResponseSchema {
49
- /** Code identifier */
50
- codeID: string
51
- /** Associated department ID */
52
- departmentID: string
53
- /** Code description */
54
- description: string
55
- }
56
-
57
- export interface UpdateCodeSchema {
58
- /**
59
- * Updated description of the code (1-255 characters)
60
- * @minLength 1
61
- * @maxLength 255
62
- * @example "Updated consulting services description"
63
- */
64
- description: string
65
- }
66
-
67
- /** Updated code */
68
- export interface PutCodeResponseSchema {
69
- /** Code identifier */
70
- codeID: string
71
- /** Associated department ID */
72
- departmentID: string
73
- /** Updated code description */
74
- description: string
75
- }
76
-
77
- /** Code deletion result (empty body) */
78
- export type DeleteCodeResponseSchema = object
79
-
80
20
  /** Codes list */
81
21
  export interface GetCodesResponseSchema {
82
22
  /** List of codes */
@@ -1007,18 +947,18 @@ export interface UpdateSubmissionSchema {
1007
947
  contractNumber?: string
1008
948
  /** PO number (optional) */
1009
949
  poNumber?: string
1010
- /**
1011
- * Department ID
1012
- * @minLength 1
1013
- */
1014
- departmentID?: string
1015
950
  /** Updated service invoice line items */
1016
951
  invoices?: UpdateInvoiceInputSchema[]
1017
952
  /** Updated expense reimbursement line items */
1018
- expenses?: ExpenseInputSchema[]
953
+ expenses?: UpdateExpenseInputSchema[]
1019
954
  }
1020
955
 
1021
956
  export interface UpdateInvoiceInputSchema {
957
+ /**
958
+ * Existing invoice ID (omit to create new)
959
+ * @example "INV-abc123"
960
+ */
961
+ invoiceID?: string
1022
962
  /**
1023
963
  * Invoice description
1024
964
  * @minLength 1
@@ -1049,10 +989,70 @@ export interface UpdateInvoiceInputSchema {
1049
989
  * @example "PO-1234"
1050
990
  */
1051
991
  poNumber?: string
992
+ /** File attachments for this invoice */
993
+ attachments?: AttachmentSchema[]
994
+ }
995
+
996
+ export interface UpdateExpenseInputSchema {
1052
997
  /**
1053
- * File attachments for this invoice
1054
- * @default []
998
+ * Existing expense ID (omit to create new)
999
+ * @example "EXP-abc123"
1000
+ */
1001
+ expenseID?: string
1002
+ /**
1003
+ * Expense description
1004
+ * @minLength 1
1005
+ * @example "Hotel stay"
1006
+ */
1007
+ description: string
1008
+ /**
1009
+ * Expense date (epoch ms)
1010
+ * @example 1700000000000
1011
+ */
1012
+ date: number
1013
+ /**
1014
+ * Expense type
1015
+ * @example "Accommodation"
1016
+ */
1017
+ type: UpdateExpenseInputSchemaTypeEnum
1018
+ /**
1019
+ * Pre-tax amount
1020
+ * @min 0
1021
+ * @example 150
1022
+ */
1023
+ preTaxAmount: number
1024
+ /**
1025
+ * Tax amount
1026
+ * @min 0
1027
+ * @default 0
1028
+ * @example 7.5
1029
+ */
1030
+ taxAmount?: number
1031
+ /**
1032
+ * Number of nights (Accommodation)
1033
+ * @min 0
1034
+ * @exclusiveMin true
1035
+ * @example 2
1055
1036
  */
1037
+ nights?: number
1038
+ /**
1039
+ * Meal type (Meal expenses)
1040
+ * @example "Lunch"
1041
+ */
1042
+ mealType?: UpdateExpenseInputSchemaMealTypeEnum
1043
+ /**
1044
+ * Number of kilometres (Mileage)
1045
+ * @min 0
1046
+ * @exclusiveMin true
1047
+ * @example 100
1048
+ */
1049
+ numKilometres?: number
1050
+ /**
1051
+ * Transportation type (Transportation expenses)
1052
+ * @example "Taxi"
1053
+ */
1054
+ transportationType?: UpdateExpenseInputSchemaTransportationTypeEnum
1055
+ /** File attachments for this expense */
1056
1056
  attachments?: AttachmentSchema[]
1057
1057
  }
1058
1058
 
@@ -1100,6 +1100,38 @@ export interface PostApproveResponseSchema {
1100
1100
  status: string
1101
1101
  }
1102
1102
 
1103
+ export interface CreateSubmissionCodeSchema {
1104
+ /**
1105
+ * Description of the code (1-255 characters)
1106
+ * @minLength 1
1107
+ * @maxLength 255
1108
+ * @example "Consulting services for safety audits"
1109
+ */
1110
+ description: string
1111
+ }
1112
+
1113
+ export interface SubmissionCodeMutationResponseSchema {
1114
+ /** Code identifier */
1115
+ codeID: string
1116
+ /** Derived department ID */
1117
+ departmentID: string
1118
+ /** Code description */
1119
+ description: string
1120
+ }
1121
+
1122
+ export interface UpdateSubmissionCodeSchema {
1123
+ /**
1124
+ * Description of the code (1-255 characters)
1125
+ * @minLength 1
1126
+ * @maxLength 255
1127
+ * @example "Consulting services for safety audits"
1128
+ */
1129
+ description: string
1130
+ }
1131
+
1132
+ /** Deletion result (empty body) */
1133
+ export type DeleteSubmissionCodeResponseSchema = object
1134
+
1103
1135
  export interface PutSubmissionCodesSchema {
1104
1136
  /** Array of codes to assign to the submission sections */
1105
1137
  codes: SubmissionCodeItemSchema[]
@@ -1224,6 +1256,17 @@ export interface PostReassignResponseSchema {
1224
1256
  reassigned: boolean
1225
1257
  }
1226
1258
 
1259
+ /** Rejection reason payload */
1260
+ export interface PostRejectBodySchema {
1261
+ /**
1262
+ * Reason for rejecting the submission
1263
+ * @minLength 1
1264
+ * @maxLength 500
1265
+ * @example "Missing supporting documentation"
1266
+ */
1267
+ reason: string
1268
+ }
1269
+
1227
1270
  /** Rejection result */
1228
1271
  export interface PostRejectResponseSchema {
1229
1272
  /** Submission ID */
@@ -1553,6 +1596,40 @@ export enum UpdateSubmissionSchemaTypeEnum {
1553
1596
  Reimbursement = 'Reimbursement',
1554
1597
  }
1555
1598
 
1599
+ /**
1600
+ * Expense type
1601
+ * @example "Accommodation"
1602
+ */
1603
+ export enum UpdateExpenseInputSchemaTypeEnum {
1604
+ Accommodation = 'Accommodation',
1605
+ Meal = 'Meal',
1606
+ Mileage = 'Mileage',
1607
+ Transportation = 'Transportation',
1608
+ Other = 'Other',
1609
+ }
1610
+
1611
+ /**
1612
+ * Meal type (Meal expenses)
1613
+ * @example "Lunch"
1614
+ */
1615
+ export enum UpdateExpenseInputSchemaMealTypeEnum {
1616
+ Breakfast = 'Breakfast',
1617
+ Lunch = 'Lunch',
1618
+ Dinner = 'Dinner',
1619
+ }
1620
+
1621
+ /**
1622
+ * Transportation type (Transportation expenses)
1623
+ * @example "Taxi"
1624
+ */
1625
+ export enum UpdateExpenseInputSchemaTransportationTypeEnum {
1626
+ AirTravel = 'Air travel',
1627
+ Taxi = 'Taxi',
1628
+ Ferry = 'Ferry',
1629
+ Rental = 'Rental',
1630
+ Other = 'Other',
1631
+ }
1632
+
1556
1633
  /** Content type */
1557
1634
  export enum GetPdfResponseSchemaContentTypeEnum {
1558
1635
  ApplicationPdf = 'application/pdf',
@@ -1566,17 +1643,13 @@ export enum GuestFileMetadataSchemaContentTypeEnum {
1566
1643
  ApplicationPdf = 'application/pdf',
1567
1644
  }
1568
1645
 
1569
- export type CreateCodeData = PostCodeResponseSchema
1570
-
1571
- export type CreateCodeError = ErrorResponse
1572
-
1573
- export type UpdateCodeData = PutCodeResponseSchema
1574
-
1575
- export type UpdateCodeError = ErrorResponse
1576
-
1577
- export type DeleteCodeData = DeleteCodeResponseSchema
1578
-
1579
- export type DeleteCodeError = ErrorResponse
1646
+ export interface ListCodesParams {
1647
+ /**
1648
+ * Filter codes by department. If omitted, all codes are returned.
1649
+ * @example "DEPT_abc123"
1650
+ */
1651
+ departmentID?: string
1652
+ }
1580
1653
 
1581
1654
  export type ListCodesData = GetCodesResponseSchema
1582
1655
 
@@ -1684,6 +1757,12 @@ export interface GetSubmissionParams {
1684
1757
  * @example "true"
1685
1758
  */
1686
1759
  consistentRead?: ConsistentReadEnum
1760
+ /**
1761
+ * Owner user identifier (submission partition key)
1762
+ * @minLength 1
1763
+ * @example "USR-2RvYIFNJR3CrJHKO0NqgGa1EwcS"
1764
+ */
1765
+ userId: string
1687
1766
  /**
1688
1767
  * Submission identifier
1689
1768
  * @minLength 1
@@ -1726,6 +1805,18 @@ export type CreateApproveData = PostApproveResponseSchema
1726
1805
 
1727
1806
  export type CreateApproveError = ErrorResponse
1728
1807
 
1808
+ export type CreateCodeData = SubmissionCodeMutationResponseSchema
1809
+
1810
+ export type CreateCodeError = ErrorResponse
1811
+
1812
+ export type UpdateCodeData = SubmissionCodeMutationResponseSchema
1813
+
1814
+ export type UpdateCodeError = ErrorResponse
1815
+
1816
+ export type DeleteCodeData = DeleteSubmissionCodeResponseSchema
1817
+
1818
+ export type DeleteCodeError = ErrorResponse
1819
+
1729
1820
  export type UpdateCodesData = PutSubmissionCodesResponseSchema
1730
1821
 
1731
1822
  export type UpdateCodesError = ErrorResponse
@@ -1861,7 +1952,7 @@ export type ListExportData = GetSubmissionsExportResponseSchema
1861
1952
 
1862
1953
  export type ListExportError = ErrorResponse
1863
1954
 
1864
- export type CreateSearchOutput1 = SubmissionSearchResponse
1955
+ export type CreateSearchData1 = SubmissionSearchResponse
1865
1956
 
1866
1957
  export type CreateSearchErrorData = ErrorResponse
1867
1958
 
@@ -2003,70 +2094,11 @@ export class HttpClient<SecurityDataType = unknown> {
2003
2094
 
2004
2095
  /**
2005
2096
  * @title Contractor Module API
2006
- * @version 1.0.16
2097
+ * @version 1.0.18
2007
2098
  * @baseUrl http://localhost:8080
2008
2099
  * @contact Ikon Integration <ikon@ikonintegration.com> (http://example.com)
2009
2100
  */
2010
2101
  export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
2011
- code = {
2012
- /**
2013
- * @description Creates a new charging code associated with a department. Only Super Administrators can create codes.
2014
- *
2015
- * @tags Codes
2016
- * @name CreateCode
2017
- * @summary Create Code
2018
- * @request POST:/code
2019
- * @secure
2020
- */
2021
- createCode: (data: CreateCodeSchema, params: RequestParams = {}) =>
2022
- this.request<CreateCodeData, CreateCodeError>({
2023
- path: `/code`,
2024
- method: 'POST',
2025
- body: data,
2026
- secure: true,
2027
- type: ContentType.Json,
2028
- format: 'json',
2029
- ...params,
2030
- }),
2031
-
2032
- /**
2033
- * @description Updates an existing charging code description. Only Super Administrators can update codes.
2034
- *
2035
- * @tags Codes
2036
- * @name UpdateCode
2037
- * @summary Update Code
2038
- * @request PUT:/code/{codeID}
2039
- * @secure
2040
- */
2041
- updateCode: (codeId: string, data: UpdateCodeSchema, params: RequestParams = {}) =>
2042
- this.request<UpdateCodeData, UpdateCodeError>({
2043
- path: `/code/${codeId}`,
2044
- method: 'PUT',
2045
- body: data,
2046
- secure: true,
2047
- type: ContentType.Json,
2048
- format: 'json',
2049
- ...params,
2050
- }),
2051
-
2052
- /**
2053
- * @description Deletes a charging code. Prevents deletion if the code is referenced by existing submissions. Only Super Administrators can delete codes.
2054
- *
2055
- * @tags Codes
2056
- * @name DeleteCode
2057
- * @summary Delete Code
2058
- * @request DELETE:/code/{codeID}
2059
- * @secure
2060
- */
2061
- deleteCode: (codeId: string, params: RequestParams = {}) =>
2062
- this.request<DeleteCodeData, DeleteCodeError>({
2063
- path: `/code/${codeId}`,
2064
- method: 'DELETE',
2065
- secure: true,
2066
- format: 'json',
2067
- ...params,
2068
- }),
2069
- }
2070
2102
  codes = {
2071
2103
  /**
2072
2104
  * @description Returns all codes or codes filtered by department. Administrators and above can list codes.
@@ -2077,10 +2109,11 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2077
2109
  * @request GET:/codes
2078
2110
  * @secure
2079
2111
  */
2080
- listCodes: (params: RequestParams = {}) =>
2112
+ listCodes: (query: ListCodesParams, params: RequestParams = {}) =>
2081
2113
  this.request<ListCodesData, ListCodesError>({
2082
2114
  path: `/codes`,
2083
2115
  method: 'GET',
2116
+ query: query,
2084
2117
  secure: true,
2085
2118
  format: 'json',
2086
2119
  ...params,
@@ -2344,7 +2377,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2344
2377
  }
2345
2378
  settings = {
2346
2379
  /**
2347
- * @description Retrieves system settings. Administrators have read-only access. Super Administrators have full access.
2380
+ * @description Retrieves system settings. Administrators and users have read-only access. Super Administrators have full access.
2348
2381
  *
2349
2382
  * @tags Settings
2350
2383
  * @name ListSettings
@@ -2383,17 +2416,17 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2383
2416
  }
2384
2417
  submission = {
2385
2418
  /**
2386
- * @description Creates a new draft submission for the authenticated contractor. Validates invoice number uniqueness, calculates totals, and validates expenses against configured maximums.
2419
+ * @description Creates a new draft submission for the specified contractor. Validates invoice number uniqueness, calculates totals, and validates expenses against configured maximums. USER callers can only create for themselves; ADMIN/SYSADMIN can create on behalf of a contractor.
2387
2420
  *
2388
2421
  * @tags Submissions
2389
2422
  * @name CreateSubmission
2390
2423
  * @summary Create draft submission
2391
- * @request POST:/submission
2424
+ * @request POST:/submission/{userID}
2392
2425
  * @secure
2393
2426
  */
2394
- createSubmission: (data: CreateSubmissionSchema, params: RequestParams = {}) =>
2427
+ createSubmission: (userId: string, data: CreateSubmissionSchema, params: RequestParams = {}) =>
2395
2428
  this.request<CreateSubmissionData, CreateSubmissionError>({
2396
- path: `/submission`,
2429
+ path: `/submission/${userId}`,
2397
2430
  method: 'POST',
2398
2431
  body: data,
2399
2432
  secure: true,
@@ -2408,12 +2441,12 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2408
2441
  * @tags Submissions
2409
2442
  * @name GetSubmission
2410
2443
  * @summary View submission detail
2411
- * @request GET:/submission/{submissionID}
2444
+ * @request GET:/submission/{userID}/{submissionID}
2412
2445
  * @secure
2413
2446
  */
2414
- getSubmission: ({ submissionId, ...query }: GetSubmissionParams, params: RequestParams = {}) =>
2447
+ getSubmission: ({ userId, submissionId, ...query }: GetSubmissionParams, params: RequestParams = {}) =>
2415
2448
  this.request<GetSubmissionData, GetSubmissionError>({
2416
- path: `/submission/${submissionId}`,
2449
+ path: `/submission/${userId}/${submissionId}`,
2417
2450
  method: 'GET',
2418
2451
  query: query,
2419
2452
  secure: true,
@@ -2427,12 +2460,17 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2427
2460
  * @tags Submissions
2428
2461
  * @name UpdateSubmission
2429
2462
  * @summary Update submission
2430
- * @request PUT:/submission/{submissionID}
2463
+ * @request PUT:/submission/{userID}/{submissionID}
2431
2464
  * @secure
2432
2465
  */
2433
- updateSubmission: (submissionId: string, data: UpdateSubmissionSchema, params: RequestParams = {}) =>
2466
+ updateSubmission: (
2467
+ userId: string,
2468
+ submissionId: string,
2469
+ data: UpdateSubmissionSchema,
2470
+ params: RequestParams = {}
2471
+ ) =>
2434
2472
  this.request<UpdateSubmissionData, UpdateSubmissionError>({
2435
- path: `/submission/${submissionId}`,
2473
+ path: `/submission/${userId}/${submissionId}`,
2436
2474
  method: 'PUT',
2437
2475
  body: data,
2438
2476
  secure: true,
@@ -2447,12 +2485,12 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2447
2485
  * @tags Submissions
2448
2486
  * @name DeleteSubmission
2449
2487
  * @summary Delete submission
2450
- * @request DELETE:/submission/{submissionID}
2488
+ * @request DELETE:/submission/{userID}/{submissionID}
2451
2489
  * @secure
2452
2490
  */
2453
- deleteSubmission: (submissionId: string, params: RequestParams = {}) =>
2491
+ deleteSubmission: (userId: string, submissionId: string, params: RequestParams = {}) =>
2454
2492
  this.request<DeleteSubmissionData, DeleteSubmissionError>({
2455
- path: `/submission/${submissionId}`,
2493
+ path: `/submission/${userId}/${submissionId}`,
2456
2494
  method: 'DELETE',
2457
2495
  secure: true,
2458
2496
  format: 'json',
@@ -2465,30 +2503,94 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2465
2503
  * @tags Submissions
2466
2504
  * @name CreateApprove
2467
2505
  * @summary Approve a submission
2468
- * @request POST:/submission/{submissionID}/approve
2506
+ * @request POST:/submission/{userID}/{submissionID}/approve
2469
2507
  * @secure
2470
2508
  */
2471
- createApprove: (submissionId: string, params: RequestParams = {}) =>
2509
+ createApprove: (userId: string, submissionId: string, params: RequestParams = {}) =>
2472
2510
  this.request<CreateApproveData, CreateApproveError>({
2473
- path: `/submission/${submissionId}/approve`,
2511
+ path: `/submission/${userId}/${submissionId}/approve`,
2474
2512
  method: 'POST',
2475
2513
  secure: true,
2476
2514
  format: 'json',
2477
2515
  ...params,
2478
2516
  }),
2479
2517
 
2518
+ /**
2519
+ * @description Creates a new billing code bound to the parent submission's department. The codeID is System-generated and the departmentID is derived from the submission, so neither is taken from the request. Admin only.
2520
+ *
2521
+ * @tags Submissions
2522
+ * @name CreateCode
2523
+ * @summary Create code on submission
2524
+ * @request POST:/submission/{userID}/{submissionID}/code
2525
+ * @secure
2526
+ */
2527
+ createCode: (userId: string, submissionId: string, data: CreateSubmissionCodeSchema, params: RequestParams = {}) =>
2528
+ this.request<CreateCodeData, CreateCodeError>({
2529
+ path: `/submission/${userId}/${submissionId}/code`,
2530
+ method: 'POST',
2531
+ body: data,
2532
+ secure: true,
2533
+ type: ContentType.Json,
2534
+ format: 'json',
2535
+ ...params,
2536
+ }),
2537
+
2538
+ /**
2539
+ * @description Updates the description of a billing code addressed by codeID and derived from the parent submission's department. Admin only.
2540
+ *
2541
+ * @tags Submissions
2542
+ * @name UpdateCode
2543
+ * @summary Update a submission code
2544
+ * @request PUT:/submission/{userID}/{submissionID}/code/{codeID}
2545
+ * @secure
2546
+ */
2547
+ updateCode: (
2548
+ userId: string,
2549
+ submissionId: string,
2550
+ codeId: string,
2551
+ data: UpdateSubmissionCodeSchema,
2552
+ params: RequestParams = {}
2553
+ ) =>
2554
+ this.request<UpdateCodeData, UpdateCodeError>({
2555
+ path: `/submission/${userId}/${submissionId}/code/${codeId}`,
2556
+ method: 'PUT',
2557
+ body: data,
2558
+ secure: true,
2559
+ type: ContentType.Json,
2560
+ format: 'json',
2561
+ ...params,
2562
+ }),
2563
+
2564
+ /**
2565
+ * @description Deletes a billing code owned by the submission's department. The owning departmentID is derived from the parent submission. Fails if the code is still referenced by any submission. Admin only.
2566
+ *
2567
+ * @tags Submissions
2568
+ * @name DeleteCode
2569
+ * @summary Delete a code from a submission
2570
+ * @request DELETE:/submission/{userID}/{submissionID}/code/{codeID}
2571
+ * @secure
2572
+ */
2573
+ deleteCode: (userId: string, submissionId: string, codeId: string, params: RequestParams = {}) =>
2574
+ this.request<DeleteCodeData, DeleteCodeError>({
2575
+ path: `/submission/${userId}/${submissionId}/code/${codeId}`,
2576
+ method: 'DELETE',
2577
+ secure: true,
2578
+ format: 'json',
2579
+ ...params,
2580
+ }),
2581
+
2480
2582
  /**
2481
2583
  * @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.
2482
2584
  *
2483
2585
  * @tags Submissions
2484
2586
  * @name UpdateCodes
2485
2587
  * @summary Assign codes to submission sections
2486
- * @request PUT:/submission/{submissionID}/codes
2588
+ * @request PUT:/submission/{userID}/{submissionID}/codes
2487
2589
  * @secure
2488
2590
  */
2489
- updateCodes: (submissionId: string, data: PutSubmissionCodesSchema, params: RequestParams = {}) =>
2591
+ updateCodes: (userId: string, submissionId: string, data: PutSubmissionCodesSchema, params: RequestParams = {}) =>
2490
2592
  this.request<UpdateCodesData, UpdateCodesError>({
2491
- path: `/submission/${submissionId}/codes`,
2593
+ path: `/submission/${userId}/${submissionId}/codes`,
2492
2594
  method: 'PUT',
2493
2595
  body: data,
2494
2596
  secure: true,
@@ -2503,12 +2605,12 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2503
2605
  * @tags Submissions
2504
2606
  * @name CreateFile
2505
2607
  * @summary Get presigned upload URL for a file attachment
2506
- * @request POST:/submission/{submissionID}/file
2608
+ * @request POST:/submission/{userID}/{submissionID}/file
2507
2609
  * @secure
2508
2610
  */
2509
- createFile: (submissionId: string, data: FileUploadRequestSchema, params: RequestParams = {}) =>
2611
+ createFile: (userId: string, submissionId: string, data: FileUploadRequestSchema, params: RequestParams = {}) =>
2510
2612
  this.request<CreateFileData, CreateFileError>({
2511
- path: `/submission/${submissionId}/file`,
2613
+ path: `/submission/${userId}/${submissionId}/file`,
2512
2614
  method: 'POST',
2513
2615
  body: data,
2514
2616
  secure: true,
@@ -2523,12 +2625,12 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2523
2625
  * @tags Submissions
2524
2626
  * @name GetFile
2525
2627
  * @summary Get presigned download URL for a file attachment
2526
- * @request GET:/submission/{submissionID}/file/{fileID}
2628
+ * @request GET:/submission/{userID}/{submissionID}/file/{fileID}
2527
2629
  * @secure
2528
2630
  */
2529
- getFile: (submissionId: string, fileId: string, params: RequestParams = {}) =>
2631
+ getFile: (userId: string, submissionId: string, fileId: string, params: RequestParams = {}) =>
2530
2632
  this.request<GetFileData, GetFileError>({
2531
- path: `/submission/${submissionId}/file/${fileId}`,
2633
+ path: `/submission/${userId}/${submissionId}/file/${fileId}`,
2532
2634
  method: 'GET',
2533
2635
  secure: true,
2534
2636
  format: 'json',
@@ -2541,12 +2643,12 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2541
2643
  * @tags Submissions
2542
2644
  * @name CreatePaid
2543
2645
  * @summary Mark a submission as paid
2544
- * @request POST:/submission/{submissionID}/paid
2646
+ * @request POST:/submission/{userID}/{submissionID}/paid
2545
2647
  * @secure
2546
2648
  */
2547
- createPaid: (submissionId: string, params: RequestParams = {}) =>
2649
+ createPaid: (userId: string, submissionId: string, params: RequestParams = {}) =>
2548
2650
  this.request<CreatePaidData, CreatePaidError>({
2549
- path: `/submission/${submissionId}/paid`,
2651
+ path: `/submission/${userId}/${submissionId}/paid`,
2550
2652
  method: 'POST',
2551
2653
  secure: true,
2552
2654
  format: 'json',
@@ -2559,12 +2661,12 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2559
2661
  * @tags Submissions
2560
2662
  * @name GetPdf
2561
2663
  * @summary Generate submission summary PDF
2562
- * @request GET:/submission/{submissionID}/pdf
2664
+ * @request GET:/submission/{userID}/{submissionID}/pdf
2563
2665
  * @secure
2564
2666
  */
2565
- getPdf: (submissionId: string, params: RequestParams = {}) =>
2667
+ getPdf: (userId: string, submissionId: string, params: RequestParams = {}) =>
2566
2668
  this.request<GetPdfData, GetPdfError>({
2567
- path: `/submission/${submissionId}/pdf`,
2669
+ path: `/submission/${userId}/${submissionId}/pdf`,
2568
2670
  method: 'GET',
2569
2671
  secure: true,
2570
2672
  format: 'json',
@@ -2577,12 +2679,12 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2577
2679
  * @tags Submissions
2578
2680
  * @name PutSubmission
2579
2681
  * @summary Update submission PO number
2580
- * @request PUT:/submission/{submissionID}/po
2682
+ * @request PUT:/submission/{userID}/{submissionID}/po
2581
2683
  * @secure
2582
2684
  */
2583
- putSubmission: (submissionId: string, data: UpdatePOSchema, params: RequestParams = {}) =>
2685
+ putSubmission: (userId: string, submissionId: string, data: UpdatePOSchema, params: RequestParams = {}) =>
2584
2686
  this.request<PutSubmissionData, PutSubmissionError>({
2585
- path: `/submission/${submissionId}/po`,
2687
+ path: `/submission/${userId}/${submissionId}/po`,
2586
2688
  method: 'PUT',
2587
2689
  body: data,
2588
2690
  secure: true,
@@ -2597,12 +2699,17 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2597
2699
  * @tags Submissions
2598
2700
  * @name CreateReassign
2599
2701
  * @summary Reassign submission to a different department
2600
- * @request POST:/submission/{submissionID}/reassign
2702
+ * @request POST:/submission/{userID}/{submissionID}/reassign
2601
2703
  * @secure
2602
2704
  */
2603
- createReassign: (submissionId: string, data: ReassignSubmissionSchema, params: RequestParams = {}) =>
2705
+ createReassign: (
2706
+ userId: string,
2707
+ submissionId: string,
2708
+ data: ReassignSubmissionSchema,
2709
+ params: RequestParams = {}
2710
+ ) =>
2604
2711
  this.request<CreateReassignData, CreateReassignError>({
2605
- path: `/submission/${submissionId}/reassign`,
2712
+ path: `/submission/${userId}/${submissionId}/reassign`,
2606
2713
  method: 'POST',
2607
2714
  body: data,
2608
2715
  secure: true,
@@ -2612,19 +2719,21 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2612
2719
  }),
2613
2720
 
2614
2721
  /**
2615
- * @description Admin rejects a Submitted submission; Accountant rejects an Administrator_Approved submission. RSA-sourced submissions cannot be rejected. Notifies the contractor.
2722
+ * @description Admin rejects a Submitted submission; Accountant rejects an Administrator_Approved submission. RSA-sourced submissions cannot be rejected. Notifies the contractor with the provided reason.
2616
2723
  *
2617
2724
  * @tags Submissions
2618
2725
  * @name CreateReject
2619
2726
  * @summary Reject a submission
2620
- * @request POST:/submission/{submissionID}/reject
2727
+ * @request POST:/submission/{userID}/{submissionID}/reject
2621
2728
  * @secure
2622
2729
  */
2623
- createReject: (submissionId: string, params: RequestParams = {}) =>
2730
+ createReject: (userId: string, submissionId: string, data: PostRejectBodySchema, params: RequestParams = {}) =>
2624
2731
  this.request<CreateRejectData, CreateRejectError>({
2625
- path: `/submission/${submissionId}/reject`,
2732
+ path: `/submission/${userId}/${submissionId}/reject`,
2626
2733
  method: 'POST',
2734
+ body: data,
2627
2735
  secure: true,
2736
+ type: ContentType.Json,
2628
2737
  format: 'json',
2629
2738
  ...params,
2630
2739
  }),
@@ -2635,12 +2744,12 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2635
2744
  * @tags Submissions
2636
2745
  * @name CreateSubmit
2637
2746
  * @summary Submit a draft or rejected submission
2638
- * @request POST:/submission/{submissionID}/submit
2747
+ * @request POST:/submission/{userID}/{submissionID}/submit
2639
2748
  * @secure
2640
2749
  */
2641
- createSubmit: (submissionId: string, params: RequestParams = {}) =>
2750
+ createSubmit: (userId: string, submissionId: string, params: RequestParams = {}) =>
2642
2751
  this.request<CreateSubmitData, CreateSubmitError>({
2643
- path: `/submission/${submissionId}/submit`,
2752
+ path: `/submission/${userId}/${submissionId}/submit`,
2644
2753
  method: 'POST',
2645
2754
  secure: true,
2646
2755
  format: 'json',
@@ -2715,7 +2824,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
2715
2824
  * @secure
2716
2825
  */
2717
2826
  createSearch: (data: SubmissionSearchInput, params: RequestParams = {}) =>
2718
- this.request<CreateSearchOutput1, CreateSearchErrorData>({
2827
+ this.request<CreateSearchData1, CreateSearchErrorData>({
2719
2828
  path: `/submissions/search`,
2720
2829
  method: 'POST',
2721
2830
  body: data,