@chrt-inc/typescript-sdk 1.992.0 → 1.997.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/errors/ForbiddenError.d.ts +9 -0
  3. package/dist/cjs/api/errors/ForbiddenError.js +52 -0
  4. package/dist/cjs/api/errors/LockedError.d.ts +9 -0
  5. package/dist/cjs/api/errors/LockedError.js +52 -0
  6. package/dist/cjs/api/errors/NotFoundError.d.ts +9 -0
  7. package/dist/cjs/api/errors/NotFoundError.js +52 -0
  8. package/dist/cjs/api/errors/ServiceUnavailableError.d.ts +9 -0
  9. package/dist/cjs/api/errors/ServiceUnavailableError.js +52 -0
  10. package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +1 -2
  11. package/dist/cjs/api/errors/index.d.ts +4 -0
  12. package/dist/cjs/api/errors/index.js +4 -0
  13. package/dist/cjs/api/resources/operations/resources/orderInternalMessages/resources/s3Objects/client/Client.d.ts +5 -1
  14. package/dist/cjs/api/resources/operations/resources/orderInternalMessages/resources/s3Objects/client/Client.js +13 -1
  15. package/dist/cjs/api/resources/orgs/resources/complianceDocuments/resources/s3Object/client/Client.d.ts +5 -1
  16. package/dist/cjs/api/resources/orgs/resources/complianceDocuments/resources/s3Object/client/Client.js +13 -1
  17. package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/resources/s3Object/client/Client.d.ts +5 -1
  18. package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/resources/s3Object/client/Client.js +13 -1
  19. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.ts +5 -1
  20. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.js +13 -1
  21. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.d.ts +5 -1
  22. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.js +13 -1
  23. package/dist/cjs/api/types/FileDownloadErrorRes.d.ts +27 -0
  24. package/dist/cjs/api/types/FileDownloadErrorRes.js +19 -0
  25. package/dist/cjs/api/types/FileDownloadRequestErrorRes.d.ts +13 -0
  26. package/dist/cjs/api/types/FileDownloadRequestErrorRes.js +5 -0
  27. package/dist/cjs/api/types/NotFoundErrorBody.d.ts +5 -0
  28. package/dist/cjs/api/types/NotFoundErrorBody.js +5 -0
  29. package/dist/cjs/api/types/UnprocessableEntityErrorBody.d.ts +5 -0
  30. package/dist/cjs/api/types/UnprocessableEntityErrorBody.js +5 -0
  31. package/dist/cjs/api/types/index.d.ts +4 -0
  32. package/dist/cjs/api/types/index.js +4 -0
  33. package/dist/cjs/version.d.ts +1 -1
  34. package/dist/cjs/version.js +1 -1
  35. package/dist/esm/Client.mjs +2 -2
  36. package/dist/esm/api/errors/ForbiddenError.d.mts +9 -0
  37. package/dist/esm/api/errors/ForbiddenError.mjs +15 -0
  38. package/dist/esm/api/errors/LockedError.d.mts +9 -0
  39. package/dist/esm/api/errors/LockedError.mjs +15 -0
  40. package/dist/esm/api/errors/NotFoundError.d.mts +9 -0
  41. package/dist/esm/api/errors/NotFoundError.mjs +15 -0
  42. package/dist/esm/api/errors/ServiceUnavailableError.d.mts +9 -0
  43. package/dist/esm/api/errors/ServiceUnavailableError.mjs +15 -0
  44. package/dist/esm/api/errors/UnprocessableEntityError.d.mts +1 -2
  45. package/dist/esm/api/errors/index.d.mts +4 -0
  46. package/dist/esm/api/errors/index.mjs +4 -0
  47. package/dist/esm/api/resources/operations/resources/orderInternalMessages/resources/s3Objects/client/Client.d.mts +5 -1
  48. package/dist/esm/api/resources/operations/resources/orderInternalMessages/resources/s3Objects/client/Client.mjs +13 -1
  49. package/dist/esm/api/resources/orgs/resources/complianceDocuments/resources/s3Object/client/Client.d.mts +5 -1
  50. package/dist/esm/api/resources/orgs/resources/complianceDocuments/resources/s3Object/client/Client.mjs +13 -1
  51. package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/resources/s3Object/client/Client.d.mts +5 -1
  52. package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/resources/s3Object/client/Client.mjs +13 -1
  53. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.mts +5 -1
  54. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.mjs +13 -1
  55. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.d.mts +5 -1
  56. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.mjs +13 -1
  57. package/dist/esm/api/types/FileDownloadErrorRes.d.mts +27 -0
  58. package/dist/esm/api/types/FileDownloadErrorRes.mjs +16 -0
  59. package/dist/esm/api/types/FileDownloadRequestErrorRes.d.mts +13 -0
  60. package/dist/esm/api/types/FileDownloadRequestErrorRes.mjs +4 -0
  61. package/dist/esm/api/types/NotFoundErrorBody.d.mts +5 -0
  62. package/dist/esm/api/types/NotFoundErrorBody.mjs +4 -0
  63. package/dist/esm/api/types/UnprocessableEntityErrorBody.d.mts +5 -0
  64. package/dist/esm/api/types/UnprocessableEntityErrorBody.mjs +4 -0
  65. package/dist/esm/api/types/index.d.mts +4 -0
  66. package/dist/esm/api/types/index.mjs +4 -0
  67. package/dist/esm/version.d.mts +1 -1
  68. package/dist/esm/version.mjs +1 -1
  69. package/package.json +1 -1
  70. package/reference.md +5 -5
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface FileDownloadRequestErrorRes {
5
+ /** Existing authorization/resource error message or FastAPI request-validation errors. */
6
+ detail: FileDownloadRequestErrorRes.Detail;
7
+ }
8
+ export declare namespace FileDownloadRequestErrorRes {
9
+ /**
10
+ * Existing authorization/resource error message or FastAPI request-validation errors.
11
+ */
12
+ type Detail = string | Record<string, unknown>[];
13
+ }
@@ -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,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export type NotFoundErrorBody = Chrt.FileDownloadErrorRes | Chrt.FileDownloadRequestErrorRes;
@@ -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,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export type UnprocessableEntityErrorBody = Chrt.FileDownloadErrorRes | Chrt.FileDownloadRequestErrorRes;
@@ -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 });
@@ -1,3 +1,5 @@
1
+ export * from "./NotFoundErrorBody.js";
2
+ export * from "./UnprocessableEntityErrorBody.js";
1
3
  export * from "./AiImageDescription.js";
2
4
  export * from "./Account1.js";
3
5
  export * from "./AccountListRes.js";
@@ -228,6 +230,8 @@ export * from "./EcourierOrderResponse1.js";
228
230
  export * from "./EcourierOrderSortByEnum.js";
229
231
  export * from "./EcourierOrderStopResponse1.js";
230
232
  export * from "./ExtraStopRate1.js";
233
+ export * from "./FileDownloadErrorRes.js";
234
+ export * from "./FileDownloadRequestErrorRes.js";
231
235
  export * from "./FirebaseCloudMessagingTokenData1.js";
232
236
  export * from "./FlatFeeRate1.js";
233
237
  export * from "./FlightConnection.js";
@@ -14,6 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./NotFoundErrorBody.js"), exports);
18
+ __exportStar(require("./UnprocessableEntityErrorBody.js"), exports);
17
19
  __exportStar(require("./AiImageDescription.js"), exports);
18
20
  __exportStar(require("./Account1.js"), exports);
19
21
  __exportStar(require("./AccountListRes.js"), exports);
@@ -244,6 +246,8 @@ __exportStar(require("./EcourierOrderResponse1.js"), exports);
244
246
  __exportStar(require("./EcourierOrderSortByEnum.js"), exports);
245
247
  __exportStar(require("./EcourierOrderStopResponse1.js"), exports);
246
248
  __exportStar(require("./ExtraStopRate1.js"), exports);
249
+ __exportStar(require("./FileDownloadErrorRes.js"), exports);
250
+ __exportStar(require("./FileDownloadRequestErrorRes.js"), exports);
247
251
  __exportStar(require("./FirebaseCloudMessagingTokenData1.js"), exports);
248
252
  __exportStar(require("./FlatFeeRate1.js"), exports);
249
253
  __exportStar(require("./FlightConnection.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.992.0";
1
+ export declare const SDK_VERSION = "1.997.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.992.0";
4
+ exports.SDK_VERSION = "1.997.0";
@@ -24,8 +24,8 @@ export class ChrtClient {
24
24
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
25
25
  "X-Fern-Language": "JavaScript",
26
26
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
27
- "X-Fern-SDK-Version": "1.992.0",
28
- "User-Agent": "@chrt-inc/typescript-sdk/1.992.0",
27
+ "X-Fern-SDK-Version": "1.997.0",
28
+ "User-Agent": "@chrt-inc/typescript-sdk/1.997.0",
29
29
  "X-Fern-Runtime": core.RUNTIME.type,
30
30
  "X-Fern-Runtime-Version": core.RUNTIME.version,
31
31
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.mjs";
5
+ import * as Chrt from "../index.mjs";
6
+ import * as core from "../../core/index.mjs";
7
+ export declare class ForbiddenError extends errors.ChrtError {
8
+ constructor(body: Chrt.FileDownloadRequestErrorRes, rawResponse?: core.RawResponse);
9
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.mjs";
5
+ export class ForbiddenError extends errors.ChrtError {
6
+ constructor(body, rawResponse) {
7
+ super({
8
+ message: "ForbiddenError",
9
+ statusCode: 403,
10
+ body: body,
11
+ rawResponse: rawResponse,
12
+ });
13
+ Object.setPrototypeOf(this, ForbiddenError.prototype);
14
+ }
15
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.mjs";
5
+ import * as Chrt from "../index.mjs";
6
+ import * as core from "../../core/index.mjs";
7
+ export declare class LockedError extends errors.ChrtError {
8
+ constructor(body: Chrt.FileDownloadErrorRes, rawResponse?: core.RawResponse);
9
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.mjs";
5
+ export class LockedError extends errors.ChrtError {
6
+ constructor(body, rawResponse) {
7
+ super({
8
+ message: "LockedError",
9
+ statusCode: 423,
10
+ body: body,
11
+ rawResponse: rawResponse,
12
+ });
13
+ Object.setPrototypeOf(this, LockedError.prototype);
14
+ }
15
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.mjs";
5
+ import * as Chrt from "../index.mjs";
6
+ import * as core from "../../core/index.mjs";
7
+ export declare class NotFoundError extends errors.ChrtError {
8
+ constructor(body: Chrt.NotFoundErrorBody, rawResponse?: core.RawResponse);
9
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.mjs";
5
+ export class NotFoundError extends errors.ChrtError {
6
+ constructor(body, rawResponse) {
7
+ super({
8
+ message: "NotFoundError",
9
+ statusCode: 404,
10
+ body: body,
11
+ rawResponse: rawResponse,
12
+ });
13
+ Object.setPrototypeOf(this, NotFoundError.prototype);
14
+ }
15
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.mjs";
5
+ import * as Chrt from "../index.mjs";
6
+ import * as core from "../../core/index.mjs";
7
+ export declare class ServiceUnavailableError extends errors.ChrtError {
8
+ constructor(body: Chrt.FileDownloadErrorRes, rawResponse?: core.RawResponse);
9
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.mjs";
5
+ export class ServiceUnavailableError extends errors.ChrtError {
6
+ constructor(body, rawResponse) {
7
+ super({
8
+ message: "ServiceUnavailableError",
9
+ statusCode: 503,
10
+ body: body,
11
+ rawResponse: rawResponse,
12
+ });
13
+ Object.setPrototypeOf(this, ServiceUnavailableError.prototype);
14
+ }
15
+ }
@@ -2,8 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as errors from "../../errors/index.mjs";
5
- import * as Chrt from "../index.mjs";
6
5
  import * as core from "../../core/index.mjs";
7
6
  export declare class UnprocessableEntityError extends errors.ChrtError {
8
- constructor(body: Chrt.HttpValidationError, rawResponse?: core.RawResponse);
7
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
9
8
  }
@@ -1 +1,5 @@
1
1
  export * from "./UnprocessableEntityError.mjs";
2
+ export * from "./ForbiddenError.mjs";
3
+ export * from "./NotFoundError.mjs";
4
+ export * from "./LockedError.mjs";
5
+ export * from "./ServiceUnavailableError.mjs";
@@ -1 +1,5 @@
1
1
  export * from "./UnprocessableEntityError.mjs";
2
+ export * from "./ForbiddenError.mjs";
3
+ export * from "./NotFoundError.mjs";
4
+ export * from "./LockedError.mjs";
5
+ export * from "./ServiceUnavailableError.mjs";
@@ -31,7 +31,7 @@ export declare class S3Objects {
31
31
  protected readonly _options: S3Objects.Options;
32
32
  constructor(_options?: S3Objects.Options);
33
33
  /**
34
- * Uploads a file to the caller's OrderInternalMessages for this order (lazy-creates the messages doc). Automatic blurhash generation for images. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (UploadFile) -> (OrderInternalMessageS3ObjectMetadata1)
34
+ * Uploads a file to the caller's OrderInternalMessages for this order (lazy-creates the messages doc). Retains uploaded files; previews require a clean malware scan. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (UploadFile) -> (OrderInternalMessageS3ObjectMetadata1)
35
35
  *
36
36
  * @param {string} orderId
37
37
  * @param {Chrt.operations.orderInternalMessages.BodyPostOrderInternalMessagesS3ObjectsAddV1} request
@@ -75,7 +75,11 @@ export declare class S3Objects {
75
75
  private __getS3ObjectMetadataV1;
76
76
  /**
77
77
  * Streams an order internal messages S3 object file from storage. | authz: min_org_role=operator | () -> (binary)
78
+ * @throws {@link Chrt.ForbiddenError}
79
+ * @throws {@link Chrt.NotFoundError}
78
80
  * @throws {@link Chrt.UnprocessableEntityError}
81
+ * @throws {@link Chrt.LockedError}
82
+ * @throws {@link Chrt.ServiceUnavailableError}
79
83
  */
80
84
  getV1(orderInternalMessageS3ObjectMetadataId: string, requestOptions?: S3Objects.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
81
85
  private __getV1;
@@ -20,7 +20,7 @@ export class S3Objects {
20
20
  this._options = _options;
21
21
  }
22
22
  /**
23
- * Uploads a file to the caller's OrderInternalMessages for this order (lazy-creates the messages doc). Automatic blurhash generation for images. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (UploadFile) -> (OrderInternalMessageS3ObjectMetadata1)
23
+ * Uploads a file to the caller's OrderInternalMessages for this order (lazy-creates the messages doc). Retains uploaded files; previews require a clean malware scan. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (UploadFile) -> (OrderInternalMessageS3ObjectMetadata1)
24
24
  *
25
25
  * @param {string} orderId
26
26
  * @param {Chrt.operations.orderInternalMessages.BodyPostOrderInternalMessagesS3ObjectsAddV1} request
@@ -214,7 +214,11 @@ export class S3Objects {
214
214
  }
215
215
  /**
216
216
  * Streams an order internal messages S3 object file from storage. | authz: min_org_role=operator | () -> (binary)
217
+ * @throws {@link Chrt.ForbiddenError}
218
+ * @throws {@link Chrt.NotFoundError}
217
219
  * @throws {@link Chrt.UnprocessableEntityError}
220
+ * @throws {@link Chrt.LockedError}
221
+ * @throws {@link Chrt.ServiceUnavailableError}
218
222
  */
219
223
  getV1(orderInternalMessageS3ObjectMetadataId, requestOptions) {
220
224
  return core.HttpResponsePromise.fromPromise(this.__getV1(orderInternalMessageS3ObjectMetadataId, requestOptions));
@@ -238,8 +242,16 @@ export class S3Objects {
238
242
  }
239
243
  if (_response.error.reason === "status-code") {
240
244
  switch (_response.error.statusCode) {
245
+ case 403:
246
+ throw new Chrt.ForbiddenError(_response.error.body, _response.rawResponse);
247
+ case 404:
248
+ throw new Chrt.NotFoundError(_response.error.body, _response.rawResponse);
241
249
  case 422:
242
250
  throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
251
+ case 423:
252
+ throw new Chrt.LockedError(_response.error.body, _response.rawResponse);
253
+ case 503:
254
+ throw new Chrt.ServiceUnavailableError(_response.error.body, _response.rawResponse);
243
255
  default:
244
256
  throw new errors.ChrtError({
245
257
  statusCode: _response.error.statusCode,
@@ -31,7 +31,7 @@ export declare class S3Object {
31
31
  protected readonly _options: S3Object.Options;
32
32
  constructor(_options?: S3Object.Options);
33
33
  /**
34
- * Uploads a file to an organization compliance document. Automatic blurhash generation for images. | authz: allowed_org_types=[provider], min_org_role=administrator | (UploadFile) -> (OrgComplianceDocumentS3ObjectMetadata1)
34
+ * Uploads a file to an organization compliance document. Retains uploaded files; previews require a clean malware scan. | authz: allowed_org_types=[provider], min_org_role=administrator | (UploadFile) -> (OrgComplianceDocumentS3ObjectMetadata1)
35
35
  *
36
36
  * @param {string} orgComplianceDocumentId
37
37
  * @param {Chrt.orgs.complianceDocuments.BodyPostOrgComplianceDocumentsS3ObjectAddV1} request
@@ -75,7 +75,11 @@ export declare class S3Object {
75
75
  private __getS3ObjectMetadataV1;
76
76
  /**
77
77
  * Streams an organization compliance document S3 object file from storage. | authz: allowed_org_types=[provider], min_org_role=administrator | () -> (binary)
78
+ * @throws {@link Chrt.ForbiddenError}
79
+ * @throws {@link Chrt.NotFoundError}
78
80
  * @throws {@link Chrt.UnprocessableEntityError}
81
+ * @throws {@link Chrt.LockedError}
82
+ * @throws {@link Chrt.ServiceUnavailableError}
79
83
  */
80
84
  getV1(orgComplianceDocumentS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
81
85
  private __getV1;
@@ -20,7 +20,7 @@ export class S3Object {
20
20
  this._options = _options;
21
21
  }
22
22
  /**
23
- * Uploads a file to an organization compliance document. Automatic blurhash generation for images. | authz: allowed_org_types=[provider], min_org_role=administrator | (UploadFile) -> (OrgComplianceDocumentS3ObjectMetadata1)
23
+ * Uploads a file to an organization compliance document. Retains uploaded files; previews require a clean malware scan. | authz: allowed_org_types=[provider], min_org_role=administrator | (UploadFile) -> (OrgComplianceDocumentS3ObjectMetadata1)
24
24
  *
25
25
  * @param {string} orgComplianceDocumentId
26
26
  * @param {Chrt.orgs.complianceDocuments.BodyPostOrgComplianceDocumentsS3ObjectAddV1} request
@@ -214,7 +214,11 @@ export class S3Object {
214
214
  }
215
215
  /**
216
216
  * Streams an organization compliance document S3 object file from storage. | authz: allowed_org_types=[provider], min_org_role=administrator | () -> (binary)
217
+ * @throws {@link Chrt.ForbiddenError}
218
+ * @throws {@link Chrt.NotFoundError}
217
219
  * @throws {@link Chrt.UnprocessableEntityError}
220
+ * @throws {@link Chrt.LockedError}
221
+ * @throws {@link Chrt.ServiceUnavailableError}
218
222
  */
219
223
  getV1(orgComplianceDocumentS3ObjectMetadataId, requestOptions) {
220
224
  return core.HttpResponsePromise.fromPromise(this.__getV1(orgComplianceDocumentS3ObjectMetadataId, requestOptions));
@@ -238,8 +242,16 @@ export class S3Object {
238
242
  }
239
243
  if (_response.error.reason === "status-code") {
240
244
  switch (_response.error.statusCode) {
245
+ case 403:
246
+ throw new Chrt.ForbiddenError(_response.error.body, _response.rawResponse);
247
+ case 404:
248
+ throw new Chrt.NotFoundError(_response.error.body, _response.rawResponse);
241
249
  case 422:
242
250
  throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
251
+ case 423:
252
+ throw new Chrt.LockedError(_response.error.body, _response.rawResponse);
253
+ case 503:
254
+ throw new Chrt.ServiceUnavailableError(_response.error.body, _response.rawResponse);
243
255
  default:
244
256
  throw new errors.ChrtError({
245
257
  statusCode: _response.error.statusCode,
@@ -31,7 +31,7 @@ export declare class S3Object {
31
31
  protected readonly _options: S3Object.Options;
32
32
  constructor(_options?: S3Object.Options);
33
33
  /**
34
- * Uploads a file to a driver compliance document. Automatic blurhash generation for images. | authz: allowed_org_types=[provider], min_org_role=administrator | (UploadFile) -> (DriverComplianceDocumentS3ObjectMetadata1)
34
+ * Uploads a file to a driver compliance document. Retains uploaded files; previews require a clean malware scan. | authz: allowed_org_types=[provider], min_org_role=administrator | (UploadFile) -> (DriverComplianceDocumentS3ObjectMetadata1)
35
35
  *
36
36
  * @param {string} driverComplianceDocumentId
37
37
  * @param {Chrt.shipping.drivers.complianceDocuments.BodyPostDriverComplianceDocumentsS3ObjectAddV1} request
@@ -75,7 +75,11 @@ export declare class S3Object {
75
75
  private __getS3ObjectMetadataV1;
76
76
  /**
77
77
  * Streams a driver compliance document S3 object file from storage. | authz: allowed_org_types=[provider], min_org_role=administrator | () -> (binary)
78
+ * @throws {@link Chrt.ForbiddenError}
79
+ * @throws {@link Chrt.NotFoundError}
78
80
  * @throws {@link Chrt.UnprocessableEntityError}
81
+ * @throws {@link Chrt.LockedError}
82
+ * @throws {@link Chrt.ServiceUnavailableError}
79
83
  */
80
84
  getV1(driverComplianceDocumentS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
81
85
  private __getV1;
@@ -20,7 +20,7 @@ export class S3Object {
20
20
  this._options = _options;
21
21
  }
22
22
  /**
23
- * Uploads a file to a driver compliance document. Automatic blurhash generation for images. | authz: allowed_org_types=[provider], min_org_role=administrator | (UploadFile) -> (DriverComplianceDocumentS3ObjectMetadata1)
23
+ * Uploads a file to a driver compliance document. Retains uploaded files; previews require a clean malware scan. | authz: allowed_org_types=[provider], min_org_role=administrator | (UploadFile) -> (DriverComplianceDocumentS3ObjectMetadata1)
24
24
  *
25
25
  * @param {string} driverComplianceDocumentId
26
26
  * @param {Chrt.shipping.drivers.complianceDocuments.BodyPostDriverComplianceDocumentsS3ObjectAddV1} request
@@ -214,7 +214,11 @@ export class S3Object {
214
214
  }
215
215
  /**
216
216
  * Streams a driver compliance document S3 object file from storage. | authz: allowed_org_types=[provider], min_org_role=administrator | () -> (binary)
217
+ * @throws {@link Chrt.ForbiddenError}
218
+ * @throws {@link Chrt.NotFoundError}
217
219
  * @throws {@link Chrt.UnprocessableEntityError}
220
+ * @throws {@link Chrt.LockedError}
221
+ * @throws {@link Chrt.ServiceUnavailableError}
218
222
  */
219
223
  getV1(driverComplianceDocumentS3ObjectMetadataId, requestOptions) {
220
224
  return core.HttpResponsePromise.fromPromise(this.__getV1(driverComplianceDocumentS3ObjectMetadataId, requestOptions));
@@ -238,8 +242,16 @@ export class S3Object {
238
242
  }
239
243
  if (_response.error.reason === "status-code") {
240
244
  switch (_response.error.statusCode) {
245
+ case 403:
246
+ throw new Chrt.ForbiddenError(_response.error.body, _response.rawResponse);
247
+ case 404:
248
+ throw new Chrt.NotFoundError(_response.error.body, _response.rawResponse);
241
249
  case 422:
242
250
  throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
251
+ case 423:
252
+ throw new Chrt.LockedError(_response.error.body, _response.rawResponse);
253
+ case 503:
254
+ throw new Chrt.ServiceUnavailableError(_response.error.body, _response.rawResponse);
243
255
  default:
244
256
  throw new errors.ChrtError({
245
257
  statusCode: _response.error.statusCode,
@@ -31,7 +31,7 @@ export declare class S3Object {
31
31
  protected readonly _options: S3Object.Options;
32
32
  constructor(_options?: S3Object.Options);
33
33
  /**
34
- * Uploads a file (image, PDF, etc.) to a task artifact. Automatic blurhash generation for images. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | (UploadFile) -> (TaskArtifactS3ObjectMetadata1)
34
+ * Uploads a file (image, PDF, etc.) to a task artifact. Retains uploaded files; previews require a clean malware scan. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | (UploadFile) -> (TaskArtifactS3ObjectMetadata1)
35
35
  *
36
36
  * @param {string} taskArtifactId
37
37
  * @param {Chrt.shipping.taskArtifacts.BodyPostTaskArtifactsS3ObjectAddV1} request
@@ -101,7 +101,11 @@ export declare class S3Object {
101
101
  private __getS3ObjectMetadataV1;
102
102
  /**
103
103
  * Streams a task artifact S3 object file from storage. | authz_personas=[driver_for_executor, executor_org_operators, shipper_org_operators, coordinator_org_operators] | () -> (binary)
104
+ * @throws {@link Chrt.ForbiddenError}
105
+ * @throws {@link Chrt.NotFoundError}
104
106
  * @throws {@link Chrt.UnprocessableEntityError}
107
+ * @throws {@link Chrt.LockedError}
108
+ * @throws {@link Chrt.ServiceUnavailableError}
105
109
  */
106
110
  getV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
107
111
  private __getV1;
@@ -20,7 +20,7 @@ export class S3Object {
20
20
  this._options = _options;
21
21
  }
22
22
  /**
23
- * Uploads a file (image, PDF, etc.) to a task artifact. Automatic blurhash generation for images. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | (UploadFile) -> (TaskArtifactS3ObjectMetadata1)
23
+ * Uploads a file (image, PDF, etc.) to a task artifact. Retains uploaded files; previews require a clean malware scan. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | (UploadFile) -> (TaskArtifactS3ObjectMetadata1)
24
24
  *
25
25
  * @param {string} taskArtifactId
26
26
  * @param {Chrt.shipping.taskArtifacts.BodyPostTaskArtifactsS3ObjectAddV1} request
@@ -283,7 +283,11 @@ export class S3Object {
283
283
  }
284
284
  /**
285
285
  * Streams a task artifact S3 object file from storage. | authz_personas=[driver_for_executor, executor_org_operators, shipper_org_operators, coordinator_org_operators] | () -> (binary)
286
+ * @throws {@link Chrt.ForbiddenError}
287
+ * @throws {@link Chrt.NotFoundError}
286
288
  * @throws {@link Chrt.UnprocessableEntityError}
289
+ * @throws {@link Chrt.LockedError}
290
+ * @throws {@link Chrt.ServiceUnavailableError}
287
291
  */
288
292
  getV1(taskArtifactS3ObjectMetadataId, requestOptions) {
289
293
  return core.HttpResponsePromise.fromPromise(this.__getV1(taskArtifactS3ObjectMetadataId, requestOptions));
@@ -307,8 +311,16 @@ export class S3Object {
307
311
  }
308
312
  if (_response.error.reason === "status-code") {
309
313
  switch (_response.error.statusCode) {
314
+ case 403:
315
+ throw new Chrt.ForbiddenError(_response.error.body, _response.rawResponse);
316
+ case 404:
317
+ throw new Chrt.NotFoundError(_response.error.body, _response.rawResponse);
310
318
  case 422:
311
319
  throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
320
+ case 423:
321
+ throw new Chrt.LockedError(_response.error.body, _response.rawResponse);
322
+ case 503:
323
+ throw new Chrt.ServiceUnavailableError(_response.error.body, _response.rawResponse);
312
324
  default:
313
325
  throw new errors.ChrtError({
314
326
  statusCode: _response.error.statusCode,
@@ -31,7 +31,7 @@ export declare class S3Object {
31
31
  protected readonly _options: S3Object.Options;
32
32
  constructor(_options?: S3Object.Options);
33
33
  /**
34
- * Uploads a file (image, PDF, etc.) to a task group. Automatic blurhash generation for images. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators, shipper_org_operators] | (UploadFile) -> (TaskGroupS3ObjectMetadata1)
34
+ * Uploads a file (image, PDF, etc.) to a task group. Retains uploaded files; previews require a clean malware scan. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators, shipper_org_operators] | (UploadFile) -> (TaskGroupS3ObjectMetadata1)
35
35
  *
36
36
  * @param {string} taskGroupId
37
37
  * @param {Chrt.shipping.taskGroups.BodyPostTaskGroupsS3ObjectAddV1} request
@@ -75,7 +75,11 @@ export declare class S3Object {
75
75
  private __getS3ObjectMetadataV1;
76
76
  /**
77
77
  * Streams a task group S3 object file from storage. | authz_personas=[driver_for_executor, executor_org_operators, shipper_org_operators, coordinator_org_operators] | () -> (binary)
78
+ * @throws {@link Chrt.ForbiddenError}
79
+ * @throws {@link Chrt.NotFoundError}
78
80
  * @throws {@link Chrt.UnprocessableEntityError}
81
+ * @throws {@link Chrt.LockedError}
82
+ * @throws {@link Chrt.ServiceUnavailableError}
79
83
  */
80
84
  getV1(taskGroupS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
81
85
  private __getV1;
@@ -20,7 +20,7 @@ export class S3Object {
20
20
  this._options = _options;
21
21
  }
22
22
  /**
23
- * Uploads a file (image, PDF, etc.) to a task group. Automatic blurhash generation for images. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators, shipper_org_operators] | (UploadFile) -> (TaskGroupS3ObjectMetadata1)
23
+ * Uploads a file (image, PDF, etc.) to a task group. Retains uploaded files; previews require a clean malware scan. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators, shipper_org_operators] | (UploadFile) -> (TaskGroupS3ObjectMetadata1)
24
24
  *
25
25
  * @param {string} taskGroupId
26
26
  * @param {Chrt.shipping.taskGroups.BodyPostTaskGroupsS3ObjectAddV1} request
@@ -208,7 +208,11 @@ export class S3Object {
208
208
  }
209
209
  /**
210
210
  * Streams a task group S3 object file from storage. | authz_personas=[driver_for_executor, executor_org_operators, shipper_org_operators, coordinator_org_operators] | () -> (binary)
211
+ * @throws {@link Chrt.ForbiddenError}
212
+ * @throws {@link Chrt.NotFoundError}
211
213
  * @throws {@link Chrt.UnprocessableEntityError}
214
+ * @throws {@link Chrt.LockedError}
215
+ * @throws {@link Chrt.ServiceUnavailableError}
212
216
  */
213
217
  getV1(taskGroupS3ObjectMetadataId, requestOptions) {
214
218
  return core.HttpResponsePromise.fromPromise(this.__getV1(taskGroupS3ObjectMetadataId, requestOptions));
@@ -232,8 +236,16 @@ export class S3Object {
232
236
  }
233
237
  if (_response.error.reason === "status-code") {
234
238
  switch (_response.error.statusCode) {
239
+ case 403:
240
+ throw new Chrt.ForbiddenError(_response.error.body, _response.rawResponse);
241
+ case 404:
242
+ throw new Chrt.NotFoundError(_response.error.body, _response.rawResponse);
235
243
  case 422:
236
244
  throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
245
+ case 423:
246
+ throw new Chrt.LockedError(_response.error.body, _response.rawResponse);
247
+ case 503:
248
+ throw new Chrt.ServiceUnavailableError(_response.error.body, _response.rawResponse);
237
249
  default:
238
250
  throw new errors.ChrtError({
239
251
  statusCode: _response.error.statusCode,
@@ -0,0 +1,27 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface FileDownloadErrorRes {
5
+ /** Stable code for client behavior; do not parse detail. */
6
+ code: FileDownloadErrorRes.Code;
7
+ /** Factual description of the file or scan condition. */
8
+ detail: string;
9
+ /** Whether another download attempt may help without operator intervention. */
10
+ retryable: boolean;
11
+ }
12
+ export declare namespace FileDownloadErrorRes {
13
+ /**
14
+ * Stable code for client behavior; do not parse detail.
15
+ */
16
+ type Code = "FILE_SCAN_PENDING" | "FILE_MALWARE_DETECTED" | "FILE_SCAN_UNSUPPORTED" | "FILE_SCAN_FAILED" | "FILE_SCAN_ACCESS_DENIED" | "FILE_SCAN_STATUS_UNAVAILABLE" | "FILE_DOWNLOAD_UNAVAILABLE" | "FILE_NOT_FOUND";
17
+ const Code: {
18
+ readonly FileScanPending: "FILE_SCAN_PENDING";
19
+ readonly FileMalwareDetected: "FILE_MALWARE_DETECTED";
20
+ readonly FileScanUnsupported: "FILE_SCAN_UNSUPPORTED";
21
+ readonly FileScanFailed: "FILE_SCAN_FAILED";
22
+ readonly FileScanAccessDenied: "FILE_SCAN_ACCESS_DENIED";
23
+ readonly FileScanStatusUnavailable: "FILE_SCAN_STATUS_UNAVAILABLE";
24
+ readonly FileDownloadUnavailable: "FILE_DOWNLOAD_UNAVAILABLE";
25
+ readonly FileNotFound: "FILE_NOT_FOUND";
26
+ };
27
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export var FileDownloadErrorRes;
5
+ (function (FileDownloadErrorRes) {
6
+ FileDownloadErrorRes.Code = {
7
+ FileScanPending: "FILE_SCAN_PENDING",
8
+ FileMalwareDetected: "FILE_MALWARE_DETECTED",
9
+ FileScanUnsupported: "FILE_SCAN_UNSUPPORTED",
10
+ FileScanFailed: "FILE_SCAN_FAILED",
11
+ FileScanAccessDenied: "FILE_SCAN_ACCESS_DENIED",
12
+ FileScanStatusUnavailable: "FILE_SCAN_STATUS_UNAVAILABLE",
13
+ FileDownloadUnavailable: "FILE_DOWNLOAD_UNAVAILABLE",
14
+ FileNotFound: "FILE_NOT_FOUND",
15
+ };
16
+ })(FileDownloadErrorRes || (FileDownloadErrorRes = {}));
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface FileDownloadRequestErrorRes {
5
+ /** Existing authorization/resource error message or FastAPI request-validation errors. */
6
+ detail: FileDownloadRequestErrorRes.Detail;
7
+ }
8
+ export declare namespace FileDownloadRequestErrorRes {
9
+ /**
10
+ * Existing authorization/resource error message or FastAPI request-validation errors.
11
+ */
12
+ type Detail = string | Record<string, unknown>[];
13
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export type NotFoundErrorBody = Chrt.FileDownloadErrorRes | Chrt.FileDownloadRequestErrorRes;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export type UnprocessableEntityErrorBody = Chrt.FileDownloadErrorRes | Chrt.FileDownloadRequestErrorRes;