polytomic 1.16.0 → 1.18.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 (410) hide show
  1. package/Client.d.ts +14 -19
  2. package/api/errors/BadRequestError.js +7 -17
  3. package/api/errors/ConflictError.js +7 -17
  4. package/api/errors/ForbiddenError.js +7 -17
  5. package/api/errors/InternalServerError.js +7 -17
  6. package/api/errors/NotFoundError.js +7 -17
  7. package/api/errors/UnauthorizedError.js +7 -17
  8. package/api/errors/UnprocessableEntityError.js +7 -17
  9. package/api/resources/bulkSync/client/Client.d.ts +173 -24
  10. package/api/resources/bulkSync/client/Client.js +339 -118
  11. package/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +3 -0
  12. package/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +3 -0
  13. package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
  14. package/api/resources/bulkSync/client/requests/StartBulkSyncRequest.d.ts +4 -0
  15. package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
  16. package/api/resources/bulkSync/resources/executions/client/Client.d.ts +77 -12
  17. package/api/resources/bulkSync/resources/executions/client/Client.js +168 -66
  18. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +12 -0
  19. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +3 -3
  20. package/api/resources/bulkSync/resources/index.js +7 -17
  21. package/api/resources/bulkSync/resources/schedules/client/Client.d.ts +44 -15
  22. package/api/resources/bulkSync/resources/schedules/client/Client.js +116 -57
  23. package/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +1 -1
  24. package/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +1 -1
  25. package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +71 -11
  26. package/api/resources/bulkSync/resources/schemas/client/Client.js +150 -61
  27. package/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -0
  28. package/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +3 -0
  29. package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +7 -0
  30. package/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
  31. package/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
  32. package/api/resources/connections/client/Client.d.ts +160 -12
  33. package/api/resources/connections/client/Client.js +473 -86
  34. package/api/resources/connections/client/requests/ApiRequest.d.ts +13 -0
  35. package/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.d.ts +15 -0
  36. package/api/resources/connections/client/requests/index.d.ts +2 -0
  37. package/api/resources/events/client/Client.d.ts +20 -7
  38. package/api/resources/events/client/Client.js +55 -33
  39. package/api/resources/events/client/requests/EventsListRequest.d.ts +17 -2
  40. package/api/resources/identity/client/Client.d.ts +11 -6
  41. package/api/resources/identity/client/Client.js +31 -24
  42. package/api/resources/index.js +7 -17
  43. package/api/resources/jobs/client/Client.d.ts +15 -8
  44. package/api/resources/jobs/client/Client.js +35 -26
  45. package/api/resources/modelSync/client/Client.d.ts +110 -19
  46. package/api/resources/modelSync/client/Client.js +287 -118
  47. package/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -1
  48. package/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +3 -0
  49. package/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +3 -0
  50. package/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -1
  51. package/api/resources/modelSync/resources/executions/client/Client.d.ts +41 -12
  52. package/api/resources/modelSync/resources/executions/client/Client.js +115 -56
  53. package/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +1 -1
  54. package/api/resources/modelSync/resources/index.js +7 -17
  55. package/api/resources/modelSync/resources/targets/client/Client.d.ts +28 -11
  56. package/api/resources/modelSync/resources/targets/client/Client.js +89 -49
  57. package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts +6 -0
  58. package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts +6 -0
  59. package/api/resources/models/client/Client.d.ts +79 -8
  60. package/api/resources/models/client/Client.js +214 -86
  61. package/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +3 -0
  62. package/api/resources/notifications/client/Client.d.ts +13 -5
  63. package/api/resources/notifications/client/Client.js +48 -31
  64. package/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +1 -0
  65. package/api/resources/organization/client/Client.d.ts +31 -13
  66. package/api/resources/organization/client/Client.js +109 -55
  67. package/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +6 -0
  68. package/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +6 -0
  69. package/api/resources/permissions/client/Client.d.ts +2 -7
  70. package/api/resources/permissions/resources/index.js +7 -17
  71. package/api/resources/permissions/resources/policies/client/Client.d.ts +33 -5
  72. package/api/resources/permissions/resources/policies/client/Client.js +105 -47
  73. package/api/resources/permissions/resources/roles/client/Client.d.ts +38 -5
  74. package/api/resources/permissions/resources/roles/client/Client.js +110 -47
  75. package/api/resources/queryRunner/client/Client.d.ts +26 -7
  76. package/api/resources/queryRunner/client/Client.js +63 -35
  77. package/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +3 -0
  78. package/api/resources/schemas/client/Client.d.ts +118 -23
  79. package/api/resources/schemas/client/Client.js +232 -86
  80. package/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +1 -0
  81. package/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +1 -0
  82. package/api/resources/users/client/Client.d.ts +44 -16
  83. package/api/resources/users/client/Client.js +133 -66
  84. package/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +4 -0
  85. package/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +4 -0
  86. package/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +3 -0
  87. package/api/resources/webhooks/client/Client.d.ts +67 -21
  88. package/api/resources/webhooks/client/Client.js +165 -75
  89. package/api/types/ApiKeyResponse.d.ts +1 -0
  90. package/api/types/BulkBulkSyncSchedule.d.ts +1 -0
  91. package/api/types/BulkDiscover.d.ts +1 -1
  92. package/api/types/BulkExecutionStatus.d.ts +1 -1
  93. package/api/types/BulkFetchMode.d.ts +1 -1
  94. package/api/types/BulkNormalizeNames.d.ts +1 -1
  95. package/api/types/BulkOutputDisposition.d.ts +9 -0
  96. package/api/types/BulkOutputDisposition.js +11 -0
  97. package/api/types/BulkResyncMode.d.ts +9 -0
  98. package/api/types/BulkResyncMode.js +11 -0
  99. package/api/types/BulkScheduleSyncMode.d.ts +1 -1
  100. package/api/types/BulkSchema.d.ts +2 -0
  101. package/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
  102. package/api/types/BulkSchemaExecutionStatus.js +1 -0
  103. package/api/types/BulkSelectiveMode.d.ts +1 -1
  104. package/api/types/BulkSyncDest.d.ts +2 -0
  105. package/api/types/BulkSyncExecution.d.ts +1 -0
  106. package/api/types/BulkSyncExecutionStatus.d.ts +3 -0
  107. package/api/types/BulkSyncIngestionStatus.d.ts +14 -0
  108. package/{dist/version.js → api/types/BulkSyncIngestionStatus.js} +3 -2
  109. package/api/types/BulkSyncMode.d.ts +1 -1
  110. package/api/types/BulkSyncResponse.d.ts +2 -2
  111. package/api/types/BulkSyncSchemaExecutionStatus.d.ts +7 -0
  112. package/api/types/BulkSyncSource.d.ts +1 -0
  113. package/api/types/BulkSyncStatusResponse.d.ts +1 -0
  114. package/api/types/ConnectCardResponse.d.ts +1 -0
  115. package/api/types/ConnectionResponseSchema.d.ts +4 -2
  116. package/api/types/CreateSharedConnectionResponseSchema.d.ts +6 -0
  117. package/{version.js → api/types/CreateSharedConnectionResponseSchema.js} +3 -2
  118. package/api/types/Event.d.ts +4 -0
  119. package/api/types/EventBody.d.ts +1 -1
  120. package/api/types/ExecutionStatus.d.ts +1 -1
  121. package/api/types/FilterFieldReferenceType.d.ts +1 -1
  122. package/api/types/FilterFunction.d.ts +1 -1
  123. package/api/types/GetIdentityResponseSchema.d.ts +2 -0
  124. package/api/types/IngestionStatusLevel.d.ts +12 -0
  125. package/api/types/IngestionStatusLevel.js +11 -0
  126. package/api/types/JobResponse.d.ts +3 -0
  127. package/api/types/JsonschemaDefinitions.d.ts +1 -1
  128. package/api/types/JsonschemaForm.d.ts +1 -1
  129. package/api/types/LabelLabel.d.ts +1 -1
  130. package/api/types/ModelField.d.ts +1 -1
  131. package/api/types/ModelResponse.d.ts +2 -2
  132. package/api/types/ModelSyncMode.d.ts +2 -1
  133. package/api/types/ModelSyncMode.js +1 -0
  134. package/api/types/ModelSyncResponse.d.ts +2 -2
  135. package/api/types/ModelSyncSourceMetaResponse.d.ts +3 -0
  136. package/api/types/Organization.d.ts +5 -0
  137. package/api/types/{CommonOutputActor.d.ts → OutputActor.d.ts} +1 -1
  138. package/api/types/OutputActor.js +5 -0
  139. package/api/types/ScheduleFrequency.d.ts +1 -1
  140. package/api/types/SchemaIdentityFunction.d.ts +1 -1
  141. package/api/types/SourceMeta.d.ts +3 -0
  142. package/api/types/TypesType.d.ts +1 -1
  143. package/api/types/User.d.ts +6 -0
  144. package/api/types/UtilFieldType.d.ts +1 -1
  145. package/api/types/V2CreateSharedConnectionResponseEnvelope.d.ts +7 -0
  146. package/api/types/V2CreateSharedConnectionResponseEnvelope.js +5 -0
  147. package/api/types/V2EnricherConfiguration.d.ts +1 -1
  148. package/api/types/V2EnricherMapping.d.ts +1 -1
  149. package/api/types/V2ExecutionLogType.d.ts +1 -1
  150. package/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
  151. package/api/types/V2SampleRecord.d.ts +1 -1
  152. package/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
  153. package/api/types/V3BulkSyncSourceCapabilities.d.ts +6 -0
  154. package/api/types/V3BulkSyncSourceCapabilities.js +5 -0
  155. package/api/types/V4BulkSyncExecutionLogs.d.ts +6 -1
  156. package/api/types/V4BulkSyncScheduleApi.d.ts +5 -0
  157. package/api/types/V4ExportSyncLogsResponse.d.ts +1 -0
  158. package/api/types/V4GlobalErrorSubscribersResponse.d.ts +1 -0
  159. package/api/types/V4RunQueryResult.d.ts +2 -1
  160. package/api/types/V4UserFieldRequest.d.ts +4 -0
  161. package/api/types/WorkTaskStatus.d.ts +1 -1
  162. package/api/types/index.d.ts +13 -6
  163. package/api/types/index.js +13 -6
  164. package/core/auth/BearerToken.d.ts +1 -1
  165. package/core/fetcher/APIResponse.d.ts +1 -1
  166. package/core/fetcher/Fetcher.d.ts +3 -6
  167. package/core/fetcher/Fetcher.js +189 -20
  168. package/core/fetcher/Supplier.d.ts +1 -1
  169. package/core/fetcher/getHeader.js +2 -1
  170. package/core/runtime/runtime.d.ts +1 -2
  171. package/core/runtime/runtime.js +41 -52
  172. package/dist/Client.d.ts +14 -19
  173. package/dist/api/errors/BadRequestError.js +7 -17
  174. package/dist/api/errors/ConflictError.js +7 -17
  175. package/dist/api/errors/ForbiddenError.js +7 -17
  176. package/dist/api/errors/InternalServerError.js +7 -17
  177. package/dist/api/errors/NotFoundError.js +7 -17
  178. package/dist/api/errors/UnauthorizedError.js +7 -17
  179. package/dist/api/errors/UnprocessableEntityError.js +7 -17
  180. package/dist/api/resources/bulkSync/client/Client.d.ts +173 -24
  181. package/dist/api/resources/bulkSync/client/Client.js +339 -118
  182. package/dist/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +3 -0
  183. package/dist/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +3 -0
  184. package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
  185. package/dist/api/resources/bulkSync/client/requests/StartBulkSyncRequest.d.ts +4 -0
  186. package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
  187. package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +77 -12
  188. package/dist/api/resources/bulkSync/resources/executions/client/Client.js +168 -66
  189. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +12 -0
  190. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +3 -3
  191. package/dist/api/resources/bulkSync/resources/index.js +7 -17
  192. package/dist/api/resources/bulkSync/resources/schedules/client/Client.d.ts +44 -15
  193. package/dist/api/resources/bulkSync/resources/schedules/client/Client.js +116 -57
  194. package/dist/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +1 -1
  195. package/dist/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +1 -1
  196. package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +71 -11
  197. package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +150 -61
  198. package/dist/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -0
  199. package/dist/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +3 -0
  200. package/dist/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +7 -0
  201. package/dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
  202. package/dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
  203. package/dist/api/resources/connections/client/Client.d.ts +160 -12
  204. package/dist/api/resources/connections/client/Client.js +473 -86
  205. package/dist/api/resources/connections/client/requests/ApiRequest.d.ts +13 -0
  206. package/dist/api/resources/connections/client/requests/ApiRequest.js +5 -0
  207. package/dist/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.d.ts +15 -0
  208. package/dist/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.js +5 -0
  209. package/dist/api/resources/connections/client/requests/index.d.ts +2 -0
  210. package/dist/api/resources/events/client/Client.d.ts +20 -7
  211. package/dist/api/resources/events/client/Client.js +55 -33
  212. package/dist/api/resources/events/client/requests/EventsListRequest.d.ts +17 -2
  213. package/dist/api/resources/identity/client/Client.d.ts +11 -6
  214. package/dist/api/resources/identity/client/Client.js +31 -24
  215. package/dist/api/resources/index.js +7 -17
  216. package/dist/api/resources/jobs/client/Client.d.ts +15 -8
  217. package/dist/api/resources/jobs/client/Client.js +35 -26
  218. package/dist/api/resources/modelSync/client/Client.d.ts +110 -19
  219. package/dist/api/resources/modelSync/client/Client.js +287 -118
  220. package/dist/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -1
  221. package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +3 -0
  222. package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +3 -0
  223. package/dist/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -1
  224. package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +41 -12
  225. package/dist/api/resources/modelSync/resources/executions/client/Client.js +115 -56
  226. package/dist/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +1 -1
  227. package/dist/api/resources/modelSync/resources/index.js +7 -17
  228. package/dist/api/resources/modelSync/resources/targets/client/Client.d.ts +28 -11
  229. package/dist/api/resources/modelSync/resources/targets/client/Client.js +89 -49
  230. package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts +6 -0
  231. package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts +6 -0
  232. package/dist/api/resources/models/client/Client.d.ts +79 -8
  233. package/dist/api/resources/models/client/Client.js +214 -86
  234. package/dist/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +3 -0
  235. package/dist/api/resources/notifications/client/Client.d.ts +13 -5
  236. package/dist/api/resources/notifications/client/Client.js +48 -31
  237. package/dist/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +1 -0
  238. package/dist/api/resources/organization/client/Client.d.ts +31 -13
  239. package/dist/api/resources/organization/client/Client.js +109 -55
  240. package/dist/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +6 -0
  241. package/dist/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +6 -0
  242. package/dist/api/resources/permissions/client/Client.d.ts +2 -7
  243. package/dist/api/resources/permissions/resources/index.js +7 -17
  244. package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +33 -5
  245. package/dist/api/resources/permissions/resources/policies/client/Client.js +105 -47
  246. package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +38 -5
  247. package/dist/api/resources/permissions/resources/roles/client/Client.js +110 -47
  248. package/dist/api/resources/queryRunner/client/Client.d.ts +26 -7
  249. package/dist/api/resources/queryRunner/client/Client.js +63 -35
  250. package/dist/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +3 -0
  251. package/dist/api/resources/schemas/client/Client.d.ts +118 -23
  252. package/dist/api/resources/schemas/client/Client.js +232 -86
  253. package/dist/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +1 -0
  254. package/dist/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +1 -0
  255. package/dist/api/resources/users/client/Client.d.ts +44 -16
  256. package/dist/api/resources/users/client/Client.js +133 -66
  257. package/dist/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +4 -0
  258. package/dist/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +4 -0
  259. package/dist/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +3 -0
  260. package/dist/api/resources/webhooks/client/Client.d.ts +67 -21
  261. package/dist/api/resources/webhooks/client/Client.js +165 -75
  262. package/dist/api/types/ApiKeyResponse.d.ts +1 -0
  263. package/dist/api/types/BulkBulkSyncSchedule.d.ts +1 -0
  264. package/dist/api/types/BulkDiscover.d.ts +1 -1
  265. package/dist/api/types/BulkExecutionStatus.d.ts +1 -1
  266. package/dist/api/types/BulkFetchMode.d.ts +1 -1
  267. package/dist/api/types/BulkNormalizeNames.d.ts +1 -1
  268. package/dist/api/types/BulkOutputDisposition.d.ts +9 -0
  269. package/dist/api/types/BulkOutputDisposition.js +11 -0
  270. package/dist/api/types/BulkResyncMode.d.ts +9 -0
  271. package/dist/api/types/BulkResyncMode.js +11 -0
  272. package/dist/api/types/BulkScheduleSyncMode.d.ts +1 -1
  273. package/dist/api/types/BulkSchema.d.ts +2 -0
  274. package/dist/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
  275. package/dist/api/types/BulkSchemaExecutionStatus.js +1 -0
  276. package/dist/api/types/BulkSelectiveMode.d.ts +1 -1
  277. package/dist/api/types/BulkSyncDest.d.ts +2 -0
  278. package/dist/api/types/BulkSyncExecution.d.ts +1 -0
  279. package/dist/api/types/BulkSyncExecutionStatus.d.ts +3 -0
  280. package/dist/api/types/BulkSyncIngestionStatus.d.ts +14 -0
  281. package/dist/api/types/BulkSyncIngestionStatus.js +5 -0
  282. package/dist/api/types/BulkSyncMode.d.ts +1 -1
  283. package/dist/api/types/BulkSyncResponse.d.ts +2 -2
  284. package/dist/api/types/BulkSyncSchemaExecutionStatus.d.ts +7 -0
  285. package/dist/api/types/BulkSyncSource.d.ts +1 -0
  286. package/dist/api/types/BulkSyncStatusResponse.d.ts +1 -0
  287. package/dist/api/types/ConnectCardResponse.d.ts +1 -0
  288. package/dist/api/types/ConnectionResponseSchema.d.ts +4 -2
  289. package/dist/api/types/CreateSharedConnectionResponseSchema.d.ts +6 -0
  290. package/dist/api/types/CreateSharedConnectionResponseSchema.js +5 -0
  291. package/dist/api/types/Event.d.ts +4 -0
  292. package/dist/api/types/EventBody.d.ts +1 -1
  293. package/dist/api/types/ExecutionStatus.d.ts +1 -1
  294. package/dist/api/types/FilterFieldReferenceType.d.ts +1 -1
  295. package/dist/api/types/FilterFunction.d.ts +1 -1
  296. package/dist/api/types/GetIdentityResponseSchema.d.ts +2 -0
  297. package/dist/api/types/IngestionStatusLevel.d.ts +12 -0
  298. package/dist/api/types/IngestionStatusLevel.js +11 -0
  299. package/dist/api/types/JobResponse.d.ts +3 -0
  300. package/dist/api/types/JsonschemaDefinitions.d.ts +1 -1
  301. package/dist/api/types/JsonschemaForm.d.ts +1 -1
  302. package/dist/api/types/LabelLabel.d.ts +1 -1
  303. package/dist/api/types/ModelField.d.ts +1 -1
  304. package/dist/api/types/ModelResponse.d.ts +2 -2
  305. package/dist/api/types/ModelSyncMode.d.ts +2 -1
  306. package/dist/api/types/ModelSyncMode.js +1 -0
  307. package/dist/api/types/ModelSyncResponse.d.ts +2 -2
  308. package/dist/api/types/ModelSyncSourceMetaResponse.d.ts +3 -0
  309. package/dist/api/types/Organization.d.ts +5 -0
  310. package/dist/api/types/{CommonOutputActor.d.ts → OutputActor.d.ts} +1 -1
  311. package/dist/api/types/OutputActor.js +5 -0
  312. package/dist/api/types/ScheduleFrequency.d.ts +1 -1
  313. package/dist/api/types/SchemaIdentityFunction.d.ts +1 -1
  314. package/dist/api/types/SourceMeta.d.ts +3 -0
  315. package/dist/api/types/TypesType.d.ts +1 -1
  316. package/dist/api/types/User.d.ts +6 -0
  317. package/dist/api/types/UtilFieldType.d.ts +1 -1
  318. package/dist/api/types/V2CreateSharedConnectionResponseEnvelope.d.ts +7 -0
  319. package/dist/api/types/V2CreateSharedConnectionResponseEnvelope.js +5 -0
  320. package/dist/api/types/V2EnricherConfiguration.d.ts +1 -1
  321. package/dist/api/types/V2EnricherMapping.d.ts +1 -1
  322. package/dist/api/types/V2ExecutionLogType.d.ts +1 -1
  323. package/dist/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
  324. package/dist/api/types/V2SampleRecord.d.ts +1 -1
  325. package/dist/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
  326. package/dist/api/types/V3BulkSyncSourceCapabilities.d.ts +6 -0
  327. package/dist/api/types/V3BulkSyncSourceCapabilities.js +5 -0
  328. package/dist/api/types/V4BulkSyncExecutionLogs.d.ts +6 -1
  329. package/dist/api/types/V4BulkSyncScheduleApi.d.ts +5 -0
  330. package/dist/api/types/V4ExportSyncLogsResponse.d.ts +1 -0
  331. package/dist/api/types/V4GlobalErrorSubscribersResponse.d.ts +1 -0
  332. package/dist/api/types/V4RunQueryResult.d.ts +2 -1
  333. package/dist/api/types/V4UserFieldRequest.d.ts +4 -0
  334. package/dist/api/types/WorkTaskStatus.d.ts +1 -1
  335. package/dist/api/types/index.d.ts +13 -6
  336. package/dist/api/types/index.js +13 -6
  337. package/dist/core/auth/BearerToken.d.ts +1 -1
  338. package/dist/core/fetcher/APIResponse.d.ts +1 -1
  339. package/dist/core/fetcher/Fetcher.d.ts +3 -6
  340. package/dist/core/fetcher/Fetcher.js +189 -20
  341. package/dist/core/fetcher/Supplier.d.ts +1 -1
  342. package/dist/core/fetcher/getHeader.js +2 -1
  343. package/dist/core/runtime/runtime.d.ts +1 -2
  344. package/dist/core/runtime/runtime.js +41 -52
  345. package/dist/environments.d.ts +1 -1
  346. package/dist/errors/PolytomicError.js +1 -2
  347. package/dist/errors/PolytomicTimeoutError.d.ts +1 -1
  348. package/dist/errors/PolytomicTimeoutError.js +2 -2
  349. package/dist/index.js +7 -17
  350. package/environments.d.ts +1 -1
  351. package/errors/PolytomicError.js +1 -2
  352. package/errors/PolytomicTimeoutError.d.ts +1 -1
  353. package/errors/PolytomicTimeoutError.js +2 -2
  354. package/index.js +7 -17
  355. package/{jest.config.mjs → jest.config.js} +1 -4
  356. package/package.json +17 -18
  357. package/core/fetcher/createRequestUrl.d.ts +0 -1
  358. package/core/fetcher/createRequestUrl.js +0 -12
  359. package/core/fetcher/getFetchFn.d.ts +0 -4
  360. package/core/fetcher/getFetchFn.js +0 -68
  361. package/core/fetcher/getRequestBody.d.ts +0 -7
  362. package/core/fetcher/getRequestBody.js +0 -23
  363. package/core/fetcher/getResponseBody.d.ts +0 -1
  364. package/core/fetcher/getResponseBody.js +0 -54
  365. package/core/fetcher/makeRequest.d.ts +0 -1
  366. package/core/fetcher/makeRequest.js +0 -42
  367. package/core/fetcher/requestWithRetries.d.ts +0 -1
  368. package/core/fetcher/requestWithRetries.js +0 -40
  369. package/core/fetcher/signals.d.ts +0 -11
  370. package/core/fetcher/signals.js +0 -36
  371. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  372. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
  373. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  374. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
  375. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  376. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
  377. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  378. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
  379. package/core/json.d.ts +0 -15
  380. package/core/json.js +0 -24
  381. package/dist/core/fetcher/createRequestUrl.d.ts +0 -1
  382. package/dist/core/fetcher/createRequestUrl.js +0 -12
  383. package/dist/core/fetcher/getFetchFn.d.ts +0 -4
  384. package/dist/core/fetcher/getFetchFn.js +0 -68
  385. package/dist/core/fetcher/getRequestBody.d.ts +0 -7
  386. package/dist/core/fetcher/getRequestBody.js +0 -23
  387. package/dist/core/fetcher/getResponseBody.d.ts +0 -1
  388. package/dist/core/fetcher/getResponseBody.js +0 -54
  389. package/dist/core/fetcher/makeRequest.d.ts +0 -1
  390. package/dist/core/fetcher/makeRequest.js +0 -42
  391. package/dist/core/fetcher/requestWithRetries.d.ts +0 -1
  392. package/dist/core/fetcher/requestWithRetries.js +0 -40
  393. package/dist/core/fetcher/signals.d.ts +0 -11
  394. package/dist/core/fetcher/signals.js +0 -36
  395. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  396. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
  397. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  398. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
  399. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  400. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
  401. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  402. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
  403. package/dist/core/json.d.ts +0 -15
  404. package/dist/core/json.js +0 -24
  405. package/dist/version.d.ts +0 -1
  406. package/reference.md +0 -6547
  407. package/scripts/rename-to-esm-files.js +0 -115
  408. package/version.d.ts +0 -1
  409. /package/api/{types/CommonOutputActor.js → resources/connections/client/requests/ApiRequest.js} +0 -0
  410. /package/{dist/api/types/CommonOutputActor.js → api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.js} +0 -0
@@ -18,23 +18,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
38
28
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
29
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
30
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -52,7 +42,6 @@ exports.ModelSync = void 0;
52
42
  const environments = __importStar(require("../../../../environments"));
53
43
  const core = __importStar(require("../../../../core"));
54
44
  const Polytomic = __importStar(require("../../../index"));
55
- const json_1 = require("../../../../core/json");
56
45
  const url_join_1 = __importDefault(require("url-join"));
57
46
  const errors = __importStar(require("../../../../errors/index"));
58
47
  const Client_1 = require("../resources/targets/client/Client");
@@ -61,16 +50,15 @@ class ModelSync {
61
50
  constructor(_options) {
62
51
  this._options = _options;
63
52
  }
64
- get targets() {
65
- var _a;
66
- return ((_a = this._targets) !== null && _a !== void 0 ? _a : (this._targets = new Client_1.Targets(this._options)));
67
- }
68
- get executions() {
69
- var _a;
70
- return ((_a = this._executions) !== null && _a !== void 0 ? _a : (this._executions = new Client_2.Executions(this._options)));
71
- }
72
53
  /**
73
- * @param {string} id
54
+ * Describes the source configuration available on a connection for use as a model sync source.
55
+ *
56
+ * Use this endpoint before creating a model to understand what configuration is
57
+ * available. Once you have a configuration, resolve the fields available for
58
+ * sync mapping with
59
+ * [`GET /api/connections/{id}/modelsync/source/fields`](../../../../../api-reference/model-sync/get-source-fields).
60
+ *
61
+ * @param {string} id - Unique identifier of the connection.
74
62
  * @param {Polytomic.ModelSyncGetSourceRequest} request
75
63
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
76
64
  *
@@ -83,23 +71,30 @@ class ModelSync {
83
71
  * @example
84
72
  * await client.modelSync.getSource("248df4b7-aa70-47b8-a036-33ac447e668d")
85
73
  */
86
- getSource(id_1) {
87
- return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
88
- var _a, _b;
74
+ getSource(id, request = {}, requestOptions) {
75
+ var _a;
76
+ return __awaiter(this, void 0, void 0, function* () {
89
77
  const { params } = request;
90
78
  const _queryParams = {};
91
79
  if (params != null) {
92
- _queryParams["params"] = (0, json_1.toJson)(params);
80
+ _queryParams["params"] = JSON.stringify(params);
93
81
  }
94
82
  const _response = yield core.fetcher({
95
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}/modelsync/source`),
83
+ 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/source`),
96
84
  method: "GET",
97
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
85
+ headers: {
86
+ Authorization: yield this._getAuthorizationHeader(),
87
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
98
88
  ? yield core.Supplier.get(this._options.version)
99
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.0", "User-Agent": "polytomic/1.16.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
89
+ : undefined,
90
+ "X-Fern-Language": "JavaScript",
91
+ "X-Fern-SDK-Name": "polytomic",
92
+ "X-Fern-SDK-Version": "1.18.1",
93
+ "X-Fern-Runtime": core.RUNTIME.type,
94
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
95
+ },
100
96
  contentType: "application/json",
101
97
  queryParameters: _queryParams,
102
- requestType: "json",
103
98
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
104
99
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
105
100
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -133,7 +128,7 @@ class ModelSync {
133
128
  body: _response.error.rawBody,
134
129
  });
135
130
  case "timeout":
136
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}/modelsync/source.");
131
+ throw new errors.PolytomicTimeoutError();
137
132
  case "unknown":
138
133
  throw new errors.PolytomicError({
139
134
  message: _response.error.errorMessage,
@@ -142,7 +137,20 @@ class ModelSync {
142
137
  });
143
138
  }
144
139
  /**
145
- * @param {string} id
140
+ * Returns the source fields available on a connection for a given source configuration.
141
+ *
142
+ * Pass the model's source configuration as query parameters to resolve the
143
+ * fields that the connection will expose for that specific configuration. The
144
+ * returned fields are what can be referenced in sync field mappings.
145
+ *
146
+ * > 📘 Results depend on the source configuration you supply. A different
147
+ * > table or query in the configuration may return a completely different field
148
+ * > list.
149
+ *
150
+ * The available source configuration parameters are described by
151
+ * [`GET /api/connections/{id}/modelsync/source`](../../../../../../api-reference/model-sync/get-source).
152
+ *
153
+ * @param {string} id - Unique identifier of the connection.
146
154
  * @param {Polytomic.ModelSyncGetSourceFieldsRequest} request
147
155
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
148
156
  *
@@ -155,23 +163,30 @@ class ModelSync {
155
163
  * @example
156
164
  * await client.modelSync.getSourceFields("248df4b7-aa70-47b8-a036-33ac447e668d")
157
165
  */
158
- getSourceFields(id_1) {
159
- return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
160
- var _a, _b;
166
+ getSourceFields(id, request = {}, requestOptions) {
167
+ var _a;
168
+ return __awaiter(this, void 0, void 0, function* () {
161
169
  const { params } = request;
162
170
  const _queryParams = {};
163
171
  if (params != null) {
164
- _queryParams["params"] = (0, json_1.toJson)(params);
172
+ _queryParams["params"] = JSON.stringify(params);
165
173
  }
166
174
  const _response = yield core.fetcher({
167
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}/modelsync/source/fields`),
175
+ 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/source/fields`),
168
176
  method: "GET",
169
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
177
+ headers: {
178
+ Authorization: yield this._getAuthorizationHeader(),
179
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
170
180
  ? yield core.Supplier.get(this._options.version)
171
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.0", "User-Agent": "polytomic/1.16.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
181
+ : undefined,
182
+ "X-Fern-Language": "JavaScript",
183
+ "X-Fern-SDK-Name": "polytomic",
184
+ "X-Fern-SDK-Version": "1.18.1",
185
+ "X-Fern-Runtime": core.RUNTIME.type,
186
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
187
+ },
172
188
  contentType: "application/json",
173
189
  queryParameters: _queryParams,
174
- requestType: "json",
175
190
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
176
191
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
177
192
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -205,7 +220,7 @@ class ModelSync {
205
220
  body: _response.error.rawBody,
206
221
  });
207
222
  case "timeout":
208
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}/modelsync/source/fields.");
223
+ throw new errors.PolytomicTimeoutError();
209
224
  case "unknown":
210
225
  throw new errors.PolytomicError({
211
226
  message: _response.error.errorMessage,
@@ -214,6 +229,21 @@ class ModelSync {
214
229
  });
215
230
  }
216
231
  /**
232
+ * Lists all model syncs in the caller's organization.
233
+ *
234
+ * Results are ordered by `updated_at` descending, with `id` used as a tiebreaker.
235
+ * If more results are available, the response includes `pagination.next_page_token`.
236
+ * Pass that token back unchanged to continue from the last item you received.
237
+ *
238
+ * The token is opaque. Do not construct or edit it yourself.
239
+ *
240
+ * The `limit` is capped at 50. Values above that cap are reduced to 50, and
241
+ * non-positive values fall back to the same default.
242
+ *
243
+ * This endpoint returns syncs visible to the current caller's organization scope.
244
+ * To inspect a specific sync in more detail, follow up with
245
+ * [`GET /api/syncs/{id}`](../../api-reference/model-sync/get).
246
+ *
217
247
  * @param {Polytomic.ModelSyncListRequest} request
218
248
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
219
249
  *
@@ -228,9 +258,9 @@ class ModelSync {
228
258
  * target_connection_id: "0b155265-c537-44c9-9359-a3ceb468a4da"
229
259
  * })
230
260
  */
231
- list() {
232
- return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
233
- var _a, _b;
261
+ list(request = {}, requestOptions) {
262
+ var _a;
263
+ return __awaiter(this, void 0, void 0, function* () {
234
264
  const { active, mode, target_connection_id: targetConnectionId } = request;
235
265
  const _queryParams = {};
236
266
  if (active != null) {
@@ -243,14 +273,21 @@ class ModelSync {
243
273
  _queryParams["target_connection_id"] = targetConnectionId;
244
274
  }
245
275
  const _response = yield core.fetcher({
246
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/syncs"),
276
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/syncs"),
247
277
  method: "GET",
248
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
278
+ headers: {
279
+ Authorization: yield this._getAuthorizationHeader(),
280
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
249
281
  ? yield core.Supplier.get(this._options.version)
250
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.0", "User-Agent": "polytomic/1.16.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
282
+ : undefined,
283
+ "X-Fern-Language": "JavaScript",
284
+ "X-Fern-SDK-Name": "polytomic",
285
+ "X-Fern-SDK-Version": "1.18.1",
286
+ "X-Fern-Runtime": core.RUNTIME.type,
287
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
288
+ },
251
289
  contentType: "application/json",
252
290
  queryParameters: _queryParams,
253
- requestType: "json",
254
291
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
255
292
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
256
293
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -282,7 +319,7 @@ class ModelSync {
282
319
  body: _response.error.rawBody,
283
320
  });
284
321
  case "timeout":
285
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/syncs.");
322
+ throw new errors.PolytomicTimeoutError();
286
323
  case "unknown":
287
324
  throw new errors.PolytomicError({
288
325
  message: _response.error.errorMessage,
@@ -291,6 +328,8 @@ class ModelSync {
291
328
  });
292
329
  }
293
330
  /**
331
+ * Creates a new model sync.
332
+ *
294
333
  * Create a new sync from one or more models to a destination.
295
334
  *
296
335
  * All of the functionality described in [the product
@@ -299,15 +338,15 @@ class ModelSync {
299
338
  *
300
339
  * Guides:
301
340
  *
302
- * - [Model sync (Reverse ETL) from Snowflake query to Salesforce](https://apidocs.polytomic.com/2024-02-08/guides/code-examples/model-sync-reverse-etl-from-snowflake-query-to-salesforce)
303
- * - [Joined model sync from Postgres, Airtable, and Stripe to Hubspot](https://apidocs.polytomic.com/2024-02-08/guides/code-examples/joined-model-sync-from-postgres-airtable-and-stripe-to-hubspot)
341
+ * - [Model sync (Reverse ETL) from Snowflake query to Salesforce](../../guides/code-examples/model-sync-reverse-etl-from-snowflake-query-to-salesforce)
342
+ * - [Joined model sync from Postgres, Airtable, and Stripe to Hubspot](../../guides/code-examples/joined-model-sync-from-postgres-airtable-and-stripe-to-hubspot)
304
343
  *
305
344
  * ## Targets (Destinations)
306
345
  *
307
346
  * Polytomic refers to a model sync's destination as the "target object", or
308
347
  * target. Target objects are identified by a connection ID and an object ID. You
309
348
  * can retrieve a list of all target objects for a connection using the [Get Target
310
- * Objects](./targets/list) endpoint.
349
+ * Objects](../../api-reference/model-sync/targets/list) endpoint.
311
350
  *
312
351
  * The `target` object in the request specifies information about the sync destination.
313
352
  *
@@ -320,10 +359,10 @@ class ModelSync {
320
359
  *
321
360
  * Some connections support additional configuration for targets. For example,
322
361
  * [Salesforce
323
- * connections](https://apidocs.polytomic.com/2024-02-08/guides/configuring-your-connections/connections/salesforce#target)
362
+ * connections](../../guides/configuring-your-connections/connections/salesforce#target)
324
363
  * support optionally specifying the ingestion API to use. The target specific
325
364
  * options are passed as `configuration`; consult the [integration
326
- * guides](https://apidocs.polytomic.com/2024-02-08/guides/configuring-your-connections/overview)
365
+ * guides](../../guides/configuring-your-connections/overview)
327
366
  * for details about specific connection configurations.
328
367
  *
329
368
  * ### Creating a new target
@@ -345,7 +384,7 @@ class ModelSync {
345
384
  * },
346
385
  * ```
347
386
  *
348
- * The [Get Target List](./targets/list) endpoint returns information about whether
387
+ * The [Get Target List](../../api-reference/model-sync/targets/list) endpoint returns information about whether
349
388
  * a connection supports target creation.
350
389
  *
351
390
  * @param {Polytomic.CreateModelSyncRequest} request
@@ -362,7 +401,7 @@ class ModelSync {
362
401
  * fields: [{
363
402
  * target: "name"
364
403
  * }],
365
- * mode: "create",
404
+ * mode: Polytomic.ModelSyncMode.Create,
366
405
  * name: "Users Sync",
367
406
  * schedule: {},
368
407
  * target: {
@@ -371,16 +410,23 @@ class ModelSync {
371
410
  * })
372
411
  */
373
412
  create(request, requestOptions) {
413
+ var _a;
374
414
  return __awaiter(this, void 0, void 0, function* () {
375
- var _a, _b;
376
415
  const _response = yield core.fetcher({
377
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/syncs"),
416
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/syncs"),
378
417
  method: "POST",
379
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
418
+ headers: {
419
+ Authorization: yield this._getAuthorizationHeader(),
420
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
380
421
  ? yield core.Supplier.get(this._options.version)
381
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.0", "User-Agent": "polytomic/1.16.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
422
+ : undefined,
423
+ "X-Fern-Language": "JavaScript",
424
+ "X-Fern-SDK-Name": "polytomic",
425
+ "X-Fern-SDK-Version": "1.18.1",
426
+ "X-Fern-Runtime": core.RUNTIME.type,
427
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
428
+ },
382
429
  contentType: "application/json",
383
- requestType: "json",
384
430
  body: request,
385
431
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
386
432
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -415,7 +461,7 @@ class ModelSync {
415
461
  body: _response.error.rawBody,
416
462
  });
417
463
  case "timeout":
418
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/syncs.");
464
+ throw new errors.PolytomicTimeoutError();
419
465
  case "unknown":
420
466
  throw new errors.PolytomicError({
421
467
  message: _response.error.errorMessage,
@@ -424,6 +470,12 @@ class ModelSync {
424
470
  });
425
471
  }
426
472
  /**
473
+ * Returns the schedule types available when creating or updating a model sync.
474
+ *
475
+ * Use the `type` identifiers returned by this endpoint in the `schedule` field
476
+ * when creating or updating a sync via
477
+ * [`POST /api/syncs`](../../../api-reference/model-sync/create) or [`PUT /api/syncs/{id}`](../../../api-reference/model-sync/update).
478
+ *
427
479
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
428
480
  *
429
481
  * @throws {@link Polytomic.UnauthorizedError}
@@ -433,16 +485,23 @@ class ModelSync {
433
485
  * await client.modelSync.getScheduleOptions()
434
486
  */
435
487
  getScheduleOptions(requestOptions) {
488
+ var _a;
436
489
  return __awaiter(this, void 0, void 0, function* () {
437
- var _a, _b;
438
490
  const _response = yield core.fetcher({
439
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/syncs/schedules"),
491
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/syncs/schedules"),
440
492
  method: "GET",
441
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
493
+ headers: {
494
+ Authorization: yield this._getAuthorizationHeader(),
495
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
442
496
  ? yield core.Supplier.get(this._options.version)
443
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.0", "User-Agent": "polytomic/1.16.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
497
+ : undefined,
498
+ "X-Fern-Language": "JavaScript",
499
+ "X-Fern-SDK-Name": "polytomic",
500
+ "X-Fern-SDK-Version": "1.18.1",
501
+ "X-Fern-Runtime": core.RUNTIME.type,
502
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
503
+ },
444
504
  contentType: "application/json",
445
- requestType: "json",
446
505
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
447
506
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
448
507
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -470,7 +529,7 @@ class ModelSync {
470
529
  body: _response.error.rawBody,
471
530
  });
472
531
  case "timeout":
473
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/syncs/schedules.");
532
+ throw new errors.PolytomicTimeoutError();
474
533
  case "unknown":
475
534
  throw new errors.PolytomicError({
476
535
  message: _response.error.errorMessage,
@@ -479,6 +538,12 @@ class ModelSync {
479
538
  });
480
539
  }
481
540
  /**
541
+ * Returns a single model sync by ID.
542
+ *
543
+ * To check whether a sync is currently running or has recently completed, use
544
+ * [`GET /api/syncs/{id}/status`](../../../api-reference/model-sync/get-status). For the full history of
545
+ * executions, use [`GET /api/syncs/{id}/executions`](../../../api-reference/model-sync/executions/list).
546
+ *
482
547
  * @param {string} id
483
548
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
484
549
  *
@@ -490,16 +555,23 @@ class ModelSync {
490
555
  * await client.modelSync.get("248df4b7-aa70-47b8-a036-33ac447e668d")
491
556
  */
492
557
  get(id, requestOptions) {
558
+ var _a;
493
559
  return __awaiter(this, void 0, void 0, function* () {
494
- var _a, _b;
495
560
  const _response = yield core.fetcher({
496
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}`),
561
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}`),
497
562
  method: "GET",
498
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
563
+ headers: {
564
+ Authorization: yield this._getAuthorizationHeader(),
565
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
499
566
  ? yield core.Supplier.get(this._options.version)
500
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.0", "User-Agent": "polytomic/1.16.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
567
+ : undefined,
568
+ "X-Fern-Language": "JavaScript",
569
+ "X-Fern-SDK-Name": "polytomic",
570
+ "X-Fern-SDK-Version": "1.18.1",
571
+ "X-Fern-Runtime": core.RUNTIME.type,
572
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
573
+ },
501
574
  contentType: "application/json",
502
- requestType: "json",
503
575
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
504
576
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
505
577
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -529,7 +601,7 @@ class ModelSync {
529
601
  body: _response.error.rawBody,
530
602
  });
531
603
  case "timeout":
532
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/syncs/{id}.");
604
+ throw new errors.PolytomicTimeoutError();
533
605
  case "unknown":
534
606
  throw new errors.PolytomicError({
535
607
  message: _response.error.errorMessage,
@@ -538,6 +610,22 @@ class ModelSync {
538
610
  });
539
611
  }
540
612
  /**
613
+ * Updates a model sync's configuration.
614
+ *
615
+ * Updating a model sync is a **full replacement** of the sync's configuration.
616
+ * Every field in the request body is written to the sync; any field you omit is
617
+ * cleared or reset to its default value.
618
+ *
619
+ * To make a partial change — for example, toggling `active` or adjusting a
620
+ * single field mapping — fetch the current sync with
621
+ * [`GET /api/syncs/{id}`](../../../api-reference/model-sync/get),
622
+ * modify the fields you want to change, and send the complete object back in
623
+ * the update request.
624
+ *
625
+ * Updates to `active`, `schedule`, and `policies` take effect immediately.
626
+ * Changes to source fields, target configuration, filters, or field mappings
627
+ * take effect on the sync's next execution.
628
+ *
541
629
  * @param {string} id
542
630
  * @param {Polytomic.UpdateModelSyncRequest} request
543
631
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
@@ -554,7 +642,7 @@ class ModelSync {
554
642
  * fields: [{
555
643
  * target: "name"
556
644
  * }],
557
- * mode: "create",
645
+ * mode: Polytomic.ModelSyncMode.Create,
558
646
  * name: "Users Sync",
559
647
  * schedule: {},
560
648
  * target: {
@@ -563,16 +651,23 @@ class ModelSync {
563
651
  * })
564
652
  */
565
653
  update(id, request, requestOptions) {
654
+ var _a;
566
655
  return __awaiter(this, void 0, void 0, function* () {
567
- var _a, _b;
568
656
  const _response = yield core.fetcher({
569
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}`),
657
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}`),
570
658
  method: "PUT",
571
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
659
+ headers: {
660
+ Authorization: yield this._getAuthorizationHeader(),
661
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
572
662
  ? yield core.Supplier.get(this._options.version)
573
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.0", "User-Agent": "polytomic/1.16.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
663
+ : undefined,
664
+ "X-Fern-Language": "JavaScript",
665
+ "X-Fern-SDK-Name": "polytomic",
666
+ "X-Fern-SDK-Version": "1.18.1",
667
+ "X-Fern-Runtime": core.RUNTIME.type,
668
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
669
+ },
574
670
  contentType: "application/json",
575
- requestType: "json",
576
671
  body: request,
577
672
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
578
673
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -609,7 +704,7 @@ class ModelSync {
609
704
  body: _response.error.rawBody,
610
705
  });
611
706
  case "timeout":
612
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling PUT /api/syncs/{id}.");
707
+ throw new errors.PolytomicTimeoutError();
613
708
  case "unknown":
614
709
  throw new errors.PolytomicError({
615
710
  message: _response.error.errorMessage,
@@ -618,6 +713,12 @@ class ModelSync {
618
713
  });
619
714
  }
620
715
  /**
716
+ * Deletes a model sync, cancelling any running executions.
717
+ *
718
+ * Deletion is permanent. Any running execution is cancelled before the sync
719
+ * record is removed. Deleted syncs cannot be recovered; recreate them using
720
+ * [`POST /api/syncs`](../../../api-reference/model-sync/create) if needed.
721
+ *
621
722
  * @param {string} id
622
723
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
623
724
  *
@@ -631,16 +732,23 @@ class ModelSync {
631
732
  * await client.modelSync.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
632
733
  */
633
734
  remove(id, requestOptions) {
735
+ var _a;
634
736
  return __awaiter(this, void 0, void 0, function* () {
635
- var _a, _b;
636
737
  const _response = yield core.fetcher({
637
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}`),
738
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}`),
638
739
  method: "DELETE",
639
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
740
+ headers: {
741
+ Authorization: yield this._getAuthorizationHeader(),
742
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
640
743
  ? yield core.Supplier.get(this._options.version)
641
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.0", "User-Agent": "polytomic/1.16.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
744
+ : undefined,
745
+ "X-Fern-Language": "JavaScript",
746
+ "X-Fern-SDK-Name": "polytomic",
747
+ "X-Fern-SDK-Version": "1.18.1",
748
+ "X-Fern-Runtime": core.RUNTIME.type,
749
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
750
+ },
642
751
  contentType: "application/json",
643
- requestType: "json",
644
752
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
645
753
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
646
754
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -674,7 +782,7 @@ class ModelSync {
674
782
  body: _response.error.rawBody,
675
783
  });
676
784
  case "timeout":
677
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling DELETE /api/syncs/{id}.");
785
+ throw new errors.PolytomicTimeoutError();
678
786
  case "unknown":
679
787
  throw new errors.PolytomicError({
680
788
  message: _response.error.errorMessage,
@@ -683,6 +791,15 @@ class ModelSync {
683
791
  });
684
792
  }
685
793
  /**
794
+ * Sets whether a model sync is active.
795
+ *
796
+ * Only active syncs execute on schedule or in response to a manual trigger. Set
797
+ * `active` to `false` to pause a sync without deleting it.
798
+ *
799
+ * > 📘 Deactivating a sync does not cancel an execution that is already in
800
+ * > progress. Use [`POST /api/syncs/{id}/cancel`](../../../../api-reference/model-sync/cancel) to stop a
801
+ * > running execution.
802
+ *
686
803
  * @param {string} id
687
804
  * @param {Polytomic.ActivateSyncInput} request
688
805
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
@@ -698,16 +815,23 @@ class ModelSync {
698
815
  * })
699
816
  */
700
817
  activate(id, request, requestOptions) {
818
+ var _a;
701
819
  return __awaiter(this, void 0, void 0, function* () {
702
- var _a, _b;
703
820
  const _response = yield core.fetcher({
704
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}/activate`),
821
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}/activate`),
705
822
  method: "POST",
706
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
823
+ headers: {
824
+ Authorization: yield this._getAuthorizationHeader(),
825
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
707
826
  ? yield core.Supplier.get(this._options.version)
708
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.0", "User-Agent": "polytomic/1.16.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
827
+ : undefined,
828
+ "X-Fern-Language": "JavaScript",
829
+ "X-Fern-SDK-Name": "polytomic",
830
+ "X-Fern-SDK-Version": "1.18.1",
831
+ "X-Fern-Runtime": core.RUNTIME.type,
832
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
833
+ },
709
834
  contentType: "application/json",
710
- requestType: "json",
711
835
  body: request,
712
836
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
713
837
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -740,7 +864,7 @@ class ModelSync {
740
864
  body: _response.error.rawBody,
741
865
  });
742
866
  case "timeout":
743
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/syncs/{id}/activate.");
867
+ throw new errors.PolytomicTimeoutError();
744
868
  case "unknown":
745
869
  throw new errors.PolytomicError({
746
870
  message: _response.error.errorMessage,
@@ -749,6 +873,14 @@ class ModelSync {
749
873
  });
750
874
  }
751
875
  /**
876
+ * Requests cancellation of any running executions on a model sync.
877
+ *
878
+ * Cancellation is asynchronous. A successful response means the cancellation
879
+ * signal has been queued; the running execution continues until the signal is
880
+ * processed. Poll `GET /api/syncs/{id}/status` until the current execution
881
+ * reaches a terminal state (`completed`, `canceled`, or `failed`) to confirm
882
+ * cancellation has taken effect.
883
+ *
752
884
  * @param {string} id - The active execution of this sync ID will be cancelled.
753
885
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
754
886
  *
@@ -761,16 +893,23 @@ class ModelSync {
761
893
  * await client.modelSync.cancel("248df4b7-aa70-47b8-a036-33ac447e668d")
762
894
  */
763
895
  cancel(id, requestOptions) {
896
+ var _a;
764
897
  return __awaiter(this, void 0, void 0, function* () {
765
- var _a, _b;
766
898
  const _response = yield core.fetcher({
767
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}/cancel`),
899
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}/cancel`),
768
900
  method: "POST",
769
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
901
+ headers: {
902
+ Authorization: yield this._getAuthorizationHeader(),
903
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
770
904
  ? yield core.Supplier.get(this._options.version)
771
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.0", "User-Agent": "polytomic/1.16.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
905
+ : undefined,
906
+ "X-Fern-Language": "JavaScript",
907
+ "X-Fern-SDK-Name": "polytomic",
908
+ "X-Fern-SDK-Version": "1.18.1",
909
+ "X-Fern-Runtime": core.RUNTIME.type,
910
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
911
+ },
772
912
  contentType: "application/json",
773
- requestType: "json",
774
913
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
775
914
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
776
915
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -802,7 +941,7 @@ class ModelSync {
802
941
  body: _response.error.rawBody,
803
942
  });
804
943
  case "timeout":
805
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/syncs/{id}/cancel.");
944
+ throw new errors.PolytomicTimeoutError();
806
945
  case "unknown":
807
946
  throw new errors.PolytomicError({
808
947
  message: _response.error.errorMessage,
@@ -811,6 +950,8 @@ class ModelSync {
811
950
  });
812
951
  }
813
952
  /**
953
+ * Starts a new execution of a model sync.
954
+ *
814
955
  * > 🚧 Force full resync
815
956
  * >
816
957
  * > Use caution when setting the `resync` parameter to `true`. This will force a full resync of the data from the source system. This can be a time-consuming operation and may impact the performance of the source system. It is recommended to only use this option when necessary.
@@ -829,17 +970,24 @@ class ModelSync {
829
970
  * @example
830
971
  * await client.modelSync.start("248df4b7-aa70-47b8-a036-33ac447e668d")
831
972
  */
832
- start(id_1) {
833
- return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
834
- var _a, _b;
973
+ start(id, request = {}, requestOptions) {
974
+ var _a;
975
+ return __awaiter(this, void 0, void 0, function* () {
835
976
  const _response = yield core.fetcher({
836
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}/executions`),
977
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}/executions`),
837
978
  method: "POST",
838
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
979
+ headers: {
980
+ Authorization: yield this._getAuthorizationHeader(),
981
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
839
982
  ? yield core.Supplier.get(this._options.version)
840
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.0", "User-Agent": "polytomic/1.16.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
983
+ : undefined,
984
+ "X-Fern-Language": "JavaScript",
985
+ "X-Fern-SDK-Name": "polytomic",
986
+ "X-Fern-SDK-Version": "1.18.1",
987
+ "X-Fern-Runtime": core.RUNTIME.type,
988
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
989
+ },
841
990
  contentType: "application/json",
842
- requestType: "json",
843
991
  body: request,
844
992
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
845
993
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -876,7 +1024,7 @@ class ModelSync {
876
1024
  body: _response.error.rawBody,
877
1025
  });
878
1026
  case "timeout":
879
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/syncs/{id}/executions.");
1027
+ throw new errors.PolytomicTimeoutError();
880
1028
  case "unknown":
881
1029
  throw new errors.PolytomicError({
882
1030
  message: _response.error.errorMessage,
@@ -885,6 +1033,12 @@ class ModelSync {
885
1033
  });
886
1034
  }
887
1035
  /**
1036
+ * Returns the current status of a model sync.
1037
+ *
1038
+ * The response includes a summary of the most recent execution, including its
1039
+ * start time, completion time, and record counts. For the complete execution
1040
+ * history, use [`GET /api/syncs/{id}/executions`](../../../../api-reference/model-sync/executions/list).
1041
+ *
888
1042
  * @param {string} id
889
1043
  * @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
890
1044
  *
@@ -896,16 +1050,23 @@ class ModelSync {
896
1050
  * await client.modelSync.getStatus("248df4b7-aa70-47b8-a036-33ac447e668d")
897
1051
  */
898
1052
  getStatus(id, requestOptions) {
1053
+ var _a;
899
1054
  return __awaiter(this, void 0, void 0, function* () {
900
- var _a, _b;
901
1055
  const _response = yield core.fetcher({
902
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}/status`),
1056
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}/status`),
903
1057
  method: "GET",
904
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
1058
+ headers: {
1059
+ Authorization: yield this._getAuthorizationHeader(),
1060
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
905
1061
  ? yield core.Supplier.get(this._options.version)
906
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.0", "User-Agent": "polytomic/1.16.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1062
+ : undefined,
1063
+ "X-Fern-Language": "JavaScript",
1064
+ "X-Fern-SDK-Name": "polytomic",
1065
+ "X-Fern-SDK-Version": "1.18.1",
1066
+ "X-Fern-Runtime": core.RUNTIME.type,
1067
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1068
+ },
907
1069
  contentType: "application/json",
908
- requestType: "json",
909
1070
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
910
1071
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
911
1072
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -935,7 +1096,7 @@ class ModelSync {
935
1096
  body: _response.error.rawBody,
936
1097
  });
937
1098
  case "timeout":
938
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/syncs/{id}/status.");
1099
+ throw new errors.PolytomicTimeoutError();
939
1100
  case "unknown":
940
1101
  throw new errors.PolytomicError({
941
1102
  message: _response.error.errorMessage,
@@ -943,6 +1104,14 @@ class ModelSync {
943
1104
  }
944
1105
  });
945
1106
  }
1107
+ get targets() {
1108
+ var _a;
1109
+ return ((_a = this._targets) !== null && _a !== void 0 ? _a : (this._targets = new Client_1.Targets(this._options)));
1110
+ }
1111
+ get executions() {
1112
+ var _a;
1113
+ return ((_a = this._executions) !== null && _a !== void 0 ? _a : (this._executions = new Client_2.Executions(this._options)));
1114
+ }
946
1115
  _getAuthorizationHeader() {
947
1116
  return __awaiter(this, void 0, void 0, function* () {
948
1117
  return `Bearer ${yield core.Supplier.get(this._options.token)}`;