@chrt-inc/typescript-sdk 1.692.0 → 1.704.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/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/resources/tracking/resources/sessions/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +17 -5
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.d.ts +9 -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/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/Session1.d.ts +2 -0
- package/dist/cjs/api/types/SessionSortByEnum.d.ts +2 -1
- package/dist/cjs/api/types/SessionSortByEnum.js +1 -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/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/resources/tracking/resources/sessions/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +17 -5
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.d.mts +9 -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/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/Session1.d.mts +2 -0
- package/dist/esm/api/types/SessionSortByEnum.d.mts +2 -1
- package/dist/esm/api/types/SessionSortByEnum.mjs +1 -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 +1829 -153
|
@@ -24,6 +24,400 @@ export class Cases {
|
|
|
24
24
|
var _a;
|
|
25
25
|
return ((_a = this._s3Objects) !== null && _a !== void 0 ? _a : (this._s3Objects = new S3Objects(this._options)));
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* 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)
|
|
29
|
+
*
|
|
30
|
+
* @param {string} taskArtifactId
|
|
31
|
+
* @param {Chrt.operations.CaseChecksRecordImageAnalysisResultsReq} request
|
|
32
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
|
+
*
|
|
34
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* await client.operations.cases.recordImageAnalysisResultsV1("task_artifact_id", {
|
|
38
|
+
* results: {
|
|
39
|
+
* "key": "not_started"
|
|
40
|
+
* }
|
|
41
|
+
* })
|
|
42
|
+
*/
|
|
43
|
+
recordImageAnalysisResultsV1(taskArtifactId, request, requestOptions) {
|
|
44
|
+
return core.HttpResponsePromise.fromPromise(this.__recordImageAnalysisResultsV1(taskArtifactId, request, requestOptions));
|
|
45
|
+
}
|
|
46
|
+
__recordImageAnalysisResultsV1(taskArtifactId, request, requestOptions) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
var _a, _b, _c, _d;
|
|
49
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
50
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
51
|
+
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)}`),
|
|
52
|
+
method: "POST",
|
|
53
|
+
headers: _headers,
|
|
54
|
+
contentType: "application/json",
|
|
55
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
56
|
+
requestType: "json",
|
|
57
|
+
body: request,
|
|
58
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
59
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
60
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
61
|
+
});
|
|
62
|
+
if (_response.ok) {
|
|
63
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
64
|
+
}
|
|
65
|
+
if (_response.error.reason === "status-code") {
|
|
66
|
+
switch (_response.error.statusCode) {
|
|
67
|
+
case 422:
|
|
68
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
69
|
+
default:
|
|
70
|
+
throw new errors.ChrtError({
|
|
71
|
+
statusCode: _response.error.statusCode,
|
|
72
|
+
body: _response.error.body,
|
|
73
|
+
rawResponse: _response.rawResponse,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
switch (_response.error.reason) {
|
|
78
|
+
case "non-json":
|
|
79
|
+
throw new errors.ChrtError({
|
|
80
|
+
statusCode: _response.error.statusCode,
|
|
81
|
+
body: _response.error.rawBody,
|
|
82
|
+
rawResponse: _response.rawResponse,
|
|
83
|
+
});
|
|
84
|
+
case "timeout":
|
|
85
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/checks/record_image_analysis_results/v1/{task_artifact_id}.");
|
|
86
|
+
case "unknown":
|
|
87
|
+
throw new errors.ChrtError({
|
|
88
|
+
message: _response.error.errorMessage,
|
|
89
|
+
rawResponse: _response.rawResponse,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* 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)
|
|
96
|
+
*
|
|
97
|
+
* @param {string} caseId
|
|
98
|
+
* @param {Chrt.operations.CaseChecksApplyChecklistReq} request
|
|
99
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
100
|
+
*
|
|
101
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* await client.operations.cases.applyChecklistV1("case_id", {
|
|
105
|
+
* checklist_id: "checklist_id"
|
|
106
|
+
* })
|
|
107
|
+
*/
|
|
108
|
+
applyChecklistV1(caseId, request, requestOptions) {
|
|
109
|
+
return core.HttpResponsePromise.fromPromise(this.__applyChecklistV1(caseId, request, requestOptions));
|
|
110
|
+
}
|
|
111
|
+
__applyChecklistV1(caseId, request, requestOptions) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
var _a, _b, _c, _d;
|
|
114
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
115
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
116
|
+
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)}`),
|
|
117
|
+
method: "POST",
|
|
118
|
+
headers: _headers,
|
|
119
|
+
contentType: "application/json",
|
|
120
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
121
|
+
requestType: "json",
|
|
122
|
+
body: request,
|
|
123
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
124
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
125
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
126
|
+
});
|
|
127
|
+
if (_response.ok) {
|
|
128
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
129
|
+
}
|
|
130
|
+
if (_response.error.reason === "status-code") {
|
|
131
|
+
switch (_response.error.statusCode) {
|
|
132
|
+
case 422:
|
|
133
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
134
|
+
default:
|
|
135
|
+
throw new errors.ChrtError({
|
|
136
|
+
statusCode: _response.error.statusCode,
|
|
137
|
+
body: _response.error.body,
|
|
138
|
+
rawResponse: _response.rawResponse,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
switch (_response.error.reason) {
|
|
143
|
+
case "non-json":
|
|
144
|
+
throw new errors.ChrtError({
|
|
145
|
+
statusCode: _response.error.statusCode,
|
|
146
|
+
body: _response.error.rawBody,
|
|
147
|
+
rawResponse: _response.rawResponse,
|
|
148
|
+
});
|
|
149
|
+
case "timeout":
|
|
150
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/checks/apply_checklist/v1/{case_id}.");
|
|
151
|
+
case "unknown":
|
|
152
|
+
throw new errors.ChrtError({
|
|
153
|
+
message: _response.error.errorMessage,
|
|
154
|
+
rawResponse: _response.rawResponse,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* 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)
|
|
161
|
+
*
|
|
162
|
+
* @param {string} caseId
|
|
163
|
+
* @param {Chrt.CaseChecksDisableReq} request
|
|
164
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
165
|
+
*
|
|
166
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* await client.operations.cases.disableCheckV1("case_id", {
|
|
170
|
+
* check: "shipping.order.placed.order_details_reviewed"
|
|
171
|
+
* })
|
|
172
|
+
*/
|
|
173
|
+
disableCheckV1(caseId, request, requestOptions) {
|
|
174
|
+
return core.HttpResponsePromise.fromPromise(this.__disableCheckV1(caseId, request, requestOptions));
|
|
175
|
+
}
|
|
176
|
+
__disableCheckV1(caseId, request, requestOptions) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
var _a, _b, _c, _d;
|
|
179
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
180
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
181
|
+
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)}`),
|
|
182
|
+
method: "POST",
|
|
183
|
+
headers: _headers,
|
|
184
|
+
contentType: "application/json",
|
|
185
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
186
|
+
requestType: "json",
|
|
187
|
+
body: request,
|
|
188
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
189
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
190
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
191
|
+
});
|
|
192
|
+
if (_response.ok) {
|
|
193
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
194
|
+
}
|
|
195
|
+
if (_response.error.reason === "status-code") {
|
|
196
|
+
switch (_response.error.statusCode) {
|
|
197
|
+
case 422:
|
|
198
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
199
|
+
default:
|
|
200
|
+
throw new errors.ChrtError({
|
|
201
|
+
statusCode: _response.error.statusCode,
|
|
202
|
+
body: _response.error.body,
|
|
203
|
+
rawResponse: _response.rawResponse,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
switch (_response.error.reason) {
|
|
208
|
+
case "non-json":
|
|
209
|
+
throw new errors.ChrtError({
|
|
210
|
+
statusCode: _response.error.statusCode,
|
|
211
|
+
body: _response.error.rawBody,
|
|
212
|
+
rawResponse: _response.rawResponse,
|
|
213
|
+
});
|
|
214
|
+
case "timeout":
|
|
215
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/checks/disable/v1/{case_id}.");
|
|
216
|
+
case "unknown":
|
|
217
|
+
throw new errors.ChrtError({
|
|
218
|
+
message: _response.error.errorMessage,
|
|
219
|
+
rawResponse: _response.rawResponse,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* 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)
|
|
226
|
+
*
|
|
227
|
+
* @param {string} caseId
|
|
228
|
+
* @param {Chrt.CaseChecksDisableReq} request
|
|
229
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
230
|
+
*
|
|
231
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* await client.operations.cases.enableCheckV1("case_id", {
|
|
235
|
+
* check: "shipping.order.placed.order_details_reviewed"
|
|
236
|
+
* })
|
|
237
|
+
*/
|
|
238
|
+
enableCheckV1(caseId, request, requestOptions) {
|
|
239
|
+
return core.HttpResponsePromise.fromPromise(this.__enableCheckV1(caseId, request, requestOptions));
|
|
240
|
+
}
|
|
241
|
+
__enableCheckV1(caseId, request, requestOptions) {
|
|
242
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
243
|
+
var _a, _b, _c, _d;
|
|
244
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
245
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
246
|
+
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)}`),
|
|
247
|
+
method: "POST",
|
|
248
|
+
headers: _headers,
|
|
249
|
+
contentType: "application/json",
|
|
250
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
251
|
+
requestType: "json",
|
|
252
|
+
body: request,
|
|
253
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
254
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
255
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
256
|
+
});
|
|
257
|
+
if (_response.ok) {
|
|
258
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
259
|
+
}
|
|
260
|
+
if (_response.error.reason === "status-code") {
|
|
261
|
+
switch (_response.error.statusCode) {
|
|
262
|
+
case 422:
|
|
263
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
264
|
+
default:
|
|
265
|
+
throw new errors.ChrtError({
|
|
266
|
+
statusCode: _response.error.statusCode,
|
|
267
|
+
body: _response.error.body,
|
|
268
|
+
rawResponse: _response.rawResponse,
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
switch (_response.error.reason) {
|
|
273
|
+
case "non-json":
|
|
274
|
+
throw new errors.ChrtError({
|
|
275
|
+
statusCode: _response.error.statusCode,
|
|
276
|
+
body: _response.error.rawBody,
|
|
277
|
+
rawResponse: _response.rawResponse,
|
|
278
|
+
});
|
|
279
|
+
case "timeout":
|
|
280
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/checks/enable/v1/{case_id}.");
|
|
281
|
+
case "unknown":
|
|
282
|
+
throw new errors.ChrtError({
|
|
283
|
+
message: _response.error.errorMessage,
|
|
284
|
+
rawResponse: _response.rawResponse,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* 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)
|
|
291
|
+
*
|
|
292
|
+
* @param {string} caseId
|
|
293
|
+
* @param {Chrt.CaseChecksDismissReq} request
|
|
294
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
295
|
+
*
|
|
296
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* await client.operations.cases.dismissCheckV1("case_id", {
|
|
300
|
+
* check: "shipping.order.placed.order_details_reviewed",
|
|
301
|
+
* entity_id: "entity_id"
|
|
302
|
+
* })
|
|
303
|
+
*/
|
|
304
|
+
dismissCheckV1(caseId, request, requestOptions) {
|
|
305
|
+
return core.HttpResponsePromise.fromPromise(this.__dismissCheckV1(caseId, request, requestOptions));
|
|
306
|
+
}
|
|
307
|
+
__dismissCheckV1(caseId, request, requestOptions) {
|
|
308
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
309
|
+
var _a, _b, _c, _d;
|
|
310
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
311
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
312
|
+
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)}`),
|
|
313
|
+
method: "POST",
|
|
314
|
+
headers: _headers,
|
|
315
|
+
contentType: "application/json",
|
|
316
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
317
|
+
requestType: "json",
|
|
318
|
+
body: request,
|
|
319
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
320
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
321
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
322
|
+
});
|
|
323
|
+
if (_response.ok) {
|
|
324
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
325
|
+
}
|
|
326
|
+
if (_response.error.reason === "status-code") {
|
|
327
|
+
switch (_response.error.statusCode) {
|
|
328
|
+
case 422:
|
|
329
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
330
|
+
default:
|
|
331
|
+
throw new errors.ChrtError({
|
|
332
|
+
statusCode: _response.error.statusCode,
|
|
333
|
+
body: _response.error.body,
|
|
334
|
+
rawResponse: _response.rawResponse,
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
switch (_response.error.reason) {
|
|
339
|
+
case "non-json":
|
|
340
|
+
throw new errors.ChrtError({
|
|
341
|
+
statusCode: _response.error.statusCode,
|
|
342
|
+
body: _response.error.rawBody,
|
|
343
|
+
rawResponse: _response.rawResponse,
|
|
344
|
+
});
|
|
345
|
+
case "timeout":
|
|
346
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/checks/dismiss/v1/{case_id}.");
|
|
347
|
+
case "unknown":
|
|
348
|
+
throw new errors.ChrtError({
|
|
349
|
+
message: _response.error.errorMessage,
|
|
350
|
+
rawResponse: _response.rawResponse,
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* 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)
|
|
357
|
+
*
|
|
358
|
+
* @param {string} caseId
|
|
359
|
+
* @param {Chrt.CaseChecksDismissReq} request
|
|
360
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
361
|
+
*
|
|
362
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
363
|
+
*
|
|
364
|
+
* @example
|
|
365
|
+
* await client.operations.cases.undismissCheckV1("case_id", {
|
|
366
|
+
* check: "shipping.order.placed.order_details_reviewed",
|
|
367
|
+
* entity_id: "entity_id"
|
|
368
|
+
* })
|
|
369
|
+
*/
|
|
370
|
+
undismissCheckV1(caseId, request, requestOptions) {
|
|
371
|
+
return core.HttpResponsePromise.fromPromise(this.__undismissCheckV1(caseId, request, requestOptions));
|
|
372
|
+
}
|
|
373
|
+
__undismissCheckV1(caseId, request, requestOptions) {
|
|
374
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
375
|
+
var _a, _b, _c, _d;
|
|
376
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
377
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
378
|
+
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)}`),
|
|
379
|
+
method: "POST",
|
|
380
|
+
headers: _headers,
|
|
381
|
+
contentType: "application/json",
|
|
382
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
383
|
+
requestType: "json",
|
|
384
|
+
body: request,
|
|
385
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
386
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
387
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
388
|
+
});
|
|
389
|
+
if (_response.ok) {
|
|
390
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
391
|
+
}
|
|
392
|
+
if (_response.error.reason === "status-code") {
|
|
393
|
+
switch (_response.error.statusCode) {
|
|
394
|
+
case 422:
|
|
395
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
396
|
+
default:
|
|
397
|
+
throw new errors.ChrtError({
|
|
398
|
+
statusCode: _response.error.statusCode,
|
|
399
|
+
body: _response.error.body,
|
|
400
|
+
rawResponse: _response.rawResponse,
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
switch (_response.error.reason) {
|
|
405
|
+
case "non-json":
|
|
406
|
+
throw new errors.ChrtError({
|
|
407
|
+
statusCode: _response.error.statusCode,
|
|
408
|
+
body: _response.error.rawBody,
|
|
409
|
+
rawResponse: _response.rawResponse,
|
|
410
|
+
});
|
|
411
|
+
case "timeout":
|
|
412
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/checks/undismiss/v1/{case_id}.");
|
|
413
|
+
case "unknown":
|
|
414
|
+
throw new errors.ChrtError({
|
|
415
|
+
message: _response.error.errorMessage,
|
|
416
|
+
rawResponse: _response.rawResponse,
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
}
|
|
27
421
|
/**
|
|
28
422
|
* Lists cases for the caller's organization with filtering, sorting, and pagination. | authz: min_org_role=operator | () -> (CaseListRes)
|
|
29
423
|
*
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.mjs";
|
|
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.mjs";
|
|
2
|
+
export { type CaseChecksApplyChecklistReq } from "./CaseChecksApplyChecklistReq.mjs";
|
|
1
3
|
export { type CasesListV1Request } from "./CasesListV1Request.mjs";
|
|
2
4
|
export { type CaseClientUpdate1 } from "./CaseClientUpdate1.mjs";
|
|
3
5
|
export { type CaseNeedsActionReq } from "./CaseNeedsActionReq.mjs";
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
5
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
6
|
+
import * as Chrt from "../../../../../index.mjs";
|
|
7
|
+
export declare namespace Checklists {
|
|
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 Checklists {
|
|
31
|
+
protected readonly _options: Checklists.Options;
|
|
32
|
+
constructor(_options?: Checklists.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Lists Checklists for the caller's organization with filtering, sorting, and pagination. | authz: min_org_role=operator | () -> (ChecklistListRes)
|
|
35
|
+
*
|
|
36
|
+
* @param {Chrt.operations.ChecklistsListV1Request} request
|
|
37
|
+
* @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.operations.checklists.listV1({
|
|
43
|
+
* sort_by: "created_at_timestamp",
|
|
44
|
+
* sort_order: "asc",
|
|
45
|
+
* page: 1,
|
|
46
|
+
* page_size: 1,
|
|
47
|
+
* filter_archived: true
|
|
48
|
+
* })
|
|
49
|
+
*/
|
|
50
|
+
listV1(request?: Chrt.operations.ChecklistsListV1Request, requestOptions?: Checklists.RequestOptions): core.HttpResponsePromise<Chrt.ChecklistListRes>;
|
|
51
|
+
private __listV1;
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves a single Checklist by id. | authz: min_org_role=operator | () -> (Checklist1)
|
|
54
|
+
*
|
|
55
|
+
* @param {string} checklistId
|
|
56
|
+
* @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
+
*
|
|
58
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* await client.operations.checklists.getV1("checklist_id")
|
|
62
|
+
*/
|
|
63
|
+
getV1(checklistId: string, requestOptions?: Checklists.RequestOptions): core.HttpResponsePromise<Chrt.Checklist1>;
|
|
64
|
+
private __getV1;
|
|
65
|
+
/**
|
|
66
|
+
* Updates scalar fields (name, description) on a Checklist. | authz: min_org_role=operator | (ChecklistClientUpdate1) -> (bool)
|
|
67
|
+
*
|
|
68
|
+
* @param {string} checklistId
|
|
69
|
+
* @param {Chrt.operations.ChecklistClientUpdate1} request
|
|
70
|
+
* @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* await client.operations.checklists.updateV1("checklist_id")
|
|
76
|
+
*/
|
|
77
|
+
updateV1(checklistId: string, request?: Chrt.operations.ChecklistClientUpdate1, requestOptions?: Checklists.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
78
|
+
private __updateV1;
|
|
79
|
+
/**
|
|
80
|
+
* Creates a new Checklist for the caller's organization. | authz: min_org_role=operator | (ChecklistClientCreate1) -> (PydanticObjectId)
|
|
81
|
+
*
|
|
82
|
+
* @param {Chrt.operations.ChecklistClientCreate1} request
|
|
83
|
+
* @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
|
|
84
|
+
*
|
|
85
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* await client.operations.checklists.createV1({
|
|
89
|
+
* schema_version: 1,
|
|
90
|
+
* name: "name"
|
|
91
|
+
* })
|
|
92
|
+
*/
|
|
93
|
+
createV1(request: Chrt.operations.ChecklistClientCreate1, requestOptions?: Checklists.RequestOptions): core.HttpResponsePromise<string>;
|
|
94
|
+
private __createV1;
|
|
95
|
+
/**
|
|
96
|
+
* Adds checks to a Checklist. Idempotent for identical checks. | authz: min_org_role=operator | (ChecklistChecksAdd1) -> (bool)
|
|
97
|
+
*
|
|
98
|
+
* @param {string} checklistId
|
|
99
|
+
* @param {Chrt.operations.ChecklistChecksAdd1} request
|
|
100
|
+
* @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
|
|
101
|
+
*
|
|
102
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* await client.operations.checklists.addChecksV1("checklist_id")
|
|
106
|
+
*/
|
|
107
|
+
addChecksV1(checklistId: string, request?: Chrt.operations.ChecklistChecksAdd1, requestOptions?: Checklists.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
108
|
+
private __addChecksV1;
|
|
109
|
+
/**
|
|
110
|
+
* Removes entries from a Checklist's `checks` list by CheckEnum. | authz: min_org_role=operator | (ChecklistChecksRemove1) -> (bool)
|
|
111
|
+
*
|
|
112
|
+
* @param {string} checklistId
|
|
113
|
+
* @param {Chrt.operations.ChecklistChecksRemove1} request
|
|
114
|
+
* @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
|
|
115
|
+
*
|
|
116
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* await client.operations.checklists.removeChecksV1("checklist_id")
|
|
120
|
+
*/
|
|
121
|
+
removeChecksV1(checklistId: string, request?: Chrt.operations.ChecklistChecksRemove1, requestOptions?: Checklists.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
122
|
+
private __removeChecksV1;
|
|
123
|
+
/**
|
|
124
|
+
* Soft-deletes a Checklist by setting `archived=True`. Existing Cases that applied this Checklist are unaffected (copy-on-write). | authz: min_org_role=operator | () -> (bool)
|
|
125
|
+
*
|
|
126
|
+
* @param {string} checklistId
|
|
127
|
+
* @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
|
|
128
|
+
*
|
|
129
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* await client.operations.checklists.archiveV1("checklist_id")
|
|
133
|
+
*/
|
|
134
|
+
archiveV1(checklistId: string, requestOptions?: Checklists.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
135
|
+
private __archiveV1;
|
|
136
|
+
/**
|
|
137
|
+
* Restores an archived Checklist by setting `archived=False`. | authz: min_org_role=operator | () -> (bool)
|
|
138
|
+
*
|
|
139
|
+
* @param {string} checklistId
|
|
140
|
+
* @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
|
|
141
|
+
*
|
|
142
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* await client.operations.checklists.unarchiveV1("checklist_id")
|
|
146
|
+
*/
|
|
147
|
+
unarchiveV1(checklistId: string, requestOptions?: Checklists.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
148
|
+
private __unarchiveV1;
|
|
149
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
150
|
+
}
|