@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 +296 -187
- package/dist/Api.d.ts +219 -134
- package/dist/Api.js +137 -102
- package/dist/Api.js.map +1 -1
- package/package.json +2 -2
package/dist/Api.d.ts
CHANGED
|
@@ -5,60 +5,6 @@ export interface ErrorResponse {
|
|
|
5
5
|
/** Error code */
|
|
6
6
|
errCode: string;
|
|
7
7
|
}
|
|
8
|
-
export interface CreateCodeSchema {
|
|
9
|
-
/** Unique code identifier (1-50 alphanumeric characters) */
|
|
10
|
-
codeID: CodeIDSchema;
|
|
11
|
-
/**
|
|
12
|
-
* ID of the department this code belongs to
|
|
13
|
-
* @minLength 1
|
|
14
|
-
* @example "DEPT-2a1b3c4d5e6f"
|
|
15
|
-
*/
|
|
16
|
-
departmentID: string;
|
|
17
|
-
/**
|
|
18
|
-
* Description of the code (1-255 characters)
|
|
19
|
-
* @minLength 1
|
|
20
|
-
* @maxLength 255
|
|
21
|
-
* @example "Consulting services for safety audits"
|
|
22
|
-
*/
|
|
23
|
-
description: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Unique code identifier (1-50 alphanumeric characters)
|
|
27
|
-
* @minLength 1
|
|
28
|
-
* @maxLength 50
|
|
29
|
-
* @pattern ^[a-zA-Z0-9]+$
|
|
30
|
-
* @example "ACC001"
|
|
31
|
-
*/
|
|
32
|
-
export type CodeIDSchema = string;
|
|
33
|
-
/** Created code */
|
|
34
|
-
export interface PostCodeResponseSchema {
|
|
35
|
-
/** Code identifier */
|
|
36
|
-
codeID: string;
|
|
37
|
-
/** Associated department ID */
|
|
38
|
-
departmentID: string;
|
|
39
|
-
/** Code description */
|
|
40
|
-
description: string;
|
|
41
|
-
}
|
|
42
|
-
export interface UpdateCodeSchema {
|
|
43
|
-
/**
|
|
44
|
-
* Updated description of the code (1-255 characters)
|
|
45
|
-
* @minLength 1
|
|
46
|
-
* @maxLength 255
|
|
47
|
-
* @example "Updated consulting services description"
|
|
48
|
-
*/
|
|
49
|
-
description: string;
|
|
50
|
-
}
|
|
51
|
-
/** Updated code */
|
|
52
|
-
export interface PutCodeResponseSchema {
|
|
53
|
-
/** Code identifier */
|
|
54
|
-
codeID: string;
|
|
55
|
-
/** Associated department ID */
|
|
56
|
-
departmentID: string;
|
|
57
|
-
/** Updated code description */
|
|
58
|
-
description: string;
|
|
59
|
-
}
|
|
60
|
-
/** Code deletion result (empty body) */
|
|
61
|
-
export type DeleteCodeResponseSchema = object;
|
|
62
8
|
/** Codes list */
|
|
63
9
|
export interface GetCodesResponseSchema {
|
|
64
10
|
/** List of codes */
|
|
@@ -948,17 +894,17 @@ export interface UpdateSubmissionSchema {
|
|
|
948
894
|
contractNumber?: string;
|
|
949
895
|
/** PO number (optional) */
|
|
950
896
|
poNumber?: string;
|
|
951
|
-
/**
|
|
952
|
-
* Department ID
|
|
953
|
-
* @minLength 1
|
|
954
|
-
*/
|
|
955
|
-
departmentID?: string;
|
|
956
897
|
/** Updated service invoice line items */
|
|
957
898
|
invoices?: UpdateInvoiceInputSchema[];
|
|
958
899
|
/** Updated expense reimbursement line items */
|
|
959
|
-
expenses?:
|
|
900
|
+
expenses?: UpdateExpenseInputSchema[];
|
|
960
901
|
}
|
|
961
902
|
export interface UpdateInvoiceInputSchema {
|
|
903
|
+
/**
|
|
904
|
+
* Existing invoice ID (omit to create new)
|
|
905
|
+
* @example "INV-abc123"
|
|
906
|
+
*/
|
|
907
|
+
invoiceID?: string;
|
|
962
908
|
/**
|
|
963
909
|
* Invoice description
|
|
964
910
|
* @minLength 1
|
|
@@ -989,10 +935,69 @@ export interface UpdateInvoiceInputSchema {
|
|
|
989
935
|
* @example "PO-1234"
|
|
990
936
|
*/
|
|
991
937
|
poNumber?: string;
|
|
938
|
+
/** File attachments for this invoice */
|
|
939
|
+
attachments?: AttachmentSchema[];
|
|
940
|
+
}
|
|
941
|
+
export interface UpdateExpenseInputSchema {
|
|
992
942
|
/**
|
|
993
|
-
*
|
|
994
|
-
* @
|
|
943
|
+
* Existing expense ID (omit to create new)
|
|
944
|
+
* @example "EXP-abc123"
|
|
995
945
|
*/
|
|
946
|
+
expenseID?: string;
|
|
947
|
+
/**
|
|
948
|
+
* Expense description
|
|
949
|
+
* @minLength 1
|
|
950
|
+
* @example "Hotel stay"
|
|
951
|
+
*/
|
|
952
|
+
description: string;
|
|
953
|
+
/**
|
|
954
|
+
* Expense date (epoch ms)
|
|
955
|
+
* @example 1700000000000
|
|
956
|
+
*/
|
|
957
|
+
date: number;
|
|
958
|
+
/**
|
|
959
|
+
* Expense type
|
|
960
|
+
* @example "Accommodation"
|
|
961
|
+
*/
|
|
962
|
+
type: UpdateExpenseInputSchemaTypeEnum;
|
|
963
|
+
/**
|
|
964
|
+
* Pre-tax amount
|
|
965
|
+
* @min 0
|
|
966
|
+
* @example 150
|
|
967
|
+
*/
|
|
968
|
+
preTaxAmount: number;
|
|
969
|
+
/**
|
|
970
|
+
* Tax amount
|
|
971
|
+
* @min 0
|
|
972
|
+
* @default 0
|
|
973
|
+
* @example 7.5
|
|
974
|
+
*/
|
|
975
|
+
taxAmount?: number;
|
|
976
|
+
/**
|
|
977
|
+
* Number of nights (Accommodation)
|
|
978
|
+
* @min 0
|
|
979
|
+
* @exclusiveMin true
|
|
980
|
+
* @example 2
|
|
981
|
+
*/
|
|
982
|
+
nights?: number;
|
|
983
|
+
/**
|
|
984
|
+
* Meal type (Meal expenses)
|
|
985
|
+
* @example "Lunch"
|
|
986
|
+
*/
|
|
987
|
+
mealType?: UpdateExpenseInputSchemaMealTypeEnum;
|
|
988
|
+
/**
|
|
989
|
+
* Number of kilometres (Mileage)
|
|
990
|
+
* @min 0
|
|
991
|
+
* @exclusiveMin true
|
|
992
|
+
* @example 100
|
|
993
|
+
*/
|
|
994
|
+
numKilometres?: number;
|
|
995
|
+
/**
|
|
996
|
+
* Transportation type (Transportation expenses)
|
|
997
|
+
* @example "Taxi"
|
|
998
|
+
*/
|
|
999
|
+
transportationType?: UpdateExpenseInputSchemaTransportationTypeEnum;
|
|
1000
|
+
/** File attachments for this expense */
|
|
996
1001
|
attachments?: AttachmentSchema[];
|
|
997
1002
|
}
|
|
998
1003
|
/** Updated submission */
|
|
@@ -1036,6 +1041,34 @@ export interface PostApproveResponseSchema {
|
|
|
1036
1041
|
/** New submission status after approval */
|
|
1037
1042
|
status: string;
|
|
1038
1043
|
}
|
|
1044
|
+
export interface CreateSubmissionCodeSchema {
|
|
1045
|
+
/**
|
|
1046
|
+
* Description of the code (1-255 characters)
|
|
1047
|
+
* @minLength 1
|
|
1048
|
+
* @maxLength 255
|
|
1049
|
+
* @example "Consulting services for safety audits"
|
|
1050
|
+
*/
|
|
1051
|
+
description: string;
|
|
1052
|
+
}
|
|
1053
|
+
export interface SubmissionCodeMutationResponseSchema {
|
|
1054
|
+
/** Code identifier */
|
|
1055
|
+
codeID: string;
|
|
1056
|
+
/** Derived department ID */
|
|
1057
|
+
departmentID: string;
|
|
1058
|
+
/** Code description */
|
|
1059
|
+
description: string;
|
|
1060
|
+
}
|
|
1061
|
+
export interface UpdateSubmissionCodeSchema {
|
|
1062
|
+
/**
|
|
1063
|
+
* Description of the code (1-255 characters)
|
|
1064
|
+
* @minLength 1
|
|
1065
|
+
* @maxLength 255
|
|
1066
|
+
* @example "Consulting services for safety audits"
|
|
1067
|
+
*/
|
|
1068
|
+
description: string;
|
|
1069
|
+
}
|
|
1070
|
+
/** Deletion result (empty body) */
|
|
1071
|
+
export type DeleteSubmissionCodeResponseSchema = object;
|
|
1039
1072
|
export interface PutSubmissionCodesSchema {
|
|
1040
1073
|
/** Array of codes to assign to the submission sections */
|
|
1041
1074
|
codes: SubmissionCodeItemSchema[];
|
|
@@ -1149,6 +1182,16 @@ export interface PostReassignResponseSchema {
|
|
|
1149
1182
|
/** Reassignment confirmation */
|
|
1150
1183
|
reassigned: boolean;
|
|
1151
1184
|
}
|
|
1185
|
+
/** Rejection reason payload */
|
|
1186
|
+
export interface PostRejectBodySchema {
|
|
1187
|
+
/**
|
|
1188
|
+
* Reason for rejecting the submission
|
|
1189
|
+
* @minLength 1
|
|
1190
|
+
* @maxLength 500
|
|
1191
|
+
* @example "Missing supporting documentation"
|
|
1192
|
+
*/
|
|
1193
|
+
reason: string;
|
|
1194
|
+
}
|
|
1152
1195
|
/** Rejection result */
|
|
1153
1196
|
export interface PostRejectResponseSchema {
|
|
1154
1197
|
/** Submission ID */
|
|
@@ -1455,6 +1498,37 @@ export declare enum UpdateSubmissionSchemaTypeEnum {
|
|
|
1455
1498
|
Submission = "Submission",
|
|
1456
1499
|
Reimbursement = "Reimbursement"
|
|
1457
1500
|
}
|
|
1501
|
+
/**
|
|
1502
|
+
* Expense type
|
|
1503
|
+
* @example "Accommodation"
|
|
1504
|
+
*/
|
|
1505
|
+
export declare enum UpdateExpenseInputSchemaTypeEnum {
|
|
1506
|
+
Accommodation = "Accommodation",
|
|
1507
|
+
Meal = "Meal",
|
|
1508
|
+
Mileage = "Mileage",
|
|
1509
|
+
Transportation = "Transportation",
|
|
1510
|
+
Other = "Other"
|
|
1511
|
+
}
|
|
1512
|
+
/**
|
|
1513
|
+
* Meal type (Meal expenses)
|
|
1514
|
+
* @example "Lunch"
|
|
1515
|
+
*/
|
|
1516
|
+
export declare enum UpdateExpenseInputSchemaMealTypeEnum {
|
|
1517
|
+
Breakfast = "Breakfast",
|
|
1518
|
+
Lunch = "Lunch",
|
|
1519
|
+
Dinner = "Dinner"
|
|
1520
|
+
}
|
|
1521
|
+
/**
|
|
1522
|
+
* Transportation type (Transportation expenses)
|
|
1523
|
+
* @example "Taxi"
|
|
1524
|
+
*/
|
|
1525
|
+
export declare enum UpdateExpenseInputSchemaTransportationTypeEnum {
|
|
1526
|
+
AirTravel = "Air travel",
|
|
1527
|
+
Taxi = "Taxi",
|
|
1528
|
+
Ferry = "Ferry",
|
|
1529
|
+
Rental = "Rental",
|
|
1530
|
+
Other = "Other"
|
|
1531
|
+
}
|
|
1458
1532
|
/** Content type */
|
|
1459
1533
|
export declare enum GetPdfResponseSchemaContentTypeEnum {
|
|
1460
1534
|
ApplicationPdf = "application/pdf"
|
|
@@ -1466,12 +1540,13 @@ export declare enum GetPdfResponseSchemaContentTypeEnum {
|
|
|
1466
1540
|
export declare enum GuestFileMetadataSchemaContentTypeEnum {
|
|
1467
1541
|
ApplicationPdf = "application/pdf"
|
|
1468
1542
|
}
|
|
1469
|
-
export
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1543
|
+
export interface ListCodesParams {
|
|
1544
|
+
/**
|
|
1545
|
+
* Filter codes by department. If omitted, all codes are returned.
|
|
1546
|
+
* @example "DEPT_abc123"
|
|
1547
|
+
*/
|
|
1548
|
+
departmentID?: string;
|
|
1549
|
+
}
|
|
1475
1550
|
export type ListCodesData = GetCodesResponseSchema;
|
|
1476
1551
|
export type ListCodesError = ErrorResponse;
|
|
1477
1552
|
export type CreateSearchData = CodeSearchResponse;
|
|
@@ -1541,6 +1616,12 @@ export interface GetSubmissionParams {
|
|
|
1541
1616
|
* @example "true"
|
|
1542
1617
|
*/
|
|
1543
1618
|
consistentRead?: ConsistentReadEnum;
|
|
1619
|
+
/**
|
|
1620
|
+
* Owner user identifier (submission partition key)
|
|
1621
|
+
* @minLength 1
|
|
1622
|
+
* @example "USR-2RvYIFNJR3CrJHKO0NqgGa1EwcS"
|
|
1623
|
+
*/
|
|
1624
|
+
userId: string;
|
|
1544
1625
|
/**
|
|
1545
1626
|
* Submission identifier
|
|
1546
1627
|
* @minLength 1
|
|
@@ -1572,6 +1653,12 @@ export type DeleteSubmissionData = DeleteSubmissionResponseSchema;
|
|
|
1572
1653
|
export type DeleteSubmissionError = ErrorResponse;
|
|
1573
1654
|
export type CreateApproveData = PostApproveResponseSchema;
|
|
1574
1655
|
export type CreateApproveError = ErrorResponse;
|
|
1656
|
+
export type CreateCodeData = SubmissionCodeMutationResponseSchema;
|
|
1657
|
+
export type CreateCodeError = ErrorResponse;
|
|
1658
|
+
export type UpdateCodeData = SubmissionCodeMutationResponseSchema;
|
|
1659
|
+
export type UpdateCodeError = ErrorResponse;
|
|
1660
|
+
export type DeleteCodeData = DeleteSubmissionCodeResponseSchema;
|
|
1661
|
+
export type DeleteCodeError = ErrorResponse;
|
|
1575
1662
|
export type UpdateCodesData = PutSubmissionCodesResponseSchema;
|
|
1576
1663
|
export type UpdateCodesError = ErrorResponse;
|
|
1577
1664
|
export type CreateFileData = PostFileResponseSchema;
|
|
@@ -1678,7 +1765,7 @@ export declare enum ListSubmissionsParams1TypeEnum {
|
|
|
1678
1765
|
}
|
|
1679
1766
|
export type ListExportData = GetSubmissionsExportResponseSchema;
|
|
1680
1767
|
export type ListExportError = ErrorResponse;
|
|
1681
|
-
export type
|
|
1768
|
+
export type CreateSearchData1 = SubmissionSearchResponse;
|
|
1682
1769
|
export type CreateSearchErrorData = ErrorResponse;
|
|
1683
1770
|
import type { AxiosInstance, AxiosRequestConfig, ResponseType } from 'axios';
|
|
1684
1771
|
export type QueryParamsType = Record<string | number, any>;
|
|
@@ -1723,43 +1810,11 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
1723
1810
|
}
|
|
1724
1811
|
/**
|
|
1725
1812
|
* @title Contractor Module API
|
|
1726
|
-
* @version 1.0.
|
|
1813
|
+
* @version 1.0.18
|
|
1727
1814
|
* @baseUrl http://localhost:8080
|
|
1728
1815
|
* @contact Ikon Integration <ikon@ikonintegration.com> (http://example.com)
|
|
1729
1816
|
*/
|
|
1730
1817
|
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
1731
|
-
code: {
|
|
1732
|
-
/**
|
|
1733
|
-
* @description Creates a new charging code associated with a department. Only Super Administrators can create codes.
|
|
1734
|
-
*
|
|
1735
|
-
* @tags Codes
|
|
1736
|
-
* @name CreateCode
|
|
1737
|
-
* @summary Create Code
|
|
1738
|
-
* @request POST:/code
|
|
1739
|
-
* @secure
|
|
1740
|
-
*/
|
|
1741
|
-
createCode: (data: CreateCodeSchema, params?: RequestParams) => Promise<PostCodeResponseSchema>;
|
|
1742
|
-
/**
|
|
1743
|
-
* @description Updates an existing charging code description. Only Super Administrators can update codes.
|
|
1744
|
-
*
|
|
1745
|
-
* @tags Codes
|
|
1746
|
-
* @name UpdateCode
|
|
1747
|
-
* @summary Update Code
|
|
1748
|
-
* @request PUT:/code/{codeID}
|
|
1749
|
-
* @secure
|
|
1750
|
-
*/
|
|
1751
|
-
updateCode: (codeId: string, data: UpdateCodeSchema, params?: RequestParams) => Promise<PutCodeResponseSchema>;
|
|
1752
|
-
/**
|
|
1753
|
-
* @description Deletes a charging code. Prevents deletion if the code is referenced by existing submissions. Only Super Administrators can delete codes.
|
|
1754
|
-
*
|
|
1755
|
-
* @tags Codes
|
|
1756
|
-
* @name DeleteCode
|
|
1757
|
-
* @summary Delete Code
|
|
1758
|
-
* @request DELETE:/code/{codeID}
|
|
1759
|
-
* @secure
|
|
1760
|
-
*/
|
|
1761
|
-
deleteCode: (codeId: string, params?: RequestParams) => Promise<object>;
|
|
1762
|
-
};
|
|
1763
1818
|
codes: {
|
|
1764
1819
|
/**
|
|
1765
1820
|
* @description Returns all codes or codes filtered by department. Administrators and above can list codes.
|
|
@@ -1770,7 +1825,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1770
1825
|
* @request GET:/codes
|
|
1771
1826
|
* @secure
|
|
1772
1827
|
*/
|
|
1773
|
-
listCodes: (params?: RequestParams) => Promise<GetCodesResponseSchema>;
|
|
1828
|
+
listCodes: (query: ListCodesParams, params?: RequestParams) => Promise<GetCodesResponseSchema>;
|
|
1774
1829
|
/**
|
|
1775
1830
|
* @description Search billing codes by description and code ID.
|
|
1776
1831
|
*
|
|
@@ -1914,7 +1969,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1914
1969
|
};
|
|
1915
1970
|
settings: {
|
|
1916
1971
|
/**
|
|
1917
|
-
* @description Retrieves system settings. Administrators have read-only access. Super Administrators have full access.
|
|
1972
|
+
* @description Retrieves system settings. Administrators and users have read-only access. Super Administrators have full access.
|
|
1918
1973
|
*
|
|
1919
1974
|
* @tags Settings
|
|
1920
1975
|
* @name ListSettings
|
|
@@ -1936,145 +1991,175 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1936
1991
|
};
|
|
1937
1992
|
submission: {
|
|
1938
1993
|
/**
|
|
1939
|
-
* @description Creates a new draft submission for the
|
|
1994
|
+
* @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.
|
|
1940
1995
|
*
|
|
1941
1996
|
* @tags Submissions
|
|
1942
1997
|
* @name CreateSubmission
|
|
1943
1998
|
* @summary Create draft submission
|
|
1944
|
-
* @request POST:/submission
|
|
1999
|
+
* @request POST:/submission/{userID}
|
|
1945
2000
|
* @secure
|
|
1946
2001
|
*/
|
|
1947
|
-
createSubmission: (data: CreateSubmissionSchema, params?: RequestParams) => Promise<PostSubmissionResponseSchema>;
|
|
2002
|
+
createSubmission: (userId: string, data: CreateSubmissionSchema, params?: RequestParams) => Promise<PostSubmissionResponseSchema>;
|
|
1948
2003
|
/**
|
|
1949
2004
|
* @description Returns a single submission with all invoices, expenses, and assigned codes in a single DynamoDB query using an ElectroDB collection. Access is scoped by role: contractors see only their own, admins see their department, accountants/superadmins see any.
|
|
1950
2005
|
*
|
|
1951
2006
|
* @tags Submissions
|
|
1952
2007
|
* @name GetSubmission
|
|
1953
2008
|
* @summary View submission detail
|
|
1954
|
-
* @request GET:/submission/{submissionID}
|
|
2009
|
+
* @request GET:/submission/{userID}/{submissionID}
|
|
1955
2010
|
* @secure
|
|
1956
2011
|
*/
|
|
1957
|
-
getSubmission: ({ submissionId, ...query }: GetSubmissionParams, params?: RequestParams) => Promise<GetSubmissionResponseSchema>;
|
|
2012
|
+
getSubmission: ({ userId, submissionId, ...query }: GetSubmissionParams, params?: RequestParams) => Promise<GetSubmissionResponseSchema>;
|
|
1958
2013
|
/**
|
|
1959
2014
|
* @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.
|
|
1960
2015
|
*
|
|
1961
2016
|
* @tags Submissions
|
|
1962
2017
|
* @name UpdateSubmission
|
|
1963
2018
|
* @summary Update submission
|
|
1964
|
-
* @request PUT:/submission/{submissionID}
|
|
2019
|
+
* @request PUT:/submission/{userID}/{submissionID}
|
|
1965
2020
|
* @secure
|
|
1966
2021
|
*/
|
|
1967
|
-
updateSubmission: (submissionId: string, data: UpdateSubmissionSchema, params?: RequestParams) => Promise<PutSubmissionResponseSchema>;
|
|
2022
|
+
updateSubmission: (userId: string, submissionId: string, data: UpdateSubmissionSchema, params?: RequestParams) => Promise<PutSubmissionResponseSchema>;
|
|
1968
2023
|
/**
|
|
1969
2024
|
* @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.
|
|
1970
2025
|
*
|
|
1971
2026
|
* @tags Submissions
|
|
1972
2027
|
* @name DeleteSubmission
|
|
1973
2028
|
* @summary Delete submission
|
|
1974
|
-
* @request DELETE:/submission/{submissionID}
|
|
2029
|
+
* @request DELETE:/submission/{userID}/{submissionID}
|
|
1975
2030
|
* @secure
|
|
1976
2031
|
*/
|
|
1977
|
-
deleteSubmission: (submissionId: string, params?: RequestParams) => Promise<DeleteSubmissionResponseSchema>;
|
|
2032
|
+
deleteSubmission: (userId: string, submissionId: string, params?: RequestParams) => Promise<DeleteSubmissionResponseSchema>;
|
|
1978
2033
|
/**
|
|
1979
2034
|
* @description Admin: transitions Submitted → Administrator_Approved (notifies accountants + contractor). Accountant: transitions Administrator_Approved → Payment_Pending (notifies contractor).
|
|
1980
2035
|
*
|
|
1981
2036
|
* @tags Submissions
|
|
1982
2037
|
* @name CreateApprove
|
|
1983
2038
|
* @summary Approve a submission
|
|
1984
|
-
* @request POST:/submission/{submissionID}/approve
|
|
2039
|
+
* @request POST:/submission/{userID}/{submissionID}/approve
|
|
2040
|
+
* @secure
|
|
2041
|
+
*/
|
|
2042
|
+
createApprove: (userId: string, submissionId: string, params?: RequestParams) => Promise<PostApproveResponseSchema>;
|
|
2043
|
+
/**
|
|
2044
|
+
* @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.
|
|
2045
|
+
*
|
|
2046
|
+
* @tags Submissions
|
|
2047
|
+
* @name CreateCode
|
|
2048
|
+
* @summary Create code on submission
|
|
2049
|
+
* @request POST:/submission/{userID}/{submissionID}/code
|
|
2050
|
+
* @secure
|
|
2051
|
+
*/
|
|
2052
|
+
createCode: (userId: string, submissionId: string, data: CreateSubmissionCodeSchema, params?: RequestParams) => Promise<SubmissionCodeMutationResponseSchema>;
|
|
2053
|
+
/**
|
|
2054
|
+
* @description Updates the description of a billing code addressed by codeID and derived from the parent submission's department. Admin only.
|
|
2055
|
+
*
|
|
2056
|
+
* @tags Submissions
|
|
2057
|
+
* @name UpdateCode
|
|
2058
|
+
* @summary Update a submission code
|
|
2059
|
+
* @request PUT:/submission/{userID}/{submissionID}/code/{codeID}
|
|
2060
|
+
* @secure
|
|
2061
|
+
*/
|
|
2062
|
+
updateCode: (userId: string, submissionId: string, codeId: string, data: UpdateSubmissionCodeSchema, params?: RequestParams) => Promise<SubmissionCodeMutationResponseSchema>;
|
|
2063
|
+
/**
|
|
2064
|
+
* @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.
|
|
2065
|
+
*
|
|
2066
|
+
* @tags Submissions
|
|
2067
|
+
* @name DeleteCode
|
|
2068
|
+
* @summary Delete a code from a submission
|
|
2069
|
+
* @request DELETE:/submission/{userID}/{submissionID}/code/{codeID}
|
|
1985
2070
|
* @secure
|
|
1986
2071
|
*/
|
|
1987
|
-
|
|
2072
|
+
deleteCode: (userId: string, submissionId: string, codeId: string, params?: RequestParams) => Promise<object>;
|
|
1988
2073
|
/**
|
|
1989
2074
|
* @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.
|
|
1990
2075
|
*
|
|
1991
2076
|
* @tags Submissions
|
|
1992
2077
|
* @name UpdateCodes
|
|
1993
2078
|
* @summary Assign codes to submission sections
|
|
1994
|
-
* @request PUT:/submission/{submissionID}/codes
|
|
2079
|
+
* @request PUT:/submission/{userID}/{submissionID}/codes
|
|
1995
2080
|
* @secure
|
|
1996
2081
|
*/
|
|
1997
|
-
updateCodes: (submissionId: string, data: PutSubmissionCodesSchema, params?: RequestParams) => Promise<PutSubmissionCodesResponseSchema>;
|
|
2082
|
+
updateCodes: (userId: string, submissionId: string, data: PutSubmissionCodesSchema, params?: RequestParams) => Promise<PutSubmissionCodesResponseSchema>;
|
|
1998
2083
|
/**
|
|
1999
2084
|
* @description Validates file constraints (size, type, count) and returns a presigned IKFS URL for uploading a file attachment to a submission line item. Max 10 MB, max 5 files per line item.
|
|
2000
2085
|
*
|
|
2001
2086
|
* @tags Submissions
|
|
2002
2087
|
* @name CreateFile
|
|
2003
2088
|
* @summary Get presigned upload URL for a file attachment
|
|
2004
|
-
* @request POST:/submission/{submissionID}/file
|
|
2089
|
+
* @request POST:/submission/{userID}/{submissionID}/file
|
|
2005
2090
|
* @secure
|
|
2006
2091
|
*/
|
|
2007
|
-
createFile: (submissionId: string, data: FileUploadRequestSchema, params?: RequestParams) => Promise<PostFileResponseSchema>;
|
|
2092
|
+
createFile: (userId: string, submissionId: string, data: FileUploadRequestSchema, params?: RequestParams) => Promise<PostFileResponseSchema>;
|
|
2008
2093
|
/**
|
|
2009
2094
|
* @description Returns a presigned IKFS URL for downloading a file attachment associated with a submission line item.
|
|
2010
2095
|
*
|
|
2011
2096
|
* @tags Submissions
|
|
2012
2097
|
* @name GetFile
|
|
2013
2098
|
* @summary Get presigned download URL for a file attachment
|
|
2014
|
-
* @request GET:/submission/{submissionID}/file/{fileID}
|
|
2099
|
+
* @request GET:/submission/{userID}/{submissionID}/file/{fileID}
|
|
2015
2100
|
* @secure
|
|
2016
2101
|
*/
|
|
2017
|
-
getFile: (submissionId: string, fileId: string, params?: RequestParams) => Promise<GetFileResponseSchema>;
|
|
2102
|
+
getFile: (userId: string, submissionId: string, fileId: string, params?: RequestParams) => Promise<GetFileResponseSchema>;
|
|
2018
2103
|
/**
|
|
2019
2104
|
* @description Transitions a Payment_Pending submission to Paid. Only Accountants may perform this action. Notifies the approving administrator.
|
|
2020
2105
|
*
|
|
2021
2106
|
* @tags Submissions
|
|
2022
2107
|
* @name CreatePaid
|
|
2023
2108
|
* @summary Mark a submission as paid
|
|
2024
|
-
* @request POST:/submission/{submissionID}/paid
|
|
2109
|
+
* @request POST:/submission/{userID}/{submissionID}/paid
|
|
2025
2110
|
* @secure
|
|
2026
2111
|
*/
|
|
2027
|
-
createPaid: (submissionId: string, params?: RequestParams) => Promise<PostPaidResponseSchema>;
|
|
2112
|
+
createPaid: (userId: string, submissionId: string, params?: RequestParams) => Promise<PostPaidResponseSchema>;
|
|
2028
2113
|
/**
|
|
2029
2114
|
* @description Generates and returns a PDF summary of the submission including invoices, expenses, and assigned codes. Returns the PDF as a base64-encoded string.
|
|
2030
2115
|
*
|
|
2031
2116
|
* @tags Submissions
|
|
2032
2117
|
* @name GetPdf
|
|
2033
2118
|
* @summary Generate submission summary PDF
|
|
2034
|
-
* @request GET:/submission/{submissionID}/pdf
|
|
2119
|
+
* @request GET:/submission/{userID}/{submissionID}/pdf
|
|
2035
2120
|
* @secure
|
|
2036
2121
|
*/
|
|
2037
|
-
getPdf: (submissionId: string, params?: RequestParams) => Promise<GetPDFResponseSchema>;
|
|
2122
|
+
getPdf: (userId: string, submissionId: string, params?: RequestParams) => Promise<GetPDFResponseSchema>;
|
|
2038
2123
|
/**
|
|
2039
2124
|
* @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.
|
|
2040
2125
|
*
|
|
2041
2126
|
* @tags Submissions
|
|
2042
2127
|
* @name PutSubmission
|
|
2043
2128
|
* @summary Update submission PO number
|
|
2044
|
-
* @request PUT:/submission/{submissionID}/po
|
|
2129
|
+
* @request PUT:/submission/{userID}/{submissionID}/po
|
|
2045
2130
|
* @secure
|
|
2046
2131
|
*/
|
|
2047
|
-
putSubmission: (submissionId: string, data: UpdatePOSchema, params?: RequestParams) => Promise<PutPOResponseSchema>;
|
|
2132
|
+
putSubmission: (userId: string, submissionId: string, data: UpdatePOSchema, params?: RequestParams) => Promise<PutPOResponseSchema>;
|
|
2048
2133
|
/**
|
|
2049
2134
|
* @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.
|
|
2050
2135
|
*
|
|
2051
2136
|
* @tags Submissions
|
|
2052
2137
|
* @name CreateReassign
|
|
2053
2138
|
* @summary Reassign submission to a different department
|
|
2054
|
-
* @request POST:/submission/{submissionID}/reassign
|
|
2139
|
+
* @request POST:/submission/{userID}/{submissionID}/reassign
|
|
2055
2140
|
* @secure
|
|
2056
2141
|
*/
|
|
2057
|
-
createReassign: (submissionId: string, data: ReassignSubmissionSchema, params?: RequestParams) => Promise<PostReassignResponseSchema>;
|
|
2142
|
+
createReassign: (userId: string, submissionId: string, data: ReassignSubmissionSchema, params?: RequestParams) => Promise<PostReassignResponseSchema>;
|
|
2058
2143
|
/**
|
|
2059
|
-
* @description Admin rejects a Submitted submission; Accountant rejects an Administrator_Approved submission. RSA-sourced submissions cannot be rejected. Notifies the contractor.
|
|
2144
|
+
* @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.
|
|
2060
2145
|
*
|
|
2061
2146
|
* @tags Submissions
|
|
2062
2147
|
* @name CreateReject
|
|
2063
2148
|
* @summary Reject a submission
|
|
2064
|
-
* @request POST:/submission/{submissionID}/reject
|
|
2149
|
+
* @request POST:/submission/{userID}/{submissionID}/reject
|
|
2065
2150
|
* @secure
|
|
2066
2151
|
*/
|
|
2067
|
-
createReject: (submissionId: string, params?: RequestParams) => Promise<PostRejectResponseSchema>;
|
|
2152
|
+
createReject: (userId: string, submissionId: string, data: PostRejectBodySchema, params?: RequestParams) => Promise<PostRejectResponseSchema>;
|
|
2068
2153
|
/**
|
|
2069
2154
|
* @description Transitions a Draft or Rejected submission to Submitted. Only the owning contractor may submit. Routes the submission to department administrators and sends notifications.
|
|
2070
2155
|
*
|
|
2071
2156
|
* @tags Submissions
|
|
2072
2157
|
* @name CreateSubmit
|
|
2073
2158
|
* @summary Submit a draft or rejected submission
|
|
2074
|
-
* @request POST:/submission/{submissionID}/submit
|
|
2159
|
+
* @request POST:/submission/{userID}/{submissionID}/submit
|
|
2075
2160
|
* @secure
|
|
2076
2161
|
*/
|
|
2077
|
-
createSubmit: (submissionId: string, params?: RequestParams) => Promise<PostSubmitResponseSchema>;
|
|
2162
|
+
createSubmit: (userId: string, submissionId: string, params?: RequestParams) => Promise<PostSubmitResponseSchema>;
|
|
2078
2163
|
/**
|
|
2079
2164
|
* @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). When file metadata is provided, the response includes a presigned upload URL for the frontend to PUT the file to.
|
|
2080
2165
|
*
|