@chrt-inc/typescript-sdk 1.692.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.
Files changed (174) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/operations/client/Client.d.ts +6 -0
  3. package/dist/cjs/api/resources/operations/client/Client.js +12 -2
  4. package/dist/cjs/api/resources/operations/resources/cases/client/Client.d.ts +100 -0
  5. package/dist/cjs/api/resources/operations/resources/cases/client/Client.js +394 -0
  6. package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseChecksApplyChecklistReq.d.ts +12 -0
  7. package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseChecksApplyChecklistReq.js +5 -0
  8. package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseChecksRecordImageAnalysisResultsReq.d.ts +15 -0
  9. package/dist/cjs/api/resources/operations/resources/cases/client/requests/CaseChecksRecordImageAnalysisResultsReq.js +5 -0
  10. package/dist/cjs/api/resources/operations/resources/cases/client/requests/index.d.ts +2 -0
  11. package/dist/cjs/api/resources/operations/resources/checklists/client/Client.d.ts +150 -0
  12. package/dist/cjs/api/resources/operations/resources/checklists/client/Client.js +581 -0
  13. package/dist/cjs/api/resources/operations/resources/checklists/client/index.d.ts +2 -0
  14. package/dist/cjs/api/resources/operations/resources/checklists/client/index.js +17 -0
  15. package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistChecksAdd1.d.ts +11 -0
  16. package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistChecksAdd1.js +5 -0
  17. package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistChecksRemove1.d.ts +11 -0
  18. package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistChecksRemove1.js +5 -0
  19. package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistClientCreate1.d.ts +17 -0
  20. package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistClientCreate1.js +5 -0
  21. package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistClientUpdate1.d.ts +12 -0
  22. package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistClientUpdate1.js +5 -0
  23. package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistsListV1Request.d.ts +24 -0
  24. package/dist/cjs/api/resources/operations/resources/checklists/client/requests/ChecklistsListV1Request.js +5 -0
  25. package/dist/cjs/api/resources/operations/resources/checklists/client/requests/index.d.ts +5 -0
  26. package/dist/cjs/api/resources/operations/resources/checklists/client/requests/index.js +2 -0
  27. package/dist/cjs/api/resources/operations/resources/checklists/index.d.ts +1 -0
  28. package/dist/cjs/api/resources/operations/resources/checklists/index.js +17 -0
  29. package/dist/cjs/api/resources/operations/resources/index.d.ts +4 -0
  30. package/dist/cjs/api/resources/operations/resources/index.js +5 -1
  31. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/Client.d.ts +170 -0
  32. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/Client.js +653 -0
  33. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/index.d.ts +2 -0
  34. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/index.js +17 -0
  35. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskAddCommentReq1.d.ts +12 -0
  36. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskAddCommentReq1.js +5 -0
  37. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientCreate1.d.ts +19 -0
  38. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientCreate1.js +5 -0
  39. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientUpdate1.d.ts +12 -0
  40. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientUpdate1.js +5 -0
  41. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksListV1Request.d.ts +33 -0
  42. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksListV1Request.js +5 -0
  43. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/index.d.ts +4 -0
  44. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/index.js +2 -0
  45. package/dist/cjs/api/resources/operations/resources/operationsTasks/index.d.ts +1 -0
  46. package/dist/cjs/api/resources/operations/resources/operationsTasks/index.js +17 -0
  47. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.ts +26 -0
  48. package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.js +75 -0
  49. package/dist/cjs/api/types/AiImageDescription.d.ts +30 -0
  50. package/dist/cjs/api/types/AiImageDescription.js +5 -0
  51. package/dist/cjs/api/types/Case1.d.ts +4 -0
  52. package/dist/cjs/api/types/CaseChecksDisableReq.d.ts +7 -0
  53. package/dist/cjs/api/types/CaseChecksDisableReq.js +5 -0
  54. package/dist/cjs/api/types/CaseChecksDismissReq.d.ts +8 -0
  55. package/dist/cjs/api/types/CaseChecksDismissReq.js +5 -0
  56. package/dist/cjs/api/types/CaseChecksSummary1.d.ts +27 -0
  57. package/dist/cjs/api/types/CaseChecksSummary1.js +5 -0
  58. package/dist/cjs/api/types/Check1.d.ts +33 -0
  59. package/dist/cjs/api/types/Check1.js +5 -0
  60. package/dist/cjs/api/types/CheckEnum.d.ts +46 -0
  61. package/dist/cjs/api/types/CheckEnum.js +23 -0
  62. package/dist/cjs/api/types/CheckStatusEnum.d.ts +32 -0
  63. package/dist/cjs/api/types/CheckStatusEnum.js +15 -0
  64. package/dist/cjs/api/types/Checklist1.d.ts +18 -0
  65. package/dist/cjs/api/types/Checklist1.js +5 -0
  66. package/dist/cjs/api/types/ChecklistCheck1.d.ts +15 -0
  67. package/dist/cjs/api/types/ChecklistCheck1.js +5 -0
  68. package/dist/cjs/api/types/ChecklistListRes.d.ts +8 -0
  69. package/dist/cjs/api/types/ChecklistListRes.js +5 -0
  70. package/dist/cjs/api/types/ChecklistSortByEnum.d.ts +9 -0
  71. package/dist/cjs/api/types/ChecklistSortByEnum.js +11 -0
  72. package/dist/cjs/api/types/LlmModelEnum.d.ts +12 -0
  73. package/dist/cjs/api/types/LlmModelEnum.js +14 -0
  74. package/dist/cjs/api/types/OperationsTask1.d.ts +19 -0
  75. package/dist/cjs/api/types/OperationsTask1.js +5 -0
  76. package/dist/cjs/api/types/OperationsTaskComment1.d.ts +10 -0
  77. package/dist/cjs/api/types/OperationsTaskComment1.js +5 -0
  78. package/dist/cjs/api/types/OperationsTaskListRes.d.ts +8 -0
  79. package/dist/cjs/api/types/OperationsTaskListRes.js +5 -0
  80. package/dist/cjs/api/types/OperationsTaskSortByEnum.d.ts +8 -0
  81. package/dist/cjs/api/types/OperationsTaskSortByEnum.js +10 -0
  82. package/dist/cjs/api/types/TaskArtifactS3ObjectMetadata1.d.ts +2 -0
  83. package/dist/cjs/api/types/index.d.ts +16 -0
  84. package/dist/cjs/api/types/index.js +16 -0
  85. package/dist/cjs/version.d.ts +1 -1
  86. package/dist/cjs/version.js +1 -1
  87. package/dist/esm/Client.mjs +2 -2
  88. package/dist/esm/api/resources/operations/client/Client.d.mts +6 -0
  89. package/dist/esm/api/resources/operations/client/Client.mjs +10 -0
  90. package/dist/esm/api/resources/operations/resources/cases/client/Client.d.mts +100 -0
  91. package/dist/esm/api/resources/operations/resources/cases/client/Client.mjs +394 -0
  92. package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseChecksApplyChecklistReq.d.mts +12 -0
  93. package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseChecksApplyChecklistReq.mjs +4 -0
  94. package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseChecksRecordImageAnalysisResultsReq.d.mts +15 -0
  95. package/dist/esm/api/resources/operations/resources/cases/client/requests/CaseChecksRecordImageAnalysisResultsReq.mjs +4 -0
  96. package/dist/esm/api/resources/operations/resources/cases/client/requests/index.d.mts +2 -0
  97. package/dist/esm/api/resources/operations/resources/checklists/client/Client.d.mts +150 -0
  98. package/dist/esm/api/resources/operations/resources/checklists/client/Client.mjs +544 -0
  99. package/dist/esm/api/resources/operations/resources/checklists/client/index.d.mts +2 -0
  100. package/dist/esm/api/resources/operations/resources/checklists/client/index.mjs +1 -0
  101. package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistChecksAdd1.d.mts +11 -0
  102. package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistChecksAdd1.mjs +4 -0
  103. package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistChecksRemove1.d.mts +11 -0
  104. package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistChecksRemove1.mjs +4 -0
  105. package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistClientCreate1.d.mts +17 -0
  106. package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistClientCreate1.mjs +4 -0
  107. package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistClientUpdate1.d.mts +12 -0
  108. package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistClientUpdate1.mjs +4 -0
  109. package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistsListV1Request.d.mts +24 -0
  110. package/dist/esm/api/resources/operations/resources/checklists/client/requests/ChecklistsListV1Request.mjs +4 -0
  111. package/dist/esm/api/resources/operations/resources/checklists/client/requests/index.d.mts +5 -0
  112. package/dist/esm/api/resources/operations/resources/checklists/client/requests/index.mjs +1 -0
  113. package/dist/esm/api/resources/operations/resources/checklists/index.d.mts +1 -0
  114. package/dist/esm/api/resources/operations/resources/checklists/index.mjs +1 -0
  115. package/dist/esm/api/resources/operations/resources/index.d.mts +4 -0
  116. package/dist/esm/api/resources/operations/resources/index.mjs +4 -0
  117. package/dist/esm/api/resources/operations/resources/operationsTasks/client/Client.d.mts +170 -0
  118. package/dist/esm/api/resources/operations/resources/operationsTasks/client/Client.mjs +616 -0
  119. package/dist/esm/api/resources/operations/resources/operationsTasks/client/index.d.mts +2 -0
  120. package/dist/esm/api/resources/operations/resources/operationsTasks/client/index.mjs +1 -0
  121. package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskAddCommentReq1.d.mts +12 -0
  122. package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskAddCommentReq1.mjs +4 -0
  123. package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientCreate1.d.mts +19 -0
  124. package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientCreate1.mjs +4 -0
  125. package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientUpdate1.d.mts +12 -0
  126. package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTaskClientUpdate1.mjs +4 -0
  127. package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksListV1Request.d.mts +33 -0
  128. package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksListV1Request.mjs +4 -0
  129. package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/index.d.mts +4 -0
  130. package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/index.mjs +1 -0
  131. package/dist/esm/api/resources/operations/resources/operationsTasks/index.d.mts +1 -0
  132. package/dist/esm/api/resources/operations/resources/operationsTasks/index.mjs +1 -0
  133. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.mts +26 -0
  134. package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.mjs +75 -0
  135. package/dist/esm/api/types/AiImageDescription.d.mts +30 -0
  136. package/dist/esm/api/types/AiImageDescription.mjs +4 -0
  137. package/dist/esm/api/types/Case1.d.mts +4 -0
  138. package/dist/esm/api/types/CaseChecksDisableReq.d.mts +7 -0
  139. package/dist/esm/api/types/CaseChecksDisableReq.mjs +4 -0
  140. package/dist/esm/api/types/CaseChecksDismissReq.d.mts +8 -0
  141. package/dist/esm/api/types/CaseChecksDismissReq.mjs +4 -0
  142. package/dist/esm/api/types/CaseChecksSummary1.d.mts +27 -0
  143. package/dist/esm/api/types/CaseChecksSummary1.mjs +4 -0
  144. package/dist/esm/api/types/Check1.d.mts +33 -0
  145. package/dist/esm/api/types/Check1.mjs +4 -0
  146. package/dist/esm/api/types/CheckEnum.d.mts +46 -0
  147. package/dist/esm/api/types/CheckEnum.mjs +20 -0
  148. package/dist/esm/api/types/CheckStatusEnum.d.mts +32 -0
  149. package/dist/esm/api/types/CheckStatusEnum.mjs +12 -0
  150. package/dist/esm/api/types/Checklist1.d.mts +18 -0
  151. package/dist/esm/api/types/Checklist1.mjs +4 -0
  152. package/dist/esm/api/types/ChecklistCheck1.d.mts +15 -0
  153. package/dist/esm/api/types/ChecklistCheck1.mjs +4 -0
  154. package/dist/esm/api/types/ChecklistListRes.d.mts +8 -0
  155. package/dist/esm/api/types/ChecklistListRes.mjs +4 -0
  156. package/dist/esm/api/types/ChecklistSortByEnum.d.mts +9 -0
  157. package/dist/esm/api/types/ChecklistSortByEnum.mjs +8 -0
  158. package/dist/esm/api/types/LlmModelEnum.d.mts +12 -0
  159. package/dist/esm/api/types/LlmModelEnum.mjs +11 -0
  160. package/dist/esm/api/types/OperationsTask1.d.mts +19 -0
  161. package/dist/esm/api/types/OperationsTask1.mjs +4 -0
  162. package/dist/esm/api/types/OperationsTaskComment1.d.mts +10 -0
  163. package/dist/esm/api/types/OperationsTaskComment1.mjs +4 -0
  164. package/dist/esm/api/types/OperationsTaskListRes.d.mts +8 -0
  165. package/dist/esm/api/types/OperationsTaskListRes.mjs +4 -0
  166. package/dist/esm/api/types/OperationsTaskSortByEnum.d.mts +8 -0
  167. package/dist/esm/api/types/OperationsTaskSortByEnum.mjs +7 -0
  168. package/dist/esm/api/types/TaskArtifactS3ObjectMetadata1.d.mts +2 -0
  169. package/dist/esm/api/types/index.d.mts +16 -0
  170. package/dist/esm/api/types/index.mjs +16 -0
  171. package/dist/esm/version.d.mts +1 -1
  172. package/dist/esm/version.mjs +1 -1
  173. package/package.json +1 -1
  174. package/reference.md +1826 -153
@@ -0,0 +1,581 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.Checklists = void 0;
49
+ const environments = __importStar(require("../../../../../../environments.js"));
50
+ const core = __importStar(require("../../../../../../core/index.js"));
51
+ const Chrt = __importStar(require("../../../../../index.js"));
52
+ const headers_js_1 = require("../../../../../../core/headers.js");
53
+ const errors = __importStar(require("../../../../../../errors/index.js"));
54
+ class Checklists {
55
+ constructor(_options = {}) {
56
+ this._options = _options;
57
+ }
58
+ /**
59
+ * Lists Checklists for the caller's organization with filtering, sorting, and pagination. | authz: min_org_role=operator | () -> (ChecklistListRes)
60
+ *
61
+ * @param {Chrt.operations.ChecklistsListV1Request} request
62
+ * @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Chrt.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.operations.checklists.listV1({
68
+ * sort_by: "created_at_timestamp",
69
+ * sort_order: "asc",
70
+ * page: 1,
71
+ * page_size: 1,
72
+ * filter_archived: true
73
+ * })
74
+ */
75
+ listV1(request = {}, requestOptions) {
76
+ return core.HttpResponsePromise.fromPromise(this.__listV1(request, requestOptions));
77
+ }
78
+ __listV1() {
79
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
80
+ var _a, _b, _c, _d, _e, _f, _g;
81
+ const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_archived: filterArchived, } = request;
82
+ const _queryParams = {};
83
+ if (sortBy !== undefined) {
84
+ _queryParams["sort_by"] = sortBy;
85
+ }
86
+ if (sortOrder !== undefined) {
87
+ _queryParams["sort_order"] = sortOrder;
88
+ }
89
+ if (page !== undefined) {
90
+ _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
91
+ }
92
+ if (pageSize !== undefined) {
93
+ _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
94
+ }
95
+ if (filterArchived !== undefined) {
96
+ _queryParams["filter_archived"] = (_c = filterArchived === null || filterArchived === void 0 ? void 0 : filterArchived.toString()) !== null && _c !== void 0 ? _c : null;
97
+ }
98
+ let _headers = (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
99
+ const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
100
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.ChrtEnvironment.Local, "operations/checklists/list/v1"),
101
+ method: "GET",
102
+ headers: _headers,
103
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
104
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
105
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
106
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
107
+ });
108
+ if (_response.ok) {
109
+ return { data: _response.body, rawResponse: _response.rawResponse };
110
+ }
111
+ if (_response.error.reason === "status-code") {
112
+ switch (_response.error.statusCode) {
113
+ case 422:
114
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
115
+ default:
116
+ throw new errors.ChrtError({
117
+ statusCode: _response.error.statusCode,
118
+ body: _response.error.body,
119
+ rawResponse: _response.rawResponse,
120
+ });
121
+ }
122
+ }
123
+ switch (_response.error.reason) {
124
+ case "non-json":
125
+ throw new errors.ChrtError({
126
+ statusCode: _response.error.statusCode,
127
+ body: _response.error.rawBody,
128
+ rawResponse: _response.rawResponse,
129
+ });
130
+ case "timeout":
131
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /operations/checklists/list/v1.");
132
+ case "unknown":
133
+ throw new errors.ChrtError({
134
+ message: _response.error.errorMessage,
135
+ rawResponse: _response.rawResponse,
136
+ });
137
+ }
138
+ });
139
+ }
140
+ /**
141
+ * Retrieves a single Checklist by id. | authz: min_org_role=operator | () -> (Checklist1)
142
+ *
143
+ * @param {string} checklistId
144
+ * @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
145
+ *
146
+ * @throws {@link Chrt.UnprocessableEntityError}
147
+ *
148
+ * @example
149
+ * await client.operations.checklists.getV1("checklist_id")
150
+ */
151
+ getV1(checklistId, requestOptions) {
152
+ return core.HttpResponsePromise.fromPromise(this.__getV1(checklistId, requestOptions));
153
+ }
154
+ __getV1(checklistId, requestOptions) {
155
+ return __awaiter(this, void 0, void 0, function* () {
156
+ var _a, _b, _c, _d;
157
+ 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);
158
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
159
+ 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/checklists/v1/${encodeURIComponent(checklistId)}`),
160
+ method: "GET",
161
+ headers: _headers,
162
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
163
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
164
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
165
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
166
+ });
167
+ if (_response.ok) {
168
+ return { data: _response.body, rawResponse: _response.rawResponse };
169
+ }
170
+ if (_response.error.reason === "status-code") {
171
+ switch (_response.error.statusCode) {
172
+ case 422:
173
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
174
+ default:
175
+ throw new errors.ChrtError({
176
+ statusCode: _response.error.statusCode,
177
+ body: _response.error.body,
178
+ rawResponse: _response.rawResponse,
179
+ });
180
+ }
181
+ }
182
+ switch (_response.error.reason) {
183
+ case "non-json":
184
+ throw new errors.ChrtError({
185
+ statusCode: _response.error.statusCode,
186
+ body: _response.error.rawBody,
187
+ rawResponse: _response.rawResponse,
188
+ });
189
+ case "timeout":
190
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /operations/checklists/v1/{checklist_id}.");
191
+ case "unknown":
192
+ throw new errors.ChrtError({
193
+ message: _response.error.errorMessage,
194
+ rawResponse: _response.rawResponse,
195
+ });
196
+ }
197
+ });
198
+ }
199
+ /**
200
+ * Updates scalar fields (name, description) on a Checklist. | authz: min_org_role=operator | (ChecklistClientUpdate1) -> (bool)
201
+ *
202
+ * @param {string} checklistId
203
+ * @param {Chrt.operations.ChecklistClientUpdate1} request
204
+ * @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
205
+ *
206
+ * @throws {@link Chrt.UnprocessableEntityError}
207
+ *
208
+ * @example
209
+ * await client.operations.checklists.updateV1("checklist_id")
210
+ */
211
+ updateV1(checklistId, request = {}, requestOptions) {
212
+ return core.HttpResponsePromise.fromPromise(this.__updateV1(checklistId, request, requestOptions));
213
+ }
214
+ __updateV1(checklistId_1) {
215
+ return __awaiter(this, arguments, void 0, function* (checklistId, request = {}, requestOptions) {
216
+ var _a, _b, _c, _d;
217
+ 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);
218
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
219
+ 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/checklists/v1/${encodeURIComponent(checklistId)}`),
220
+ method: "PATCH",
221
+ headers: _headers,
222
+ contentType: "application/json",
223
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
224
+ requestType: "json",
225
+ body: request,
226
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
227
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
228
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
229
+ });
230
+ if (_response.ok) {
231
+ return { data: _response.body, rawResponse: _response.rawResponse };
232
+ }
233
+ if (_response.error.reason === "status-code") {
234
+ switch (_response.error.statusCode) {
235
+ case 422:
236
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
237
+ default:
238
+ throw new errors.ChrtError({
239
+ statusCode: _response.error.statusCode,
240
+ body: _response.error.body,
241
+ rawResponse: _response.rawResponse,
242
+ });
243
+ }
244
+ }
245
+ switch (_response.error.reason) {
246
+ case "non-json":
247
+ throw new errors.ChrtError({
248
+ statusCode: _response.error.statusCode,
249
+ body: _response.error.rawBody,
250
+ rawResponse: _response.rawResponse,
251
+ });
252
+ case "timeout":
253
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /operations/checklists/v1/{checklist_id}.");
254
+ case "unknown":
255
+ throw new errors.ChrtError({
256
+ message: _response.error.errorMessage,
257
+ rawResponse: _response.rawResponse,
258
+ });
259
+ }
260
+ });
261
+ }
262
+ /**
263
+ * Creates a new Checklist for the caller's organization. | authz: min_org_role=operator | (ChecklistClientCreate1) -> (PydanticObjectId)
264
+ *
265
+ * @param {Chrt.operations.ChecklistClientCreate1} request
266
+ * @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
267
+ *
268
+ * @throws {@link Chrt.UnprocessableEntityError}
269
+ *
270
+ * @example
271
+ * await client.operations.checklists.createV1({
272
+ * schema_version: 1,
273
+ * name: "name"
274
+ * })
275
+ */
276
+ createV1(request, requestOptions) {
277
+ return core.HttpResponsePromise.fromPromise(this.__createV1(request, requestOptions));
278
+ }
279
+ __createV1(request, requestOptions) {
280
+ return __awaiter(this, void 0, void 0, function* () {
281
+ var _a, _b, _c, _d;
282
+ 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);
283
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
284
+ 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/checklists/v1"),
285
+ method: "POST",
286
+ headers: _headers,
287
+ contentType: "application/json",
288
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
289
+ requestType: "json",
290
+ body: request,
291
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
292
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
293
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
294
+ });
295
+ if (_response.ok) {
296
+ return { data: _response.body, rawResponse: _response.rawResponse };
297
+ }
298
+ if (_response.error.reason === "status-code") {
299
+ switch (_response.error.statusCode) {
300
+ case 422:
301
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
302
+ default:
303
+ throw new errors.ChrtError({
304
+ statusCode: _response.error.statusCode,
305
+ body: _response.error.body,
306
+ rawResponse: _response.rawResponse,
307
+ });
308
+ }
309
+ }
310
+ switch (_response.error.reason) {
311
+ case "non-json":
312
+ throw new errors.ChrtError({
313
+ statusCode: _response.error.statusCode,
314
+ body: _response.error.rawBody,
315
+ rawResponse: _response.rawResponse,
316
+ });
317
+ case "timeout":
318
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/checklists/v1.");
319
+ case "unknown":
320
+ throw new errors.ChrtError({
321
+ message: _response.error.errorMessage,
322
+ rawResponse: _response.rawResponse,
323
+ });
324
+ }
325
+ });
326
+ }
327
+ /**
328
+ * Adds checks to a Checklist. Idempotent for identical checks. | authz: min_org_role=operator | (ChecklistChecksAdd1) -> (bool)
329
+ *
330
+ * @param {string} checklistId
331
+ * @param {Chrt.operations.ChecklistChecksAdd1} request
332
+ * @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
333
+ *
334
+ * @throws {@link Chrt.UnprocessableEntityError}
335
+ *
336
+ * @example
337
+ * await client.operations.checklists.addChecksV1("checklist_id")
338
+ */
339
+ addChecksV1(checklistId, request = {}, requestOptions) {
340
+ return core.HttpResponsePromise.fromPromise(this.__addChecksV1(checklistId, request, requestOptions));
341
+ }
342
+ __addChecksV1(checklistId_1) {
343
+ return __awaiter(this, arguments, void 0, function* (checklistId, request = {}, requestOptions) {
344
+ var _a, _b, _c, _d;
345
+ 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);
346
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
347
+ 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/checklists/checks/add/v1/${encodeURIComponent(checklistId)}`),
348
+ method: "POST",
349
+ headers: _headers,
350
+ contentType: "application/json",
351
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
352
+ requestType: "json",
353
+ body: request,
354
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
355
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
356
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
357
+ });
358
+ if (_response.ok) {
359
+ return { data: _response.body, rawResponse: _response.rawResponse };
360
+ }
361
+ if (_response.error.reason === "status-code") {
362
+ switch (_response.error.statusCode) {
363
+ case 422:
364
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
365
+ default:
366
+ throw new errors.ChrtError({
367
+ statusCode: _response.error.statusCode,
368
+ body: _response.error.body,
369
+ rawResponse: _response.rawResponse,
370
+ });
371
+ }
372
+ }
373
+ switch (_response.error.reason) {
374
+ case "non-json":
375
+ throw new errors.ChrtError({
376
+ statusCode: _response.error.statusCode,
377
+ body: _response.error.rawBody,
378
+ rawResponse: _response.rawResponse,
379
+ });
380
+ case "timeout":
381
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/checklists/checks/add/v1/{checklist_id}.");
382
+ case "unknown":
383
+ throw new errors.ChrtError({
384
+ message: _response.error.errorMessage,
385
+ rawResponse: _response.rawResponse,
386
+ });
387
+ }
388
+ });
389
+ }
390
+ /**
391
+ * Removes entries from a Checklist's `checks` list by CheckEnum. | authz: min_org_role=operator | (ChecklistChecksRemove1) -> (bool)
392
+ *
393
+ * @param {string} checklistId
394
+ * @param {Chrt.operations.ChecklistChecksRemove1} request
395
+ * @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
396
+ *
397
+ * @throws {@link Chrt.UnprocessableEntityError}
398
+ *
399
+ * @example
400
+ * await client.operations.checklists.removeChecksV1("checklist_id")
401
+ */
402
+ removeChecksV1(checklistId, request = {}, requestOptions) {
403
+ return core.HttpResponsePromise.fromPromise(this.__removeChecksV1(checklistId, request, requestOptions));
404
+ }
405
+ __removeChecksV1(checklistId_1) {
406
+ return __awaiter(this, arguments, void 0, function* (checklistId, request = {}, requestOptions) {
407
+ var _a, _b, _c, _d;
408
+ 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);
409
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
410
+ 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/checklists/checks/remove/v1/${encodeURIComponent(checklistId)}`),
411
+ method: "POST",
412
+ headers: _headers,
413
+ contentType: "application/json",
414
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
415
+ requestType: "json",
416
+ body: request,
417
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
418
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
419
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
420
+ });
421
+ if (_response.ok) {
422
+ return { data: _response.body, rawResponse: _response.rawResponse };
423
+ }
424
+ if (_response.error.reason === "status-code") {
425
+ switch (_response.error.statusCode) {
426
+ case 422:
427
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
428
+ default:
429
+ throw new errors.ChrtError({
430
+ statusCode: _response.error.statusCode,
431
+ body: _response.error.body,
432
+ rawResponse: _response.rawResponse,
433
+ });
434
+ }
435
+ }
436
+ switch (_response.error.reason) {
437
+ case "non-json":
438
+ throw new errors.ChrtError({
439
+ statusCode: _response.error.statusCode,
440
+ body: _response.error.rawBody,
441
+ rawResponse: _response.rawResponse,
442
+ });
443
+ case "timeout":
444
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/checklists/checks/remove/v1/{checklist_id}.");
445
+ case "unknown":
446
+ throw new errors.ChrtError({
447
+ message: _response.error.errorMessage,
448
+ rawResponse: _response.rawResponse,
449
+ });
450
+ }
451
+ });
452
+ }
453
+ /**
454
+ * 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)
455
+ *
456
+ * @param {string} checklistId
457
+ * @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
458
+ *
459
+ * @throws {@link Chrt.UnprocessableEntityError}
460
+ *
461
+ * @example
462
+ * await client.operations.checklists.archiveV1("checklist_id")
463
+ */
464
+ archiveV1(checklistId, requestOptions) {
465
+ return core.HttpResponsePromise.fromPromise(this.__archiveV1(checklistId, requestOptions));
466
+ }
467
+ __archiveV1(checklistId, requestOptions) {
468
+ return __awaiter(this, void 0, void 0, function* () {
469
+ var _a, _b, _c, _d;
470
+ 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);
471
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
472
+ 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/checklists/archive/v1/${encodeURIComponent(checklistId)}`),
473
+ method: "POST",
474
+ headers: _headers,
475
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
476
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
477
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
478
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
479
+ });
480
+ if (_response.ok) {
481
+ return { data: _response.body, rawResponse: _response.rawResponse };
482
+ }
483
+ if (_response.error.reason === "status-code") {
484
+ switch (_response.error.statusCode) {
485
+ case 422:
486
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
487
+ default:
488
+ throw new errors.ChrtError({
489
+ statusCode: _response.error.statusCode,
490
+ body: _response.error.body,
491
+ rawResponse: _response.rawResponse,
492
+ });
493
+ }
494
+ }
495
+ switch (_response.error.reason) {
496
+ case "non-json":
497
+ throw new errors.ChrtError({
498
+ statusCode: _response.error.statusCode,
499
+ body: _response.error.rawBody,
500
+ rawResponse: _response.rawResponse,
501
+ });
502
+ case "timeout":
503
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/checklists/archive/v1/{checklist_id}.");
504
+ case "unknown":
505
+ throw new errors.ChrtError({
506
+ message: _response.error.errorMessage,
507
+ rawResponse: _response.rawResponse,
508
+ });
509
+ }
510
+ });
511
+ }
512
+ /**
513
+ * Restores an archived Checklist by setting `archived=False`. | authz: min_org_role=operator | () -> (bool)
514
+ *
515
+ * @param {string} checklistId
516
+ * @param {Checklists.RequestOptions} requestOptions - Request-specific configuration.
517
+ *
518
+ * @throws {@link Chrt.UnprocessableEntityError}
519
+ *
520
+ * @example
521
+ * await client.operations.checklists.unarchiveV1("checklist_id")
522
+ */
523
+ unarchiveV1(checklistId, requestOptions) {
524
+ return core.HttpResponsePromise.fromPromise(this.__unarchiveV1(checklistId, requestOptions));
525
+ }
526
+ __unarchiveV1(checklistId, requestOptions) {
527
+ return __awaiter(this, void 0, void 0, function* () {
528
+ var _a, _b, _c, _d;
529
+ 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);
530
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
531
+ 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/checklists/unarchive/v1/${encodeURIComponent(checklistId)}`),
532
+ method: "POST",
533
+ headers: _headers,
534
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
535
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
536
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
537
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
538
+ });
539
+ if (_response.ok) {
540
+ return { data: _response.body, rawResponse: _response.rawResponse };
541
+ }
542
+ if (_response.error.reason === "status-code") {
543
+ switch (_response.error.statusCode) {
544
+ case 422:
545
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
546
+ default:
547
+ throw new errors.ChrtError({
548
+ statusCode: _response.error.statusCode,
549
+ body: _response.error.body,
550
+ rawResponse: _response.rawResponse,
551
+ });
552
+ }
553
+ }
554
+ switch (_response.error.reason) {
555
+ case "non-json":
556
+ throw new errors.ChrtError({
557
+ statusCode: _response.error.statusCode,
558
+ body: _response.error.rawBody,
559
+ rawResponse: _response.rawResponse,
560
+ });
561
+ case "timeout":
562
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/checklists/unarchive/v1/{checklist_id}.");
563
+ case "unknown":
564
+ throw new errors.ChrtError({
565
+ message: _response.error.errorMessage,
566
+ rawResponse: _response.rawResponse,
567
+ });
568
+ }
569
+ });
570
+ }
571
+ _getAuthorizationHeader() {
572
+ return __awaiter(this, void 0, void 0, function* () {
573
+ const bearer = yield core.Supplier.get(this._options.token);
574
+ if (bearer != null) {
575
+ return `Bearer ${bearer}`;
576
+ }
577
+ return undefined;
578
+ });
579
+ }
580
+ }
581
+ exports.Checklists = Checklists;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,11 @@
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
+ */
9
+ export interface ChecklistChecksAdd1 {
10
+ checks?: Chrt.ChecklistCheck1[];
11
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
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
+ */
9
+ export interface ChecklistChecksRemove1 {
10
+ checks?: Chrt.CheckEnum[];
11
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
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
+ * schema_version: 1,
9
+ * name: "name"
10
+ * }
11
+ */
12
+ export interface ChecklistClientCreate1 {
13
+ schema_version: number;
14
+ name: string;
15
+ description?: string | null;
16
+ checks?: Chrt.ChecklistCheck1[];
17
+ }