@chrt-inc/typescript-sdk 1.689.0 → 1.691.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/shipping/resources/tasks/client/Client.d.ts +66 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/client/Client.js +299 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/WaitTimeOverrideReq.d.ts +12 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/WaitTimeOverrideReq.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/Driver1.d.ts +1 -0
- package/dist/cjs/api/types/Task1.d.ts +7 -0
- package/dist/cjs/api/types/TaskClientCreate1.d.ts +1 -0
- package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
- package/dist/cjs/api/types/TaskWaitTimeGeofenceRes.d.ts +9 -0
- package/dist/cjs/api/types/TaskWaitTimeGeofenceRes.js +5 -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/shipping/resources/tasks/client/Client.d.mts +66 -0
- package/dist/esm/api/resources/shipping/resources/tasks/client/Client.mjs +299 -0
- package/dist/esm/api/resources/shipping/resources/tasks/client/requests/WaitTimeOverrideReq.d.mts +12 -0
- package/dist/esm/api/resources/shipping/resources/tasks/client/requests/WaitTimeOverrideReq.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/tasks/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/Driver1.d.mts +1 -0
- package/dist/esm/api/types/Task1.d.mts +7 -0
- package/dist/esm/api/types/TaskClientCreate1.d.mts +1 -0
- package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
- package/dist/esm/api/types/TaskWaitTimeGeofenceRes.d.mts +9 -0
- package/dist/esm/api/types/TaskWaitTimeGeofenceRes.mjs +4 -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 +323 -0
|
@@ -24,6 +24,305 @@ export class Tasks {
|
|
|
24
24
|
var _a;
|
|
25
25
|
return ((_a = this._executorOrgNotes) !== null && _a !== void 0 ? _a : (this._executorOrgNotes = new ExecutorOrgNotes(this._options)));
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Checks whether the assigned driver's available location is inside the task wait-time geofence. | authz_personas=[driver_for_executor, executor_org_operators] | () -> (TaskWaitTimeGeofenceRes)
|
|
29
|
+
*
|
|
30
|
+
* @param {string} taskId
|
|
31
|
+
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
|
+
*
|
|
33
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await client.shipping.tasks.waitTimeGeofenceV1("task_id")
|
|
37
|
+
*/
|
|
38
|
+
waitTimeGeofenceV1(taskId, requestOptions) {
|
|
39
|
+
return core.HttpResponsePromise.fromPromise(this.__waitTimeGeofenceV1(taskId, requestOptions));
|
|
40
|
+
}
|
|
41
|
+
__waitTimeGeofenceV1(taskId, requestOptions) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
var _a, _b, _c, _d;
|
|
44
|
+
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);
|
|
45
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
46
|
+
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, `shipping/tasks/wait_time/geofence/v1/${encodeURIComponent(taskId)}`),
|
|
47
|
+
method: "GET",
|
|
48
|
+
headers: _headers,
|
|
49
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
50
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
51
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
52
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
53
|
+
});
|
|
54
|
+
if (_response.ok) {
|
|
55
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
56
|
+
}
|
|
57
|
+
if (_response.error.reason === "status-code") {
|
|
58
|
+
switch (_response.error.statusCode) {
|
|
59
|
+
case 422:
|
|
60
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
61
|
+
default:
|
|
62
|
+
throw new errors.ChrtError({
|
|
63
|
+
statusCode: _response.error.statusCode,
|
|
64
|
+
body: _response.error.body,
|
|
65
|
+
rawResponse: _response.rawResponse,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
switch (_response.error.reason) {
|
|
70
|
+
case "non-json":
|
|
71
|
+
throw new errors.ChrtError({
|
|
72
|
+
statusCode: _response.error.statusCode,
|
|
73
|
+
body: _response.error.rawBody,
|
|
74
|
+
rawResponse: _response.rawResponse,
|
|
75
|
+
});
|
|
76
|
+
case "timeout":
|
|
77
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/tasks/wait_time/geofence/v1/{task_id}.");
|
|
78
|
+
case "unknown":
|
|
79
|
+
throw new errors.ChrtError({
|
|
80
|
+
message: _response.error.errorMessage,
|
|
81
|
+
rawResponse: _response.rawResponse,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Starts wait time for a task and records whether the assigned driver's available location is inside the geofence. | authz_personas=[driver_for_executor, executor_org_operators] | () -> (bool)
|
|
88
|
+
*
|
|
89
|
+
* @param {string} taskId
|
|
90
|
+
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
91
|
+
*
|
|
92
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* await client.shipping.tasks.waitTimeStartV1("task_id")
|
|
96
|
+
*/
|
|
97
|
+
waitTimeStartV1(taskId, requestOptions) {
|
|
98
|
+
return core.HttpResponsePromise.fromPromise(this.__waitTimeStartV1(taskId, requestOptions));
|
|
99
|
+
}
|
|
100
|
+
__waitTimeStartV1(taskId, requestOptions) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
var _a, _b, _c, _d;
|
|
103
|
+
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);
|
|
104
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
105
|
+
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, `shipping/tasks/wait_time/start/v1/${encodeURIComponent(taskId)}`),
|
|
106
|
+
method: "PUT",
|
|
107
|
+
headers: _headers,
|
|
108
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
109
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
110
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
111
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
112
|
+
});
|
|
113
|
+
if (_response.ok) {
|
|
114
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
115
|
+
}
|
|
116
|
+
if (_response.error.reason === "status-code") {
|
|
117
|
+
switch (_response.error.statusCode) {
|
|
118
|
+
case 422:
|
|
119
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
120
|
+
default:
|
|
121
|
+
throw new errors.ChrtError({
|
|
122
|
+
statusCode: _response.error.statusCode,
|
|
123
|
+
body: _response.error.body,
|
|
124
|
+
rawResponse: _response.rawResponse,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
switch (_response.error.reason) {
|
|
129
|
+
case "non-json":
|
|
130
|
+
throw new errors.ChrtError({
|
|
131
|
+
statusCode: _response.error.statusCode,
|
|
132
|
+
body: _response.error.rawBody,
|
|
133
|
+
rawResponse: _response.rawResponse,
|
|
134
|
+
});
|
|
135
|
+
case "timeout":
|
|
136
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /shipping/tasks/wait_time/start/v1/{task_id}.");
|
|
137
|
+
case "unknown":
|
|
138
|
+
throw new errors.ChrtError({
|
|
139
|
+
message: _response.error.errorMessage,
|
|
140
|
+
rawResponse: _response.rawResponse,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Ends an active wait-time session for a task. | authz_personas=[driver_for_executor, executor_org_operators] | () -> (bool)
|
|
147
|
+
*
|
|
148
|
+
* @param {string} taskId
|
|
149
|
+
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
150
|
+
*
|
|
151
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* await client.shipping.tasks.waitTimeEndV1("task_id")
|
|
155
|
+
*/
|
|
156
|
+
waitTimeEndV1(taskId, requestOptions) {
|
|
157
|
+
return core.HttpResponsePromise.fromPromise(this.__waitTimeEndV1(taskId, requestOptions));
|
|
158
|
+
}
|
|
159
|
+
__waitTimeEndV1(taskId, requestOptions) {
|
|
160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
var _a, _b, _c, _d;
|
|
162
|
+
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);
|
|
163
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
164
|
+
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, `shipping/tasks/wait_time/end/v1/${encodeURIComponent(taskId)}`),
|
|
165
|
+
method: "PUT",
|
|
166
|
+
headers: _headers,
|
|
167
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
168
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
169
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
170
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
171
|
+
});
|
|
172
|
+
if (_response.ok) {
|
|
173
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
174
|
+
}
|
|
175
|
+
if (_response.error.reason === "status-code") {
|
|
176
|
+
switch (_response.error.statusCode) {
|
|
177
|
+
case 422:
|
|
178
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
179
|
+
default:
|
|
180
|
+
throw new errors.ChrtError({
|
|
181
|
+
statusCode: _response.error.statusCode,
|
|
182
|
+
body: _response.error.body,
|
|
183
|
+
rawResponse: _response.rawResponse,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
switch (_response.error.reason) {
|
|
188
|
+
case "non-json":
|
|
189
|
+
throw new errors.ChrtError({
|
|
190
|
+
statusCode: _response.error.statusCode,
|
|
191
|
+
body: _response.error.rawBody,
|
|
192
|
+
rawResponse: _response.rawResponse,
|
|
193
|
+
});
|
|
194
|
+
case "timeout":
|
|
195
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /shipping/tasks/wait_time/end/v1/{task_id}.");
|
|
196
|
+
case "unknown":
|
|
197
|
+
throw new errors.ChrtError({
|
|
198
|
+
message: _response.error.errorMessage,
|
|
199
|
+
rawResponse: _response.rawResponse,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Validates wait time for a task. | authz_personas=[executor_org_operators] | () -> (bool)
|
|
206
|
+
*
|
|
207
|
+
* @param {string} taskId
|
|
208
|
+
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
209
|
+
*
|
|
210
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* await client.shipping.tasks.waitTimeValidateV1("task_id")
|
|
214
|
+
*/
|
|
215
|
+
waitTimeValidateV1(taskId, requestOptions) {
|
|
216
|
+
return core.HttpResponsePromise.fromPromise(this.__waitTimeValidateV1(taskId, requestOptions));
|
|
217
|
+
}
|
|
218
|
+
__waitTimeValidateV1(taskId, requestOptions) {
|
|
219
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
220
|
+
var _a, _b, _c, _d;
|
|
221
|
+
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);
|
|
222
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
223
|
+
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, `shipping/tasks/wait_time/validate/v1/${encodeURIComponent(taskId)}`),
|
|
224
|
+
method: "PUT",
|
|
225
|
+
headers: _headers,
|
|
226
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
227
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
228
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
229
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
230
|
+
});
|
|
231
|
+
if (_response.ok) {
|
|
232
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
233
|
+
}
|
|
234
|
+
if (_response.error.reason === "status-code") {
|
|
235
|
+
switch (_response.error.statusCode) {
|
|
236
|
+
case 422:
|
|
237
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
238
|
+
default:
|
|
239
|
+
throw new errors.ChrtError({
|
|
240
|
+
statusCode: _response.error.statusCode,
|
|
241
|
+
body: _response.error.body,
|
|
242
|
+
rawResponse: _response.rawResponse,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
switch (_response.error.reason) {
|
|
247
|
+
case "non-json":
|
|
248
|
+
throw new errors.ChrtError({
|
|
249
|
+
statusCode: _response.error.statusCode,
|
|
250
|
+
body: _response.error.rawBody,
|
|
251
|
+
rawResponse: _response.rawResponse,
|
|
252
|
+
});
|
|
253
|
+
case "timeout":
|
|
254
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /shipping/tasks/wait_time/validate/v1/{task_id}.");
|
|
255
|
+
case "unknown":
|
|
256
|
+
throw new errors.ChrtError({
|
|
257
|
+
message: _response.error.errorMessage,
|
|
258
|
+
rawResponse: _response.rawResponse,
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Overrides wait-time timestamps or geofence distance for a task. | authz_personas=[executor_org_operators] | (WaitTimeOverrideReq) -> (bool)
|
|
265
|
+
*
|
|
266
|
+
* @param {string} taskId
|
|
267
|
+
* @param {Chrt.shipping.WaitTimeOverrideReq} request
|
|
268
|
+
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
269
|
+
*
|
|
270
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* await client.shipping.tasks.waitTimeOverrideV1("task_id")
|
|
274
|
+
*/
|
|
275
|
+
waitTimeOverrideV1(taskId, request = {}, requestOptions) {
|
|
276
|
+
return core.HttpResponsePromise.fromPromise(this.__waitTimeOverrideV1(taskId, request, requestOptions));
|
|
277
|
+
}
|
|
278
|
+
__waitTimeOverrideV1(taskId_1) {
|
|
279
|
+
return __awaiter(this, arguments, void 0, function* (taskId, request = {}, requestOptions) {
|
|
280
|
+
var _a, _b, _c, _d;
|
|
281
|
+
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);
|
|
282
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
283
|
+
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, `shipping/tasks/wait_time/override/v1/${encodeURIComponent(taskId)}`),
|
|
284
|
+
method: "PATCH",
|
|
285
|
+
headers: _headers,
|
|
286
|
+
contentType: "application/json",
|
|
287
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
288
|
+
requestType: "json",
|
|
289
|
+
body: request,
|
|
290
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
291
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
292
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
293
|
+
});
|
|
294
|
+
if (_response.ok) {
|
|
295
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
296
|
+
}
|
|
297
|
+
if (_response.error.reason === "status-code") {
|
|
298
|
+
switch (_response.error.statusCode) {
|
|
299
|
+
case 422:
|
|
300
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
301
|
+
default:
|
|
302
|
+
throw new errors.ChrtError({
|
|
303
|
+
statusCode: _response.error.statusCode,
|
|
304
|
+
body: _response.error.body,
|
|
305
|
+
rawResponse: _response.rawResponse,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
switch (_response.error.reason) {
|
|
310
|
+
case "non-json":
|
|
311
|
+
throw new errors.ChrtError({
|
|
312
|
+
statusCode: _response.error.statusCode,
|
|
313
|
+
body: _response.error.rawBody,
|
|
314
|
+
rawResponse: _response.rawResponse,
|
|
315
|
+
});
|
|
316
|
+
case "timeout":
|
|
317
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/tasks/wait_time/override/v1/{task_id}.");
|
|
318
|
+
case "unknown":
|
|
319
|
+
throw new errors.ChrtError({
|
|
320
|
+
message: _response.error.errorMessage,
|
|
321
|
+
rawResponse: _response.rawResponse,
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
}
|
|
27
326
|
/**
|
|
28
327
|
* Adds a new task to a task group at a specific index. | authz_personas=[lig_owner_operators] | (AddTaskToGroupReq) -> (PydanticObjectId)
|
|
29
328
|
*
|
package/dist/esm/api/resources/shipping/resources/tasks/client/requests/WaitTimeOverrideReq.d.mts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {}
|
|
7
|
+
*/
|
|
8
|
+
export interface WaitTimeOverrideReq {
|
|
9
|
+
geofence_distance_miles?: number | null;
|
|
10
|
+
wait_time_start_timestamp?: string | null;
|
|
11
|
+
wait_time_end_timestamp?: string | null;
|
|
12
|
+
}
|
|
@@ -19,6 +19,7 @@ export interface Driver1 {
|
|
|
19
19
|
status?: Chrt.DriverStatusEnum;
|
|
20
20
|
available_according_to_driver?: boolean;
|
|
21
21
|
available_according_to_operators?: boolean;
|
|
22
|
+
waiting?: boolean;
|
|
22
23
|
auto_assign_enabled?: boolean;
|
|
23
24
|
active_task_group_ids?: string[];
|
|
24
25
|
last_seen_at_location?: Chrt.LocationFeature | null;
|
|
@@ -5,6 +5,7 @@ import * as Chrt from "../index.mjs";
|
|
|
5
5
|
export interface Task1 {
|
|
6
6
|
schema_version: number;
|
|
7
7
|
location?: Chrt.LocationFeature | null;
|
|
8
|
+
geofence_distance_miles?: number;
|
|
8
9
|
action?: Task1.Action | null;
|
|
9
10
|
datetime_windows?: Chrt.DateTimeWindow1[];
|
|
10
11
|
order_placer_comments?: string | null;
|
|
@@ -34,6 +35,12 @@ export interface Task1 {
|
|
|
34
35
|
skipped_at_timestamp?: string | null;
|
|
35
36
|
attempted_at_timestamp?: string | null;
|
|
36
37
|
exception_at_timestamp?: string | null;
|
|
38
|
+
wait_time_start_timestamp?: string | null;
|
|
39
|
+
wait_time_end_timestamp?: string | null;
|
|
40
|
+
wait_time_started_in_geofence?: boolean | null;
|
|
41
|
+
wait_time_validated?: boolean | null;
|
|
42
|
+
/** Must be a string starting with `user_` */
|
|
43
|
+
wait_time_validated_by_user_id?: string | null;
|
|
37
44
|
order_cancelled?: boolean;
|
|
38
45
|
}
|
|
39
46
|
export declare namespace Task1 {
|
|
@@ -5,6 +5,7 @@ import * as Chrt from "../index.mjs";
|
|
|
5
5
|
export interface TaskClientCreate1 {
|
|
6
6
|
schema_version: number;
|
|
7
7
|
location?: Chrt.LocationFeature | null;
|
|
8
|
+
geofence_distance_miles?: number;
|
|
8
9
|
action?: TaskClientCreate1.Action | null;
|
|
9
10
|
datetime_windows?: Chrt.DateTimeWindow1[];
|
|
10
11
|
order_placer_comments?: string | null;
|
|
@@ -39,6 +39,7 @@ export interface TaskGroup1 {
|
|
|
39
39
|
vehicle_type?: Chrt.VehicleTypeEnum | null;
|
|
40
40
|
mileage_estimated?: number | null;
|
|
41
41
|
mileage_observed?: number | null;
|
|
42
|
+
wait_time_total_minutes?: number | null;
|
|
42
43
|
mileage_asserted?: boolean;
|
|
43
44
|
flight_number?: string | null;
|
|
44
45
|
fa_flight_ids?: string[];
|
|
@@ -332,6 +332,7 @@ export * from "./TaskGroupTypeaheadFieldEnum.mjs";
|
|
|
332
332
|
export * from "./TaskGroupTypeaheadResult.mjs";
|
|
333
333
|
export * from "./TaskManifest1.mjs";
|
|
334
334
|
export * from "./TaskStatusEnum1.mjs";
|
|
335
|
+
export * from "./TaskWaitTimeGeofenceRes.mjs";
|
|
335
336
|
export * from "./TemplateRes.mjs";
|
|
336
337
|
export * from "./TimeBucket.mjs";
|
|
337
338
|
export * from "./TimeGranularity.mjs";
|
|
@@ -332,6 +332,7 @@ export * from "./TaskGroupTypeaheadFieldEnum.mjs";
|
|
|
332
332
|
export * from "./TaskGroupTypeaheadResult.mjs";
|
|
333
333
|
export * from "./TaskManifest1.mjs";
|
|
334
334
|
export * from "./TaskStatusEnum1.mjs";
|
|
335
|
+
export * from "./TaskWaitTimeGeofenceRes.mjs";
|
|
335
336
|
export * from "./TemplateRes.mjs";
|
|
336
337
|
export * from "./TimeBucket.mjs";
|
|
337
338
|
export * from "./TimeGranularity.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.691.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.691.0";
|