@chrt-inc/typescript-sdk 1.321.0 → 1.324.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/drivers/client/Client.d.ts +18 -6
- package/dist/cjs/api/resources/drivers/client/Client.js +70 -32
- package/dist/cjs/api/resources/drivers/client/requests/DriversListOrgMembersAndDriversV1Request.d.ts +16 -0
- package/dist/cjs/api/resources/drivers/client/requests/DriversListV1Request.d.ts +16 -0
- package/dist/cjs/api/resources/drivers/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/Client.d.ts +52 -5
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/Client.js +200 -9
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.d.ts +13 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.js +5 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/SetTaskOrderingDraftReq.d.ts +13 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/SetTaskOrderingDraftReq.js +5 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/UpdateCourierOrgDraftReq.d.ts +13 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/UpdateCourierOrgDraftReq.js +5 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/index.d.ts +3 -1
- package/dist/cjs/api/resources/taskArtifacts/client/Client.d.ts +0 -3
- package/dist/cjs/api/resources/taskArtifacts/client/Client.js +2 -7
- package/dist/cjs/api/resources/taskArtifacts/resources/index.d.ts +1 -1
- package/dist/cjs/api/resources/taskArtifacts/resources/index.js +5 -2
- package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/Client.d.ts +44 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/Client.js +187 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/index.js +15 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.d.ts +13 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.js +5 -0
- package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +0 -33
- package/dist/cjs/api/resources/taskGroups/client/Client.js +4 -137
- package/dist/cjs/api/resources/taskGroups/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/taskGroups/resources/index.d.ts +1 -1
- package/dist/cjs/api/resources/taskGroups/resources/index.js +2 -2
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/Client.d.ts +44 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/Client.js +187 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/index.js +15 -0
- package/dist/cjs/api/resources/taskGroups/{client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.d.ts → resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.d.ts} +2 -2
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.js +5 -0
- package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/requests/index.d.ts +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/drivers/client/Client.d.mts +18 -6
- package/dist/esm/api/resources/drivers/client/Client.mjs +70 -32
- package/dist/esm/api/resources/drivers/client/requests/DriversListOrgMembersAndDriversV1Request.d.mts +16 -0
- package/dist/esm/api/resources/drivers/client/requests/DriversListV1Request.d.mts +16 -0
- package/dist/esm/api/resources/drivers/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/Client.d.mts +52 -5
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/Client.mjs +200 -9
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.d.mts +13 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.mjs +4 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/SetTaskOrderingDraftReq.d.mts +13 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/SetTaskOrderingDraftReq.mjs +4 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/UpdateCourierOrgDraftReq.d.mts +13 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/UpdateCourierOrgDraftReq.mjs +4 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/index.d.mts +3 -1
- package/dist/esm/api/resources/taskArtifacts/client/Client.d.mts +0 -3
- package/dist/esm/api/resources/taskArtifacts/client/Client.mjs +0 -5
- package/dist/esm/api/resources/taskArtifacts/resources/index.d.mts +1 -1
- package/dist/esm/api/resources/taskArtifacts/resources/index.mjs +1 -1
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/Client.d.mts +44 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/Client.mjs +187 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/index.d.mts +1 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/index.mjs +1 -1
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.d.mts +13 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.mjs +4 -0
- package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/client/Client.d.mts +0 -33
- package/dist/esm/api/resources/taskGroups/client/Client.mjs +0 -133
- package/dist/esm/api/resources/taskGroups/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/taskGroups/resources/index.d.mts +1 -1
- package/dist/esm/api/resources/taskGroups/resources/index.mjs +1 -1
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/Client.d.mts +44 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/Client.mjs +187 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/index.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/index.mjs +1 -1
- package/dist/esm/api/resources/taskGroups/{client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.d.mts → resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.d.mts} +2 -2
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.mjs +4 -0
- package/dist/esm/api/resources/taskGroups/resources/s3Object/client/requests/index.d.mts +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 +578 -213
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/UpdateTaskGroupDraftReq.d.ts +0 -13
- package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.d.ts +0 -47
- package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.js +0 -127
- package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/index.d.ts +0 -1
- package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/index.js +0 -17
- package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.d.ts +0 -47
- package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.js +0 -127
- package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/index.d.ts +0 -1
- package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/index.js +0 -17
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/UpdateTaskGroupDraftReq.d.mts +0 -13
- package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.d.mts +0 -47
- package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.mjs +0 -90
- package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/index.d.mts +0 -1
- package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/index.d.mts +0 -1
- package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/index.mjs +0 -1
- package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.d.mts +0 -47
- package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.mjs +0 -90
- package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.d.mts +0 -1
- package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/index.d.mts +0 -1
- package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/index.mjs +0 -1
- /package/dist/cjs/api/resources/{orderDrafts/resources/taskGroup/client/requests/UpdateTaskGroupDraftReq.js → drivers/client/requests/DriversListOrgMembersAndDriversV1Request.js} +0 -0
- /package/dist/cjs/api/resources/{taskGroups/client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.js → drivers/client/requests/DriversListV1Request.js} +0 -0
- /package/dist/cjs/api/resources/taskArtifacts/resources/{s3ObjectMetadata/client → s3Object/client/requests}/index.js +0 -0
- /package/dist/cjs/api/resources/taskGroups/resources/{s3ObjectMetadata/client → s3Object/client/requests}/index.js +0 -0
- /package/dist/esm/api/resources/{orderDrafts/resources/taskGroup/client/requests/UpdateTaskGroupDraftReq.mjs → drivers/client/requests/DriversListOrgMembersAndDriversV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/{taskGroups/client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.mjs → drivers/client/requests/DriversListV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/taskArtifacts/resources/{s3ObjectMetadata/client → s3Object/client/requests}/index.mjs +0 -0
- /package/dist/esm/api/resources/taskGroups/resources/{s3ObjectMetadata/client → s3Object/client/requests}/index.mjs +0 -0
|
@@ -47,19 +47,66 @@ export declare class TaskGroup {
|
|
|
47
47
|
addV1(request: Chrt.orderDrafts.OrderDraftAddTaskGroupReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<string>;
|
|
48
48
|
private __addV1;
|
|
49
49
|
/**
|
|
50
|
-
* Sets
|
|
50
|
+
* Sets the flight number on a draft task group. | (SetFlightNumberDraftReq) -> (bool)
|
|
51
51
|
*
|
|
52
52
|
* @param {string} taskGroupId
|
|
53
|
-
* @param {Chrt.orderDrafts.
|
|
53
|
+
* @param {Chrt.orderDrafts.SetFlightNumberDraftReq} request
|
|
54
54
|
* @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
55
|
*
|
|
56
56
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
57
57
|
*
|
|
58
58
|
* @example
|
|
59
|
-
* await client.orderDrafts.taskGroup.
|
|
59
|
+
* await client.orderDrafts.taskGroup.setFlightNumberV1("task_group_id", {
|
|
60
|
+
* flight_number: "flight_number"
|
|
61
|
+
* })
|
|
62
|
+
*/
|
|
63
|
+
setFlightNumberV1(taskGroupId: string, request: Chrt.orderDrafts.SetFlightNumberDraftReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
64
|
+
private __setFlightNumberV1;
|
|
65
|
+
/**
|
|
66
|
+
* Updates the courier organization assigned to a draft task group. | (UpdateCourierOrgDraftReq) -> (bool)
|
|
67
|
+
*
|
|
68
|
+
* @param {string} taskGroupId
|
|
69
|
+
* @param {Chrt.orderDrafts.UpdateCourierOrgDraftReq} request
|
|
70
|
+
* @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* await client.orderDrafts.taskGroup.updateCourierOrgV1("task_group_id", {
|
|
76
|
+
* courier_org_id: "courier_org_id"
|
|
77
|
+
* })
|
|
78
|
+
*/
|
|
79
|
+
updateCourierOrgV1(taskGroupId: string, request: Chrt.orderDrafts.UpdateCourierOrgDraftReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
80
|
+
private __updateCourierOrgV1;
|
|
81
|
+
/**
|
|
82
|
+
* Removes the courier organization from a draft task group (sets courier_org_id to null). | () -> (bool)
|
|
83
|
+
*
|
|
84
|
+
* @param {string} taskGroupId
|
|
85
|
+
* @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
86
|
+
*
|
|
87
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* await client.orderDrafts.taskGroup.removeCourierOrgV1("task_group_id")
|
|
91
|
+
*/
|
|
92
|
+
removeCourierOrgV1(taskGroupId: string, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
93
|
+
private __removeCourierOrgV1;
|
|
94
|
+
/**
|
|
95
|
+
* Sets the ordering of tasks within a draft task group. Must provide all task IDs with no duplicates. | (SetTaskOrderingDraftReq) -> (bool)
|
|
96
|
+
*
|
|
97
|
+
* @param {string} taskGroupId
|
|
98
|
+
* @param {Chrt.orderDrafts.SetTaskOrderingDraftReq} request
|
|
99
|
+
* @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
100
|
+
*
|
|
101
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* await client.orderDrafts.taskGroup.setTaskOrderingV1("task_group_id", {
|
|
105
|
+
* task_ids: ["task_ids"]
|
|
106
|
+
* })
|
|
60
107
|
*/
|
|
61
|
-
|
|
62
|
-
private
|
|
108
|
+
setTaskOrderingV1(taskGroupId: string, request: Chrt.orderDrafts.SetTaskOrderingDraftReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
109
|
+
private __setTaskOrderingV1;
|
|
63
110
|
/**
|
|
64
111
|
* Deletes a task group and all associated entities (tasks, task artifacts, S3 metadata). The task group must belong to a DRAFT order. | () -> (bool)
|
|
65
112
|
*
|
|
@@ -85,26 +85,28 @@ export class TaskGroup {
|
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
|
-
* Sets
|
|
88
|
+
* Sets the flight number on a draft task group. | (SetFlightNumberDraftReq) -> (bool)
|
|
89
89
|
*
|
|
90
90
|
* @param {string} taskGroupId
|
|
91
|
-
* @param {Chrt.orderDrafts.
|
|
91
|
+
* @param {Chrt.orderDrafts.SetFlightNumberDraftReq} request
|
|
92
92
|
* @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
93
93
|
*
|
|
94
94
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
95
95
|
*
|
|
96
96
|
* @example
|
|
97
|
-
* await client.orderDrafts.taskGroup.
|
|
97
|
+
* await client.orderDrafts.taskGroup.setFlightNumberV1("task_group_id", {
|
|
98
|
+
* flight_number: "flight_number"
|
|
99
|
+
* })
|
|
98
100
|
*/
|
|
99
|
-
|
|
100
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
101
|
+
setFlightNumberV1(taskGroupId, request, requestOptions) {
|
|
102
|
+
return core.HttpResponsePromise.fromPromise(this.__setFlightNumberV1(taskGroupId, request, requestOptions));
|
|
101
103
|
}
|
|
102
|
-
|
|
103
|
-
return __awaiter(this,
|
|
104
|
+
__setFlightNumberV1(taskGroupId, request, requestOptions) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
106
|
var _a, _b, _c, _d;
|
|
105
107
|
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);
|
|
106
108
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
107
|
-
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, `oort/order_drafts/task_group/
|
|
109
|
+
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, `oort/order_drafts/task_group/set_flight_number/v1/${encodeURIComponent(taskGroupId)}`),
|
|
108
110
|
method: "PATCH",
|
|
109
111
|
headers: _headers,
|
|
110
112
|
contentType: "application/json",
|
|
@@ -138,7 +140,196 @@ export class TaskGroup {
|
|
|
138
140
|
rawResponse: _response.rawResponse,
|
|
139
141
|
});
|
|
140
142
|
case "timeout":
|
|
141
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/order_drafts/task_group/
|
|
143
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/order_drafts/task_group/set_flight_number/v1/{task_group_id}.");
|
|
144
|
+
case "unknown":
|
|
145
|
+
throw new errors.ChrtError({
|
|
146
|
+
message: _response.error.errorMessage,
|
|
147
|
+
rawResponse: _response.rawResponse,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Updates the courier organization assigned to a draft task group. | (UpdateCourierOrgDraftReq) -> (bool)
|
|
154
|
+
*
|
|
155
|
+
* @param {string} taskGroupId
|
|
156
|
+
* @param {Chrt.orderDrafts.UpdateCourierOrgDraftReq} request
|
|
157
|
+
* @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
158
|
+
*
|
|
159
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* await client.orderDrafts.taskGroup.updateCourierOrgV1("task_group_id", {
|
|
163
|
+
* courier_org_id: "courier_org_id"
|
|
164
|
+
* })
|
|
165
|
+
*/
|
|
166
|
+
updateCourierOrgV1(taskGroupId, request, requestOptions) {
|
|
167
|
+
return core.HttpResponsePromise.fromPromise(this.__updateCourierOrgV1(taskGroupId, request, requestOptions));
|
|
168
|
+
}
|
|
169
|
+
__updateCourierOrgV1(taskGroupId, request, requestOptions) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
var _a, _b, _c, _d;
|
|
172
|
+
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);
|
|
173
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
174
|
+
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, `oort/order_drafts/task_group/update_courier_org/v1/${encodeURIComponent(taskGroupId)}`),
|
|
175
|
+
method: "PATCH",
|
|
176
|
+
headers: _headers,
|
|
177
|
+
contentType: "application/json",
|
|
178
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
179
|
+
requestType: "json",
|
|
180
|
+
body: request,
|
|
181
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
182
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
183
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
184
|
+
});
|
|
185
|
+
if (_response.ok) {
|
|
186
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
187
|
+
}
|
|
188
|
+
if (_response.error.reason === "status-code") {
|
|
189
|
+
switch (_response.error.statusCode) {
|
|
190
|
+
case 422:
|
|
191
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
192
|
+
default:
|
|
193
|
+
throw new errors.ChrtError({
|
|
194
|
+
statusCode: _response.error.statusCode,
|
|
195
|
+
body: _response.error.body,
|
|
196
|
+
rawResponse: _response.rawResponse,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
switch (_response.error.reason) {
|
|
201
|
+
case "non-json":
|
|
202
|
+
throw new errors.ChrtError({
|
|
203
|
+
statusCode: _response.error.statusCode,
|
|
204
|
+
body: _response.error.rawBody,
|
|
205
|
+
rawResponse: _response.rawResponse,
|
|
206
|
+
});
|
|
207
|
+
case "timeout":
|
|
208
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/order_drafts/task_group/update_courier_org/v1/{task_group_id}.");
|
|
209
|
+
case "unknown":
|
|
210
|
+
throw new errors.ChrtError({
|
|
211
|
+
message: _response.error.errorMessage,
|
|
212
|
+
rawResponse: _response.rawResponse,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Removes the courier organization from a draft task group (sets courier_org_id to null). | () -> (bool)
|
|
219
|
+
*
|
|
220
|
+
* @param {string} taskGroupId
|
|
221
|
+
* @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
222
|
+
*
|
|
223
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* await client.orderDrafts.taskGroup.removeCourierOrgV1("task_group_id")
|
|
227
|
+
*/
|
|
228
|
+
removeCourierOrgV1(taskGroupId, requestOptions) {
|
|
229
|
+
return core.HttpResponsePromise.fromPromise(this.__removeCourierOrgV1(taskGroupId, requestOptions));
|
|
230
|
+
}
|
|
231
|
+
__removeCourierOrgV1(taskGroupId, requestOptions) {
|
|
232
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
233
|
+
var _a, _b, _c, _d;
|
|
234
|
+
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);
|
|
235
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
236
|
+
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, `oort/order_drafts/task_group/remove_courier_org/v1/${encodeURIComponent(taskGroupId)}`),
|
|
237
|
+
method: "PATCH",
|
|
238
|
+
headers: _headers,
|
|
239
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
240
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
241
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
242
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
243
|
+
});
|
|
244
|
+
if (_response.ok) {
|
|
245
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
246
|
+
}
|
|
247
|
+
if (_response.error.reason === "status-code") {
|
|
248
|
+
switch (_response.error.statusCode) {
|
|
249
|
+
case 422:
|
|
250
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
251
|
+
default:
|
|
252
|
+
throw new errors.ChrtError({
|
|
253
|
+
statusCode: _response.error.statusCode,
|
|
254
|
+
body: _response.error.body,
|
|
255
|
+
rawResponse: _response.rawResponse,
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
switch (_response.error.reason) {
|
|
260
|
+
case "non-json":
|
|
261
|
+
throw new errors.ChrtError({
|
|
262
|
+
statusCode: _response.error.statusCode,
|
|
263
|
+
body: _response.error.rawBody,
|
|
264
|
+
rawResponse: _response.rawResponse,
|
|
265
|
+
});
|
|
266
|
+
case "timeout":
|
|
267
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/order_drafts/task_group/remove_courier_org/v1/{task_group_id}.");
|
|
268
|
+
case "unknown":
|
|
269
|
+
throw new errors.ChrtError({
|
|
270
|
+
message: _response.error.errorMessage,
|
|
271
|
+
rawResponse: _response.rawResponse,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Sets the ordering of tasks within a draft task group. Must provide all task IDs with no duplicates. | (SetTaskOrderingDraftReq) -> (bool)
|
|
278
|
+
*
|
|
279
|
+
* @param {string} taskGroupId
|
|
280
|
+
* @param {Chrt.orderDrafts.SetTaskOrderingDraftReq} request
|
|
281
|
+
* @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
282
|
+
*
|
|
283
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
284
|
+
*
|
|
285
|
+
* @example
|
|
286
|
+
* await client.orderDrafts.taskGroup.setTaskOrderingV1("task_group_id", {
|
|
287
|
+
* task_ids: ["task_ids"]
|
|
288
|
+
* })
|
|
289
|
+
*/
|
|
290
|
+
setTaskOrderingV1(taskGroupId, request, requestOptions) {
|
|
291
|
+
return core.HttpResponsePromise.fromPromise(this.__setTaskOrderingV1(taskGroupId, request, requestOptions));
|
|
292
|
+
}
|
|
293
|
+
__setTaskOrderingV1(taskGroupId, request, requestOptions) {
|
|
294
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
295
|
+
var _a, _b, _c, _d;
|
|
296
|
+
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);
|
|
297
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
298
|
+
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, `oort/order_drafts/task_group/set_task_ordering/v1/${encodeURIComponent(taskGroupId)}`),
|
|
299
|
+
method: "PUT",
|
|
300
|
+
headers: _headers,
|
|
301
|
+
contentType: "application/json",
|
|
302
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
303
|
+
requestType: "json",
|
|
304
|
+
body: request,
|
|
305
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
306
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
307
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
308
|
+
});
|
|
309
|
+
if (_response.ok) {
|
|
310
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
311
|
+
}
|
|
312
|
+
if (_response.error.reason === "status-code") {
|
|
313
|
+
switch (_response.error.statusCode) {
|
|
314
|
+
case 422:
|
|
315
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
316
|
+
default:
|
|
317
|
+
throw new errors.ChrtError({
|
|
318
|
+
statusCode: _response.error.statusCode,
|
|
319
|
+
body: _response.error.body,
|
|
320
|
+
rawResponse: _response.rawResponse,
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
switch (_response.error.reason) {
|
|
325
|
+
case "non-json":
|
|
326
|
+
throw new errors.ChrtError({
|
|
327
|
+
statusCode: _response.error.statusCode,
|
|
328
|
+
body: _response.error.rawBody,
|
|
329
|
+
rawResponse: _response.rawResponse,
|
|
330
|
+
});
|
|
331
|
+
case "timeout":
|
|
332
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/order_drafts/task_group/set_task_ordering/v1/{task_group_id}.");
|
|
142
333
|
case "unknown":
|
|
143
334
|
throw new errors.ChrtError({
|
|
144
335
|
message: _response.error.errorMessage,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* flight_number: "flight_number"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface SetFlightNumberDraftReq {
|
|
11
|
+
/** Flight number to set on the task group */
|
|
12
|
+
flight_number: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* task_ids: ["task_ids"]
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface SetTaskOrderingDraftReq {
|
|
11
|
+
/** Complete list of task IDs in the desired order */
|
|
12
|
+
task_ids: string[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* courier_org_id: "courier_org_id"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface UpdateCourierOrgDraftReq {
|
|
11
|
+
/** ID of the courier organization to assign to the task group */
|
|
12
|
+
courier_org_id: string;
|
|
13
|
+
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { type OrderDraftAddTaskGroupReq } from "./OrderDraftAddTaskGroupReq.mjs";
|
|
2
|
-
export { type
|
|
2
|
+
export { type SetFlightNumberDraftReq } from "./SetFlightNumberDraftReq.mjs";
|
|
3
|
+
export { type UpdateCourierOrgDraftReq } from "./UpdateCourierOrgDraftReq.mjs";
|
|
4
|
+
export { type SetTaskOrderingDraftReq } from "./SetTaskOrderingDraftReq.mjs";
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import * as environments from "../../../../environments.mjs";
|
|
5
5
|
import * as core from "../../../../core/index.mjs";
|
|
6
6
|
import * as Chrt from "../../../index.mjs";
|
|
7
|
-
import { S3ObjectMetadata } from "../resources/s3ObjectMetadata/client/Client.mjs";
|
|
8
7
|
import { S3Object } from "../resources/s3Object/client/Client.mjs";
|
|
9
8
|
export declare namespace TaskArtifacts {
|
|
10
9
|
interface Options {
|
|
@@ -31,10 +30,8 @@ export declare namespace TaskArtifacts {
|
|
|
31
30
|
}
|
|
32
31
|
export declare class TaskArtifacts {
|
|
33
32
|
protected readonly _options: TaskArtifacts.Options;
|
|
34
|
-
protected _s3ObjectMetadata: S3ObjectMetadata | undefined;
|
|
35
33
|
protected _s3Object: S3Object | undefined;
|
|
36
34
|
constructor(_options?: TaskArtifacts.Options);
|
|
37
|
-
get s3ObjectMetadata(): S3ObjectMetadata;
|
|
38
35
|
get s3Object(): S3Object;
|
|
39
36
|
/**
|
|
40
37
|
* Adds a new task artifact to a task. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators] | (AddTaskArtifactReq) -> (PydanticObjectId)
|
|
@@ -15,16 +15,11 @@ import * as core from "../../../../core/index.mjs";
|
|
|
15
15
|
import * as Chrt from "../../../index.mjs";
|
|
16
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
17
17
|
import * as errors from "../../../../errors/index.mjs";
|
|
18
|
-
import { S3ObjectMetadata } from "../resources/s3ObjectMetadata/client/Client.mjs";
|
|
19
18
|
import { S3Object } from "../resources/s3Object/client/Client.mjs";
|
|
20
19
|
export class TaskArtifacts {
|
|
21
20
|
constructor(_options = {}) {
|
|
22
21
|
this._options = _options;
|
|
23
22
|
}
|
|
24
|
-
get s3ObjectMetadata() {
|
|
25
|
-
var _a;
|
|
26
|
-
return ((_a = this._s3ObjectMetadata) !== null && _a !== void 0 ? _a : (this._s3ObjectMetadata = new S3ObjectMetadata(this._options)));
|
|
27
|
-
}
|
|
28
23
|
get s3Object() {
|
|
29
24
|
var _a;
|
|
30
25
|
return ((_a = this._s3Object) !== null && _a !== void 0 ? _a : (this._s3Object = new S3Object(this._options)));
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "../../../../../../environments.mjs";
|
|
5
5
|
import * as core from "../../../../../../core/index.mjs";
|
|
6
|
+
import * as Chrt from "../../../../../index.mjs";
|
|
6
7
|
export declare namespace S3Object {
|
|
7
8
|
interface Options {
|
|
8
9
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
@@ -29,6 +30,19 @@ export declare namespace S3Object {
|
|
|
29
30
|
export declare class S3Object {
|
|
30
31
|
protected readonly _options: S3Object.Options;
|
|
31
32
|
constructor(_options?: S3Object.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves the metadata for a task artifact S3 object, including blurhash for placeholder loading. | authz_personas=[courier_driver, courier_org_operators, shipper_org_operators, forwarder_org_operators] | () -> (TaskArtifactS3ObjectMetadata1)
|
|
35
|
+
*
|
|
36
|
+
* @param {string} taskArtifactS3ObjectMetadataId
|
|
37
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.taskArtifacts.s3Object.getS3ObjectMetadataV1("task_artifact_s3_object_metadata_id")
|
|
43
|
+
*/
|
|
44
|
+
getS3ObjectMetadataV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<Chrt.TaskArtifactS3ObjectMetadata1>;
|
|
45
|
+
private __getS3ObjectMetadataV1;
|
|
32
46
|
/**
|
|
33
47
|
* Streams a task artifact S3 object file from storage. | authz_personas=[courier_driver, courier_org_operators, shipper_org_operators, forwarder_org_operators] | () -> (StreamingResponse)
|
|
34
48
|
*
|
|
@@ -42,5 +56,35 @@ export declare class S3Object {
|
|
|
42
56
|
*/
|
|
43
57
|
getV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
44
58
|
private __getV1;
|
|
59
|
+
/**
|
|
60
|
+
* Uploads an image file to a task artifact with automatic blurhash generation. | authz_personas=[courier_driver, forwarder_org_operators, courier_org_operators, shipper_org_operators] | (UploadFile) -> (bool)
|
|
61
|
+
*
|
|
62
|
+
* @param {string} taskArtifactId
|
|
63
|
+
* @param {Chrt.taskArtifacts.BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost} request
|
|
64
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* import { createReadStream } from "fs";
|
|
70
|
+
* await client.taskArtifacts.s3Object.addV1("task_artifact_id", {
|
|
71
|
+
* image: fs.createReadStream("/path/to/your/file")
|
|
72
|
+
* })
|
|
73
|
+
*/
|
|
74
|
+
addV1(taskArtifactId: string, request: Chrt.taskArtifacts.BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
75
|
+
private __addV1;
|
|
76
|
+
/**
|
|
77
|
+
* Deletes an S3 object metadata and the associated S3 object from a task artifact. Only the uploader or an operator from the uploading org can delete. | () -> (bool)
|
|
78
|
+
*
|
|
79
|
+
* @param {string} taskArtifactS3ObjectMetadataId
|
|
80
|
+
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* await client.taskArtifacts.s3Object.deleteV1("task_artifact_s3_object_metadata_id")
|
|
86
|
+
*/
|
|
87
|
+
deleteV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
88
|
+
private __deleteV1;
|
|
45
89
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
46
90
|
}
|