polytomic 25.9.9 → 25.9.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/BaseClient.js +2 -2
  2. package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +2 -1
  3. package/api/resources/bulkSync/resources/schemas/client/Client.js +4 -1
  4. package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +2 -0
  5. package/api/resources/connections/resources/proxy/client/Client.d.ts +13 -0
  6. package/api/resources/connections/resources/proxy/client/Client.js +13 -0
  7. package/api/resources/entities/client/Client.d.ts +78 -8
  8. package/api/resources/entities/client/Client.js +132 -8
  9. package/api/resources/entities/client/index.d.ts +1 -1
  10. package/api/resources/entities/client/index.js +15 -0
  11. package/api/resources/entities/client/requests/EntitiesSearchRequest.d.ts +13 -0
  12. package/api/resources/entities/client/requests/EntitiesSearchRequest.js +3 -0
  13. package/api/resources/entities/client/requests/index.d.ts +1 -0
  14. package/api/resources/entities/client/requests/index.js +2 -0
  15. package/api/resources/harbors/client/Client.d.ts +283 -0
  16. package/api/resources/harbors/client/Client.js +711 -0
  17. package/api/resources/harbors/client/requests/HarborsListActionConfigurationSchemasRequest.d.ts +16 -0
  18. package/api/resources/harbors/client/requests/HarborsListActionConfigurationSchemasRequest.js +3 -0
  19. package/api/resources/harbors/client/requests/HarborsRemoveActionConfigurationRequest.d.ts +10 -0
  20. package/api/resources/harbors/client/requests/HarborsRemoveActionConfigurationRequest.js +3 -0
  21. package/api/resources/harbors/client/requests/RunHarborQueryRequest.d.ts +12 -0
  22. package/api/resources/harbors/client/requests/RunHarborQueryRequest.js +3 -0
  23. package/api/resources/harbors/client/requests/SetHarborActionConfigurationRequest.d.ts +11 -0
  24. package/api/resources/harbors/client/requests/SetHarborActionConfigurationRequest.js +3 -0
  25. package/api/resources/harbors/client/requests/index.d.ts +4 -0
  26. package/api/resources/identity/client/Client.d.ts +1 -0
  27. package/api/resources/identity/client/Client.js +3 -0
  28. package/api/resources/index.d.ts +1 -0
  29. package/api/resources/index.js +1 -0
  30. package/api/resources/modelSync/client/Client.d.ts +24 -0
  31. package/api/resources/modelSync/client/Client.js +24 -0
  32. package/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +1 -1
  33. package/api/resources/models/client/requests/UpdateModelRequest.d.ts +1 -0
  34. package/api/resources/queryRunner/client/Client.d.ts +5 -3
  35. package/api/resources/queryRunner/client/Client.js +5 -3
  36. package/api/resources/webhooks/client/Client.d.ts +32 -0
  37. package/api/resources/webhooks/client/Client.js +89 -0
  38. package/api/resources/webhooks/client/requests/WebhooksListDeliveriesRequest.d.ts +21 -0
  39. package/api/resources/webhooks/client/requests/WebhooksListDeliveriesRequest.js +3 -0
  40. package/api/resources/webhooks/client/requests/index.d.ts +1 -0
  41. package/api/types/BulkExecutionStatus.d.ts +1 -0
  42. package/api/types/BulkExecutionStatus.js +1 -0
  43. package/api/types/BulkSchema.d.ts +4 -0
  44. package/api/types/BulkSchemaListItem.d.ts +4 -0
  45. package/api/types/BulkSyncDest.d.ts +2 -0
  46. package/api/types/BulkSyncSearchHit.d.ts +14 -0
  47. package/api/types/BulkSyncSearchHit.js +3 -0
  48. package/api/types/BulkSyncTargetMode.d.ts +1 -0
  49. package/api/types/BulkSyncTargetMode.js +1 -0
  50. package/api/types/CompletionValue.d.ts +1 -0
  51. package/api/types/ConnectionProxyApi.d.ts +10 -0
  52. package/api/types/ConnectionProxyApi.js +3 -0
  53. package/api/types/ConnectionProxyCall.d.ts +3 -1
  54. package/api/types/ConnectionProxyInfoResponse.d.ts +2 -0
  55. package/api/types/ConnectionSearchHit.d.ts +9 -0
  56. package/api/types/ConnectionSearchHit.js +3 -0
  57. package/api/types/CreateModelRequest.d.ts +1 -0
  58. package/api/types/EntityResponse.d.ts +1 -1
  59. package/api/types/HarborActionConfigurationEnvelope.d.ts +5 -0
  60. package/api/types/HarborActionConfigurationEnvelope.js +3 -0
  61. package/api/types/HarborActionConfigurationFieldResponse.d.ts +20 -0
  62. package/api/types/HarborActionConfigurationFieldResponse.js +3 -0
  63. package/api/types/HarborActionConfigurationIdempotencyResponse.d.ts +6 -0
  64. package/api/types/HarborActionConfigurationIdempotencyResponse.js +3 -0
  65. package/api/types/HarborActionConfigurationOperationResponse.d.ts +28 -0
  66. package/api/types/HarborActionConfigurationOperationResponse.js +12 -0
  67. package/api/types/HarborActionConfigurationOperationsEnvelope.d.ts +4 -0
  68. package/api/types/HarborActionConfigurationOperationsEnvelope.js +3 -0
  69. package/api/types/HarborActionConfigurationResponse.d.ts +13 -0
  70. package/api/types/HarborActionConfigurationResponse.js +3 -0
  71. package/api/types/HarborActionConfigurationSchemasEnvelope.d.ts +5 -0
  72. package/api/types/HarborActionConfigurationSchemasEnvelope.js +3 -0
  73. package/api/types/HarborActionGrantSchema.d.ts +10 -0
  74. package/api/types/HarborActionGrantSchema.js +3 -0
  75. package/api/types/HarborActionSchemaResponse.d.ts +8 -0
  76. package/api/types/HarborActionSchemaResponse.js +3 -0
  77. package/api/types/HarborActionSourceConnectionResponse.d.ts +8 -0
  78. package/api/types/HarborActionSourceConnectionResponse.js +3 -0
  79. package/api/types/HarborActionSourceConnectionsEnvelope.d.ts +4 -0
  80. package/api/types/HarborActionSourceConnectionsEnvelope.js +3 -0
  81. package/api/types/IdentityCredentialSchema.d.ts +2 -0
  82. package/api/types/ModelFieldSearchHit.d.ts +15 -0
  83. package/api/types/ModelFieldSearchHit.js +3 -0
  84. package/api/types/ModelSearchHit.d.ts +11 -0
  85. package/api/types/ModelSearchHit.js +3 -0
  86. package/api/types/ModelSyncSearchHit.d.ts +12 -0
  87. package/api/types/ModelSyncSearchHit.js +3 -0
  88. package/api/types/ModelSyncSourceConnection.d.ts +5 -0
  89. package/api/types/ModelSyncSourceConnection.js +3 -0
  90. package/api/types/PickValue.d.ts +2 -0
  91. package/api/types/SchemaConfiguration.d.ts +2 -0
  92. package/api/types/SearchEnvelope.d.ts +5 -0
  93. package/api/types/SearchEnvelope.js +3 -0
  94. package/api/types/SearchMatch.d.ts +7 -0
  95. package/api/types/SearchMatch.js +3 -0
  96. package/api/types/SearchMatchAttribute.d.ts +8 -0
  97. package/api/types/SearchMatchAttribute.js +3 -0
  98. package/api/types/SearchMatchMapping.d.ts +19 -0
  99. package/api/types/SearchMatchMapping.js +12 -0
  100. package/api/types/SearchMatchSchema.d.ts +8 -0
  101. package/api/types/SearchMatchSchema.js +3 -0
  102. package/api/types/SearchResultItem.d.ts +19 -0
  103. package/api/types/SearchResultItem.js +3 -0
  104. package/api/types/SearchResultLinks.d.ts +8 -0
  105. package/api/types/SearchResultLinks.js +3 -0
  106. package/api/types/SearchResultMetadata.d.ts +6 -0
  107. package/api/types/SearchResultMetadata.js +3 -0
  108. package/api/types/SyncDestinationProperties.d.ts +2 -0
  109. package/api/types/TargetField.d.ts +2 -0
  110. package/api/types/WebhookDeliveriesEnvelope.d.ts +5 -0
  111. package/api/types/WebhookDeliveriesEnvelope.js +3 -0
  112. package/api/types/WebhookDelivery.d.ts +13 -0
  113. package/api/types/WebhookDelivery.js +3 -0
  114. package/api/types/index.d.ts +28 -0
  115. package/api/types/index.js +28 -0
  116. package/package.json +1 -1
  117. package/reference.md +985 -59
  118. package/version.d.ts +1 -1
  119. package/version.js +1 -1
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * search: "search",
5
+ * limit: 1,
6
+ * page_token: "page_token"
7
+ * }
8
+ */
9
+ export interface HarborsListActionConfigurationSchemasRequest {
10
+ /** Filter action schemas by ID or name. */
11
+ search?: string;
12
+ /** Maximum number of schemas to return. */
13
+ limit?: number;
14
+ /** Opaque cursor returned by the previous request. */
15
+ page_token?: string;
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * expected_revision: "248df4b7-aa70-47b8-a036-33ac447e668d"
5
+ * }
6
+ */
7
+ export interface HarborsRemoveActionConfigurationRequest {
8
+ /** Current revision of the Connection's action grants. */
9
+ expected_revision: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import type * as Polytomic from "../../../../index";
2
+ /**
3
+ * @example
4
+ * {}
5
+ */
6
+ export interface SetHarborActionConfigurationRequest {
7
+ /** Current revision when replacing existing grants. Omit when creating grants for this Connection. */
8
+ expected_revision?: string;
9
+ /** Complete replacement of this Connection's action grants. */
10
+ grants?: Polytomic.HarborActionGrantSchema[];
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -11,6 +11,7 @@ export type { HarborsGetContextDraftRequest } from "./HarborsGetContextDraftRequ
11
11
  export type { HarborsGetContextRequest } from "./HarborsGetContextRequest";
12
12
  export type { HarborsGetContextVersionRequest } from "./HarborsGetContextVersionRequest";
13
13
  export type { HarborsGetSavedQueryRequest } from "./HarborsGetSavedQueryRequest";
14
+ export type { HarborsListActionConfigurationSchemasRequest } from "./HarborsListActionConfigurationSchemasRequest";
14
15
  export type { HarborsListAuthorizedConnectionsRequest } from "./HarborsListAuthorizedConnectionsRequest";
15
16
  export type { HarborsListAuthorizedSchemasRequest } from "./HarborsListAuthorizedSchemasRequest";
16
17
  export type { HarborsListContextDraftsRequest } from "./HarborsListContextDraftsRequest";
@@ -22,10 +23,13 @@ export type { HarborsListSavedQueriesRequest } from "./HarborsListSavedQueriesRe
22
23
  export type { HarborsListSavedQueryDraftsRequest } from "./HarborsListSavedQueryDraftsRequest";
23
24
  export type { HarborsListUsersRequest } from "./HarborsListUsersRequest";
24
25
  export type { HarborsPromoteContextDraftRequest } from "./HarborsPromoteContextDraftRequest";
26
+ export type { HarborsRemoveActionConfigurationRequest } from "./HarborsRemoveActionConfigurationRequest";
25
27
  export type { InviteHarborUserRequest } from "./InviteHarborUserRequest";
26
28
  export type { RegisterHarborSessionRequest } from "./RegisterHarborSessionRequest";
27
29
  export type { ResolveHarborSourceMappingsRequest } from "./ResolveHarborSourceMappingsRequest";
30
+ export type { RunHarborQueryRequest } from "./RunHarborQueryRequest";
28
31
  export type { SaveHarborContextDraftRequest } from "./SaveHarborContextDraftRequest";
29
32
  export type { SaveHarborContextRequest } from "./SaveHarborContextRequest";
30
33
  export type { SaveHarborSavedQueryDraftRequest } from "./SaveHarborSavedQueryDraftRequest";
34
+ export type { SetHarborActionConfigurationRequest } from "./SetHarborActionConfigurationRequest";
31
35
  export type { UpdateHarborRequest } from "./UpdateHarborRequest";
@@ -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:
@@ -6,6 +6,7 @@ export * from "./bulkSync/client/requests";
6
6
  export * as connections from "./connections";
7
7
  export * from "./connections/client/requests";
8
8
  export * as entities from "./entities";
9
+ export * from "./entities/client/requests";
9
10
  export * as events from "./events";
10
11
  export * from "./events/client/requests";
11
12
  export * as harbors from "./harbors";
@@ -45,6 +45,7 @@ __exportStar(require("./bulkSync/client/requests"), exports);
45
45
  exports.connections = __importStar(require("./connections"));
46
46
  __exportStar(require("./connections/client/requests"), exports);
47
47
  exports.entities = __importStar(require("./entities"));
48
+ __exportStar(require("./entities/client/requests"), exports);
48
49
  exports.events = __importStar(require("./events"));
49
50
  __exportStar(require("./events/client/requests"), exports);
50
51
  exports.harbors = __importStar(require("./harbors"));
@@ -59,6 +59,30 @@ export declare class ModelSyncClient {
59
59
  * The available source configuration parameters are described by
60
60
  * [`GET /api/connections/{id}/modelsync/source`](../../../../../../api-reference/model-sync/get-source).
61
61
  *
62
+ * ## Query parameter format
63
+ *
64
+ * Send each source setting as a bracketed key with a single string value. For
65
+ * example, a source configured with `stream_id: "deals"` uses
66
+ * `params[stream_id]=deals`.
67
+ *
68
+ * With Polytomic MCP, pass the bracketed key directly in `query`:
69
+ *
70
+ * ```javascript
71
+ * async () => {
72
+ * return polytomic.request({
73
+ * method: "GET",
74
+ * path: "/api/connections/<connection_id>/modelsync/source/fields",
75
+ * query: {"params[stream_id]": "deals"}
76
+ * });
77
+ * }
78
+ * ```
79
+ *
80
+ * > ⚠️ Send one value per setting
81
+ * >
82
+ * > Each setting uses only the first value if you repeat its query key. An empty
83
+ * > array suffix, such as `params[stream_id][]=deals`, is rejected with
84
+ * > `400 Bad Request`. Use `params[stream_id]=deals` instead.
85
+ *
62
86
  * @param {string} id - Unique identifier of the connection.
63
87
  * @param {Polytomic.ModelSyncGetSourceFieldsRequest} request
64
88
  * @param {ModelSyncClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -161,6 +161,30 @@ class ModelSyncClient {
161
161
  * The available source configuration parameters are described by
162
162
  * [`GET /api/connections/{id}/modelsync/source`](../../../../../../api-reference/model-sync/get-source).
163
163
  *
164
+ * ## Query parameter format
165
+ *
166
+ * Send each source setting as a bracketed key with a single string value. For
167
+ * example, a source configured with `stream_id: "deals"` uses
168
+ * `params[stream_id]=deals`.
169
+ *
170
+ * With Polytomic MCP, pass the bracketed key directly in `query`:
171
+ *
172
+ * ```javascript
173
+ * async () => {
174
+ * return polytomic.request({
175
+ * method: "GET",
176
+ * path: "/api/connections/<connection_id>/modelsync/source/fields",
177
+ * query: {"params[stream_id]": "deals"}
178
+ * });
179
+ * }
180
+ * ```
181
+ *
182
+ * > ⚠️ Send one value per setting
183
+ * >
184
+ * > Each setting uses only the first value if you repeat its query key. An empty
185
+ * > array suffix, such as `params[stream_id][]=deals`, is rejected with
186
+ * > `400 Bad Request`. Use `params[stream_id]=deals` instead.
187
+ *
164
188
  * @param {string} id - Unique identifier of the connection.
165
189
  * @param {Polytomic.ModelSyncGetSourceFieldsRequest} request
166
190
  * @param {ModelSyncClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -4,5 +4,5 @@
4
4
  */
5
5
  export interface ModelSyncGetSourceFieldsRequest {
6
6
  /** Source configuration, matching the params used with GET /api/connections/{id}/modelsync/source, that selects the specific source to return fields for. */
7
- params?: Record<string, string[] | undefined>;
7
+ params?: Record<string, string | undefined>;
8
8
  }
@@ -16,6 +16,7 @@ export interface UpdateModelRequest {
16
16
  configuration: Record<string, unknown>;
17
17
  connection_id: string;
18
18
  enricher?: Polytomic.Enrichment;
19
+ /** Technical/source field names to publish in the model. Use source names, not model-field UUIDs or display labels. For example, use dealname rather than Deal Name. Omit or pass an empty array to publish all standard source fields. */
19
20
  fields?: string[];
20
21
  identifier?: string;
21
22
  labels?: string[];
@@ -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
- * Only the user who created the query can fetch its results later. Query results
23
- * are stored temporarily and may expire; use the `expires` field from the result
24
- * endpoint to understand how long they will remain available.
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
- * Only the user who created the query can fetch its results later. Query results
78
- * are stored temporarily and may expire; use the `expires` field from the result
79
- * endpoint to understand how long they will remain available.
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
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,3 @@
1
1
  export type { CreateWebhooksSchema } from "./CreateWebhooksSchema";
2
2
  export type { UpdateWebhooksSchema } from "./UpdateWebhooksSchema";
3
+ export type { WebhooksListDeliveriesRequest } from "./WebhooksListDeliveriesRequest";
@@ -10,5 +10,6 @@ export declare const BulkExecutionStatus: {
10
10
  readonly Processing: "processing";
11
11
  readonly Errors: "errors";
12
12
  readonly Interrupted: "interrupted";
13
+ readonly CompletedWithCancellations: "completed_with_cancellations";
13
14
  };
14
15
  export type BulkExecutionStatus = (typeof BulkExecutionStatus)[keyof typeof BulkExecutionStatus];
@@ -14,4 +14,5 @@ exports.BulkExecutionStatus = {
14
14
  Processing: "processing",
15
15
  Errors: "errors",
16
16
  Interrupted: "interrupted",
17
+ CompletedWithCancellations: "completed_with_cancellations",
17
18
  };
@@ -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,14 @@
1
+ import type * as Polytomic from "../index";
2
+ export interface BulkSyncSearchHit {
3
+ bulk_sync_id: string;
4
+ bulk_sync_name: string;
5
+ links: Polytomic.SearchResultLinks;
6
+ /** Contributing attributes grouped by saved mapping or schema context, with one group for resource metadata. */
7
+ matches?: Polytomic.SearchMatch[] | undefined;
8
+ source_connection_id: string;
9
+ source_connection_name: string;
10
+ source_connection_type: string;
11
+ target_connection_id: string;
12
+ target_connection_name: string;
13
+ target_connection_type: string;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,6 @@
1
1
  export declare const BulkSyncTargetMode: {
2
2
  readonly Snapshot: "snapshot";
3
3
  readonly Replicate: "replicate";
4
+ readonly Append: "append";
4
5
  };
5
6
  export type BulkSyncTargetMode = (typeof BulkSyncTargetMode)[keyof typeof BulkSyncTargetMode];
@@ -5,4 +5,5 @@ exports.BulkSyncTargetMode = void 0;
5
5
  exports.BulkSyncTargetMode = {
6
6
  Snapshot: "snapshot",
7
7
  Replicate: "replicate",
8
+ Append: "append",
8
9
  };
@@ -1,4 +1,5 @@
1
1
  export interface CompletionValue {
2
+ depends_on?: Record<string, string> | undefined;
2
3
  label?: string | undefined;
3
4
  path?: string | undefined;
4
5
  value?: unknown | undefined;
@@ -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
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,7 @@
1
1
  export interface ConnectionProxyCall {
2
- /** Request body. May be a string, a JSON object, or null. */
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. */
@@ -0,0 +1,9 @@
1
+ import type * as Polytomic from "../index";
2
+ export interface ConnectionSearchHit {
3
+ connection_id: string;
4
+ connection_name: string;
5
+ connection_type: string;
6
+ links: Polytomic.SearchResultLinks;
7
+ /** Contributing attributes grouped by saved mapping context, with one group for resource metadata. */
8
+ matches?: Polytomic.SearchMatch[] | undefined;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,6 +4,7 @@ export interface CreateModelRequest {
4
4
  configuration: Record<string, unknown>;
5
5
  connection_id: string;
6
6
  enricher?: Polytomic.Enrichment | undefined;
7
+ /** Technical/source field names to publish in the model. Use source names, not model-field UUIDs or display labels. For example, use dealname rather than Deal Name. Omit or pass an empty array to publish all standard source fields. */
7
8
  fields?: string[] | undefined;
8
9
  identifier?: string | undefined;
9
10
  labels?: string[] | undefined;
@@ -10,6 +10,6 @@ export interface EntityResponse {
10
10
  organization_id?: string | undefined;
11
11
  /** Parent resources needed to address nested resources, keyed by relationship name (e.g. "sync", "bulk_sync", "harbor"). */
12
12
  relationships?: Record<string, Polytomic.EntityRelationship> | undefined;
13
- /** Resolved entity type. One of: organization, user, connection, model, sync, sync_execution, bulk_sync, bulk_sync_execution, harbor, harbor_context. */
13
+ /** Resolved entity type. One of: organization, user, connection, model, model_sync, model_sync_execution, bulk_sync, bulk_sync_execution, harbor, harbor_context. */
14
14
  type?: string | undefined;
15
15
  }
@@ -0,0 +1,5 @@
1
+ import type * as Polytomic from "../index";
2
+ export interface HarborActionConfigurationEnvelope {
3
+ /** All configured action Connections after this request. */
4
+ data?: Polytomic.HarborActionConfigurationResponse[] | undefined;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });