polytomic 1.9.0 → 1.9.2

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 (117) hide show
  1. package/Client.d.ts +3 -3
  2. package/Client.js +9 -9
  3. package/api/resources/bulkSync/client/Client.d.ts +5 -2
  4. package/api/resources/bulkSync/client/Client.js +21 -12
  5. package/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +12 -0
  6. package/api/resources/bulkSync/client/requests/BulkSyncListRequest.js +5 -0
  7. package/api/resources/bulkSync/client/requests/index.d.ts +1 -0
  8. package/api/resources/bulkSync/resources/executions/client/Client.d.ts +27 -0
  9. package/api/resources/bulkSync/resources/executions/client/Client.js +144 -3
  10. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsExportLogsRequest.d.ts +13 -0
  11. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsExportLogsRequest.js +5 -0
  12. package/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
  13. package/api/resources/bulkSync/resources/schemas/client/Client.js +4 -4
  14. package/api/resources/connections/client/Client.js +8 -8
  15. package/api/resources/events/client/Client.js +2 -2
  16. package/api/resources/identity/client/Client.js +1 -1
  17. package/api/resources/index.d.ts +2 -2
  18. package/api/resources/index.js +3 -3
  19. package/api/resources/jobs/client/Client.js +1 -1
  20. package/api/resources/modelSync/client/Client.d.ts +7 -2
  21. package/api/resources/modelSync/client/Client.js +35 -16
  22. package/api/resources/modelSync/client/requests/ModelSyncListRequest.d.ts +16 -0
  23. package/api/resources/modelSync/client/requests/ModelSyncListRequest.js +5 -0
  24. package/api/resources/modelSync/client/requests/index.d.ts +1 -0
  25. package/api/resources/modelSync/resources/executions/client/Client.d.ts +6 -6
  26. package/api/resources/modelSync/resources/executions/client/Client.js +8 -8
  27. package/api/resources/models/client/Client.d.ts +15 -0
  28. package/api/resources/models/client/Client.js +87 -8
  29. package/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +10 -0
  30. package/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.js +5 -0
  31. package/api/resources/models/client/requests/UpdateModelRequest.d.ts +1 -0
  32. package/api/resources/models/client/requests/index.d.ts +1 -0
  33. package/api/resources/organization/client/Client.js +5 -5
  34. package/api/resources/permissions/resources/policies/client/Client.js +5 -5
  35. package/api/resources/permissions/resources/roles/client/Client.js +5 -5
  36. package/api/resources/queryRunner/client/Client.js +2 -2
  37. package/api/resources/schemas/client/Client.js +4 -4
  38. package/api/resources/users/client/Client.js +6 -6
  39. package/api/resources/webhooks/client/Client.js +5 -5
  40. package/api/types/BulkSyncSchemaExecution.d.ts +1 -0
  41. package/api/types/BulkSyncSchemaExecutionStatus.d.ts +1 -0
  42. package/api/types/SchemaField.d.ts +3 -1
  43. package/api/types/TypesType.d.ts +4 -0
  44. package/api/types/TypesType.js +5 -0
  45. package/api/types/UtilFieldType.d.ts +13 -0
  46. package/api/types/UtilFieldType.js +15 -0
  47. package/api/types/V2ExecutionLogType.d.ts +12 -0
  48. package/api/types/V2ExecutionLogType.js +14 -0
  49. package/api/types/V4BulkSyncExecutionLogs.d.ts +4 -0
  50. package/api/types/V4BulkSyncExecutionLogs.js +5 -0
  51. package/api/types/V4BulkSyncExecutionLogsEnvelope.d.ts +7 -0
  52. package/api/types/V4BulkSyncExecutionLogsEnvelope.js +5 -0
  53. package/api/types/V4ExportSyncLogsEnvelope.d.ts +8 -0
  54. package/api/types/V4ExportSyncLogsEnvelope.js +5 -0
  55. package/api/types/V4ExportSyncLogsResponse.d.ts +6 -0
  56. package/api/types/V4ExportSyncLogsResponse.js +5 -0
  57. package/api/types/index.d.ts +7 -0
  58. package/api/types/index.js +7 -0
  59. package/dist/Client.d.ts +3 -3
  60. package/dist/Client.js +9 -9
  61. package/dist/api/resources/bulkSync/client/Client.d.ts +5 -2
  62. package/dist/api/resources/bulkSync/client/Client.js +21 -12
  63. package/dist/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +12 -0
  64. package/dist/api/resources/bulkSync/client/requests/BulkSyncListRequest.js +5 -0
  65. package/dist/api/resources/bulkSync/client/requests/index.d.ts +1 -0
  66. package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +27 -0
  67. package/dist/api/resources/bulkSync/resources/executions/client/Client.js +144 -3
  68. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsExportLogsRequest.d.ts +13 -0
  69. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsExportLogsRequest.js +5 -0
  70. package/dist/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
  71. package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +4 -4
  72. package/dist/api/resources/connections/client/Client.js +8 -8
  73. package/dist/api/resources/events/client/Client.js +2 -2
  74. package/dist/api/resources/identity/client/Client.js +1 -1
  75. package/dist/api/resources/index.d.ts +2 -2
  76. package/dist/api/resources/index.js +3 -3
  77. package/dist/api/resources/jobs/client/Client.js +1 -1
  78. package/dist/api/resources/modelSync/client/Client.d.ts +7 -2
  79. package/dist/api/resources/modelSync/client/Client.js +35 -16
  80. package/dist/api/resources/modelSync/client/requests/ModelSyncListRequest.d.ts +16 -0
  81. package/dist/api/resources/modelSync/client/requests/ModelSyncListRequest.js +5 -0
  82. package/dist/api/resources/modelSync/client/requests/index.d.ts +1 -0
  83. package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +6 -6
  84. package/dist/api/resources/modelSync/resources/executions/client/Client.js +8 -8
  85. package/dist/api/resources/models/client/Client.d.ts +15 -0
  86. package/dist/api/resources/models/client/Client.js +87 -8
  87. package/dist/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +10 -0
  88. package/dist/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.js +5 -0
  89. package/dist/api/resources/models/client/requests/UpdateModelRequest.d.ts +1 -0
  90. package/dist/api/resources/models/client/requests/index.d.ts +1 -0
  91. package/dist/api/resources/organization/client/Client.js +5 -5
  92. package/dist/api/resources/permissions/resources/policies/client/Client.js +5 -5
  93. package/dist/api/resources/permissions/resources/roles/client/Client.js +5 -5
  94. package/dist/api/resources/queryRunner/client/Client.js +2 -2
  95. package/dist/api/resources/schemas/client/Client.js +4 -4
  96. package/dist/api/resources/users/client/Client.js +6 -6
  97. package/dist/api/resources/webhooks/client/Client.js +5 -5
  98. package/dist/api/types/BulkSyncSchemaExecution.d.ts +1 -0
  99. package/dist/api/types/BulkSyncSchemaExecutionStatus.d.ts +1 -0
  100. package/dist/api/types/SchemaField.d.ts +3 -1
  101. package/dist/api/types/TypesType.d.ts +4 -0
  102. package/dist/api/types/TypesType.js +5 -0
  103. package/dist/api/types/UtilFieldType.d.ts +13 -0
  104. package/dist/api/types/UtilFieldType.js +15 -0
  105. package/dist/api/types/V2ExecutionLogType.d.ts +12 -0
  106. package/dist/api/types/V2ExecutionLogType.js +14 -0
  107. package/dist/api/types/V4BulkSyncExecutionLogs.d.ts +4 -0
  108. package/dist/api/types/V4BulkSyncExecutionLogs.js +5 -0
  109. package/dist/api/types/V4BulkSyncExecutionLogsEnvelope.d.ts +7 -0
  110. package/dist/api/types/V4BulkSyncExecutionLogsEnvelope.js +5 -0
  111. package/dist/api/types/V4ExportSyncLogsEnvelope.d.ts +8 -0
  112. package/dist/api/types/V4ExportSyncLogsEnvelope.js +5 -0
  113. package/dist/api/types/V4ExportSyncLogsResponse.d.ts +6 -0
  114. package/dist/api/types/V4ExportSyncLogsResponse.js +5 -0
  115. package/dist/api/types/index.d.ts +7 -0
  116. package/dist/api/types/index.js +7 -0
  117. package/package.json +1 -1
@@ -26,14 +26,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.webhooks = exports.permissions = exports.users = exports.organization = exports.identity = exports.jobs = exports.events = exports.models = exports.schemas = exports.modelSync = exports.queryRunner = exports.connections = exports.bulkSync = void 0;
29
+ exports.webhooks = exports.permissions = exports.users = exports.organization = exports.identity = exports.jobs = exports.events = exports.schemas = exports.modelSync = exports.models = exports.queryRunner = exports.connections = exports.bulkSync = void 0;
30
30
  exports.bulkSync = __importStar(require("./bulkSync"));
31
31
  __exportStar(require("./bulkSync/types"), exports);
32
32
  exports.connections = __importStar(require("./connections"));
33
33
  exports.queryRunner = __importStar(require("./queryRunner"));
34
+ exports.models = __importStar(require("./models"));
34
35
  exports.modelSync = __importStar(require("./modelSync"));
35
36
  exports.schemas = __importStar(require("./schemas"));
36
- exports.models = __importStar(require("./models"));
37
37
  exports.events = __importStar(require("./events"));
38
38
  exports.jobs = __importStar(require("./jobs"));
39
39
  exports.identity = __importStar(require("./identity"));
@@ -44,8 +44,8 @@ exports.webhooks = __importStar(require("./webhooks"));
44
44
  __exportStar(require("./bulkSync/client/requests"), exports);
45
45
  __exportStar(require("./connections/client/requests"), exports);
46
46
  __exportStar(require("./queryRunner/client/requests"), exports);
47
- __exportStar(require("./modelSync/client/requests"), exports);
48
47
  __exportStar(require("./models/client/requests"), exports);
48
+ __exportStar(require("./modelSync/client/requests"), exports);
49
49
  __exportStar(require("./events/client/requests"), exports);
50
50
  __exportStar(require("./organization/client/requests"), exports);
51
51
  __exportStar(require("./users/client/requests"), exports);
@@ -74,7 +74,7 @@ class Jobs {
74
74
  : undefined,
75
75
  "X-Fern-Language": "JavaScript",
76
76
  "X-Fern-SDK-Name": "polytomic",
77
- "X-Fern-SDK-Version": "1.9.0",
77
+ "X-Fern-SDK-Version": "1.9.2",
78
78
  "X-Fern-Runtime": core.RUNTIME.type,
79
79
  "X-Fern-Runtime-Version": core.RUNTIME.version,
80
80
  },
@@ -101,16 +101,21 @@ export declare class ModelSync {
101
101
  */
102
102
  getTargetObjects(id: string, requestOptions?: ModelSync.RequestOptions): Promise<Polytomic.V4TargetObjectsResponseEnvelope>;
103
103
  /**
104
+ * @param {Polytomic.ModelSyncListRequest} request
104
105
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
105
106
  *
107
+ * @throws {@link Polytomic.BadRequestError}
106
108
  * @throws {@link Polytomic.UnauthorizedError}
107
109
  * @throws {@link Polytomic.NotFoundError}
108
110
  * @throws {@link Polytomic.InternalServerError}
109
111
  *
110
112
  * @example
111
- * await client.modelSync.list()
113
+ * await client.modelSync.list({
114
+ * active: true,
115
+ * target_connection_id: "0b155265-c537-44c9-9359-a3ceb468a4da"
116
+ * })
112
117
  */
113
- list(requestOptions?: ModelSync.RequestOptions): Promise<Polytomic.ListModelSyncResponseEnvelope>;
118
+ list(request?: Polytomic.ModelSyncListRequest, requestOptions?: ModelSync.RequestOptions): Promise<Polytomic.ListModelSyncResponseEnvelope>;
114
119
  /**
115
120
  * @param {Polytomic.CreateModelSyncRequest} request
116
121
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
@@ -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.9.0",
84
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
157
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
238
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
320
+ "X-Fern-SDK-Version": "1.9.2",
321
321
  "X-Fern-Runtime": core.RUNTIME.type,
322
322
  "X-Fern-Runtime-Version": core.RUNTIME.version,
323
323
  },
@@ -388,7 +388,7 @@ class ModelSync {
388
388
  : undefined,
389
389
  "X-Fern-Language": "JavaScript",
390
390
  "X-Fern-SDK-Name": "polytomic",
391
- "X-Fern-SDK-Version": "1.9.0",
391
+ "X-Fern-SDK-Version": "1.9.2",
392
392
  "X-Fern-Runtime": core.RUNTIME.type,
393
393
  "X-Fern-Runtime-Version": core.RUNTIME.version,
394
394
  },
@@ -435,18 +435,34 @@ class ModelSync {
435
435
  });
436
436
  }
437
437
  /**
438
+ * @param {Polytomic.ModelSyncListRequest} request
438
439
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
439
440
  *
441
+ * @throws {@link Polytomic.BadRequestError}
440
442
  * @throws {@link Polytomic.UnauthorizedError}
441
443
  * @throws {@link Polytomic.NotFoundError}
442
444
  * @throws {@link Polytomic.InternalServerError}
443
445
  *
444
446
  * @example
445
- * await client.modelSync.list()
447
+ * await client.modelSync.list({
448
+ * active: true,
449
+ * target_connection_id: "0b155265-c537-44c9-9359-a3ceb468a4da"
450
+ * })
446
451
  */
447
- list(requestOptions) {
452
+ list(request = {}, requestOptions) {
448
453
  var _a;
449
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
+ }
450
466
  const _response = yield core.fetcher({
451
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"),
452
468
  method: "GET",
@@ -457,11 +473,12 @@ class ModelSync {
457
473
  : undefined,
458
474
  "X-Fern-Language": "JavaScript",
459
475
  "X-Fern-SDK-Name": "polytomic",
460
- "X-Fern-SDK-Version": "1.9.0",
476
+ "X-Fern-SDK-Version": "1.9.2",
461
477
  "X-Fern-Runtime": core.RUNTIME.type,
462
478
  "X-Fern-Runtime-Version": core.RUNTIME.version,
463
479
  },
464
480
  contentType: "application/json",
481
+ queryParameters: _queryParams,
465
482
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
466
483
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
467
484
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -471,6 +488,8 @@ class ModelSync {
471
488
  }
472
489
  if (_response.error.reason === "status-code") {
473
490
  switch (_response.error.statusCode) {
491
+ case 400:
492
+ throw new Polytomic.BadRequestError(_response.error.body);
474
493
  case 401:
475
494
  throw new Polytomic.UnauthorizedError(_response.error.body);
476
495
  case 404:
@@ -536,7 +555,7 @@ class ModelSync {
536
555
  : undefined,
537
556
  "X-Fern-Language": "JavaScript",
538
557
  "X-Fern-SDK-Name": "polytomic",
539
- "X-Fern-SDK-Version": "1.9.0",
558
+ "X-Fern-SDK-Version": "1.9.2",
540
559
  "X-Fern-Runtime": core.RUNTIME.type,
541
560
  "X-Fern-Runtime-Version": core.RUNTIME.version,
542
561
  },
@@ -605,7 +624,7 @@ class ModelSync {
605
624
  : undefined,
606
625
  "X-Fern-Language": "JavaScript",
607
626
  "X-Fern-SDK-Name": "polytomic",
608
- "X-Fern-SDK-Version": "1.9.0",
627
+ "X-Fern-SDK-Version": "1.9.2",
609
628
  "X-Fern-Runtime": core.RUNTIME.type,
610
629
  "X-Fern-Runtime-Version": core.RUNTIME.version,
611
630
  },
@@ -669,7 +688,7 @@ class ModelSync {
669
688
  : undefined,
670
689
  "X-Fern-Language": "JavaScript",
671
690
  "X-Fern-SDK-Name": "polytomic",
672
- "X-Fern-SDK-Version": "1.9.0",
691
+ "X-Fern-SDK-Version": "1.9.2",
673
692
  "X-Fern-Runtime": core.RUNTIME.type,
674
693
  "X-Fern-Runtime-Version": core.RUNTIME.version,
675
694
  },
@@ -750,7 +769,7 @@ class ModelSync {
750
769
  : undefined,
751
770
  "X-Fern-Language": "JavaScript",
752
771
  "X-Fern-SDK-Name": "polytomic",
753
- "X-Fern-SDK-Version": "1.9.0",
772
+ "X-Fern-SDK-Version": "1.9.2",
754
773
  "X-Fern-Runtime": core.RUNTIME.type,
755
774
  "X-Fern-Runtime-Version": core.RUNTIME.version,
756
775
  },
@@ -824,7 +843,7 @@ class ModelSync {
824
843
  : undefined,
825
844
  "X-Fern-Language": "JavaScript",
826
845
  "X-Fern-SDK-Name": "polytomic",
827
- "X-Fern-SDK-Version": "1.9.0",
846
+ "X-Fern-SDK-Version": "1.9.2",
828
847
  "X-Fern-Runtime": core.RUNTIME.type,
829
848
  "X-Fern-Runtime-Version": core.RUNTIME.version,
830
849
  },
@@ -896,7 +915,7 @@ class ModelSync {
896
915
  : undefined,
897
916
  "X-Fern-Language": "JavaScript",
898
917
  "X-Fern-SDK-Name": "polytomic",
899
- "X-Fern-SDK-Version": "1.9.0",
918
+ "X-Fern-SDK-Version": "1.9.2",
900
919
  "X-Fern-Runtime": core.RUNTIME.type,
901
920
  "X-Fern-Runtime-Version": core.RUNTIME.version,
902
921
  },
@@ -972,7 +991,7 @@ class ModelSync {
972
991
  : undefined,
973
992
  "X-Fern-Language": "JavaScript",
974
993
  "X-Fern-SDK-Name": "polytomic",
975
- "X-Fern-SDK-Version": "1.9.0",
994
+ "X-Fern-SDK-Version": "1.9.2",
976
995
  "X-Fern-Runtime": core.RUNTIME.type,
977
996
  "X-Fern-Runtime-Version": core.RUNTIME.version,
978
997
  },
@@ -1043,7 +1062,7 @@ class ModelSync {
1043
1062
  : undefined,
1044
1063
  "X-Fern-Language": "JavaScript",
1045
1064
  "X-Fern-SDK-Name": "polytomic",
1046
- "X-Fern-SDK-Version": "1.9.0",
1065
+ "X-Fern-SDK-Version": "1.9.2",
1047
1066
  "X-Fern-Runtime": core.RUNTIME.type,
1048
1067
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1049
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.9.0",
74
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
139
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
208
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
280
+ "X-Fern-SDK-Version": "1.9.2",
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.2",
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.9.0",
169
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
252
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
320
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
398
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
474
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
555
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
632
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
710
+ "X-Fern-SDK-Version": "1.9.2",
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 });
@@ -25,6 +25,7 @@ export interface UpdateModelRequest {
25
25
  name: string;
26
26
  organization_id?: string;
27
27
  policies?: string[];
28
+ refresh?: boolean;
28
29
  relations?: Polytomic.ModelRelation[];
29
30
  tracking_columns?: string[];
30
31
  }
@@ -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.9.0",
77
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
147
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
217
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
288
+ "X-Fern-SDK-Version": "1.9.2",
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.9.0",
359
+ "X-Fern-SDK-Version": "1.9.2",
360
360
  "X-Fern-Runtime": core.RUNTIME.type,
361
361
  "X-Fern-Runtime-Version": core.RUNTIME.version,
362
362
  },