@chrt-inc/typescript-sdk 1.662.0 → 1.662.1
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.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/billing/resources/billingLedgerPeriods/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/billing/resources/billingLedgerPeriods/client/Client.js +1 -0
- package/dist/cjs/api/resources/billing/resources/billingLedgerPeriods/client/requests/BillingLedgerPeriodsListV1Request.d.ts +1 -0
- package/dist/cjs/api/resources/billing/resources/billingLedgers/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/billing/resources/billingLedgers/client/Client.js +2 -1
- package/dist/cjs/api/resources/billing/resources/billingLedgers/client/requests/BillingLedgerClientCreate1.d.ts +1 -0
- package/dist/cjs/api/resources/billing/resources/billingLedgers/client/requests/BillingLedgerClientUpdate1.d.ts +2 -0
- package/dist/cjs/api/resources/billing/resources/billingLedgers/client/requests/BillingLedgersListV1Request.d.ts +1 -0
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.js +1 -0
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupsListV1Request.d.ts +1 -0
- package/dist/cjs/api/resources/billing/resources/statements/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/billing/resources/statements/client/Client.js +2 -0
- package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.d.ts +1 -0
- package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.ts +1 -0
- package/dist/cjs/api/resources/listing/resources/bidThreads/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/listing/resources/bidThreads/client/Client.js +2 -0
- package/dist/cjs/api/resources/listing/resources/bidThreads/client/requests/BidThreadsListForBidderV1Request.d.ts +1 -0
- package/dist/cjs/api/resources/listing/resources/bidThreads/client/requests/BidThreadsListForListingV1Request.d.ts +1 -0
- package/dist/cjs/api/resources/listing/resources/listings/client/Client.d.ts +6 -0
- package/dist/cjs/api/resources/listing/resources/listings/client/Client.js +6 -0
- package/dist/cjs/api/resources/listing/resources/listings/client/requests/ListingsListByOrgV1Request.d.ts +2 -0
- package/dist/cjs/api/resources/listing/resources/listings/client/requests/ListingsListForDriverBidderV1Request.d.ts +2 -0
- package/dist/cjs/api/resources/listing/resources/listings/client/requests/ListingsListForProviderBidderV1Request.d.ts +2 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/Client.d.ts +77 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/Client.js +315 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseNeedsActionReq.d.ts +12 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseNeedsActionReq.js +5 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseStatusReq.d.ts +13 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseStatusReq.js +5 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/requests/CasesListV1Request.d.ts +2 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/operations/resources/cases/index.d.ts +1 -0
- package/dist/cjs/api/resources/operations/resources/cases/index.js +1 -0
- package/dist/cjs/api/resources/operations/resources/cases/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/operations/resources/cases/resources/index.js +41 -0
- package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/Client.d.ts +83 -0
- package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/Client.js +308 -0
- package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/index.js +17 -0
- package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/requests/BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost.d.ts +13 -0
- package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/requests/BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost.js +5 -0
- package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/index.d.ts +1 -0
- package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/index.js +17 -0
- package/dist/cjs/api/resources/operations/resources/departments/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/operations/resources/departments/client/Client.js +2 -1
- package/dist/cjs/api/resources/operations/resources/departments/client/requests/DepartmentsListV1Request.d.ts +2 -1
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/client/Client.js +1 -0
- package/dist/cjs/api/resources/orgs/client/requests/OrgsListMembersV1Request.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.js +1 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListOrgMembersAndDriversV1Request.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/client/Client.js +2 -0
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/client/requests/OrderSchedulesListV1Request.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js +2 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForCoordinatorOperatorsV1Request.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.js +2 -0
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForDriverForExecutorV1Request.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForExecutorOperatorsV1Request.d.ts +1 -0
- package/dist/cjs/api/types/BillingLedger1.d.ts +1 -0
- package/dist/cjs/api/types/CallerCredentialTypeEnum.d.ts +1 -2
- package/dist/cjs/api/types/CallerCredentialTypeEnum.js +0 -1
- package/dist/cjs/api/types/Case1.d.ts +4 -0
- package/dist/cjs/api/types/CaseMessage1.d.ts +1 -0
- package/dist/cjs/api/types/CaseS3ObjectMetadata1.d.ts +19 -0
- package/dist/cjs/api/types/CaseS3ObjectMetadata1.js +5 -0
- package/dist/cjs/api/types/OrgPrivateData1.d.ts +1 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/billing/resources/billingLedgerPeriods/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/billing/resources/billingLedgerPeriods/client/Client.mjs +1 -0
- package/dist/esm/api/resources/billing/resources/billingLedgerPeriods/client/requests/BillingLedgerPeriodsListV1Request.d.mts +1 -0
- package/dist/esm/api/resources/billing/resources/billingLedgers/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/billing/resources/billingLedgers/client/Client.mjs +2 -1
- package/dist/esm/api/resources/billing/resources/billingLedgers/client/requests/BillingLedgerClientCreate1.d.mts +1 -0
- package/dist/esm/api/resources/billing/resources/billingLedgers/client/requests/BillingLedgerClientUpdate1.d.mts +2 -0
- package/dist/esm/api/resources/billing/resources/billingLedgers/client/requests/BillingLedgersListV1Request.d.mts +1 -0
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.mjs +1 -0
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupsListV1Request.d.mts +1 -0
- package/dist/esm/api/resources/billing/resources/statements/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/billing/resources/statements/client/Client.mjs +2 -0
- package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.d.mts +1 -0
- package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.mts +1 -0
- package/dist/esm/api/resources/listing/resources/bidThreads/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/listing/resources/bidThreads/client/Client.mjs +2 -0
- package/dist/esm/api/resources/listing/resources/bidThreads/client/requests/BidThreadsListForBidderV1Request.d.mts +1 -0
- package/dist/esm/api/resources/listing/resources/bidThreads/client/requests/BidThreadsListForListingV1Request.d.mts +1 -0
- package/dist/esm/api/resources/listing/resources/listings/client/Client.d.mts +6 -0
- package/dist/esm/api/resources/listing/resources/listings/client/Client.mjs +6 -0
- package/dist/esm/api/resources/listing/resources/listings/client/requests/ListingsListByOrgV1Request.d.mts +2 -0
- package/dist/esm/api/resources/listing/resources/listings/client/requests/ListingsListForDriverBidderV1Request.d.mts +2 -0
- package/dist/esm/api/resources/listing/resources/listings/client/requests/ListingsListForProviderBidderV1Request.d.mts +2 -0
- package/dist/esm/api/resources/operations/resources/cases/client/Client.d.mts +77 -0
- package/dist/esm/api/resources/operations/resources/cases/client/Client.mjs +315 -0
- package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseNeedsActionReq.d.mts +12 -0
- package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseNeedsActionReq.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseStatusReq.d.mts +13 -0
- package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseStatusReq.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/cases/client/requests/CasesListV1Request.d.mts +2 -0
- package/dist/esm/api/resources/operations/resources/cases/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/operations/resources/cases/index.d.mts +1 -0
- package/dist/esm/api/resources/operations/resources/cases/index.mjs +1 -0
- package/dist/esm/api/resources/operations/resources/cases/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/operations/resources/cases/resources/index.mjs +2 -0
- package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/Client.d.mts +83 -0
- package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/Client.mjs +271 -0
- package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/index.d.mts +2 -0
- package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/index.mjs +1 -0
- package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/requests/BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost.d.mts +13 -0
- package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/requests/BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/index.d.mts +1 -0
- package/dist/esm/api/resources/operations/resources/cases/resources/s3Objects/index.mjs +1 -0
- package/dist/esm/api/resources/operations/resources/departments/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/operations/resources/departments/client/Client.mjs +2 -1
- package/dist/esm/api/resources/operations/resources/departments/client/requests/DepartmentsListV1Request.d.mts +2 -1
- package/dist/esm/api/resources/orgs/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/orgs/client/Client.mjs +1 -0
- package/dist/esm/api/resources/orgs/client/requests/OrgsListMembersV1Request.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListOrgMembersAndDriversV1Request.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orderSchedules/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/orderSchedules/client/Client.mjs +2 -0
- package/dist/esm/api/resources/shipping/resources/orderSchedules/client/requests/OrderSchedulesListV1Request.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +2 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForCoordinatorOperatorsV1Request.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.mjs +2 -0
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForDriverForExecutorV1Request.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForExecutorOperatorsV1Request.d.mts +1 -0
- package/dist/esm/api/types/BillingLedger1.d.mts +1 -0
- package/dist/esm/api/types/CallerCredentialTypeEnum.d.mts +1 -2
- package/dist/esm/api/types/CallerCredentialTypeEnum.mjs +0 -1
- package/dist/esm/api/types/Case1.d.mts +4 -0
- package/dist/esm/api/types/CaseMessage1.d.mts +1 -0
- package/dist/esm/api/types/CaseS3ObjectMetadata1.d.mts +19 -0
- package/dist/esm/api/types/CaseS3ObjectMetadata1.mjs +4 -0
- package/dist/esm/api/types/OrgPrivateData1.d.mts +1 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +692 -61
|
@@ -51,10 +51,15 @@ const core = __importStar(require("../../../../../../core/index.js"));
|
|
|
51
51
|
const Chrt = __importStar(require("../../../../../index.js"));
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
|
+
const Client_js_1 = require("../resources/s3Objects/client/Client.js");
|
|
54
55
|
class Cases {
|
|
55
56
|
constructor(_options = {}) {
|
|
56
57
|
this._options = _options;
|
|
57
58
|
}
|
|
59
|
+
get s3Objects() {
|
|
60
|
+
var _a;
|
|
61
|
+
return ((_a = this._s3Objects) !== null && _a !== void 0 ? _a : (this._s3Objects = new Client_js_1.S3Objects(this._options)));
|
|
62
|
+
}
|
|
58
63
|
/**
|
|
59
64
|
* Lists cases for the caller's organization with filtering, sorting, and pagination. | authz: min_org_role=operator | () -> (CaseListRes)
|
|
60
65
|
*
|
|
@@ -69,6 +74,8 @@ class Cases {
|
|
|
69
74
|
* sort_order: "asc",
|
|
70
75
|
* page: 1,
|
|
71
76
|
* page_size: 1,
|
|
77
|
+
* filter_status: ["open"],
|
|
78
|
+
* filter_department_id: ["filter_department_id"],
|
|
72
79
|
* filter_assigned_operator_user_id: "filter_assigned_operator_user_id",
|
|
73
80
|
* filter_needs_action: true,
|
|
74
81
|
* filter_unassigned: true
|
|
@@ -342,6 +349,254 @@ class Cases {
|
|
|
342
349
|
}
|
|
343
350
|
});
|
|
344
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* Retrieves the case for a given order ID, short ID, or off-chrt reference ID. | authz: min_org_role=operator | () -> (Case1)
|
|
354
|
+
*
|
|
355
|
+
* @param {string} orderRef - Order ID, short ID, or off-chrt reference ID
|
|
356
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
357
|
+
*
|
|
358
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
359
|
+
*
|
|
360
|
+
* @example
|
|
361
|
+
* await client.operations.cases.getByOrderRefV1("order_ref")
|
|
362
|
+
*/
|
|
363
|
+
getByOrderRefV1(orderRef, requestOptions) {
|
|
364
|
+
return core.HttpResponsePromise.fromPromise(this.__getByOrderRefV1(orderRef, requestOptions));
|
|
365
|
+
}
|
|
366
|
+
__getByOrderRefV1(orderRef, requestOptions) {
|
|
367
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
368
|
+
var _a, _b, _c, _d;
|
|
369
|
+
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);
|
|
370
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
371
|
+
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/by_order_ref/v1/${encodeURIComponent(orderRef)}`),
|
|
372
|
+
method: "GET",
|
|
373
|
+
headers: _headers,
|
|
374
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
375
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
376
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
377
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
378
|
+
});
|
|
379
|
+
if (_response.ok) {
|
|
380
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
381
|
+
}
|
|
382
|
+
if (_response.error.reason === "status-code") {
|
|
383
|
+
switch (_response.error.statusCode) {
|
|
384
|
+
case 422:
|
|
385
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
386
|
+
default:
|
|
387
|
+
throw new errors.ChrtError({
|
|
388
|
+
statusCode: _response.error.statusCode,
|
|
389
|
+
body: _response.error.body,
|
|
390
|
+
rawResponse: _response.rawResponse,
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
switch (_response.error.reason) {
|
|
395
|
+
case "non-json":
|
|
396
|
+
throw new errors.ChrtError({
|
|
397
|
+
statusCode: _response.error.statusCode,
|
|
398
|
+
body: _response.error.rawBody,
|
|
399
|
+
rawResponse: _response.rawResponse,
|
|
400
|
+
});
|
|
401
|
+
case "timeout":
|
|
402
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /operations/cases/by_order_ref/v1/{order_ref}.");
|
|
403
|
+
case "unknown":
|
|
404
|
+
throw new errors.ChrtError({
|
|
405
|
+
message: _response.error.errorMessage,
|
|
406
|
+
rawResponse: _response.rawResponse,
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Retrieves the case for a given order short ID. | authz: min_org_role=operator | () -> (Case1)
|
|
413
|
+
*
|
|
414
|
+
* @param {string} orderShortId
|
|
415
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
416
|
+
*
|
|
417
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* await client.operations.cases.getByOrderShortIdV1("order_short_id")
|
|
421
|
+
*/
|
|
422
|
+
getByOrderShortIdV1(orderShortId, requestOptions) {
|
|
423
|
+
return core.HttpResponsePromise.fromPromise(this.__getByOrderShortIdV1(orderShortId, requestOptions));
|
|
424
|
+
}
|
|
425
|
+
__getByOrderShortIdV1(orderShortId, requestOptions) {
|
|
426
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
427
|
+
var _a, _b, _c, _d;
|
|
428
|
+
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);
|
|
429
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
430
|
+
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/by_order_short_id/v1/${encodeURIComponent(orderShortId)}`),
|
|
431
|
+
method: "GET",
|
|
432
|
+
headers: _headers,
|
|
433
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
434
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
435
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
436
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
437
|
+
});
|
|
438
|
+
if (_response.ok) {
|
|
439
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
440
|
+
}
|
|
441
|
+
if (_response.error.reason === "status-code") {
|
|
442
|
+
switch (_response.error.statusCode) {
|
|
443
|
+
case 422:
|
|
444
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
445
|
+
default:
|
|
446
|
+
throw new errors.ChrtError({
|
|
447
|
+
statusCode: _response.error.statusCode,
|
|
448
|
+
body: _response.error.body,
|
|
449
|
+
rawResponse: _response.rawResponse,
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
switch (_response.error.reason) {
|
|
454
|
+
case "non-json":
|
|
455
|
+
throw new errors.ChrtError({
|
|
456
|
+
statusCode: _response.error.statusCode,
|
|
457
|
+
body: _response.error.rawBody,
|
|
458
|
+
rawResponse: _response.rawResponse,
|
|
459
|
+
});
|
|
460
|
+
case "timeout":
|
|
461
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /operations/cases/by_order_short_id/v1/{order_short_id}.");
|
|
462
|
+
case "unknown":
|
|
463
|
+
throw new errors.ChrtError({
|
|
464
|
+
message: _response.error.errorMessage,
|
|
465
|
+
rawResponse: _response.rawResponse,
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Updates whether a case needs action. | authz: min_org_role=operator | (CaseNeedsActionReq) -> (bool)
|
|
472
|
+
*
|
|
473
|
+
* @param {string} caseId
|
|
474
|
+
* @param {Chrt.operations.CaseNeedsActionReq} request
|
|
475
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
476
|
+
*
|
|
477
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
478
|
+
*
|
|
479
|
+
* @example
|
|
480
|
+
* await client.operations.cases.updateNeedsActionV1("case_id", {
|
|
481
|
+
* needs_action: true
|
|
482
|
+
* })
|
|
483
|
+
*/
|
|
484
|
+
updateNeedsActionV1(caseId, request, requestOptions) {
|
|
485
|
+
return core.HttpResponsePromise.fromPromise(this.__updateNeedsActionV1(caseId, request, requestOptions));
|
|
486
|
+
}
|
|
487
|
+
__updateNeedsActionV1(caseId, request, requestOptions) {
|
|
488
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
489
|
+
var _a, _b, _c, _d;
|
|
490
|
+
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);
|
|
491
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
492
|
+
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/needs_action/v1/${encodeURIComponent(caseId)}`),
|
|
493
|
+
method: "PATCH",
|
|
494
|
+
headers: _headers,
|
|
495
|
+
contentType: "application/json",
|
|
496
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
497
|
+
requestType: "json",
|
|
498
|
+
body: request,
|
|
499
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
500
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
501
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
502
|
+
});
|
|
503
|
+
if (_response.ok) {
|
|
504
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
505
|
+
}
|
|
506
|
+
if (_response.error.reason === "status-code") {
|
|
507
|
+
switch (_response.error.statusCode) {
|
|
508
|
+
case 422:
|
|
509
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
510
|
+
default:
|
|
511
|
+
throw new errors.ChrtError({
|
|
512
|
+
statusCode: _response.error.statusCode,
|
|
513
|
+
body: _response.error.body,
|
|
514
|
+
rawResponse: _response.rawResponse,
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
switch (_response.error.reason) {
|
|
519
|
+
case "non-json":
|
|
520
|
+
throw new errors.ChrtError({
|
|
521
|
+
statusCode: _response.error.statusCode,
|
|
522
|
+
body: _response.error.rawBody,
|
|
523
|
+
rawResponse: _response.rawResponse,
|
|
524
|
+
});
|
|
525
|
+
case "timeout":
|
|
526
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /operations/cases/needs_action/v1/{case_id}.");
|
|
527
|
+
case "unknown":
|
|
528
|
+
throw new errors.ChrtError({
|
|
529
|
+
message: _response.error.errorMessage,
|
|
530
|
+
rawResponse: _response.rawResponse,
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Updates a case's status. Closing a case also clears needs_action. | authz: min_org_role=operator | (CaseStatusReq) -> (bool)
|
|
537
|
+
*
|
|
538
|
+
* @param {string} caseId
|
|
539
|
+
* @param {Chrt.operations.CaseStatusReq} request
|
|
540
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
541
|
+
*
|
|
542
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
543
|
+
*
|
|
544
|
+
* @example
|
|
545
|
+
* await client.operations.cases.updateStatusV1("case_id", {
|
|
546
|
+
* status: "open"
|
|
547
|
+
* })
|
|
548
|
+
*/
|
|
549
|
+
updateStatusV1(caseId, request, requestOptions) {
|
|
550
|
+
return core.HttpResponsePromise.fromPromise(this.__updateStatusV1(caseId, request, requestOptions));
|
|
551
|
+
}
|
|
552
|
+
__updateStatusV1(caseId, request, requestOptions) {
|
|
553
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
554
|
+
var _a, _b, _c, _d;
|
|
555
|
+
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);
|
|
556
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
557
|
+
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/status/v1/${encodeURIComponent(caseId)}`),
|
|
558
|
+
method: "PATCH",
|
|
559
|
+
headers: _headers,
|
|
560
|
+
contentType: "application/json",
|
|
561
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
562
|
+
requestType: "json",
|
|
563
|
+
body: request,
|
|
564
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
565
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
566
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
567
|
+
});
|
|
568
|
+
if (_response.ok) {
|
|
569
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
570
|
+
}
|
|
571
|
+
if (_response.error.reason === "status-code") {
|
|
572
|
+
switch (_response.error.statusCode) {
|
|
573
|
+
case 422:
|
|
574
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
575
|
+
default:
|
|
576
|
+
throw new errors.ChrtError({
|
|
577
|
+
statusCode: _response.error.statusCode,
|
|
578
|
+
body: _response.error.body,
|
|
579
|
+
rawResponse: _response.rawResponse,
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
switch (_response.error.reason) {
|
|
584
|
+
case "non-json":
|
|
585
|
+
throw new errors.ChrtError({
|
|
586
|
+
statusCode: _response.error.statusCode,
|
|
587
|
+
body: _response.error.rawBody,
|
|
588
|
+
rawResponse: _response.rawResponse,
|
|
589
|
+
});
|
|
590
|
+
case "timeout":
|
|
591
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /operations/cases/status/v1/{case_id}.");
|
|
592
|
+
case "unknown":
|
|
593
|
+
throw new errors.ChrtError({
|
|
594
|
+
message: _response.error.errorMessage,
|
|
595
|
+
rawResponse: _response.rawResponse,
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
}
|
|
345
600
|
/**
|
|
346
601
|
* Adds operator(s) to a case. | authz: min_org_role=operator | (CaseAssignReq) -> (bool)
|
|
347
602
|
*
|
|
@@ -537,6 +792,66 @@ class Cases {
|
|
|
537
792
|
}
|
|
538
793
|
});
|
|
539
794
|
}
|
|
795
|
+
/**
|
|
796
|
+
* Deletes a message from a case. | authz: min_org_role=operator | () -> (bool)
|
|
797
|
+
*
|
|
798
|
+
* @param {string} caseId
|
|
799
|
+
* @param {string} messageId
|
|
800
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
801
|
+
*
|
|
802
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
803
|
+
*
|
|
804
|
+
* @example
|
|
805
|
+
* await client.operations.cases.deleteMessageV1("case_id", "message_id")
|
|
806
|
+
*/
|
|
807
|
+
deleteMessageV1(caseId, messageId, requestOptions) {
|
|
808
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteMessageV1(caseId, messageId, requestOptions));
|
|
809
|
+
}
|
|
810
|
+
__deleteMessageV1(caseId, messageId, requestOptions) {
|
|
811
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
812
|
+
var _a, _b, _c, _d;
|
|
813
|
+
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);
|
|
814
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
815
|
+
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/delete_message/v1/${encodeURIComponent(caseId)}/${encodeURIComponent(messageId)}`),
|
|
816
|
+
method: "DELETE",
|
|
817
|
+
headers: _headers,
|
|
818
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
819
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
820
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
821
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
822
|
+
});
|
|
823
|
+
if (_response.ok) {
|
|
824
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
825
|
+
}
|
|
826
|
+
if (_response.error.reason === "status-code") {
|
|
827
|
+
switch (_response.error.statusCode) {
|
|
828
|
+
case 422:
|
|
829
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
830
|
+
default:
|
|
831
|
+
throw new errors.ChrtError({
|
|
832
|
+
statusCode: _response.error.statusCode,
|
|
833
|
+
body: _response.error.body,
|
|
834
|
+
rawResponse: _response.rawResponse,
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
switch (_response.error.reason) {
|
|
839
|
+
case "non-json":
|
|
840
|
+
throw new errors.ChrtError({
|
|
841
|
+
statusCode: _response.error.statusCode,
|
|
842
|
+
body: _response.error.rawBody,
|
|
843
|
+
rawResponse: _response.rawResponse,
|
|
844
|
+
});
|
|
845
|
+
case "timeout":
|
|
846
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /operations/cases/delete_message/v1/{case_id}/{message_id}.");
|
|
847
|
+
case "unknown":
|
|
848
|
+
throw new errors.ChrtError({
|
|
849
|
+
message: _response.error.errorMessage,
|
|
850
|
+
rawResponse: _response.rawResponse,
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
});
|
|
854
|
+
}
|
|
540
855
|
_getAuthorizationHeader() {
|
|
541
856
|
return __awaiter(this, void 0, void 0, function* () {
|
|
542
857
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* status: "open"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface CaseStatusReq {
|
|
12
|
+
status: Chrt.CaseStatusEnum;
|
|
13
|
+
}
|
package/dist/cjs/api/resources/operations/resources/cases/client/requests/CasesListV1Request.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ import * as Chrt from "../../../../../../index.js";
|
|
|
9
9
|
* sort_order: "asc",
|
|
10
10
|
* page: 1,
|
|
11
11
|
* page_size: 1,
|
|
12
|
+
* filter_status: ["open"],
|
|
13
|
+
* filter_department_id: ["filter_department_id"],
|
|
12
14
|
* filter_assigned_operator_user_id: "filter_assigned_operator_user_id",
|
|
13
15
|
* filter_needs_action: true,
|
|
14
16
|
* filter_unassigned: true
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { type CasesListV1Request } from "./CasesListV1Request.js";
|
|
2
2
|
export { type CaseClientUpdate1 } from "./CaseClientUpdate1.js";
|
|
3
|
+
export { type CaseNeedsActionReq } from "./CaseNeedsActionReq.js";
|
|
4
|
+
export { type CaseStatusReq } from "./CaseStatusReq.js";
|
|
3
5
|
export { type CaseAssignReq } from "./CaseAssignReq.js";
|
|
4
6
|
export { type CaseUnassignReq } from "./CaseUnassignReq.js";
|
|
5
7
|
export { type CaseAddMessageReq } from "./CaseAddMessageReq.js";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.s3Objects = void 0;
|
|
40
|
+
exports.s3Objects = __importStar(require("./s3Objects/index.js"));
|
|
41
|
+
__exportStar(require("./s3Objects/client/requests/index.js"), exports);
|
package/dist/cjs/api/resources/operations/resources/cases/resources/s3Objects/client/Client.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../../../environments.js";
|
|
5
|
+
import * as core from "../../../../../../../../core/index.js";
|
|
6
|
+
import * as Chrt from "../../../../../../../index.js";
|
|
7
|
+
export declare namespace S3Objects {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
interface RequestOptions {
|
|
18
|
+
/** The maximum time to wait for a response in seconds. */
|
|
19
|
+
timeoutInSeconds?: number;
|
|
20
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** A hook to abort the request. */
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional query string parameters to include in the request. */
|
|
25
|
+
queryParams?: Record<string, unknown>;
|
|
26
|
+
/** Additional headers to include in the request. */
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare class S3Objects {
|
|
31
|
+
protected readonly _options: S3Objects.Options;
|
|
32
|
+
constructor(_options?: S3Objects.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves metadata for a case S3 object. | authz: min_org_role=operator | () -> (CaseS3ObjectMetadata1)
|
|
35
|
+
*
|
|
36
|
+
* @param {string} caseS3ObjectMetadataId
|
|
37
|
+
* @param {S3Objects.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.operations.cases.s3Objects.getS3ObjectMetadataV1("case_s3_object_metadata_id")
|
|
43
|
+
*/
|
|
44
|
+
getS3ObjectMetadataV1(caseS3ObjectMetadataId: string, requestOptions?: S3Objects.RequestOptions): core.HttpResponsePromise<Chrt.CaseS3ObjectMetadata1>;
|
|
45
|
+
private __getS3ObjectMetadataV1;
|
|
46
|
+
/**
|
|
47
|
+
* Streams a case S3 object file from storage. | authz: min_org_role=operator | () -> (binary)
|
|
48
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
49
|
+
*/
|
|
50
|
+
getV1(caseS3ObjectMetadataId: string, requestOptions?: S3Objects.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
51
|
+
private __getV1;
|
|
52
|
+
/**
|
|
53
|
+
* Uploads a file to a case. Automatic blurhash generation for images. | authz: min_org_role=operator | (UploadFile) -> (bool)
|
|
54
|
+
*
|
|
55
|
+
* @param {string} caseId
|
|
56
|
+
* @param {Chrt.operations.cases.BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost} request
|
|
57
|
+
* @param {S3Objects.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* import { createReadStream } from "fs";
|
|
63
|
+
* await client.operations.cases.s3Objects.addV1("case_id", {
|
|
64
|
+
* file: fs.createReadStream("/path/to/your/file")
|
|
65
|
+
* })
|
|
66
|
+
*/
|
|
67
|
+
addV1(caseId: string, request: Chrt.operations.cases.BodyPostCasesS3ObjectsAddV1OperationsCasesS3ObjectsAddV1CaseIdPost, requestOptions?: S3Objects.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
68
|
+
private __addV1;
|
|
69
|
+
/**
|
|
70
|
+
* 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)
|
|
71
|
+
*
|
|
72
|
+
* @param {string} caseS3ObjectMetadataId
|
|
73
|
+
* @param {S3Objects.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.operations.cases.s3Objects.deleteV1("case_s3_object_metadata_id")
|
|
79
|
+
*/
|
|
80
|
+
deleteV1(caseS3ObjectMetadataId: string, requestOptions?: S3Objects.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
81
|
+
private __deleteV1;
|
|
82
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
83
|
+
}
|