polytomic 25.9.9 → 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/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +2 -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/harbors/client/Client.d.ts +35 -0
- package/api/resources/harbors/client/Client.js +89 -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/identity/client/Client.d.ts +1 -0
- package/api/resources/identity/client/Client.js +3 -0
- package/api/resources/queryRunner/client/Client.d.ts +5 -3
- package/api/resources/queryRunner/client/Client.js +5 -3
- 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/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 +1 -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/PickValue.d.ts +2 -0
- package/api/types/SchemaConfiguration.d.ts +2 -0
- package/api/types/TargetField.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 +3 -0
- package/api/types/index.js +3 -0
- package/package.json +1 -1
- package/reference.md +186 -3
- 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",
|
|
@@ -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. */
|
|
@@ -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.
|
|
@@ -644,6 +644,41 @@ export declare class HarborsClient {
|
|
|
644
644
|
*/
|
|
645
645
|
deleteKey(harbor_id: string, key_id: string, requestOptions?: HarborsClient.IdempotentRequestOptions): core.HttpResponsePromise<Polytomic.RevokedHarborKeyEnvelope>;
|
|
646
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;
|
|
647
682
|
/**
|
|
648
683
|
* Lists current published saved queries for a Harbor.
|
|
649
684
|
*
|
|
@@ -1935,6 +1935,95 @@ class HarborsClient {
|
|
|
1935
1935
|
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/api/harbors/{harbor_id}/keys/{key_id}");
|
|
1936
1936
|
});
|
|
1937
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
|
+
}
|
|
1938
2027
|
/**
|
|
1939
2028
|
* Lists current published saved queries for a Harbor.
|
|
1940
2029
|
*
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* query: "SELECT 1 AS n"
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface RunHarborQueryRequest {
|
|
8
|
+
"X-Polytomic-Harbor-Session"?: string;
|
|
9
|
+
"X-Polytomic-Activity-Request-ID"?: string;
|
|
10
|
+
/** SQL query to execute against the Harbor backing connection. */
|
|
11
|
+
query: string;
|
|
12
|
+
}
|
|
@@ -25,6 +25,7 @@ export type { HarborsPromoteContextDraftRequest } from "./HarborsPromoteContextD
|
|
|
25
25
|
export type { InviteHarborUserRequest } from "./InviteHarborUserRequest";
|
|
26
26
|
export type { RegisterHarborSessionRequest } from "./RegisterHarborSessionRequest";
|
|
27
27
|
export type { ResolveHarborSourceMappingsRequest } from "./ResolveHarborSourceMappingsRequest";
|
|
28
|
+
export type { RunHarborQueryRequest } from "./RunHarborQueryRequest";
|
|
28
29
|
export type { SaveHarborContextDraftRequest } from "./SaveHarborContextDraftRequest";
|
|
29
30
|
export type { SaveHarborContextRequest } from "./SaveHarborContextRequest";
|
|
30
31
|
export type { SaveHarborSavedQueryDraftRequest } from "./SaveHarborSavedQueryDraftRequest";
|
|
@@ -26,6 +26,7 @@ export declare class IdentityClient {
|
|
|
26
26
|
* @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
27
|
*
|
|
28
28
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
29
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
29
30
|
* @throws {@link Polytomic.InternalServerError}
|
|
30
31
|
* @throws {@link errors.PolytomicError}
|
|
31
32
|
* @throws {@link errors.PolytomicTimeoutError}
|
|
@@ -71,6 +71,7 @@ class IdentityClient {
|
|
|
71
71
|
* @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
72
72
|
*
|
|
73
73
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
74
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
74
75
|
* @throws {@link Polytomic.InternalServerError}
|
|
75
76
|
* @throws {@link errors.PolytomicError}
|
|
76
77
|
* @throws {@link errors.PolytomicTimeoutError}
|
|
@@ -108,6 +109,8 @@ class IdentityClient {
|
|
|
108
109
|
switch (_response.error.statusCode) {
|
|
109
110
|
case 401:
|
|
110
111
|
throw new Polytomic.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
112
|
+
case 403:
|
|
113
|
+
throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
111
114
|
case 500:
|
|
112
115
|
throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
|
|
113
116
|
default:
|
|
@@ -19,9 +19,11 @@ export declare class QueryRunnerClient {
|
|
|
19
19
|
* the query to finish. Poll [`GET /api/queries/{id}`](../../../../api-reference/query-runner/get-query) until `status`
|
|
20
20
|
* reaches `done`, `failed`, or `unknown`. These statuses are terminal.
|
|
21
21
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
22
|
+
* A Harbor-bound scoped credential can submit freeform SQL only against its
|
|
23
|
+
* Harbor's backing connection, even if its profile allows other connections.
|
|
24
|
+
* Other credentials retain their existing connection access. Query results are
|
|
25
|
+
* stored temporarily and may expire; use the `expires` field from the result
|
|
26
|
+
* endpoint to understand how long they remain available.
|
|
25
27
|
*
|
|
26
28
|
* @param {string} connection_id - Unique identifier of the connection to run the query against.
|
|
27
29
|
* @param {Polytomic.RunQueryRequest} request
|
|
@@ -74,9 +74,11 @@ class QueryRunnerClient {
|
|
|
74
74
|
* the query to finish. Poll [`GET /api/queries/{id}`](../../../../api-reference/query-runner/get-query) until `status`
|
|
75
75
|
* reaches `done`, `failed`, or `unknown`. These statuses are terminal.
|
|
76
76
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
77
|
+
* A Harbor-bound scoped credential can submit freeform SQL only against its
|
|
78
|
+
* Harbor's backing connection, even if its profile allows other connections.
|
|
79
|
+
* Other credentials retain their existing connection access. Query results are
|
|
80
|
+
* stored temporarily and may expire; use the `expires` field from the result
|
|
81
|
+
* endpoint to understand how long they remain available.
|
|
80
82
|
*
|
|
81
83
|
* @param {string} connection_id - Unique identifier of the connection to run the query against.
|
|
82
84
|
* @param {Polytomic.RunQueryRequest} request
|
|
@@ -137,6 +137,38 @@ export declare class WebhooksClient {
|
|
|
137
137
|
*/
|
|
138
138
|
delete(id: string, requestOptions?: WebhooksClient.IdempotentRequestOptions): core.HttpResponsePromise<void>;
|
|
139
139
|
private __delete;
|
|
140
|
+
/**
|
|
141
|
+
* Lists delivery attempts for a webhook, newest first.
|
|
142
|
+
*
|
|
143
|
+
* Use `success`, `event_id`, `start`, and `end` to narrow the results.
|
|
144
|
+
* Results are ordered by attempt time, newest first. Pass the returned
|
|
145
|
+
* `next_page_token` as `page_token` to fetch the next page. An empty token means
|
|
146
|
+
* there are no more results. Response bodies contain content returned by your
|
|
147
|
+
* webhook endpoint. Attempts are listed only while their event is retained.
|
|
148
|
+
*
|
|
149
|
+
* @param {string} id
|
|
150
|
+
* @param {Polytomic.WebhooksListDeliveriesRequest} request
|
|
151
|
+
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
152
|
+
*
|
|
153
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
154
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
155
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
156
|
+
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
157
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
158
|
+
* @throws {@link errors.PolytomicError}
|
|
159
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* await client.webhooks.listDeliveries("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
163
|
+
* success: true,
|
|
164
|
+
* event_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
165
|
+
* start: "2024-01-15T09:30:00Z",
|
|
166
|
+
* end: "2024-01-15T09:30:00Z",
|
|
167
|
+
* page_token: "page_token"
|
|
168
|
+
* })
|
|
169
|
+
*/
|
|
170
|
+
listDeliveries(id: string, request?: Polytomic.WebhooksListDeliveriesRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Polytomic.WebhookDeliveriesEnvelope>;
|
|
171
|
+
private __listDeliveries;
|
|
140
172
|
/**
|
|
141
173
|
* Disables a webhook without deleting it.
|
|
142
174
|
*
|
|
@@ -385,6 +385,95 @@ class WebhooksClient {
|
|
|
385
385
|
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/api/webhooks/{id}");
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
|
+
/**
|
|
389
|
+
* Lists delivery attempts for a webhook, newest first.
|
|
390
|
+
*
|
|
391
|
+
* Use `success`, `event_id`, `start`, and `end` to narrow the results.
|
|
392
|
+
* Results are ordered by attempt time, newest first. Pass the returned
|
|
393
|
+
* `next_page_token` as `page_token` to fetch the next page. An empty token means
|
|
394
|
+
* there are no more results. Response bodies contain content returned by your
|
|
395
|
+
* webhook endpoint. Attempts are listed only while their event is retained.
|
|
396
|
+
*
|
|
397
|
+
* @param {string} id
|
|
398
|
+
* @param {Polytomic.WebhooksListDeliveriesRequest} request
|
|
399
|
+
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
400
|
+
*
|
|
401
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
402
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
403
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
404
|
+
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
405
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
406
|
+
* @throws {@link errors.PolytomicError}
|
|
407
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
408
|
+
*
|
|
409
|
+
* @example
|
|
410
|
+
* await client.webhooks.listDeliveries("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
411
|
+
* success: true,
|
|
412
|
+
* event_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
413
|
+
* start: "2024-01-15T09:30:00Z",
|
|
414
|
+
* end: "2024-01-15T09:30:00Z",
|
|
415
|
+
* page_token: "page_token"
|
|
416
|
+
* })
|
|
417
|
+
*/
|
|
418
|
+
listDeliveries(id, request = {}, requestOptions) {
|
|
419
|
+
return core.HttpResponsePromise.fromPromise(this.__listDeliveries(id, request, requestOptions));
|
|
420
|
+
}
|
|
421
|
+
__listDeliveries(id_1) {
|
|
422
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
423
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
424
|
+
const { success, event_id: eventId, start, end, page_token: pageToken } = request;
|
|
425
|
+
const _queryParams = {
|
|
426
|
+
success,
|
|
427
|
+
event_id: eventId,
|
|
428
|
+
start: start != null ? start : undefined,
|
|
429
|
+
end: end != null ? end : undefined,
|
|
430
|
+
page_token: pageToken,
|
|
431
|
+
};
|
|
432
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
433
|
+
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
434
|
+
"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",
|
|
435
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
436
|
+
const _response = yield core.fetcher({
|
|
437
|
+
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/webhooks/${core.url.encodePathParam(id)}/deliveries`),
|
|
438
|
+
method: "GET",
|
|
439
|
+
headers: _headers,
|
|
440
|
+
queryString: core.url
|
|
441
|
+
.queryBuilder()
|
|
442
|
+
.addMany(_queryParams)
|
|
443
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
444
|
+
.build(),
|
|
445
|
+
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,
|
|
446
|
+
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,
|
|
447
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
448
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
449
|
+
logging: this._options.logging,
|
|
450
|
+
});
|
|
451
|
+
if (_response.ok) {
|
|
452
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
453
|
+
}
|
|
454
|
+
if (_response.error.reason === "status-code") {
|
|
455
|
+
switch (_response.error.statusCode) {
|
|
456
|
+
case 400:
|
|
457
|
+
throw new Polytomic.BadRequestError(_response.error.body, _response.rawResponse);
|
|
458
|
+
case 401:
|
|
459
|
+
throw new Polytomic.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
460
|
+
case 404:
|
|
461
|
+
throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
|
|
462
|
+
case 422:
|
|
463
|
+
throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
464
|
+
case 500:
|
|
465
|
+
throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
|
|
466
|
+
default:
|
|
467
|
+
throw new errors.PolytomicError({
|
|
468
|
+
statusCode: _response.error.statusCode,
|
|
469
|
+
body: _response.error.body,
|
|
470
|
+
rawResponse: _response.rawResponse,
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/webhooks/{id}/deliveries");
|
|
475
|
+
});
|
|
476
|
+
}
|
|
388
477
|
/**
|
|
389
478
|
* Disables a webhook without deleting it.
|
|
390
479
|
*
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* success: true,
|
|
5
|
+
* event_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
6
|
+
* start: "2024-01-15T09:30:00Z",
|
|
7
|
+
* end: "2024-01-15T09:30:00Z",
|
|
8
|
+
* page_token: "page_token"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface WebhooksListDeliveriesRequest {
|
|
12
|
+
/** Filter by delivery result. */
|
|
13
|
+
success?: boolean;
|
|
14
|
+
event_id?: string;
|
|
15
|
+
/** Include attempts at or after this time. */
|
|
16
|
+
start?: string;
|
|
17
|
+
/** Include attempts before this time. */
|
|
18
|
+
end?: string;
|
|
19
|
+
/** Token from the previous page. */
|
|
20
|
+
page_token?: string;
|
|
21
|
+
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import type * as Polytomic from "../index";
|
|
2
2
|
export interface BulkSchema {
|
|
3
3
|
data_cutoff_timestamp?: string | undefined;
|
|
4
|
+
/** Name of the companion history table. Present only when history is enabled on a destination that supports it. */
|
|
5
|
+
destination_history_output_name?: string | undefined;
|
|
4
6
|
disable_data_cutoff?: boolean | undefined;
|
|
5
7
|
enabled?: boolean | undefined;
|
|
6
8
|
/** fields is not populated on the list endpoint and will be removed in a future version; retrieve individual schemas for fields. */
|
|
7
9
|
fields?: Polytomic.BulkField[] | undefined;
|
|
8
10
|
/** filters is not populated on the list endpoint and will be removed in a future version; retrieve individual schemas for filters. */
|
|
9
11
|
filters?: Polytomic.BulkFilter[] | undefined;
|
|
12
|
+
/** Whether a companion history table is maintained beside this schema's output, recording every version observed on successive runs. Requires a replicate-mode sync to a destination reporting supports_history_mode. Always present in responses; when patching, omit it to keep the current value. */
|
|
13
|
+
history_enabled?: boolean | undefined;
|
|
10
14
|
id?: string | undefined;
|
|
11
15
|
output_name?: string | undefined;
|
|
12
16
|
partition_key?: string | undefined;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
export interface BulkSchemaListItem {
|
|
2
2
|
/** Per-schema cutoff. Records older than this timestamp are excluded from sync runs. */
|
|
3
3
|
data_cutoff_timestamp?: string | undefined;
|
|
4
|
+
/** Name of the companion history table. Present only when history is enabled on a destination that supports it. */
|
|
5
|
+
destination_history_output_name?: string | undefined;
|
|
4
6
|
/** When true, the sync ignores any configured data_cutoff_timestamp and syncs the full history of this schema. */
|
|
5
7
|
disable_data_cutoff?: boolean | undefined;
|
|
6
8
|
/** Whether this schema is included in sync runs. */
|
|
7
9
|
enabled?: boolean | undefined;
|
|
10
|
+
/** Whether a companion history table is maintained beside this schema's output, recording every version observed on successive runs. */
|
|
11
|
+
history_enabled?: boolean | undefined;
|
|
8
12
|
/** Source-side schema identifier (e.g. object name for SaaS sources, schema.table for databases). */
|
|
9
13
|
id?: string | undefined;
|
|
10
14
|
/** Effective name of the object written to the destination after any configured naming rules are applied. */
|
|
@@ -4,4 +4,6 @@ export interface BulkSyncDest {
|
|
|
4
4
|
modes?: Polytomic.SupportedBulkMode[] | undefined;
|
|
5
5
|
/** Resync modes supported by this destination (refetch, resync, rebuild). */
|
|
6
6
|
supported_resync_modes?: Polytomic.BulkResyncMode[] | undefined;
|
|
7
|
+
/** True if this destination can maintain a companion history table per schema (history_enabled) in replicate mode. */
|
|
8
|
+
supports_history_mode?: boolean | undefined;
|
|
7
9
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as Polytomic from "../index";
|
|
2
|
+
export interface ConnectionProxyApi {
|
|
3
|
+
/** True for the API used when request.api is omitted. */
|
|
4
|
+
default?: boolean | undefined;
|
|
5
|
+
/** What this API is for. */
|
|
6
|
+
description?: string | undefined;
|
|
7
|
+
inheritedBase?: Polytomic.ConnectionProxyInheritedBase | undefined;
|
|
8
|
+
/** Identifier to pass as request.api to call this API. */
|
|
9
|
+
name?: string | undefined;
|
|
10
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export interface ConnectionProxyCall {
|
|
2
|
-
/**
|
|
2
|
+
/** Name of the upstream API to call, for connections that expose more than one (see apis in the proxy info response). Defaults to the connection's default API. */
|
|
3
|
+
api?: string | undefined;
|
|
4
|
+
/** Request body. May be a string, a JSON object, a JSON array, or null. */
|
|
3
5
|
body?: unknown | undefined;
|
|
4
6
|
/** Additional request headers to send upstream. Headers listed in the connection's blockedRequestHeaders are rejected, and inherited auth headers cannot be overridden. */
|
|
5
7
|
headers?: Record<string, string> | undefined;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type * as Polytomic from "../index";
|
|
2
2
|
export interface ConnectionProxyInfoResponse {
|
|
3
|
+
/** Upstream APIs this connection exposes through the proxy, when there is more than one. Select one by passing its name as request.api; requests without request.api use the default. */
|
|
4
|
+
apis?: Polytomic.ConnectionProxyApi[] | undefined;
|
|
3
5
|
/** Connection backend identifier (e.g. hubspot, salesforce). */
|
|
4
6
|
backendType?: string | undefined;
|
|
5
7
|
/** Unique identifier of the connection the proxy contract applies to. */
|
package/api/types/PickValue.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export interface PickValue {
|
|
2
|
+
/** Field IDs and internal values required for this option to apply. All entries must match. Omitted for independent options. */
|
|
3
|
+
depends_on?: Record<string, string> | undefined;
|
|
2
4
|
label?: string | undefined;
|
|
3
5
|
value?: string | undefined;
|
|
4
6
|
}
|
|
@@ -7,6 +7,8 @@ export interface SchemaConfiguration {
|
|
|
7
7
|
enabled?: boolean | undefined;
|
|
8
8
|
fields?: SchemaConfiguration.Fields.Item[] | undefined;
|
|
9
9
|
filters?: Polytomic.BulkFilter[] | undefined;
|
|
10
|
+
/** Whether a companion history table is maintained beside this schema's output, recording every version observed on successive runs. Requires a replicate-mode sync to a destination reporting supports_history_mode. Omit to keep the current value. */
|
|
11
|
+
history_enabled?: boolean | undefined;
|
|
10
12
|
id?: string | undefined;
|
|
11
13
|
partition_key?: string | undefined;
|
|
12
14
|
tracking_field?: string | undefined;
|
|
@@ -30,4 +30,6 @@ export interface TargetField {
|
|
|
30
30
|
type?: string | undefined;
|
|
31
31
|
/** True if this field can be written when updating an existing record. */
|
|
32
32
|
updateable?: boolean | undefined;
|
|
33
|
+
/** Stored field options as value and label pairs. Use value when configuring mappings. Omitted when no options are available; enumeration fields may still omit options. */
|
|
34
|
+
values?: Polytomic.PickValue[] | undefined;
|
|
33
35
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface WebhookDelivery {
|
|
2
|
+
attempted_at?: string | undefined;
|
|
3
|
+
duration_ms?: number | undefined;
|
|
4
|
+
error?: string | undefined;
|
|
5
|
+
error_kind?: string | undefined;
|
|
6
|
+
event_id?: string | undefined;
|
|
7
|
+
event_type?: string | undefined;
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
/** Response content returned by the webhook endpoint. */
|
|
10
|
+
response_body?: string | undefined;
|
|
11
|
+
status_code?: number | undefined;
|
|
12
|
+
success?: boolean | undefined;
|
|
13
|
+
}
|
package/api/types/index.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ export * from "./ConnectionListResponseEnvelope";
|
|
|
67
67
|
export * from "./ConnectionParameterValue";
|
|
68
68
|
export * from "./ConnectionParameterValuesResp";
|
|
69
69
|
export * from "./ConnectionParameterValuesResponseEnvelope";
|
|
70
|
+
export * from "./ConnectionProxyApi";
|
|
70
71
|
export * from "./ConnectionProxyCall";
|
|
71
72
|
export * from "./ConnectionProxyContract";
|
|
72
73
|
export * from "./ConnectionProxyInfoResponse";
|
|
@@ -357,6 +358,8 @@ export * from "./UtilEnumValue";
|
|
|
357
358
|
export * from "./UtilExecutionStatus";
|
|
358
359
|
export * from "./UtilFieldType";
|
|
359
360
|
export * from "./Webhook";
|
|
361
|
+
export * from "./WebhookDeliveriesEnvelope";
|
|
362
|
+
export * from "./WebhookDelivery";
|
|
360
363
|
export * from "./WebhookEnvelope";
|
|
361
364
|
export * from "./WebhookListEnvelope";
|
|
362
365
|
export * from "./WorkTaskStatus";
|
package/api/types/index.js
CHANGED
|
@@ -83,6 +83,7 @@ __exportStar(require("./ConnectionListResponseEnvelope"), exports);
|
|
|
83
83
|
__exportStar(require("./ConnectionParameterValue"), exports);
|
|
84
84
|
__exportStar(require("./ConnectionParameterValuesResp"), exports);
|
|
85
85
|
__exportStar(require("./ConnectionParameterValuesResponseEnvelope"), exports);
|
|
86
|
+
__exportStar(require("./ConnectionProxyApi"), exports);
|
|
86
87
|
__exportStar(require("./ConnectionProxyCall"), exports);
|
|
87
88
|
__exportStar(require("./ConnectionProxyContract"), exports);
|
|
88
89
|
__exportStar(require("./ConnectionProxyInfoResponse"), exports);
|
|
@@ -373,6 +374,8 @@ __exportStar(require("./UtilEnumValue"), exports);
|
|
|
373
374
|
__exportStar(require("./UtilExecutionStatus"), exports);
|
|
374
375
|
__exportStar(require("./UtilFieldType"), exports);
|
|
375
376
|
__exportStar(require("./Webhook"), exports);
|
|
377
|
+
__exportStar(require("./WebhookDeliveriesEnvelope"), exports);
|
|
378
|
+
__exportStar(require("./WebhookDelivery"), exports);
|
|
376
379
|
__exportStar(require("./WebhookEnvelope"), exports);
|
|
377
380
|
__exportStar(require("./WebhookListEnvelope"), exports);
|
|
378
381
|
__exportStar(require("./WorkTaskStatus"), exports);
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -1973,9 +1973,11 @@ This endpoint returns immediately with a query task ID. It does not wait for
|
|
|
1973
1973
|
the query to finish. Poll [`GET /api/queries/{id}`](../../../../api-reference/query-runner/get-query) until `status`
|
|
1974
1974
|
reaches `done`, `failed`, or `unknown`. These statuses are terminal.
|
|
1975
1975
|
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1976
|
+
A Harbor-bound scoped credential can submit freeform SQL only against its
|
|
1977
|
+
Harbor's backing connection, even if its profile allows other connections.
|
|
1978
|
+
Other credentials retain their existing connection access. Query results are
|
|
1979
|
+
stored temporarily and may expire; use the `expires` field from the result
|
|
1980
|
+
endpoint to understand how long they remain available.
|
|
1979
1981
|
</dd>
|
|
1980
1982
|
</dl>
|
|
1981
1983
|
</dd>
|
|
@@ -6913,6 +6915,91 @@ await client.harbors.deleteKey("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7
|
|
|
6913
6915
|
</dl>
|
|
6914
6916
|
|
|
6915
6917
|
|
|
6918
|
+
</dd>
|
|
6919
|
+
</dl>
|
|
6920
|
+
</details>
|
|
6921
|
+
|
|
6922
|
+
<details><summary><code>client.harbors.<a href="/src/api/resources/harbors/client/Client.ts">runQuery</a>(harbor_id, { ...params }) -> Polytomic.RunQueryEnvelope</code></summary>
|
|
6923
|
+
<dl>
|
|
6924
|
+
<dd>
|
|
6925
|
+
|
|
6926
|
+
#### 📝 Description
|
|
6927
|
+
|
|
6928
|
+
<dl>
|
|
6929
|
+
<dd>
|
|
6930
|
+
|
|
6931
|
+
<dl>
|
|
6932
|
+
<dd>
|
|
6933
|
+
|
|
6934
|
+
Submits a query against the Harbor backing connection for asynchronous execution.
|
|
6935
|
+
|
|
6936
|
+
Use a scoped credential bound to this Harbor. The query runs only against the
|
|
6937
|
+
Harbor's backing connection; you cannot select another connection on this route.
|
|
6938
|
+
Send a unique `X-Polytomic-Activity-Request-ID` UUID with each submission. The
|
|
6939
|
+
`X-Polytomic-Harbor-Session` header is optional; if you send one, it must be
|
|
6940
|
+
valid for this Harbor.
|
|
6941
|
+
|
|
6942
|
+
The response contains a query ID and an initial `created` status. Poll
|
|
6943
|
+
[`GET /api/queries/{id}`](../../../../api-reference/query-runner/get-query) with that ID
|
|
6944
|
+
until the status is `done`, `failed`, or `unknown`. Follow the result endpoint's
|
|
6945
|
+
pagination links for additional rows. Results are temporary; check `expires`
|
|
6946
|
+
on the completed query.
|
|
6947
|
+
</dd>
|
|
6948
|
+
</dl>
|
|
6949
|
+
</dd>
|
|
6950
|
+
</dl>
|
|
6951
|
+
|
|
6952
|
+
#### 🔌 Usage
|
|
6953
|
+
|
|
6954
|
+
<dl>
|
|
6955
|
+
<dd>
|
|
6956
|
+
|
|
6957
|
+
<dl>
|
|
6958
|
+
<dd>
|
|
6959
|
+
|
|
6960
|
+
```typescript
|
|
6961
|
+
await client.harbors.runQuery("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
6962
|
+
query: "SELECT 1 AS n"
|
|
6963
|
+
});
|
|
6964
|
+
|
|
6965
|
+
```
|
|
6966
|
+
</dd>
|
|
6967
|
+
</dl>
|
|
6968
|
+
</dd>
|
|
6969
|
+
</dl>
|
|
6970
|
+
|
|
6971
|
+
#### ⚙️ Parameters
|
|
6972
|
+
|
|
6973
|
+
<dl>
|
|
6974
|
+
<dd>
|
|
6975
|
+
|
|
6976
|
+
<dl>
|
|
6977
|
+
<dd>
|
|
6978
|
+
|
|
6979
|
+
**harbor_id:** `string` — Unique identifier of the Harbor whose backing connection runs the query.
|
|
6980
|
+
|
|
6981
|
+
</dd>
|
|
6982
|
+
</dl>
|
|
6983
|
+
|
|
6984
|
+
<dl>
|
|
6985
|
+
<dd>
|
|
6986
|
+
|
|
6987
|
+
**request:** `Polytomic.RunHarborQueryRequest`
|
|
6988
|
+
|
|
6989
|
+
</dd>
|
|
6990
|
+
</dl>
|
|
6991
|
+
|
|
6992
|
+
<dl>
|
|
6993
|
+
<dd>
|
|
6994
|
+
|
|
6995
|
+
**requestOptions:** `HarborsClient.IdempotentRequestOptions`
|
|
6996
|
+
|
|
6997
|
+
</dd>
|
|
6998
|
+
</dl>
|
|
6999
|
+
</dd>
|
|
7000
|
+
</dl>
|
|
7001
|
+
|
|
7002
|
+
|
|
6916
7003
|
</dd>
|
|
6917
7004
|
</dl>
|
|
6918
7005
|
</details>
|
|
@@ -10986,6 +11073,89 @@ await client.webhooks.delete("248df4b7-aa70-47b8-a036-33ac447e668d");
|
|
|
10986
11073
|
</dl>
|
|
10987
11074
|
|
|
10988
11075
|
|
|
11076
|
+
</dd>
|
|
11077
|
+
</dl>
|
|
11078
|
+
</details>
|
|
11079
|
+
|
|
11080
|
+
<details><summary><code>client.webhooks.<a href="/src/api/resources/webhooks/client/Client.ts">listDeliveries</a>(id, { ...params }) -> Polytomic.WebhookDeliveriesEnvelope</code></summary>
|
|
11081
|
+
<dl>
|
|
11082
|
+
<dd>
|
|
11083
|
+
|
|
11084
|
+
#### 📝 Description
|
|
11085
|
+
|
|
11086
|
+
<dl>
|
|
11087
|
+
<dd>
|
|
11088
|
+
|
|
11089
|
+
<dl>
|
|
11090
|
+
<dd>
|
|
11091
|
+
|
|
11092
|
+
Lists delivery attempts for a webhook, newest first.
|
|
11093
|
+
|
|
11094
|
+
Use `success`, `event_id`, `start`, and `end` to narrow the results.
|
|
11095
|
+
Results are ordered by attempt time, newest first. Pass the returned
|
|
11096
|
+
`next_page_token` as `page_token` to fetch the next page. An empty token means
|
|
11097
|
+
there are no more results. Response bodies contain content returned by your
|
|
11098
|
+
webhook endpoint. Attempts are listed only while their event is retained.
|
|
11099
|
+
</dd>
|
|
11100
|
+
</dl>
|
|
11101
|
+
</dd>
|
|
11102
|
+
</dl>
|
|
11103
|
+
|
|
11104
|
+
#### 🔌 Usage
|
|
11105
|
+
|
|
11106
|
+
<dl>
|
|
11107
|
+
<dd>
|
|
11108
|
+
|
|
11109
|
+
<dl>
|
|
11110
|
+
<dd>
|
|
11111
|
+
|
|
11112
|
+
```typescript
|
|
11113
|
+
await client.webhooks.listDeliveries("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
11114
|
+
success: true,
|
|
11115
|
+
event_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
11116
|
+
start: "2024-01-15T09:30:00Z",
|
|
11117
|
+
end: "2024-01-15T09:30:00Z",
|
|
11118
|
+
page_token: "page_token"
|
|
11119
|
+
});
|
|
11120
|
+
|
|
11121
|
+
```
|
|
11122
|
+
</dd>
|
|
11123
|
+
</dl>
|
|
11124
|
+
</dd>
|
|
11125
|
+
</dl>
|
|
11126
|
+
|
|
11127
|
+
#### ⚙️ Parameters
|
|
11128
|
+
|
|
11129
|
+
<dl>
|
|
11130
|
+
<dd>
|
|
11131
|
+
|
|
11132
|
+
<dl>
|
|
11133
|
+
<dd>
|
|
11134
|
+
|
|
11135
|
+
**id:** `string`
|
|
11136
|
+
|
|
11137
|
+
</dd>
|
|
11138
|
+
</dl>
|
|
11139
|
+
|
|
11140
|
+
<dl>
|
|
11141
|
+
<dd>
|
|
11142
|
+
|
|
11143
|
+
**request:** `Polytomic.WebhooksListDeliveriesRequest`
|
|
11144
|
+
|
|
11145
|
+
</dd>
|
|
11146
|
+
</dl>
|
|
11147
|
+
|
|
11148
|
+
<dl>
|
|
11149
|
+
<dd>
|
|
11150
|
+
|
|
11151
|
+
**requestOptions:** `WebhooksClient.RequestOptions`
|
|
11152
|
+
|
|
11153
|
+
</dd>
|
|
11154
|
+
</dl>
|
|
11155
|
+
</dd>
|
|
11156
|
+
</dl>
|
|
11157
|
+
|
|
11158
|
+
|
|
10989
11159
|
</dd>
|
|
10990
11160
|
</dl>
|
|
10991
11161
|
</details>
|
|
@@ -12850,6 +13020,10 @@ size and rate limits.
|
|
|
12850
13020
|
|
|
12851
13021
|
## Important behavior
|
|
12852
13022
|
|
|
13023
|
+
- For connections that expose more than one API (listed in `apis` in the proxy
|
|
13024
|
+
info response), set `request.api` to the name of the API to call. Requests
|
|
13025
|
+
without `request.api` go to the default API. `request.api` is rejected for
|
|
13026
|
+
connections that expose a single API.
|
|
12853
13027
|
- `request.path` must be relative and start with `/`.
|
|
12854
13028
|
- Use either `request.query` or `request.rawQuery`, not both.
|
|
12855
13029
|
- Caller-supplied headers are merged with inherited headers, but inherited auth
|
|
@@ -12857,6 +13031,9 @@ size and rate limits.
|
|
|
12857
13031
|
- The proxy strips a fixed set of request and response headers for safety.
|
|
12858
13032
|
- Response bodies larger than the configured maximum are truncated, and
|
|
12859
13033
|
`truncated` is set to `true`.
|
|
13034
|
+
- A `429` means Polytomic's proxy rate limit was reached, or the connection's
|
|
13035
|
+
upstream quota, which the proxy shares with the connection's syncs, is
|
|
13036
|
+
exhausted.
|
|
12860
13037
|
|
|
12861
13038
|
To run a `GET` request asynchronously, set `async` to `true`. The initial
|
|
12862
13039
|
response returns `status: 202`, `jobId`, `jobStatus`, and `jobUrl`. Poll
|
|
@@ -12955,6 +13132,12 @@ when you need to build requests programmatically. The response shows:
|
|
|
12955
13132
|
- allowed HTTP methods and body shapes
|
|
12956
13133
|
- timeout, rate-limit, and payload-size limits
|
|
12957
13134
|
|
|
13135
|
+
Some connections reach more than one upstream API, each with its own base URL
|
|
13136
|
+
and quota. For these, the response includes `apis`: one entry per API with its
|
|
13137
|
+
`name`, `description`, whether it is the `default`, and its own
|
|
13138
|
+
`inheritedBase`. The top-level `inheritedBase` describes the default API.
|
|
13139
|
+
Connections with a single API omit `apis`.
|
|
13140
|
+
|
|
12958
13141
|
Sensitive inherited header and query values are redacted in the response. The
|
|
12959
13142
|
contract is still useful for discovering which keys are fixed by the
|
|
12960
13143
|
connection, even though their raw values are not exposed.
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "25.9.
|
|
1
|
+
export declare const SDK_VERSION = "25.9.10";
|
package/version.js
CHANGED