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
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.9",
48
- "User-Agent": "polytomic/25.9.9",
47
+ "X-Fern-SDK-Version": "25.9.11",
48
+ "User-Agent": "polytomic/25.9.11",
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",
@@ -132,7 +132,7 @@ export declare class SchemasClient {
132
132
  update(id: string, schema_id: string, request?: Polytomic.bulkSync.UpdateBulkSchema, requestOptions?: SchemasClient.IdempotentRequestOptions): core.HttpResponsePromise<Polytomic.BulkSchemaEnvelope>;
133
133
  private __update;
134
134
  /**
135
- * Requests cancellation of any running executions for a specific schema on a bulk sync.
135
+ * Requests cancellation of any running executions for a specific schema on a bulk sync. A schema whose only running work is a backfill returns a conflict.
136
136
  *
137
137
  * Cancellation is asynchronous. A successful response means the cancellation
138
138
  * signal for this schema has been queued; the schema's in-flight work continues
@@ -147,6 +147,7 @@ export declare class SchemasClient {
147
147
  *
148
148
  * @throws {@link Polytomic.ForbiddenError}
149
149
  * @throws {@link Polytomic.NotFoundError}
150
+ * @throws {@link Polytomic.ConflictError}
150
151
  * @throws {@link Polytomic.InternalServerError}
151
152
  * @throws {@link errors.PolytomicError}
152
153
  * @throws {@link errors.PolytomicTimeoutError}
@@ -356,7 +356,7 @@ class SchemasClient {
356
356
  });
357
357
  }
358
358
  /**
359
- * Requests cancellation of any running executions for a specific schema on a bulk sync.
359
+ * Requests cancellation of any running executions for a specific schema on a bulk sync. A schema whose only running work is a backfill returns a conflict.
360
360
  *
361
361
  * Cancellation is asynchronous. A successful response means the cancellation
362
362
  * signal for this schema has been queued; the schema's in-flight work continues
@@ -371,6 +371,7 @@ class SchemasClient {
371
371
  *
372
372
  * @throws {@link Polytomic.ForbiddenError}
373
373
  * @throws {@link Polytomic.NotFoundError}
374
+ * @throws {@link Polytomic.ConflictError}
374
375
  * @throws {@link Polytomic.InternalServerError}
375
376
  * @throws {@link errors.PolytomicError}
376
377
  * @throws {@link errors.PolytomicTimeoutError}
@@ -412,6 +413,8 @@ class SchemasClient {
412
413
  throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
413
414
  case 404:
414
415
  throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
416
+ case 409:
417
+ throw new Polytomic.ConflictError(_response.error.body, _response.rawResponse);
415
418
  case 500:
416
419
  throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
417
420
  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. */
@@ -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.
@@ -10,6 +10,76 @@ export declare namespace EntitiesClient {
10
10
  export declare class EntitiesClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<EntitiesClient.Options>;
12
12
  constructor(options?: EntitiesClient.Options);
13
+ /**
14
+ * Searches models, model fields, model syncs, bulk syncs, and connections in the caller's organization.
15
+ *
16
+ * Supply a nonblank `search` term to search all five result categories. Unlike
17
+ * [entity lookup](../../../api-reference/entities/get), this endpoint does not search
18
+ * Organizations, users, executions, Harbors, or Harbor contexts. Model fields are
19
+ * searchable but have no standalone lookup endpoint.
20
+ *
21
+ * ## Searchable resources
22
+ *
23
+ * - Models: ID, name, and source Connection type.
24
+ * - Model fields: ID, technical name, and label.
25
+ * - Model Syncs: ID, name, source and target Connection types, and saved field and
26
+ * identity mappings. Mappings include source field names and labels, target
27
+ * field IDs, and available target field names.
28
+ * - Bulk Syncs: ID, name, source and target Connection names and types, and enabled
29
+ * schema IDs, display names, and configured output names. Disabled schemas are
30
+ * excluded; enabled schemas remain searchable when the sync is inactive.
31
+ * - Connections: ID and name.
32
+ *
33
+ * Search uses cached metadata and does not refresh schemas. Names absent from
34
+ * that metadata are not searchable. Bulk Sync fields, execution state,
35
+ * expressions, filters, and constant values are not searched.
36
+ *
37
+ * ## Matching and evidence
38
+ *
39
+ * Matching is case-insensitive and uses word prefixes, not fuzzy matching. Every
40
+ * query word must match somewhere within a result. Spaces and punctuation split
41
+ * words: `other emails` matches `other_emails`, but `mail` does not match `email`.
42
+ * Some Model Sync source-type matches require a leading `~`.
43
+ *
44
+ * Each resource appears once. Its `matches` explain which attributes matched and
45
+ * which query terms contributed. Mapping and schema attributes carry their
46
+ * respective `mapping` or `schema` context; resource metadata has neither. A name
47
+ * or Connection type match alone does not establish mapping or schema use.
48
+ * Results include canonical `links`, not complete configurations or schema lists.
49
+ *
50
+ * ## Limits and completeness
51
+ *
52
+ * Results are ordered by category, then name or field label, then ID, not by
53
+ * relevance. `limit` defaults to 50 and accepts 1–100. It limits resource hits,
54
+ * not match evidence. When `metadata.truncated` is `true`, narrow your search or
55
+ * increase the limit. There is no cursor pagination.
56
+ *
57
+ * > ⚠️ Incomplete model-field coverage
58
+ * >
59
+ * > Above 40,000 published model fields, `metadata.model_fields_complete` is
60
+ * > `false`: standalone field results cover a subset, not every published field.
61
+ * > Model Sync mapping search is unaffected. Incomplete or truncated results
62
+ * > cannot establish that no other matches exist.
63
+ *
64
+ * @param {Polytomic.EntitiesSearchRequest} request
65
+ * @param {EntitiesClient.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @throws {@link Polytomic.BadRequestError}
68
+ * @throws {@link Polytomic.UnauthorizedError}
69
+ * @throws {@link Polytomic.ForbiddenError}
70
+ * @throws {@link Polytomic.NotFoundError}
71
+ * @throws {@link Polytomic.InternalServerError}
72
+ * @throws {@link errors.PolytomicError}
73
+ * @throws {@link errors.PolytomicTimeoutError}
74
+ *
75
+ * @example
76
+ * await client.entities.search({
77
+ * search: "email",
78
+ * limit: 50
79
+ * })
80
+ */
81
+ search(request: Polytomic.EntitiesSearchRequest, requestOptions?: EntitiesClient.RequestOptions): core.HttpResponsePromise<Polytomic.SearchEnvelope>;
82
+ private __search;
13
83
  /**
14
84
  * Returns a resolved entity by ID.
15
85
  *
@@ -40,8 +110,8 @@ export declare class EntitiesClient {
40
110
  * - `user`
41
111
  * - `connection`
42
112
  * - `model`
43
- * - `sync`
44
- * - `sync_execution`
113
+ * - `model_sync`
114
+ * - `model_sync_execution`
45
115
  * - `bulk_sync`
46
116
  * - `bulk_sync_execution`
47
117
  * - `harbor`
@@ -49,8 +119,8 @@ export declare class EntitiesClient {
49
119
  *
50
120
  * Examples:
51
121
  *
52
- * - A model sync execution resolves to a `sync_execution` and includes a `sync`
53
- * relationship.
122
+ * - A model sync execution resolves to a `model_sync_execution` and includes a
123
+ * `sync` relationship.
54
124
  * - A bulk sync execution resolves to a `bulk_sync_execution`, includes a
55
125
  * `bulk_sync` relationship, and may include `context.schema_ids`.
56
126
  * - A Harbor context resolves to a `harbor_context` and includes a `harbor`
@@ -102,8 +172,8 @@ export declare class EntitiesClient {
102
172
  * - `user`
103
173
  * - `connection`
104
174
  * - `model`
105
- * - `sync`
106
- * - `sync_execution`
175
+ * - `model_sync`
176
+ * - `model_sync_execution`
107
177
  * - `bulk_sync`
108
178
  * - `bulk_sync_execution`
109
179
  * - `harbor`
@@ -111,8 +181,8 @@ export declare class EntitiesClient {
111
181
  *
112
182
  * Examples:
113
183
  *
114
- * - A model sync execution resolves to a `sync_execution` and includes a `sync`
115
- * relationship.
184
+ * - A model sync execution resolves to a `model_sync_execution` and includes a
185
+ * `sync` relationship.
116
186
  * - A bulk sync execution resolves to a `bulk_sync_execution`, includes a
117
187
  * `bulk_sync` relationship, and may include `context.schema_ids`.
118
188
  * - A Harbor context resolves to a `harbor_context` and includes a `harbor`
@@ -55,6 +55,130 @@ class EntitiesClient {
55
55
  constructor(options = {}) {
56
56
  this._options = (0, BaseClient_1.normalizeClientOptionsWithAuth)(options);
57
57
  }
58
+ /**
59
+ * Searches models, model fields, model syncs, bulk syncs, and connections in the caller's organization.
60
+ *
61
+ * Supply a nonblank `search` term to search all five result categories. Unlike
62
+ * [entity lookup](../../../api-reference/entities/get), this endpoint does not search
63
+ * Organizations, users, executions, Harbors, or Harbor contexts. Model fields are
64
+ * searchable but have no standalone lookup endpoint.
65
+ *
66
+ * ## Searchable resources
67
+ *
68
+ * - Models: ID, name, and source Connection type.
69
+ * - Model fields: ID, technical name, and label.
70
+ * - Model Syncs: ID, name, source and target Connection types, and saved field and
71
+ * identity mappings. Mappings include source field names and labels, target
72
+ * field IDs, and available target field names.
73
+ * - Bulk Syncs: ID, name, source and target Connection names and types, and enabled
74
+ * schema IDs, display names, and configured output names. Disabled schemas are
75
+ * excluded; enabled schemas remain searchable when the sync is inactive.
76
+ * - Connections: ID and name.
77
+ *
78
+ * Search uses cached metadata and does not refresh schemas. Names absent from
79
+ * that metadata are not searchable. Bulk Sync fields, execution state,
80
+ * expressions, filters, and constant values are not searched.
81
+ *
82
+ * ## Matching and evidence
83
+ *
84
+ * Matching is case-insensitive and uses word prefixes, not fuzzy matching. Every
85
+ * query word must match somewhere within a result. Spaces and punctuation split
86
+ * words: `other emails` matches `other_emails`, but `mail` does not match `email`.
87
+ * Some Model Sync source-type matches require a leading `~`.
88
+ *
89
+ * Each resource appears once. Its `matches` explain which attributes matched and
90
+ * which query terms contributed. Mapping and schema attributes carry their
91
+ * respective `mapping` or `schema` context; resource metadata has neither. A name
92
+ * or Connection type match alone does not establish mapping or schema use.
93
+ * Results include canonical `links`, not complete configurations or schema lists.
94
+ *
95
+ * ## Limits and completeness
96
+ *
97
+ * Results are ordered by category, then name or field label, then ID, not by
98
+ * relevance. `limit` defaults to 50 and accepts 1–100. It limits resource hits,
99
+ * not match evidence. When `metadata.truncated` is `true`, narrow your search or
100
+ * increase the limit. There is no cursor pagination.
101
+ *
102
+ * > ⚠️ Incomplete model-field coverage
103
+ * >
104
+ * > Above 40,000 published model fields, `metadata.model_fields_complete` is
105
+ * > `false`: standalone field results cover a subset, not every published field.
106
+ * > Model Sync mapping search is unaffected. Incomplete or truncated results
107
+ * > cannot establish that no other matches exist.
108
+ *
109
+ * @param {Polytomic.EntitiesSearchRequest} request
110
+ * @param {EntitiesClient.RequestOptions} requestOptions - Request-specific configuration.
111
+ *
112
+ * @throws {@link Polytomic.BadRequestError}
113
+ * @throws {@link Polytomic.UnauthorizedError}
114
+ * @throws {@link Polytomic.ForbiddenError}
115
+ * @throws {@link Polytomic.NotFoundError}
116
+ * @throws {@link Polytomic.InternalServerError}
117
+ * @throws {@link errors.PolytomicError}
118
+ * @throws {@link errors.PolytomicTimeoutError}
119
+ *
120
+ * @example
121
+ * await client.entities.search({
122
+ * search: "email",
123
+ * limit: 50
124
+ * })
125
+ */
126
+ search(request, requestOptions) {
127
+ return core.HttpResponsePromise.fromPromise(this.__search(request, requestOptions));
128
+ }
129
+ __search(request, requestOptions) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
132
+ const { search, limit } = request;
133
+ const _queryParams = {
134
+ search,
135
+ limit,
136
+ };
137
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
138
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
139
+ "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",
140
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
141
+ const _response = yield core.fetcher({
142
+ 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/entities/search"),
143
+ method: "GET",
144
+ headers: _headers,
145
+ queryString: core.url
146
+ .queryBuilder()
147
+ .addMany(_queryParams)
148
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
149
+ .build(),
150
+ 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,
151
+ 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,
152
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
153
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
154
+ logging: this._options.logging,
155
+ });
156
+ if (_response.ok) {
157
+ return { data: _response.body, rawResponse: _response.rawResponse };
158
+ }
159
+ if (_response.error.reason === "status-code") {
160
+ switch (_response.error.statusCode) {
161
+ case 400:
162
+ throw new Polytomic.BadRequestError(_response.error.body, _response.rawResponse);
163
+ case 401:
164
+ throw new Polytomic.UnauthorizedError(_response.error.body, _response.rawResponse);
165
+ case 403:
166
+ throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
167
+ case 404:
168
+ throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
169
+ case 500:
170
+ throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
171
+ default:
172
+ throw new errors.PolytomicError({
173
+ statusCode: _response.error.statusCode,
174
+ body: _response.error.body,
175
+ rawResponse: _response.rawResponse,
176
+ });
177
+ }
178
+ }
179
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/entities/search");
180
+ });
181
+ }
58
182
  /**
59
183
  * Returns a resolved entity by ID.
60
184
  *
@@ -85,8 +209,8 @@ class EntitiesClient {
85
209
  * - `user`
86
210
  * - `connection`
87
211
  * - `model`
88
- * - `sync`
89
- * - `sync_execution`
212
+ * - `model_sync`
213
+ * - `model_sync_execution`
90
214
  * - `bulk_sync`
91
215
  * - `bulk_sync_execution`
92
216
  * - `harbor`
@@ -94,8 +218,8 @@ class EntitiesClient {
94
218
  *
95
219
  * Examples:
96
220
  *
97
- * - A model sync execution resolves to a `sync_execution` and includes a `sync`
98
- * relationship.
221
+ * - A model sync execution resolves to a `model_sync_execution` and includes a
222
+ * `sync` relationship.
99
223
  * - A bulk sync execution resolves to a `bulk_sync_execution`, includes a
100
224
  * `bulk_sync` relationship, and may include `context.schema_ids`.
101
225
  * - A Harbor context resolves to a `harbor_context` and includes a `harbor`
@@ -190,8 +314,8 @@ class EntitiesClient {
190
314
  * - `user`
191
315
  * - `connection`
192
316
  * - `model`
193
- * - `sync`
194
- * - `sync_execution`
317
+ * - `model_sync`
318
+ * - `model_sync_execution`
195
319
  * - `bulk_sync`
196
320
  * - `bulk_sync_execution`
197
321
  * - `harbor`
@@ -199,8 +323,8 @@ class EntitiesClient {
199
323
  *
200
324
  * Examples:
201
325
  *
202
- * - A model sync execution resolves to a `sync_execution` and includes a `sync`
203
- * relationship.
326
+ * - A model sync execution resolves to a `model_sync_execution` and includes a
327
+ * `sync` relationship.
204
328
  * - A bulk sync execution resolves to a `bulk_sync_execution`, includes a
205
329
  * `bulk_sync` relationship, and may include `context.schema_ids`.
206
330
  * - A Harbor context resolves to a `harbor_context` and includes a `harbor`
@@ -1 +1 @@
1
- export {};
1
+ export * from "./requests";
@@ -1,2 +1,17 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * search: "email",
5
+ * limit: 50
6
+ * }
7
+ */
8
+ export interface EntitiesSearchRequest {
9
+ /** Search term matched, by word prefix, against models, model fields, model syncs, bulk syncs, and connections in the caller's organization. */
10
+ search: string;
11
+ /** Maximum number of results to return across all result types. Defaults to 50 and cannot exceed 100. */
12
+ limit?: number;
13
+ }
@@ -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 @@
1
+ export type { EntitiesSearchRequest } from "./EntitiesSearchRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });