polytomic 25.9.8 → 25.9.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BaseClient.js +2 -2
- package/Client.d.ts +3 -0
- package/Client.js +21 -16
- package/api/resources/bulkSync/client/Client.d.ts +2 -0
- package/api/resources/bulkSync/client/Client.js +6 -0
- package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +2 -0
- package/api/resources/connections/client/Client.d.ts +42 -0
- package/api/resources/connections/client/Client.js +42 -0
- package/api/resources/connections/resources/proxy/client/Client.d.ts +13 -0
- package/api/resources/connections/resources/proxy/client/Client.js +13 -0
- package/api/resources/connections/resources/sharedConnections/client/Client.d.ts +42 -0
- package/api/resources/connections/resources/sharedConnections/client/Client.js +42 -0
- package/api/resources/harbors/client/Client.d.ts +38 -0
- package/api/resources/harbors/client/Client.js +94 -0
- package/api/resources/harbors/client/requests/RunHarborQueryRequest.d.ts +12 -0
- package/api/resources/harbors/client/requests/RunHarborQueryRequest.js +3 -0
- package/api/resources/harbors/client/requests/index.d.ts +1 -0
- package/api/resources/harbors/exports.d.ts +1 -0
- package/api/resources/harbors/exports.js +1 -0
- package/api/resources/harbors/index.d.ts +1 -0
- package/api/resources/harbors/index.js +1 -0
- package/api/resources/harbors/resources/actions/client/Client.d.ts +345 -0
- package/api/resources/harbors/resources/actions/client/Client.js +652 -0
- package/api/resources/harbors/resources/actions/client/index.d.ts +1 -0
- package/api/resources/harbors/resources/actions/client/index.js +17 -0
- package/api/resources/harbors/resources/actions/client/requests/ActionsDescribeRequest.d.ts +15 -0
- package/api/resources/harbors/resources/actions/client/requests/ActionsDescribeRequest.js +3 -0
- package/api/resources/harbors/resources/actions/client/requests/ActionsGetExecutionRequest.d.ts +8 -0
- package/api/resources/harbors/resources/actions/client/requests/ActionsGetExecutionRequest.js +3 -0
- package/api/resources/harbors/resources/actions/client/requests/ActionsListRequest.d.ts +17 -0
- package/api/resources/harbors/resources/actions/client/requests/ActionsListRequest.js +3 -0
- package/api/resources/harbors/resources/actions/client/requests/ExecuteHarborActionRequest.d.ts +12 -0
- package/api/resources/harbors/resources/actions/client/requests/ExecuteHarborActionRequest.js +3 -0
- package/api/resources/harbors/resources/actions/client/requests/LookupHarborActionRequest.d.ts +23 -0
- package/api/resources/harbors/resources/actions/client/requests/LookupHarborActionRequest.js +3 -0
- package/api/resources/harbors/resources/actions/client/requests/PrepareHarborActionRequest.d.ts +24 -0
- package/api/resources/harbors/resources/actions/client/requests/PrepareHarborActionRequest.js +3 -0
- package/api/resources/harbors/resources/actions/client/requests/index.d.ts +6 -0
- package/api/resources/harbors/resources/actions/client/requests/index.js +2 -0
- package/api/resources/harbors/resources/actions/exports.d.ts +2 -0
- package/api/resources/harbors/resources/actions/exports.js +21 -0
- package/api/resources/harbors/resources/actions/index.d.ts +1 -0
- package/api/resources/harbors/resources/actions/index.js +17 -0
- package/api/resources/harbors/resources/index.d.ts +2 -0
- package/api/resources/harbors/resources/index.js +41 -0
- package/api/resources/identity/client/Client.d.ts +1 -0
- package/api/resources/identity/client/Client.js +3 -0
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/operations/client/Client.d.ts +102 -0
- package/api/resources/operations/client/Client.js +233 -0
- package/api/resources/operations/client/index.d.ts +1 -0
- package/api/resources/operations/client/index.js +17 -0
- package/api/resources/operations/client/requests/SearchOperationsRequest.d.ts +14 -0
- package/api/resources/operations/client/requests/SearchOperationsRequest.js +3 -0
- package/api/resources/operations/client/requests/index.d.ts +1 -0
- package/api/resources/operations/client/requests/index.js +2 -0
- package/api/resources/operations/exports.d.ts +2 -0
- package/api/resources/operations/exports.js +21 -0
- package/api/resources/operations/index.d.ts +1 -0
- package/api/resources/operations/index.js +17 -0
- package/api/resources/queryRunner/client/Client.d.ts +5 -3
- package/api/resources/queryRunner/client/Client.js +5 -3
- package/api/resources/temporaryCredentials/client/Client.d.ts +6 -6
- package/api/resources/temporaryCredentials/client/Client.js +6 -6
- package/api/resources/webhooks/client/Client.d.ts +32 -0
- package/api/resources/webhooks/client/Client.js +89 -0
- package/api/resources/webhooks/client/requests/WebhooksListDeliveriesRequest.d.ts +21 -0
- package/api/resources/webhooks/client/requests/WebhooksListDeliveriesRequest.js +3 -0
- package/api/resources/webhooks/client/requests/index.d.ts +1 -0
- package/api/types/ActionLookup.d.ts +4 -0
- package/api/types/ActionLookup.js +3 -0
- package/api/types/BulkSchema.d.ts +4 -0
- package/api/types/BulkSchemaListItem.d.ts +4 -0
- package/api/types/BulkSyncDest.d.ts +2 -0
- package/api/types/BulkSyncTargetMode.d.ts +1 -0
- package/api/types/BulkSyncTargetMode.js +1 -0
- package/api/types/CompletionValue.d.ts +6 -0
- package/api/types/CompletionValue.js +3 -0
- package/api/types/ConnectionProxyApi.d.ts +10 -0
- package/api/types/ConnectionProxyApi.js +3 -0
- package/api/types/ConnectionProxyCall.d.ts +3 -1
- package/api/types/ConnectionProxyInfoResponse.d.ts +2 -0
- package/api/types/ConnectionResponseSchema.d.ts +15 -0
- package/api/types/FieldConfiguration.d.ts +2 -0
- package/api/types/HarborActionCapability.d.ts +12 -0
- package/api/types/HarborActionCapability.js +3 -0
- package/api/types/HarborActionDescribeEnvelope.d.ts +4 -0
- package/api/types/HarborActionDescribeEnvelope.js +3 -0
- package/api/types/HarborActionExecutionEnvelope.d.ts +4 -0
- package/api/types/HarborActionExecutionEnvelope.js +3 -0
- package/api/types/HarborActionExecutionResponse.d.ts +28 -0
- package/api/types/HarborActionExecutionResponse.js +13 -0
- package/api/types/HarborActionField.d.ts +14 -0
- package/api/types/HarborActionField.js +3 -0
- package/api/types/HarborActionListEnvelope.d.ts +10 -0
- package/api/types/HarborActionListEnvelope.js +3 -0
- package/api/types/HarborActionLookupEnvelope.d.ts +4 -0
- package/api/types/HarborActionLookupEnvelope.js +3 -0
- package/api/types/HarborActionPreparation.d.ts +4 -0
- package/api/types/HarborActionPreparation.js +3 -0
- package/api/types/HarborActionPreparationEnvelope.d.ts +4 -0
- package/api/types/HarborActionPreparationEnvelope.js +3 -0
- package/api/types/HarborActionSummary.d.ts +7 -0
- package/api/types/HarborActionSummary.js +3 -0
- package/api/types/HarboractivityapiHarborActivityMetadata.d.ts +7 -0
- package/api/types/IdentityCredentialHarborSchema.d.ts +2 -0
- package/api/types/OperationMatch.d.ts +16 -0
- package/api/types/OperationMatch.js +3 -0
- package/api/types/OperationSearchAvailabilityEnvelope.d.ts +11 -0
- package/api/types/OperationSearchAvailabilityEnvelope.js +3 -0
- package/api/types/OperationSearchRateLimit.d.ts +15 -0
- package/api/types/OperationSearchRateLimit.js +13 -0
- package/api/types/OperationSearchResult.d.ts +9 -0
- package/api/types/OperationSearchResult.js +3 -0
- package/api/types/PickValue.d.ts +2 -0
- package/api/types/SchemaConfiguration.d.ts +4 -0
- package/api/types/SchemaOperationIdempotency.d.ts +5 -0
- package/api/types/SchemaOperationIdempotency.js +3 -0
- package/api/types/SchemaRecord.d.ts +1 -0
- package/api/types/SchemaRecord.js +3 -0
- package/api/types/SearchOperationsEnvelope.d.ts +4 -0
- package/api/types/SearchOperationsEnvelope.js +3 -0
- package/api/types/SearchOperationsResponse.d.ts +7 -0
- package/api/types/SearchOperationsResponse.js +3 -0
- package/api/types/TargetField.d.ts +2 -0
- package/api/types/TemporaryCredentialSubject.d.ts +7 -7
- package/api/types/TemporaryCredentialSubject.js +3 -3
- package/api/types/TimeDuration.d.ts +1 -0
- package/api/types/TimeDuration.js +3 -0
- package/api/types/Webhook.d.ts +2 -0
- package/api/types/WebhookDeliveriesEnvelope.d.ts +5 -0
- package/api/types/WebhookDeliveriesEnvelope.js +3 -0
- package/api/types/WebhookDelivery.d.ts +13 -0
- package/api/types/WebhookDelivery.js +3 -0
- package/api/types/index.d.ts +24 -0
- package/api/types/index.js +24 -0
- package/package.json +1 -1
- package/reference.md +1156 -41
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/BaseClient.js
CHANGED
|
@@ -44,8 +44,8 @@ function normalizeClientOptions(options) {
|
|
|
44
44
|
const headers = (0, headers_1.mergeHeaders)({
|
|
45
45
|
"X-Fern-Language": "JavaScript",
|
|
46
46
|
"X-Fern-SDK-Name": "polytomic",
|
|
47
|
-
"X-Fern-SDK-Version": "25.9.
|
|
48
|
-
"User-Agent": "polytomic/25.9.
|
|
47
|
+
"X-Fern-SDK-Version": "25.9.10",
|
|
48
|
+
"User-Agent": "polytomic/25.9.10",
|
|
49
49
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
50
50
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
51
51
|
"X-Polytomic-Version": (_a = options === null || options === void 0 ? void 0 : options.version) !== null && _a !== void 0 ? _a : "2025-09-18",
|
package/Client.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { JobsClient } from "./api/resources/jobs/client/Client";
|
|
|
9
9
|
import { ModelSyncClient } from "./api/resources/modelSync/client/Client";
|
|
10
10
|
import { ModelsClient } from "./api/resources/models/client/Client";
|
|
11
11
|
import { NotificationsClient } from "./api/resources/notifications/client/Client";
|
|
12
|
+
import { OperationsClient } from "./api/resources/operations/client/Client";
|
|
12
13
|
import { OrganizationClient } from "./api/resources/organization/client/Client";
|
|
13
14
|
import { PermissionsClient } from "./api/resources/permissions/client/Client";
|
|
14
15
|
import { QueryRunnerClient } from "./api/resources/queryRunner/client/Client";
|
|
@@ -39,6 +40,7 @@ export declare class PolytomicClient {
|
|
|
39
40
|
protected _jobs: JobsClient | undefined;
|
|
40
41
|
protected _identity: IdentityClient | undefined;
|
|
41
42
|
protected _notifications: NotificationsClient | undefined;
|
|
43
|
+
protected _operations: OperationsClient | undefined;
|
|
42
44
|
protected _organization: OrganizationClient | undefined;
|
|
43
45
|
protected _activity: ActivityClient | undefined;
|
|
44
46
|
protected _users: UsersClient | undefined;
|
|
@@ -59,6 +61,7 @@ export declare class PolytomicClient {
|
|
|
59
61
|
get jobs(): JobsClient;
|
|
60
62
|
get identity(): IdentityClient;
|
|
61
63
|
get notifications(): NotificationsClient;
|
|
64
|
+
get operations(): OperationsClient;
|
|
62
65
|
get organization(): OrganizationClient;
|
|
63
66
|
get activity(): ActivityClient;
|
|
64
67
|
get users(): UsersClient;
|
package/Client.js
CHANGED
|
@@ -55,14 +55,15 @@ const Client_8 = require("./api/resources/jobs/client/Client");
|
|
|
55
55
|
const Client_9 = require("./api/resources/modelSync/client/Client");
|
|
56
56
|
const Client_10 = require("./api/resources/models/client/Client");
|
|
57
57
|
const Client_11 = require("./api/resources/notifications/client/Client");
|
|
58
|
-
const Client_12 = require("./api/resources/
|
|
59
|
-
const Client_13 = require("./api/resources/
|
|
60
|
-
const Client_14 = require("./api/resources/
|
|
61
|
-
const Client_15 = require("./api/resources/
|
|
62
|
-
const Client_16 = require("./api/resources/
|
|
63
|
-
const Client_17 = require("./api/resources/
|
|
64
|
-
const Client_18 = require("./api/resources/
|
|
65
|
-
const Client_19 = require("./api/resources/
|
|
58
|
+
const Client_12 = require("./api/resources/operations/client/Client");
|
|
59
|
+
const Client_13 = require("./api/resources/organization/client/Client");
|
|
60
|
+
const Client_14 = require("./api/resources/permissions/client/Client");
|
|
61
|
+
const Client_15 = require("./api/resources/queryRunner/client/Client");
|
|
62
|
+
const Client_16 = require("./api/resources/recordViewLinks/client/Client");
|
|
63
|
+
const Client_17 = require("./api/resources/schemas/client/Client");
|
|
64
|
+
const Client_18 = require("./api/resources/temporaryCredentials/client/Client");
|
|
65
|
+
const Client_19 = require("./api/resources/users/client/Client");
|
|
66
|
+
const Client_20 = require("./api/resources/webhooks/client/Client");
|
|
66
67
|
const BaseClient_1 = require("./BaseClient");
|
|
67
68
|
const core = __importStar(require("./core"));
|
|
68
69
|
class PolytomicClient {
|
|
@@ -79,11 +80,11 @@ class PolytomicClient {
|
|
|
79
80
|
}
|
|
80
81
|
get queryRunner() {
|
|
81
82
|
var _a;
|
|
82
|
-
return ((_a = this._queryRunner) !== null && _a !== void 0 ? _a : (this._queryRunner = new
|
|
83
|
+
return ((_a = this._queryRunner) !== null && _a !== void 0 ? _a : (this._queryRunner = new Client_15.QueryRunnerClient(this._options)));
|
|
83
84
|
}
|
|
84
85
|
get schemas() {
|
|
85
86
|
var _a;
|
|
86
|
-
return ((_a = this._schemas) !== null && _a !== void 0 ? _a : (this._schemas = new
|
|
87
|
+
return ((_a = this._schemas) !== null && _a !== void 0 ? _a : (this._schemas = new Client_17.SchemasClient(this._options)));
|
|
87
88
|
}
|
|
88
89
|
get models() {
|
|
89
90
|
var _a;
|
|
@@ -117,9 +118,13 @@ class PolytomicClient {
|
|
|
117
118
|
var _a;
|
|
118
119
|
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_11.NotificationsClient(this._options)));
|
|
119
120
|
}
|
|
121
|
+
get operations() {
|
|
122
|
+
var _a;
|
|
123
|
+
return ((_a = this._operations) !== null && _a !== void 0 ? _a : (this._operations = new Client_12.OperationsClient(this._options)));
|
|
124
|
+
}
|
|
120
125
|
get organization() {
|
|
121
126
|
var _a;
|
|
122
|
-
return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new
|
|
127
|
+
return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new Client_13.OrganizationClient(this._options)));
|
|
123
128
|
}
|
|
124
129
|
get activity() {
|
|
125
130
|
var _a;
|
|
@@ -127,23 +132,23 @@ class PolytomicClient {
|
|
|
127
132
|
}
|
|
128
133
|
get users() {
|
|
129
134
|
var _a;
|
|
130
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new
|
|
135
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_19.UsersClient(this._options)));
|
|
131
136
|
}
|
|
132
137
|
get recordViewLinks() {
|
|
133
138
|
var _a;
|
|
134
|
-
return ((_a = this._recordViewLinks) !== null && _a !== void 0 ? _a : (this._recordViewLinks = new
|
|
139
|
+
return ((_a = this._recordViewLinks) !== null && _a !== void 0 ? _a : (this._recordViewLinks = new Client_16.RecordViewLinksClient(this._options)));
|
|
135
140
|
}
|
|
136
141
|
get temporaryCredentials() {
|
|
137
142
|
var _a;
|
|
138
|
-
return ((_a = this._temporaryCredentials) !== null && _a !== void 0 ? _a : (this._temporaryCredentials = new
|
|
143
|
+
return ((_a = this._temporaryCredentials) !== null && _a !== void 0 ? _a : (this._temporaryCredentials = new Client_18.TemporaryCredentialsClient(this._options)));
|
|
139
144
|
}
|
|
140
145
|
get webhooks() {
|
|
141
146
|
var _a;
|
|
142
|
-
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new
|
|
147
|
+
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_20.WebhooksClient(this._options)));
|
|
143
148
|
}
|
|
144
149
|
get permissions() {
|
|
145
150
|
var _a;
|
|
146
|
-
return ((_a = this._permissions) !== null && _a !== void 0 ? _a : (this._permissions = new
|
|
151
|
+
return ((_a = this._permissions) !== null && _a !== void 0 ? _a : (this._permissions = new Client_14.PermissionsClient(this._options)));
|
|
147
152
|
}
|
|
148
153
|
/**
|
|
149
154
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
@@ -192,6 +192,7 @@ export declare class BulkSyncClient {
|
|
|
192
192
|
* @throws {@link Polytomic.BadRequestError}
|
|
193
193
|
* @throws {@link Polytomic.ForbiddenError}
|
|
194
194
|
* @throws {@link Polytomic.NotFoundError}
|
|
195
|
+
* @throws {@link Polytomic.ConflictError}
|
|
195
196
|
* @throws {@link Polytomic.InternalServerError}
|
|
196
197
|
* @throws {@link errors.PolytomicError}
|
|
197
198
|
* @throws {@link errors.PolytomicTimeoutError}
|
|
@@ -255,6 +256,7 @@ export declare class BulkSyncClient {
|
|
|
255
256
|
*
|
|
256
257
|
* @throws {@link Polytomic.ForbiddenError}
|
|
257
258
|
* @throws {@link Polytomic.NotFoundError}
|
|
259
|
+
* @throws {@link Polytomic.ConflictError}
|
|
258
260
|
* @throws {@link Polytomic.InternalServerError}
|
|
259
261
|
* @throws {@link errors.PolytomicError}
|
|
260
262
|
* @throws {@link errors.PolytomicTimeoutError}
|
|
@@ -381,6 +381,7 @@ class BulkSyncClient {
|
|
|
381
381
|
* @throws {@link Polytomic.BadRequestError}
|
|
382
382
|
* @throws {@link Polytomic.ForbiddenError}
|
|
383
383
|
* @throws {@link Polytomic.NotFoundError}
|
|
384
|
+
* @throws {@link Polytomic.ConflictError}
|
|
384
385
|
* @throws {@link Polytomic.InternalServerError}
|
|
385
386
|
* @throws {@link errors.PolytomicError}
|
|
386
387
|
* @throws {@link errors.PolytomicTimeoutError}
|
|
@@ -434,6 +435,8 @@ class BulkSyncClient {
|
|
|
434
435
|
throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
435
436
|
case 404:
|
|
436
437
|
throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
|
|
438
|
+
case 409:
|
|
439
|
+
throw new Polytomic.ConflictError(_response.error.body, _response.rawResponse);
|
|
437
440
|
case 500:
|
|
438
441
|
throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
|
|
439
442
|
default:
|
|
@@ -541,6 +544,7 @@ class BulkSyncClient {
|
|
|
541
544
|
*
|
|
542
545
|
* @throws {@link Polytomic.ForbiddenError}
|
|
543
546
|
* @throws {@link Polytomic.NotFoundError}
|
|
547
|
+
* @throws {@link Polytomic.ConflictError}
|
|
544
548
|
* @throws {@link Polytomic.InternalServerError}
|
|
545
549
|
* @throws {@link errors.PolytomicError}
|
|
546
550
|
* @throws {@link errors.PolytomicTimeoutError}
|
|
@@ -584,6 +588,8 @@ class BulkSyncClient {
|
|
|
584
588
|
throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
585
589
|
case 404:
|
|
586
590
|
throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
|
|
591
|
+
case 409:
|
|
592
|
+
throw new Polytomic.ConflictError(_response.error.body, _response.rawResponse);
|
|
587
593
|
case 500:
|
|
588
594
|
throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
|
|
589
595
|
default:
|
|
@@ -14,6 +14,8 @@ export interface UpdateBulkSchema {
|
|
|
14
14
|
fields?: Polytomic.UpdateBulkField[];
|
|
15
15
|
/** Row-level filters applied when reading from the source. */
|
|
16
16
|
filters?: Polytomic.BulkFilter[];
|
|
17
|
+
/** Whether a companion history table is maintained beside this schema's output. Requires a replicate-mode sync to a destination reporting supports_history_mode. Omit to keep the current value. */
|
|
18
|
+
history_enabled?: boolean;
|
|
17
19
|
/** Source field used to partition rows when writing to the destination. */
|
|
18
20
|
partition_key?: string;
|
|
19
21
|
/** Source field used to detect changes between incremental sync runs. */
|
|
@@ -102,6 +102,27 @@ export declare class ConnectionsClient {
|
|
|
102
102
|
* [`POST /api/connections/{id}/schemas/refresh`](../../api-reference/schemas/refresh)
|
|
103
103
|
* followed by [`GET /api/connections/{id}/schemas/status`](../../api-reference/schemas/get-status).
|
|
104
104
|
*
|
|
105
|
+
* ## Observed rate limits
|
|
106
|
+
*
|
|
107
|
+
* You can use `rate_limit` to inspect observed rate limiting separately from
|
|
108
|
+
* Connection health. A Connection can be healthy while Polytomic has an active
|
|
109
|
+
* rate-limit marker. Shared Connections combine observations recorded for their
|
|
110
|
+
* own ID and their root Connection. Observations recorded only for another shared
|
|
111
|
+
* copy are not included.
|
|
112
|
+
*
|
|
113
|
+
* When these observed periods overlap or touch, `limited_since` reflects the start
|
|
114
|
+
* of the continuous period and `expires_at` reflects its latest expiry. An expired
|
|
115
|
+
* period separated from the active period by a gap does not extend that start.
|
|
116
|
+
*
|
|
117
|
+
* > ⚠️ Observation, not a capacity guarantee
|
|
118
|
+
* >
|
|
119
|
+
* > An active marker does not mean every endpoint or sync is blocked. No active
|
|
120
|
+
* > marker does not guarantee that the upstream service has capacity. The marker
|
|
121
|
+
* > expiry can be extended and is not a promised provider reset or exact retry time.
|
|
122
|
+
*
|
|
123
|
+
* If any required lookup is unavailable, `rate_limit` is `null`. This does not change
|
|
124
|
+
* `status` or `status_error`, and the Connection response is still returned.
|
|
125
|
+
*
|
|
105
126
|
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
106
127
|
*
|
|
107
128
|
* @throws {@link Polytomic.InternalServerError}
|
|
@@ -248,6 +269,27 @@ export declare class ConnectionsClient {
|
|
|
248
269
|
* track progress via
|
|
249
270
|
* [`GET /api/connections/{id}/schemas/status`](../../../api-reference/schemas/get-status).
|
|
250
271
|
*
|
|
272
|
+
* ## Observed rate limits
|
|
273
|
+
*
|
|
274
|
+
* You can use `rate_limit` to inspect observed rate limiting separately from
|
|
275
|
+
* Connection health. A Connection can be healthy while Polytomic has an active
|
|
276
|
+
* rate-limit marker. Shared Connections combine observations recorded for their
|
|
277
|
+
* own ID and their root Connection. Observations recorded only for another shared
|
|
278
|
+
* copy are not included.
|
|
279
|
+
*
|
|
280
|
+
* When these observed periods overlap or touch, `limited_since` reflects the start
|
|
281
|
+
* of the continuous period and `expires_at` reflects its latest expiry. An expired
|
|
282
|
+
* period separated from the active period by a gap does not extend that start.
|
|
283
|
+
*
|
|
284
|
+
* > ⚠️ Observation, not a capacity guarantee
|
|
285
|
+
* >
|
|
286
|
+
* > An active marker does not mean every endpoint or sync is blocked. No active
|
|
287
|
+
* > marker does not guarantee that the upstream service has capacity. The marker
|
|
288
|
+
* > expiry can be extended and is not a promised provider reset or exact retry time.
|
|
289
|
+
*
|
|
290
|
+
* If any required lookup is unavailable, `rate_limit` is `null`. This does not change
|
|
291
|
+
* `status` or `status_error`, and the Connection response is still returned.
|
|
292
|
+
*
|
|
251
293
|
* @param {string} id
|
|
252
294
|
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
253
295
|
*
|
|
@@ -276,6 +276,27 @@ class ConnectionsClient {
|
|
|
276
276
|
* [`POST /api/connections/{id}/schemas/refresh`](../../api-reference/schemas/refresh)
|
|
277
277
|
* followed by [`GET /api/connections/{id}/schemas/status`](../../api-reference/schemas/get-status).
|
|
278
278
|
*
|
|
279
|
+
* ## Observed rate limits
|
|
280
|
+
*
|
|
281
|
+
* You can use `rate_limit` to inspect observed rate limiting separately from
|
|
282
|
+
* Connection health. A Connection can be healthy while Polytomic has an active
|
|
283
|
+
* rate-limit marker. Shared Connections combine observations recorded for their
|
|
284
|
+
* own ID and their root Connection. Observations recorded only for another shared
|
|
285
|
+
* copy are not included.
|
|
286
|
+
*
|
|
287
|
+
* When these observed periods overlap or touch, `limited_since` reflects the start
|
|
288
|
+
* of the continuous period and `expires_at` reflects its latest expiry. An expired
|
|
289
|
+
* period separated from the active period by a gap does not extend that start.
|
|
290
|
+
*
|
|
291
|
+
* > ⚠️ Observation, not a capacity guarantee
|
|
292
|
+
* >
|
|
293
|
+
* > An active marker does not mean every endpoint or sync is blocked. No active
|
|
294
|
+
* > marker does not guarantee that the upstream service has capacity. The marker
|
|
295
|
+
* > expiry can be extended and is not a promised provider reset or exact retry time.
|
|
296
|
+
*
|
|
297
|
+
* If any required lookup is unavailable, `rate_limit` is `null`. This does not change
|
|
298
|
+
* `status` or `status_error`, and the Connection response is still returned.
|
|
299
|
+
*
|
|
279
300
|
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
280
301
|
*
|
|
281
302
|
* @throws {@link Polytomic.InternalServerError}
|
|
@@ -652,6 +673,27 @@ class ConnectionsClient {
|
|
|
652
673
|
* track progress via
|
|
653
674
|
* [`GET /api/connections/{id}/schemas/status`](../../../api-reference/schemas/get-status).
|
|
654
675
|
*
|
|
676
|
+
* ## Observed rate limits
|
|
677
|
+
*
|
|
678
|
+
* You can use `rate_limit` to inspect observed rate limiting separately from
|
|
679
|
+
* Connection health. A Connection can be healthy while Polytomic has an active
|
|
680
|
+
* rate-limit marker. Shared Connections combine observations recorded for their
|
|
681
|
+
* own ID and their root Connection. Observations recorded only for another shared
|
|
682
|
+
* copy are not included.
|
|
683
|
+
*
|
|
684
|
+
* When these observed periods overlap or touch, `limited_since` reflects the start
|
|
685
|
+
* of the continuous period and `expires_at` reflects its latest expiry. An expired
|
|
686
|
+
* period separated from the active period by a gap does not extend that start.
|
|
687
|
+
*
|
|
688
|
+
* > ⚠️ Observation, not a capacity guarantee
|
|
689
|
+
* >
|
|
690
|
+
* > An active marker does not mean every endpoint or sync is blocked. No active
|
|
691
|
+
* > marker does not guarantee that the upstream service has capacity. The marker
|
|
692
|
+
* > expiry can be extended and is not a promised provider reset or exact retry time.
|
|
693
|
+
*
|
|
694
|
+
* If any required lookup is unavailable, `rate_limit` is `null`. This does not change
|
|
695
|
+
* `status` or `status_error`, and the Connection response is still returned.
|
|
696
|
+
*
|
|
655
697
|
* @param {string} id
|
|
656
698
|
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
657
699
|
*
|
|
@@ -27,6 +27,10 @@ export declare class ProxyClient {
|
|
|
27
27
|
*
|
|
28
28
|
* ## Important behavior
|
|
29
29
|
*
|
|
30
|
+
* - For connections that expose more than one API (listed in `apis` in the proxy
|
|
31
|
+
* info response), set `request.api` to the name of the API to call. Requests
|
|
32
|
+
* without `request.api` go to the default API. `request.api` is rejected for
|
|
33
|
+
* connections that expose a single API.
|
|
30
34
|
* - `request.path` must be relative and start with `/`.
|
|
31
35
|
* - Use either `request.query` or `request.rawQuery`, not both.
|
|
32
36
|
* - Caller-supplied headers are merged with inherited headers, but inherited auth
|
|
@@ -34,6 +38,9 @@ export declare class ProxyClient {
|
|
|
34
38
|
* - The proxy strips a fixed set of request and response headers for safety.
|
|
35
39
|
* - Response bodies larger than the configured maximum are truncated, and
|
|
36
40
|
* `truncated` is set to `true`.
|
|
41
|
+
* - A `429` means Polytomic's proxy rate limit was reached, or the connection's
|
|
42
|
+
* upstream quota, which the proxy shares with the connection's syncs, is
|
|
43
|
+
* exhausted.
|
|
37
44
|
*
|
|
38
45
|
* To run a `GET` request asynchronously, set `async` to `true`. The initial
|
|
39
46
|
* response returns `status: 202`, `jobId`, `jobStatus`, and `jobUrl`. Poll
|
|
@@ -84,6 +91,12 @@ export declare class ProxyClient {
|
|
|
84
91
|
* - allowed HTTP methods and body shapes
|
|
85
92
|
* - timeout, rate-limit, and payload-size limits
|
|
86
93
|
*
|
|
94
|
+
* Some connections reach more than one upstream API, each with its own base URL
|
|
95
|
+
* and quota. For these, the response includes `apis`: one entry per API with its
|
|
96
|
+
* `name`, `description`, whether it is the `default`, and its own
|
|
97
|
+
* `inheritedBase`. The top-level `inheritedBase` describes the default API.
|
|
98
|
+
* Connections with a single API omit `apis`.
|
|
99
|
+
*
|
|
87
100
|
* Sensitive inherited header and query values are redacted in the response. The
|
|
88
101
|
* contract is still useful for discovering which keys are fixed by the
|
|
89
102
|
* connection, even though their raw values are not exposed.
|
|
@@ -71,6 +71,10 @@ class ProxyClient {
|
|
|
71
71
|
*
|
|
72
72
|
* ## Important behavior
|
|
73
73
|
*
|
|
74
|
+
* - For connections that expose more than one API (listed in `apis` in the proxy
|
|
75
|
+
* info response), set `request.api` to the name of the API to call. Requests
|
|
76
|
+
* without `request.api` go to the default API. `request.api` is rejected for
|
|
77
|
+
* connections that expose a single API.
|
|
74
78
|
* - `request.path` must be relative and start with `/`.
|
|
75
79
|
* - Use either `request.query` or `request.rawQuery`, not both.
|
|
76
80
|
* - Caller-supplied headers are merged with inherited headers, but inherited auth
|
|
@@ -78,6 +82,9 @@ class ProxyClient {
|
|
|
78
82
|
* - The proxy strips a fixed set of request and response headers for safety.
|
|
79
83
|
* - Response bodies larger than the configured maximum are truncated, and
|
|
80
84
|
* `truncated` is set to `true`.
|
|
85
|
+
* - A `429` means Polytomic's proxy rate limit was reached, or the connection's
|
|
86
|
+
* upstream quota, which the proxy shares with the connection's syncs, is
|
|
87
|
+
* exhausted.
|
|
81
88
|
*
|
|
82
89
|
* To run a `GET` request asynchronously, set `async` to `true`. The initial
|
|
83
90
|
* response returns `status: 202`, `jobId`, `jobStatus`, and `jobUrl`. Poll
|
|
@@ -186,6 +193,12 @@ class ProxyClient {
|
|
|
186
193
|
* - allowed HTTP methods and body shapes
|
|
187
194
|
* - timeout, rate-limit, and payload-size limits
|
|
188
195
|
*
|
|
196
|
+
* Some connections reach more than one upstream API, each with its own base URL
|
|
197
|
+
* and quota. For these, the response includes `apis`: one entry per API with its
|
|
198
|
+
* `name`, `description`, whether it is the `default`, and its own
|
|
199
|
+
* `inheritedBase`. The top-level `inheritedBase` describes the default API.
|
|
200
|
+
* Connections with a single API omit `apis`.
|
|
201
|
+
*
|
|
189
202
|
* Sensitive inherited header and query values are redacted in the response. The
|
|
190
203
|
* contract is still useful for discovering which keys are fixed by the
|
|
191
204
|
* connection, even though their raw values are not exposed.
|
|
@@ -23,6 +23,27 @@ export declare class SharedConnectionsClient {
|
|
|
23
23
|
* [`POST /api/organizations/{org_id}/connections/{connection_id}/share`](../../../../api-reference/connections/create-shared-connection)
|
|
24
24
|
* for the v5 partner-scoped flow.
|
|
25
25
|
*
|
|
26
|
+
* ## Observed rate limits
|
|
27
|
+
*
|
|
28
|
+
* You can use `rate_limit` to inspect observed rate limiting separately from
|
|
29
|
+
* Connection health. A Connection can be healthy while Polytomic has an active
|
|
30
|
+
* rate-limit marker. Shared Connections combine observations recorded for their
|
|
31
|
+
* own ID and their root Connection. Observations recorded only for another shared
|
|
32
|
+
* copy are not included.
|
|
33
|
+
*
|
|
34
|
+
* When these observed periods overlap or touch, `limited_since` reflects the start
|
|
35
|
+
* of the continuous period and `expires_at` reflects its latest expiry. An expired
|
|
36
|
+
* period separated from the active period by a gap does not extend that start.
|
|
37
|
+
*
|
|
38
|
+
* > ⚠️ Observation, not a capacity guarantee
|
|
39
|
+
* >
|
|
40
|
+
* > An active marker does not mean every endpoint or sync is blocked. No active
|
|
41
|
+
* > marker does not guarantee that the upstream service has capacity. The marker
|
|
42
|
+
* > expiry can be extended and is not a promised provider reset or exact retry time.
|
|
43
|
+
*
|
|
44
|
+
* If any required lookup is unavailable, `rate_limit` is `null`. This does not change
|
|
45
|
+
* `status` or `status_error`, and the Connection response is still returned.
|
|
46
|
+
*
|
|
26
47
|
* @param {string} id - Unique identifier of the parent connection whose shared copies should be listed.
|
|
27
48
|
* @param {SharedConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
49
|
*
|
|
@@ -49,6 +70,27 @@ export declare class SharedConnectionsClient {
|
|
|
49
70
|
* the partner owner organization and the caller needs to audit which child
|
|
50
71
|
* organizations already have a shared copy.
|
|
51
72
|
*
|
|
73
|
+
* ## Observed rate limits
|
|
74
|
+
*
|
|
75
|
+
* You can use `rate_limit` to inspect observed rate limiting separately from
|
|
76
|
+
* Connection health. A Connection can be healthy while Polytomic has an active
|
|
77
|
+
* rate-limit marker. Shared Connections combine observations recorded for their
|
|
78
|
+
* own ID and their root Connection. Observations recorded only for another shared
|
|
79
|
+
* copy are not included.
|
|
80
|
+
*
|
|
81
|
+
* When these observed periods overlap or touch, `limited_since` reflects the start
|
|
82
|
+
* of the continuous period and `expires_at` reflects its latest expiry. An expired
|
|
83
|
+
* period separated from the active period by a gap does not extend that start.
|
|
84
|
+
*
|
|
85
|
+
* > ⚠️ Observation, not a capacity guarantee
|
|
86
|
+
* >
|
|
87
|
+
* > An active marker does not mean every endpoint or sync is blocked. No active
|
|
88
|
+
* > marker does not guarantee that the upstream service has capacity. The marker
|
|
89
|
+
* > expiry can be extended and is not a promised provider reset or exact retry time.
|
|
90
|
+
*
|
|
91
|
+
* If any required lookup is unavailable, `rate_limit` is `null`. This does not change
|
|
92
|
+
* `status` or `status_error`, and the Connection response is still returned.
|
|
93
|
+
*
|
|
52
94
|
* @param {string} org_id - Unique identifier of the organization that owns the parent connection.
|
|
53
95
|
* @param {string} connection_id - Unique identifier of the parent connection whose shared copies should be listed.
|
|
54
96
|
* @param {SharedConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -67,6 +67,27 @@ class SharedConnectionsClient {
|
|
|
67
67
|
* [`POST /api/organizations/{org_id}/connections/{connection_id}/share`](../../../../api-reference/connections/create-shared-connection)
|
|
68
68
|
* for the v5 partner-scoped flow.
|
|
69
69
|
*
|
|
70
|
+
* ## Observed rate limits
|
|
71
|
+
*
|
|
72
|
+
* You can use `rate_limit` to inspect observed rate limiting separately from
|
|
73
|
+
* Connection health. A Connection can be healthy while Polytomic has an active
|
|
74
|
+
* rate-limit marker. Shared Connections combine observations recorded for their
|
|
75
|
+
* own ID and their root Connection. Observations recorded only for another shared
|
|
76
|
+
* copy are not included.
|
|
77
|
+
*
|
|
78
|
+
* When these observed periods overlap or touch, `limited_since` reflects the start
|
|
79
|
+
* of the continuous period and `expires_at` reflects its latest expiry. An expired
|
|
80
|
+
* period separated from the active period by a gap does not extend that start.
|
|
81
|
+
*
|
|
82
|
+
* > ⚠️ Observation, not a capacity guarantee
|
|
83
|
+
* >
|
|
84
|
+
* > An active marker does not mean every endpoint or sync is blocked. No active
|
|
85
|
+
* > marker does not guarantee that the upstream service has capacity. The marker
|
|
86
|
+
* > expiry can be extended and is not a promised provider reset or exact retry time.
|
|
87
|
+
*
|
|
88
|
+
* If any required lookup is unavailable, `rate_limit` is `null`. This does not change
|
|
89
|
+
* `status` or `status_error`, and the Connection response is still returned.
|
|
90
|
+
*
|
|
70
91
|
* @param {string} id - Unique identifier of the parent connection whose shared copies should be listed.
|
|
71
92
|
* @param {SharedConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
72
93
|
*
|
|
@@ -139,6 +160,27 @@ class SharedConnectionsClient {
|
|
|
139
160
|
* the partner owner organization and the caller needs to audit which child
|
|
140
161
|
* organizations already have a shared copy.
|
|
141
162
|
*
|
|
163
|
+
* ## Observed rate limits
|
|
164
|
+
*
|
|
165
|
+
* You can use `rate_limit` to inspect observed rate limiting separately from
|
|
166
|
+
* Connection health. A Connection can be healthy while Polytomic has an active
|
|
167
|
+
* rate-limit marker. Shared Connections combine observations recorded for their
|
|
168
|
+
* own ID and their root Connection. Observations recorded only for another shared
|
|
169
|
+
* copy are not included.
|
|
170
|
+
*
|
|
171
|
+
* When these observed periods overlap or touch, `limited_since` reflects the start
|
|
172
|
+
* of the continuous period and `expires_at` reflects its latest expiry. An expired
|
|
173
|
+
* period separated from the active period by a gap does not extend that start.
|
|
174
|
+
*
|
|
175
|
+
* > ⚠️ Observation, not a capacity guarantee
|
|
176
|
+
* >
|
|
177
|
+
* > An active marker does not mean every endpoint or sync is blocked. No active
|
|
178
|
+
* > marker does not guarantee that the upstream service has capacity. The marker
|
|
179
|
+
* > expiry can be extended and is not a promised provider reset or exact retry time.
|
|
180
|
+
*
|
|
181
|
+
* If any required lookup is unavailable, `rate_limit` is `null`. This does not change
|
|
182
|
+
* `status` or `status_error`, and the Connection response is still returned.
|
|
183
|
+
*
|
|
142
184
|
* @param {string} org_id - Unique identifier of the organization that owns the parent connection.
|
|
143
185
|
* @param {string} connection_id - Unique identifier of the parent connection whose shared copies should be listed.
|
|
144
186
|
* @param {SharedConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -2,6 +2,7 @@ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOption
|
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient";
|
|
3
3
|
import * as core from "../../../../core";
|
|
4
4
|
import * as Polytomic from "../../../index";
|
|
5
|
+
import { ActionsClient } from "../resources/actions/client/Client";
|
|
5
6
|
export declare namespace HarborsClient {
|
|
6
7
|
type Options = BaseClientOptions;
|
|
7
8
|
interface RequestOptions extends BaseRequestOptions {
|
|
@@ -11,7 +12,9 @@ export declare namespace HarborsClient {
|
|
|
11
12
|
}
|
|
12
13
|
export declare class HarborsClient {
|
|
13
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<HarborsClient.Options>;
|
|
15
|
+
protected _actions: ActionsClient | undefined;
|
|
14
16
|
constructor(options?: HarborsClient.Options);
|
|
17
|
+
get actions(): ActionsClient;
|
|
15
18
|
/**
|
|
16
19
|
* Lists profile-authorized connections and capabilities for the current Harbor credential.
|
|
17
20
|
*
|
|
@@ -641,6 +644,41 @@ export declare class HarborsClient {
|
|
|
641
644
|
*/
|
|
642
645
|
deleteKey(harbor_id: string, key_id: string, requestOptions?: HarborsClient.IdempotentRequestOptions): core.HttpResponsePromise<Polytomic.RevokedHarborKeyEnvelope>;
|
|
643
646
|
private __deleteKey;
|
|
647
|
+
/**
|
|
648
|
+
* Submits a query against the Harbor backing connection for asynchronous execution.
|
|
649
|
+
*
|
|
650
|
+
* Use a scoped credential bound to this Harbor. The query runs only against the
|
|
651
|
+
* Harbor's backing connection; you cannot select another connection on this route.
|
|
652
|
+
* Send a unique `X-Polytomic-Activity-Request-ID` UUID with each submission. The
|
|
653
|
+
* `X-Polytomic-Harbor-Session` header is optional; if you send one, it must be
|
|
654
|
+
* valid for this Harbor.
|
|
655
|
+
*
|
|
656
|
+
* The response contains a query ID and an initial `created` status. Poll
|
|
657
|
+
* [`GET /api/queries/{id}`](../../../../api-reference/query-runner/get-query) with that ID
|
|
658
|
+
* until the status is `done`, `failed`, or `unknown`. Follow the result endpoint's
|
|
659
|
+
* pagination links for additional rows. Results are temporary; check `expires`
|
|
660
|
+
* on the completed query.
|
|
661
|
+
*
|
|
662
|
+
* @param {string} harbor_id - Unique identifier of the Harbor whose backing connection runs the query.
|
|
663
|
+
* @param {Polytomic.RunHarborQueryRequest} request
|
|
664
|
+
* @param {HarborsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
665
|
+
*
|
|
666
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
667
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
668
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
669
|
+
* @throws {@link Polytomic.ConflictError}
|
|
670
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
671
|
+
* @throws {@link Polytomic.ServiceUnavailableError}
|
|
672
|
+
* @throws {@link errors.PolytomicError}
|
|
673
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
674
|
+
*
|
|
675
|
+
* @example
|
|
676
|
+
* await client.harbors.runQuery("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
677
|
+
* query: "SELECT 1 AS n"
|
|
678
|
+
* })
|
|
679
|
+
*/
|
|
680
|
+
runQuery(harbor_id: string, request: Polytomic.RunHarborQueryRequest, requestOptions?: HarborsClient.IdempotentRequestOptions): core.HttpResponsePromise<Polytomic.RunQueryEnvelope>;
|
|
681
|
+
private __runQuery;
|
|
644
682
|
/**
|
|
645
683
|
* Lists current published saved queries for a Harbor.
|
|
646
684
|
*
|
|
@@ -63,10 +63,15 @@ const environments = __importStar(require("../../../../environments"));
|
|
|
63
63
|
const handleNonStatusCodeError_1 = require("../../../../errors/handleNonStatusCodeError");
|
|
64
64
|
const errors = __importStar(require("../../../../errors/index"));
|
|
65
65
|
const Polytomic = __importStar(require("../../../index"));
|
|
66
|
+
const Client_1 = require("../resources/actions/client/Client");
|
|
66
67
|
class HarborsClient {
|
|
67
68
|
constructor(options = {}) {
|
|
68
69
|
this._options = (0, BaseClient_1.normalizeClientOptionsWithAuth)(options);
|
|
69
70
|
}
|
|
71
|
+
get actions() {
|
|
72
|
+
var _a;
|
|
73
|
+
return ((_a = this._actions) !== null && _a !== void 0 ? _a : (this._actions = new Client_1.ActionsClient(this._options)));
|
|
74
|
+
}
|
|
70
75
|
/**
|
|
71
76
|
* Lists profile-authorized connections and capabilities for the current Harbor credential.
|
|
72
77
|
*
|
|
@@ -1930,6 +1935,95 @@ class HarborsClient {
|
|
|
1930
1935
|
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/api/harbors/{harbor_id}/keys/{key_id}");
|
|
1931
1936
|
});
|
|
1932
1937
|
}
|
|
1938
|
+
/**
|
|
1939
|
+
* Submits a query against the Harbor backing connection for asynchronous execution.
|
|
1940
|
+
*
|
|
1941
|
+
* Use a scoped credential bound to this Harbor. The query runs only against the
|
|
1942
|
+
* Harbor's backing connection; you cannot select another connection on this route.
|
|
1943
|
+
* Send a unique `X-Polytomic-Activity-Request-ID` UUID with each submission. The
|
|
1944
|
+
* `X-Polytomic-Harbor-Session` header is optional; if you send one, it must be
|
|
1945
|
+
* valid for this Harbor.
|
|
1946
|
+
*
|
|
1947
|
+
* The response contains a query ID and an initial `created` status. Poll
|
|
1948
|
+
* [`GET /api/queries/{id}`](../../../../api-reference/query-runner/get-query) with that ID
|
|
1949
|
+
* until the status is `done`, `failed`, or `unknown`. Follow the result endpoint's
|
|
1950
|
+
* pagination links for additional rows. Results are temporary; check `expires`
|
|
1951
|
+
* on the completed query.
|
|
1952
|
+
*
|
|
1953
|
+
* @param {string} harbor_id - Unique identifier of the Harbor whose backing connection runs the query.
|
|
1954
|
+
* @param {Polytomic.RunHarborQueryRequest} request
|
|
1955
|
+
* @param {HarborsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
1956
|
+
*
|
|
1957
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
1958
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
1959
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
1960
|
+
* @throws {@link Polytomic.ConflictError}
|
|
1961
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
1962
|
+
* @throws {@link Polytomic.ServiceUnavailableError}
|
|
1963
|
+
* @throws {@link errors.PolytomicError}
|
|
1964
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
1965
|
+
*
|
|
1966
|
+
* @example
|
|
1967
|
+
* await client.harbors.runQuery("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
1968
|
+
* query: "SELECT 1 AS n"
|
|
1969
|
+
* })
|
|
1970
|
+
*/
|
|
1971
|
+
runQuery(harbor_id, request, requestOptions) {
|
|
1972
|
+
return core.HttpResponsePromise.fromPromise(this.__runQuery(harbor_id, request, requestOptions));
|
|
1973
|
+
}
|
|
1974
|
+
__runQuery(harbor_id, request, requestOptions) {
|
|
1975
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1976
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1977
|
+
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"]);
|
|
1978
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1979
|
+
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
1980
|
+
"X-Polytomic-Harbor-Session": polytomicHarborSession,
|
|
1981
|
+
"X-Polytomic-Activity-Request-ID": polytomicActivityRequestId,
|
|
1982
|
+
"Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey,
|
|
1983
|
+
"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",
|
|
1984
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1985
|
+
const _response = yield core.fetcher({
|
|
1986
|
+
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)}/query`),
|
|
1987
|
+
method: "POST",
|
|
1988
|
+
headers: _headers,
|
|
1989
|
+
contentType: "application/json",
|
|
1990
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1991
|
+
requestType: "json",
|
|
1992
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1993
|
+
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,
|
|
1994
|
+
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,
|
|
1995
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1996
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1997
|
+
logging: this._options.logging,
|
|
1998
|
+
});
|
|
1999
|
+
if (_response.ok) {
|
|
2000
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
2001
|
+
}
|
|
2002
|
+
if (_response.error.reason === "status-code") {
|
|
2003
|
+
switch (_response.error.statusCode) {
|
|
2004
|
+
case 400:
|
|
2005
|
+
throw new Polytomic.BadRequestError(_response.error.body, _response.rawResponse);
|
|
2006
|
+
case 403:
|
|
2007
|
+
throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
2008
|
+
case 404:
|
|
2009
|
+
throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
|
|
2010
|
+
case 409:
|
|
2011
|
+
throw new Polytomic.ConflictError(_response.error.body, _response.rawResponse);
|
|
2012
|
+
case 500:
|
|
2013
|
+
throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
|
|
2014
|
+
case 503:
|
|
2015
|
+
throw new Polytomic.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
2016
|
+
default:
|
|
2017
|
+
throw new errors.PolytomicError({
|
|
2018
|
+
statusCode: _response.error.statusCode,
|
|
2019
|
+
body: _response.error.body,
|
|
2020
|
+
rawResponse: _response.rawResponse,
|
|
2021
|
+
});
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/harbors/{harbor_id}/query");
|
|
2025
|
+
});
|
|
2026
|
+
}
|
|
1933
2027
|
/**
|
|
1934
2028
|
* Lists current published saved queries for a Harbor.
|
|
1935
2029
|
*
|