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
package/Client.d.ts CHANGED
@@ -6,9 +6,9 @@ import * as core from "./core";
6
6
  import { BulkSync } from "./api/resources/bulkSync/client/Client";
7
7
  import { Connections } from "./api/resources/connections/client/Client";
8
8
  import { QueryRunner } from "./api/resources/queryRunner/client/Client";
9
+ import { Models } from "./api/resources/models/client/Client";
9
10
  import { ModelSync } from "./api/resources/modelSync/client/Client";
10
11
  import { Schemas } from "./api/resources/schemas/client/Client";
11
- import { Models } from "./api/resources/models/client/Client";
12
12
  import { Events } from "./api/resources/events/client/Client";
13
13
  import { Jobs } from "./api/resources/jobs/client/Client";
14
14
  import { Identity } from "./api/resources/identity/client/Client";
@@ -42,12 +42,12 @@ export declare class PolytomicClient {
42
42
  get connections(): Connections;
43
43
  protected _queryRunner: QueryRunner | undefined;
44
44
  get queryRunner(): QueryRunner;
45
+ protected _models: Models | undefined;
46
+ get models(): Models;
45
47
  protected _modelSync: ModelSync | undefined;
46
48
  get modelSync(): ModelSync;
47
49
  protected _schemas: Schemas | undefined;
48
50
  get schemas(): Schemas;
49
- protected _models: Models | undefined;
50
- get models(): Models;
51
51
  protected _events: Events | undefined;
52
52
  get events(): Events;
53
53
  protected _jobs: Jobs | undefined;
package/Client.js CHANGED
@@ -7,9 +7,9 @@ exports.PolytomicClient = void 0;
7
7
  const Client_1 = require("./api/resources/bulkSync/client/Client");
8
8
  const Client_2 = require("./api/resources/connections/client/Client");
9
9
  const Client_3 = require("./api/resources/queryRunner/client/Client");
10
- const Client_4 = require("./api/resources/modelSync/client/Client");
11
- const Client_5 = require("./api/resources/schemas/client/Client");
12
- const Client_6 = require("./api/resources/models/client/Client");
10
+ const Client_4 = require("./api/resources/models/client/Client");
11
+ const Client_5 = require("./api/resources/modelSync/client/Client");
12
+ const Client_6 = require("./api/resources/schemas/client/Client");
13
13
  const Client_7 = require("./api/resources/events/client/Client");
14
14
  const Client_8 = require("./api/resources/jobs/client/Client");
15
15
  const Client_9 = require("./api/resources/identity/client/Client");
@@ -33,17 +33,17 @@ class PolytomicClient {
33
33
  var _a;
34
34
  return ((_a = this._queryRunner) !== null && _a !== void 0 ? _a : (this._queryRunner = new Client_3.QueryRunner(this._options)));
35
35
  }
36
- get modelSync() {
36
+ get models() {
37
37
  var _a;
38
- return ((_a = this._modelSync) !== null && _a !== void 0 ? _a : (this._modelSync = new Client_4.ModelSync(this._options)));
38
+ return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new Client_4.Models(this._options)));
39
39
  }
40
- get schemas() {
40
+ get modelSync() {
41
41
  var _a;
42
- return ((_a = this._schemas) !== null && _a !== void 0 ? _a : (this._schemas = new Client_5.Schemas(this._options)));
42
+ return ((_a = this._modelSync) !== null && _a !== void 0 ? _a : (this._modelSync = new Client_5.ModelSync(this._options)));
43
43
  }
44
- get models() {
44
+ get schemas() {
45
45
  var _a;
46
- return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new Client_6.Models(this._options)));
46
+ return ((_a = this._schemas) !== null && _a !== void 0 ? _a : (this._schemas = new Client_6.Schemas(this._options)));
47
47
  }
48
48
  get events() {
49
49
  var _a;
@@ -2,5 +2,5 @@ export * from "./UnauthorizedError";
2
2
  export * from "./InternalServerError";
3
3
  export * from "./BadRequestError";
4
4
  export * from "./ForbiddenError";
5
- export * from "./NotFoundError";
6
5
  export * from "./UnprocessableEntityError";
6
+ export * from "./NotFoundError";
@@ -18,5 +18,5 @@ __exportStar(require("./UnauthorizedError"), exports);
18
18
  __exportStar(require("./InternalServerError"), exports);
19
19
  __exportStar(require("./BadRequestError"), exports);
20
20
  __exportStar(require("./ForbiddenError"), exports);
21
- __exportStar(require("./NotFoundError"), exports);
22
21
  __exportStar(require("./UnprocessableEntityError"), exports);
22
+ __exportStar(require("./NotFoundError"), exports);
@@ -27,15 +27,18 @@ export declare class BulkSync {
27
27
  protected readonly _options: BulkSync.Options;
28
28
  constructor(_options: BulkSync.Options);
29
29
  /**
30
+ * @param {Polytomic.BulkSyncListRequest} request
30
31
  * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
31
32
  *
32
33
  * @throws {@link Polytomic.UnauthorizedError}
33
34
  * @throws {@link Polytomic.InternalServerError}
34
35
  *
35
36
  * @example
36
- * await client.bulkSync.list()
37
+ * await client.bulkSync.list({
38
+ * active: true
39
+ * })
37
40
  */
38
- list(requestOptions?: BulkSync.RequestOptions): Promise<Polytomic.BulkSyncListEnvelope>;
41
+ list(request?: Polytomic.BulkSyncListRequest, requestOptions?: BulkSync.RequestOptions): Promise<Polytomic.BulkSyncListEnvelope>;
39
42
  /**
40
43
  * @param {Polytomic.CreateBulkSyncRequest} request
41
44
  * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
@@ -43,12 +46,12 @@ export declare class BulkSync {
43
46
  * @throws {@link Polytomic.BadRequestError}
44
47
  * @throws {@link Polytomic.UnauthorizedError}
45
48
  * @throws {@link Polytomic.ForbiddenError}
49
+ * @throws {@link Polytomic.UnprocessableEntityError}
46
50
  * @throws {@link Polytomic.InternalServerError}
47
51
  *
48
52
  * @example
49
53
  * await client.bulkSync.create({
50
54
  * destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
51
- * mode: "replicate",
52
55
  * name: "My Bulk Sync",
53
56
  * schedule: {
54
57
  * frequency: Polytomic.ScheduleFrequency.Manual
@@ -89,7 +92,6 @@ export declare class BulkSync {
89
92
  * @example
90
93
  * await client.bulkSync.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
91
94
  * destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
92
- * mode: "replicate",
93
95
  * name: "My Bulk Sync",
94
96
  * schedule: {
95
97
  * frequency: Polytomic.ScheduleFrequency.Manual
@@ -51,17 +51,25 @@ class BulkSync {
51
51
  this._options = _options;
52
52
  }
53
53
  /**
54
+ * @param {Polytomic.BulkSyncListRequest} request
54
55
  * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
55
56
  *
56
57
  * @throws {@link Polytomic.UnauthorizedError}
57
58
  * @throws {@link Polytomic.InternalServerError}
58
59
  *
59
60
  * @example
60
- * await client.bulkSync.list()
61
+ * await client.bulkSync.list({
62
+ * active: true
63
+ * })
61
64
  */
62
- list(requestOptions) {
65
+ list(request = {}, requestOptions) {
63
66
  var _a;
64
67
  return __awaiter(this, void 0, void 0, function* () {
68
+ const { active } = request;
69
+ const _queryParams = {};
70
+ if (active != null) {
71
+ _queryParams["active"] = active.toString();
72
+ }
65
73
  const _response = yield core.fetcher({
66
74
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/bulk/syncs"),
67
75
  method: "GET",
@@ -72,11 +80,12 @@ class BulkSync {
72
80
  : undefined,
73
81
  "X-Fern-Language": "JavaScript",
74
82
  "X-Fern-SDK-Name": "polytomic",
75
- "X-Fern-SDK-Version": "1.8.4",
83
+ "X-Fern-SDK-Version": "1.9.1",
76
84
  "X-Fern-Runtime": core.RUNTIME.type,
77
85
  "X-Fern-Runtime-Version": core.RUNTIME.version,
78
86
  },
79
87
  contentType: "application/json",
88
+ queryParameters: _queryParams,
80
89
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
81
90
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
82
91
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -119,12 +128,12 @@ class BulkSync {
119
128
  * @throws {@link Polytomic.BadRequestError}
120
129
  * @throws {@link Polytomic.UnauthorizedError}
121
130
  * @throws {@link Polytomic.ForbiddenError}
131
+ * @throws {@link Polytomic.UnprocessableEntityError}
122
132
  * @throws {@link Polytomic.InternalServerError}
123
133
  *
124
134
  * @example
125
135
  * await client.bulkSync.create({
126
136
  * destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
127
- * mode: "replicate",
128
137
  * name: "My Bulk Sync",
129
138
  * schedule: {
130
139
  * frequency: Polytomic.ScheduleFrequency.Manual
@@ -145,7 +154,7 @@ class BulkSync {
145
154
  : undefined,
146
155
  "X-Fern-Language": "JavaScript",
147
156
  "X-Fern-SDK-Name": "polytomic",
148
- "X-Fern-SDK-Version": "1.8.4",
157
+ "X-Fern-SDK-Version": "1.9.1",
149
158
  "X-Fern-Runtime": core.RUNTIME.type,
150
159
  "X-Fern-Runtime-Version": core.RUNTIME.version,
151
160
  },
@@ -166,6 +175,8 @@ class BulkSync {
166
175
  throw new Polytomic.UnauthorizedError(_response.error.body);
167
176
  case 403:
168
177
  throw new Polytomic.ForbiddenError(_response.error.body);
178
+ case 422:
179
+ throw new Polytomic.UnprocessableEntityError(_response.error.body);
169
180
  case 500:
170
181
  throw new Polytomic.InternalServerError(_response.error.body);
171
182
  default:
@@ -221,7 +232,7 @@ class BulkSync {
221
232
  : undefined,
222
233
  "X-Fern-Language": "JavaScript",
223
234
  "X-Fern-SDK-Name": "polytomic",
224
- "X-Fern-SDK-Version": "1.8.4",
235
+ "X-Fern-SDK-Version": "1.9.1",
225
236
  "X-Fern-Runtime": core.RUNTIME.type,
226
237
  "X-Fern-Runtime-Version": core.RUNTIME.version,
227
238
  },
@@ -280,7 +291,6 @@ class BulkSync {
280
291
  * @example
281
292
  * await client.bulkSync.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
282
293
  * destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
283
- * mode: "replicate",
284
294
  * name: "My Bulk Sync",
285
295
  * schedule: {
286
296
  * frequency: Polytomic.ScheduleFrequency.Manual
@@ -301,7 +311,7 @@ class BulkSync {
301
311
  : undefined,
302
312
  "X-Fern-Language": "JavaScript",
303
313
  "X-Fern-SDK-Name": "polytomic",
304
- "X-Fern-SDK-Version": "1.8.4",
314
+ "X-Fern-SDK-Version": "1.9.1",
305
315
  "X-Fern-Runtime": core.RUNTIME.type,
306
316
  "X-Fern-Runtime-Version": core.RUNTIME.version,
307
317
  },
@@ -381,7 +391,7 @@ class BulkSync {
381
391
  : undefined,
382
392
  "X-Fern-Language": "JavaScript",
383
393
  "X-Fern-SDK-Name": "polytomic",
384
- "X-Fern-SDK-Version": "1.8.4",
394
+ "X-Fern-SDK-Version": "1.9.1",
385
395
  "X-Fern-Runtime": core.RUNTIME.type,
386
396
  "X-Fern-Runtime-Version": core.RUNTIME.version,
387
397
  },
@@ -454,7 +464,7 @@ class BulkSync {
454
464
  : undefined,
455
465
  "X-Fern-Language": "JavaScript",
456
466
  "X-Fern-SDK-Name": "polytomic",
457
- "X-Fern-SDK-Version": "1.8.4",
467
+ "X-Fern-SDK-Version": "1.9.1",
458
468
  "X-Fern-Runtime": core.RUNTIME.type,
459
469
  "X-Fern-Runtime-Version": core.RUNTIME.version,
460
470
  },
@@ -523,7 +533,7 @@ class BulkSync {
523
533
  : undefined,
524
534
  "X-Fern-Language": "JavaScript",
525
535
  "X-Fern-SDK-Name": "polytomic",
526
- "X-Fern-SDK-Version": "1.8.4",
536
+ "X-Fern-SDK-Version": "1.9.1",
527
537
  "X-Fern-Runtime": core.RUNTIME.type,
528
538
  "X-Fern-Runtime-Version": core.RUNTIME.version,
529
539
  },
@@ -588,7 +598,7 @@ class BulkSync {
588
598
  : undefined,
589
599
  "X-Fern-Language": "JavaScript",
590
600
  "X-Fern-SDK-Name": "polytomic",
591
- "X-Fern-SDK-Version": "1.8.4",
601
+ "X-Fern-SDK-Version": "1.9.1",
592
602
  "X-Fern-Runtime": core.RUNTIME.type,
593
603
  "X-Fern-Runtime-Version": core.RUNTIME.version,
594
604
  },
@@ -663,7 +673,7 @@ class BulkSync {
663
673
  : undefined,
664
674
  "X-Fern-Language": "JavaScript",
665
675
  "X-Fern-SDK-Name": "polytomic",
666
- "X-Fern-SDK-Version": "1.8.4",
676
+ "X-Fern-SDK-Version": "1.9.1",
667
677
  "X-Fern-Runtime": core.RUNTIME.type,
668
678
  "X-Fern-Runtime-Version": core.RUNTIME.version,
669
679
  },
@@ -733,7 +743,7 @@ class BulkSync {
733
743
  : undefined,
734
744
  "X-Fern-Language": "JavaScript",
735
745
  "X-Fern-SDK-Name": "polytomic",
736
- "X-Fern-SDK-Version": "1.8.4",
746
+ "X-Fern-SDK-Version": "1.9.1",
737
747
  "X-Fern-Runtime": core.RUNTIME.type,
738
748
  "X-Fern-Runtime-Version": core.RUNTIME.version,
739
749
  },
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * active: true
8
+ * }
9
+ */
10
+ export interface BulkSyncListRequest {
11
+ active?: boolean;
12
+ }
@@ -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 });
@@ -6,7 +6,6 @@ import * as Polytomic from "../../../../index";
6
6
  * @example
7
7
  * {
8
8
  * destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
9
- * mode: "replicate",
10
9
  * name: "My Bulk Sync",
11
10
  * schedule: {
12
11
  * frequency: Polytomic.ScheduleFrequency.Manual
@@ -23,8 +22,7 @@ export interface CreateBulkSyncRequest {
23
22
  disable_record_timestamps?: boolean;
24
23
  /** DEPRECATED: Use automatically_add_new_objects/automatically_add_new_fields instead */
25
24
  discover?: boolean;
26
- /** Either 'replicate' or 'snapshot'. */
27
- mode: string;
25
+ mode?: Polytomic.SyncMode;
28
26
  name: string;
29
27
  organization_id?: string;
30
28
  policies?: string[];
@@ -6,7 +6,6 @@ import * as Polytomic from "../../../../index";
6
6
  * @example
7
7
  * {
8
8
  * destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
9
- * mode: "replicate",
10
9
  * name: "My Bulk Sync",
11
10
  * schedule: {
12
11
  * frequency: Polytomic.ScheduleFrequency.Manual
@@ -23,8 +22,7 @@ export interface UpdateBulkSyncRequest {
23
22
  disable_record_timestamps?: boolean;
24
23
  /** DEPRECATED: Use automatically_add_new_objects/automatically_add_new_fields instead */
25
24
  discover?: boolean;
26
- /** Either 'replicate' or 'snapshot'. */
27
- mode: string;
25
+ mode?: Polytomic.SyncMode;
28
26
  name: string;
29
27
  organization_id?: string;
30
28
  policies?: string[];
@@ -1,3 +1,4 @@
1
+ export { type BulkSyncListRequest } from "./BulkSyncListRequest";
1
2
  export { type CreateBulkSyncRequest } from "./CreateBulkSyncRequest";
2
3
  export { type BulkSyncGetRequest } from "./BulkSyncGetRequest";
3
4
  export { type UpdateBulkSyncRequest } from "./UpdateBulkSyncRequest";
@@ -61,5 +61,32 @@ export declare class Executions {
61
61
  * await client.bulkSync.executions.get("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
62
62
  */
63
63
  get(id: string, execId: string, requestOptions?: Executions.RequestOptions): Promise<Polytomic.BulkSyncExecutionEnvelope>;
64
+ /**
65
+ * @param {string} syncId
66
+ * @param {string} executionId
67
+ * @param {Executions.RequestOptions} requestOptions - Request-specific configuration.
68
+ *
69
+ * @throws {@link Polytomic.UnauthorizedError}
70
+ * @throws {@link Polytomic.NotFoundError}
71
+ *
72
+ * @example
73
+ * await client.bulkSync.executions.getLogs("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
74
+ */
75
+ getLogs(syncId: string, executionId: string, requestOptions?: Executions.RequestOptions): Promise<Polytomic.V4BulkSyncExecutionLogsEnvelope>;
76
+ /**
77
+ * @param {string} syncId
78
+ * @param {string} executionId
79
+ * @param {Polytomic.bulkSync.ExecutionsExportLogsRequest} request
80
+ * @param {Executions.RequestOptions} requestOptions - Request-specific configuration.
81
+ *
82
+ * @throws {@link Polytomic.BadRequestError}
83
+ * @throws {@link Polytomic.UnauthorizedError}
84
+ * @throws {@link Polytomic.NotFoundError}
85
+ * @throws {@link Polytomic.InternalServerError}
86
+ *
87
+ * @example
88
+ * await client.bulkSync.executions.exportLogs("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
89
+ */
90
+ exportLogs(syncId: string, executionId: string, request?: Polytomic.bulkSync.ExecutionsExportLogsRequest, requestOptions?: Executions.RequestOptions): Promise<Polytomic.V4ExportSyncLogsEnvelope>;
64
91
  protected _getAuthorizationHeader(): Promise<string>;
65
92
  }
@@ -90,7 +90,7 @@ class Executions {
90
90
  : undefined,
91
91
  "X-Fern-Language": "JavaScript",
92
92
  "X-Fern-SDK-Name": "polytomic",
93
- "X-Fern-SDK-Version": "1.8.4",
93
+ "X-Fern-SDK-Version": "1.9.1",
94
94
  "X-Fern-Runtime": core.RUNTIME.type,
95
95
  "X-Fern-Runtime-Version": core.RUNTIME.version,
96
96
  },
@@ -154,7 +154,7 @@ class Executions {
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
  },
@@ -218,7 +218,7 @@ class Executions {
218
218
  : undefined,
219
219
  "X-Fern-Language": "JavaScript",
220
220
  "X-Fern-SDK-Name": "polytomic",
221
- "X-Fern-SDK-Version": "1.8.4",
221
+ "X-Fern-SDK-Version": "1.9.1",
222
222
  "X-Fern-Runtime": core.RUNTIME.type,
223
223
  "X-Fern-Runtime-Version": core.RUNTIME.version,
224
224
  },
@@ -258,6 +258,147 @@ class Executions {
258
258
  }
259
259
  });
260
260
  }
261
+ /**
262
+ * @param {string} syncId
263
+ * @param {string} executionId
264
+ * @param {Executions.RequestOptions} requestOptions - Request-specific configuration.
265
+ *
266
+ * @throws {@link Polytomic.UnauthorizedError}
267
+ * @throws {@link Polytomic.NotFoundError}
268
+ *
269
+ * @example
270
+ * await client.bulkSync.executions.getLogs("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
271
+ */
272
+ getLogs(syncId, executionId, requestOptions) {
273
+ var _a;
274
+ return __awaiter(this, void 0, void 0, function* () {
275
+ const _response = yield core.fetcher({
276
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(syncId)}/executions/${encodeURIComponent(executionId)}/logs`),
277
+ method: "GET",
278
+ headers: {
279
+ Authorization: yield this._getAuthorizationHeader(),
280
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
281
+ ? yield core.Supplier.get(this._options.version)
282
+ : undefined,
283
+ "X-Fern-Language": "JavaScript",
284
+ "X-Fern-SDK-Name": "polytomic",
285
+ "X-Fern-SDK-Version": "1.9.1",
286
+ "X-Fern-Runtime": core.RUNTIME.type,
287
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
288
+ },
289
+ contentType: "application/json",
290
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
291
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
292
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
293
+ });
294
+ if (_response.ok) {
295
+ return _response.body;
296
+ }
297
+ if (_response.error.reason === "status-code") {
298
+ switch (_response.error.statusCode) {
299
+ case 401:
300
+ throw new Polytomic.UnauthorizedError(_response.error.body);
301
+ case 404:
302
+ throw new Polytomic.NotFoundError(_response.error.body);
303
+ default:
304
+ throw new errors.PolytomicError({
305
+ statusCode: _response.error.statusCode,
306
+ body: _response.error.body,
307
+ });
308
+ }
309
+ }
310
+ switch (_response.error.reason) {
311
+ case "non-json":
312
+ throw new errors.PolytomicError({
313
+ statusCode: _response.error.statusCode,
314
+ body: _response.error.rawBody,
315
+ });
316
+ case "timeout":
317
+ throw new errors.PolytomicTimeoutError();
318
+ case "unknown":
319
+ throw new errors.PolytomicError({
320
+ message: _response.error.errorMessage,
321
+ });
322
+ }
323
+ });
324
+ }
325
+ /**
326
+ * @param {string} syncId
327
+ * @param {string} executionId
328
+ * @param {Polytomic.bulkSync.ExecutionsExportLogsRequest} request
329
+ * @param {Executions.RequestOptions} requestOptions - Request-specific configuration.
330
+ *
331
+ * @throws {@link Polytomic.BadRequestError}
332
+ * @throws {@link Polytomic.UnauthorizedError}
333
+ * @throws {@link Polytomic.NotFoundError}
334
+ * @throws {@link Polytomic.InternalServerError}
335
+ *
336
+ * @example
337
+ * await client.bulkSync.executions.exportLogs("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
338
+ */
339
+ exportLogs(syncId, executionId, request = {}, requestOptions) {
340
+ var _a;
341
+ return __awaiter(this, void 0, void 0, function* () {
342
+ const { notify } = request;
343
+ const _queryParams = {};
344
+ if (notify != null) {
345
+ _queryParams["notify"] = notify.toString();
346
+ }
347
+ const _response = yield core.fetcher({
348
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(syncId)}/executions/${encodeURIComponent(executionId)}/logs/export`),
349
+ method: "POST",
350
+ headers: {
351
+ Authorization: yield this._getAuthorizationHeader(),
352
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
353
+ ? yield core.Supplier.get(this._options.version)
354
+ : undefined,
355
+ "X-Fern-Language": "JavaScript",
356
+ "X-Fern-SDK-Name": "polytomic",
357
+ "X-Fern-SDK-Version": "1.9.1",
358
+ "X-Fern-Runtime": core.RUNTIME.type,
359
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
360
+ },
361
+ contentType: "application/json",
362
+ queryParameters: _queryParams,
363
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
364
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
365
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
366
+ });
367
+ if (_response.ok) {
368
+ return _response.body;
369
+ }
370
+ if (_response.error.reason === "status-code") {
371
+ switch (_response.error.statusCode) {
372
+ case 400:
373
+ throw new Polytomic.BadRequestError(_response.error.body);
374
+ case 401:
375
+ throw new Polytomic.UnauthorizedError(_response.error.body);
376
+ case 404:
377
+ throw new Polytomic.NotFoundError(_response.error.body);
378
+ case 500:
379
+ throw new Polytomic.InternalServerError(_response.error.body);
380
+ default:
381
+ throw new errors.PolytomicError({
382
+ statusCode: _response.error.statusCode,
383
+ body: _response.error.body,
384
+ });
385
+ }
386
+ }
387
+ switch (_response.error.reason) {
388
+ case "non-json":
389
+ throw new errors.PolytomicError({
390
+ statusCode: _response.error.statusCode,
391
+ body: _response.error.rawBody,
392
+ });
393
+ case "timeout":
394
+ throw new errors.PolytomicTimeoutError();
395
+ case "unknown":
396
+ throw new errors.PolytomicError({
397
+ message: _response.error.errorMessage,
398
+ });
399
+ }
400
+ });
401
+ }
261
402
  _getAuthorizationHeader() {
262
403
  return __awaiter(this, void 0, void 0, function* () {
263
404
  return `Bearer ${yield core.Supplier.get(this._options.token)}`;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface ExecutionsExportLogsRequest {
9
+ /**
10
+ * Send a notification to the user when the logs are ready for download.
11
+ */
12
+ notify?: boolean;
13
+ }
@@ -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 +1,2 @@
1
1
  export { type ExecutionsListStatusRequest } from "./ExecutionsListStatusRequest";
2
+ export { type ExecutionsExportLogsRequest } from "./ExecutionsExportLogsRequest";
@@ -41,6 +41,7 @@ export declare class Schemas {
41
41
  * @param {Polytomic.bulkSync.BulkSyncSchemasRequest} request
42
42
  * @param {Schemas.RequestOptions} requestOptions - Request-specific configuration.
43
43
  *
44
+ * @throws {@link Polytomic.BadRequestError}
44
45
  * @throws {@link Polytomic.UnauthorizedError}
45
46
  * @throws {@link Polytomic.ForbiddenError}
46
47
  * @throws {@link Polytomic.NotFoundError}
@@ -77,7 +77,7 @@ class Schemas {
77
77
  : undefined,
78
78
  "X-Fern-Language": "JavaScript",
79
79
  "X-Fern-SDK-Name": "polytomic",
80
- "X-Fern-SDK-Version": "1.8.4",
80
+ "X-Fern-SDK-Version": "1.9.1",
81
81
  "X-Fern-Runtime": core.RUNTIME.type,
82
82
  "X-Fern-Runtime-Version": core.RUNTIME.version,
83
83
  },
@@ -123,6 +123,7 @@ class Schemas {
123
123
  * @param {Polytomic.bulkSync.BulkSyncSchemasRequest} request
124
124
  * @param {Schemas.RequestOptions} requestOptions - Request-specific configuration.
125
125
  *
126
+ * @throws {@link Polytomic.BadRequestError}
126
127
  * @throws {@link Polytomic.UnauthorizedError}
127
128
  * @throws {@link Polytomic.ForbiddenError}
128
129
  * @throws {@link Polytomic.NotFoundError}
@@ -144,7 +145,7 @@ class Schemas {
144
145
  : undefined,
145
146
  "X-Fern-Language": "JavaScript",
146
147
  "X-Fern-SDK-Name": "polytomic",
147
- "X-Fern-SDK-Version": "1.8.4",
148
+ "X-Fern-SDK-Version": "1.9.1",
148
149
  "X-Fern-Runtime": core.RUNTIME.type,
149
150
  "X-Fern-Runtime-Version": core.RUNTIME.version,
150
151
  },
@@ -159,6 +160,8 @@ class Schemas {
159
160
  }
160
161
  if (_response.error.reason === "status-code") {
161
162
  switch (_response.error.statusCode) {
163
+ case 400:
164
+ throw new Polytomic.BadRequestError(_response.error.body);
162
165
  case 401:
163
166
  throw new Polytomic.UnauthorizedError(_response.error.body);
164
167
  case 403:
@@ -213,7 +216,7 @@ class Schemas {
213
216
  : undefined,
214
217
  "X-Fern-Language": "JavaScript",
215
218
  "X-Fern-SDK-Name": "polytomic",
216
- "X-Fern-SDK-Version": "1.8.4",
219
+ "X-Fern-SDK-Version": "1.9.1",
217
220
  "X-Fern-Runtime": core.RUNTIME.type,
218
221
  "X-Fern-Runtime-Version": core.RUNTIME.version,
219
222
  },
@@ -280,7 +283,7 @@ class Schemas {
280
283
  : undefined,
281
284
  "X-Fern-Language": "JavaScript",
282
285
  "X-Fern-SDK-Name": "polytomic",
283
- "X-Fern-SDK-Version": "1.8.4",
286
+ "X-Fern-SDK-Version": "1.9.1",
284
287
  "X-Fern-Runtime": core.RUNTIME.type,
285
288
  "X-Fern-Runtime-Version": core.RUNTIME.version,
286
289
  },