@chrt-inc/typescript-sdk 1.961.0 → 1.963.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 (130) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/billingNew/resources/invoices/client/Client.d.ts +3 -0
  3. package/dist/cjs/api/resources/billingNew/resources/invoices/client/Client.js +5 -0
  4. package/dist/cjs/api/resources/billingNew/resources/invoices/index.d.ts +1 -0
  5. package/dist/cjs/api/resources/billingNew/resources/invoices/index.js +1 -0
  6. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/Client.d.ts +51 -0
  7. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/Client.js +139 -0
  8. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/index.d.ts +2 -0
  9. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/index.js +17 -0
  10. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/requests/ExportListV1Request.d.ts +14 -0
  11. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/requests/ExportListV1Request.js +5 -0
  12. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/requests/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/requests/index.js +2 -0
  14. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/index.js +17 -0
  16. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/index.d.ts +2 -0
  17. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/index.js +41 -0
  18. package/dist/cjs/api/resources/shipping/resources/index.d.ts +1 -0
  19. package/dist/cjs/api/resources/shipping/resources/index.js +1 -0
  20. package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/client/Client.d.ts +2 -2
  21. package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/client/Client.js +2 -2
  22. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/Client.d.ts +15 -0
  23. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/Client.js +63 -0
  24. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/index.d.ts +1 -0
  25. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/index.js +15 -0
  26. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/requests/TaskArtifactCustodyPartiesUpdateReq.d.ts +14 -0
  27. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/requests/TaskArtifactCustodyPartiesUpdateReq.js +5 -0
  28. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/requests/index.d.ts +1 -0
  29. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/requests/index.js +2 -0
  30. package/dist/cjs/api/resources/shipping/resources/tasks/client/Client.d.ts +14 -0
  31. package/dist/cjs/api/resources/shipping/resources/tasks/client/Client.js +63 -0
  32. package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/TaskCustodyPartiesUpdateReq.d.ts +14 -0
  33. package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/TaskCustodyPartiesUpdateReq.js +5 -0
  34. package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/index.d.ts +1 -0
  35. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.d.ts +26 -0
  36. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.js +118 -0
  37. package/dist/cjs/api/resources/users/resources/privateData/client/Client.d.ts +15 -0
  38. package/dist/cjs/api/resources/users/resources/privateData/client/Client.js +64 -0
  39. package/dist/cjs/api/resources/users/resources/privateData/client/requests/UserPrivateDataNameUpdateReq.d.ts +12 -0
  40. package/dist/cjs/api/resources/users/resources/privateData/client/requests/UserPrivateDataNameUpdateReq.js +5 -0
  41. package/dist/cjs/api/resources/users/resources/privateData/client/requests/index.d.ts +1 -0
  42. package/dist/cjs/api/types/CustodyParty1.d.ts +10 -0
  43. package/dist/cjs/api/types/CustodyParty1.js +5 -0
  44. package/dist/cjs/api/types/CustodyPartyExpanded.d.ts +13 -0
  45. package/dist/cjs/api/types/CustodyPartyExpanded.js +5 -0
  46. package/dist/cjs/api/types/InvoiceExportListItem.d.ts +46 -0
  47. package/dist/cjs/api/types/InvoiceExportListItem.js +5 -0
  48. package/dist/cjs/api/types/InvoiceExportListRes.d.ts +8 -0
  49. package/dist/cjs/api/types/InvoiceExportListRes.js +5 -0
  50. package/dist/cjs/api/types/OrderEventActionEnum1.d.ts +2 -1
  51. package/dist/cjs/api/types/OrderEventActionEnum1.js +1 -0
  52. package/dist/cjs/api/types/OrderEventExpanded1.d.ts +1 -1
  53. package/dist/cjs/api/types/ReelablesAsset1.d.ts +3 -0
  54. package/dist/cjs/api/types/ReelablesAssetPausedTimeWindow1.d.ts +7 -0
  55. package/dist/cjs/api/types/ReelablesAssetPausedTimeWindow1.js +5 -0
  56. package/dist/cjs/api/types/ReelablesDataPointMetadata1.d.ts +1 -0
  57. package/dist/cjs/api/types/Task1.d.ts +2 -0
  58. package/dist/cjs/api/types/TaskArtifact1.d.ts +2 -0
  59. package/dist/cjs/api/types/TaskExpanded.d.ts +2 -0
  60. package/dist/cjs/api/types/UserPrivateData1.d.ts +1 -0
  61. package/dist/cjs/api/types/index.d.ts +5 -0
  62. package/dist/cjs/api/types/index.js +5 -0
  63. package/dist/cjs/version.d.ts +1 -1
  64. package/dist/cjs/version.js +1 -1
  65. package/dist/esm/Client.mjs +2 -2
  66. package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.d.mts +3 -0
  67. package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.mjs +5 -0
  68. package/dist/esm/api/resources/billingNew/resources/invoices/index.d.mts +1 -0
  69. package/dist/esm/api/resources/billingNew/resources/invoices/index.mjs +1 -0
  70. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/Client.d.mts +51 -0
  71. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/Client.mjs +102 -0
  72. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/index.d.mts +2 -0
  73. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/index.mjs +1 -0
  74. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/requests/ExportListV1Request.d.mts +14 -0
  75. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/requests/ExportListV1Request.mjs +4 -0
  76. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/requests/index.d.mts +1 -0
  77. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/requests/index.mjs +1 -0
  78. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/index.d.mts +1 -0
  79. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/index.mjs +1 -0
  80. package/dist/esm/api/resources/billingNew/resources/invoices/resources/index.d.mts +2 -0
  81. package/dist/esm/api/resources/billingNew/resources/invoices/resources/index.mjs +2 -0
  82. package/dist/esm/api/resources/shipping/resources/index.d.mts +1 -0
  83. package/dist/esm/api/resources/shipping/resources/index.mjs +1 -0
  84. package/dist/esm/api/resources/shipping/resources/orders/resources/orderEvents/client/Client.d.mts +2 -2
  85. package/dist/esm/api/resources/shipping/resources/orders/resources/orderEvents/client/Client.mjs +2 -2
  86. package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/Client.d.mts +15 -0
  87. package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/Client.mjs +63 -0
  88. package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/index.d.mts +1 -0
  89. package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/index.mjs +1 -1
  90. package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/requests/TaskArtifactCustodyPartiesUpdateReq.d.mts +14 -0
  91. package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/requests/TaskArtifactCustodyPartiesUpdateReq.mjs +4 -0
  92. package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/requests/index.d.mts +1 -0
  93. package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/requests/index.mjs +1 -0
  94. package/dist/esm/api/resources/shipping/resources/tasks/client/Client.d.mts +14 -0
  95. package/dist/esm/api/resources/shipping/resources/tasks/client/Client.mjs +63 -0
  96. package/dist/esm/api/resources/shipping/resources/tasks/client/requests/TaskCustodyPartiesUpdateReq.d.mts +14 -0
  97. package/dist/esm/api/resources/shipping/resources/tasks/client/requests/TaskCustodyPartiesUpdateReq.mjs +4 -0
  98. package/dist/esm/api/resources/shipping/resources/tasks/client/requests/index.d.mts +1 -0
  99. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.d.mts +26 -0
  100. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.mjs +118 -0
  101. package/dist/esm/api/resources/users/resources/privateData/client/Client.d.mts +15 -0
  102. package/dist/esm/api/resources/users/resources/privateData/client/Client.mjs +64 -0
  103. package/dist/esm/api/resources/users/resources/privateData/client/requests/UserPrivateDataNameUpdateReq.d.mts +12 -0
  104. package/dist/esm/api/resources/users/resources/privateData/client/requests/UserPrivateDataNameUpdateReq.mjs +4 -0
  105. package/dist/esm/api/resources/users/resources/privateData/client/requests/index.d.mts +1 -0
  106. package/dist/esm/api/types/CustodyParty1.d.mts +10 -0
  107. package/dist/esm/api/types/CustodyParty1.mjs +4 -0
  108. package/dist/esm/api/types/CustodyPartyExpanded.d.mts +13 -0
  109. package/dist/esm/api/types/CustodyPartyExpanded.mjs +4 -0
  110. package/dist/esm/api/types/InvoiceExportListItem.d.mts +46 -0
  111. package/dist/esm/api/types/InvoiceExportListItem.mjs +4 -0
  112. package/dist/esm/api/types/InvoiceExportListRes.d.mts +8 -0
  113. package/dist/esm/api/types/InvoiceExportListRes.mjs +4 -0
  114. package/dist/esm/api/types/OrderEventActionEnum1.d.mts +2 -1
  115. package/dist/esm/api/types/OrderEventActionEnum1.mjs +1 -0
  116. package/dist/esm/api/types/OrderEventExpanded1.d.mts +1 -1
  117. package/dist/esm/api/types/ReelablesAsset1.d.mts +3 -0
  118. package/dist/esm/api/types/ReelablesAssetPausedTimeWindow1.d.mts +7 -0
  119. package/dist/esm/api/types/ReelablesAssetPausedTimeWindow1.mjs +4 -0
  120. package/dist/esm/api/types/ReelablesDataPointMetadata1.d.mts +1 -0
  121. package/dist/esm/api/types/Task1.d.mts +2 -0
  122. package/dist/esm/api/types/TaskArtifact1.d.mts +2 -0
  123. package/dist/esm/api/types/TaskExpanded.d.mts +2 -0
  124. package/dist/esm/api/types/UserPrivateData1.d.mts +1 -0
  125. package/dist/esm/api/types/index.d.mts +5 -0
  126. package/dist/esm/api/types/index.mjs +5 -0
  127. package/dist/esm/version.d.mts +1 -1
  128. package/dist/esm/version.mjs +1 -1
  129. package/package.json +1 -1
  130. package/reference.md +411 -2
@@ -60,8 +60,8 @@ class ChrtClient {
60
60
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
61
61
  "X-Fern-Language": "JavaScript",
62
62
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
63
- "X-Fern-SDK-Version": "1.961.0",
64
- "User-Agent": "@chrt-inc/typescript-sdk/1.961.0",
63
+ "X-Fern-SDK-Version": "1.963.0",
64
+ "User-Agent": "@chrt-inc/typescript-sdk/1.963.0",
65
65
  "X-Fern-Runtime": core.RUNTIME.type,
66
66
  "X-Fern-Runtime-Version": core.RUNTIME.version,
67
67
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -4,6 +4,7 @@
4
4
  import * as environments from "../../../../../../environments.js";
5
5
  import * as core from "../../../../../../core/index.js";
6
6
  import * as Chrt from "../../../../../index.js";
7
+ import { Export } from "../resources/export/client/Client.js";
7
8
  export declare namespace Invoices {
8
9
  interface Options {
9
10
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -29,7 +30,9 @@ export declare namespace Invoices {
29
30
  }
30
31
  export declare class Invoices {
31
32
  protected readonly _options: Invoices.Options;
33
+ protected _export: Export | undefined;
32
34
  constructor(_options?: Invoices.Options);
35
+ get export(): Export;
33
36
  /**
34
37
  * Approves a draft invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (Invoice1)
35
38
  *
@@ -51,10 +51,15 @@ const core = __importStar(require("../../../../../../core/index.js"));
51
51
  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
+ const Client_js_1 = require("../resources/export/client/Client.js");
54
55
  class Invoices {
55
56
  constructor(_options = {}) {
56
57
  this._options = _options;
57
58
  }
59
+ get export() {
60
+ var _a;
61
+ return ((_a = this._export) !== null && _a !== void 0 ? _a : (this._export = new Client_js_1.Export(this._options)));
62
+ }
58
63
  /**
59
64
  * Approves a draft invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (Invoice1)
60
65
  *
@@ -1 +1,2 @@
1
1
  export * from "./client/index.js";
2
+ export * from "./resources/index.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./resources/index.js"), exports);
@@ -0,0 +1,51 @@
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 Export {
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 Export {
31
+ protected readonly _options: Export.Options;
32
+ constructor(_options?: Export.Options);
33
+ /**
34
+ * Lists up to 1,000 shipment-level export rows for one approved accounts-receivable invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExportListRes)
35
+ *
36
+ * @param {string} invoiceId
37
+ * @param {Chrt.billingNew.invoices.ExportListV1Request} request
38
+ * @param {Export.RequestOptions} requestOptions - Request-specific configuration.
39
+ *
40
+ * @throws {@link Chrt.UnprocessableEntityError}
41
+ *
42
+ * @example
43
+ * await client.billingNew.invoices.export.listV1("invoice_id", {
44
+ * page: 1,
45
+ * page_size: 1
46
+ * })
47
+ */
48
+ listV1(invoiceId: string, request?: Chrt.billingNew.invoices.ExportListV1Request, requestOptions?: Export.RequestOptions): core.HttpResponsePromise<Chrt.InvoiceExportListRes>;
49
+ private __listV1;
50
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
51
+ }
@@ -0,0 +1,139 @@
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.Export = 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 Export {
55
+ constructor(_options = {}) {
56
+ this._options = _options;
57
+ }
58
+ /**
59
+ * Lists up to 1,000 shipment-level export rows for one approved accounts-receivable invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExportListRes)
60
+ *
61
+ * @param {string} invoiceId
62
+ * @param {Chrt.billingNew.invoices.ExportListV1Request} request
63
+ * @param {Export.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @throws {@link Chrt.UnprocessableEntityError}
66
+ *
67
+ * @example
68
+ * await client.billingNew.invoices.export.listV1("invoice_id", {
69
+ * page: 1,
70
+ * page_size: 1
71
+ * })
72
+ */
73
+ listV1(invoiceId, request = {}, requestOptions) {
74
+ return core.HttpResponsePromise.fromPromise(this.__listV1(invoiceId, request, requestOptions));
75
+ }
76
+ __listV1(invoiceId_1) {
77
+ return __awaiter(this, arguments, void 0, function* (invoiceId, request = {}, requestOptions) {
78
+ var _a, _b, _c, _d, _e, _f;
79
+ const { page, page_size: pageSize } = request;
80
+ const _queryParams = {};
81
+ if (page !== undefined) {
82
+ _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
83
+ }
84
+ if (pageSize !== undefined) {
85
+ _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
86
+ }
87
+ 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);
88
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
89
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, `billing_new/invoices/export/list/v1/${encodeURIComponent(invoiceId)}`),
90
+ method: "GET",
91
+ headers: _headers,
92
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
93
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
94
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
95
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
96
+ });
97
+ if (_response.ok) {
98
+ return { data: _response.body, rawResponse: _response.rawResponse };
99
+ }
100
+ if (_response.error.reason === "status-code") {
101
+ switch (_response.error.statusCode) {
102
+ case 422:
103
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
104
+ default:
105
+ throw new errors.ChrtError({
106
+ statusCode: _response.error.statusCode,
107
+ body: _response.error.body,
108
+ rawResponse: _response.rawResponse,
109
+ });
110
+ }
111
+ }
112
+ switch (_response.error.reason) {
113
+ case "non-json":
114
+ throw new errors.ChrtError({
115
+ statusCode: _response.error.statusCode,
116
+ body: _response.error.rawBody,
117
+ rawResponse: _response.rawResponse,
118
+ });
119
+ case "timeout":
120
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/invoices/export/list/v1/{invoice_id}.");
121
+ case "unknown":
122
+ throw new errors.ChrtError({
123
+ message: _response.error.errorMessage,
124
+ rawResponse: _response.rawResponse,
125
+ });
126
+ }
127
+ });
128
+ }
129
+ _getAuthorizationHeader() {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ const bearer = yield core.Supplier.get(this._options.token);
132
+ if (bearer != null) {
133
+ return `Bearer ${bearer}`;
134
+ }
135
+ return undefined;
136
+ });
137
+ }
138
+ }
139
+ exports.Export = Export;
@@ -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,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * page: 1,
8
+ * page_size: 1
9
+ * }
10
+ */
11
+ export interface ExportListV1Request {
12
+ page?: number | null;
13
+ page_size?: number | null;
14
+ }
@@ -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 @@
1
+ export { type ExportListV1Request } from "./ExportListV1Request.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);
@@ -0,0 +1,2 @@
1
+ export * as export_ from "./export/index.js";
2
+ export * from "./export/client/requests/index.js";
@@ -0,0 +1,41 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.export_ = void 0;
40
+ exports.export_ = __importStar(require("./export/index.js"));
41
+ __exportStar(require("./export/client/requests/index.js"), exports);
@@ -10,5 +10,6 @@ export * from "./drivers/client/requests/index.js";
10
10
  export * from "./flights/client/requests/index.js";
11
11
  export * from "./orderTemplatesNew/client/requests/index.js";
12
12
  export * from "./orders/client/requests/index.js";
13
+ export * from "./taskArtifacts/client/requests/index.js";
13
14
  export * from "./taskGroups/client/requests/index.js";
14
15
  export * from "./tasks/client/requests/index.js";
@@ -49,5 +49,6 @@ __exportStar(require("./drivers/client/requests/index.js"), exports);
49
49
  __exportStar(require("./flights/client/requests/index.js"), exports);
50
50
  __exportStar(require("./orderTemplatesNew/client/requests/index.js"), exports);
51
51
  __exportStar(require("./orders/client/requests/index.js"), exports);
52
+ __exportStar(require("./taskArtifacts/client/requests/index.js"), exports);
52
53
  __exportStar(require("./taskGroups/client/requests/index.js"), exports);
53
54
  __exportStar(require("./tasks/client/requests/index.js"), exports);
@@ -31,7 +31,7 @@ export declare class OrderEvents {
31
31
  protected readonly _options: OrderEvents.Options;
32
32
  constructor(_options?: OrderEvents.Options);
33
33
  /**
34
- * Lists event log entries for an order with organization and user public data hydrated, filtering, sorting, and pagination. | authz: min_org_role=administrator | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (OrderEventListRes)
34
+ * Lists event log entries for an order with organization and user display data hydrated, filtering, sorting, and pagination. | authz: min_org_role=administrator | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (OrderEventListRes)
35
35
  *
36
36
  * @param {string} orderId
37
37
  * @param {Chrt.shipping.orders.OrderEventsListV1Request} request
@@ -55,7 +55,7 @@ export declare class OrderEvents {
55
55
  listV1(orderId: string, request?: Chrt.shipping.orders.OrderEventsListV1Request, requestOptions?: OrderEvents.RequestOptions): core.HttpResponsePromise<Chrt.OrderEventListRes>;
56
56
  private __listV1;
57
57
  /**
58
- * Retrieves a single order event log entry by its ID with organization and user public data hydrated. | authz: min_org_role=administrator | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (OrderEventExpanded1)
58
+ * Retrieves a single order event log entry by its ID with organization and user name hydrated. | authz: min_org_role=administrator | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (OrderEventExpanded1)
59
59
  *
60
60
  * @param {string} orderEventId
61
61
  * @param {OrderEvents.RequestOptions} requestOptions - Request-specific configuration.
@@ -56,7 +56,7 @@ class OrderEvents {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
59
- * Lists event log entries for an order with organization and user public data hydrated, filtering, sorting, and pagination. | authz: min_org_role=administrator | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (OrderEventListRes)
59
+ * Lists event log entries for an order with organization and user display data hydrated, filtering, sorting, and pagination. | authz: min_org_role=administrator | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (OrderEventListRes)
60
60
  *
61
61
  * @param {string} orderId
62
62
  * @param {Chrt.shipping.orders.OrderEventsListV1Request} request
@@ -160,7 +160,7 @@ class OrderEvents {
160
160
  });
161
161
  }
162
162
  /**
163
- * Retrieves a single order event log entry by its ID with organization and user public data hydrated. | authz: min_org_role=administrator | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (OrderEventExpanded1)
163
+ * Retrieves a single order event log entry by its ID with organization and user name hydrated. | authz: min_org_role=administrator | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (OrderEventExpanded1)
164
164
  *
165
165
  * @param {string} orderEventId
166
166
  * @param {OrderEvents.RequestOptions} requestOptions - Request-specific configuration.
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as environments from "../../../../../../environments.js";
5
5
  import * as core from "../../../../../../core/index.js";
6
+ import * as Chrt from "../../../../../index.js";
6
7
  import { S3Object } from "../resources/s3Object/client/Client.js";
7
8
  import { Scan } from "../resources/scan/client/Client.js";
8
9
  export declare namespace TaskArtifacts {
@@ -48,6 +49,20 @@ export declare class TaskArtifacts {
48
49
  */
49
50
  completeV1(taskArtifactId: string, requestOptions?: TaskArtifacts.RequestOptions): core.HttpResponsePromise<boolean>;
50
51
  private __completeV1;
52
+ /**
53
+ * Updates or clears the parties that provided or received cargo for a task artifact. Contact references must belong to the caller's organization. | authz_personas=[draft_creator_org_operator, driver_for_executor, executor_org_operators, coordinator_org_operators] (depending on status) | (TaskArtifactCustodyPartiesUpdateReq) -> (bool)
54
+ *
55
+ * @param {string} taskArtifactId
56
+ * @param {Chrt.shipping.TaskArtifactCustodyPartiesUpdateReq} request
57
+ * @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
58
+ *
59
+ * @throws {@link Chrt.UnprocessableEntityError}
60
+ *
61
+ * @example
62
+ * await client.shipping.taskArtifacts.updateCustodyPartiesV1("task_artifact_id")
63
+ */
64
+ updateCustodyPartiesV1(taskArtifactId: string, request?: Chrt.shipping.TaskArtifactCustodyPartiesUpdateReq, requestOptions?: TaskArtifacts.RequestOptions): core.HttpResponsePromise<boolean>;
65
+ private __updateCustodyPartiesV1;
51
66
  /**
52
67
  * Marks a task artifact as SKIPPED. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators] | () -> (bool)
53
68
  *
@@ -124,6 +124,69 @@ class TaskArtifacts {
124
124
  }
125
125
  });
126
126
  }
127
+ /**
128
+ * Updates or clears the parties that provided or received cargo for a task artifact. Contact references must belong to the caller's organization. | authz_personas=[draft_creator_org_operator, driver_for_executor, executor_org_operators, coordinator_org_operators] (depending on status) | (TaskArtifactCustodyPartiesUpdateReq) -> (bool)
129
+ *
130
+ * @param {string} taskArtifactId
131
+ * @param {Chrt.shipping.TaskArtifactCustodyPartiesUpdateReq} request
132
+ * @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
133
+ *
134
+ * @throws {@link Chrt.UnprocessableEntityError}
135
+ *
136
+ * @example
137
+ * await client.shipping.taskArtifacts.updateCustodyPartiesV1("task_artifact_id")
138
+ */
139
+ updateCustodyPartiesV1(taskArtifactId, request = {}, requestOptions) {
140
+ return core.HttpResponsePromise.fromPromise(this.__updateCustodyPartiesV1(taskArtifactId, request, requestOptions));
141
+ }
142
+ __updateCustodyPartiesV1(taskArtifactId_1) {
143
+ return __awaiter(this, arguments, void 0, function* (taskArtifactId, request = {}, requestOptions) {
144
+ var _a, _b, _c, _d;
145
+ 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);
146
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
147
+ 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/custody_parties/update/v1/${encodeURIComponent(taskArtifactId)}`),
148
+ method: "PATCH",
149
+ headers: _headers,
150
+ contentType: "application/json",
151
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
152
+ requestType: "json",
153
+ body: request,
154
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
155
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
156
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
157
+ });
158
+ if (_response.ok) {
159
+ return { data: _response.body, rawResponse: _response.rawResponse };
160
+ }
161
+ if (_response.error.reason === "status-code") {
162
+ switch (_response.error.statusCode) {
163
+ case 422:
164
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
165
+ default:
166
+ throw new errors.ChrtError({
167
+ statusCode: _response.error.statusCode,
168
+ body: _response.error.body,
169
+ rawResponse: _response.rawResponse,
170
+ });
171
+ }
172
+ }
173
+ switch (_response.error.reason) {
174
+ case "non-json":
175
+ throw new errors.ChrtError({
176
+ statusCode: _response.error.statusCode,
177
+ body: _response.error.rawBody,
178
+ rawResponse: _response.rawResponse,
179
+ });
180
+ case "timeout":
181
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/task_artifacts/custody_parties/update/v1/{task_artifact_id}.");
182
+ case "unknown":
183
+ throw new errors.ChrtError({
184
+ message: _response.error.errorMessage,
185
+ rawResponse: _response.rawResponse,
186
+ });
187
+ }
188
+ });
189
+ }
127
190
  /**
128
191
  * Marks a task artifact as SKIPPED. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators] | () -> (bool)
129
192
  *
@@ -1 +1,2 @@
1
1
  export {};
2
+ export * from "./requests/index.js";
@@ -1,2 +1,17 @@
1
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
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,14 @@
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
+ */
9
+ export interface TaskArtifactCustodyPartiesUpdateReq {
10
+ provided_by?: Chrt.CustodyParty1 | null;
11
+ provided_by__set_to_None?: boolean;
12
+ received_by?: Chrt.CustodyParty1 | null;
13
+ received_by__set_to_None?: boolean;
14
+ }
@@ -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 @@
1
+ export { type TaskArtifactCustodyPartiesUpdateReq } from "./TaskArtifactCustodyPartiesUpdateReq.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -77,6 +77,20 @@ export declare class Tasks {
77
77
  */
78
78
  updateCompletionTimestampV1(taskId: string, request: Chrt.shipping.TaskCompletionTimestampUpdateReq, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
79
79
  private __updateCompletionTimestampV1;
80
+ /**
81
+ * Updates or clears the parties that provided or received cargo for a task. Contact references must belong to the caller's organization. | authz_personas=[draft_creator_org_operator, driver_for_executor, executor_org_operators, coordinator_org_operators] (depending on status) | (TaskCustodyPartiesUpdateReq) -> (bool)
82
+ *
83
+ * @param {string} taskId
84
+ * @param {Chrt.shipping.TaskCustodyPartiesUpdateReq} request
85
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
86
+ *
87
+ * @throws {@link Chrt.UnprocessableEntityError}
88
+ *
89
+ * @example
90
+ * await client.shipping.tasks.updateCustodyPartiesV1("task_id")
91
+ */
92
+ updateCustodyPartiesV1(taskId: string, request?: Chrt.shipping.TaskCustodyPartiesUpdateReq, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
93
+ private __updateCustodyPartiesV1;
80
94
  /**
81
95
  * Overrides a draft or staged task location from a contact or coordinator shipper account and associates the reference. | authz_personas=[draft_creator_org_operator, order_creator_org_operators, task_group_operating_org_operators, coordinator_org_operators] | (TaskLocationFromReferenceReq) -> (PydanticObjectId)
82
96
  *