polytomic 1.8.4 → 1.9.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 (147) hide show
  1. package/Client.d.ts +3 -3
  2. package/Client.js +9 -9
  3. package/api/errors/index.d.ts +1 -1
  4. package/api/errors/index.js +1 -1
  5. package/api/resources/bulkSync/client/Client.d.ts +6 -4
  6. package/api/resources/bulkSync/client/Client.js +24 -14
  7. package/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +12 -0
  8. package/api/resources/bulkSync/client/requests/BulkSyncListRequest.js +5 -0
  9. package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -3
  10. package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -3
  11. package/api/resources/bulkSync/client/requests/index.d.ts +1 -0
  12. package/api/resources/bulkSync/resources/executions/client/Client.d.ts +27 -0
  13. package/api/resources/bulkSync/resources/executions/client/Client.js +144 -3
  14. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsExportLogsRequest.d.ts +13 -0
  15. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsExportLogsRequest.js +5 -0
  16. package/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
  17. package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +1 -0
  18. package/api/resources/bulkSync/resources/schemas/client/Client.js +7 -4
  19. package/api/resources/connections/client/Client.js +8 -8
  20. package/api/resources/events/client/Client.js +2 -2
  21. package/api/resources/identity/client/Client.js +1 -1
  22. package/api/resources/index.d.ts +2 -2
  23. package/api/resources/index.js +3 -3
  24. package/api/resources/jobs/client/Client.js +1 -1
  25. package/api/resources/modelSync/client/Client.d.ts +21 -2
  26. package/api/resources/modelSync/client/Client.js +106 -15
  27. package/api/resources/modelSync/client/requests/ModelSyncListRequest.d.ts +16 -0
  28. package/api/resources/modelSync/client/requests/ModelSyncListRequest.js +5 -0
  29. package/api/resources/modelSync/client/requests/index.d.ts +1 -0
  30. package/api/resources/modelSync/resources/executions/client/Client.d.ts +6 -6
  31. package/api/resources/modelSync/resources/executions/client/Client.js +8 -8
  32. package/api/resources/models/client/Client.d.ts +15 -0
  33. package/api/resources/models/client/Client.js +87 -8
  34. package/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +10 -0
  35. package/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.js +5 -0
  36. package/api/resources/models/client/requests/index.d.ts +1 -0
  37. package/api/resources/organization/client/Client.js +5 -5
  38. package/api/resources/permissions/resources/policies/client/Client.js +5 -5
  39. package/api/resources/permissions/resources/roles/client/Client.js +5 -5
  40. package/api/resources/queryRunner/client/Client.js +2 -2
  41. package/api/resources/schemas/client/Client.js +4 -4
  42. package/api/resources/users/client/Client.js +6 -6
  43. package/api/resources/webhooks/client/Client.js +5 -5
  44. package/api/types/BulkSyncDest.d.ts +1 -1
  45. package/api/types/BulkSyncResponse.d.ts +4 -0
  46. package/api/types/BulkSyncSchemaExecution.d.ts +1 -0
  47. package/api/types/BulkSyncSchemaExecutionStatus.d.ts +1 -0
  48. package/api/types/SchemaField.d.ts +3 -1
  49. package/api/types/SupportedBulkMode.d.ts +12 -0
  50. package/api/types/SupportedBulkMode.js +5 -0
  51. package/api/types/SupportedMode.d.ts +6 -5
  52. package/api/types/SyncMode.d.ts +17 -0
  53. package/api/types/SyncMode.js +16 -0
  54. package/api/types/TargetObject.d.ts +10 -0
  55. package/api/types/TargetObject.js +5 -0
  56. package/api/types/TypesType.d.ts +4 -0
  57. package/api/types/TypesType.js +5 -0
  58. package/api/types/UtilFieldType.d.ts +13 -0
  59. package/api/types/UtilFieldType.js +15 -0
  60. package/api/types/V2ExecutionLogType.d.ts +12 -0
  61. package/api/types/V2ExecutionLogType.js +14 -0
  62. package/api/types/V4BulkSyncExecutionLogs.d.ts +4 -0
  63. package/api/types/V4BulkSyncExecutionLogs.js +5 -0
  64. package/api/types/V4BulkSyncExecutionLogsEnvelope.d.ts +7 -0
  65. package/api/types/V4BulkSyncExecutionLogsEnvelope.js +5 -0
  66. package/api/types/V4ExportSyncLogsEnvelope.d.ts +8 -0
  67. package/api/types/V4ExportSyncLogsEnvelope.js +5 -0
  68. package/api/types/V4ExportSyncLogsResponse.d.ts +6 -0
  69. package/api/types/V4ExportSyncLogsResponse.js +5 -0
  70. package/api/types/V4TargetObjectsResponseEnvelope.d.ts +7 -0
  71. package/api/types/V4TargetObjectsResponseEnvelope.js +5 -0
  72. package/api/types/index.d.ts +12 -1
  73. package/api/types/index.js +12 -1
  74. package/dist/Client.d.ts +3 -3
  75. package/dist/Client.js +9 -9
  76. package/dist/api/errors/index.d.ts +1 -1
  77. package/dist/api/errors/index.js +1 -1
  78. package/dist/api/resources/bulkSync/client/Client.d.ts +6 -4
  79. package/dist/api/resources/bulkSync/client/Client.js +24 -14
  80. package/dist/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +12 -0
  81. package/dist/api/resources/bulkSync/client/requests/BulkSyncListRequest.js +5 -0
  82. package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -3
  83. package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -3
  84. package/dist/api/resources/bulkSync/client/requests/index.d.ts +1 -0
  85. package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +27 -0
  86. package/dist/api/resources/bulkSync/resources/executions/client/Client.js +144 -3
  87. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsExportLogsRequest.d.ts +13 -0
  88. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsExportLogsRequest.js +5 -0
  89. package/dist/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
  90. package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +1 -0
  91. package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +7 -4
  92. package/dist/api/resources/connections/client/Client.js +8 -8
  93. package/dist/api/resources/events/client/Client.js +2 -2
  94. package/dist/api/resources/identity/client/Client.js +1 -1
  95. package/dist/api/resources/index.d.ts +2 -2
  96. package/dist/api/resources/index.js +3 -3
  97. package/dist/api/resources/jobs/client/Client.js +1 -1
  98. package/dist/api/resources/modelSync/client/Client.d.ts +21 -2
  99. package/dist/api/resources/modelSync/client/Client.js +106 -15
  100. package/dist/api/resources/modelSync/client/requests/ModelSyncListRequest.d.ts +16 -0
  101. package/dist/api/resources/modelSync/client/requests/ModelSyncListRequest.js +5 -0
  102. package/dist/api/resources/modelSync/client/requests/index.d.ts +1 -0
  103. package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +6 -6
  104. package/dist/api/resources/modelSync/resources/executions/client/Client.js +8 -8
  105. package/dist/api/resources/models/client/Client.d.ts +15 -0
  106. package/dist/api/resources/models/client/Client.js +87 -8
  107. package/dist/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +10 -0
  108. package/dist/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.js +5 -0
  109. package/dist/api/resources/models/client/requests/index.d.ts +1 -0
  110. package/dist/api/resources/organization/client/Client.js +5 -5
  111. package/dist/api/resources/permissions/resources/policies/client/Client.js +5 -5
  112. package/dist/api/resources/permissions/resources/roles/client/Client.js +5 -5
  113. package/dist/api/resources/queryRunner/client/Client.js +2 -2
  114. package/dist/api/resources/schemas/client/Client.js +4 -4
  115. package/dist/api/resources/users/client/Client.js +6 -6
  116. package/dist/api/resources/webhooks/client/Client.js +5 -5
  117. package/dist/api/types/BulkSyncDest.d.ts +1 -1
  118. package/dist/api/types/BulkSyncResponse.d.ts +4 -0
  119. package/dist/api/types/BulkSyncSchemaExecution.d.ts +1 -0
  120. package/dist/api/types/BulkSyncSchemaExecutionStatus.d.ts +1 -0
  121. package/dist/api/types/SchemaField.d.ts +3 -1
  122. package/dist/api/types/SupportedBulkMode.d.ts +12 -0
  123. package/dist/api/types/SupportedBulkMode.js +5 -0
  124. package/dist/api/types/SupportedMode.d.ts +6 -5
  125. package/dist/api/types/SyncMode.d.ts +17 -0
  126. package/dist/api/types/SyncMode.js +16 -0
  127. package/dist/api/types/TargetObject.d.ts +10 -0
  128. package/dist/api/types/TargetObject.js +5 -0
  129. package/dist/api/types/TypesType.d.ts +4 -0
  130. package/dist/api/types/TypesType.js +5 -0
  131. package/dist/api/types/UtilFieldType.d.ts +13 -0
  132. package/dist/api/types/UtilFieldType.js +15 -0
  133. package/dist/api/types/V2ExecutionLogType.d.ts +12 -0
  134. package/dist/api/types/V2ExecutionLogType.js +14 -0
  135. package/dist/api/types/V4BulkSyncExecutionLogs.d.ts +4 -0
  136. package/dist/api/types/V4BulkSyncExecutionLogs.js +5 -0
  137. package/dist/api/types/V4BulkSyncExecutionLogsEnvelope.d.ts +7 -0
  138. package/dist/api/types/V4BulkSyncExecutionLogsEnvelope.js +5 -0
  139. package/dist/api/types/V4ExportSyncLogsEnvelope.d.ts +8 -0
  140. package/dist/api/types/V4ExportSyncLogsEnvelope.js +5 -0
  141. package/dist/api/types/V4ExportSyncLogsResponse.d.ts +6 -0
  142. package/dist/api/types/V4ExportSyncLogsResponse.js +5 -0
  143. package/dist/api/types/V4TargetObjectsResponseEnvelope.d.ts +7 -0
  144. package/dist/api/types/V4TargetObjectsResponseEnvelope.js +5 -0
  145. package/dist/api/types/index.d.ts +12 -1
  146. package/dist/api/types/index.js +12 -1
  147. package/package.json +1 -1
@@ -81,7 +81,7 @@ class ModelSync {
81
81
  : undefined,
82
82
  "X-Fern-Language": "JavaScript",
83
83
  "X-Fern-SDK-Name": "polytomic",
84
- "X-Fern-SDK-Version": "1.8.4",
84
+ "X-Fern-SDK-Version": "1.9.1",
85
85
  "X-Fern-Runtime": core.RUNTIME.type,
86
86
  "X-Fern-Runtime-Version": core.RUNTIME.version,
87
87
  },
@@ -154,7 +154,7 @@ class ModelSync {
154
154
  : undefined,
155
155
  "X-Fern-Language": "JavaScript",
156
156
  "X-Fern-SDK-Name": "polytomic",
157
- "X-Fern-SDK-Version": "1.8.4",
157
+ "X-Fern-SDK-Version": "1.9.1",
158
158
  "X-Fern-Runtime": core.RUNTIME.type,
159
159
  "X-Fern-Runtime-Version": core.RUNTIME.version,
160
160
  },
@@ -235,7 +235,7 @@ class ModelSync {
235
235
  : undefined,
236
236
  "X-Fern-Language": "JavaScript",
237
237
  "X-Fern-SDK-Name": "polytomic",
238
- "X-Fern-SDK-Version": "1.8.4",
238
+ "X-Fern-SDK-Version": "1.9.1",
239
239
  "X-Fern-Runtime": core.RUNTIME.type,
240
240
  "X-Fern-Runtime-Version": core.RUNTIME.version,
241
241
  },
@@ -317,7 +317,7 @@ class ModelSync {
317
317
  : undefined,
318
318
  "X-Fern-Language": "JavaScript",
319
319
  "X-Fern-SDK-Name": "polytomic",
320
- "X-Fern-SDK-Version": "1.8.4",
320
+ "X-Fern-SDK-Version": "1.9.1",
321
321
  "X-Fern-Runtime": core.RUNTIME.type,
322
322
  "X-Fern-Runtime-Version": core.RUNTIME.version,
323
323
  },
@@ -363,18 +363,106 @@ class ModelSync {
363
363
  });
364
364
  }
365
365
  /**
366
+ * @param {string} id
366
367
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
367
368
  *
369
+ * @throws {@link Polytomic.BadRequestError}
368
370
  * @throws {@link Polytomic.UnauthorizedError}
371
+ * @throws {@link Polytomic.ForbiddenError}
369
372
  * @throws {@link Polytomic.NotFoundError}
370
373
  * @throws {@link Polytomic.InternalServerError}
371
374
  *
372
375
  * @example
373
- * await client.modelSync.list()
376
+ * await client.modelSync.getTargetObjects("248df4b7-aa70-47b8-a036-33ac447e668d")
374
377
  */
375
- list(requestOptions) {
378
+ getTargetObjects(id, requestOptions) {
376
379
  var _a;
377
380
  return __awaiter(this, void 0, void 0, function* () {
381
+ const _response = yield core.fetcher({
382
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}/modelsync/targetobjects`),
383
+ method: "GET",
384
+ headers: {
385
+ Authorization: yield this._getAuthorizationHeader(),
386
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
387
+ ? yield core.Supplier.get(this._options.version)
388
+ : undefined,
389
+ "X-Fern-Language": "JavaScript",
390
+ "X-Fern-SDK-Name": "polytomic",
391
+ "X-Fern-SDK-Version": "1.9.1",
392
+ "X-Fern-Runtime": core.RUNTIME.type,
393
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
394
+ },
395
+ contentType: "application/json",
396
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
397
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
398
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
399
+ });
400
+ if (_response.ok) {
401
+ return _response.body;
402
+ }
403
+ if (_response.error.reason === "status-code") {
404
+ switch (_response.error.statusCode) {
405
+ case 400:
406
+ throw new Polytomic.BadRequestError(_response.error.body);
407
+ case 401:
408
+ throw new Polytomic.UnauthorizedError(_response.error.body);
409
+ case 403:
410
+ throw new Polytomic.ForbiddenError(_response.error.body);
411
+ case 404:
412
+ throw new Polytomic.NotFoundError(_response.error.body);
413
+ case 500:
414
+ throw new Polytomic.InternalServerError(_response.error.body);
415
+ default:
416
+ throw new errors.PolytomicError({
417
+ statusCode: _response.error.statusCode,
418
+ body: _response.error.body,
419
+ });
420
+ }
421
+ }
422
+ switch (_response.error.reason) {
423
+ case "non-json":
424
+ throw new errors.PolytomicError({
425
+ statusCode: _response.error.statusCode,
426
+ body: _response.error.rawBody,
427
+ });
428
+ case "timeout":
429
+ throw new errors.PolytomicTimeoutError();
430
+ case "unknown":
431
+ throw new errors.PolytomicError({
432
+ message: _response.error.errorMessage,
433
+ });
434
+ }
435
+ });
436
+ }
437
+ /**
438
+ * @param {Polytomic.ModelSyncListRequest} request
439
+ * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
440
+ *
441
+ * @throws {@link Polytomic.BadRequestError}
442
+ * @throws {@link Polytomic.UnauthorizedError}
443
+ * @throws {@link Polytomic.NotFoundError}
444
+ * @throws {@link Polytomic.InternalServerError}
445
+ *
446
+ * @example
447
+ * await client.modelSync.list({
448
+ * active: true,
449
+ * target_connection_id: "0b155265-c537-44c9-9359-a3ceb468a4da"
450
+ * })
451
+ */
452
+ list(request = {}, requestOptions) {
453
+ var _a;
454
+ return __awaiter(this, void 0, void 0, function* () {
455
+ const { active, mode, target_connection_id: targetConnectionId } = request;
456
+ const _queryParams = {};
457
+ if (active != null) {
458
+ _queryParams["active"] = active.toString();
459
+ }
460
+ if (mode != null) {
461
+ _queryParams["mode"] = mode;
462
+ }
463
+ if (targetConnectionId != null) {
464
+ _queryParams["target_connection_id"] = targetConnectionId;
465
+ }
378
466
  const _response = yield core.fetcher({
379
467
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/syncs"),
380
468
  method: "GET",
@@ -385,11 +473,12 @@ class ModelSync {
385
473
  : undefined,
386
474
  "X-Fern-Language": "JavaScript",
387
475
  "X-Fern-SDK-Name": "polytomic",
388
- "X-Fern-SDK-Version": "1.8.4",
476
+ "X-Fern-SDK-Version": "1.9.1",
389
477
  "X-Fern-Runtime": core.RUNTIME.type,
390
478
  "X-Fern-Runtime-Version": core.RUNTIME.version,
391
479
  },
392
480
  contentType: "application/json",
481
+ queryParameters: _queryParams,
393
482
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
394
483
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
395
484
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -399,6 +488,8 @@ class ModelSync {
399
488
  }
400
489
  if (_response.error.reason === "status-code") {
401
490
  switch (_response.error.statusCode) {
491
+ case 400:
492
+ throw new Polytomic.BadRequestError(_response.error.body);
402
493
  case 401:
403
494
  throw new Polytomic.UnauthorizedError(_response.error.body);
404
495
  case 404:
@@ -464,7 +555,7 @@ class ModelSync {
464
555
  : undefined,
465
556
  "X-Fern-Language": "JavaScript",
466
557
  "X-Fern-SDK-Name": "polytomic",
467
- "X-Fern-SDK-Version": "1.8.4",
558
+ "X-Fern-SDK-Version": "1.9.1",
468
559
  "X-Fern-Runtime": core.RUNTIME.type,
469
560
  "X-Fern-Runtime-Version": core.RUNTIME.version,
470
561
  },
@@ -533,7 +624,7 @@ class ModelSync {
533
624
  : undefined,
534
625
  "X-Fern-Language": "JavaScript",
535
626
  "X-Fern-SDK-Name": "polytomic",
536
- "X-Fern-SDK-Version": "1.8.4",
627
+ "X-Fern-SDK-Version": "1.9.1",
537
628
  "X-Fern-Runtime": core.RUNTIME.type,
538
629
  "X-Fern-Runtime-Version": core.RUNTIME.version,
539
630
  },
@@ -597,7 +688,7 @@ class ModelSync {
597
688
  : undefined,
598
689
  "X-Fern-Language": "JavaScript",
599
690
  "X-Fern-SDK-Name": "polytomic",
600
- "X-Fern-SDK-Version": "1.8.4",
691
+ "X-Fern-SDK-Version": "1.9.1",
601
692
  "X-Fern-Runtime": core.RUNTIME.type,
602
693
  "X-Fern-Runtime-Version": core.RUNTIME.version,
603
694
  },
@@ -678,7 +769,7 @@ class ModelSync {
678
769
  : undefined,
679
770
  "X-Fern-Language": "JavaScript",
680
771
  "X-Fern-SDK-Name": "polytomic",
681
- "X-Fern-SDK-Version": "1.8.4",
772
+ "X-Fern-SDK-Version": "1.9.1",
682
773
  "X-Fern-Runtime": core.RUNTIME.type,
683
774
  "X-Fern-Runtime-Version": core.RUNTIME.version,
684
775
  },
@@ -752,7 +843,7 @@ class ModelSync {
752
843
  : undefined,
753
844
  "X-Fern-Language": "JavaScript",
754
845
  "X-Fern-SDK-Name": "polytomic",
755
- "X-Fern-SDK-Version": "1.8.4",
846
+ "X-Fern-SDK-Version": "1.9.1",
756
847
  "X-Fern-Runtime": core.RUNTIME.type,
757
848
  "X-Fern-Runtime-Version": core.RUNTIME.version,
758
849
  },
@@ -824,7 +915,7 @@ class ModelSync {
824
915
  : undefined,
825
916
  "X-Fern-Language": "JavaScript",
826
917
  "X-Fern-SDK-Name": "polytomic",
827
- "X-Fern-SDK-Version": "1.8.4",
918
+ "X-Fern-SDK-Version": "1.9.1",
828
919
  "X-Fern-Runtime": core.RUNTIME.type,
829
920
  "X-Fern-Runtime-Version": core.RUNTIME.version,
830
921
  },
@@ -900,7 +991,7 @@ class ModelSync {
900
991
  : undefined,
901
992
  "X-Fern-Language": "JavaScript",
902
993
  "X-Fern-SDK-Name": "polytomic",
903
- "X-Fern-SDK-Version": "1.8.4",
994
+ "X-Fern-SDK-Version": "1.9.1",
904
995
  "X-Fern-Runtime": core.RUNTIME.type,
905
996
  "X-Fern-Runtime-Version": core.RUNTIME.version,
906
997
  },
@@ -971,7 +1062,7 @@ class ModelSync {
971
1062
  : undefined,
972
1063
  "X-Fern-Language": "JavaScript",
973
1064
  "X-Fern-SDK-Name": "polytomic",
974
- "X-Fern-SDK-Version": "1.8.4",
1065
+ "X-Fern-SDK-Version": "1.9.1",
975
1066
  "X-Fern-Runtime": core.RUNTIME.type,
976
1067
  "X-Fern-Runtime-Version": core.RUNTIME.version,
977
1068
  },
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated from our API Definition.
3
+ */
4
+ import * as Polytomic from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * active: true,
9
+ * target_connection_id: "0b155265-c537-44c9-9359-a3ceb468a4da"
10
+ * }
11
+ */
12
+ export interface ModelSyncListRequest {
13
+ active?: boolean;
14
+ mode?: Polytomic.SyncMode;
15
+ target_connection_id?: string;
16
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,7 @@
1
1
  export { type ModelSyncGetSourceRequest } from "./ModelSyncGetSourceRequest";
2
2
  export { type ModelSyncGetTargetRequest } from "./ModelSyncGetTargetRequest";
3
3
  export { type ModelSyncGetTargetFieldsRequest } from "./ModelSyncGetTargetFieldsRequest";
4
+ export { type ModelSyncListRequest } from "./ModelSyncListRequest";
4
5
  export { type CreateModelSyncRequest } from "./CreateModelSyncRequest";
5
6
  export { type UpdateModelSyncRequest } from "./UpdateModelSyncRequest";
6
7
  export { type StartModelSyncRequest } from "./StartModelSyncRequest";
@@ -51,7 +51,7 @@ export declare class Executions {
51
51
  /**
52
52
  * @param {string} syncId
53
53
  * @param {string} id
54
- * @param {string} type
54
+ * @param {Polytomic.V2ExecutionLogType} type
55
55
  * @param {Executions.RequestOptions} requestOptions - Request-specific configuration.
56
56
  *
57
57
  * @throws {@link Polytomic.BadRequestError}
@@ -60,13 +60,13 @@ export declare class Executions {
60
60
  * @throws {@link Polytomic.InternalServerError}
61
61
  *
62
62
  * @example
63
- * await client.modelSync.executions.getLogUrls("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", "records")
63
+ * await client.modelSync.executions.getLogUrls("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", Polytomic.V2ExecutionLogType.Records)
64
64
  */
65
- getLogUrls(syncId: string, id: string, type: string, requestOptions?: Executions.RequestOptions): Promise<Polytomic.ExecutionLogsResponseEnvelope>;
65
+ getLogUrls(syncId: string, id: string, type: Polytomic.V2ExecutionLogType, requestOptions?: Executions.RequestOptions): Promise<Polytomic.ExecutionLogsResponseEnvelope>;
66
66
  /**
67
67
  * @param {string} syncId
68
68
  * @param {string} id
69
- * @param {string} type
69
+ * @param {Polytomic.V2ExecutionLogType} type
70
70
  * @param {string} filename
71
71
  * @param {Executions.RequestOptions} requestOptions - Request-specific configuration.
72
72
  *
@@ -76,8 +76,8 @@ export declare class Executions {
76
76
  * @throws {@link Polytomic.InternalServerError}
77
77
  *
78
78
  * @example
79
- * await client.modelSync.executions.getLogs("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", "records", "path/to/file.json")
79
+ * await client.modelSync.executions.getLogs("248df4b7-aa70-47b8-a036-33ac447e668d", "0ecd09c1-b901-4d27-9053-f0367c427254", Polytomic.V2ExecutionLogType.Records, "path/to/file.json")
80
80
  */
81
- getLogs(syncId: string, id: string, type: string, filename: string, requestOptions?: Executions.RequestOptions): Promise<void>;
81
+ getLogs(syncId: string, id: string, type: Polytomic.V2ExecutionLogType, filename: string, requestOptions?: Executions.RequestOptions): Promise<void>;
82
82
  protected _getAuthorizationHeader(): Promise<string>;
83
83
  }
@@ -71,7 +71,7 @@ class Executions {
71
71
  : undefined,
72
72
  "X-Fern-Language": "JavaScript",
73
73
  "X-Fern-SDK-Name": "polytomic",
74
- "X-Fern-SDK-Version": "1.8.4",
74
+ "X-Fern-SDK-Version": "1.9.1",
75
75
  "X-Fern-Runtime": core.RUNTIME.type,
76
76
  "X-Fern-Runtime-Version": core.RUNTIME.version,
77
77
  },
@@ -136,7 +136,7 @@ class Executions {
136
136
  : undefined,
137
137
  "X-Fern-Language": "JavaScript",
138
138
  "X-Fern-SDK-Name": "polytomic",
139
- "X-Fern-SDK-Version": "1.8.4",
139
+ "X-Fern-SDK-Version": "1.9.1",
140
140
  "X-Fern-Runtime": core.RUNTIME.type,
141
141
  "X-Fern-Runtime-Version": core.RUNTIME.version,
142
142
  },
@@ -181,7 +181,7 @@ class Executions {
181
181
  /**
182
182
  * @param {string} syncId
183
183
  * @param {string} id
184
- * @param {string} type
184
+ * @param {Polytomic.V2ExecutionLogType} type
185
185
  * @param {Executions.RequestOptions} requestOptions - Request-specific configuration.
186
186
  *
187
187
  * @throws {@link Polytomic.BadRequestError}
@@ -190,7 +190,7 @@ class Executions {
190
190
  * @throws {@link Polytomic.InternalServerError}
191
191
  *
192
192
  * @example
193
- * await client.modelSync.executions.getLogUrls("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", "records")
193
+ * await client.modelSync.executions.getLogUrls("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", Polytomic.V2ExecutionLogType.Records)
194
194
  */
195
195
  getLogUrls(syncId, id, type, requestOptions) {
196
196
  var _a;
@@ -205,7 +205,7 @@ class Executions {
205
205
  : undefined,
206
206
  "X-Fern-Language": "JavaScript",
207
207
  "X-Fern-SDK-Name": "polytomic",
208
- "X-Fern-SDK-Version": "1.8.4",
208
+ "X-Fern-SDK-Version": "1.9.1",
209
209
  "X-Fern-Runtime": core.RUNTIME.type,
210
210
  "X-Fern-Runtime-Version": core.RUNTIME.version,
211
211
  },
@@ -252,7 +252,7 @@ class Executions {
252
252
  /**
253
253
  * @param {string} syncId
254
254
  * @param {string} id
255
- * @param {string} type
255
+ * @param {Polytomic.V2ExecutionLogType} type
256
256
  * @param {string} filename
257
257
  * @param {Executions.RequestOptions} requestOptions - Request-specific configuration.
258
258
  *
@@ -262,7 +262,7 @@ class Executions {
262
262
  * @throws {@link Polytomic.InternalServerError}
263
263
  *
264
264
  * @example
265
- * await client.modelSync.executions.getLogs("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", "records", "path/to/file.json")
265
+ * await client.modelSync.executions.getLogs("248df4b7-aa70-47b8-a036-33ac447e668d", "0ecd09c1-b901-4d27-9053-f0367c427254", Polytomic.V2ExecutionLogType.Records, "path/to/file.json")
266
266
  */
267
267
  getLogs(syncId, id, type, filename, requestOptions) {
268
268
  var _a;
@@ -277,7 +277,7 @@ class Executions {
277
277
  : undefined,
278
278
  "X-Fern-Language": "JavaScript",
279
279
  "X-Fern-SDK-Name": "polytomic",
280
- "X-Fern-SDK-Version": "1.8.4",
280
+ "X-Fern-SDK-Version": "1.9.1",
281
281
  "X-Fern-Runtime": core.RUNTIME.type,
282
282
  "X-Fern-Runtime-Version": core.RUNTIME.version,
283
283
  },
@@ -24,6 +24,21 @@ export declare namespace Models {
24
24
  export declare class Models {
25
25
  protected readonly _options: Models.Options;
26
26
  constructor(_options: Models.Options);
27
+ /**
28
+ * @param {string} id
29
+ * @param {Polytomic.ModelsGetEnrichmentSourceRequest} request
30
+ * @param {Models.RequestOptions} requestOptions - Request-specific configuration.
31
+ *
32
+ * @throws {@link Polytomic.BadRequestError}
33
+ * @throws {@link Polytomic.UnauthorizedError}
34
+ * @throws {@link Polytomic.ForbiddenError}
35
+ * @throws {@link Polytomic.NotFoundError}
36
+ * @throws {@link Polytomic.InternalServerError}
37
+ *
38
+ * @example
39
+ * await client.models.getEnrichmentSource("248df4b7-aa70-47b8-a036-33ac447e668d")
40
+ */
41
+ getEnrichmentSource(id: string, request?: Polytomic.ModelsGetEnrichmentSourceRequest, requestOptions?: Models.RequestOptions): Promise<Polytomic.GetModelSyncSourceMetaEnvelope>;
27
42
  /**
28
43
  * For a given connection and enrichment configuration, provides the valid sets of input fields.
29
44
  *
@@ -59,6 +59,85 @@ class Models {
59
59
  constructor(_options) {
60
60
  this._options = _options;
61
61
  }
62
+ /**
63
+ * @param {string} id
64
+ * @param {Polytomic.ModelsGetEnrichmentSourceRequest} request
65
+ * @param {Models.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
+ *
73
+ * @example
74
+ * await client.models.getEnrichmentSource("248df4b7-aa70-47b8-a036-33ac447e668d")
75
+ */
76
+ getEnrichmentSource(id, request = {}, requestOptions) {
77
+ var _a;
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ const { params } = request;
80
+ const _queryParams = {};
81
+ if (params != null) {
82
+ _queryParams["params"] = JSON.stringify(params);
83
+ }
84
+ const _response = yield core.fetcher({
85
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}/modelsync/enrichment-source`),
86
+ method: "GET",
87
+ headers: {
88
+ Authorization: yield this._getAuthorizationHeader(),
89
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
90
+ ? yield core.Supplier.get(this._options.version)
91
+ : undefined,
92
+ "X-Fern-Language": "JavaScript",
93
+ "X-Fern-SDK-Name": "polytomic",
94
+ "X-Fern-SDK-Version": "1.9.1",
95
+ "X-Fern-Runtime": core.RUNTIME.type,
96
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
97
+ },
98
+ contentType: "application/json",
99
+ queryParameters: _queryParams,
100
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
101
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
102
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
103
+ });
104
+ if (_response.ok) {
105
+ return _response.body;
106
+ }
107
+ if (_response.error.reason === "status-code") {
108
+ switch (_response.error.statusCode) {
109
+ case 400:
110
+ throw new Polytomic.BadRequestError(_response.error.body);
111
+ case 401:
112
+ throw new Polytomic.UnauthorizedError(_response.error.body);
113
+ case 403:
114
+ throw new Polytomic.ForbiddenError(_response.error.body);
115
+ case 404:
116
+ throw new Polytomic.NotFoundError(_response.error.body);
117
+ case 500:
118
+ throw new Polytomic.InternalServerError(_response.error.body);
119
+ default:
120
+ throw new errors.PolytomicError({
121
+ statusCode: _response.error.statusCode,
122
+ body: _response.error.body,
123
+ });
124
+ }
125
+ }
126
+ switch (_response.error.reason) {
127
+ case "non-json":
128
+ throw new errors.PolytomicError({
129
+ statusCode: _response.error.statusCode,
130
+ body: _response.error.rawBody,
131
+ });
132
+ case "timeout":
133
+ throw new errors.PolytomicTimeoutError();
134
+ case "unknown":
135
+ throw new errors.PolytomicError({
136
+ message: _response.error.errorMessage,
137
+ });
138
+ }
139
+ });
140
+ }
62
141
  /**
63
142
  * For a given connection and enrichment configuration, provides the valid sets of input fields.
64
143
  *
@@ -87,7 +166,7 @@ class Models {
87
166
  : undefined,
88
167
  "X-Fern-Language": "JavaScript",
89
168
  "X-Fern-SDK-Name": "polytomic",
90
- "X-Fern-SDK-Version": "1.8.4",
169
+ "X-Fern-SDK-Version": "1.9.1",
91
170
  "X-Fern-Runtime": core.RUNTIME.type,
92
171
  "X-Fern-Runtime-Version": core.RUNTIME.version,
93
172
  },
@@ -170,7 +249,7 @@ class Models {
170
249
  : undefined,
171
250
  "X-Fern-Language": "JavaScript",
172
251
  "X-Fern-SDK-Name": "polytomic",
173
- "X-Fern-SDK-Version": "1.8.4",
252
+ "X-Fern-SDK-Version": "1.9.1",
174
253
  "X-Fern-Runtime": core.RUNTIME.type,
175
254
  "X-Fern-Runtime-Version": core.RUNTIME.version,
176
255
  },
@@ -238,7 +317,7 @@ class Models {
238
317
  : undefined,
239
318
  "X-Fern-Language": "JavaScript",
240
319
  "X-Fern-SDK-Name": "polytomic",
241
- "X-Fern-SDK-Version": "1.8.4",
320
+ "X-Fern-SDK-Version": "1.9.1",
242
321
  "X-Fern-Runtime": core.RUNTIME.type,
243
322
  "X-Fern-Runtime-Version": core.RUNTIME.version,
244
323
  },
@@ -316,7 +395,7 @@ class Models {
316
395
  : undefined,
317
396
  "X-Fern-Language": "JavaScript",
318
397
  "X-Fern-SDK-Name": "polytomic",
319
- "X-Fern-SDK-Version": "1.8.4",
398
+ "X-Fern-SDK-Version": "1.9.1",
320
399
  "X-Fern-Runtime": core.RUNTIME.type,
321
400
  "X-Fern-Runtime-Version": core.RUNTIME.version,
322
401
  },
@@ -392,7 +471,7 @@ class Models {
392
471
  : undefined,
393
472
  "X-Fern-Language": "JavaScript",
394
473
  "X-Fern-SDK-Name": "polytomic",
395
- "X-Fern-SDK-Version": "1.8.4",
474
+ "X-Fern-SDK-Version": "1.9.1",
396
475
  "X-Fern-Runtime": core.RUNTIME.type,
397
476
  "X-Fern-Runtime-Version": core.RUNTIME.version,
398
477
  },
@@ -473,7 +552,7 @@ class Models {
473
552
  : undefined,
474
553
  "X-Fern-Language": "JavaScript",
475
554
  "X-Fern-SDK-Name": "polytomic",
476
- "X-Fern-SDK-Version": "1.8.4",
555
+ "X-Fern-SDK-Version": "1.9.1",
477
556
  "X-Fern-Runtime": core.RUNTIME.type,
478
557
  "X-Fern-Runtime-Version": core.RUNTIME.version,
479
558
  },
@@ -550,7 +629,7 @@ class Models {
550
629
  : undefined,
551
630
  "X-Fern-Language": "JavaScript",
552
631
  "X-Fern-SDK-Name": "polytomic",
553
- "X-Fern-SDK-Version": "1.8.4",
632
+ "X-Fern-SDK-Version": "1.9.1",
554
633
  "X-Fern-Runtime": core.RUNTIME.type,
555
634
  "X-Fern-Runtime-Version": core.RUNTIME.version,
556
635
  },
@@ -628,7 +707,7 @@ class Models {
628
707
  : undefined,
629
708
  "X-Fern-Language": "JavaScript",
630
709
  "X-Fern-SDK-Name": "polytomic",
631
- "X-Fern-SDK-Version": "1.8.4",
710
+ "X-Fern-SDK-Version": "1.9.1",
632
711
  "X-Fern-Runtime": core.RUNTIME.type,
633
712
  "X-Fern-Runtime-Version": core.RUNTIME.version,
634
713
  },
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface ModelsGetEnrichmentSourceRequest {
9
+ params?: Record<string, string[] | undefined>;
10
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ export { type ModelsGetEnrichmentSourceRequest } from "./ModelsGetEnrichmentSourceRequest";
1
2
  export { type GetEnrichmentInputFieldsRequest } from "./GetEnrichmentInputFieldsRequest";
2
3
  export { type ModelsPreviewRequest } from "./ModelsPreviewRequest";
3
4
  export { type ModelsCreateRequest } from "./ModelsCreateRequest";
@@ -74,7 +74,7 @@ class Organization {
74
74
  : undefined,
75
75
  "X-Fern-Language": "JavaScript",
76
76
  "X-Fern-SDK-Name": "polytomic",
77
- "X-Fern-SDK-Version": "1.8.4",
77
+ "X-Fern-SDK-Version": "1.9.1",
78
78
  "X-Fern-Runtime": core.RUNTIME.type,
79
79
  "X-Fern-Runtime-Version": core.RUNTIME.version,
80
80
  },
@@ -144,7 +144,7 @@ class Organization {
144
144
  : undefined,
145
145
  "X-Fern-Language": "JavaScript",
146
146
  "X-Fern-SDK-Name": "polytomic",
147
- "X-Fern-SDK-Version": "1.8.4",
147
+ "X-Fern-SDK-Version": "1.9.1",
148
148
  "X-Fern-Runtime": core.RUNTIME.type,
149
149
  "X-Fern-Runtime-Version": core.RUNTIME.version,
150
150
  },
@@ -214,7 +214,7 @@ class Organization {
214
214
  : undefined,
215
215
  "X-Fern-Language": "JavaScript",
216
216
  "X-Fern-SDK-Name": "polytomic",
217
- "X-Fern-SDK-Version": "1.8.4",
217
+ "X-Fern-SDK-Version": "1.9.1",
218
218
  "X-Fern-Runtime": core.RUNTIME.type,
219
219
  "X-Fern-Runtime-Version": core.RUNTIME.version,
220
220
  },
@@ -285,7 +285,7 @@ class Organization {
285
285
  : undefined,
286
286
  "X-Fern-Language": "JavaScript",
287
287
  "X-Fern-SDK-Name": "polytomic",
288
- "X-Fern-SDK-Version": "1.8.4",
288
+ "X-Fern-SDK-Version": "1.9.1",
289
289
  "X-Fern-Runtime": core.RUNTIME.type,
290
290
  "X-Fern-Runtime-Version": core.RUNTIME.version,
291
291
  },
@@ -356,7 +356,7 @@ class Organization {
356
356
  : undefined,
357
357
  "X-Fern-Language": "JavaScript",
358
358
  "X-Fern-SDK-Name": "polytomic",
359
- "X-Fern-SDK-Version": "1.8.4",
359
+ "X-Fern-SDK-Version": "1.9.1",
360
360
  "X-Fern-Runtime": core.RUNTIME.type,
361
361
  "X-Fern-Runtime-Version": core.RUNTIME.version,
362
362
  },