@chrt-inc/typescript-sdk 1.1023.0 → 1.1025.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 (68) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/orgs/resources/connections/client/Client.d.ts +18 -1
  3. package/dist/cjs/api/resources/orgs/resources/connections/client/Client.js +75 -6
  4. package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ConnectionsListShippersForCoordinatorV1Request.d.ts +4 -1
  5. package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.d.ts +12 -0
  6. package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.js +5 -0
  7. package/dist/cjs/api/resources/orgs/resources/connections/client/requests/index.d.ts +1 -0
  8. package/dist/cjs/api/resources/orgs/resources/publicData/client/Client.d.ts +3 -0
  9. package/dist/cjs/api/resources/orgs/resources/publicData/client/Client.js +5 -0
  10. package/dist/cjs/api/resources/orgs/resources/publicData/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/orgs/resources/publicData/index.js +1 -0
  12. package/dist/cjs/api/resources/orgs/resources/publicData/resources/index.d.ts +2 -0
  13. package/dist/cjs/api/resources/orgs/resources/publicData/resources/index.js +41 -0
  14. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.d.ts +86 -0
  15. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.js +319 -0
  16. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/index.d.ts +2 -0
  17. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/index.js +17 -0
  18. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.d.ts +13 -0
  19. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.js +5 -0
  20. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.d.ts +1 -0
  21. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.js +2 -0
  22. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/index.js +17 -0
  24. package/dist/cjs/api/types/OrgPublicData1.d.ts +1 -0
  25. package/dist/cjs/api/types/OrgPublicDataS3ObjectMetadata1.d.ts +21 -0
  26. package/dist/cjs/api/types/OrgPublicDataS3ObjectMetadata1.js +5 -0
  27. package/dist/cjs/api/types/ShipperCoordinatorConnection1.d.ts +4 -0
  28. package/dist/cjs/api/types/SpecialHandlingCodeEnum1.d.ts +63 -1
  29. package/dist/cjs/api/types/SpecialHandlingCodeEnum1.js +62 -0
  30. package/dist/cjs/api/types/index.d.ts +1 -0
  31. package/dist/cjs/api/types/index.js +1 -0
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/Client.mjs +2 -2
  35. package/dist/esm/api/resources/orgs/resources/connections/client/Client.d.mts +18 -1
  36. package/dist/esm/api/resources/orgs/resources/connections/client/Client.mjs +75 -6
  37. package/dist/esm/api/resources/orgs/resources/connections/client/requests/ConnectionsListShippersForCoordinatorV1Request.d.mts +4 -1
  38. package/dist/esm/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.d.mts +12 -0
  39. package/dist/esm/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.mjs +4 -0
  40. package/dist/esm/api/resources/orgs/resources/connections/client/requests/index.d.mts +1 -0
  41. package/dist/esm/api/resources/orgs/resources/publicData/client/Client.d.mts +3 -0
  42. package/dist/esm/api/resources/orgs/resources/publicData/client/Client.mjs +5 -0
  43. package/dist/esm/api/resources/orgs/resources/publicData/index.d.mts +1 -0
  44. package/dist/esm/api/resources/orgs/resources/publicData/index.mjs +1 -0
  45. package/dist/esm/api/resources/orgs/resources/publicData/resources/index.d.mts +2 -0
  46. package/dist/esm/api/resources/orgs/resources/publicData/resources/index.mjs +2 -0
  47. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.d.mts +86 -0
  48. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.mjs +282 -0
  49. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/index.d.mts +2 -0
  50. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/index.mjs +1 -0
  51. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.d.mts +13 -0
  52. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.mjs +4 -0
  53. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.d.mts +1 -0
  54. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.mjs +1 -0
  55. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/index.d.mts +1 -0
  56. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/index.mjs +1 -0
  57. package/dist/esm/api/types/OrgPublicData1.d.mts +1 -0
  58. package/dist/esm/api/types/OrgPublicDataS3ObjectMetadata1.d.mts +21 -0
  59. package/dist/esm/api/types/OrgPublicDataS3ObjectMetadata1.mjs +4 -0
  60. package/dist/esm/api/types/ShipperCoordinatorConnection1.d.mts +4 -0
  61. package/dist/esm/api/types/SpecialHandlingCodeEnum1.d.mts +63 -1
  62. package/dist/esm/api/types/SpecialHandlingCodeEnum1.mjs +62 -0
  63. package/dist/esm/api/types/index.d.mts +1 -0
  64. package/dist/esm/api/types/index.mjs +1 -0
  65. package/dist/esm/version.d.mts +1 -1
  66. package/dist/esm/version.mjs +1 -1
  67. package/package.json +1 -1
  68. package/reference.md +330 -0
@@ -0,0 +1,319 @@
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.S3Object = 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 S3Object {
55
+ constructor(_options = {}) {
56
+ this._options = _options;
57
+ }
58
+ /**
59
+ * Uploads a file, such as a logo, to the caller's organization public data. Retains uploaded files; previews require a clean malware scan. | authz: min_org_role=operator | (UploadFile) -> (OrgPublicDataS3ObjectMetadata1)
60
+ *
61
+ * @param {Chrt.orgs.publicData.BodyPostOrgPublicDataS3ObjectAddV1} request
62
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Chrt.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * import { createReadStream } from "fs";
68
+ * await client.orgs.publicData.s3Object.addV1({
69
+ * file: fs.createReadStream("/path/to/your/file")
70
+ * })
71
+ */
72
+ addV1(request, requestOptions) {
73
+ return core.HttpResponsePromise.fromPromise(this.__addV1(request, requestOptions));
74
+ }
75
+ __addV1(request, requestOptions) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ var _a, _b, _c, _d;
78
+ const _request = yield core.newFormData();
79
+ yield _request.appendFile("file", request.file);
80
+ const _maybeEncodedRequest = yield _request.getRequest();
81
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ Authorization: yield this._getAuthorizationHeader() }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
82
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
83
+ 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, "orgs/org_public_data/s3_object/add/v1"),
84
+ method: "POST",
85
+ headers: _headers,
86
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
87
+ requestType: "file",
88
+ duplex: _maybeEncodedRequest.duplex,
89
+ body: _maybeEncodedRequest.body,
90
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
91
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
92
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
93
+ });
94
+ if (_response.ok) {
95
+ return { data: _response.body, rawResponse: _response.rawResponse };
96
+ }
97
+ if (_response.error.reason === "status-code") {
98
+ switch (_response.error.statusCode) {
99
+ case 422:
100
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
101
+ default:
102
+ throw new errors.ChrtError({
103
+ statusCode: _response.error.statusCode,
104
+ body: _response.error.body,
105
+ rawResponse: _response.rawResponse,
106
+ });
107
+ }
108
+ }
109
+ switch (_response.error.reason) {
110
+ case "non-json":
111
+ throw new errors.ChrtError({
112
+ statusCode: _response.error.statusCode,
113
+ body: _response.error.rawBody,
114
+ rawResponse: _response.rawResponse,
115
+ });
116
+ case "timeout":
117
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /orgs/org_public_data/s3_object/add/v1.");
118
+ case "unknown":
119
+ throw new errors.ChrtError({
120
+ message: _response.error.errorMessage,
121
+ rawResponse: _response.rawResponse,
122
+ });
123
+ }
124
+ });
125
+ }
126
+ /**
127
+ * Deletes an S3 object and its metadata from the caller's organization public data. | authz: min_org_role=operator | () -> (bool)
128
+ *
129
+ * @param {string} orgPublicDataS3ObjectMetadataId
130
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
131
+ *
132
+ * @throws {@link Chrt.UnprocessableEntityError}
133
+ *
134
+ * @example
135
+ * await client.orgs.publicData.s3Object.deleteV1("org_public_data_s3_object_metadata_id")
136
+ */
137
+ deleteV1(orgPublicDataS3ObjectMetadataId, requestOptions) {
138
+ return core.HttpResponsePromise.fromPromise(this.__deleteV1(orgPublicDataS3ObjectMetadataId, requestOptions));
139
+ }
140
+ __deleteV1(orgPublicDataS3ObjectMetadataId, requestOptions) {
141
+ return __awaiter(this, void 0, void 0, function* () {
142
+ var _a, _b, _c, _d;
143
+ 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);
144
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
145
+ 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, `orgs/org_public_data/s3_object/delete/v1/${encodeURIComponent(orgPublicDataS3ObjectMetadataId)}`),
146
+ method: "DELETE",
147
+ headers: _headers,
148
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
149
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
150
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
151
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
152
+ });
153
+ if (_response.ok) {
154
+ return { data: _response.body, rawResponse: _response.rawResponse };
155
+ }
156
+ if (_response.error.reason === "status-code") {
157
+ switch (_response.error.statusCode) {
158
+ case 422:
159
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
160
+ default:
161
+ throw new errors.ChrtError({
162
+ statusCode: _response.error.statusCode,
163
+ body: _response.error.body,
164
+ rawResponse: _response.rawResponse,
165
+ });
166
+ }
167
+ }
168
+ switch (_response.error.reason) {
169
+ case "non-json":
170
+ throw new errors.ChrtError({
171
+ statusCode: _response.error.statusCode,
172
+ body: _response.error.rawBody,
173
+ rawResponse: _response.rawResponse,
174
+ });
175
+ case "timeout":
176
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /orgs/org_public_data/s3_object/delete/v1/{org_public_data_s3_object_metadata_id}.");
177
+ case "unknown":
178
+ throw new errors.ChrtError({
179
+ message: _response.error.errorMessage,
180
+ rawResponse: _response.rawResponse,
181
+ });
182
+ }
183
+ });
184
+ }
185
+ /**
186
+ * Retrieves metadata for an organization public data S3 object. | () -> (OrgPublicDataS3ObjectMetadata1)
187
+ *
188
+ * @param {string} orgPublicDataS3ObjectMetadataId
189
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
190
+ *
191
+ * @throws {@link Chrt.UnprocessableEntityError}
192
+ *
193
+ * @example
194
+ * await client.orgs.publicData.s3Object.getS3ObjectMetadataV1("org_public_data_s3_object_metadata_id")
195
+ */
196
+ getS3ObjectMetadataV1(orgPublicDataS3ObjectMetadataId, requestOptions) {
197
+ return core.HttpResponsePromise.fromPromise(this.__getS3ObjectMetadataV1(orgPublicDataS3ObjectMetadataId, requestOptions));
198
+ }
199
+ __getS3ObjectMetadataV1(orgPublicDataS3ObjectMetadataId, requestOptions) {
200
+ return __awaiter(this, void 0, void 0, function* () {
201
+ var _a, _b, _c, _d;
202
+ 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);
203
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
204
+ 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, `orgs/org_public_data/s3_object/s3_object_metadata/v1/${encodeURIComponent(orgPublicDataS3ObjectMetadataId)}`),
205
+ method: "GET",
206
+ headers: _headers,
207
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
208
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
209
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
210
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
211
+ });
212
+ if (_response.ok) {
213
+ return { data: _response.body, rawResponse: _response.rawResponse };
214
+ }
215
+ if (_response.error.reason === "status-code") {
216
+ switch (_response.error.statusCode) {
217
+ case 422:
218
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
219
+ default:
220
+ throw new errors.ChrtError({
221
+ statusCode: _response.error.statusCode,
222
+ body: _response.error.body,
223
+ rawResponse: _response.rawResponse,
224
+ });
225
+ }
226
+ }
227
+ switch (_response.error.reason) {
228
+ case "non-json":
229
+ throw new errors.ChrtError({
230
+ statusCode: _response.error.statusCode,
231
+ body: _response.error.rawBody,
232
+ rawResponse: _response.rawResponse,
233
+ });
234
+ case "timeout":
235
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /orgs/org_public_data/s3_object/s3_object_metadata/v1/{org_public_data_s3_object_metadata_id}.");
236
+ case "unknown":
237
+ throw new errors.ChrtError({
238
+ message: _response.error.errorMessage,
239
+ rawResponse: _response.rawResponse,
240
+ });
241
+ }
242
+ });
243
+ }
244
+ /**
245
+ * Streams an organization public data S3 object file from storage. | () -> (binary)
246
+ * @throws {@link Chrt.ForbiddenError}
247
+ * @throws {@link Chrt.NotFoundError}
248
+ * @throws {@link Chrt.UnprocessableEntityError}
249
+ * @throws {@link Chrt.LockedError}
250
+ * @throws {@link Chrt.ServiceUnavailableError}
251
+ */
252
+ getV1(orgPublicDataS3ObjectMetadataId, requestOptions) {
253
+ return core.HttpResponsePromise.fromPromise(this.__getV1(orgPublicDataS3ObjectMetadataId, requestOptions));
254
+ }
255
+ __getV1(orgPublicDataS3ObjectMetadataId, requestOptions) {
256
+ return __awaiter(this, void 0, void 0, function* () {
257
+ var _a, _b, _c, _d;
258
+ 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);
259
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
260
+ 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, `orgs/org_public_data/s3_object/v1/${encodeURIComponent(orgPublicDataS3ObjectMetadataId)}`),
261
+ method: "GET",
262
+ headers: _headers,
263
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
264
+ responseType: "binary-response",
265
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
266
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
267
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
268
+ });
269
+ if (_response.ok) {
270
+ return { data: _response.body, rawResponse: _response.rawResponse };
271
+ }
272
+ if (_response.error.reason === "status-code") {
273
+ switch (_response.error.statusCode) {
274
+ case 403:
275
+ throw new Chrt.ForbiddenError(_response.error.body, _response.rawResponse);
276
+ case 404:
277
+ throw new Chrt.NotFoundError(_response.error.body, _response.rawResponse);
278
+ case 422:
279
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
280
+ case 423:
281
+ throw new Chrt.LockedError(_response.error.body, _response.rawResponse);
282
+ case 503:
283
+ throw new Chrt.ServiceUnavailableError(_response.error.body, _response.rawResponse);
284
+ default:
285
+ throw new errors.ChrtError({
286
+ statusCode: _response.error.statusCode,
287
+ body: _response.error.body,
288
+ rawResponse: _response.rawResponse,
289
+ });
290
+ }
291
+ }
292
+ switch (_response.error.reason) {
293
+ case "non-json":
294
+ throw new errors.ChrtError({
295
+ statusCode: _response.error.statusCode,
296
+ body: _response.error.rawBody,
297
+ rawResponse: _response.rawResponse,
298
+ });
299
+ case "timeout":
300
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /orgs/org_public_data/s3_object/v1/{org_public_data_s3_object_metadata_id}.");
301
+ case "unknown":
302
+ throw new errors.ChrtError({
303
+ message: _response.error.errorMessage,
304
+ rawResponse: _response.rawResponse,
305
+ });
306
+ }
307
+ });
308
+ }
309
+ _getAuthorizationHeader() {
310
+ return __awaiter(this, void 0, void 0, function* () {
311
+ const bearer = yield core.Supplier.get(this._options.token);
312
+ if (bearer != null) {
313
+ return `Bearer ${bearer}`;
314
+ }
315
+ return undefined;
316
+ });
317
+ }
318
+ }
319
+ exports.S3Object = S3Object;
@@ -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,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../../../../../../../../core/index.js";
5
+ /**
6
+ * @example
7
+ * {
8
+ * file: fs.createReadStream("/path/to/your/file")
9
+ * }
10
+ */
11
+ export interface BodyPostOrgPublicDataS3ObjectAddV1 {
12
+ file: core.file.Uploadable.FileLike;
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 @@
1
+ export { type BodyPostOrgPublicDataS3ObjectAddV1 } from "./BodyPostOrgPublicDataS3ObjectAddV1.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);
@@ -12,6 +12,7 @@ export interface OrgPublicData1 {
12
12
  name: string;
13
13
  /** Must be a string starting with `org_` */
14
14
  org_id: string;
15
+ org_public_data_s3_object_metadata_ids?: string[];
15
16
  org_type: Chrt.OrgTypeEnum;
16
17
  phone_number?: string | null;
17
18
  schema_version: number;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface OrgPublicDataS3ObjectMetadata1 {
5
+ _id: string;
6
+ ai_generated_description?: string | null;
7
+ blurhash?: string | null;
8
+ /** MIME type of the uploaded file (e.g., 'image/jpeg', 'application/pdf') */
9
+ content_type?: string | null;
10
+ /** Original filename of the uploaded file */
11
+ filename?: string | null;
12
+ org_public_data_id: string;
13
+ s3_key_prefix?: "orgs/org_public_data_s3_object_metadata";
14
+ schema_version: number;
15
+ uploaded_at_timestamp: string;
16
+ /** Must be a string starting with `org_` */
17
+ uploaded_by_org_id: string;
18
+ /** Must be a string starting with `user_` */
19
+ uploaded_by_user_id: string;
20
+ user_generated_description?: string | null;
21
+ }
@@ -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 });
@@ -7,6 +7,10 @@ export interface ShipperCoordinatorConnection1 {
7
7
  coordinator_default_department_id?: string | null;
8
8
  /** Must be a string starting with `org_` */
9
9
  coordinator_org_id: string;
10
+ known_shipper?: boolean | null;
11
+ known_shipper_last_edited_at_timestamp?: string | null;
12
+ /** Must be a string starting with `user_` */
13
+ known_shipper_last_edited_by_user_id?: string | null;
10
14
  off_chrt_shipper_org_data_id?: string | null;
11
15
  schema_version: number;
12
16
  shipper_customer_id_for_coordinator_stripe_connect_account?: string | null;
@@ -1,61 +1,105 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type SpecialHandlingCodeEnum1 = "ACT" | "AOG" | "ATT" | "AVI" | "BIG" | "BUP" | "CAO" | "CAT" | "COL" | "COM" | "CRT" | "DIP" | "EAP" | "EAT" | "EAW" | "ECC" | "ECP" | "ELI" | "ELM" | "EMD" | "ERT" | "FIL" | "FRI" | "FRO" | "GOH" | "HEA" | "HEG" | "HUM" | "ICE" | "LHO" | "LIC" | "MAG" | "MAL" | "MUW" | "NSC" | "NWP" | "OBX" | "OHG" | "PAC" | "PEA" | "PEF" | "PEM" | "PEP" | "PER" | "PES" | "PIL" | "PIP" | "QRT" | "RAC" | "RBI" | "RBM" | "RCL" | "RCM" | "RCX" | "RDS" | "REQ" | "REX" | "RFG" | "RFL" | "RFS" | "RFW" | "RGX" | "RIS" | "RLI" | "RLM" | "RMD" | "RNG" | "ROP" | "ROX" | "RPB" | "RPG" | "RRE" | "RRW" | "RRY" | "RSB" | "RSC" | "RXB" | "RXC" | "RXD" | "RXE" | "RXG" | "RXS" | "SCO" | "SHL" | "SHR" | "SPF" | "SPX" | "SUR" | "SWP" | "VAL" | "VOL" | "VUN" | "WET" | "XPS";
4
+ export type SpecialHandlingCodeEnum1 = "ACT" | "AGC" | "ALO" | "AOG" | "ATT" | "AVI" | "AXA" | "BIG" | "BSA" | "BUP" | "CAO" | "CAT" | "CC" | "COF" | "COL" | "COM" | "COU" | "CRT" | "CSL" | "CUR" | "DDX" | "DGD" | "DGR" | "DIC" | "DIP" | "DIR" | "DNS" | "EAP" | "EAT" | "EAW" | "EBI" | "EBM" | "ECC" | "ECP" | "ELI" | "ELM" | "EMD" | "ERT" | "EXC" | "FIL" | "FRA" | "FRC" | "FRI" | "FRO" | "FTR" | "GCR" | "GLD" | "GOB" | "GOH" | "HEA" | "HEG" | "HNT" | "HST" | "HUM" | "IAT" | "IBS" | "ICE" | "IMP" | "LHO" | "LIC" | "MAG" | "MAL" | "MDC" | "MEX" | "MUW" | "NSC" | "NST" | "NWP" | "OBX" | "OHG" | "PAC" | "PAX" | "PEA" | "PEB" | "PED" | "PEF" | "PEL" | "PEM" | "PEP" | "PER" | "PES" | "PHY" | "PIL" | "PIP" | "PPR" | "PRI" | "PRO" | "PXD" | "PXS" | "QRT" | "QWT" | "RAC" | "RBI" | "RBM" | "RCL" | "RCM" | "RCS" | "RCX" | "RDS" | "REQ" | "REX" | "RFG" | "RFL" | "RFS" | "RFW" | "RGX" | "RIS" | "RLI" | "RLM" | "RMD" | "RNG" | "ROP" | "ROX" | "RPB" | "RPG" | "RRE" | "RRW" | "RRY" | "RSB" | "RSC" | "RXB" | "RXC" | "RXD" | "RXE" | "RXG" | "RXS" | "SBU" | "SCO" | "SEC" | "SEN" | "SHL" | "SHR" | "SMC" | "SML" | "SMU" | "SPF" | "SPX" | "SSS" | "SUR" | "SVC" | "SWP" | "TRC" | "TRU" | "TTS" | "TTT" | "UCB" | "UKS" | "ULD" | "UNKN" | "VAL" | "VEH" | "VIC" | "VOL" | "VUN" | "WET" | "XPS";
5
5
  export declare const SpecialHandlingCodeEnum1: {
6
6
  readonly Act: "ACT";
7
+ readonly Agc: "AGC";
8
+ readonly Alo: "ALO";
7
9
  readonly Aog: "AOG";
8
10
  readonly Att: "ATT";
9
11
  readonly Avi: "AVI";
12
+ readonly Axa: "AXA";
10
13
  readonly Big: "BIG";
14
+ readonly Bsa: "BSA";
11
15
  readonly Bup: "BUP";
12
16
  readonly Cao: "CAO";
13
17
  readonly Cat: "CAT";
18
+ readonly Cc: "CC";
19
+ readonly Cof: "COF";
14
20
  readonly Col: "COL";
15
21
  readonly Com: "COM";
22
+ readonly Cou: "COU";
16
23
  readonly Crt: "CRT";
24
+ readonly Csl: "CSL";
25
+ readonly Cur: "CUR";
26
+ readonly Ddx: "DDX";
27
+ readonly Dgd: "DGD";
28
+ readonly Dgr: "DGR";
29
+ readonly Dic: "DIC";
17
30
  readonly Dip: "DIP";
31
+ readonly Dir: "DIR";
32
+ readonly Dns: "DNS";
18
33
  readonly Eap: "EAP";
19
34
  readonly Eat: "EAT";
20
35
  readonly Eaw: "EAW";
36
+ readonly Ebi: "EBI";
37
+ readonly Ebm: "EBM";
21
38
  readonly Ecc: "ECC";
22
39
  readonly Ecp: "ECP";
23
40
  readonly Eli: "ELI";
24
41
  readonly Elm: "ELM";
25
42
  readonly Emd: "EMD";
26
43
  readonly Ert: "ERT";
44
+ readonly Exc: "EXC";
27
45
  readonly Fil: "FIL";
46
+ readonly Fra: "FRA";
47
+ readonly Frc: "FRC";
28
48
  readonly Fri: "FRI";
29
49
  readonly Fro: "FRO";
50
+ readonly Ftr: "FTR";
51
+ readonly Gcr: "GCR";
52
+ readonly Gld: "GLD";
53
+ readonly Gob: "GOB";
30
54
  readonly Goh: "GOH";
31
55
  readonly Hea: "HEA";
32
56
  readonly Heg: "HEG";
57
+ readonly Hnt: "HNT";
58
+ readonly Hst: "HST";
33
59
  readonly Hum: "HUM";
60
+ readonly Iat: "IAT";
61
+ readonly Ibs: "IBS";
34
62
  readonly Ice: "ICE";
63
+ readonly Imp: "IMP";
35
64
  readonly Lho: "LHO";
36
65
  readonly Lic: "LIC";
37
66
  readonly Mag: "MAG";
38
67
  readonly Mal: "MAL";
68
+ readonly Mdc: "MDC";
69
+ readonly Mex: "MEX";
39
70
  readonly Muw: "MUW";
40
71
  readonly Nsc: "NSC";
72
+ readonly Nst: "NST";
41
73
  readonly Nwp: "NWP";
42
74
  readonly Obx: "OBX";
43
75
  readonly Ohg: "OHG";
44
76
  readonly Pac: "PAC";
77
+ readonly Pax: "PAX";
45
78
  readonly Pea: "PEA";
79
+ readonly Peb: "PEB";
80
+ readonly Ped: "PED";
46
81
  readonly Pef: "PEF";
82
+ readonly Pel: "PEL";
47
83
  readonly Pem: "PEM";
48
84
  readonly Pep: "PEP";
49
85
  readonly Per: "PER";
50
86
  readonly Pes: "PES";
87
+ readonly Phy: "PHY";
51
88
  readonly Pil: "PIL";
52
89
  readonly Pip: "PIP";
90
+ readonly Ppr: "PPR";
91
+ readonly Pri: "PRI";
92
+ readonly Pro: "PRO";
93
+ readonly Pxd: "PXD";
94
+ readonly Pxs: "PXS";
53
95
  readonly Qrt: "QRT";
96
+ readonly Qwt: "QWT";
54
97
  readonly Rac: "RAC";
55
98
  readonly Rbi: "RBI";
56
99
  readonly Rbm: "RBM";
57
100
  readonly Rcl: "RCL";
58
101
  readonly Rcm: "RCM";
102
+ readonly Rcs: "RCS";
59
103
  readonly Rcx: "RCX";
60
104
  readonly Rds: "RDS";
61
105
  readonly Req: "REQ";
@@ -85,14 +129,32 @@ export declare const SpecialHandlingCodeEnum1: {
85
129
  readonly Rxe: "RXE";
86
130
  readonly Rxg: "RXG";
87
131
  readonly Rxs: "RXS";
132
+ readonly Sbu: "SBU";
88
133
  readonly Sco: "SCO";
134
+ readonly Sec: "SEC";
135
+ readonly Sen: "SEN";
89
136
  readonly Shl: "SHL";
90
137
  readonly Shr: "SHR";
138
+ readonly Smc: "SMC";
139
+ readonly Sml: "SML";
140
+ readonly Smu: "SMU";
91
141
  readonly Spf: "SPF";
92
142
  readonly Spx: "SPX";
143
+ readonly Sss: "SSS";
93
144
  readonly Sur: "SUR";
145
+ readonly Svc: "SVC";
94
146
  readonly Swp: "SWP";
147
+ readonly Trc: "TRC";
148
+ readonly Tru: "TRU";
149
+ readonly Tts: "TTS";
150
+ readonly Ttt: "TTT";
151
+ readonly Ucb: "UCB";
152
+ readonly Uks: "UKS";
153
+ readonly Uld: "ULD";
154
+ readonly Unkn: "UNKN";
95
155
  readonly Val: "VAL";
156
+ readonly Veh: "VEH";
157
+ readonly Vic: "VIC";
96
158
  readonly Vol: "VOL";
97
159
  readonly Vun: "VUN";
98
160
  readonly Wet: "WET";