@chrt-inc/typescript-sdk 1.710.0 → 1.719.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 (80) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/operations/resources/departments/client/Client.d.ts +1 -1
  3. package/dist/cjs/api/resources/operations/resources/departments/client/Client.js +6 -6
  4. package/dist/cjs/api/resources/operations/resources/departments/client/requests/DepartmentClientCreate1.d.ts +2 -2
  5. package/dist/cjs/api/resources/operations/resources/departments/client/requests/DepartmentsListV1Request.d.ts +2 -2
  6. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.d.ts +1 -0
  7. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/Client.d.ts +3 -0
  8. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/Client.js +5 -0
  9. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/index.d.ts +2 -0
  10. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/index.js +3 -1
  11. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/Client.d.ts +68 -0
  12. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/Client.js +201 -0
  13. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/index.d.ts +2 -0
  14. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/index.js +17 -0
  15. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/AddScanPayloadReq.d.ts +15 -0
  16. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/AddScanPayloadReq.js +5 -0
  17. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/ScanDeleteV1Request.d.ts +15 -0
  18. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/ScanDeleteV1Request.js +5 -0
  19. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/index.d.ts +2 -0
  20. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/index.js +2 -0
  21. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/index.d.ts +1 -0
  22. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/index.js +17 -0
  23. package/dist/cjs/api/types/Department1.d.ts +1 -1
  24. package/dist/cjs/api/types/DepartmentSortByEnum.d.ts +2 -2
  25. package/dist/cjs/api/types/DepartmentSortByEnum.js +1 -1
  26. package/dist/cjs/api/types/{DepartmentEnum.d.ts → DepartmentTypeEnum.d.ts} +7 -2
  27. package/dist/cjs/api/types/{DepartmentEnum.js → DepartmentTypeEnum.js} +7 -2
  28. package/dist/cjs/api/types/DeviceLimitedForList1.d.ts +2 -0
  29. package/dist/cjs/api/types/Driver1.d.ts +2 -0
  30. package/dist/cjs/api/types/ScanPayloadKindEnum.d.ts +8 -0
  31. package/dist/cjs/api/types/ScanPayloadKindEnum.js +10 -0
  32. package/dist/cjs/api/types/TaskArtifact1.d.ts +2 -0
  33. package/dist/cjs/api/types/TaskArtifactClientCreate1.d.ts +1 -0
  34. package/dist/cjs/api/types/TaskArtifactTypeEnum1.d.ts +2 -1
  35. package/dist/cjs/api/types/TaskArtifactTypeEnum1.js +1 -0
  36. package/dist/cjs/api/types/index.d.ts +2 -1
  37. package/dist/cjs/api/types/index.js +2 -1
  38. package/dist/cjs/version.d.ts +1 -1
  39. package/dist/cjs/version.js +1 -1
  40. package/dist/esm/Client.mjs +2 -2
  41. package/dist/esm/api/resources/operations/resources/departments/client/Client.d.mts +1 -1
  42. package/dist/esm/api/resources/operations/resources/departments/client/Client.mjs +6 -6
  43. package/dist/esm/api/resources/operations/resources/departments/client/requests/DepartmentClientCreate1.d.mts +2 -2
  44. package/dist/esm/api/resources/operations/resources/departments/client/requests/DepartmentsListV1Request.d.mts +2 -2
  45. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.d.mts +1 -0
  46. package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/Client.d.mts +3 -0
  47. package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/Client.mjs +5 -0
  48. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/index.d.mts +2 -0
  49. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/index.mjs +2 -0
  50. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/Client.d.mts +68 -0
  51. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/Client.mjs +164 -0
  52. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/index.d.mts +2 -0
  53. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/index.mjs +1 -0
  54. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/AddScanPayloadReq.d.mts +15 -0
  55. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/AddScanPayloadReq.mjs +4 -0
  56. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/ScanDeleteV1Request.d.mts +15 -0
  57. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/ScanDeleteV1Request.mjs +4 -0
  58. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/index.d.mts +2 -0
  59. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/index.mjs +1 -0
  60. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/index.d.mts +1 -0
  61. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/index.mjs +1 -0
  62. package/dist/esm/api/types/Department1.d.mts +1 -1
  63. package/dist/esm/api/types/DepartmentSortByEnum.d.mts +2 -2
  64. package/dist/esm/api/types/DepartmentSortByEnum.mjs +1 -1
  65. package/dist/esm/api/types/{DepartmentEnum.d.mts → DepartmentTypeEnum.d.mts} +7 -2
  66. package/dist/esm/api/types/{DepartmentEnum.mjs → DepartmentTypeEnum.mjs} +6 -1
  67. package/dist/esm/api/types/DeviceLimitedForList1.d.mts +2 -0
  68. package/dist/esm/api/types/Driver1.d.mts +2 -0
  69. package/dist/esm/api/types/ScanPayloadKindEnum.d.mts +8 -0
  70. package/dist/esm/api/types/ScanPayloadKindEnum.mjs +7 -0
  71. package/dist/esm/api/types/TaskArtifact1.d.mts +2 -0
  72. package/dist/esm/api/types/TaskArtifactClientCreate1.d.mts +1 -0
  73. package/dist/esm/api/types/TaskArtifactTypeEnum1.d.mts +2 -1
  74. package/dist/esm/api/types/TaskArtifactTypeEnum1.mjs +1 -0
  75. package/dist/esm/api/types/index.d.mts +2 -1
  76. package/dist/esm/api/types/index.mjs +2 -1
  77. package/dist/esm/version.d.mts +1 -1
  78. package/dist/esm/version.mjs +1 -1
  79. package/package.json +1 -1
  80. package/reference.md +151 -1
@@ -56,8 +56,8 @@ class ChrtClient {
56
56
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
57
57
  "X-Fern-Language": "JavaScript",
58
58
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
59
- "X-Fern-SDK-Version": "1.710.0",
60
- "User-Agent": "@chrt-inc/typescript-sdk/1.710.0",
59
+ "X-Fern-SDK-Version": "1.719.0",
60
+ "User-Agent": "@chrt-inc/typescript-sdk/1.719.0",
61
61
  "X-Fern-Runtime": core.RUNTIME.type,
62
62
  "X-Fern-Runtime-Version": core.RUNTIME.version,
63
63
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -100,7 +100,7 @@ export declare class Departments {
100
100
  * await client.operations.departments.createV1({
101
101
  * schema_version: 1,
102
102
  * name: "name",
103
- * department: "automotive"
103
+ * department_type: "automotive"
104
104
  * })
105
105
  */
106
106
  createV1(request: Chrt.operations.DepartmentClientCreate1, requestOptions?: Departments.RequestOptions): core.HttpResponsePromise<string>;
@@ -77,7 +77,7 @@ class Departments {
77
77
  __listV1() {
78
78
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
79
79
  var _a, _b, _c, _d, _e, _f;
80
- const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_department: filterDepartment, } = request;
80
+ const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_department_type: filterDepartmentType, } = request;
81
81
  const _queryParams = {};
82
82
  if (sortBy !== undefined) {
83
83
  _queryParams["sort_by"] = sortBy;
@@ -91,12 +91,12 @@ class Departments {
91
91
  if (pageSize !== undefined) {
92
92
  _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
93
93
  }
94
- if (filterDepartment !== undefined) {
95
- if (Array.isArray(filterDepartment)) {
96
- _queryParams["filter_department"] = filterDepartment.map((item) => item);
94
+ if (filterDepartmentType !== undefined) {
95
+ if (Array.isArray(filterDepartmentType)) {
96
+ _queryParams["filter_department_type"] = filterDepartmentType.map((item) => item);
97
97
  }
98
98
  else {
99
- _queryParams["filter_department"] = filterDepartment;
99
+ _queryParams["filter_department_type"] = filterDepartmentType;
100
100
  }
101
101
  }
102
102
  let _headers = (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
@@ -334,7 +334,7 @@ class Departments {
334
334
  * await client.operations.departments.createV1({
335
335
  * schema_version: 1,
336
336
  * name: "name",
337
- * department: "automotive"
337
+ * department_type: "automotive"
338
338
  * })
339
339
  */
340
340
  createV1(request, requestOptions) {
@@ -7,13 +7,13 @@ import * as Chrt from "../../../../../../index.js";
7
7
  * {
8
8
  * schema_version: 1,
9
9
  * name: "name",
10
- * department: "automotive"
10
+ * department_type: "automotive"
11
11
  * }
12
12
  */
13
13
  export interface DepartmentClientCreate1 {
14
14
  schema_version: number;
15
15
  name: string;
16
- department: Chrt.DepartmentEnum;
16
+ department_type: Chrt.DepartmentTypeEnum;
17
17
  location?: Chrt.LocationFeature | null;
18
18
  operator_user_ids?: string[];
19
19
  }
@@ -18,6 +18,6 @@ export interface DepartmentsListV1Request {
18
18
  sort_order?: Chrt.SortOrderEnum | null;
19
19
  page?: number | null;
20
20
  page_size?: number | null;
21
- /** Filter by department(s) */
22
- filter_department?: (Chrt.DepartmentEnum | null) | (Chrt.DepartmentEnum | null)[];
21
+ /** Filter by department type(s) */
22
+ filter_department_type?: (Chrt.DepartmentTypeEnum | null) | (Chrt.DepartmentTypeEnum | null)[];
23
23
  }
@@ -12,5 +12,6 @@ import * as Chrt from "../../../../../../../../index.js";
12
12
  export interface OrderDraftAddTaskArtifactReq {
13
13
  task_id: string;
14
14
  task_artifact_type: Chrt.TaskArtifactTypeEnum1;
15
+ expected_scan_payloads?: string[];
15
16
  order_schedule_template_path?: string | null;
16
17
  }
@@ -5,6 +5,7 @@ import * as environments from "../../../../../../environments.js";
5
5
  import * as core from "../../../../../../core/index.js";
6
6
  import * as Chrt from "../../../../../index.js";
7
7
  import { S3Object } from "../resources/s3Object/client/Client.js";
8
+ import { Scan } from "../resources/scan/client/Client.js";
8
9
  export declare namespace TaskArtifacts {
9
10
  interface Options {
10
11
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -31,8 +32,10 @@ export declare namespace TaskArtifacts {
31
32
  export declare class TaskArtifacts {
32
33
  protected readonly _options: TaskArtifacts.Options;
33
34
  protected _s3Object: S3Object | undefined;
35
+ protected _scan: Scan | undefined;
34
36
  constructor(_options?: TaskArtifacts.Options);
35
37
  get s3Object(): S3Object;
38
+ get scan(): Scan;
36
39
  /**
37
40
  * Adds a new task artifact to a task. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators] | (AddTaskArtifactReq) -> (PydanticObjectId)
38
41
  *
@@ -52,6 +52,7 @@ const Chrt = __importStar(require("../../../../../index.js"));
52
52
  const headers_js_1 = require("../../../../../../core/headers.js");
53
53
  const errors = __importStar(require("../../../../../../errors/index.js"));
54
54
  const Client_js_1 = require("../resources/s3Object/client/Client.js");
55
+ const Client_js_2 = require("../resources/scan/client/Client.js");
55
56
  class TaskArtifacts {
56
57
  constructor(_options = {}) {
57
58
  this._options = _options;
@@ -60,6 +61,10 @@ class TaskArtifacts {
60
61
  var _a;
61
62
  return ((_a = this._s3Object) !== null && _a !== void 0 ? _a : (this._s3Object = new Client_js_1.S3Object(this._options)));
62
63
  }
64
+ get scan() {
65
+ var _a;
66
+ return ((_a = this._scan) !== null && _a !== void 0 ? _a : (this._scan = new Client_js_2.Scan(this._options)));
67
+ }
63
68
  /**
64
69
  * Adds a new task artifact to a task. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators] | (AddTaskArtifactReq) -> (PydanticObjectId)
65
70
  *
@@ -1,2 +1,4 @@
1
1
  export * as s3Object from "./s3Object/index.js";
2
+ export * as scan from "./scan/index.js";
2
3
  export * from "./s3Object/client/requests/index.js";
4
+ export * from "./scan/client/requests/index.js";
@@ -36,6 +36,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.s3Object = void 0;
39
+ exports.scan = exports.s3Object = void 0;
40
40
  exports.s3Object = __importStar(require("./s3Object/index.js"));
41
+ exports.scan = __importStar(require("./scan/index.js"));
41
42
  __exportStar(require("./s3Object/client/requests/index.js"), exports);
43
+ __exportStar(require("./scan/client/requests/index.js"), exports);
@@ -0,0 +1,68 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../../../environments.js";
5
+ import * as core from "../../../../../../../../core/index.js";
6
+ import * as Chrt from "../../../../../../../index.js";
7
+ export declare namespace Scan {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.ChrtEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ token?: core.Supplier<core.BearerToken | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
+ fetcher?: core.FetchFunction;
16
+ }
17
+ interface RequestOptions {
18
+ /** The maximum time to wait for a response in seconds. */
19
+ timeoutInSeconds?: number;
20
+ /** The number of times to retry the request. Defaults to 2. */
21
+ maxRetries?: number;
22
+ /** A hook to abort the request. */
23
+ abortSignal?: AbortSignal;
24
+ /** Additional query string parameters to include in the request. */
25
+ queryParams?: Record<string, unknown>;
26
+ /** Additional headers to include in the request. */
27
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
+ }
29
+ }
30
+ export declare class Scan {
31
+ protected readonly _options: Scan.Options;
32
+ constructor(_options?: Scan.Options);
33
+ /**
34
+ * Appends a barcode/QR scan payload to a SCAN-type task artifact's expected or observed array (deduplicated). | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | (AddScanPayloadReq) -> (bool)
35
+ *
36
+ * @param {string} taskArtifactId
37
+ * @param {Chrt.shipping.taskArtifacts.AddScanPayloadReq} request
38
+ * @param {Scan.RequestOptions} requestOptions - Request-specific configuration.
39
+ *
40
+ * @throws {@link Chrt.UnprocessableEntityError}
41
+ *
42
+ * @example
43
+ * await client.shipping.taskArtifacts.scan.addV1("task_artifact_id", {
44
+ * kind: "expected",
45
+ * payload: "payload"
46
+ * })
47
+ */
48
+ addV1(taskArtifactId: string, request: Chrt.shipping.taskArtifacts.AddScanPayloadReq, requestOptions?: Scan.RequestOptions): core.HttpResponsePromise<boolean>;
49
+ private __addV1;
50
+ /**
51
+ * Removes a barcode/QR scan payload (by value) from a SCAN-type task artifact's expected or observed array. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (bool)
52
+ *
53
+ * @param {string} taskArtifactId
54
+ * @param {Chrt.shipping.taskArtifacts.ScanDeleteV1Request} request
55
+ * @param {Scan.RequestOptions} requestOptions - Request-specific configuration.
56
+ *
57
+ * @throws {@link Chrt.UnprocessableEntityError}
58
+ *
59
+ * @example
60
+ * await client.shipping.taskArtifacts.scan.deleteV1("task_artifact_id", {
61
+ * kind: "expected",
62
+ * payload: "payload"
63
+ * })
64
+ */
65
+ deleteV1(taskArtifactId: string, request: Chrt.shipping.taskArtifacts.ScanDeleteV1Request, requestOptions?: Scan.RequestOptions): core.HttpResponsePromise<boolean>;
66
+ private __deleteV1;
67
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
68
+ }
@@ -0,0 +1,201 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.Scan = void 0;
49
+ const environments = __importStar(require("../../../../../../../../environments.js"));
50
+ const core = __importStar(require("../../../../../../../../core/index.js"));
51
+ const Chrt = __importStar(require("../../../../../../../index.js"));
52
+ const headers_js_1 = require("../../../../../../../../core/headers.js");
53
+ const errors = __importStar(require("../../../../../../../../errors/index.js"));
54
+ class Scan {
55
+ constructor(_options = {}) {
56
+ this._options = _options;
57
+ }
58
+ /**
59
+ * Appends a barcode/QR scan payload to a SCAN-type task artifact's expected or observed array (deduplicated). | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | (AddScanPayloadReq) -> (bool)
60
+ *
61
+ * @param {string} taskArtifactId
62
+ * @param {Chrt.shipping.taskArtifacts.AddScanPayloadReq} request
63
+ * @param {Scan.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @throws {@link Chrt.UnprocessableEntityError}
66
+ *
67
+ * @example
68
+ * await client.shipping.taskArtifacts.scan.addV1("task_artifact_id", {
69
+ * kind: "expected",
70
+ * payload: "payload"
71
+ * })
72
+ */
73
+ addV1(taskArtifactId, request, requestOptions) {
74
+ return core.HttpResponsePromise.fromPromise(this.__addV1(taskArtifactId, request, requestOptions));
75
+ }
76
+ __addV1(taskArtifactId, request, requestOptions) {
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ var _a, _b, _c, _d;
79
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
80
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
81
+ 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/task_artifacts/scan/add/v1/${encodeURIComponent(taskArtifactId)}`),
82
+ method: "POST",
83
+ headers: _headers,
84
+ contentType: "application/json",
85
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
86
+ requestType: "json",
87
+ body: request,
88
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
89
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
90
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
91
+ });
92
+ if (_response.ok) {
93
+ return { data: _response.body, rawResponse: _response.rawResponse };
94
+ }
95
+ if (_response.error.reason === "status-code") {
96
+ switch (_response.error.statusCode) {
97
+ case 422:
98
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
99
+ default:
100
+ throw new errors.ChrtError({
101
+ statusCode: _response.error.statusCode,
102
+ body: _response.error.body,
103
+ rawResponse: _response.rawResponse,
104
+ });
105
+ }
106
+ }
107
+ switch (_response.error.reason) {
108
+ case "non-json":
109
+ throw new errors.ChrtError({
110
+ statusCode: _response.error.statusCode,
111
+ body: _response.error.rawBody,
112
+ rawResponse: _response.rawResponse,
113
+ });
114
+ case "timeout":
115
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/task_artifacts/scan/add/v1/{task_artifact_id}.");
116
+ case "unknown":
117
+ throw new errors.ChrtError({
118
+ message: _response.error.errorMessage,
119
+ rawResponse: _response.rawResponse,
120
+ });
121
+ }
122
+ });
123
+ }
124
+ /**
125
+ * Removes a barcode/QR scan payload (by value) from a SCAN-type task artifact's expected or observed array. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (bool)
126
+ *
127
+ * @param {string} taskArtifactId
128
+ * @param {Chrt.shipping.taskArtifacts.ScanDeleteV1Request} request
129
+ * @param {Scan.RequestOptions} requestOptions - Request-specific configuration.
130
+ *
131
+ * @throws {@link Chrt.UnprocessableEntityError}
132
+ *
133
+ * @example
134
+ * await client.shipping.taskArtifacts.scan.deleteV1("task_artifact_id", {
135
+ * kind: "expected",
136
+ * payload: "payload"
137
+ * })
138
+ */
139
+ deleteV1(taskArtifactId, request, requestOptions) {
140
+ return core.HttpResponsePromise.fromPromise(this.__deleteV1(taskArtifactId, request, requestOptions));
141
+ }
142
+ __deleteV1(taskArtifactId, request, requestOptions) {
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ var _a, _b, _c, _d;
145
+ const { kind, payload } = request;
146
+ const _queryParams = {};
147
+ _queryParams["kind"] = kind;
148
+ _queryParams["payload"] = payload;
149
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
150
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
151
+ 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/task_artifacts/scan/delete/v1/${encodeURIComponent(taskArtifactId)}`),
152
+ method: "DELETE",
153
+ headers: _headers,
154
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
155
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
156
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
157
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
158
+ });
159
+ if (_response.ok) {
160
+ return { data: _response.body, rawResponse: _response.rawResponse };
161
+ }
162
+ if (_response.error.reason === "status-code") {
163
+ switch (_response.error.statusCode) {
164
+ case 422:
165
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
166
+ default:
167
+ throw new errors.ChrtError({
168
+ statusCode: _response.error.statusCode,
169
+ body: _response.error.body,
170
+ rawResponse: _response.rawResponse,
171
+ });
172
+ }
173
+ }
174
+ switch (_response.error.reason) {
175
+ case "non-json":
176
+ throw new errors.ChrtError({
177
+ statusCode: _response.error.statusCode,
178
+ body: _response.error.rawBody,
179
+ rawResponse: _response.rawResponse,
180
+ });
181
+ case "timeout":
182
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/task_artifacts/scan/delete/v1/{task_artifact_id}.");
183
+ case "unknown":
184
+ throw new errors.ChrtError({
185
+ message: _response.error.errorMessage,
186
+ rawResponse: _response.rawResponse,
187
+ });
188
+ }
189
+ });
190
+ }
191
+ _getAuthorizationHeader() {
192
+ return __awaiter(this, void 0, void 0, function* () {
193
+ const bearer = yield core.Supplier.get(this._options.token);
194
+ if (bearer != null) {
195
+ return `Bearer ${bearer}`;
196
+ }
197
+ return undefined;
198
+ });
199
+ }
200
+ }
201
+ exports.Scan = Scan;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../../../index.js";
5
+ /**
6
+ * @example
7
+ * {
8
+ * kind: "expected",
9
+ * payload: "payload"
10
+ * }
11
+ */
12
+ export interface AddScanPayloadReq {
13
+ kind: Chrt.ScanPayloadKindEnum;
14
+ payload: string;
15
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../../../index.js";
5
+ /**
6
+ * @example
7
+ * {
8
+ * kind: "expected",
9
+ * payload: "payload"
10
+ * }
11
+ */
12
+ export interface ScanDeleteV1Request {
13
+ kind: Chrt.ScanPayloadKindEnum;
14
+ payload: string;
15
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { type AddScanPayloadReq } from "./AddScanPayloadReq.js";
2
+ export { type ScanDeleteV1Request } from "./ScanDeleteV1Request.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -5,7 +5,7 @@ import * as Chrt from "../index.js";
5
5
  export interface Department1 {
6
6
  schema_version: number;
7
7
  name: string;
8
- department: Chrt.DepartmentEnum;
8
+ department_type: Chrt.DepartmentTypeEnum;
9
9
  location?: Chrt.LocationFeature | null;
10
10
  operator_user_ids?: string[];
11
11
  _id: string;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type DepartmentSortByEnum = "created_at" | "department";
4
+ export type DepartmentSortByEnum = "created_at" | "department_type";
5
5
  export declare const DepartmentSortByEnum: {
6
6
  readonly CreatedAt: "created_at";
7
- readonly Department: "department";
7
+ readonly DepartmentType: "department_type";
8
8
  };
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.DepartmentSortByEnum = void 0;
7
7
  exports.DepartmentSortByEnum = {
8
8
  CreatedAt: "created_at",
9
- Department: "department",
9
+ DepartmentType: "department_type",
10
10
  };
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type DepartmentEnum = "automotive" | "semiconductor" | "pharmaceutical" | "aerospace" | "agriculture" | "retail" | "manufacturing" | "energy" | "food_and_beverage" | "chemicals" | "electronics" | "general";
5
- export declare const DepartmentEnum: {
4
+ export type DepartmentTypeEnum = "automotive" | "semiconductor" | "pharmaceutical" | "aerospace" | "agriculture" | "retail" | "manufacturing" | "energy" | "food_and_beverage" | "chemicals" | "electronics" | "healthcare" | "industrials" | "live_animals" | "life_sciences" | "radiopharma" | "general";
5
+ export declare const DepartmentTypeEnum: {
6
6
  readonly Automotive: "automotive";
7
7
  readonly Semiconductor: "semiconductor";
8
8
  readonly Pharmaceutical: "pharmaceutical";
@@ -14,5 +14,10 @@ export declare const DepartmentEnum: {
14
14
  readonly FoodAndBeverage: "food_and_beverage";
15
15
  readonly Chemicals: "chemicals";
16
16
  readonly Electronics: "electronics";
17
+ readonly Healthcare: "healthcare";
18
+ readonly Industrials: "industrials";
19
+ readonly LiveAnimals: "live_animals";
20
+ readonly LifeSciences: "life_sciences";
21
+ readonly Radiopharma: "radiopharma";
17
22
  readonly General: "general";
18
23
  };
@@ -3,8 +3,8 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DepartmentEnum = void 0;
7
- exports.DepartmentEnum = {
6
+ exports.DepartmentTypeEnum = void 0;
7
+ exports.DepartmentTypeEnum = {
8
8
  Automotive: "automotive",
9
9
  Semiconductor: "semiconductor",
10
10
  Pharmaceutical: "pharmaceutical",
@@ -16,5 +16,10 @@ exports.DepartmentEnum = {
16
16
  FoodAndBeverage: "food_and_beverage",
17
17
  Chemicals: "chemicals",
18
18
  Electronics: "electronics",
19
+ Healthcare: "healthcare",
20
+ Industrials: "industrials",
21
+ LiveAnimals: "live_animals",
22
+ LifeSciences: "life_sciences",
23
+ Radiopharma: "radiopharma",
19
24
  General: "general",
20
25
  };
@@ -24,6 +24,8 @@ export interface DeviceLimitedForList1 {
24
24
  first_seen_at_timestamp?: string | null;
25
25
  last_seen_at_location?: Chrt.LocationFeature | null;
26
26
  last_seen_at_timestamp?: string | null;
27
+ last_seen_at_location_city?: string | null;
28
+ last_seen_at_location_large_city?: string | null;
27
29
  last_seen_battery_level?: string | null;
28
30
  archived?: boolean;
29
31
  paused?: boolean;
@@ -24,4 +24,6 @@ export interface Driver1 {
24
24
  active_task_group_ids?: string[];
25
25
  last_seen_at_location?: Chrt.LocationFeature | null;
26
26
  last_seen_at_timestamp?: string | null;
27
+ last_seen_at_location_city?: string | null;
28
+ last_seen_at_location_large_city?: string | null;
27
29
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type ScanPayloadKindEnum = "expected" | "observed";
5
+ export declare const ScanPayloadKindEnum: {
6
+ readonly Expected: "expected";
7
+ readonly Observed: "observed";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ScanPayloadKindEnum = void 0;
7
+ exports.ScanPayloadKindEnum = {
8
+ Expected: "expected",
9
+ Observed: "observed",
10
+ };