polytomic 25.9.8 → 25.9.9

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 (111) hide show
  1. package/BaseClient.js +2 -2
  2. package/Client.d.ts +3 -0
  3. package/Client.js +21 -16
  4. package/api/resources/bulkSync/client/Client.d.ts +2 -0
  5. package/api/resources/bulkSync/client/Client.js +6 -0
  6. package/api/resources/connections/client/Client.d.ts +42 -0
  7. package/api/resources/connections/client/Client.js +42 -0
  8. package/api/resources/connections/resources/sharedConnections/client/Client.d.ts +42 -0
  9. package/api/resources/connections/resources/sharedConnections/client/Client.js +42 -0
  10. package/api/resources/harbors/client/Client.d.ts +3 -0
  11. package/api/resources/harbors/client/Client.js +5 -0
  12. package/api/resources/harbors/exports.d.ts +1 -0
  13. package/api/resources/harbors/exports.js +1 -0
  14. package/api/resources/harbors/index.d.ts +1 -0
  15. package/api/resources/harbors/index.js +1 -0
  16. package/api/resources/harbors/resources/actions/client/Client.d.ts +345 -0
  17. package/api/resources/harbors/resources/actions/client/Client.js +652 -0
  18. package/api/resources/harbors/resources/actions/client/index.d.ts +1 -0
  19. package/api/resources/harbors/resources/actions/client/index.js +17 -0
  20. package/api/resources/harbors/resources/actions/client/requests/ActionsDescribeRequest.d.ts +15 -0
  21. package/api/resources/harbors/resources/actions/client/requests/ActionsDescribeRequest.js +3 -0
  22. package/api/resources/harbors/resources/actions/client/requests/ActionsGetExecutionRequest.d.ts +8 -0
  23. package/api/resources/harbors/resources/actions/client/requests/ActionsGetExecutionRequest.js +3 -0
  24. package/api/resources/harbors/resources/actions/client/requests/ActionsListRequest.d.ts +17 -0
  25. package/api/resources/harbors/resources/actions/client/requests/ActionsListRequest.js +3 -0
  26. package/api/resources/harbors/resources/actions/client/requests/ExecuteHarborActionRequest.d.ts +12 -0
  27. package/api/resources/harbors/resources/actions/client/requests/ExecuteHarborActionRequest.js +3 -0
  28. package/api/resources/harbors/resources/actions/client/requests/LookupHarborActionRequest.d.ts +23 -0
  29. package/api/resources/harbors/resources/actions/client/requests/LookupHarborActionRequest.js +3 -0
  30. package/api/resources/harbors/resources/actions/client/requests/PrepareHarborActionRequest.d.ts +24 -0
  31. package/api/resources/harbors/resources/actions/client/requests/PrepareHarborActionRequest.js +3 -0
  32. package/api/resources/harbors/resources/actions/client/requests/index.d.ts +6 -0
  33. package/api/resources/harbors/resources/actions/client/requests/index.js +2 -0
  34. package/api/resources/harbors/resources/actions/exports.d.ts +2 -0
  35. package/api/resources/harbors/resources/actions/exports.js +21 -0
  36. package/api/resources/harbors/resources/actions/index.d.ts +1 -0
  37. package/api/resources/harbors/resources/actions/index.js +17 -0
  38. package/api/resources/harbors/resources/index.d.ts +2 -0
  39. package/api/resources/harbors/resources/index.js +41 -0
  40. package/api/resources/index.d.ts +2 -0
  41. package/api/resources/index.js +3 -1
  42. package/api/resources/operations/client/Client.d.ts +102 -0
  43. package/api/resources/operations/client/Client.js +233 -0
  44. package/api/resources/operations/client/index.d.ts +1 -0
  45. package/api/resources/operations/client/index.js +17 -0
  46. package/api/resources/operations/client/requests/SearchOperationsRequest.d.ts +14 -0
  47. package/api/resources/operations/client/requests/SearchOperationsRequest.js +3 -0
  48. package/api/resources/operations/client/requests/index.d.ts +1 -0
  49. package/api/resources/operations/client/requests/index.js +2 -0
  50. package/api/resources/operations/exports.d.ts +2 -0
  51. package/api/resources/operations/exports.js +21 -0
  52. package/api/resources/operations/index.d.ts +1 -0
  53. package/api/resources/operations/index.js +17 -0
  54. package/api/resources/temporaryCredentials/client/Client.d.ts +6 -6
  55. package/api/resources/temporaryCredentials/client/Client.js +6 -6
  56. package/api/types/ActionLookup.d.ts +4 -0
  57. package/api/types/ActionLookup.js +3 -0
  58. package/api/types/CompletionValue.d.ts +5 -0
  59. package/api/types/CompletionValue.js +3 -0
  60. package/api/types/ConnectionResponseSchema.d.ts +15 -0
  61. package/api/types/FieldConfiguration.d.ts +2 -0
  62. package/api/types/HarborActionCapability.d.ts +12 -0
  63. package/api/types/HarborActionCapability.js +3 -0
  64. package/api/types/HarborActionDescribeEnvelope.d.ts +4 -0
  65. package/api/types/HarborActionDescribeEnvelope.js +3 -0
  66. package/api/types/HarborActionExecutionEnvelope.d.ts +4 -0
  67. package/api/types/HarborActionExecutionEnvelope.js +3 -0
  68. package/api/types/HarborActionExecutionResponse.d.ts +28 -0
  69. package/api/types/HarborActionExecutionResponse.js +13 -0
  70. package/api/types/HarborActionField.d.ts +14 -0
  71. package/api/types/HarborActionField.js +3 -0
  72. package/api/types/HarborActionListEnvelope.d.ts +10 -0
  73. package/api/types/HarborActionListEnvelope.js +3 -0
  74. package/api/types/HarborActionLookupEnvelope.d.ts +4 -0
  75. package/api/types/HarborActionLookupEnvelope.js +3 -0
  76. package/api/types/HarborActionPreparation.d.ts +4 -0
  77. package/api/types/HarborActionPreparation.js +3 -0
  78. package/api/types/HarborActionPreparationEnvelope.d.ts +4 -0
  79. package/api/types/HarborActionPreparationEnvelope.js +3 -0
  80. package/api/types/HarborActionSummary.d.ts +7 -0
  81. package/api/types/HarborActionSummary.js +3 -0
  82. package/api/types/HarboractivityapiHarborActivityMetadata.d.ts +7 -0
  83. package/api/types/IdentityCredentialHarborSchema.d.ts +2 -0
  84. package/api/types/OperationMatch.d.ts +16 -0
  85. package/api/types/OperationMatch.js +3 -0
  86. package/api/types/OperationSearchAvailabilityEnvelope.d.ts +11 -0
  87. package/api/types/OperationSearchAvailabilityEnvelope.js +3 -0
  88. package/api/types/OperationSearchRateLimit.d.ts +15 -0
  89. package/api/types/OperationSearchRateLimit.js +13 -0
  90. package/api/types/OperationSearchResult.d.ts +9 -0
  91. package/api/types/OperationSearchResult.js +3 -0
  92. package/api/types/SchemaConfiguration.d.ts +2 -0
  93. package/api/types/SchemaOperationIdempotency.d.ts +5 -0
  94. package/api/types/SchemaOperationIdempotency.js +3 -0
  95. package/api/types/SchemaRecord.d.ts +1 -0
  96. package/api/types/SchemaRecord.js +3 -0
  97. package/api/types/SearchOperationsEnvelope.d.ts +4 -0
  98. package/api/types/SearchOperationsEnvelope.js +3 -0
  99. package/api/types/SearchOperationsResponse.d.ts +7 -0
  100. package/api/types/SearchOperationsResponse.js +3 -0
  101. package/api/types/TemporaryCredentialSubject.d.ts +7 -7
  102. package/api/types/TemporaryCredentialSubject.js +3 -3
  103. package/api/types/TimeDuration.d.ts +1 -0
  104. package/api/types/TimeDuration.js +3 -0
  105. package/api/types/Webhook.d.ts +2 -0
  106. package/api/types/index.d.ts +21 -0
  107. package/api/types/index.js +21 -0
  108. package/package.json +1 -1
  109. package/reference.md +938 -6
  110. package/version.d.ts +1 -1
  111. package/version.js +1 -1
@@ -0,0 +1,652 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ var __rest = (this && this.__rest) || function (s, e) {
46
+ var t = {};
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
+ t[p] = s[p];
49
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
+ t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ exports.ActionsClient = void 0;
58
+ const BaseClient_1 = require("../../../../../../BaseClient");
59
+ const core = __importStar(require("../../../../../../core"));
60
+ const headers_1 = require("../../../../../../core/headers");
61
+ const requestBody_1 = require("../../../../../../core/requestBody");
62
+ const environments = __importStar(require("../../../../../../environments"));
63
+ const handleNonStatusCodeError_1 = require("../../../../../../errors/handleNonStatusCodeError");
64
+ const errors = __importStar(require("../../../../../../errors/index"));
65
+ class ActionsClient {
66
+ constructor(options = {}) {
67
+ this._options = (0, BaseClient_1.normalizeClientOptionsWithAuth)(options);
68
+ }
69
+ /**
70
+ * Read a metadata-only action receipt without resubmitting the action.
71
+ *
72
+ * Use a currently valid scoped credential belonging to the original Harbor. The
73
+ * receipt remains readable after the action or rollout feature is disabled. A
74
+ * credential from another Harbor cannot inspect it. The response does not contain
75
+ * lookup values, input values, output payloads, credential secrets, or raw provider
76
+ * errors. It includes structured operation identity, lookup field names, submitted
77
+ * field names, and the original credential ID.
78
+ *
79
+ * An overdue executing receipt transitions atomically to `unknown`; this read
80
+ * never invokes the destination provider. Stop polling at `succeeded`, `failed`, or `unknown`.
81
+ * Unknown is terminal for this execution identifier and means the update may have
82
+ * happened. Investigate rather than preparing a replacement action to retry.
83
+ *
84
+ * Preparation alone has no execution receipt. A `404 Not Found` after an uncertain
85
+ * execution does not prove the operation never happened.
86
+ *
87
+ * Send a new nonzero UUID in `X-Polytomic-Activity-Request-ID`. Direct REST requests
88
+ * may omit `X-Polytomic-Harbor-Session`; a supplied session must be active and bound
89
+ * to the same credential and Harbor.
90
+ *
91
+ * @param {string} harbor_id - Unique identifier of the Harbor.
92
+ * @param {string} execution_id
93
+ * @param {Polytomic.harbors.ActionsGetExecutionRequest} request
94
+ * @param {ActionsClient.RequestOptions} requestOptions - Request-specific configuration.
95
+ *
96
+ * @throws {@link errors.PolytomicError}
97
+ * @throws {@link errors.PolytomicTimeoutError}
98
+ *
99
+ * @example
100
+ * await client.harbors.actions.getExecution("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
101
+ */
102
+ getExecution(harbor_id, execution_id, request = {}, requestOptions) {
103
+ return core.HttpResponsePromise.fromPromise(this.__getExecution(harbor_id, execution_id, request, requestOptions));
104
+ }
105
+ __getExecution(harbor_id_1, execution_id_1) {
106
+ return __awaiter(this, arguments, void 0, function* (harbor_id, execution_id, request = {}, requestOptions) {
107
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
108
+ const { "X-Polytomic-Harbor-Session": polytomicHarborSession, "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId, } = request;
109
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
110
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
111
+ "X-Polytomic-Harbor-Session": polytomicHarborSession,
112
+ "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId,
113
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
114
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
115
+ const _response = yield core.fetcher({
116
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/action-executions/${core.url.encodePathParam(execution_id)}`),
117
+ method: "GET",
118
+ headers: _headers,
119
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
120
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
121
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
122
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
123
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
124
+ logging: this._options.logging,
125
+ });
126
+ if (_response.ok) {
127
+ return {
128
+ data: _response.body,
129
+ rawResponse: _response.rawResponse,
130
+ };
131
+ }
132
+ if (_response.error.reason === "status-code") {
133
+ throw new errors.PolytomicError({
134
+ statusCode: _response.error.statusCode,
135
+ body: _response.error.body,
136
+ rawResponse: _response.rawResponse,
137
+ });
138
+ }
139
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/harbors/{harbor_id}/action-executions/{execution_id}");
140
+ });
141
+ }
142
+ /**
143
+ * List a page of configured action identities without loading provider capabilities or field metadata.
144
+ *
145
+ * Use a scoped credential belonging to this Harbor. An administrator must first
146
+ * select Connections and explicitly enable object operations and fields. These
147
+ * grants apply to existing and future eligible Harbor credentials without changing
148
+ * read access. Newly available objects and fields remain disabled until selected.
149
+ *
150
+ * Each entry identifies a configured operation by `connection_id`, `schema_id`, and
151
+ * `operation_id`. Search filters those identities. Follow
152
+ * `pagination.next_page_token` with the same search to read additional pages.
153
+ * Pages contain saved identities without field metadata or provider capability
154
+ * checks. `unavailable: true` means the saved Connection is unavailable for actions;
155
+ * its permissions remain saved and revocable. An available Connection does not
156
+ * confirm that its operations or granted fields are currently available.
157
+ *
158
+ * Use [Describe action](../../../../api-reference/harbors/actions/describe) for the selected
159
+ * operation before looking up a record or
160
+ * [preparing an action](../../../../api-reference/harbors/actions/prepare). Description checks
161
+ * current provider capabilities and returns the operation's `effect` (`read_only`
162
+ * or `mutating`) and effective granted fields.
163
+ * Always submit the intended Connection explicitly when looking up or preparing,
164
+ * even if only one is enabled. If several destinations match your intent, clarify
165
+ * which one to use.
166
+ *
167
+ * Read-only operations use [Lookup action](../../../../api-reference/harbors/actions/lookup)
168
+ * without preparation or approval. Salesforce and HubSpot support exact lookups by
169
+ * their canonical record ID. Listing does not grant additional permissions or
170
+ * authorize mutations by a read-only credential.
171
+ *
172
+ * Send a new nonzero UUID in `X-Polytomic-Activity-Request-ID`. For direct REST
173
+ * requests, `X-Polytomic-Harbor-Session` is optional. If supplied, the session must
174
+ * be active and bound to the credential and Harbor. Discovery is recorded as
175
+ * `action.listed`; no response is returned if that event cannot be recorded.
176
+ *
177
+ * @param {string} harbor_id - Unique identifier of the Harbor.
178
+ * @param {Polytomic.harbors.ActionsListRequest} request
179
+ * @param {ActionsClient.RequestOptions} requestOptions - Request-specific configuration.
180
+ *
181
+ * @throws {@link errors.PolytomicError}
182
+ * @throws {@link errors.PolytomicTimeoutError}
183
+ *
184
+ * @example
185
+ * await client.harbors.actions.list("248df4b7-aa70-47b8-a036-33ac447e668d", {
186
+ * search: "search",
187
+ * page_token: "page_token",
188
+ * limit: 1
189
+ * })
190
+ */
191
+ list(harbor_id, request = {}, requestOptions) {
192
+ return core.HttpResponsePromise.fromPromise(this.__list(harbor_id, request, requestOptions));
193
+ }
194
+ __list(harbor_id_1) {
195
+ return __awaiter(this, arguments, void 0, function* (harbor_id, request = {}, requestOptions) {
196
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
197
+ const { search, page_token: pageToken, limit, "X-Polytomic-Harbor-Session": polytomicHarborSession, "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId, } = request;
198
+ const _queryParams = {
199
+ search,
200
+ page_token: pageToken,
201
+ limit,
202
+ };
203
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
204
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
205
+ "X-Polytomic-Harbor-Session": polytomicHarborSession,
206
+ "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId,
207
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
208
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
209
+ const _response = yield core.fetcher({
210
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/actions`),
211
+ method: "GET",
212
+ headers: _headers,
213
+ queryString: core.url
214
+ .queryBuilder()
215
+ .addMany(_queryParams)
216
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
217
+ .build(),
218
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
219
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
220
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
221
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
222
+ logging: this._options.logging,
223
+ });
224
+ if (_response.ok) {
225
+ return { data: _response.body, rawResponse: _response.rawResponse };
226
+ }
227
+ if (_response.error.reason === "status-code") {
228
+ throw new errors.PolytomicError({
229
+ statusCode: _response.error.statusCode,
230
+ body: _response.error.body,
231
+ rawResponse: _response.rawResponse,
232
+ });
233
+ }
234
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/harbors/{harbor_id}/actions");
235
+ });
236
+ }
237
+ /**
238
+ * Describe one granted operation and its currently available enabled fields.
239
+ *
240
+ * Select an identity from [List actions](../../../../../api-reference/harbors/actions/list).
241
+ * Supply its `connection_id`, `schema_id`, and `operation_id`. Use a scoped
242
+ * credential belonging to this Harbor; description does not require write access.
243
+ *
244
+ * `effect` identifies an operation as `read_only` or `mutating`. For read-only
245
+ * operations, `lookup_fields` and `output_fields` contain only fields both granted
246
+ * by the administrator and currently available through the Connection.
247
+ * `input_fields` is empty. Use
248
+ * [Lookup action](../../../../../api-reference/harbors/actions/lookup) to return one projected
249
+ * record without preparation.
250
+ *
251
+ * For mutations, `input_fields` contains only granted, currently available fields.
252
+ * `lookup_fields` and `output_fields` describe the connector's lookup and output.
253
+ * Fields retain their types, constraints, required flags, and nullability. Supply
254
+ * exactly one lookup when `lookup_fields` is nonempty; otherwise omit it. Omitted
255
+ * input fields remain unchanged. Explicit null requires `nullable: true`.
256
+ *
257
+ * For mutations, `idempotency` describes remote deduplication, not permission to
258
+ * retry. Harbor write receipts remain metadata-only.
259
+ *
260
+ * A provider discovery failure or a granted operation that is no longer available
261
+ * returns `503 Service Unavailable`, not an empty field list. An ungranted identity
262
+ * returns `403 Forbidden`. These responses do not revoke saved permissions.
263
+ * Polytomic checks current grants and provider capabilities again at execution.
264
+ *
265
+ * Description fetches only the selected object's operations. It does not fetch
266
+ * fields for the entire catalog. Lookup permissions are checked against fresh
267
+ * provider metadata. Provider permissions and automation still apply.
268
+ *
269
+ * Send a new nonzero UUID in `X-Polytomic-Activity-Request-ID`. A supplied
270
+ * `X-Polytomic-Harbor-Session` must be active and bound to this credential and
271
+ * Harbor. Successful description is recorded as `action.listed`.
272
+ *
273
+ * @param {string} harbor_id - Unique identifier of the Harbor.
274
+ * @param {Polytomic.harbors.ActionsDescribeRequest} request
275
+ * @param {ActionsClient.RequestOptions} requestOptions - Request-specific configuration.
276
+ *
277
+ * @throws {@link errors.PolytomicError}
278
+ * @throws {@link errors.PolytomicTimeoutError}
279
+ *
280
+ * @example
281
+ * await client.harbors.actions.describe("248df4b7-aa70-47b8-a036-33ac447e668d", {
282
+ * connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
283
+ * schema_id: "schema_id",
284
+ * operation_id: "operation_id"
285
+ * })
286
+ */
287
+ describe(harbor_id, request, requestOptions) {
288
+ return core.HttpResponsePromise.fromPromise(this.__describe(harbor_id, request, requestOptions));
289
+ }
290
+ __describe(harbor_id, request, requestOptions) {
291
+ return __awaiter(this, void 0, void 0, function* () {
292
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
293
+ const { connection_id: connectionId, schema_id: schemaId, operation_id: operationId, "X-Polytomic-Harbor-Session": polytomicHarborSession, "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId, } = request;
294
+ const _queryParams = {
295
+ connection_id: connectionId,
296
+ schema_id: schemaId,
297
+ operation_id: operationId,
298
+ };
299
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
300
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
301
+ "X-Polytomic-Harbor-Session": polytomicHarborSession,
302
+ "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId,
303
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
304
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
305
+ const _response = yield core.fetcher({
306
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/actions/describe`),
307
+ method: "GET",
308
+ headers: _headers,
309
+ queryString: core.url
310
+ .queryBuilder()
311
+ .addMany(_queryParams)
312
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
313
+ .build(),
314
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
315
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
316
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
317
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
318
+ logging: this._options.logging,
319
+ });
320
+ if (_response.ok) {
321
+ return {
322
+ data: _response.body,
323
+ rawResponse: _response.rawResponse,
324
+ };
325
+ }
326
+ if (_response.error.reason === "status-code") {
327
+ throw new errors.PolytomicError({
328
+ statusCode: _response.error.statusCode,
329
+ body: _response.error.body,
330
+ rawResponse: _response.rawResponse,
331
+ });
332
+ }
333
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/harbors/{harbor_id}/actions/describe");
334
+ });
335
+ }
336
+ /**
337
+ * Execute a prepared action with at most one application attempt per server-issued execution identifier.
338
+ *
339
+ * First call [Prepare action](../../../../../api-reference/harbors/actions/prepare). Submit only
340
+ * its server-issued `execution_id` using a writable scoped credential belonging to
341
+ * the same Harbor. The destination, operation, lookup, and input are fixed by
342
+ * preparation. No per-request approval is required.
343
+ *
344
+ * Polytomic checks current grants, provider capabilities, and the saved Connection
345
+ * again before execution. Preparation does not reserve permission. An expired
346
+ * preparation cannot start an execution. It returns `410 Gone` while the expired
347
+ * preparation remains available, or `404 Not Found` after cleanup.
348
+ *
349
+ * > 🚧 Updates can overwrite intervening edits
350
+ * >
351
+ * > Enabled operations can act on records accessible through the saved Connection
352
+ * > and may trigger provider automation. Preparation does not lock the destination
353
+ * > record. Action permission does not grant read access.
354
+ *
355
+ * ## One intended attempt
356
+ *
357
+ * An identifier already claimed for execution returns its original receipt,
358
+ * including through another eligible credential or after action disablement.
359
+ * Receipts remain available after prepared arguments are removed or expire.
360
+ * They are retained independently of Activity history.
361
+ *
362
+ * An `action.attempt_started` event means permission to attempt the action was
363
+ * claimed, not that the provider received it. Disabling actions blocks new claims
364
+ * but does not recall an accepted attempt. This is at most one application attempt
365
+ * per execution identifier, not a remote exactly-once guarantee. Advertised remote
366
+ * idempotency does not authorize automatic replay.
367
+ *
368
+ * ## Results and recovery
369
+ *
370
+ * Keep `execution_id` and the returned `status_path`. `succeeded` means the provider
371
+ * confirmed the operation and Polytomic recorded that outcome. `failed` means the
372
+ * operation was rejected. `executing` is incomplete. `recovery_required: true`
373
+ * does not confirm durable acceptance or completion. Use the status path after a
374
+ * timeout or server error. A missing receipt does not prove no operation occurred.
375
+ *
376
+ * > ⚠️ An unknown outcome is terminal
377
+ * >
378
+ * > `unknown` means the operation may have happened. Investigate the record and
379
+ * > provider automation. Do not resubmit or prepare a replacement action to retry.
380
+ * > Polytomic never automatically retries an uncertain attempt. An overdue
381
+ * > executing receipt becomes unknown after its 90-second deadline.
382
+ *
383
+ * Send a separate nonzero UUID in `X-Polytomic-Activity-Request-ID` for each HTTP
384
+ * request. MCP supplies this transport header automatically.
385
+ * `X-Polytomic-Harbor-Session` is optional for direct REST requests; a supplied
386
+ * session must be active and bound to your credential and Harbor. Receipts and
387
+ * Activity contain operation identity, lookup field names, submitted field names,
388
+ * original attribution, and safe outcome categories. They exclude lookup values,
389
+ * input values, output payloads, and raw provider errors.
390
+ *
391
+ * @param {string} harbor_id - Unique identifier of the Harbor.
392
+ * @param {Polytomic.harbors.ExecuteHarborActionRequest} request
393
+ * @param {ActionsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
394
+ *
395
+ * @throws {@link errors.PolytomicError}
396
+ * @throws {@link errors.PolytomicTimeoutError}
397
+ *
398
+ * @example
399
+ * await client.harbors.actions.execute("248df4b7-aa70-47b8-a036-33ac447e668d", {
400
+ * execution_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
401
+ * })
402
+ */
403
+ execute(harbor_id, request, requestOptions) {
404
+ return core.HttpResponsePromise.fromPromise(this.__execute(harbor_id, request, requestOptions));
405
+ }
406
+ __execute(harbor_id, request, requestOptions) {
407
+ return __awaiter(this, void 0, void 0, function* () {
408
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
409
+ const { "X-Polytomic-Harbor-Session": polytomicHarborSession, "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId } = request, _body = __rest(request, ["X-Polytomic-Harbor-Session", "X-Polytomic-Activity-Request-ID"]);
410
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
411
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
412
+ "X-Polytomic-Harbor-Session": polytomicHarborSession,
413
+ "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId,
414
+ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey,
415
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
416
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
417
+ const _response = yield core.fetcher({
418
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/actions/execute`),
419
+ method: "POST",
420
+ headers: _headers,
421
+ contentType: "application/json",
422
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
423
+ requestType: "json",
424
+ body: (0, requestBody_1.mergeAdditionalBodyParameters)(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
425
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
426
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
427
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
428
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
429
+ logging: this._options.logging,
430
+ });
431
+ if (_response.ok) {
432
+ return {
433
+ data: _response.body,
434
+ rawResponse: _response.rawResponse,
435
+ };
436
+ }
437
+ if (_response.error.reason === "status-code") {
438
+ throw new errors.PolytomicError({
439
+ statusCode: _response.error.statusCode,
440
+ body: _response.error.body,
441
+ rawResponse: _response.rawResponse,
442
+ });
443
+ }
444
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/harbors/{harbor_id}/actions/execute");
445
+ });
446
+ }
447
+ /**
448
+ * Look up exactly one record using a granted read-only Harbor action.
449
+ *
450
+ * Use a scoped credential belonging to this Harbor, including a read-only
451
+ * credential. An administrator must grant the Connection, read-only operation,
452
+ * lookup field, and returned fields. Select an identity with
453
+ * [List actions](../../../../../api-reference/harbors/actions/list), then inspect its effective
454
+ * lookup and output fields with
455
+ * [Describe action](../../../../../api-reference/harbors/actions/describe).
456
+ *
457
+ * Polytomic checks current grants and provider capabilities on each lookup. The
458
+ * response contains one record under `data`, limited to the selected fields.
459
+ * Omitting `fields` returns all currently available granted outputs;
460
+ * new provider fields remain excluded until an administrator grants them.
461
+ * Salesforce uses `Id`; HubSpot uses `hs_object_id`. Preserve these IDs as strings.
462
+ * Alternate keys, fuzzy matches, search, and batching are unsupported.
463
+ *
464
+ * A definite absence returns `404 Not Found`. More than one exact match returns
465
+ * `409 Conflict`. Invalid selections return `400 Bad Request`; unavailable
466
+ * capabilities or provider failures return `503 Service Unavailable`. Errors do
467
+ * not include lookup values or provider response bodies.
468
+ *
469
+ * This request is synchronous and read-only. It requires no preparation, approval,
470
+ * execution identifier, or status polling. It creates no write receipt or private
471
+ * write evidence. Harbor Activity records `action.looked_up` with field names and
472
+ * an outcome, never the lookup value or returned values. If Activity cannot be
473
+ * recorded, Polytomic returns no record.
474
+ *
475
+ * Unknown properties, duplicate keys, invalid Unicode, trailing JSON, and bodies
476
+ * larger than 256 KiB are rejected. Lookup values must be JSON scalars. Numeric
477
+ * values must use integer notation within +/-9007199254740991.
478
+ *
479
+ * Send a new nonzero UUID in `X-Polytomic-Activity-Request-ID` for each request.
480
+ * `X-Polytomic-Harbor-Session` is optional for direct REST requests. A supplied
481
+ * session must be active and bound to your credential and Harbor.
482
+ *
483
+ * @param {string} harbor_id - Unique identifier of the Harbor.
484
+ * @param {Polytomic.harbors.LookupHarborActionRequest} request
485
+ * @param {ActionsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
486
+ *
487
+ * @throws {@link errors.PolytomicError}
488
+ * @throws {@link errors.PolytomicTimeoutError}
489
+ *
490
+ * @example
491
+ * await client.harbors.actions.lookup("248df4b7-aa70-47b8-a036-33ac447e668d", {
492
+ * connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
493
+ * lookup: {},
494
+ * operation_id: "operation_id",
495
+ * schema_id: "schema_id"
496
+ * })
497
+ */
498
+ lookup(harbor_id, request, requestOptions) {
499
+ return core.HttpResponsePromise.fromPromise(this.__lookup(harbor_id, request, requestOptions));
500
+ }
501
+ __lookup(harbor_id, request, requestOptions) {
502
+ return __awaiter(this, void 0, void 0, function* () {
503
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
504
+ const { "X-Polytomic-Harbor-Session": polytomicHarborSession, "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId } = request, _body = __rest(request, ["X-Polytomic-Harbor-Session", "X-Polytomic-Activity-Request-ID"]);
505
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
506
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
507
+ "X-Polytomic-Harbor-Session": polytomicHarborSession,
508
+ "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId,
509
+ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey,
510
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
511
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
512
+ const _response = yield core.fetcher({
513
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/actions/lookup`),
514
+ method: "POST",
515
+ headers: _headers,
516
+ contentType: "application/json",
517
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
518
+ requestType: "json",
519
+ body: (0, requestBody_1.mergeAdditionalBodyParameters)(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
520
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
521
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
522
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
523
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
524
+ logging: this._options.logging,
525
+ });
526
+ if (_response.ok) {
527
+ return { data: _response.body, rawResponse: _response.rawResponse };
528
+ }
529
+ if (_response.error.reason === "status-code") {
530
+ throw new errors.PolytomicError({
531
+ statusCode: _response.error.statusCode,
532
+ body: _response.error.body,
533
+ rawResponse: _response.rawResponse,
534
+ });
535
+ }
536
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/harbors/{harbor_id}/actions/lookup");
537
+ });
538
+ }
539
+ /**
540
+ * Validate and prepare an enabled action without executing it, returning a server-issued execution identifier.
541
+ *
542
+ * Use a writable scoped credential belonging to this Harbor. An administrator must
543
+ * first enable the destination Connection, operation, and input fields. Select an
544
+ * identity with [List actions](../../../../../api-reference/harbors/actions/list), then inspect
545
+ * its fields with [Describe action](../../../../../api-reference/harbors/actions/describe).
546
+ *
547
+ * Preparation validates and temporarily stores the exact destination, lookup, and
548
+ * input. It returns a server-generated `execution_id` and `expires_at`. You do not
549
+ * supply an execution UUID. Preparation neither performs nor approves a destination
550
+ * mutation. Call [Execute action](../../../../../api-reference/harbors/actions/execute) with only
551
+ * the returned identifier within 15 minutes. Polytomic checks current permissions,
552
+ * provider capabilities, and the saved Connection again at execution.
553
+ *
554
+ * Supply one advertised lookup when `lookup_fields` is nonempty. Otherwise omit
555
+ * `lookup`. Omitted input fields remain unchanged. Explicit `null` requires
556
+ * `nullable: true`. Empty and blank strings follow the advertised constraints.
557
+ * Values are JSON scalars; arrays, nested objects, and type coercion are unsupported.
558
+ * Numbers must use integer JSON notation, without a decimal point or exponent, and
559
+ * lie between -9007199254740991 and 9007199254740991. Preserve opaque IDs as strings.
560
+ * Unknown envelope properties, duplicate keys, invalid Unicode, trailing JSON, and
561
+ * bodies larger than 256 KiB are rejected.
562
+ *
563
+ * ## Lifetime and recovery
564
+ *
565
+ * Prepared arguments are fixed for that identifier. Polytomic removes them when
566
+ * execution is claimed and periodically cleans up expired, unexecuted preparations.
567
+ * Execution receipts and Activity event metadata contain no submitted values.
568
+ * Polytomic retains a separate encrypted copy of the target and submitted values
569
+ * for 90 days from preparation. Only Organization administrators can reveal these
570
+ * details in the audit ledger. MCP receipts do not expose them. This evidence
571
+ * records your request, not a verified before-and-after record state.
572
+ * Preparation alone does not create an execution receipt.
573
+ *
574
+ * If the preparation response is lost, you may prepare again: no destination
575
+ * mutation occurred. Each preparation creates a distinct execution identifier.
576
+ *
577
+ * > ⚠️ Preserve the identifier after execution
578
+ * >
579
+ * > After submitting an execution, use its original `execution_id` to investigate
580
+ * > an uncertain outcome. Do not prepare a replacement action to retry it.
581
+ *
582
+ * Send a new nonzero UUID in `X-Polytomic-Activity-Request-ID` for each HTTP request.
583
+ * MCP supplies this transport header automatically. `X-Polytomic-Harbor-Session` is
584
+ * optional for direct REST requests; a supplied session must be active and bound
585
+ * to your credential and Harbor. Preparation is recorded as `action.prepared`,
586
+ * with its original actor and execution identifier. Expired, unexecuted
587
+ * preparations are recorded as `action.preparation_expired`. Execution records its
588
+ * own actor and attempt separately.
589
+ *
590
+ * @param {string} harbor_id - Unique identifier of the Harbor.
591
+ * @param {Polytomic.harbors.PrepareHarborActionRequest} request
592
+ * @param {ActionsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
593
+ *
594
+ * @throws {@link errors.PolytomicError}
595
+ * @throws {@link errors.PolytomicTimeoutError}
596
+ *
597
+ * @example
598
+ * await client.harbors.actions.prepare("248df4b7-aa70-47b8-a036-33ac447e668d", {
599
+ * connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
600
+ * input: {
601
+ * "key": "value"
602
+ * },
603
+ * operation_id: "operation_id",
604
+ * schema_id: "schema_id"
605
+ * })
606
+ */
607
+ prepare(harbor_id, request, requestOptions) {
608
+ return core.HttpResponsePromise.fromPromise(this.__prepare(harbor_id, request, requestOptions));
609
+ }
610
+ __prepare(harbor_id, request, requestOptions) {
611
+ return __awaiter(this, void 0, void 0, function* () {
612
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
613
+ const { "X-Polytomic-Harbor-Session": polytomicHarborSession, "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId } = request, _body = __rest(request, ["X-Polytomic-Harbor-Session", "X-Polytomic-Activity-Request-ID"]);
614
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
615
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
616
+ "X-Polytomic-Harbor-Session": polytomicHarborSession,
617
+ "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId,
618
+ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey,
619
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
620
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
621
+ const _response = yield core.fetcher({
622
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/actions/prepare`),
623
+ method: "POST",
624
+ headers: _headers,
625
+ contentType: "application/json",
626
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
627
+ requestType: "json",
628
+ body: (0, requestBody_1.mergeAdditionalBodyParameters)(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
629
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
630
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
631
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
632
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
633
+ logging: this._options.logging,
634
+ });
635
+ if (_response.ok) {
636
+ return {
637
+ data: _response.body,
638
+ rawResponse: _response.rawResponse,
639
+ };
640
+ }
641
+ if (_response.error.reason === "status-code") {
642
+ throw new errors.PolytomicError({
643
+ statusCode: _response.error.statusCode,
644
+ body: _response.error.body,
645
+ rawResponse: _response.rawResponse,
646
+ });
647
+ }
648
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/harbors/{harbor_id}/actions/prepare");
649
+ });
650
+ }
651
+ }
652
+ exports.ActionsClient = ActionsClient;