@chrt-inc/typescript-sdk 1.689.0 → 1.692.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.
Files changed (70) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/Client.d.ts +14 -0
  3. package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/Client.js +63 -0
  4. package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientCreate1.d.ts +1 -0
  5. package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientUpdate1.d.ts +11 -0
  6. package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientUpdate1.js +5 -0
  7. package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/requests/index.d.ts +1 -0
  8. package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/Client.d.ts +14 -0
  9. package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/Client.js +63 -0
  10. package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientCreate1.d.ts +1 -0
  11. package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientUpdate1.d.ts +11 -0
  12. package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientUpdate1.js +5 -0
  13. package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/index.d.ts +1 -0
  14. package/dist/cjs/api/resources/shipping/resources/tasks/client/Client.d.ts +66 -0
  15. package/dist/cjs/api/resources/shipping/resources/tasks/client/Client.js +299 -0
  16. package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/WaitTimeOverrideReq.d.ts +12 -0
  17. package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/WaitTimeOverrideReq.js +5 -0
  18. package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/index.d.ts +1 -0
  19. package/dist/cjs/api/types/Driver1.d.ts +1 -0
  20. package/dist/cjs/api/types/DriverComplianceDocument1.d.ts +1 -0
  21. package/dist/cjs/api/types/DriverComplianceDocumentTypeEnum1.d.ts +16 -1
  22. package/dist/cjs/api/types/DriverComplianceDocumentTypeEnum1.js +15 -0
  23. package/dist/cjs/api/types/OrgComplianceDocument1.d.ts +1 -0
  24. package/dist/cjs/api/types/OrgComplianceDocumentTypeEnum1.d.ts +11 -1
  25. package/dist/cjs/api/types/OrgComplianceDocumentTypeEnum1.js +10 -0
  26. package/dist/cjs/api/types/Task1.d.ts +7 -0
  27. package/dist/cjs/api/types/TaskClientCreate1.d.ts +1 -0
  28. package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
  29. package/dist/cjs/api/types/TaskWaitTimeGeofenceRes.d.ts +9 -0
  30. package/dist/cjs/api/types/TaskWaitTimeGeofenceRes.js +5 -0
  31. package/dist/cjs/api/types/index.d.ts +1 -0
  32. package/dist/cjs/api/types/index.js +1 -0
  33. package/dist/cjs/version.d.ts +1 -1
  34. package/dist/cjs/version.js +1 -1
  35. package/dist/esm/Client.mjs +2 -2
  36. package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/Client.d.mts +14 -0
  37. package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/Client.mjs +63 -0
  38. package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientCreate1.d.mts +1 -0
  39. package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientUpdate1.d.mts +11 -0
  40. package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientUpdate1.mjs +4 -0
  41. package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/requests/index.d.mts +1 -0
  42. package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/Client.d.mts +14 -0
  43. package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/Client.mjs +63 -0
  44. package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientCreate1.d.mts +1 -0
  45. package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientUpdate1.d.mts +11 -0
  46. package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientUpdate1.mjs +4 -0
  47. package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/index.d.mts +1 -0
  48. package/dist/esm/api/resources/shipping/resources/tasks/client/Client.d.mts +66 -0
  49. package/dist/esm/api/resources/shipping/resources/tasks/client/Client.mjs +299 -0
  50. package/dist/esm/api/resources/shipping/resources/tasks/client/requests/WaitTimeOverrideReq.d.mts +12 -0
  51. package/dist/esm/api/resources/shipping/resources/tasks/client/requests/WaitTimeOverrideReq.mjs +4 -0
  52. package/dist/esm/api/resources/shipping/resources/tasks/client/requests/index.d.mts +1 -0
  53. package/dist/esm/api/types/Driver1.d.mts +1 -0
  54. package/dist/esm/api/types/DriverComplianceDocument1.d.mts +1 -0
  55. package/dist/esm/api/types/DriverComplianceDocumentTypeEnum1.d.mts +16 -1
  56. package/dist/esm/api/types/DriverComplianceDocumentTypeEnum1.mjs +15 -0
  57. package/dist/esm/api/types/OrgComplianceDocument1.d.mts +1 -0
  58. package/dist/esm/api/types/OrgComplianceDocumentTypeEnum1.d.mts +11 -1
  59. package/dist/esm/api/types/OrgComplianceDocumentTypeEnum1.mjs +10 -0
  60. package/dist/esm/api/types/Task1.d.mts +7 -0
  61. package/dist/esm/api/types/TaskClientCreate1.d.mts +1 -0
  62. package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
  63. package/dist/esm/api/types/TaskWaitTimeGeofenceRes.d.mts +9 -0
  64. package/dist/esm/api/types/TaskWaitTimeGeofenceRes.mjs +4 -0
  65. package/dist/esm/api/types/index.d.mts +1 -0
  66. package/dist/esm/api/types/index.mjs +1 -0
  67. package/dist/esm/version.d.mts +1 -1
  68. package/dist/esm/version.mjs +1 -1
  69. package/package.json +1 -1
  70. package/reference.md +465 -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
  *
@@ -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
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -1,2 +1,3 @@
1
+ export { type WaitTimeOverrideReq } from "./WaitTimeOverrideReq.mjs";
1
2
  export { type AddTaskToGroupReq } from "./AddTaskToGroupReq.mjs";
2
3
  export { type AttemptTaskReq } from "./AttemptTaskReq.mjs";
@@ -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;
@@ -9,6 +9,7 @@ export interface DriverComplianceDocument1 {
9
9
  org_id: string;
10
10
  driver_id: string;
11
11
  document_type: Chrt.DriverComplianceDocumentTypeEnum1;
12
+ description?: string | null;
12
13
  driver_compliance_document_s3_object_metadata_ids?: string[];
13
14
  valid_from?: string | null;
14
15
  valid_until?: string | null;
@@ -1,8 +1,23 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type DriverComplianceDocumentTypeEnum1 = "drivers_license" | "commercial_drivers_license";
4
+ export type DriverComplianceDocumentTypeEnum1 = "drivers_license" | "commercial_drivers_license" | "tsa_sta" | "iata_dangerous_goods" | "dot_hazmat" | "cdl_hazmat_endorsement" | "osha_bloodborne_pathogens" | "medical_specimen" | "clinical_lab_specimen" | "pathology" | "blood_products" | "pharmaceutical" | "cold_chain" | "vehicle_registration" | "vehicle_inspection" | "background_check" | "mvr_check";
5
5
  export declare const DriverComplianceDocumentTypeEnum1: {
6
6
  readonly DriversLicense: "drivers_license";
7
7
  readonly CommercialDriversLicense: "commercial_drivers_license";
8
+ readonly TsaSta: "tsa_sta";
9
+ readonly IataDangerousGoods: "iata_dangerous_goods";
10
+ readonly DotHazmat: "dot_hazmat";
11
+ readonly CdlHazmatEndorsement: "cdl_hazmat_endorsement";
12
+ readonly OshaBloodbornePathogens: "osha_bloodborne_pathogens";
13
+ readonly MedicalSpecimen: "medical_specimen";
14
+ readonly ClinicalLabSpecimen: "clinical_lab_specimen";
15
+ readonly Pathology: "pathology";
16
+ readonly BloodProducts: "blood_products";
17
+ readonly Pharmaceutical: "pharmaceutical";
18
+ readonly ColdChain: "cold_chain";
19
+ readonly VehicleRegistration: "vehicle_registration";
20
+ readonly VehicleInspection: "vehicle_inspection";
21
+ readonly BackgroundCheck: "background_check";
22
+ readonly MvrCheck: "mvr_check";
8
23
  };
@@ -4,4 +4,19 @@
4
4
  export const DriverComplianceDocumentTypeEnum1 = {
5
5
  DriversLicense: "drivers_license",
6
6
  CommercialDriversLicense: "commercial_drivers_license",
7
+ TsaSta: "tsa_sta",
8
+ IataDangerousGoods: "iata_dangerous_goods",
9
+ DotHazmat: "dot_hazmat",
10
+ CdlHazmatEndorsement: "cdl_hazmat_endorsement",
11
+ OshaBloodbornePathogens: "osha_bloodborne_pathogens",
12
+ MedicalSpecimen: "medical_specimen",
13
+ ClinicalLabSpecimen: "clinical_lab_specimen",
14
+ Pathology: "pathology",
15
+ BloodProducts: "blood_products",
16
+ Pharmaceutical: "pharmaceutical",
17
+ ColdChain: "cold_chain",
18
+ VehicleRegistration: "vehicle_registration",
19
+ VehicleInspection: "vehicle_inspection",
20
+ BackgroundCheck: "background_check",
21
+ MvrCheck: "mvr_check",
7
22
  };
@@ -9,6 +9,7 @@ export interface OrgComplianceDocument1 {
9
9
  /** Must be a string starting with `org_` */
10
10
  org_id: string;
11
11
  document_type: Chrt.OrgComplianceDocumentTypeEnum1;
12
+ description?: string | null;
12
13
  org_compliance_document_s3_object_metadata_ids?: string[];
13
14
  valid_from?: string | null;
14
15
  valid_until?: string | null;
@@ -1,8 +1,18 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type OrgComplianceDocumentTypeEnum1 = "security_threat_assessment" | "insurance";
4
+ export type OrgComplianceDocumentTypeEnum1 = "security_threat_assessment" | "insurance" | "indirect_air_carrier" | "customs_broker" | "gdp" | "authorized_economic_operator" | "hipaa" | "chain_of_custody" | "auto_liability_insurance" | "cargo_insurance" | "general_liability_insurance" | "workers_comp_insurance";
5
5
  export declare const OrgComplianceDocumentTypeEnum1: {
6
6
  readonly SecurityThreatAssessment: "security_threat_assessment";
7
7
  readonly Insurance: "insurance";
8
+ readonly IndirectAirCarrier: "indirect_air_carrier";
9
+ readonly CustomsBroker: "customs_broker";
10
+ readonly Gdp: "gdp";
11
+ readonly AuthorizedEconomicOperator: "authorized_economic_operator";
12
+ readonly Hipaa: "hipaa";
13
+ readonly ChainOfCustody: "chain_of_custody";
14
+ readonly AutoLiabilityInsurance: "auto_liability_insurance";
15
+ readonly CargoInsurance: "cargo_insurance";
16
+ readonly GeneralLiabilityInsurance: "general_liability_insurance";
17
+ readonly WorkersCompInsurance: "workers_comp_insurance";
8
18
  };
@@ -4,4 +4,14 @@
4
4
  export const OrgComplianceDocumentTypeEnum1 = {
5
5
  SecurityThreatAssessment: "security_threat_assessment",
6
6
  Insurance: "insurance",
7
+ IndirectAirCarrier: "indirect_air_carrier",
8
+ CustomsBroker: "customs_broker",
9
+ Gdp: "gdp",
10
+ AuthorizedEconomicOperator: "authorized_economic_operator",
11
+ Hipaa: "hipaa",
12
+ ChainOfCustody: "chain_of_custody",
13
+ AutoLiabilityInsurance: "auto_liability_insurance",
14
+ CargoInsurance: "cargo_insurance",
15
+ GeneralLiabilityInsurance: "general_liability_insurance",
16
+ WorkersCompInsurance: "workers_comp_insurance",
7
17
  };
@@ -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[];
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface TaskWaitTimeGeofenceRes {
5
+ in_geofence: boolean;
6
+ driver_location_available: boolean;
7
+ distance_miles?: number | null;
8
+ geofence_distance_miles: number;
9
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -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";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.689.0";
1
+ export declare const SDK_VERSION = "1.692.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.689.0";
1
+ export const SDK_VERSION = "1.692.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.689.0",
3
+ "version": "1.692.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",