@chrt-inc/typescript-sdk 1.772.0 → 1.788.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.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.d.ts +18 -0
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.js +67 -0
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupSharedTaskGroupMileageCreateClientReq.d.ts +23 -0
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.d.ts +46 -9
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.js +148 -16
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListClientCreate1.d.ts +1 -1
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListReorderEntries1.d.ts +1 -1
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.ts +1 -0
- package/dist/cjs/api/types/LineItem1.d.ts +1 -0
- package/dist/cjs/api/types/OperationsTaskListEntry1.d.ts +4 -12
- package/dist/cjs/api/types/OperationsTaskListEntryClientCreate1.d.ts +15 -0
- package/dist/cjs/api/types/OperationsTaskListEntryClientCreate1.js +5 -0
- package/dist/cjs/api/types/OrderTemplate1.d.ts +1 -0
- package/dist/cjs/api/types/OrderTemplateCore1.d.ts +1 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.d.mts +18 -0
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.mjs +67 -0
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupSharedTaskGroupMileageCreateClientReq.d.mts +23 -0
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.d.mts +46 -9
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.mjs +148 -16
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListClientCreate1.d.mts +1 -1
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListReorderEntries1.d.mts +1 -1
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.mts +1 -0
- package/dist/esm/api/types/LineItem1.d.mts +1 -0
- package/dist/esm/api/types/OperationsTaskListEntry1.d.mts +4 -12
- package/dist/esm/api/types/OperationsTaskListEntryClientCreate1.d.mts +15 -0
- package/dist/esm/api/types/OperationsTaskListEntryClientCreate1.mjs +4 -0
- package/dist/esm/api/types/OrderTemplate1.d.mts +1 -0
- package/dist/esm/api/types/OrderTemplateCore1.d.mts +1 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +233 -7
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.d.ts +0 -11
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.d.mts +0 -11
- /package/dist/cjs/api/resources/{operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.js → billing/resources/lineItemGroups/client/requests/LineItemGroupSharedTaskGroupMileageCreateClientReq.js} +0 -0
- /package/dist/esm/api/resources/{operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.mjs → billing/resources/lineItemGroups/client/requests/LineItemGroupSharedTaskGroupMileageCreateClientReq.mjs} +0 -0
|
@@ -268,5 +268,23 @@ export declare class LineItemGroups {
|
|
|
268
268
|
*/
|
|
269
269
|
fromRateSheetCreateForProviderPayDriverV1(request: Chrt.CreateLigFromRateSheetForVectorClientReq, requestOptions?: LineItemGroups.RequestOptions): core.HttpResponsePromise<Chrt.LineItemGroup1>;
|
|
270
270
|
private __fromRateSheetCreateForProviderPayDriverV1;
|
|
271
|
+
/**
|
|
272
|
+
* Prices a single driver's combined trip across several task groups once. Recomputes route mileage from the ordered task locations (plus optional start/end legs), applies the CHRT-ground rate sheet, and atomically creates an OrderGroup-anchored LineItemGroup, its mileage LineItems, and the LineItemCalculation that records how the charges were derived. The LIG is detached on create (task_group_id is None) — attach to a Statement afterwards. | authz: allowed_org_types=[provider], min_org_role=operator | (LineItemGroupSharedTaskGroupMileageCreateClientReq) -> (LineItemGroup1)
|
|
273
|
+
*
|
|
274
|
+
* @param {Chrt.billing.LineItemGroupSharedTaskGroupMileageCreateClientReq} request
|
|
275
|
+
* @param {LineItemGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
276
|
+
*
|
|
277
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
278
|
+
*
|
|
279
|
+
* @example
|
|
280
|
+
* await client.billing.lineItemGroups.sharedTaskGroupMileageCreateV1({
|
|
281
|
+
* order_group_id: "order_group_id",
|
|
282
|
+
* rate_sheet_id: "rate_sheet_id",
|
|
283
|
+
* payment_destination_driver_id: "payment_destination_driver_id",
|
|
284
|
+
* task_ids: ["task_ids"]
|
|
285
|
+
* })
|
|
286
|
+
*/
|
|
287
|
+
sharedTaskGroupMileageCreateV1(request: Chrt.billing.LineItemGroupSharedTaskGroupMileageCreateClientReq, requestOptions?: LineItemGroups.RequestOptions): core.HttpResponsePromise<Chrt.LineItemGroup1>;
|
|
288
|
+
private __sharedTaskGroupMileageCreateV1;
|
|
271
289
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
272
290
|
}
|
|
@@ -1021,6 +1021,73 @@ export class LineItemGroups {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
});
|
|
1023
1023
|
}
|
|
1024
|
+
/**
|
|
1025
|
+
* Prices a single driver's combined trip across several task groups once. Recomputes route mileage from the ordered task locations (plus optional start/end legs), applies the CHRT-ground rate sheet, and atomically creates an OrderGroup-anchored LineItemGroup, its mileage LineItems, and the LineItemCalculation that records how the charges were derived. The LIG is detached on create (task_group_id is None) — attach to a Statement afterwards. | authz: allowed_org_types=[provider], min_org_role=operator | (LineItemGroupSharedTaskGroupMileageCreateClientReq) -> (LineItemGroup1)
|
|
1026
|
+
*
|
|
1027
|
+
* @param {Chrt.billing.LineItemGroupSharedTaskGroupMileageCreateClientReq} request
|
|
1028
|
+
* @param {LineItemGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
1029
|
+
*
|
|
1030
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
1031
|
+
*
|
|
1032
|
+
* @example
|
|
1033
|
+
* await client.billing.lineItemGroups.sharedTaskGroupMileageCreateV1({
|
|
1034
|
+
* order_group_id: "order_group_id",
|
|
1035
|
+
* rate_sheet_id: "rate_sheet_id",
|
|
1036
|
+
* payment_destination_driver_id: "payment_destination_driver_id",
|
|
1037
|
+
* task_ids: ["task_ids"]
|
|
1038
|
+
* })
|
|
1039
|
+
*/
|
|
1040
|
+
sharedTaskGroupMileageCreateV1(request, requestOptions) {
|
|
1041
|
+
return core.HttpResponsePromise.fromPromise(this.__sharedTaskGroupMileageCreateV1(request, requestOptions));
|
|
1042
|
+
}
|
|
1043
|
+
__sharedTaskGroupMileageCreateV1(request, requestOptions) {
|
|
1044
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1045
|
+
var _a, _b, _c, _d;
|
|
1046
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1047
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1048
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "billing/line_item_groups/shared_task_group_mileage/create/v1"),
|
|
1049
|
+
method: "POST",
|
|
1050
|
+
headers: _headers,
|
|
1051
|
+
contentType: "application/json",
|
|
1052
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1053
|
+
requestType: "json",
|
|
1054
|
+
body: request,
|
|
1055
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1056
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1057
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1058
|
+
});
|
|
1059
|
+
if (_response.ok) {
|
|
1060
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1061
|
+
}
|
|
1062
|
+
if (_response.error.reason === "status-code") {
|
|
1063
|
+
switch (_response.error.statusCode) {
|
|
1064
|
+
case 422:
|
|
1065
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1066
|
+
default:
|
|
1067
|
+
throw new errors.ChrtError({
|
|
1068
|
+
statusCode: _response.error.statusCode,
|
|
1069
|
+
body: _response.error.body,
|
|
1070
|
+
rawResponse: _response.rawResponse,
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
switch (_response.error.reason) {
|
|
1075
|
+
case "non-json":
|
|
1076
|
+
throw new errors.ChrtError({
|
|
1077
|
+
statusCode: _response.error.statusCode,
|
|
1078
|
+
body: _response.error.rawBody,
|
|
1079
|
+
rawResponse: _response.rawResponse,
|
|
1080
|
+
});
|
|
1081
|
+
case "timeout":
|
|
1082
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/line_item_groups/shared_task_group_mileage/create/v1.");
|
|
1083
|
+
case "unknown":
|
|
1084
|
+
throw new errors.ChrtError({
|
|
1085
|
+
message: _response.error.errorMessage,
|
|
1086
|
+
rawResponse: _response.rawResponse,
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1024
1091
|
_getAuthorizationHeader() {
|
|
1025
1092
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1026
1093
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* order_group_id: "order_group_id",
|
|
9
|
+
* rate_sheet_id: "rate_sheet_id",
|
|
10
|
+
* payment_destination_driver_id: "payment_destination_driver_id",
|
|
11
|
+
* task_ids: ["task_ids"]
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export interface LineItemGroupSharedTaskGroupMileageCreateClientReq {
|
|
15
|
+
order_group_id: string;
|
|
16
|
+
rate_sheet_id: string;
|
|
17
|
+
payment_destination_driver_id: string;
|
|
18
|
+
task_ids: string[];
|
|
19
|
+
start_location?: Chrt.LocationFeature | null;
|
|
20
|
+
start_location_label?: string | null;
|
|
21
|
+
end_location?: Chrt.LocationFeature | null;
|
|
22
|
+
end_location_label?: string | null;
|
|
23
|
+
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { type LineItemGroupsListV1Request } from "./LineItemGroupsListV1Request.mjs";
|
|
2
2
|
export { type LineItemGroupAdHocCreateClientReq } from "./LineItemGroupAdHocCreateClientReq.mjs";
|
|
3
|
+
export { type LineItemGroupSharedTaskGroupMileageCreateClientReq } from "./LineItemGroupSharedTaskGroupMileageCreateClientReq.mjs";
|
|
@@ -93,21 +93,58 @@ export declare class OperationsTaskLists {
|
|
|
93
93
|
createV1(request: Chrt.operations.OperationsTaskListClientCreate1, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<string>;
|
|
94
94
|
private __createV1;
|
|
95
95
|
/**
|
|
96
|
-
*
|
|
96
|
+
* Appends a new entry to an OperationsTaskList's `entries` array. The server assigns a fresh UUID and returns it. Order is load-bearing for from_previous_task-anchored deadlines. | authz: min_org_role=operator | (OperationsTaskListEntryClientCreate1) -> (str)
|
|
97
97
|
*
|
|
98
98
|
* @param {string} taskListId
|
|
99
|
-
* @param {Chrt.
|
|
99
|
+
* @param {Chrt.OperationsTaskListEntryClientCreate1} request
|
|
100
100
|
* @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
|
|
101
101
|
*
|
|
102
102
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
103
103
|
*
|
|
104
104
|
* @example
|
|
105
|
-
* await client.operations.operationsTaskLists.
|
|
105
|
+
* await client.operations.operationsTaskLists.addEntryV1("task_list_id", {
|
|
106
|
+
* task_type: "review_order_details",
|
|
107
|
+
* title: "title",
|
|
108
|
+
* description: "description"
|
|
109
|
+
* })
|
|
110
|
+
*/
|
|
111
|
+
addEntryV1(taskListId: string, request: Chrt.OperationsTaskListEntryClientCreate1, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<string>;
|
|
112
|
+
private __addEntryV1;
|
|
113
|
+
/**
|
|
114
|
+
* Replaces the entry with the given uuid in an OperationsTaskList's `entries` array. The stored uuid is preserved regardless of the request body. 404 if no entry matches. | authz: min_org_role=operator | (OperationsTaskListEntryClientCreate1) -> (bool)
|
|
115
|
+
*
|
|
116
|
+
* @param {string} taskListId
|
|
117
|
+
* @param {string} entryUuid
|
|
118
|
+
* @param {Chrt.OperationsTaskListEntryClientCreate1} request
|
|
119
|
+
* @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
|
+
*
|
|
121
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* await client.operations.operationsTaskLists.editEntryV1("task_list_id", "entry_uuid", {
|
|
125
|
+
* task_type: "review_order_details",
|
|
126
|
+
* title: "title",
|
|
127
|
+
* description: "description"
|
|
128
|
+
* })
|
|
129
|
+
*/
|
|
130
|
+
editEntryV1(taskListId: string, entryUuid: string, request: Chrt.OperationsTaskListEntryClientCreate1, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
131
|
+
private __editEntryV1;
|
|
132
|
+
/**
|
|
133
|
+
* Removes the entry with the given uuid from an OperationsTaskList's `entries` array, closing the gap in order. 404 if no entry matches. | authz: min_org_role=operator | () -> (bool)
|
|
134
|
+
*
|
|
135
|
+
* @param {string} taskListId
|
|
136
|
+
* @param {string} entryUuid
|
|
137
|
+
* @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
|
|
138
|
+
*
|
|
139
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* await client.operations.operationsTaskLists.removeEntryV1("task_list_id", "entry_uuid")
|
|
106
143
|
*/
|
|
107
|
-
|
|
108
|
-
private
|
|
144
|
+
removeEntryV1(taskListId: string, entryUuid: string, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
145
|
+
private __removeEntryV1;
|
|
109
146
|
/**
|
|
110
|
-
* Reorders an OperationsTaskList's existing entries. `
|
|
147
|
+
* Reorders an OperationsTaskList's existing entries. `entry_uuids` must be an exact permutation of the list's current entry uuids (every uuid present, no extras, no duplicates), so a reorder can never drop, add, or mutate an entry. | authz: min_org_role=operator | (OperationsTaskListReorderEntries1) -> (bool)
|
|
111
148
|
*
|
|
112
149
|
* @param {string} taskListId
|
|
113
150
|
* @param {Chrt.operations.OperationsTaskListReorderEntries1} request
|
|
@@ -173,9 +210,9 @@ export declare class OperationsTaskLists {
|
|
|
173
210
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
174
211
|
*
|
|
175
212
|
* @example
|
|
176
|
-
* await client.operations.operationsTaskLists.
|
|
213
|
+
* await client.operations.operationsTaskLists.removeNotStartedTasksFromCaseV1("task_list_id", "case_id")
|
|
177
214
|
*/
|
|
178
|
-
|
|
179
|
-
private
|
|
215
|
+
removeNotStartedTasksFromCaseV1(taskListId: string, caseId: string, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<Chrt.OperationsTaskListRemoveFromCaseRes1>;
|
|
216
|
+
private __removeNotStartedTasksFromCaseV1;
|
|
180
217
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
181
218
|
}
|
|
@@ -289,26 +289,30 @@ export class OperationsTaskLists {
|
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
291
|
/**
|
|
292
|
-
*
|
|
292
|
+
* Appends a new entry to an OperationsTaskList's `entries` array. The server assigns a fresh UUID and returns it. Order is load-bearing for from_previous_task-anchored deadlines. | authz: min_org_role=operator | (OperationsTaskListEntryClientCreate1) -> (str)
|
|
293
293
|
*
|
|
294
294
|
* @param {string} taskListId
|
|
295
|
-
* @param {Chrt.
|
|
295
|
+
* @param {Chrt.OperationsTaskListEntryClientCreate1} request
|
|
296
296
|
* @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
|
|
297
297
|
*
|
|
298
298
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
299
299
|
*
|
|
300
300
|
* @example
|
|
301
|
-
* await client.operations.operationsTaskLists.
|
|
301
|
+
* await client.operations.operationsTaskLists.addEntryV1("task_list_id", {
|
|
302
|
+
* task_type: "review_order_details",
|
|
303
|
+
* title: "title",
|
|
304
|
+
* description: "description"
|
|
305
|
+
* })
|
|
302
306
|
*/
|
|
303
|
-
|
|
304
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
307
|
+
addEntryV1(taskListId, request, requestOptions) {
|
|
308
|
+
return core.HttpResponsePromise.fromPromise(this.__addEntryV1(taskListId, request, requestOptions));
|
|
305
309
|
}
|
|
306
|
-
|
|
307
|
-
return __awaiter(this,
|
|
310
|
+
__addEntryV1(taskListId, request, requestOptions) {
|
|
311
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
308
312
|
var _a, _b, _c, _d;
|
|
309
313
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
310
314
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
311
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/operations_task_lists/entries/
|
|
315
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/operations_task_lists/entries/add/v1/${encodeURIComponent(taskListId)}`),
|
|
312
316
|
method: "POST",
|
|
313
317
|
headers: _headers,
|
|
314
318
|
contentType: "application/json",
|
|
@@ -342,7 +346,135 @@ export class OperationsTaskLists {
|
|
|
342
346
|
rawResponse: _response.rawResponse,
|
|
343
347
|
});
|
|
344
348
|
case "timeout":
|
|
345
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/operations_task_lists/entries/
|
|
349
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/operations_task_lists/entries/add/v1/{task_list_id}.");
|
|
350
|
+
case "unknown":
|
|
351
|
+
throw new errors.ChrtError({
|
|
352
|
+
message: _response.error.errorMessage,
|
|
353
|
+
rawResponse: _response.rawResponse,
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Replaces the entry with the given uuid in an OperationsTaskList's `entries` array. The stored uuid is preserved regardless of the request body. 404 if no entry matches. | authz: min_org_role=operator | (OperationsTaskListEntryClientCreate1) -> (bool)
|
|
360
|
+
*
|
|
361
|
+
* @param {string} taskListId
|
|
362
|
+
* @param {string} entryUuid
|
|
363
|
+
* @param {Chrt.OperationsTaskListEntryClientCreate1} request
|
|
364
|
+
* @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
|
|
365
|
+
*
|
|
366
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
367
|
+
*
|
|
368
|
+
* @example
|
|
369
|
+
* await client.operations.operationsTaskLists.editEntryV1("task_list_id", "entry_uuid", {
|
|
370
|
+
* task_type: "review_order_details",
|
|
371
|
+
* title: "title",
|
|
372
|
+
* description: "description"
|
|
373
|
+
* })
|
|
374
|
+
*/
|
|
375
|
+
editEntryV1(taskListId, entryUuid, request, requestOptions) {
|
|
376
|
+
return core.HttpResponsePromise.fromPromise(this.__editEntryV1(taskListId, entryUuid, request, requestOptions));
|
|
377
|
+
}
|
|
378
|
+
__editEntryV1(taskListId, entryUuid, request, requestOptions) {
|
|
379
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
380
|
+
var _a, _b, _c, _d;
|
|
381
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
382
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
383
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/operations_task_lists/entries/edit/v1/${encodeURIComponent(taskListId)}/${encodeURIComponent(entryUuid)}`),
|
|
384
|
+
method: "PATCH",
|
|
385
|
+
headers: _headers,
|
|
386
|
+
contentType: "application/json",
|
|
387
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
388
|
+
requestType: "json",
|
|
389
|
+
body: request,
|
|
390
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
391
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
392
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
393
|
+
});
|
|
394
|
+
if (_response.ok) {
|
|
395
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
396
|
+
}
|
|
397
|
+
if (_response.error.reason === "status-code") {
|
|
398
|
+
switch (_response.error.statusCode) {
|
|
399
|
+
case 422:
|
|
400
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
401
|
+
default:
|
|
402
|
+
throw new errors.ChrtError({
|
|
403
|
+
statusCode: _response.error.statusCode,
|
|
404
|
+
body: _response.error.body,
|
|
405
|
+
rawResponse: _response.rawResponse,
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
switch (_response.error.reason) {
|
|
410
|
+
case "non-json":
|
|
411
|
+
throw new errors.ChrtError({
|
|
412
|
+
statusCode: _response.error.statusCode,
|
|
413
|
+
body: _response.error.rawBody,
|
|
414
|
+
rawResponse: _response.rawResponse,
|
|
415
|
+
});
|
|
416
|
+
case "timeout":
|
|
417
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /operations/operations_task_lists/entries/edit/v1/{task_list_id}/{entry_uuid}.");
|
|
418
|
+
case "unknown":
|
|
419
|
+
throw new errors.ChrtError({
|
|
420
|
+
message: _response.error.errorMessage,
|
|
421
|
+
rawResponse: _response.rawResponse,
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Removes the entry with the given uuid from an OperationsTaskList's `entries` array, closing the gap in order. 404 if no entry matches. | authz: min_org_role=operator | () -> (bool)
|
|
428
|
+
*
|
|
429
|
+
* @param {string} taskListId
|
|
430
|
+
* @param {string} entryUuid
|
|
431
|
+
* @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
|
|
432
|
+
*
|
|
433
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
434
|
+
*
|
|
435
|
+
* @example
|
|
436
|
+
* await client.operations.operationsTaskLists.removeEntryV1("task_list_id", "entry_uuid")
|
|
437
|
+
*/
|
|
438
|
+
removeEntryV1(taskListId, entryUuid, requestOptions) {
|
|
439
|
+
return core.HttpResponsePromise.fromPromise(this.__removeEntryV1(taskListId, entryUuid, requestOptions));
|
|
440
|
+
}
|
|
441
|
+
__removeEntryV1(taskListId, entryUuid, requestOptions) {
|
|
442
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
443
|
+
var _a, _b, _c, _d;
|
|
444
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
445
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
446
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/operations_task_lists/entries/remove/v1/${encodeURIComponent(taskListId)}/${encodeURIComponent(entryUuid)}`),
|
|
447
|
+
method: "DELETE",
|
|
448
|
+
headers: _headers,
|
|
449
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
450
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
451
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
452
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
453
|
+
});
|
|
454
|
+
if (_response.ok) {
|
|
455
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
456
|
+
}
|
|
457
|
+
if (_response.error.reason === "status-code") {
|
|
458
|
+
switch (_response.error.statusCode) {
|
|
459
|
+
case 422:
|
|
460
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
461
|
+
default:
|
|
462
|
+
throw new errors.ChrtError({
|
|
463
|
+
statusCode: _response.error.statusCode,
|
|
464
|
+
body: _response.error.body,
|
|
465
|
+
rawResponse: _response.rawResponse,
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
switch (_response.error.reason) {
|
|
470
|
+
case "non-json":
|
|
471
|
+
throw new errors.ChrtError({
|
|
472
|
+
statusCode: _response.error.statusCode,
|
|
473
|
+
body: _response.error.rawBody,
|
|
474
|
+
rawResponse: _response.rawResponse,
|
|
475
|
+
});
|
|
476
|
+
case "timeout":
|
|
477
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /operations/operations_task_lists/entries/remove/v1/{task_list_id}/{entry_uuid}.");
|
|
346
478
|
case "unknown":
|
|
347
479
|
throw new errors.ChrtError({
|
|
348
480
|
message: _response.error.errorMessage,
|
|
@@ -352,7 +484,7 @@ export class OperationsTaskLists {
|
|
|
352
484
|
});
|
|
353
485
|
}
|
|
354
486
|
/**
|
|
355
|
-
* Reorders an OperationsTaskList's existing entries. `
|
|
487
|
+
* Reorders an OperationsTaskList's existing entries. `entry_uuids` must be an exact permutation of the list's current entry uuids (every uuid present, no extras, no duplicates), so a reorder can never drop, add, or mutate an entry. | authz: min_org_role=operator | (OperationsTaskListReorderEntries1) -> (bool)
|
|
356
488
|
*
|
|
357
489
|
* @param {string} taskListId
|
|
358
490
|
* @param {Chrt.operations.OperationsTaskListReorderEntries1} request
|
|
@@ -610,17 +742,17 @@ export class OperationsTaskLists {
|
|
|
610
742
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
611
743
|
*
|
|
612
744
|
* @example
|
|
613
|
-
* await client.operations.operationsTaskLists.
|
|
745
|
+
* await client.operations.operationsTaskLists.removeNotStartedTasksFromCaseV1("task_list_id", "case_id")
|
|
614
746
|
*/
|
|
615
|
-
|
|
616
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
747
|
+
removeNotStartedTasksFromCaseV1(taskListId, caseId, requestOptions) {
|
|
748
|
+
return core.HttpResponsePromise.fromPromise(this.__removeNotStartedTasksFromCaseV1(taskListId, caseId, requestOptions));
|
|
617
749
|
}
|
|
618
|
-
|
|
750
|
+
__removeNotStartedTasksFromCaseV1(taskListId, caseId, requestOptions) {
|
|
619
751
|
return __awaiter(this, void 0, void 0, function* () {
|
|
620
752
|
var _a, _b, _c, _d;
|
|
621
753
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
622
754
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
623
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/operations_task_lists/
|
|
755
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/operations_task_lists/remove_not_started_tasks_from_case/v1/${encodeURIComponent(taskListId)}/${encodeURIComponent(caseId)}`),
|
|
624
756
|
method: "POST",
|
|
625
757
|
headers: _headers,
|
|
626
758
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -654,7 +786,7 @@ export class OperationsTaskLists {
|
|
|
654
786
|
rawResponse: _response.rawResponse,
|
|
655
787
|
});
|
|
656
788
|
case "timeout":
|
|
657
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/operations_task_lists/
|
|
789
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/operations_task_lists/remove_not_started_tasks_from_case/v1/{task_list_id}/{case_id}.");
|
|
658
790
|
case "unknown":
|
|
659
791
|
throw new errors.ChrtError({
|
|
660
792
|
message: _response.error.errorMessage,
|
package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { type OperationsTaskListsListV1Request } from "./OperationsTaskListsListV1Request.mjs";
|
|
2
2
|
export { type OperationsTaskListClientUpdate1 } from "./OperationsTaskListClientUpdate1.mjs";
|
|
3
3
|
export { type OperationsTaskListClientCreate1 } from "./OperationsTaskListClientCreate1.mjs";
|
|
4
|
-
export { type OperationsTaskListSetEntries1 } from "./OperationsTaskListSetEntries1.mjs";
|
|
5
4
|
export { type OperationsTaskListReorderEntries1 } from "./OperationsTaskListReorderEntries1.mjs";
|
|
6
5
|
export { type OperationsTaskListsApplyToCaseV1Request } from "./OperationsTaskListsApplyToCaseV1Request.mjs";
|
|
@@ -15,6 +15,8 @@ export interface OrdersNewDraftReq {
|
|
|
15
15
|
/** Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, '.', '_', '~', '-' (RFC 3986 unreserved). */
|
|
16
16
|
off_chrt_reference_id?: string | null;
|
|
17
17
|
department_id?: string | null;
|
|
18
|
+
/** OperationsTaskList ids to apply to the coordinator's Case at draft creation; foreign/stale ids are skipped without failing the draft. */
|
|
19
|
+
task_list_ids?: string[];
|
|
18
20
|
/** Optional key, unique per caller org, that makes draft creation idempotent: re-sending the same key returns the already-created draft instead of creating a duplicate. */
|
|
19
21
|
creation_idempotency_key?: string | null;
|
|
20
22
|
/** Seed content for the OrderThread's first user turn (text + long-lived references). Agentic builds supply it; click-ops leaves it None for a blank seed turn. */
|
|
@@ -20,6 +20,7 @@ export interface OrderTemplateClientCreate1 {
|
|
|
20
20
|
/** Must be a string starting with `org_` */
|
|
21
21
|
coordinator_org_id?: string | null;
|
|
22
22
|
department_id?: string | null;
|
|
23
|
+
task_list_ids?: string[];
|
|
23
24
|
name: string;
|
|
24
25
|
description?: string | null;
|
|
25
26
|
off_chrt_reference_id_str?: string | null;
|
|
@@ -19,6 +19,7 @@ export interface OrderTemplateClientUpdate1 {
|
|
|
19
19
|
/** Must be a string starting with `org_` */
|
|
20
20
|
coordinator_org_id?: string | null;
|
|
21
21
|
department_id?: string | null;
|
|
22
|
+
task_list_ids?: string[];
|
|
22
23
|
description__set_to_None?: boolean;
|
|
23
24
|
text__set_to_None?: boolean;
|
|
24
25
|
off_chrt_reference_id_str__set_to_None?: boolean;
|
|
@@ -26,6 +26,7 @@ export interface LineItem1 {
|
|
|
26
26
|
ad_hoc__status?: Chrt.LineItemStatusEnum | null;
|
|
27
27
|
rate_sheet_id?: string | null;
|
|
28
28
|
pro_forma__bid_thread_id?: string | null;
|
|
29
|
+
line_item_calculation_id?: string | null;
|
|
29
30
|
created_at_timestamp?: string;
|
|
30
31
|
line_item_s3_object_metadata_ids?: string[];
|
|
31
32
|
}
|
|
@@ -3,23 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Chrt from "../index.mjs";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* The deadline is computed from (`deadline_anchor`, `deadline_offset_seconds`):
|
|
11
|
-
* `FROM_FIRST_TASK` => the first entry's resolved deadline + offset;
|
|
12
|
-
* `FROM_PREVIOUS_TASK` => the previous entry's resolved deadline + offset (the
|
|
13
|
-
* first entry's "previous" is `apply_time`). The first entry itself anchors to
|
|
14
|
-
* `apply_time` (or the apply-time `initial_deadline_timestamp` pin). Defaults to
|
|
15
|
-
* `FROM_PREVIOUS_TASK` + 1200s, which reproduces the 20-min positional stagger.
|
|
16
|
-
* `deadline_offset_seconds` may be negative.
|
|
6
|
+
* A stored Task List entry: client content plus a server-assigned stable
|
|
7
|
+
* `uuid`. The `uuid` keys the edit / remove / reorder routes (entries are not
|
|
8
|
+
* unique by `task_type` — a list can repeat a type).
|
|
17
9
|
*/
|
|
18
10
|
export interface OperationsTaskListEntry1 {
|
|
19
|
-
id?: string;
|
|
20
11
|
task_type: Chrt.OperationsTaskTypeEnum;
|
|
21
12
|
title: string;
|
|
22
13
|
description: string;
|
|
23
14
|
deadline_anchor?: Chrt.DeadlineAnchorEnum;
|
|
24
15
|
deadline_offset_seconds?: number;
|
|
16
|
+
uuid?: string;
|
|
25
17
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Entry content the client supplies — at list-create time and via the add /
|
|
7
|
+
* edit entry routes. Carries no identity: the server assigns the `uuid`.
|
|
8
|
+
*/
|
|
9
|
+
export interface OperationsTaskListEntryClientCreate1 {
|
|
10
|
+
task_type: Chrt.OperationsTaskTypeEnum;
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
deadline_anchor?: Chrt.DeadlineAnchorEnum;
|
|
14
|
+
deadline_offset_seconds?: number;
|
|
15
|
+
}
|
|
@@ -13,6 +13,7 @@ export interface OrderTemplate1 {
|
|
|
13
13
|
/** Must be a string starting with `org_` */
|
|
14
14
|
coordinator_org_id?: string | null;
|
|
15
15
|
department_id?: string | null;
|
|
16
|
+
task_list_ids?: string[];
|
|
16
17
|
name: string;
|
|
17
18
|
description?: string | null;
|
|
18
19
|
off_chrt_reference_id_str?: string | null;
|
|
@@ -229,6 +229,7 @@ export * from "./OperationsTask1.mjs";
|
|
|
229
229
|
export * from "./OperationsTaskComment1.mjs";
|
|
230
230
|
export * from "./OperationsTaskList1.mjs";
|
|
231
231
|
export * from "./OperationsTaskListEntry1.mjs";
|
|
232
|
+
export * from "./OperationsTaskListEntryClientCreate1.mjs";
|
|
232
233
|
export * from "./OperationsTaskListListRes.mjs";
|
|
233
234
|
export * from "./OperationsTaskListRemoveFromCaseRes1.mjs";
|
|
234
235
|
export * from "./OperationsTaskListRes.mjs";
|
|
@@ -229,6 +229,7 @@ export * from "./OperationsTask1.mjs";
|
|
|
229
229
|
export * from "./OperationsTaskComment1.mjs";
|
|
230
230
|
export * from "./OperationsTaskList1.mjs";
|
|
231
231
|
export * from "./OperationsTaskListEntry1.mjs";
|
|
232
|
+
export * from "./OperationsTaskListEntryClientCreate1.mjs";
|
|
232
233
|
export * from "./OperationsTaskListListRes.mjs";
|
|
233
234
|
export * from "./OperationsTaskListRemoveFromCaseRes1.mjs";
|
|
234
235
|
export * from "./OperationsTaskListRes.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.788.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.788.0";
|