@chrt-inc/typescript-sdk 1.662.0 → 1.675.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 (82) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/billing/resources/billingLedgers/client/Client.d.ts +1 -1
  3. package/dist/cjs/api/resources/billing/resources/billingLedgers/client/Client.js +1 -1
  4. package/dist/cjs/api/resources/billing/resources/billingLedgers/client/requests/BillingLedgerClientCreate1.d.ts +1 -0
  5. package/dist/cjs/api/resources/billing/resources/billingLedgers/client/requests/BillingLedgerClientUpdate1.d.ts +2 -0
  6. package/dist/cjs/api/resources/operations/resources/cases/client/Client.d.ts +75 -0
  7. package/dist/cjs/api/resources/operations/resources/cases/client/Client.js +313 -0
  8. package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseNeedsActionReq.d.ts +12 -0
  9. package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseNeedsActionReq.js +5 -0
  10. package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseStatusReq.d.ts +13 -0
  11. package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseStatusReq.js +5 -0
  12. package/dist/cjs/api/resources/operations/resources/cases/client/requests/index.d.ts +2 -0
  13. package/dist/cjs/api/resources/operations/resources/cases/index.d.ts +1 -0
  14. package/dist/cjs/api/resources/operations/resources/cases/index.js +1 -0
  15. package/dist/cjs/api/resources/operations/resources/cases/resources/index.d.ts +2 -0
  16. package/dist/cjs/api/resources/operations/resources/cases/resources/index.js +41 -0
  17. package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/Client.d.ts +83 -0
  18. package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/Client.js +308 -0
  19. package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/index.d.ts +2 -0
  20. package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/index.js +17 -0
  21. package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/requests/BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost.d.ts +13 -0
  22. package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/requests/BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost.js +5 -0
  23. package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/requests/index.d.ts +1 -0
  24. package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/requests/index.js +2 -0
  25. package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/index.d.ts +1 -0
  26. package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/index.js +17 -0
  27. package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.d.ts +1 -1
  28. package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.js +1 -1
  29. package/dist/cjs/api/types/BillingLedger1.d.ts +1 -0
  30. package/dist/cjs/api/types/CallerCredentialTypeEnum.d.ts +1 -2
  31. package/dist/cjs/api/types/CallerCredentialTypeEnum.js +0 -1
  32. package/dist/cjs/api/types/Case1.d.ts +4 -0
  33. package/dist/cjs/api/types/CaseMessage1.d.ts +1 -0
  34. package/dist/cjs/api/types/CaseS3ObjectMetadata1.d.ts +19 -0
  35. package/dist/cjs/api/types/CaseS3ObjectMetadata1.js +5 -0
  36. package/dist/cjs/api/types/OrgPrivateData1.d.ts +1 -0
  37. package/dist/cjs/api/types/index.d.ts +1 -0
  38. package/dist/cjs/api/types/index.js +1 -0
  39. package/dist/cjs/version.d.ts +1 -1
  40. package/dist/cjs/version.js +1 -1
  41. package/dist/esm/Client.mjs +2 -2
  42. package/dist/esm/api/resources/billing/resources/billingLedgers/client/Client.d.mts +1 -1
  43. package/dist/esm/api/resources/billing/resources/billingLedgers/client/Client.mjs +1 -1
  44. package/dist/esm/api/resources/billing/resources/billingLedgers/client/requests/BillingLedgerClientCreate1.d.mts +1 -0
  45. package/dist/esm/api/resources/billing/resources/billingLedgers/client/requests/BillingLedgerClientUpdate1.d.mts +2 -0
  46. package/dist/esm/api/resources/operations/resources/cases/client/Client.d.mts +75 -0
  47. package/dist/esm/api/resources/operations/resources/cases/client/Client.mjs +313 -0
  48. package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseNeedsActionReq.d.mts +12 -0
  49. package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseNeedsActionReq.mjs +4 -0
  50. package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseStatusReq.d.mts +13 -0
  51. package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseStatusReq.mjs +4 -0
  52. package/dist/esm/api/resources/operations/resources/cases/client/requests/index.d.mts +2 -0
  53. package/dist/esm/api/resources/operations/resources/cases/index.d.mts +1 -0
  54. package/dist/esm/api/resources/operations/resources/cases/index.mjs +1 -0
  55. package/dist/esm/api/resources/operations/resources/cases/resources/index.d.mts +2 -0
  56. package/dist/esm/api/resources/operations/resources/cases/resources/index.mjs +2 -0
  57. package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/Client.d.mts +83 -0
  58. package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/Client.mjs +271 -0
  59. package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/index.d.mts +2 -0
  60. package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/index.mjs +1 -0
  61. package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/requests/BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost.d.mts +13 -0
  62. package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/requests/BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost.mjs +4 -0
  63. package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/requests/index.d.mts +1 -0
  64. package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/requests/index.mjs +1 -0
  65. package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/index.d.mts +1 -0
  66. package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/index.mjs +1 -0
  67. package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.d.mts +1 -1
  68. package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.mjs +1 -1
  69. package/dist/esm/api/types/BillingLedger1.d.mts +1 -0
  70. package/dist/esm/api/types/CallerCredentialTypeEnum.d.mts +1 -2
  71. package/dist/esm/api/types/CallerCredentialTypeEnum.mjs +0 -1
  72. package/dist/esm/api/types/Case1.d.mts +4 -0
  73. package/dist/esm/api/types/CaseMessage1.d.mts +1 -0
  74. package/dist/esm/api/types/CaseS3ObjectMetadata1.d.mts +19 -0
  75. package/dist/esm/api/types/CaseS3ObjectMetadata1.mjs +4 -0
  76. package/dist/esm/api/types/OrgPrivateData1.d.mts +1 -0
  77. package/dist/esm/api/types/index.d.mts +1 -0
  78. package/dist/esm/api/types/index.mjs +1 -0
  79. package/dist/esm/version.d.mts +1 -1
  80. package/dist/esm/version.mjs +1 -1
  81. package/package.json +1 -1
  82. package/reference.md +668 -61
@@ -0,0 +1,271 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
13
+ import * as environments from "../../../../../../../../environments.mjs";
14
+ import * as core from "../../../../../../../../core/index.mjs";
15
+ import * as Chrt from "../../../../../../../index.mjs";
16
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../core/headers.mjs";
17
+ import * as errors from "../../../../../../../../errors/index.mjs";
18
+ export class S3Objects {
19
+ constructor(_options = {}) {
20
+ this._options = _options;
21
+ }
22
+ /**
23
+ * Retrieves metadata for a case S3 object. | authz: min_org_role=operator | () -> (CaseS3ObjectMetadata1)
24
+ *
25
+ * @param {string} caseS3ObjectMetadataId
26
+ * @param {S3Objects.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link Chrt.UnprocessableEntityError}
29
+ *
30
+ * @example
31
+ * await client.operations.cases.s3Objects.getS3ObjectMetadataV1("case_s3_object_metadata_id")
32
+ */
33
+ getS3ObjectMetadataV1(caseS3ObjectMetadataId, requestOptions) {
34
+ return core.HttpResponsePromise.fromPromise(this.__getS3ObjectMetadataV1(caseS3ObjectMetadataId, requestOptions));
35
+ }
36
+ __getS3ObjectMetadataV1(caseS3ObjectMetadataId, requestOptions) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ var _a, _b, _c, _d;
39
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
40
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
41
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/cases/s3_objects/s3_object_metadata/v1/${encodeURIComponent(caseS3ObjectMetadataId)}`),
42
+ method: "GET",
43
+ headers: _headers,
44
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
45
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
46
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
47
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
48
+ });
49
+ if (_response.ok) {
50
+ return { data: _response.body, rawResponse: _response.rawResponse };
51
+ }
52
+ if (_response.error.reason === "status-code") {
53
+ switch (_response.error.statusCode) {
54
+ case 422:
55
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
56
+ default:
57
+ throw new errors.ChrtError({
58
+ statusCode: _response.error.statusCode,
59
+ body: _response.error.body,
60
+ rawResponse: _response.rawResponse,
61
+ });
62
+ }
63
+ }
64
+ switch (_response.error.reason) {
65
+ case "non-json":
66
+ throw new errors.ChrtError({
67
+ statusCode: _response.error.statusCode,
68
+ body: _response.error.rawBody,
69
+ rawResponse: _response.rawResponse,
70
+ });
71
+ case "timeout":
72
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /operations/cases/s3_objects/s3_object_metadata/v1/{case_s3_object_metadata_id}.");
73
+ case "unknown":
74
+ throw new errors.ChrtError({
75
+ message: _response.error.errorMessage,
76
+ rawResponse: _response.rawResponse,
77
+ });
78
+ }
79
+ });
80
+ }
81
+ /**
82
+ * Streams a case S3 object file from storage. | authz: min_org_role=operator | () -> (binary)
83
+ * @throws {@link Chrt.UnprocessableEntityError}
84
+ */
85
+ getV1(caseS3ObjectMetadataId, requestOptions) {
86
+ return core.HttpResponsePromise.fromPromise(this.__getV1(caseS3ObjectMetadataId, requestOptions));
87
+ }
88
+ __getV1(caseS3ObjectMetadataId, requestOptions) {
89
+ return __awaiter(this, void 0, void 0, function* () {
90
+ var _a, _b, _c, _d;
91
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
92
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
93
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/cases/s3_objects/v1/${encodeURIComponent(caseS3ObjectMetadataId)}`),
94
+ method: "GET",
95
+ headers: _headers,
96
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
97
+ responseType: "binary-response",
98
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
99
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
100
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
101
+ });
102
+ if (_response.ok) {
103
+ return { data: _response.body, rawResponse: _response.rawResponse };
104
+ }
105
+ if (_response.error.reason === "status-code") {
106
+ switch (_response.error.statusCode) {
107
+ case 422:
108
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
109
+ default:
110
+ throw new errors.ChrtError({
111
+ statusCode: _response.error.statusCode,
112
+ body: _response.error.body,
113
+ rawResponse: _response.rawResponse,
114
+ });
115
+ }
116
+ }
117
+ switch (_response.error.reason) {
118
+ case "non-json":
119
+ throw new errors.ChrtError({
120
+ statusCode: _response.error.statusCode,
121
+ body: _response.error.rawBody,
122
+ rawResponse: _response.rawResponse,
123
+ });
124
+ case "timeout":
125
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /operations/cases/s3_objects/v1/{case_s3_object_metadata_id}.");
126
+ case "unknown":
127
+ throw new errors.ChrtError({
128
+ message: _response.error.errorMessage,
129
+ rawResponse: _response.rawResponse,
130
+ });
131
+ }
132
+ });
133
+ }
134
+ /**
135
+ * Uploads a file to a case. Automatic blurhash generation for images. | authz: min_org_role=operator | (UploadFile) -> (bool)
136
+ *
137
+ * @param {string} caseId
138
+ * @param {Chrt.operations.cases.BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost} request
139
+ * @param {S3Objects.RequestOptions} requestOptions - Request-specific configuration.
140
+ *
141
+ * @throws {@link Chrt.UnprocessableEntityError}
142
+ *
143
+ * @example
144
+ * import { createReadStream } from "fs";
145
+ * await client.operations.cases.s3Objects.addV1("case_id", {
146
+ * file: fs.createReadStream("/path/to/your/file")
147
+ * })
148
+ */
149
+ addV1(caseId, request, requestOptions) {
150
+ return core.HttpResponsePromise.fromPromise(this.__addV1(caseId, request, requestOptions));
151
+ }
152
+ __addV1(caseId, request, requestOptions) {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ var _a, _b, _c, _d;
155
+ const _request = yield core.newFormData();
156
+ yield _request.appendFile("file", request.file);
157
+ const _maybeEncodedRequest = yield _request.getRequest();
158
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ Authorization: yield this._getAuthorizationHeader() }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
159
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
160
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/cases/s3_objects/add/v1/${encodeURIComponent(caseId)}`),
161
+ method: "POST",
162
+ headers: _headers,
163
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
164
+ requestType: "file",
165
+ duplex: _maybeEncodedRequest.duplex,
166
+ body: _maybeEncodedRequest.body,
167
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
168
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
169
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
170
+ });
171
+ if (_response.ok) {
172
+ return { data: _response.body, rawResponse: _response.rawResponse };
173
+ }
174
+ if (_response.error.reason === "status-code") {
175
+ switch (_response.error.statusCode) {
176
+ case 422:
177
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
178
+ default:
179
+ throw new errors.ChrtError({
180
+ statusCode: _response.error.statusCode,
181
+ body: _response.error.body,
182
+ rawResponse: _response.rawResponse,
183
+ });
184
+ }
185
+ }
186
+ switch (_response.error.reason) {
187
+ case "non-json":
188
+ throw new errors.ChrtError({
189
+ statusCode: _response.error.statusCode,
190
+ body: _response.error.rawBody,
191
+ rawResponse: _response.rawResponse,
192
+ });
193
+ case "timeout":
194
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/s3_objects/add/v1/{case_id}.");
195
+ case "unknown":
196
+ throw new errors.ChrtError({
197
+ message: _response.error.errorMessage,
198
+ rawResponse: _response.rawResponse,
199
+ });
200
+ }
201
+ });
202
+ }
203
+ /**
204
+ * Deletes an S3 object metadata and the associated S3 object from a case. Only the uploader or an operator from the uploading org can delete. | () -> (bool)
205
+ *
206
+ * @param {string} caseS3ObjectMetadataId
207
+ * @param {S3Objects.RequestOptions} requestOptions - Request-specific configuration.
208
+ *
209
+ * @throws {@link Chrt.UnprocessableEntityError}
210
+ *
211
+ * @example
212
+ * await client.operations.cases.s3Objects.deleteV1("case_s3_object_metadata_id")
213
+ */
214
+ deleteV1(caseS3ObjectMetadataId, requestOptions) {
215
+ return core.HttpResponsePromise.fromPromise(this.__deleteV1(caseS3ObjectMetadataId, requestOptions));
216
+ }
217
+ __deleteV1(caseS3ObjectMetadataId, requestOptions) {
218
+ return __awaiter(this, void 0, void 0, function* () {
219
+ var _a, _b, _c, _d;
220
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
221
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
222
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `operations/cases/s3_objects/delete/v1/${encodeURIComponent(caseS3ObjectMetadataId)}`),
223
+ method: "DELETE",
224
+ headers: _headers,
225
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
226
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
227
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
228
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
229
+ });
230
+ if (_response.ok) {
231
+ return { data: _response.body, rawResponse: _response.rawResponse };
232
+ }
233
+ if (_response.error.reason === "status-code") {
234
+ switch (_response.error.statusCode) {
235
+ case 422:
236
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
237
+ default:
238
+ throw new errors.ChrtError({
239
+ statusCode: _response.error.statusCode,
240
+ body: _response.error.body,
241
+ rawResponse: _response.rawResponse,
242
+ });
243
+ }
244
+ }
245
+ switch (_response.error.reason) {
246
+ case "non-json":
247
+ throw new errors.ChrtError({
248
+ statusCode: _response.error.statusCode,
249
+ body: _response.error.rawBody,
250
+ rawResponse: _response.rawResponse,
251
+ });
252
+ case "timeout":
253
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /operations/cases/s3_objects/delete/v1/{case_s3_object_metadata_id}.");
254
+ case "unknown":
255
+ throw new errors.ChrtError({
256
+ message: _response.error.errorMessage,
257
+ rawResponse: _response.rawResponse,
258
+ });
259
+ }
260
+ });
261
+ }
262
+ _getAuthorizationHeader() {
263
+ return __awaiter(this, void 0, void 0, function* () {
264
+ const bearer = yield core.Supplier.get(this._options.token);
265
+ if (bearer != null) {
266
+ return `Bearer ${bearer}`;
267
+ }
268
+ return undefined;
269
+ });
270
+ }
271
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -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.mjs";
5
+ /**
6
+ * @example
7
+ * {
8
+ * file: fs.createReadStream("/path/to/your/file")
9
+ * }
10
+ */
11
+ export interface BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost {
12
+ file: core.file.Uploadable.FileLike;
13
+ }
@@ -0,0 +1 @@
1
+ export { type BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost } from "./BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -329,7 +329,7 @@ export declare class TaskGroups {
329
329
  detachLigFromProviderPayDriverV1(taskGroupId: string, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
330
330
  private __detachLigFromProviderPayDriverV1;
331
331
  /**
332
- * Preview the LineItem materialization that would result from applying a rate sheet to the SPP vector of the named TaskGroup. Returns the resolved rate sheet, materialized LineItems (NOT inserted), the pre-adjustment total, and the requested parties (shipper -> coordinator). Auto-resolves the rate sheet via RateSheetMapping1 for the requested shipper unless body.rate_sheet_id is provided. No DB writes — operator can iterate freely. To commit, call from_rate_sheet/create_for_shipper_pay_provider/v1 then attach_lig_to_shipper_pay_provider/v1. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[task_group_coordinator_operators] | (TaskGroupQuoteForShipperPayProviderClientReq) -> (TaskGroupQuoteResp)
332
+ * Preview the LineItem materialization that would result from applying a rate sheet to the SPP vector of the named TaskGroup. Returns the resolved rate sheet, materialized LineItems (NOT inserted), the pre-adjustment total, and the requested parties (shipper -> coordinator). Auto-resolves the rate sheet via RateSheetMapping1 for the requested shipper unless body.rate_sheet_id is provided. No DB writes — operator can iterate freely. To commit, call from_rate_sheet/create_for_shipper_pay_provider/v1 then attach_lig_to_shipper_pay_provider/v1. | authz: allowed_org_types=[provider, shipper], min_org_role=operator, authz_personas=[task_group_coordinator_operators, shipper_org_operators] | (TaskGroupQuoteForShipperPayProviderClientReq) -> (TaskGroupQuoteResp)
333
333
  *
334
334
  * @param {string} taskGroupId
335
335
  * @param {Chrt.shipping.TaskGroupQuoteForShipperPayProviderClientReq} request
@@ -1277,7 +1277,7 @@ export class TaskGroups {
1277
1277
  });
1278
1278
  }
1279
1279
  /**
1280
- * Preview the LineItem materialization that would result from applying a rate sheet to the SPP vector of the named TaskGroup. Returns the resolved rate sheet, materialized LineItems (NOT inserted), the pre-adjustment total, and the requested parties (shipper -> coordinator). Auto-resolves the rate sheet via RateSheetMapping1 for the requested shipper unless body.rate_sheet_id is provided. No DB writes — operator can iterate freely. To commit, call from_rate_sheet/create_for_shipper_pay_provider/v1 then attach_lig_to_shipper_pay_provider/v1. | authz: allowed_org_types=[provider], min_org_role=operator, authz_personas=[task_group_coordinator_operators] | (TaskGroupQuoteForShipperPayProviderClientReq) -> (TaskGroupQuoteResp)
1280
+ * Preview the LineItem materialization that would result from applying a rate sheet to the SPP vector of the named TaskGroup. Returns the resolved rate sheet, materialized LineItems (NOT inserted), the pre-adjustment total, and the requested parties (shipper -> coordinator). Auto-resolves the rate sheet via RateSheetMapping1 for the requested shipper unless body.rate_sheet_id is provided. No DB writes — operator can iterate freely. To commit, call from_rate_sheet/create_for_shipper_pay_provider/v1 then attach_lig_to_shipper_pay_provider/v1. | authz: allowed_org_types=[provider, shipper], min_org_role=operator, authz_personas=[task_group_coordinator_operators, shipper_org_operators] | (TaskGroupQuoteForShipperPayProviderClientReq) -> (TaskGroupQuoteResp)
1281
1281
  *
1282
1282
  * @param {string} taskGroupId
1283
1283
  * @param {Chrt.shipping.TaskGroupQuoteForShipperPayProviderClientReq} request
@@ -4,6 +4,7 @@
4
4
  import * as Chrt from "../index.mjs";
5
5
  export interface BillingLedger1 {
6
6
  schema_version: number;
7
+ name?: string | null;
7
8
  task_group_type?: Chrt.TaskGroupTypeEnum1 | null;
8
9
  comments?: string | null;
9
10
  /** Must be a string starting with `org_` */
@@ -1,10 +1,9 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type CallerCredentialTypeEnum = "session_jwt" | "m2m_jwt" | "api_key" | "internal_delegation_jwt";
4
+ export type CallerCredentialTypeEnum = "session_jwt" | "api_key" | "internal_delegation_jwt";
5
5
  export declare const CallerCredentialTypeEnum: {
6
6
  readonly SessionJwt: "session_jwt";
7
- readonly M2MJwt: "m2m_jwt";
8
7
  readonly ApiKey: "api_key";
9
8
  readonly InternalDelegationJwt: "internal_delegation_jwt";
10
9
  };
@@ -3,7 +3,6 @@
3
3
  */
4
4
  export const CallerCredentialTypeEnum = {
5
5
  SessionJwt: "session_jwt",
6
- M2MJwt: "m2m_jwt",
7
6
  ApiKey: "api_key",
8
7
  InternalDelegationJwt: "internal_delegation_jwt",
9
8
  };
@@ -5,8 +5,12 @@ import * as Chrt from "../index.mjs";
5
5
  export interface Case1 {
6
6
  schema_version: number;
7
7
  order_id: string;
8
+ /** Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, '.', '_', '~', '-' (RFC 3986 unreserved). */
9
+ order_ref?: string | null;
10
+ order_short_id?: string | null;
8
11
  department_id?: string | null;
9
12
  assigned_operator_user_ids?: string[];
13
+ case_s3_object_metadata_ids?: string[];
10
14
  _id: string;
11
15
  /** Must be a string starting with `org_` */
12
16
  org_id: string;
@@ -2,6 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface CaseMessage1 {
5
+ id?: string;
5
6
  message: string;
6
7
  /** Must be a string starting with `user_` */
7
8
  user_id: string;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface CaseS3ObjectMetadata1 {
5
+ schema_version: number;
6
+ _id: string;
7
+ case_id: string;
8
+ uploaded_at_timestamp: string;
9
+ /** Must be a string starting with `user_` */
10
+ uploaded_by_user_id: string;
11
+ /** Must be a string starting with `org_` */
12
+ uploaded_by_org_id: string;
13
+ s3_key_prefix?: "operations/case_s3_object_metadata";
14
+ blurhash?: string | null;
15
+ /** MIME type of the uploaded file (e.g., 'image/jpeg', 'application/pdf') */
16
+ content_type?: string | null;
17
+ /** Original filename of the uploaded file */
18
+ filename?: string | null;
19
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -7,6 +7,7 @@ export interface OrgPrivateData1 {
7
7
  org_type: Chrt.OrgTypeEnum;
8
8
  /** Must be a string starting with `org_` */
9
9
  org_id: string;
10
+ org_subscription?: boolean;
10
11
  stripe_customer_id?: string | null;
11
12
  stripe_connect_account_id?: string | null;
12
13
  webhook_enabled?: boolean;
@@ -86,6 +86,7 @@ export * from "./CargojsonWeightUnit.mjs";
86
86
  export * from "./Case1.mjs";
87
87
  export * from "./CaseListRes.mjs";
88
88
  export * from "./CaseMessage1.mjs";
89
+ export * from "./CaseS3ObjectMetadata1.mjs";
89
90
  export * from "./CaseSortByEnum.mjs";
90
91
  export * from "./CaseStatusEnum.mjs";
91
92
  export * from "./ChampAirWaybill1.mjs";
@@ -86,6 +86,7 @@ export * from "./CargojsonWeightUnit.mjs";
86
86
  export * from "./Case1.mjs";
87
87
  export * from "./CaseListRes.mjs";
88
88
  export * from "./CaseMessage1.mjs";
89
+ export * from "./CaseS3ObjectMetadata1.mjs";
89
90
  export * from "./CaseSortByEnum.mjs";
90
91
  export * from "./CaseStatusEnum.mjs";
91
92
  export * from "./ChampAirWaybill1.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.662.0";
1
+ export declare const SDK_VERSION = "1.675.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.662.0";
1
+ export const SDK_VERSION = "1.675.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.662.0",
3
+ "version": "1.675.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",