@chrt-inc/typescript-sdk 1.691.0 → 1.702.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.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/operations/client/Client.d.ts +6 -0
- package/dist/cjs/api/resources/operations/client/Client.js +12 -2
- package/dist/cjs/api/resources/operations/resources/cases/client/Client.d.ts +100 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/Client.js +394 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseChecksApplyChecklistReq.d.ts +12 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseChecksApplyChecklistReq.js +5 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseChecksRecordImageAnalysisResultsReq.d.ts +15 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseChecksRecordImageAnalysisResultsReq.js +5 -0
- package/dist/cjs/api/resources/operations/resources/cases/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/Client.d.ts +150 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/Client.js +581 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/index.js +17 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistChecksAdd1.d.ts +11 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistChecksAdd1.js +5 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistChecksRemove1.d.ts +11 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistChecksRemove1.js +5 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistClientCreate1.d.ts +17 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistClientCreate1.js +5 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistClientUpdate1.d.ts +12 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistsListV1Request.d.ts +24 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistsListV1Request.js +5 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/resources/operations/resources/checklists/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/operations/resources/checklists/index.d.ts +1 -0
- package/dist/cjs/api/resources/operations/resources/checklists/index.js +17 -0
- package/dist/cjs/api/resources/operations/resources/index.d.ts +4 -0
- package/dist/cjs/api/resources/operations/resources/index.js +5 -1
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/Client.d.ts +170 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/Client.js +653 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/index.js +17 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskAddCommentReq1.d.ts +12 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskAddCommentReq1.js +5 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientCreate1.d.ts +19 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientCreate1.js +5 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientUpdate1.d.ts +12 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksListV1Request.d.ts +33 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksListV1Request.js +5 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/index.d.ts +1 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/index.js +17 -0
- package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/Client.d.ts +14 -0
- package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/Client.js +63 -0
- package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientCreate1.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientUpdate1.d.ts +11 -0
- package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/Client.d.ts +14 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/Client.js +63 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientCreate1.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientUpdate1.d.ts +11 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.js +75 -0
- package/dist/cjs/api/types/AiImageDescription.d.ts +30 -0
- package/dist/cjs/api/types/AiImageDescription.js +5 -0
- package/dist/cjs/api/types/Case1.d.ts +4 -0
- package/dist/cjs/api/types/CaseChecksDisableReq.d.ts +7 -0
- package/dist/cjs/api/types/CaseChecksDisableReq.js +5 -0
- package/dist/cjs/api/types/CaseChecksDismissReq.d.ts +8 -0
- package/dist/cjs/api/types/CaseChecksDismissReq.js +5 -0
- package/dist/cjs/api/types/CaseChecksSummary1.d.ts +27 -0
- package/dist/cjs/api/types/CaseChecksSummary1.js +5 -0
- package/dist/cjs/api/types/Check1.d.ts +33 -0
- package/dist/cjs/api/types/Check1.js +5 -0
- package/dist/cjs/api/types/CheckEnum.d.ts +46 -0
- package/dist/cjs/api/types/CheckEnum.js +23 -0
- package/dist/cjs/api/types/CheckStatusEnum.d.ts +32 -0
- package/dist/cjs/api/types/CheckStatusEnum.js +15 -0
- package/dist/cjs/api/types/Checklist1.d.ts +18 -0
- package/dist/cjs/api/types/Checklist1.js +5 -0
- package/dist/cjs/api/types/ChecklistCheck1.d.ts +15 -0
- package/dist/cjs/api/types/ChecklistCheck1.js +5 -0
- package/dist/cjs/api/types/ChecklistListRes.d.ts +8 -0
- package/dist/cjs/api/types/ChecklistListRes.js +5 -0
- package/dist/cjs/api/types/ChecklistSortByEnum.d.ts +9 -0
- package/dist/cjs/api/types/ChecklistSortByEnum.js +11 -0
- package/dist/cjs/api/types/DriverComplianceDocument1.d.ts +1 -0
- package/dist/cjs/api/types/DriverComplianceDocumentTypeEnum1.d.ts +16 -1
- package/dist/cjs/api/types/DriverComplianceDocumentTypeEnum1.js +15 -0
- package/dist/cjs/api/types/LlmModelEnum.d.ts +12 -0
- package/dist/cjs/api/types/LlmModelEnum.js +14 -0
- package/dist/cjs/api/types/OperationsTask1.d.ts +19 -0
- package/dist/cjs/api/types/OperationsTask1.js +5 -0
- package/dist/cjs/api/types/OperationsTaskComment1.d.ts +10 -0
- package/dist/cjs/api/types/OperationsTaskComment1.js +5 -0
- package/dist/cjs/api/types/OperationsTaskListRes.d.ts +8 -0
- package/dist/cjs/api/types/OperationsTaskListRes.js +5 -0
- package/dist/cjs/api/types/OperationsTaskSortByEnum.d.ts +8 -0
- package/dist/cjs/api/types/OperationsTaskSortByEnum.js +10 -0
- package/dist/cjs/api/types/OrgComplianceDocument1.d.ts +1 -0
- package/dist/cjs/api/types/OrgComplianceDocumentTypeEnum1.d.ts +11 -1
- package/dist/cjs/api/types/OrgComplianceDocumentTypeEnum1.js +10 -0
- package/dist/cjs/api/types/TaskArtifactS3ObjectMetadata1.d.ts +2 -0
- package/dist/cjs/api/types/index.d.ts +16 -0
- package/dist/cjs/api/types/index.js +16 -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/operations/client/Client.d.mts +6 -0
- package/dist/esm/api/resources/operations/client/Client.mjs +10 -0
- package/dist/esm/api/resources/operations/resources/cases/client/Client.d.mts +100 -0
- package/dist/esm/api/resources/operations/resources/cases/client/Client.mjs +394 -0
- package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseChecksApplyChecklistReq.d.mts +12 -0
- package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseChecksApplyChecklistReq.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseChecksRecordImageAnalysisResultsReq.d.mts +15 -0
- package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseChecksRecordImageAnalysisResultsReq.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/cases/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/Client.d.mts +150 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/Client.mjs +544 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/index.d.mts +2 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/index.mjs +1 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistChecksAdd1.d.mts +11 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistChecksAdd1.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistChecksRemove1.d.mts +11 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistChecksRemove1.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistClientCreate1.d.mts +17 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistClientCreate1.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistClientUpdate1.d.mts +12 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistsListV1Request.d.mts +24 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistsListV1Request.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/requests/index.d.mts +5 -0
- package/dist/esm/api/resources/operations/resources/checklists/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/operations/resources/checklists/index.d.mts +1 -0
- package/dist/esm/api/resources/operations/resources/checklists/index.mjs +1 -0
- package/dist/esm/api/resources/operations/resources/index.d.mts +4 -0
- package/dist/esm/api/resources/operations/resources/index.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/Client.d.mts +170 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/Client.mjs +616 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/index.d.mts +2 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/index.mjs +1 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskAddCommentReq1.d.mts +12 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskAddCommentReq1.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientCreate1.d.mts +19 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientCreate1.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientUpdate1.d.mts +12 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksListV1Request.d.mts +33 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksListV1Request.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/index.d.mts +1 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/Client.d.mts +14 -0
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/Client.mjs +63 -0
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientCreate1.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientUpdate1.d.mts +11 -0
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/Client.d.mts +14 -0
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/Client.mjs +63 -0
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientCreate1.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientUpdate1.d.mts +11 -0
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.mts +26 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.mjs +75 -0
- package/dist/esm/api/types/AiImageDescription.d.mts +30 -0
- package/dist/esm/api/types/AiImageDescription.mjs +4 -0
- package/dist/esm/api/types/Case1.d.mts +4 -0
- package/dist/esm/api/types/CaseChecksDisableReq.d.mts +7 -0
- package/dist/esm/api/types/CaseChecksDisableReq.mjs +4 -0
- package/dist/esm/api/types/CaseChecksDismissReq.d.mts +8 -0
- package/dist/esm/api/types/CaseChecksDismissReq.mjs +4 -0
- package/dist/esm/api/types/CaseChecksSummary1.d.mts +27 -0
- package/dist/esm/api/types/CaseChecksSummary1.mjs +4 -0
- package/dist/esm/api/types/Check1.d.mts +33 -0
- package/dist/esm/api/types/Check1.mjs +4 -0
- package/dist/esm/api/types/CheckEnum.d.mts +46 -0
- package/dist/esm/api/types/CheckEnum.mjs +20 -0
- package/dist/esm/api/types/CheckStatusEnum.d.mts +32 -0
- package/dist/esm/api/types/CheckStatusEnum.mjs +12 -0
- package/dist/esm/api/types/Checklist1.d.mts +18 -0
- package/dist/esm/api/types/Checklist1.mjs +4 -0
- package/dist/esm/api/types/ChecklistCheck1.d.mts +15 -0
- package/dist/esm/api/types/ChecklistCheck1.mjs +4 -0
- package/dist/esm/api/types/ChecklistListRes.d.mts +8 -0
- package/dist/esm/api/types/ChecklistListRes.mjs +4 -0
- package/dist/esm/api/types/ChecklistSortByEnum.d.mts +9 -0
- package/dist/esm/api/types/ChecklistSortByEnum.mjs +8 -0
- package/dist/esm/api/types/DriverComplianceDocument1.d.mts +1 -0
- package/dist/esm/api/types/DriverComplianceDocumentTypeEnum1.d.mts +16 -1
- package/dist/esm/api/types/DriverComplianceDocumentTypeEnum1.mjs +15 -0
- package/dist/esm/api/types/LlmModelEnum.d.mts +12 -0
- package/dist/esm/api/types/LlmModelEnum.mjs +11 -0
- package/dist/esm/api/types/OperationsTask1.d.mts +19 -0
- package/dist/esm/api/types/OperationsTask1.mjs +4 -0
- package/dist/esm/api/types/OperationsTaskComment1.d.mts +10 -0
- package/dist/esm/api/types/OperationsTaskComment1.mjs +4 -0
- package/dist/esm/api/types/OperationsTaskListRes.d.mts +8 -0
- package/dist/esm/api/types/OperationsTaskListRes.mjs +4 -0
- package/dist/esm/api/types/OperationsTaskSortByEnum.d.mts +8 -0
- package/dist/esm/api/types/OperationsTaskSortByEnum.mjs +7 -0
- package/dist/esm/api/types/OrgComplianceDocument1.d.mts +1 -0
- package/dist/esm/api/types/OrgComplianceDocumentTypeEnum1.d.mts +11 -1
- package/dist/esm/api/types/OrgComplianceDocumentTypeEnum1.mjs +10 -0
- package/dist/esm/api/types/TaskArtifactS3ObjectMetadata1.d.mts +2 -0
- package/dist/esm/api/types/index.d.mts +16 -0
- package/dist/esm/api/types/index.mjs +16 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +1957 -142
package/dist/cjs/Client.js
CHANGED
|
@@ -56,8 +56,8 @@ class ChrtClient {
|
|
|
56
56
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
57
57
|
"X-Fern-Language": "JavaScript",
|
|
58
58
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
59
|
-
"X-Fern-SDK-Version": "1.
|
|
60
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
59
|
+
"X-Fern-SDK-Version": "1.702.0",
|
|
60
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.702.0",
|
|
61
61
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
62
62
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
63
63
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
import * as environments from "../../../../environments.js";
|
|
5
5
|
import * as core from "../../../../core/index.js";
|
|
6
6
|
import { Cases } from "../resources/cases/client/Client.js";
|
|
7
|
+
import { Checklists } from "../resources/checklists/client/Client.js";
|
|
7
8
|
import { Departments } from "../resources/departments/client/Client.js";
|
|
9
|
+
import { OperationsTasks } from "../resources/operationsTasks/client/Client.js";
|
|
8
10
|
export declare namespace Operations {
|
|
9
11
|
interface Options {
|
|
10
12
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
@@ -19,8 +21,12 @@ export declare namespace Operations {
|
|
|
19
21
|
export declare class Operations {
|
|
20
22
|
protected readonly _options: Operations.Options;
|
|
21
23
|
protected _cases: Cases | undefined;
|
|
24
|
+
protected _checklists: Checklists | undefined;
|
|
22
25
|
protected _departments: Departments | undefined;
|
|
26
|
+
protected _operationsTasks: OperationsTasks | undefined;
|
|
23
27
|
constructor(_options?: Operations.Options);
|
|
24
28
|
get cases(): Cases;
|
|
29
|
+
get checklists(): Checklists;
|
|
25
30
|
get departments(): Departments;
|
|
31
|
+
get operationsTasks(): OperationsTasks;
|
|
26
32
|
}
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Operations = void 0;
|
|
7
7
|
const Client_js_1 = require("../resources/cases/client/Client.js");
|
|
8
|
-
const Client_js_2 = require("../resources/
|
|
8
|
+
const Client_js_2 = require("../resources/checklists/client/Client.js");
|
|
9
|
+
const Client_js_3 = require("../resources/departments/client/Client.js");
|
|
10
|
+
const Client_js_4 = require("../resources/operationsTasks/client/Client.js");
|
|
9
11
|
class Operations {
|
|
10
12
|
constructor(_options = {}) {
|
|
11
13
|
this._options = _options;
|
|
@@ -14,9 +16,17 @@ class Operations {
|
|
|
14
16
|
var _a;
|
|
15
17
|
return ((_a = this._cases) !== null && _a !== void 0 ? _a : (this._cases = new Client_js_1.Cases(this._options)));
|
|
16
18
|
}
|
|
19
|
+
get checklists() {
|
|
20
|
+
var _a;
|
|
21
|
+
return ((_a = this._checklists) !== null && _a !== void 0 ? _a : (this._checklists = new Client_js_2.Checklists(this._options)));
|
|
22
|
+
}
|
|
17
23
|
get departments() {
|
|
18
24
|
var _a;
|
|
19
|
-
return ((_a = this._departments) !== null && _a !== void 0 ? _a : (this._departments = new
|
|
25
|
+
return ((_a = this._departments) !== null && _a !== void 0 ? _a : (this._departments = new Client_js_3.Departments(this._options)));
|
|
26
|
+
}
|
|
27
|
+
get operationsTasks() {
|
|
28
|
+
var _a;
|
|
29
|
+
return ((_a = this._operationsTasks) !== null && _a !== void 0 ? _a : (this._operationsTasks = new Client_js_4.OperationsTasks(this._options)));
|
|
20
30
|
}
|
|
21
31
|
}
|
|
22
32
|
exports.Operations = Operations;
|
|
@@ -33,6 +33,106 @@ export declare class Cases {
|
|
|
33
33
|
protected _s3Objects: S3Objects | undefined;
|
|
34
34
|
constructor(_options?: Cases.Options);
|
|
35
35
|
get s3Objects(): S3Objects;
|
|
36
|
+
/**
|
|
37
|
+
* Records image-analysis workflow results onto every participating org's Case for the order. Walks task_artifact -> task -> order, authorizes the caller against the shipping graph, then fans out to all Cases keyed on `order_id` — upserting one Check1 per surviving result keyed by (check, task_artifact_id) on each Case whose effective check set (`enabled - disabled`) includes it. Silently drops results for checks not in the image-uploaded event family, results for checks not in a given Case's effective set, and results whose existing row on that Case is DISMISSED. Returns True if any Case was updated. Intended to be called by the shipping_task_image_analysis Temporal workflow via an internal delegation JWT. | authz_personas=[driver_for_executor, executor_org_operators, shipper_org_operators, coordinator_org_operators] | (CaseChecksRecordImageAnalysisResultsReq) -> (bool)
|
|
38
|
+
*
|
|
39
|
+
* @param {string} taskArtifactId
|
|
40
|
+
* @param {Chrt.operations.CaseChecksRecordImageAnalysisResultsReq} request
|
|
41
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
42
|
+
*
|
|
43
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* await client.operations.cases.recordImageAnalysisResultsV1("task_artifact_id", {
|
|
47
|
+
* results: {
|
|
48
|
+
* "key": "not_started"
|
|
49
|
+
* }
|
|
50
|
+
* })
|
|
51
|
+
*/
|
|
52
|
+
recordImageAnalysisResultsV1(taskArtifactId: string, request: Chrt.operations.CaseChecksRecordImageAnalysisResultsReq, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
53
|
+
private __recordImageAnalysisResultsV1;
|
|
54
|
+
/**
|
|
55
|
+
* Adds the Checklist's checks to the Case's enabled_check_keys (deduped) and records the Checklist id. Does not touch existing check runs. Idempotent. | authz: min_org_role=operator | (CaseChecksApplyChecklistReq) -> (bool)
|
|
56
|
+
*
|
|
57
|
+
* @param {string} caseId
|
|
58
|
+
* @param {Chrt.operations.CaseChecksApplyChecklistReq} request
|
|
59
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* await client.operations.cases.applyChecklistV1("case_id", {
|
|
65
|
+
* checklist_id: "checklist_id"
|
|
66
|
+
* })
|
|
67
|
+
*/
|
|
68
|
+
applyChecklistV1(caseId: string, request: Chrt.operations.CaseChecksApplyChecklistReq, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
69
|
+
private __applyChecklistV1;
|
|
70
|
+
/**
|
|
71
|
+
* Adds a CheckEnum to the Case's disabled_check_keys (operator override). The Checklist that enabled the check stays applied; the workflow's effective set becomes enabled - disabled. Requires the CheckEnum to currently be in enabled_check_keys; otherwise 400. Existing check runs are untouched — operators dismiss them individually if they also want them out of summary counts. | authz: min_org_role=operator | (CaseChecksDisableReq) -> (bool)
|
|
72
|
+
*
|
|
73
|
+
* @param {string} caseId
|
|
74
|
+
* @param {Chrt.CaseChecksDisableReq} request
|
|
75
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* await client.operations.cases.disableCheckV1("case_id", {
|
|
81
|
+
* check: "shipping.order.placed.order_details_reviewed"
|
|
82
|
+
* })
|
|
83
|
+
*/
|
|
84
|
+
disableCheckV1(caseId: string, request: Chrt.CaseChecksDisableReq, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
85
|
+
private __disableCheckV1;
|
|
86
|
+
/**
|
|
87
|
+
* Removes a CheckEnum from the Case's disabled_check_keys, restoring it to the workflow's effective set. Inverse of disable. No-op if the CheckEnum isn't currently disabled. | authz: min_org_role=operator | (CaseChecksDisableReq) -> (bool)
|
|
88
|
+
*
|
|
89
|
+
* @param {string} caseId
|
|
90
|
+
* @param {Chrt.CaseChecksDisableReq} request
|
|
91
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
92
|
+
*
|
|
93
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* await client.operations.cases.enableCheckV1("case_id", {
|
|
97
|
+
* check: "shipping.order.placed.order_details_reviewed"
|
|
98
|
+
* })
|
|
99
|
+
*/
|
|
100
|
+
enableCheckV1(caseId: string, request: Chrt.CaseChecksDisableReq, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
101
|
+
private __enableCheckV1;
|
|
102
|
+
/**
|
|
103
|
+
* Transitions one (check, entity_id) Check1 to status=DISMISSED. Does not affect other runs of the same check on different entity_ids. | authz: min_org_role=operator | (CaseChecksDismissReq) -> (bool)
|
|
104
|
+
*
|
|
105
|
+
* @param {string} caseId
|
|
106
|
+
* @param {Chrt.CaseChecksDismissReq} request
|
|
107
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
108
|
+
*
|
|
109
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* await client.operations.cases.dismissCheckV1("case_id", {
|
|
113
|
+
* check: "shipping.order.placed.order_details_reviewed",
|
|
114
|
+
* entity_id: "entity_id"
|
|
115
|
+
* })
|
|
116
|
+
*/
|
|
117
|
+
dismissCheckV1(caseId: string, request: Chrt.CaseChecksDismissReq, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
118
|
+
private __dismissCheckV1;
|
|
119
|
+
/**
|
|
120
|
+
* Transitions a DISMISSED (check, entity_id) Check1 back to NOT_STARTED so the next matching event re-evaluates it. No-op if not currently DISMISSED. | authz: min_org_role=operator | (CaseChecksDismissReq) -> (bool)
|
|
121
|
+
*
|
|
122
|
+
* @param {string} caseId
|
|
123
|
+
* @param {Chrt.CaseChecksDismissReq} request
|
|
124
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
125
|
+
*
|
|
126
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* await client.operations.cases.undismissCheckV1("case_id", {
|
|
130
|
+
* check: "shipping.order.placed.order_details_reviewed",
|
|
131
|
+
* entity_id: "entity_id"
|
|
132
|
+
* })
|
|
133
|
+
*/
|
|
134
|
+
undismissCheckV1(caseId: string, request: Chrt.CaseChecksDismissReq, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
135
|
+
private __undismissCheckV1;
|
|
36
136
|
/**
|
|
37
137
|
* Lists cases for the caller's organization with filtering, sorting, and pagination. | authz: min_org_role=operator | () -> (CaseListRes)
|
|
38
138
|
*
|
|
@@ -60,6 +60,400 @@ class Cases {
|
|
|
60
60
|
var _a;
|
|
61
61
|
return ((_a = this._s3Objects) !== null && _a !== void 0 ? _a : (this._s3Objects = new Client_js_1.S3Objects(this._options)));
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Records image-analysis workflow results onto every participating org's Case for the order. Walks task_artifact -> task -> order, authorizes the caller against the shipping graph, then fans out to all Cases keyed on `order_id` — upserting one Check1 per surviving result keyed by (check, task_artifact_id) on each Case whose effective check set (`enabled - disabled`) includes it. Silently drops results for checks not in the image-uploaded event family, results for checks not in a given Case's effective set, and results whose existing row on that Case is DISMISSED. Returns True if any Case was updated. Intended to be called by the shipping_task_image_analysis Temporal workflow via an internal delegation JWT. | authz_personas=[driver_for_executor, executor_org_operators, shipper_org_operators, coordinator_org_operators] | (CaseChecksRecordImageAnalysisResultsReq) -> (bool)
|
|
65
|
+
*
|
|
66
|
+
* @param {string} taskArtifactId
|
|
67
|
+
* @param {Chrt.operations.CaseChecksRecordImageAnalysisResultsReq} request
|
|
68
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
69
|
+
*
|
|
70
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* await client.operations.cases.recordImageAnalysisResultsV1("task_artifact_id", {
|
|
74
|
+
* results: {
|
|
75
|
+
* "key": "not_started"
|
|
76
|
+
* }
|
|
77
|
+
* })
|
|
78
|
+
*/
|
|
79
|
+
recordImageAnalysisResultsV1(taskArtifactId, request, requestOptions) {
|
|
80
|
+
return core.HttpResponsePromise.fromPromise(this.__recordImageAnalysisResultsV1(taskArtifactId, request, requestOptions));
|
|
81
|
+
}
|
|
82
|
+
__recordImageAnalysisResultsV1(taskArtifactId, request, requestOptions) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
var _a, _b, _c, _d;
|
|
85
|
+
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);
|
|
86
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
87
|
+
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/checks/record_image_analysis_results/v1/${encodeURIComponent(taskArtifactId)}`),
|
|
88
|
+
method: "POST",
|
|
89
|
+
headers: _headers,
|
|
90
|
+
contentType: "application/json",
|
|
91
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
92
|
+
requestType: "json",
|
|
93
|
+
body: request,
|
|
94
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
95
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
96
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
97
|
+
});
|
|
98
|
+
if (_response.ok) {
|
|
99
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
100
|
+
}
|
|
101
|
+
if (_response.error.reason === "status-code") {
|
|
102
|
+
switch (_response.error.statusCode) {
|
|
103
|
+
case 422:
|
|
104
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
105
|
+
default:
|
|
106
|
+
throw new errors.ChrtError({
|
|
107
|
+
statusCode: _response.error.statusCode,
|
|
108
|
+
body: _response.error.body,
|
|
109
|
+
rawResponse: _response.rawResponse,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
switch (_response.error.reason) {
|
|
114
|
+
case "non-json":
|
|
115
|
+
throw new errors.ChrtError({
|
|
116
|
+
statusCode: _response.error.statusCode,
|
|
117
|
+
body: _response.error.rawBody,
|
|
118
|
+
rawResponse: _response.rawResponse,
|
|
119
|
+
});
|
|
120
|
+
case "timeout":
|
|
121
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/checks/record_image_analysis_results/v1/{task_artifact_id}.");
|
|
122
|
+
case "unknown":
|
|
123
|
+
throw new errors.ChrtError({
|
|
124
|
+
message: _response.error.errorMessage,
|
|
125
|
+
rawResponse: _response.rawResponse,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Adds the Checklist's checks to the Case's enabled_check_keys (deduped) and records the Checklist id. Does not touch existing check runs. Idempotent. | authz: min_org_role=operator | (CaseChecksApplyChecklistReq) -> (bool)
|
|
132
|
+
*
|
|
133
|
+
* @param {string} caseId
|
|
134
|
+
* @param {Chrt.operations.CaseChecksApplyChecklistReq} request
|
|
135
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
136
|
+
*
|
|
137
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* await client.operations.cases.applyChecklistV1("case_id", {
|
|
141
|
+
* checklist_id: "checklist_id"
|
|
142
|
+
* })
|
|
143
|
+
*/
|
|
144
|
+
applyChecklistV1(caseId, request, requestOptions) {
|
|
145
|
+
return core.HttpResponsePromise.fromPromise(this.__applyChecklistV1(caseId, request, requestOptions));
|
|
146
|
+
}
|
|
147
|
+
__applyChecklistV1(caseId, request, requestOptions) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
var _a, _b, _c, _d;
|
|
150
|
+
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);
|
|
151
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
152
|
+
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/checks/apply_checklist/v1/${encodeURIComponent(caseId)}`),
|
|
153
|
+
method: "POST",
|
|
154
|
+
headers: _headers,
|
|
155
|
+
contentType: "application/json",
|
|
156
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
157
|
+
requestType: "json",
|
|
158
|
+
body: request,
|
|
159
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
160
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
161
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
162
|
+
});
|
|
163
|
+
if (_response.ok) {
|
|
164
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
165
|
+
}
|
|
166
|
+
if (_response.error.reason === "status-code") {
|
|
167
|
+
switch (_response.error.statusCode) {
|
|
168
|
+
case 422:
|
|
169
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
170
|
+
default:
|
|
171
|
+
throw new errors.ChrtError({
|
|
172
|
+
statusCode: _response.error.statusCode,
|
|
173
|
+
body: _response.error.body,
|
|
174
|
+
rawResponse: _response.rawResponse,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
switch (_response.error.reason) {
|
|
179
|
+
case "non-json":
|
|
180
|
+
throw new errors.ChrtError({
|
|
181
|
+
statusCode: _response.error.statusCode,
|
|
182
|
+
body: _response.error.rawBody,
|
|
183
|
+
rawResponse: _response.rawResponse,
|
|
184
|
+
});
|
|
185
|
+
case "timeout":
|
|
186
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/checks/apply_checklist/v1/{case_id}.");
|
|
187
|
+
case "unknown":
|
|
188
|
+
throw new errors.ChrtError({
|
|
189
|
+
message: _response.error.errorMessage,
|
|
190
|
+
rawResponse: _response.rawResponse,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Adds a CheckEnum to the Case's disabled_check_keys (operator override). The Checklist that enabled the check stays applied; the workflow's effective set becomes enabled - disabled. Requires the CheckEnum to currently be in enabled_check_keys; otherwise 400. Existing check runs are untouched — operators dismiss them individually if they also want them out of summary counts. | authz: min_org_role=operator | (CaseChecksDisableReq) -> (bool)
|
|
197
|
+
*
|
|
198
|
+
* @param {string} caseId
|
|
199
|
+
* @param {Chrt.CaseChecksDisableReq} request
|
|
200
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
201
|
+
*
|
|
202
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* await client.operations.cases.disableCheckV1("case_id", {
|
|
206
|
+
* check: "shipping.order.placed.order_details_reviewed"
|
|
207
|
+
* })
|
|
208
|
+
*/
|
|
209
|
+
disableCheckV1(caseId, request, requestOptions) {
|
|
210
|
+
return core.HttpResponsePromise.fromPromise(this.__disableCheckV1(caseId, request, requestOptions));
|
|
211
|
+
}
|
|
212
|
+
__disableCheckV1(caseId, request, requestOptions) {
|
|
213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
var _a, _b, _c, _d;
|
|
215
|
+
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);
|
|
216
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
217
|
+
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/checks/disable/v1/${encodeURIComponent(caseId)}`),
|
|
218
|
+
method: "POST",
|
|
219
|
+
headers: _headers,
|
|
220
|
+
contentType: "application/json",
|
|
221
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
222
|
+
requestType: "json",
|
|
223
|
+
body: request,
|
|
224
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
225
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
226
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
227
|
+
});
|
|
228
|
+
if (_response.ok) {
|
|
229
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
230
|
+
}
|
|
231
|
+
if (_response.error.reason === "status-code") {
|
|
232
|
+
switch (_response.error.statusCode) {
|
|
233
|
+
case 422:
|
|
234
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
235
|
+
default:
|
|
236
|
+
throw new errors.ChrtError({
|
|
237
|
+
statusCode: _response.error.statusCode,
|
|
238
|
+
body: _response.error.body,
|
|
239
|
+
rawResponse: _response.rawResponse,
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
switch (_response.error.reason) {
|
|
244
|
+
case "non-json":
|
|
245
|
+
throw new errors.ChrtError({
|
|
246
|
+
statusCode: _response.error.statusCode,
|
|
247
|
+
body: _response.error.rawBody,
|
|
248
|
+
rawResponse: _response.rawResponse,
|
|
249
|
+
});
|
|
250
|
+
case "timeout":
|
|
251
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/checks/disable/v1/{case_id}.");
|
|
252
|
+
case "unknown":
|
|
253
|
+
throw new errors.ChrtError({
|
|
254
|
+
message: _response.error.errorMessage,
|
|
255
|
+
rawResponse: _response.rawResponse,
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Removes a CheckEnum from the Case's disabled_check_keys, restoring it to the workflow's effective set. Inverse of disable. No-op if the CheckEnum isn't currently disabled. | authz: min_org_role=operator | (CaseChecksDisableReq) -> (bool)
|
|
262
|
+
*
|
|
263
|
+
* @param {string} caseId
|
|
264
|
+
* @param {Chrt.CaseChecksDisableReq} request
|
|
265
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
266
|
+
*
|
|
267
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
268
|
+
*
|
|
269
|
+
* @example
|
|
270
|
+
* await client.operations.cases.enableCheckV1("case_id", {
|
|
271
|
+
* check: "shipping.order.placed.order_details_reviewed"
|
|
272
|
+
* })
|
|
273
|
+
*/
|
|
274
|
+
enableCheckV1(caseId, request, requestOptions) {
|
|
275
|
+
return core.HttpResponsePromise.fromPromise(this.__enableCheckV1(caseId, request, requestOptions));
|
|
276
|
+
}
|
|
277
|
+
__enableCheckV1(caseId, request, requestOptions) {
|
|
278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
var _a, _b, _c, _d;
|
|
280
|
+
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);
|
|
281
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
282
|
+
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/checks/enable/v1/${encodeURIComponent(caseId)}`),
|
|
283
|
+
method: "POST",
|
|
284
|
+
headers: _headers,
|
|
285
|
+
contentType: "application/json",
|
|
286
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
287
|
+
requestType: "json",
|
|
288
|
+
body: request,
|
|
289
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
290
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
291
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
292
|
+
});
|
|
293
|
+
if (_response.ok) {
|
|
294
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
295
|
+
}
|
|
296
|
+
if (_response.error.reason === "status-code") {
|
|
297
|
+
switch (_response.error.statusCode) {
|
|
298
|
+
case 422:
|
|
299
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
300
|
+
default:
|
|
301
|
+
throw new errors.ChrtError({
|
|
302
|
+
statusCode: _response.error.statusCode,
|
|
303
|
+
body: _response.error.body,
|
|
304
|
+
rawResponse: _response.rawResponse,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
switch (_response.error.reason) {
|
|
309
|
+
case "non-json":
|
|
310
|
+
throw new errors.ChrtError({
|
|
311
|
+
statusCode: _response.error.statusCode,
|
|
312
|
+
body: _response.error.rawBody,
|
|
313
|
+
rawResponse: _response.rawResponse,
|
|
314
|
+
});
|
|
315
|
+
case "timeout":
|
|
316
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/checks/enable/v1/{case_id}.");
|
|
317
|
+
case "unknown":
|
|
318
|
+
throw new errors.ChrtError({
|
|
319
|
+
message: _response.error.errorMessage,
|
|
320
|
+
rawResponse: _response.rawResponse,
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Transitions one (check, entity_id) Check1 to status=DISMISSED. Does not affect other runs of the same check on different entity_ids. | authz: min_org_role=operator | (CaseChecksDismissReq) -> (bool)
|
|
327
|
+
*
|
|
328
|
+
* @param {string} caseId
|
|
329
|
+
* @param {Chrt.CaseChecksDismissReq} request
|
|
330
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
331
|
+
*
|
|
332
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* await client.operations.cases.dismissCheckV1("case_id", {
|
|
336
|
+
* check: "shipping.order.placed.order_details_reviewed",
|
|
337
|
+
* entity_id: "entity_id"
|
|
338
|
+
* })
|
|
339
|
+
*/
|
|
340
|
+
dismissCheckV1(caseId, request, requestOptions) {
|
|
341
|
+
return core.HttpResponsePromise.fromPromise(this.__dismissCheckV1(caseId, request, requestOptions));
|
|
342
|
+
}
|
|
343
|
+
__dismissCheckV1(caseId, request, requestOptions) {
|
|
344
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
345
|
+
var _a, _b, _c, _d;
|
|
346
|
+
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);
|
|
347
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
348
|
+
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/checks/dismiss/v1/${encodeURIComponent(caseId)}`),
|
|
349
|
+
method: "POST",
|
|
350
|
+
headers: _headers,
|
|
351
|
+
contentType: "application/json",
|
|
352
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
353
|
+
requestType: "json",
|
|
354
|
+
body: request,
|
|
355
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
356
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
357
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
358
|
+
});
|
|
359
|
+
if (_response.ok) {
|
|
360
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
361
|
+
}
|
|
362
|
+
if (_response.error.reason === "status-code") {
|
|
363
|
+
switch (_response.error.statusCode) {
|
|
364
|
+
case 422:
|
|
365
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
366
|
+
default:
|
|
367
|
+
throw new errors.ChrtError({
|
|
368
|
+
statusCode: _response.error.statusCode,
|
|
369
|
+
body: _response.error.body,
|
|
370
|
+
rawResponse: _response.rawResponse,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
switch (_response.error.reason) {
|
|
375
|
+
case "non-json":
|
|
376
|
+
throw new errors.ChrtError({
|
|
377
|
+
statusCode: _response.error.statusCode,
|
|
378
|
+
body: _response.error.rawBody,
|
|
379
|
+
rawResponse: _response.rawResponse,
|
|
380
|
+
});
|
|
381
|
+
case "timeout":
|
|
382
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/checks/dismiss/v1/{case_id}.");
|
|
383
|
+
case "unknown":
|
|
384
|
+
throw new errors.ChrtError({
|
|
385
|
+
message: _response.error.errorMessage,
|
|
386
|
+
rawResponse: _response.rawResponse,
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Transitions a DISMISSED (check, entity_id) Check1 back to NOT_STARTED so the next matching event re-evaluates it. No-op if not currently DISMISSED. | authz: min_org_role=operator | (CaseChecksDismissReq) -> (bool)
|
|
393
|
+
*
|
|
394
|
+
* @param {string} caseId
|
|
395
|
+
* @param {Chrt.CaseChecksDismissReq} request
|
|
396
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
397
|
+
*
|
|
398
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
399
|
+
*
|
|
400
|
+
* @example
|
|
401
|
+
* await client.operations.cases.undismissCheckV1("case_id", {
|
|
402
|
+
* check: "shipping.order.placed.order_details_reviewed",
|
|
403
|
+
* entity_id: "entity_id"
|
|
404
|
+
* })
|
|
405
|
+
*/
|
|
406
|
+
undismissCheckV1(caseId, request, requestOptions) {
|
|
407
|
+
return core.HttpResponsePromise.fromPromise(this.__undismissCheckV1(caseId, request, requestOptions));
|
|
408
|
+
}
|
|
409
|
+
__undismissCheckV1(caseId, request, requestOptions) {
|
|
410
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
411
|
+
var _a, _b, _c, _d;
|
|
412
|
+
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);
|
|
413
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
414
|
+
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/checks/undismiss/v1/${encodeURIComponent(caseId)}`),
|
|
415
|
+
method: "POST",
|
|
416
|
+
headers: _headers,
|
|
417
|
+
contentType: "application/json",
|
|
418
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
419
|
+
requestType: "json",
|
|
420
|
+
body: request,
|
|
421
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
422
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
423
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
424
|
+
});
|
|
425
|
+
if (_response.ok) {
|
|
426
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
427
|
+
}
|
|
428
|
+
if (_response.error.reason === "status-code") {
|
|
429
|
+
switch (_response.error.statusCode) {
|
|
430
|
+
case 422:
|
|
431
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
432
|
+
default:
|
|
433
|
+
throw new errors.ChrtError({
|
|
434
|
+
statusCode: _response.error.statusCode,
|
|
435
|
+
body: _response.error.body,
|
|
436
|
+
rawResponse: _response.rawResponse,
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
switch (_response.error.reason) {
|
|
441
|
+
case "non-json":
|
|
442
|
+
throw new errors.ChrtError({
|
|
443
|
+
statusCode: _response.error.statusCode,
|
|
444
|
+
body: _response.error.rawBody,
|
|
445
|
+
rawResponse: _response.rawResponse,
|
|
446
|
+
});
|
|
447
|
+
case "timeout":
|
|
448
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/checks/undismiss/v1/{case_id}.");
|
|
449
|
+
case "unknown":
|
|
450
|
+
throw new errors.ChrtError({
|
|
451
|
+
message: _response.error.errorMessage,
|
|
452
|
+
rawResponse: _response.rawResponse,
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
}
|
|
63
457
|
/**
|
|
64
458
|
* Lists cases for the caller's organization with filtering, sorting, and pagination. | authz: min_org_role=operator | () -> (CaseListRes)
|
|
65
459
|
*
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
* results: {
|
|
9
|
+
* "key": "not_started"
|
|
10
|
+
* }
|
|
11
|
+
* }
|
|
12
|
+
*/
|
|
13
|
+
export interface CaseChecksRecordImageAnalysisResultsReq {
|
|
14
|
+
results: Record<string, Chrt.CheckStatusEnum>;
|
|
15
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { type CaseChecksRecordImageAnalysisResultsReq } from "./CaseChecksRecordImageAnalysisResultsReq.js";
|
|
2
|
+
export { type CaseChecksApplyChecklistReq } from "./CaseChecksApplyChecklistReq.js";
|
|
1
3
|
export { type CasesListV1Request } from "./CasesListV1Request.js";
|
|
2
4
|
export { type CaseClientUpdate1 } from "./CaseClientUpdate1.js";
|
|
3
5
|
export { type CaseNeedsActionReq } from "./CaseNeedsActionReq.js";
|