polytomic 1.15.2 → 1.16.1

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 (100) hide show
  1. package/api/resources/bulkSync/client/Client.d.ts +13 -0
  2. package/api/resources/bulkSync/client/Client.js +72 -10
  3. package/api/resources/bulkSync/resources/executions/client/Client.d.ts +14 -0
  4. package/api/resources/bulkSync/resources/executions/client/Client.js +68 -5
  5. package/api/resources/bulkSync/resources/schedules/client/Client.js +5 -5
  6. package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +14 -0
  7. package/api/resources/bulkSync/resources/schemas/client/Client.js +67 -4
  8. package/api/resources/connections/client/Client.d.ts +32 -0
  9. package/api/resources/connections/client/Client.js +142 -10
  10. package/api/resources/connections/client/requests/ApiRequest.d.ts +13 -0
  11. package/api/resources/connections/client/requests/ApiRequest.js +5 -0
  12. package/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.d.ts +15 -0
  13. package/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.js +5 -0
  14. package/api/resources/connections/client/requests/index.d.ts +2 -0
  15. package/api/resources/events/client/Client.js +2 -2
  16. package/api/resources/identity/client/Client.js +1 -1
  17. package/api/resources/jobs/client/Client.js +1 -1
  18. package/api/resources/modelSync/client/Client.js +12 -12
  19. package/api/resources/modelSync/resources/executions/client/Client.js +5 -5
  20. package/api/resources/modelSync/resources/targets/client/Client.js +4 -4
  21. package/api/resources/models/client/Client.js +9 -9
  22. package/api/resources/notifications/client/Client.js +2 -2
  23. package/api/resources/organization/client/Client.js +5 -5
  24. package/api/resources/permissions/resources/policies/client/Client.js +5 -5
  25. package/api/resources/permissions/resources/roles/client/Client.js +5 -5
  26. package/api/resources/queryRunner/client/Client.js +2 -2
  27. package/api/resources/schemas/client/Client.js +8 -8
  28. package/api/resources/users/client/Client.d.ts +5 -20
  29. package/api/resources/users/client/Client.js +21 -26
  30. package/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +1 -0
  31. package/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +1 -0
  32. package/api/resources/webhooks/client/Client.js +7 -7
  33. package/api/types/BulkBulkSyncSchedule.d.ts +2 -0
  34. package/api/types/BulkScheduleSyncMode.d.ts +10 -0
  35. package/api/types/BulkScheduleSyncMode.js +12 -0
  36. package/api/types/CancelBulkSyncResponse.d.ts +6 -0
  37. package/api/types/CancelBulkSyncResponse.js +5 -0
  38. package/api/types/CancelBulkSyncResponseEnvelope.d.ts +7 -0
  39. package/api/types/CancelBulkSyncResponseEnvelope.js +5 -0
  40. package/api/types/ConnectionResponseSchema.d.ts +2 -0
  41. package/api/types/CreateSharedConnectionResponseSchema.d.ts +6 -0
  42. package/api/types/CreateSharedConnectionResponseSchema.js +5 -0
  43. package/api/types/User.d.ts +1 -0
  44. package/api/types/V2CreateSharedConnectionResponseEnvelope.d.ts +7 -0
  45. package/api/types/V2CreateSharedConnectionResponseEnvelope.js +5 -0
  46. package/api/types/index.d.ts +5 -0
  47. package/api/types/index.js +5 -0
  48. package/dist/api/resources/bulkSync/client/Client.d.ts +13 -0
  49. package/dist/api/resources/bulkSync/client/Client.js +72 -10
  50. package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +14 -0
  51. package/dist/api/resources/bulkSync/resources/executions/client/Client.js +68 -5
  52. package/dist/api/resources/bulkSync/resources/schedules/client/Client.js +5 -5
  53. package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +14 -0
  54. package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +67 -4
  55. package/dist/api/resources/connections/client/Client.d.ts +32 -0
  56. package/dist/api/resources/connections/client/Client.js +142 -10
  57. package/dist/api/resources/connections/client/requests/ApiRequest.d.ts +13 -0
  58. package/dist/api/resources/connections/client/requests/ApiRequest.js +5 -0
  59. package/dist/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.d.ts +15 -0
  60. package/dist/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.js +5 -0
  61. package/dist/api/resources/connections/client/requests/index.d.ts +2 -0
  62. package/dist/api/resources/events/client/Client.js +2 -2
  63. package/dist/api/resources/identity/client/Client.js +1 -1
  64. package/dist/api/resources/jobs/client/Client.js +1 -1
  65. package/dist/api/resources/modelSync/client/Client.js +12 -12
  66. package/dist/api/resources/modelSync/resources/executions/client/Client.js +5 -5
  67. package/dist/api/resources/modelSync/resources/targets/client/Client.js +4 -4
  68. package/dist/api/resources/models/client/Client.js +9 -9
  69. package/dist/api/resources/notifications/client/Client.js +2 -2
  70. package/dist/api/resources/organization/client/Client.js +5 -5
  71. package/dist/api/resources/permissions/resources/policies/client/Client.js +5 -5
  72. package/dist/api/resources/permissions/resources/roles/client/Client.js +5 -5
  73. package/dist/api/resources/queryRunner/client/Client.js +2 -2
  74. package/dist/api/resources/schemas/client/Client.js +8 -8
  75. package/dist/api/resources/users/client/Client.d.ts +5 -20
  76. package/dist/api/resources/users/client/Client.js +21 -26
  77. package/dist/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +1 -0
  78. package/dist/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +1 -0
  79. package/dist/api/resources/webhooks/client/Client.js +7 -7
  80. package/dist/api/types/BulkBulkSyncSchedule.d.ts +2 -0
  81. package/dist/api/types/BulkScheduleSyncMode.d.ts +10 -0
  82. package/dist/api/types/BulkScheduleSyncMode.js +12 -0
  83. package/dist/api/types/CancelBulkSyncResponse.d.ts +6 -0
  84. package/dist/api/types/CancelBulkSyncResponse.js +5 -0
  85. package/dist/api/types/CancelBulkSyncResponseEnvelope.d.ts +7 -0
  86. package/dist/api/types/CancelBulkSyncResponseEnvelope.js +5 -0
  87. package/dist/api/types/ConnectionResponseSchema.d.ts +2 -0
  88. package/dist/api/types/CreateSharedConnectionResponseSchema.d.ts +6 -0
  89. package/dist/api/types/CreateSharedConnectionResponseSchema.js +5 -0
  90. package/dist/api/types/User.d.ts +1 -0
  91. package/dist/api/types/V2CreateSharedConnectionResponseEnvelope.d.ts +7 -0
  92. package/dist/api/types/V2CreateSharedConnectionResponseEnvelope.js +5 -0
  93. package/dist/api/types/index.d.ts +5 -0
  94. package/dist/api/types/index.js +5 -0
  95. package/dist/version.d.ts +1 -1
  96. package/dist/version.js +1 -1
  97. package/package.json +1 -1
  98. package/reference.md +276 -85
  99. package/version.d.ts +1 -1
  100. package/version.js +1 -1
@@ -59,14 +59,11 @@ class Users {
59
59
  this._options = _options;
60
60
  }
61
61
  /**
62
- * > 🚧 Requires partner key
63
- * >
64
- * > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
65
- *
66
62
  * @param {string} orgId
67
63
  * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
68
64
  *
69
65
  * @throws {@link Polytomic.UnauthorizedError}
66
+ * @throws {@link Polytomic.ForbiddenError}
70
67
  * @throws {@link Polytomic.NotFoundError}
71
68
  *
72
69
  * @example
@@ -80,7 +77,7 @@ class Users {
80
77
  method: "GET",
81
78
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
82
79
  ? yield core.Supplier.get(this._options.version)
83
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
81
  contentType: "application/json",
85
82
  requestType: "json",
86
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -94,6 +91,8 @@ class Users {
94
91
  switch (_response.error.statusCode) {
95
92
  case 401:
96
93
  throw new Polytomic.UnauthorizedError(_response.error.body);
94
+ case 403:
95
+ throw new Polytomic.ForbiddenError(_response.error.body);
97
96
  case 404:
98
97
  throw new Polytomic.NotFoundError(_response.error.body);
99
98
  default:
@@ -119,15 +118,12 @@ class Users {
119
118
  });
120
119
  }
121
120
  /**
122
- * > 🚧 Requires partner key
123
- * >
124
- * > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
125
- *
126
121
  * @param {string} orgId
127
122
  * @param {Polytomic.CreateUserRequestSchema} request
128
123
  * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
129
124
  *
130
125
  * @throws {@link Polytomic.UnauthorizedError}
126
+ * @throws {@link Polytomic.ForbiddenError}
131
127
  * @throws {@link Polytomic.UnprocessableEntityError}
132
128
  * @throws {@link Polytomic.InternalServerError}
133
129
  *
@@ -144,7 +140,7 @@ class Users {
144
140
  method: "POST",
145
141
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
146
142
  ? yield core.Supplier.get(this._options.version)
147
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
143
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
148
144
  contentType: "application/json",
149
145
  requestType: "json",
150
146
  body: request,
@@ -159,6 +155,8 @@ class Users {
159
155
  switch (_response.error.statusCode) {
160
156
  case 401:
161
157
  throw new Polytomic.UnauthorizedError(_response.error.body);
158
+ case 403:
159
+ throw new Polytomic.ForbiddenError(_response.error.body);
162
160
  case 422:
163
161
  throw new Polytomic.UnprocessableEntityError(_response.error.body);
164
162
  case 500:
@@ -186,15 +184,12 @@ class Users {
186
184
  });
187
185
  }
188
186
  /**
189
- * > 🚧 Requires partner key
190
- * >
191
- * > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
192
- *
193
187
  * @param {string} id
194
188
  * @param {string} orgId
195
189
  * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
196
190
  *
197
191
  * @throws {@link Polytomic.UnauthorizedError}
192
+ * @throws {@link Polytomic.ForbiddenError}
198
193
  * @throws {@link Polytomic.NotFoundError}
199
194
  * @throws {@link Polytomic.InternalServerError}
200
195
  *
@@ -209,7 +204,7 @@ class Users {
209
204
  method: "GET",
210
205
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
211
206
  ? yield core.Supplier.get(this._options.version)
212
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
207
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
213
208
  contentType: "application/json",
214
209
  requestType: "json",
215
210
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -223,6 +218,8 @@ class Users {
223
218
  switch (_response.error.statusCode) {
224
219
  case 401:
225
220
  throw new Polytomic.UnauthorizedError(_response.error.body);
221
+ case 403:
222
+ throw new Polytomic.ForbiddenError(_response.error.body);
226
223
  case 404:
227
224
  throw new Polytomic.NotFoundError(_response.error.body);
228
225
  case 500:
@@ -250,16 +247,13 @@ class Users {
250
247
  });
251
248
  }
252
249
  /**
253
- * > 🚧 Requires partner key
254
- * >
255
- * > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
256
- *
257
250
  * @param {string} id
258
251
  * @param {string} orgId
259
252
  * @param {Polytomic.UpdateUserRequestSchema} request
260
253
  * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
261
254
  *
262
255
  * @throws {@link Polytomic.UnauthorizedError}
256
+ * @throws {@link Polytomic.ForbiddenError}
263
257
  * @throws {@link Polytomic.UnprocessableEntityError}
264
258
  * @throws {@link Polytomic.InternalServerError}
265
259
  *
@@ -276,7 +270,7 @@ class Users {
276
270
  method: "PUT",
277
271
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
278
272
  ? yield core.Supplier.get(this._options.version)
279
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
273
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
280
274
  contentType: "application/json",
281
275
  requestType: "json",
282
276
  body: request,
@@ -291,6 +285,8 @@ class Users {
291
285
  switch (_response.error.statusCode) {
292
286
  case 401:
293
287
  throw new Polytomic.UnauthorizedError(_response.error.body);
288
+ case 403:
289
+ throw new Polytomic.ForbiddenError(_response.error.body);
294
290
  case 422:
295
291
  throw new Polytomic.UnprocessableEntityError(_response.error.body);
296
292
  case 500:
@@ -318,15 +314,12 @@ class Users {
318
314
  });
319
315
  }
320
316
  /**
321
- * > 🚧 Requires partner key
322
- * >
323
- * > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
324
- *
325
317
  * @param {string} id
326
318
  * @param {string} orgId
327
319
  * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
328
320
  *
329
321
  * @throws {@link Polytomic.UnauthorizedError}
322
+ * @throws {@link Polytomic.ForbiddenError}
330
323
  * @throws {@link Polytomic.NotFoundError}
331
324
  * @throws {@link Polytomic.InternalServerError}
332
325
  *
@@ -341,7 +334,7 @@ class Users {
341
334
  method: "DELETE",
342
335
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
343
336
  ? yield core.Supplier.get(this._options.version)
344
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
337
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
345
338
  contentType: "application/json",
346
339
  requestType: "json",
347
340
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -355,6 +348,8 @@ class Users {
355
348
  switch (_response.error.statusCode) {
356
349
  case 401:
357
350
  throw new Polytomic.UnauthorizedError(_response.error.body);
351
+ case 403:
352
+ throw new Polytomic.ForbiddenError(_response.error.body);
358
353
  case 404:
359
354
  throw new Polytomic.NotFoundError(_response.error.body);
360
355
  case 500:
@@ -413,7 +408,7 @@ class Users {
413
408
  method: "POST",
414
409
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
415
410
  ? yield core.Supplier.get(this._options.version)
416
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
411
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
417
412
  contentType: "application/json",
418
413
  queryParameters: _queryParams,
419
414
  requestType: "json",
@@ -10,4 +10,5 @@
10
10
  export interface CreateUserRequestSchema {
11
11
  email: string;
12
12
  role?: string;
13
+ role_ids?: string[];
13
14
  }
@@ -10,4 +10,5 @@
10
10
  export interface UpdateUserRequestSchema {
11
11
  email: string;
12
12
  role?: string;
13
+ role_ids?: string[];
13
14
  }
@@ -81,7 +81,7 @@ class Webhooks {
81
81
  method: "GET",
82
82
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
83
83
  ? yield core.Supplier.get(this._options.version)
84
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
85
85
  contentType: "application/json",
86
86
  requestType: "json",
87
87
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -147,7 +147,7 @@ class Webhooks {
147
147
  method: "POST",
148
148
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
149
149
  ? yield core.Supplier.get(this._options.version)
150
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
150
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
151
151
  contentType: "application/json",
152
152
  requestType: "json",
153
153
  body: request,
@@ -212,7 +212,7 @@ class Webhooks {
212
212
  method: "GET",
213
213
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
214
214
  ? yield core.Supplier.get(this._options.version)
215
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
215
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
216
216
  contentType: "application/json",
217
217
  requestType: "json",
218
218
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -279,7 +279,7 @@ class Webhooks {
279
279
  method: "PUT",
280
280
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
281
281
  ? yield core.Supplier.get(this._options.version)
282
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
282
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
283
283
  contentType: "application/json",
284
284
  requestType: "json",
285
285
  body: request,
@@ -339,7 +339,7 @@ class Webhooks {
339
339
  method: "DELETE",
340
340
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
341
341
  ? yield core.Supplier.get(this._options.version)
342
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
342
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
343
343
  contentType: "application/json",
344
344
  requestType: "json",
345
345
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -398,7 +398,7 @@ class Webhooks {
398
398
  method: "POST",
399
399
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
400
400
  ? yield core.Supplier.get(this._options.version)
401
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
401
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
402
402
  contentType: "application/json",
403
403
  requestType: "json",
404
404
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -457,7 +457,7 @@ class Webhooks {
457
457
  method: "POST",
458
458
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
459
459
  ? yield core.Supplier.get(this._options.version)
460
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
460
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
461
461
  contentType: "application/json",
462
462
  requestType: "json",
463
463
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -13,8 +13,10 @@ export interface BulkBulkSyncSchedule {
13
13
  hour?: string;
14
14
  minute?: string;
15
15
  month?: string;
16
+ schemas?: string[];
16
17
  selectiveMode?: Polytomic.BulkSelectiveMode;
17
18
  syncId?: string;
19
+ syncMode?: Polytomic.BulkScheduleSyncMode;
18
20
  updatedAt?: string;
19
21
  updatedBy?: string;
20
22
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type BulkScheduleSyncMode = "normal" | "refetch" | "resync" | "rebuild";
5
+ export declare const BulkScheduleSyncMode: {
6
+ readonly Normal: "normal";
7
+ readonly Refetch: "refetch";
8
+ readonly Resync: "resync";
9
+ readonly Rebuild: "rebuild";
10
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BulkScheduleSyncMode = void 0;
7
+ exports.BulkScheduleSyncMode = {
8
+ Normal: "normal",
9
+ Refetch: "refetch",
10
+ Resync: "resync",
11
+ Rebuild: "rebuild",
12
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface CancelBulkSyncResponse {
5
+ message?: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Polytomic from "../index";
5
+ export interface CancelBulkSyncResponseEnvelope {
6
+ data?: Polytomic.CancelBulkSyncResponse;
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -11,6 +11,8 @@ export interface ConnectionResponseSchema {
11
11
  id?: string;
12
12
  name?: string;
13
13
  organization_id?: string;
14
+ /** For shared connections, the ID of the parent connection. */
15
+ parent_connection_id?: string;
14
16
  policies?: string[];
15
17
  saved?: boolean;
16
18
  status?: string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface CreateSharedConnectionResponseSchema {
5
+ id?: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,4 +6,5 @@ export interface User {
6
6
  id?: string;
7
7
  organization_id?: string;
8
8
  role?: string;
9
+ role_ids?: string[];
9
10
  }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Polytomic from "../index";
5
+ export interface V2CreateSharedConnectionResponseEnvelope {
6
+ data?: Polytomic.CreateSharedConnectionResponseSchema;
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,6 +8,7 @@ export * from "./BulkItemizedSchedule";
8
8
  export * from "./BulkMultiScheduleConfiguration";
9
9
  export * from "./BulkNormalizeNames";
10
10
  export * from "./BulkSchedule";
11
+ export * from "./BulkScheduleSyncMode";
11
12
  export * from "./BulkSchemaExecutionStatus";
12
13
  export * from "./BulkSelectiveMode";
13
14
  export * from "./BulkSyncMode";
@@ -55,6 +56,8 @@ export * from "./BulkSyncDestEnvelope";
55
56
  export * from "./BulkSyncListEnvelope";
56
57
  export * from "./BulkSyncResponse";
57
58
  export * from "./BulkSyncResponseEnvelope";
59
+ export * from "./CancelBulkSyncResponse";
60
+ export * from "./CancelBulkSyncResponseEnvelope";
58
61
  export * from "./CancelModelSyncResponse";
59
62
  export * from "./CancelModelSyncResponseEnvelope";
60
63
  export * from "./ConfigurationValue";
@@ -73,6 +76,8 @@ export * from "./ConnectionTypeSchema";
73
76
  export * from "./CreateConnectionResponseEnvelope";
74
77
  export * from "./CreateConnectionResponseSchema";
75
78
  export * from "./CreateModelRequest";
79
+ export * from "./V2CreateSharedConnectionResponseEnvelope";
80
+ export * from "./CreateSharedConnectionResponseSchema";
76
81
  export * from "./V2EnricherConfiguration";
77
82
  export * from "./V2EnricherMapping";
78
83
  export * from "./Enrichment";
@@ -24,6 +24,7 @@ __exportStar(require("./BulkItemizedSchedule"), exports);
24
24
  __exportStar(require("./BulkMultiScheduleConfiguration"), exports);
25
25
  __exportStar(require("./BulkNormalizeNames"), exports);
26
26
  __exportStar(require("./BulkSchedule"), exports);
27
+ __exportStar(require("./BulkScheduleSyncMode"), exports);
27
28
  __exportStar(require("./BulkSchemaExecutionStatus"), exports);
28
29
  __exportStar(require("./BulkSelectiveMode"), exports);
29
30
  __exportStar(require("./BulkSyncMode"), exports);
@@ -71,6 +72,8 @@ __exportStar(require("./BulkSyncDestEnvelope"), exports);
71
72
  __exportStar(require("./BulkSyncListEnvelope"), exports);
72
73
  __exportStar(require("./BulkSyncResponse"), exports);
73
74
  __exportStar(require("./BulkSyncResponseEnvelope"), exports);
75
+ __exportStar(require("./CancelBulkSyncResponse"), exports);
76
+ __exportStar(require("./CancelBulkSyncResponseEnvelope"), exports);
74
77
  __exportStar(require("./CancelModelSyncResponse"), exports);
75
78
  __exportStar(require("./CancelModelSyncResponseEnvelope"), exports);
76
79
  __exportStar(require("./ConfigurationValue"), exports);
@@ -89,6 +92,8 @@ __exportStar(require("./ConnectionTypeSchema"), exports);
89
92
  __exportStar(require("./CreateConnectionResponseEnvelope"), exports);
90
93
  __exportStar(require("./CreateConnectionResponseSchema"), exports);
91
94
  __exportStar(require("./CreateModelRequest"), exports);
95
+ __exportStar(require("./V2CreateSharedConnectionResponseEnvelope"), exports);
96
+ __exportStar(require("./CreateSharedConnectionResponseSchema"), exports);
92
97
  __exportStar(require("./V2EnricherConfiguration"), exports);
93
98
  __exportStar(require("./V2EnricherMapping"), exports);
94
99
  __exportStar(require("./Enrichment"), exports);
@@ -177,6 +177,19 @@ export declare class BulkSync {
177
177
  * })
178
178
  */
179
179
  activate(id: string, request: Polytomic.ActivateSyncInput, requestOptions?: BulkSync.RequestOptions): Promise<Polytomic.ActivateSyncEnvelope>;
180
+ /**
181
+ * @param {string} id - The active execution of this bulk sync ID will be cancelled.
182
+ * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
183
+ *
184
+ * @throws {@link Polytomic.UnauthorizedError}
185
+ * @throws {@link Polytomic.ForbiddenError}
186
+ * @throws {@link Polytomic.NotFoundError}
187
+ * @throws {@link Polytomic.InternalServerError}
188
+ *
189
+ * @example
190
+ * await client.bulkSync.cancel("248df4b7-aa70-47b8-a036-33ac447e668d")
191
+ */
192
+ cancel(id: string, requestOptions?: BulkSync.RequestOptions): Promise<Polytomic.CancelBulkSyncResponseEnvelope>;
180
193
  /**
181
194
  * @param {string} id
182
195
  * @param {Polytomic.StartBulkSyncRequest} request
@@ -98,7 +98,7 @@ class BulkSync {
98
98
  method: "GET",
99
99
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
100
100
  ? yield core.Supplier.get(this._options.version)
101
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
101
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
102
102
  contentType: "application/json",
103
103
  queryParameters: _queryParams,
104
104
  requestType: "json",
@@ -195,7 +195,7 @@ class BulkSync {
195
195
  method: "POST",
196
196
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
197
197
  ? yield core.Supplier.get(this._options.version)
198
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
198
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
199
199
  contentType: "application/json",
200
200
  requestType: "json",
201
201
  body: request,
@@ -266,7 +266,7 @@ class BulkSync {
266
266
  method: "GET",
267
267
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
268
268
  ? yield core.Supplier.get(this._options.version)
269
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
269
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
270
270
  contentType: "application/json",
271
271
  queryParameters: _queryParams,
272
272
  requestType: "json",
@@ -341,7 +341,7 @@ class BulkSync {
341
341
  method: "PUT",
342
342
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
343
343
  ? yield core.Supplier.get(this._options.version)
344
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
344
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
345
345
  contentType: "application/json",
346
346
  requestType: "json",
347
347
  body: request,
@@ -414,7 +414,7 @@ class BulkSync {
414
414
  method: "DELETE",
415
415
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
416
416
  ? yield core.Supplier.get(this._options.version)
417
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
417
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
418
418
  contentType: "application/json",
419
419
  queryParameters: _queryParams,
420
420
  requestType: "json",
@@ -480,7 +480,7 @@ class BulkSync {
480
480
  method: "POST",
481
481
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
482
482
  ? yield core.Supplier.get(this._options.version)
483
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
483
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
484
484
  contentType: "application/json",
485
485
  requestType: "json",
486
486
  body: request,
@@ -523,6 +523,68 @@ class BulkSync {
523
523
  }
524
524
  });
525
525
  }
526
+ /**
527
+ * @param {string} id - The active execution of this bulk sync ID will be cancelled.
528
+ * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
529
+ *
530
+ * @throws {@link Polytomic.UnauthorizedError}
531
+ * @throws {@link Polytomic.ForbiddenError}
532
+ * @throws {@link Polytomic.NotFoundError}
533
+ * @throws {@link Polytomic.InternalServerError}
534
+ *
535
+ * @example
536
+ * await client.bulkSync.cancel("248df4b7-aa70-47b8-a036-33ac447e668d")
537
+ */
538
+ cancel(id, requestOptions) {
539
+ return __awaiter(this, void 0, void 0, function* () {
540
+ var _a, _b;
541
+ const _response = yield core.fetcher({
542
+ url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}/cancel`),
543
+ method: "POST",
544
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
545
+ ? yield core.Supplier.get(this._options.version)
546
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
547
+ contentType: "application/json",
548
+ requestType: "json",
549
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
550
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
551
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
552
+ });
553
+ if (_response.ok) {
554
+ return _response.body;
555
+ }
556
+ if (_response.error.reason === "status-code") {
557
+ switch (_response.error.statusCode) {
558
+ case 401:
559
+ throw new Polytomic.UnauthorizedError(_response.error.body);
560
+ case 403:
561
+ throw new Polytomic.ForbiddenError(_response.error.body);
562
+ case 404:
563
+ throw new Polytomic.NotFoundError(_response.error.body);
564
+ case 500:
565
+ throw new Polytomic.InternalServerError(_response.error.body);
566
+ default:
567
+ throw new errors.PolytomicError({
568
+ statusCode: _response.error.statusCode,
569
+ body: _response.error.body,
570
+ });
571
+ }
572
+ }
573
+ switch (_response.error.reason) {
574
+ case "non-json":
575
+ throw new errors.PolytomicError({
576
+ statusCode: _response.error.statusCode,
577
+ body: _response.error.rawBody,
578
+ });
579
+ case "timeout":
580
+ throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/bulk/syncs/{id}/cancel.");
581
+ case "unknown":
582
+ throw new errors.PolytomicError({
583
+ message: _response.error.errorMessage,
584
+ });
585
+ }
586
+ });
587
+ }
526
588
  /**
527
589
  * @param {string} id
528
590
  * @param {Polytomic.StartBulkSyncRequest} request
@@ -543,7 +605,7 @@ class BulkSync {
543
605
  method: "POST",
544
606
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
545
607
  ? yield core.Supplier.get(this._options.version)
546
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
608
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
547
609
  contentType: "application/json",
548
610
  requestType: "json",
549
611
  body: request,
@@ -603,7 +665,7 @@ class BulkSync {
603
665
  method: "GET",
604
666
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
605
667
  ? yield core.Supplier.get(this._options.version)
606
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
668
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
607
669
  contentType: "application/json",
608
670
  requestType: "json",
609
671
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -671,7 +733,7 @@ class BulkSync {
671
733
  method: "GET",
672
734
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
673
735
  ? yield core.Supplier.get(this._options.version)
674
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
736
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
675
737
  contentType: "application/json",
676
738
  queryParameters: _queryParams,
677
739
  requestType: "json",
@@ -734,7 +796,7 @@ class BulkSync {
734
796
  method: "GET",
735
797
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
736
798
  ? yield core.Supplier.get(this._options.version)
737
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
799
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
738
800
  contentType: "application/json",
739
801
  requestType: "json",
740
802
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,