@chrt-inc/typescript-sdk 1.772.0 → 1.794.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 (76) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.d.ts +35 -0
  3. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.js +133 -0
  4. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/SharedTaskGroupMileageCreateForProviderPayDriverClientReq.d.ts +23 -0
  5. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/SharedTaskGroupMileageCreateForProviderPayProviderClientReq.d.ts +24 -0
  6. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/SharedTaskGroupMileageCreateForProviderPayProviderClientReq.js +5 -0
  7. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/index.d.ts +2 -0
  8. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.d.ts +46 -9
  9. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.js +148 -16
  10. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListClientCreate1.d.ts +1 -1
  11. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListReorderEntries1.d.ts +1 -1
  12. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/index.d.ts +0 -1
  13. package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.d.ts +4 -4
  14. package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.js +11 -3
  15. package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListV1Request.d.ts +2 -0
  16. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.ts +2 -0
  17. package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.ts +1 -0
  18. package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.ts +1 -0
  19. package/dist/cjs/api/types/Driver1.d.ts +0 -1
  20. package/dist/cjs/api/types/DriverListRes.d.ts +1 -1
  21. package/dist/cjs/api/types/DriverWithActiveTaskGroupIds1.d.ts +35 -0
  22. package/dist/cjs/api/types/DriverWithActiveTaskGroupIds1.js +5 -0
  23. package/dist/cjs/api/types/LineItem1.d.ts +1 -0
  24. package/dist/cjs/api/types/OperationsTaskListEntry1.d.ts +4 -12
  25. package/dist/cjs/api/types/OperationsTaskListEntryClientCreate1.d.ts +15 -0
  26. package/dist/cjs/api/types/OperationsTaskListEntryClientCreate1.js +5 -0
  27. package/dist/cjs/api/types/OrderDraftValidationRequirements.d.ts +1 -0
  28. package/dist/cjs/api/types/OrderManifestValidationRequirements.d.ts +1 -0
  29. package/dist/cjs/api/types/OrderTemplate1.d.ts +1 -0
  30. package/dist/cjs/api/types/OrderTemplateCore1.d.ts +1 -0
  31. package/dist/cjs/api/types/OrgMembersAndDrivers.d.ts +1 -1
  32. package/dist/cjs/api/types/index.d.ts +2 -0
  33. package/dist/cjs/api/types/index.js +2 -0
  34. package/dist/cjs/version.d.ts +1 -1
  35. package/dist/cjs/version.js +1 -1
  36. package/dist/esm/Client.mjs +2 -2
  37. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.d.mts +35 -0
  38. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.mjs +133 -0
  39. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/SharedTaskGroupMileageCreateForProviderPayDriverClientReq.d.mts +23 -0
  40. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/SharedTaskGroupMileageCreateForProviderPayProviderClientReq.d.mts +24 -0
  41. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/SharedTaskGroupMileageCreateForProviderPayProviderClientReq.mjs +4 -0
  42. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/index.d.mts +2 -0
  43. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.d.mts +46 -9
  44. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.mjs +148 -16
  45. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListClientCreate1.d.mts +1 -1
  46. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListReorderEntries1.d.mts +1 -1
  47. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/index.d.mts +0 -1
  48. package/dist/esm/api/resources/shipping/resources/drivers/client/Client.d.mts +4 -4
  49. package/dist/esm/api/resources/shipping/resources/drivers/client/Client.mjs +11 -3
  50. package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListV1Request.d.mts +2 -0
  51. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.mts +2 -0
  52. package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.mts +1 -0
  53. package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.mts +1 -0
  54. package/dist/esm/api/types/Driver1.d.mts +0 -1
  55. package/dist/esm/api/types/DriverListRes.d.mts +1 -1
  56. package/dist/esm/api/types/DriverWithActiveTaskGroupIds1.d.mts +35 -0
  57. package/dist/esm/api/types/DriverWithActiveTaskGroupIds1.mjs +4 -0
  58. package/dist/esm/api/types/LineItem1.d.mts +1 -0
  59. package/dist/esm/api/types/OperationsTaskListEntry1.d.mts +4 -12
  60. package/dist/esm/api/types/OperationsTaskListEntryClientCreate1.d.mts +15 -0
  61. package/dist/esm/api/types/OperationsTaskListEntryClientCreate1.mjs +4 -0
  62. package/dist/esm/api/types/OrderDraftValidationRequirements.d.mts +1 -0
  63. package/dist/esm/api/types/OrderManifestValidationRequirements.d.mts +1 -0
  64. package/dist/esm/api/types/OrderTemplate1.d.mts +1 -0
  65. package/dist/esm/api/types/OrderTemplateCore1.d.mts +1 -0
  66. package/dist/esm/api/types/OrgMembersAndDrivers.d.mts +1 -1
  67. package/dist/esm/api/types/index.d.mts +2 -0
  68. package/dist/esm/api/types/index.mjs +2 -0
  69. package/dist/esm/version.d.mts +1 -1
  70. package/dist/esm/version.mjs +1 -1
  71. package/package.json +1 -1
  72. package/reference.md +304 -11
  73. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.d.ts +0 -11
  74. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.d.mts +0 -11
  75. /package/dist/cjs/api/resources/{operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.js → billing/resources/lineItemGroups/client/requests/SharedTaskGroupMileageCreateForProviderPayDriverClientReq.js} +0 -0
  76. /package/dist/esm/api/resources/{operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.mjs → billing/resources/lineItemGroups/client/requests/SharedTaskGroupMileageCreateForProviderPayDriverClientReq.mjs} +0 -0
@@ -289,26 +289,30 @@ export class OperationsTaskLists {
289
289
  });
290
290
  }
291
291
  /**
292
- * Replaces an OperationsTaskList's `entries` array wholesale covering add, remove, reorder, and edit in one operation. Order is load-bearing for from_previous_task-anchored deadlines. | authz: min_org_role=operator | (OperationsTaskListSetEntries1) -> (bool)
292
+ * Appends a new entry to an OperationsTaskList's `entries` array. The server assigns a fresh UUID and returns it. Order is load-bearing for from_previous_task-anchored deadlines. | authz: min_org_role=operator | (OperationsTaskListEntryClientCreate1) -> (str)
293
293
  *
294
294
  * @param {string} taskListId
295
- * @param {Chrt.operations.OperationsTaskListSetEntries1} request
295
+ * @param {Chrt.OperationsTaskListEntryClientCreate1} request
296
296
  * @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
297
297
  *
298
298
  * @throws {@link Chrt.UnprocessableEntityError}
299
299
  *
300
300
  * @example
301
- * await client.operations.operationsTaskLists.setEntriesV1("task_list_id")
301
+ * await client.operations.operationsTaskLists.addEntryV1("task_list_id", {
302
+ * task_type: "review_order_details",
303
+ * title: "title",
304
+ * description: "description"
305
+ * })
302
306
  */
303
- setEntriesV1(taskListId, request = {}, requestOptions) {
304
- return core.HttpResponsePromise.fromPromise(this.__setEntriesV1(taskListId, request, requestOptions));
307
+ addEntryV1(taskListId, request, requestOptions) {
308
+ return core.HttpResponsePromise.fromPromise(this.__addEntryV1(taskListId, request, requestOptions));
305
309
  }
306
- __setEntriesV1(taskListId_1) {
307
- return __awaiter(this, arguments, void 0, function* (taskListId, request = {}, requestOptions) {
310
+ __addEntryV1(taskListId, request, requestOptions) {
311
+ return __awaiter(this, void 0, void 0, function* () {
308
312
  var _a, _b, _c, _d;
309
313
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
310
314
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
311
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/operations_task_lists/entries/set/v1/${encodeURIComponent(taskListId)}`),
315
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/operations_task_lists/entries/add/v1/${encodeURIComponent(taskListId)}`),
312
316
  method: "POST",
313
317
  headers: _headers,
314
318
  contentType: "application/json",
@@ -342,7 +346,135 @@ export class OperationsTaskLists {
342
346
  rawResponse: _response.rawResponse,
343
347
  });
344
348
  case "timeout":
345
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/operations_task_lists/entries/set/v1/{task_list_id}.");
349
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/operations_task_lists/entries/add/v1/{task_list_id}.");
350
+ case "unknown":
351
+ throw new errors.ChrtError({
352
+ message: _response.error.errorMessage,
353
+ rawResponse: _response.rawResponse,
354
+ });
355
+ }
356
+ });
357
+ }
358
+ /**
359
+ * Replaces the entry with the given uuid in an OperationsTaskList's `entries` array. The stored uuid is preserved regardless of the request body. 404 if no entry matches. | authz: min_org_role=operator | (OperationsTaskListEntryClientCreate1) -> (bool)
360
+ *
361
+ * @param {string} taskListId
362
+ * @param {string} entryUuid
363
+ * @param {Chrt.OperationsTaskListEntryClientCreate1} request
364
+ * @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
365
+ *
366
+ * @throws {@link Chrt.UnprocessableEntityError}
367
+ *
368
+ * @example
369
+ * await client.operations.operationsTaskLists.editEntryV1("task_list_id", "entry_uuid", {
370
+ * task_type: "review_order_details",
371
+ * title: "title",
372
+ * description: "description"
373
+ * })
374
+ */
375
+ editEntryV1(taskListId, entryUuid, request, requestOptions) {
376
+ return core.HttpResponsePromise.fromPromise(this.__editEntryV1(taskListId, entryUuid, request, requestOptions));
377
+ }
378
+ __editEntryV1(taskListId, entryUuid, request, requestOptions) {
379
+ return __awaiter(this, void 0, void 0, function* () {
380
+ var _a, _b, _c, _d;
381
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
382
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
383
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/operations_task_lists/entries/edit/v1/${encodeURIComponent(taskListId)}/${encodeURIComponent(entryUuid)}`),
384
+ method: "PATCH",
385
+ headers: _headers,
386
+ contentType: "application/json",
387
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
388
+ requestType: "json",
389
+ body: request,
390
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
391
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
392
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
393
+ });
394
+ if (_response.ok) {
395
+ return { data: _response.body, rawResponse: _response.rawResponse };
396
+ }
397
+ if (_response.error.reason === "status-code") {
398
+ switch (_response.error.statusCode) {
399
+ case 422:
400
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
401
+ default:
402
+ throw new errors.ChrtError({
403
+ statusCode: _response.error.statusCode,
404
+ body: _response.error.body,
405
+ rawResponse: _response.rawResponse,
406
+ });
407
+ }
408
+ }
409
+ switch (_response.error.reason) {
410
+ case "non-json":
411
+ throw new errors.ChrtError({
412
+ statusCode: _response.error.statusCode,
413
+ body: _response.error.rawBody,
414
+ rawResponse: _response.rawResponse,
415
+ });
416
+ case "timeout":
417
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /operations/operations_task_lists/entries/edit/v1/{task_list_id}/{entry_uuid}.");
418
+ case "unknown":
419
+ throw new errors.ChrtError({
420
+ message: _response.error.errorMessage,
421
+ rawResponse: _response.rawResponse,
422
+ });
423
+ }
424
+ });
425
+ }
426
+ /**
427
+ * Removes the entry with the given uuid from an OperationsTaskList's `entries` array, closing the gap in order. 404 if no entry matches. | authz: min_org_role=operator | () -> (bool)
428
+ *
429
+ * @param {string} taskListId
430
+ * @param {string} entryUuid
431
+ * @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
432
+ *
433
+ * @throws {@link Chrt.UnprocessableEntityError}
434
+ *
435
+ * @example
436
+ * await client.operations.operationsTaskLists.removeEntryV1("task_list_id", "entry_uuid")
437
+ */
438
+ removeEntryV1(taskListId, entryUuid, requestOptions) {
439
+ return core.HttpResponsePromise.fromPromise(this.__removeEntryV1(taskListId, entryUuid, requestOptions));
440
+ }
441
+ __removeEntryV1(taskListId, entryUuid, requestOptions) {
442
+ return __awaiter(this, void 0, void 0, function* () {
443
+ var _a, _b, _c, _d;
444
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
445
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
446
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/operations_task_lists/entries/remove/v1/${encodeURIComponent(taskListId)}/${encodeURIComponent(entryUuid)}`),
447
+ method: "DELETE",
448
+ headers: _headers,
449
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
450
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
451
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
452
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
453
+ });
454
+ if (_response.ok) {
455
+ return { data: _response.body, rawResponse: _response.rawResponse };
456
+ }
457
+ if (_response.error.reason === "status-code") {
458
+ switch (_response.error.statusCode) {
459
+ case 422:
460
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
461
+ default:
462
+ throw new errors.ChrtError({
463
+ statusCode: _response.error.statusCode,
464
+ body: _response.error.body,
465
+ rawResponse: _response.rawResponse,
466
+ });
467
+ }
468
+ }
469
+ switch (_response.error.reason) {
470
+ case "non-json":
471
+ throw new errors.ChrtError({
472
+ statusCode: _response.error.statusCode,
473
+ body: _response.error.rawBody,
474
+ rawResponse: _response.rawResponse,
475
+ });
476
+ case "timeout":
477
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /operations/operations_task_lists/entries/remove/v1/{task_list_id}/{entry_uuid}.");
346
478
  case "unknown":
347
479
  throw new errors.ChrtError({
348
480
  message: _response.error.errorMessage,
@@ -352,7 +484,7 @@ export class OperationsTaskLists {
352
484
  });
353
485
  }
354
486
  /**
355
- * Reorders an OperationsTaskList's existing entries. `entry_ids` must be an exact permutation of the list's current entry ids (every id present, no extras, no duplicates), so a reorder can never drop, add, or mutate an entry. | authz: min_org_role=operator | (OperationsTaskListReorderEntries1) -> (bool)
487
+ * Reorders an OperationsTaskList's existing entries. `entry_uuids` must be an exact permutation of the list's current entry uuids (every uuid present, no extras, no duplicates), so a reorder can never drop, add, or mutate an entry. | authz: min_org_role=operator | (OperationsTaskListReorderEntries1) -> (bool)
356
488
  *
357
489
  * @param {string} taskListId
358
490
  * @param {Chrt.operations.OperationsTaskListReorderEntries1} request
@@ -610,17 +742,17 @@ export class OperationsTaskLists {
610
742
  * @throws {@link Chrt.UnprocessableEntityError}
611
743
  *
612
744
  * @example
613
- * await client.operations.operationsTaskLists.removeFromCaseV1("task_list_id", "case_id")
745
+ * await client.operations.operationsTaskLists.removeNotStartedTasksFromCaseV1("task_list_id", "case_id")
614
746
  */
615
- removeFromCaseV1(taskListId, caseId, requestOptions) {
616
- return core.HttpResponsePromise.fromPromise(this.__removeFromCaseV1(taskListId, caseId, requestOptions));
747
+ removeNotStartedTasksFromCaseV1(taskListId, caseId, requestOptions) {
748
+ return core.HttpResponsePromise.fromPromise(this.__removeNotStartedTasksFromCaseV1(taskListId, caseId, requestOptions));
617
749
  }
618
- __removeFromCaseV1(taskListId, caseId, requestOptions) {
750
+ __removeNotStartedTasksFromCaseV1(taskListId, caseId, requestOptions) {
619
751
  return __awaiter(this, void 0, void 0, function* () {
620
752
  var _a, _b, _c, _d;
621
753
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
622
754
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
623
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/operations_task_lists/remove_from_case/v1/${encodeURIComponent(taskListId)}/${encodeURIComponent(caseId)}`),
755
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/operations_task_lists/remove_not_started_tasks_from_case/v1/${encodeURIComponent(taskListId)}/${encodeURIComponent(caseId)}`),
624
756
  method: "POST",
625
757
  headers: _headers,
626
758
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -654,7 +786,7 @@ export class OperationsTaskLists {
654
786
  rawResponse: _response.rawResponse,
655
787
  });
656
788
  case "timeout":
657
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/operations_task_lists/remove_from_case/v1/{task_list_id}/{case_id}.");
789
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/operations_task_lists/remove_not_started_tasks_from_case/v1/{task_list_id}/{case_id}.");
658
790
  case "unknown":
659
791
  throw new errors.ChrtError({
660
792
  message: _response.error.errorMessage,
@@ -14,5 +14,5 @@ export interface OperationsTaskListClientCreate1 {
14
14
  name: string;
15
15
  description?: string | null;
16
16
  tags?: string[];
17
- entries?: Chrt.OperationsTaskListEntry1[];
17
+ entries?: Chrt.OperationsTaskListEntryClientCreate1[];
18
18
  }
@@ -6,5 +6,5 @@
6
6
  * {}
7
7
  */
8
8
  export interface OperationsTaskListReorderEntries1 {
9
- entry_ids?: string[];
9
+ entry_uuids?: string[];
10
10
  }
@@ -1,6 +1,5 @@
1
1
  export { type OperationsTaskListsListV1Request } from "./OperationsTaskListsListV1Request.mjs";
2
2
  export { type OperationsTaskListClientUpdate1 } from "./OperationsTaskListClientUpdate1.mjs";
3
3
  export { type OperationsTaskListClientCreate1 } from "./OperationsTaskListClientCreate1.mjs";
4
- export { type OperationsTaskListSetEntries1 } from "./OperationsTaskListSetEntries1.mjs";
5
4
  export { type OperationsTaskListReorderEntries1 } from "./OperationsTaskListReorderEntries1.mjs";
6
5
  export { type OperationsTaskListsApplyToCaseV1Request } from "./OperationsTaskListsApplyToCaseV1Request.mjs";
@@ -152,17 +152,17 @@ export declare class Drivers {
152
152
  deleteSelfReportedHoursAndMileageV1(driverId: string, reportDate: string, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<boolean>;
153
153
  private __deleteSelfReportedHoursAndMileageV1;
154
154
  /**
155
- * Retrieves driver information for the caller within their organization. | () -> (Driver1)
155
+ * Retrieves driver information for the caller within their organization. | () -> (DriverWithActiveTaskGroupIds1)
156
156
  *
157
157
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
158
158
  *
159
159
  * @example
160
160
  * await client.shipping.drivers.getForCallerV1()
161
161
  */
162
- getForCallerV1(requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<Chrt.Driver1>;
162
+ getForCallerV1(requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<Chrt.DriverWithActiveTaskGroupIds1>;
163
163
  private __getForCallerV1;
164
164
  /**
165
- * Retrieves detailed driver information by driver ID within the organization. | () -> (Driver1)
165
+ * Retrieves detailed driver information by driver ID within the organization. | () -> (DriverWithActiveTaskGroupIds1)
166
166
  *
167
167
  * @param {string} driverId
168
168
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
@@ -172,7 +172,7 @@ export declare class Drivers {
172
172
  * @example
173
173
  * await client.shipping.drivers.getByDriverIdV1("driver_id")
174
174
  */
175
- getByDriverIdV1(driverId: string, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<Chrt.Driver1>;
175
+ getByDriverIdV1(driverId: string, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<Chrt.DriverWithActiveTaskGroupIds1>;
176
176
  private __getByDriverIdV1;
177
177
  /**
178
178
  * Lists all organization members paired with their driver information if they are drivers. Supports search by name, filtering, sorting, and pagination. | () -> (OrgMembersAndDriversListRes)
@@ -540,7 +540,7 @@ export class Drivers {
540
540
  });
541
541
  }
542
542
  /**
543
- * Retrieves driver information for the caller within their organization. | () -> (Driver1)
543
+ * Retrieves driver information for the caller within their organization. | () -> (DriverWithActiveTaskGroupIds1)
544
544
  *
545
545
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
546
546
  *
@@ -591,7 +591,7 @@ export class Drivers {
591
591
  });
592
592
  }
593
593
  /**
594
- * Retrieves detailed driver information by driver ID within the organization. | () -> (Driver1)
594
+ * Retrieves detailed driver information by driver ID within the organization. | () -> (DriverWithActiveTaskGroupIds1)
595
595
  *
596
596
  * @param {string} driverId
597
597
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
@@ -772,7 +772,7 @@ export class Drivers {
772
772
  __listV1() {
773
773
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
774
774
  var _a, _b, _c, _d, _e, _f, _g, _h;
775
- const { sort_order: sortOrder, page, page_size: pageSize, search, filter_available_according_to_driver: filterAvailableAccordingToDriver, filter_available_according_to_operators: filterAvailableAccordingToOperators, } = request;
775
+ const { sort_order: sortOrder, page, page_size: pageSize, search, filter_available_according_to_driver: filterAvailableAccordingToDriver, filter_available_according_to_operators: filterAvailableAccordingToOperators, filter_status: filterStatus, } = request;
776
776
  const _queryParams = {};
777
777
  if (sortOrder !== undefined) {
778
778
  _queryParams["sort_order"] = sortOrder;
@@ -793,6 +793,14 @@ export class Drivers {
793
793
  _queryParams["filter_available_according_to_operators"] =
794
794
  (_d = filterAvailableAccordingToOperators === null || filterAvailableAccordingToOperators === void 0 ? void 0 : filterAvailableAccordingToOperators.toString()) !== null && _d !== void 0 ? _d : null;
795
795
  }
796
+ if (filterStatus !== undefined) {
797
+ if (Array.isArray(filterStatus)) {
798
+ _queryParams["filter_status"] = filterStatus.map((item) => item);
799
+ }
800
+ else {
801
+ _queryParams["filter_status"] = filterStatus;
802
+ }
803
+ }
796
804
  let _headers = mergeHeaders((_e = this._options) === null || _e === void 0 ? void 0 : _e.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
797
805
  const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
798
806
  url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.ChrtEnvironment.Local, "shipping/drivers/list/v1"),
@@ -24,4 +24,6 @@ export interface DriversListV1Request {
24
24
  filter_available_according_to_driver?: boolean | null;
25
25
  /** Filter by operator-set availability */
26
26
  filter_available_according_to_operators?: boolean | null;
27
+ /** Filter by driver state (UNASSIGNED / ASSIGNED / IN_PROGRESS) */
28
+ filter_status?: (Chrt.DriverStatusEnum | null) | (Chrt.DriverStatusEnum | null)[];
27
29
  }
@@ -15,6 +15,8 @@ export interface OrdersNewDraftReq {
15
15
  /** Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, '.', '_', '~', '-' (RFC 3986 unreserved). */
16
16
  off_chrt_reference_id?: string | null;
17
17
  department_id?: string | null;
18
+ /** OperationsTaskList ids to apply to the coordinator's Case at draft creation; foreign/stale ids are skipped without failing the draft. */
19
+ task_list_ids?: string[];
18
20
  /** Optional key, unique per caller org, that makes draft creation idempotent: re-sending the same key returns the already-created draft instead of creating a duplicate. */
19
21
  creation_idempotency_key?: string | null;
20
22
  /** Seed content for the OrderThread's first user turn (text + long-lived references). Agentic builds supply it; click-ops leaves it None for a blank seed turn. */
@@ -20,6 +20,7 @@ export interface OrderTemplateClientCreate1 {
20
20
  /** Must be a string starting with `org_` */
21
21
  coordinator_org_id?: string | null;
22
22
  department_id?: string | null;
23
+ task_list_ids?: string[];
23
24
  name: string;
24
25
  description?: string | null;
25
26
  off_chrt_reference_id_str?: string | null;
@@ -19,6 +19,7 @@ export interface OrderTemplateClientUpdate1 {
19
19
  /** Must be a string starting with `org_` */
20
20
  coordinator_org_id?: string | null;
21
21
  department_id?: string | null;
22
+ task_list_ids?: string[];
22
23
  description__set_to_None?: boolean;
23
24
  text__set_to_None?: boolean;
24
25
  off_chrt_reference_id_str__set_to_None?: boolean;
@@ -21,7 +21,6 @@ export interface Driver1 {
21
21
  available_according_to_operators?: boolean;
22
22
  waiting?: boolean;
23
23
  auto_assign_enabled?: boolean;
24
- active_task_group_ids?: string[];
25
24
  last_seen_at_location?: Chrt.LocationFeature | null;
26
25
  last_seen_at_timestamp?: string | null;
27
26
  last_seen_at_location_city?: string | null;
@@ -3,6 +3,6 @@
3
3
  */
4
4
  import * as Chrt from "../index.mjs";
5
5
  export interface DriverListRes {
6
- items: Chrt.Driver1[];
6
+ items: Chrt.DriverWithActiveTaskGroupIds1[];
7
7
  total_count: number;
8
8
  }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ /**
6
+ * Driver read DTO: persisted Driver1 plus the derived active task group IDs.
7
+ *
8
+ * The field is computed per request from shipping.task_groups so the JSON shape
9
+ * stays identical to when active_task_group_ids was persisted on the driver.
10
+ */
11
+ export interface DriverWithActiveTaskGroupIds1 {
12
+ schema_version: number;
13
+ email_address_primary?: string | null;
14
+ email_address_secondary?: string | null;
15
+ phone_number_primary?: string | null;
16
+ phone_number_secondary?: string | null;
17
+ first_name?: string | null;
18
+ last_name?: string | null;
19
+ vehicle_types?: Chrt.VehicleTypeEnum[];
20
+ _id: string;
21
+ /** Must be a string starting with `org_` */
22
+ org_id: string;
23
+ /** Must be a string starting with `user_` */
24
+ user_id: string;
25
+ status?: Chrt.DriverStatusEnum;
26
+ available_according_to_driver?: boolean;
27
+ available_according_to_operators?: boolean;
28
+ waiting?: boolean;
29
+ auto_assign_enabled?: boolean;
30
+ last_seen_at_location?: Chrt.LocationFeature | null;
31
+ last_seen_at_timestamp?: string | null;
32
+ last_seen_at_location_city?: string | null;
33
+ last_seen_at_location_large_city?: string | null;
34
+ active_task_group_ids?: string[];
35
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -26,6 +26,7 @@ export interface LineItem1 {
26
26
  ad_hoc__status?: Chrt.LineItemStatusEnum | null;
27
27
  rate_sheet_id?: string | null;
28
28
  pro_forma__bid_thread_id?: string | null;
29
+ line_item_calculation_id?: string | null;
29
30
  created_at_timestamp?: string;
30
31
  line_item_s3_object_metadata_ids?: string[];
31
32
  }
@@ -3,23 +3,15 @@
3
3
  */
4
4
  import * as Chrt from "../index.mjs";
5
5
  /**
6
- * One task declared in a Task List.
7
- *
8
- * Materialized into an `OperationsTask` on apply.
9
- *
10
- * The deadline is computed from (`deadline_anchor`, `deadline_offset_seconds`):
11
- * `FROM_FIRST_TASK` => the first entry's resolved deadline + offset;
12
- * `FROM_PREVIOUS_TASK` => the previous entry's resolved deadline + offset (the
13
- * first entry's "previous" is `apply_time`). The first entry itself anchors to
14
- * `apply_time` (or the apply-time `initial_deadline_timestamp` pin). Defaults to
15
- * `FROM_PREVIOUS_TASK` + 1200s, which reproduces the 20-min positional stagger.
16
- * `deadline_offset_seconds` may be negative.
6
+ * A stored Task List entry: client content plus a server-assigned stable
7
+ * `uuid`. The `uuid` keys the edit / remove / reorder routes (entries are not
8
+ * unique by `task_type` a list can repeat a type).
17
9
  */
18
10
  export interface OperationsTaskListEntry1 {
19
- id?: string;
20
11
  task_type: Chrt.OperationsTaskTypeEnum;
21
12
  title: string;
22
13
  description: string;
23
14
  deadline_anchor?: Chrt.DeadlineAnchorEnum;
24
15
  deadline_offset_seconds?: number;
16
+ uuid?: string;
25
17
  }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ /**
6
+ * Entry content the client supplies — at list-create time and via the add /
7
+ * edit entry routes. Carries no identity: the server assigns the `uuid`.
8
+ */
9
+ export interface OperationsTaskListEntryClientCreate1 {
10
+ task_type: Chrt.OperationsTaskTypeEnum;
11
+ title: string;
12
+ description: string;
13
+ deadline_anchor?: Chrt.DeadlineAnchorEnum;
14
+ deadline_offset_seconds?: number;
15
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -9,6 +9,7 @@ export interface OrderDraftValidationRequirements {
9
9
  task_groups_have_valid_task_sequence?: boolean | null;
10
10
  tasks_have_valid_cargo?: boolean | null;
11
11
  cargos_have_valid_lifecycle?: boolean | null;
12
+ at_least_one_task_has_time_window?: boolean | null;
12
13
  order_has_shipper?: boolean | null;
13
14
  order_has_coordinator?: boolean | null;
14
15
  }
@@ -8,6 +8,7 @@ export interface OrderManifestValidationRequirements {
8
8
  task_groups_have_valid_task_sequence?: boolean | null;
9
9
  tasks_have_valid_cargo?: boolean | null;
10
10
  cargos_have_valid_lifecycle?: boolean | null;
11
+ at_least_one_task_has_time_window?: boolean | null;
11
12
  order_has_shipper?: boolean | null;
12
13
  order_has_coordinator?: boolean | null;
13
14
  }
@@ -13,6 +13,7 @@ export interface OrderTemplate1 {
13
13
  /** Must be a string starting with `org_` */
14
14
  coordinator_org_id?: string | null;
15
15
  department_id?: string | null;
16
+ task_list_ids?: string[];
16
17
  name: string;
17
18
  description?: string | null;
18
19
  off_chrt_reference_id_str?: string | null;
@@ -18,4 +18,5 @@ export interface OrderTemplateCore1 {
18
18
  /** Must be a string starting with `org_` */
19
19
  coordinator_org_id?: string | null;
20
20
  department_id?: string | null;
21
+ task_list_ids?: string[];
21
22
  }
@@ -4,5 +4,5 @@
4
4
  import * as Chrt from "../index.mjs";
5
5
  export interface OrgMembersAndDrivers {
6
6
  org_member: Chrt.OrgMemberDetails;
7
- driver?: Chrt.Driver1 | null;
7
+ driver?: Chrt.DriverWithActiveTaskGroupIds1 | null;
8
8
  }
@@ -146,6 +146,7 @@ export * from "./DriverStatsRes.mjs";
146
146
  export * from "./DriverStatusEnum.mjs";
147
147
  export * from "./DriverUpdateAvailabilityReq.mjs";
148
148
  export * from "./DriverUpdateRes.mjs";
149
+ export * from "./DriverWithActiveTaskGroupIds1.mjs";
149
150
  export * from "./FirebaseCloudMessagingTokenData1.mjs";
150
151
  export * from "./FlightAwareAlertFlight.mjs";
151
152
  export * from "./FlightAwareAlertPayload.mjs";
@@ -229,6 +230,7 @@ export * from "./OperationsTask1.mjs";
229
230
  export * from "./OperationsTaskComment1.mjs";
230
231
  export * from "./OperationsTaskList1.mjs";
231
232
  export * from "./OperationsTaskListEntry1.mjs";
233
+ export * from "./OperationsTaskListEntryClientCreate1.mjs";
232
234
  export * from "./OperationsTaskListListRes.mjs";
233
235
  export * from "./OperationsTaskListRemoveFromCaseRes1.mjs";
234
236
  export * from "./OperationsTaskListRes.mjs";
@@ -146,6 +146,7 @@ export * from "./DriverStatsRes.mjs";
146
146
  export * from "./DriverStatusEnum.mjs";
147
147
  export * from "./DriverUpdateAvailabilityReq.mjs";
148
148
  export * from "./DriverUpdateRes.mjs";
149
+ export * from "./DriverWithActiveTaskGroupIds1.mjs";
149
150
  export * from "./FirebaseCloudMessagingTokenData1.mjs";
150
151
  export * from "./FlightAwareAlertFlight.mjs";
151
152
  export * from "./FlightAwareAlertPayload.mjs";
@@ -229,6 +230,7 @@ export * from "./OperationsTask1.mjs";
229
230
  export * from "./OperationsTaskComment1.mjs";
230
231
  export * from "./OperationsTaskList1.mjs";
231
232
  export * from "./OperationsTaskListEntry1.mjs";
233
+ export * from "./OperationsTaskListEntryClientCreate1.mjs";
232
234
  export * from "./OperationsTaskListListRes.mjs";
233
235
  export * from "./OperationsTaskListRemoveFromCaseRes1.mjs";
234
236
  export * from "./OperationsTaskListRes.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.772.0";
1
+ export declare const SDK_VERSION = "1.794.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.772.0";
1
+ export const SDK_VERSION = "1.794.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.772.0",
3
+ "version": "1.794.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",