polytomic 1.16.1 → 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 (394) 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 +134 -18
  33. package/api/resources/connections/client/Client.js +359 -104
  34. package/api/resources/connections/client/requests/ApiRequest.d.ts +2 -2
  35. package/api/resources/events/client/Client.d.ts +20 -7
  36. package/api/resources/events/client/Client.js +55 -33
  37. package/api/resources/events/client/requests/EventsListRequest.d.ts +17 -2
  38. package/api/resources/identity/client/Client.d.ts +11 -6
  39. package/api/resources/identity/client/Client.js +31 -24
  40. package/api/resources/index.js +7 -17
  41. package/api/resources/jobs/client/Client.d.ts +15 -8
  42. package/api/resources/jobs/client/Client.js +35 -26
  43. package/api/resources/modelSync/client/Client.d.ts +110 -19
  44. package/api/resources/modelSync/client/Client.js +287 -118
  45. package/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -1
  46. package/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +3 -0
  47. package/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +3 -0
  48. package/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -1
  49. package/api/resources/modelSync/resources/executions/client/Client.d.ts +41 -12
  50. package/api/resources/modelSync/resources/executions/client/Client.js +115 -56
  51. package/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +1 -1
  52. package/api/resources/modelSync/resources/index.js +7 -17
  53. package/api/resources/modelSync/resources/targets/client/Client.d.ts +28 -11
  54. package/api/resources/modelSync/resources/targets/client/Client.js +89 -49
  55. package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts +6 -0
  56. package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts +6 -0
  57. package/api/resources/models/client/Client.d.ts +79 -8
  58. package/api/resources/models/client/Client.js +214 -86
  59. package/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +3 -0
  60. package/api/resources/notifications/client/Client.d.ts +13 -5
  61. package/api/resources/notifications/client/Client.js +48 -31
  62. package/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +1 -0
  63. package/api/resources/organization/client/Client.d.ts +31 -13
  64. package/api/resources/organization/client/Client.js +109 -55
  65. package/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +6 -0
  66. package/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +6 -0
  67. package/api/resources/permissions/client/Client.d.ts +2 -7
  68. package/api/resources/permissions/resources/index.js +7 -17
  69. package/api/resources/permissions/resources/policies/client/Client.d.ts +33 -5
  70. package/api/resources/permissions/resources/policies/client/Client.js +105 -47
  71. package/api/resources/permissions/resources/roles/client/Client.d.ts +38 -5
  72. package/api/resources/permissions/resources/roles/client/Client.js +110 -47
  73. package/api/resources/queryRunner/client/Client.d.ts +26 -7
  74. package/api/resources/queryRunner/client/Client.js +63 -35
  75. package/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +3 -0
  76. package/api/resources/schemas/client/Client.d.ts +118 -23
  77. package/api/resources/schemas/client/Client.js +232 -86
  78. package/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +1 -0
  79. package/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +1 -0
  80. package/api/resources/users/client/Client.d.ts +44 -16
  81. package/api/resources/users/client/Client.js +133 -66
  82. package/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +3 -0
  83. package/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +3 -0
  84. package/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +3 -0
  85. package/api/resources/webhooks/client/Client.d.ts +67 -21
  86. package/api/resources/webhooks/client/Client.js +165 -75
  87. package/api/types/ApiKeyResponse.d.ts +1 -0
  88. package/api/types/BulkBulkSyncSchedule.d.ts +1 -0
  89. package/api/types/BulkDiscover.d.ts +1 -1
  90. package/api/types/BulkExecutionStatus.d.ts +1 -1
  91. package/api/types/BulkFetchMode.d.ts +1 -1
  92. package/api/types/BulkNormalizeNames.d.ts +1 -1
  93. package/api/types/BulkOutputDisposition.d.ts +9 -0
  94. package/api/types/BulkOutputDisposition.js +11 -0
  95. package/api/types/BulkResyncMode.d.ts +9 -0
  96. package/api/types/BulkResyncMode.js +11 -0
  97. package/api/types/BulkScheduleSyncMode.d.ts +1 -1
  98. package/api/types/BulkSchema.d.ts +2 -0
  99. package/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
  100. package/api/types/BulkSchemaExecutionStatus.js +1 -0
  101. package/api/types/BulkSelectiveMode.d.ts +1 -1
  102. package/api/types/BulkSyncDest.d.ts +2 -0
  103. package/api/types/BulkSyncExecution.d.ts +1 -0
  104. package/api/types/BulkSyncExecutionStatus.d.ts +3 -0
  105. package/api/types/BulkSyncIngestionStatus.d.ts +14 -0
  106. package/api/types/BulkSyncMode.d.ts +1 -1
  107. package/api/types/BulkSyncResponse.d.ts +2 -2
  108. package/api/types/BulkSyncSchemaExecutionStatus.d.ts +7 -0
  109. package/api/types/BulkSyncSource.d.ts +1 -0
  110. package/api/types/BulkSyncStatusResponse.d.ts +1 -0
  111. package/api/types/ConnectCardResponse.d.ts +1 -0
  112. package/api/types/ConnectionResponseSchema.d.ts +2 -2
  113. package/api/types/Event.d.ts +4 -0
  114. package/api/types/EventBody.d.ts +1 -1
  115. package/api/types/ExecutionStatus.d.ts +1 -1
  116. package/api/types/FilterFieldReferenceType.d.ts +1 -1
  117. package/api/types/FilterFunction.d.ts +1 -1
  118. package/api/types/GetIdentityResponseSchema.d.ts +2 -0
  119. package/api/types/IngestionStatusLevel.d.ts +12 -0
  120. package/api/types/IngestionStatusLevel.js +11 -0
  121. package/api/types/JobResponse.d.ts +3 -0
  122. package/api/types/JsonschemaDefinitions.d.ts +1 -1
  123. package/api/types/JsonschemaForm.d.ts +1 -1
  124. package/api/types/LabelLabel.d.ts +1 -1
  125. package/api/types/ModelField.d.ts +1 -1
  126. package/api/types/ModelResponse.d.ts +2 -2
  127. package/api/types/ModelSyncMode.d.ts +2 -1
  128. package/api/types/ModelSyncMode.js +1 -0
  129. package/api/types/ModelSyncResponse.d.ts +2 -2
  130. package/api/types/ModelSyncSourceMetaResponse.d.ts +3 -0
  131. package/api/types/Organization.d.ts +5 -0
  132. package/api/types/{CommonOutputActor.d.ts → OutputActor.d.ts} +1 -1
  133. package/api/types/ScheduleFrequency.d.ts +1 -1
  134. package/api/types/SchemaIdentityFunction.d.ts +1 -1
  135. package/api/types/SourceMeta.d.ts +3 -0
  136. package/api/types/TypesType.d.ts +1 -1
  137. package/api/types/User.d.ts +5 -0
  138. package/api/types/UtilFieldType.d.ts +1 -1
  139. package/api/types/V2EnricherConfiguration.d.ts +1 -1
  140. package/api/types/V2EnricherMapping.d.ts +1 -1
  141. package/api/types/V2ExecutionLogType.d.ts +1 -1
  142. package/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
  143. package/api/types/V2SampleRecord.d.ts +1 -1
  144. package/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
  145. package/api/types/V3BulkSyncSourceCapabilities.d.ts +6 -0
  146. package/{dist/version.js → api/types/V3BulkSyncSourceCapabilities.js} +3 -2
  147. package/api/types/V4BulkSyncExecutionLogs.d.ts +6 -1
  148. package/api/types/V4BulkSyncScheduleApi.d.ts +5 -0
  149. package/api/types/V4ExportSyncLogsResponse.d.ts +1 -0
  150. package/api/types/V4GlobalErrorSubscribersResponse.d.ts +1 -0
  151. package/api/types/V4RunQueryResult.d.ts +2 -1
  152. package/api/types/V4UserFieldRequest.d.ts +4 -0
  153. package/api/types/WorkTaskStatus.d.ts +1 -1
  154. package/api/types/index.d.ts +11 -6
  155. package/api/types/index.js +11 -6
  156. package/core/auth/BearerToken.d.ts +1 -1
  157. package/core/fetcher/APIResponse.d.ts +1 -1
  158. package/core/fetcher/Fetcher.d.ts +3 -6
  159. package/core/fetcher/Fetcher.js +189 -20
  160. package/core/fetcher/Supplier.d.ts +1 -1
  161. package/core/fetcher/getHeader.js +2 -1
  162. package/core/runtime/runtime.d.ts +1 -2
  163. package/core/runtime/runtime.js +41 -52
  164. package/dist/Client.d.ts +14 -19
  165. package/dist/api/errors/BadRequestError.js +7 -17
  166. package/dist/api/errors/ConflictError.js +7 -17
  167. package/dist/api/errors/ForbiddenError.js +7 -17
  168. package/dist/api/errors/InternalServerError.js +7 -17
  169. package/dist/api/errors/NotFoundError.js +7 -17
  170. package/dist/api/errors/UnauthorizedError.js +7 -17
  171. package/dist/api/errors/UnprocessableEntityError.js +7 -17
  172. package/dist/api/resources/bulkSync/client/Client.d.ts +173 -24
  173. package/dist/api/resources/bulkSync/client/Client.js +339 -118
  174. package/dist/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +3 -0
  175. package/dist/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +3 -0
  176. package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
  177. package/dist/api/resources/bulkSync/client/requests/StartBulkSyncRequest.d.ts +4 -0
  178. package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
  179. package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +77 -12
  180. package/dist/api/resources/bulkSync/resources/executions/client/Client.js +168 -66
  181. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +12 -0
  182. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +3 -3
  183. package/dist/api/resources/bulkSync/resources/index.js +7 -17
  184. package/dist/api/resources/bulkSync/resources/schedules/client/Client.d.ts +44 -15
  185. package/dist/api/resources/bulkSync/resources/schedules/client/Client.js +116 -57
  186. package/dist/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +1 -1
  187. package/dist/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +1 -1
  188. package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +71 -11
  189. package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +150 -61
  190. package/dist/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -0
  191. package/dist/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +3 -0
  192. package/dist/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +7 -0
  193. package/dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
  194. package/dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
  195. package/dist/api/resources/connections/client/Client.d.ts +134 -18
  196. package/dist/api/resources/connections/client/Client.js +359 -104
  197. package/dist/api/resources/connections/client/requests/ApiRequest.d.ts +2 -2
  198. package/dist/api/resources/events/client/Client.d.ts +20 -7
  199. package/dist/api/resources/events/client/Client.js +55 -33
  200. package/dist/api/resources/events/client/requests/EventsListRequest.d.ts +17 -2
  201. package/dist/api/resources/identity/client/Client.d.ts +11 -6
  202. package/dist/api/resources/identity/client/Client.js +31 -24
  203. package/dist/api/resources/index.js +7 -17
  204. package/dist/api/resources/jobs/client/Client.d.ts +15 -8
  205. package/dist/api/resources/jobs/client/Client.js +35 -26
  206. package/dist/api/resources/modelSync/client/Client.d.ts +110 -19
  207. package/dist/api/resources/modelSync/client/Client.js +287 -118
  208. package/dist/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -1
  209. package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +3 -0
  210. package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +3 -0
  211. package/dist/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -1
  212. package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +41 -12
  213. package/dist/api/resources/modelSync/resources/executions/client/Client.js +115 -56
  214. package/dist/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +1 -1
  215. package/dist/api/resources/modelSync/resources/index.js +7 -17
  216. package/dist/api/resources/modelSync/resources/targets/client/Client.d.ts +28 -11
  217. package/dist/api/resources/modelSync/resources/targets/client/Client.js +89 -49
  218. package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts +6 -0
  219. package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts +6 -0
  220. package/dist/api/resources/models/client/Client.d.ts +79 -8
  221. package/dist/api/resources/models/client/Client.js +214 -86
  222. package/dist/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +3 -0
  223. package/dist/api/resources/notifications/client/Client.d.ts +13 -5
  224. package/dist/api/resources/notifications/client/Client.js +48 -31
  225. package/dist/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +1 -0
  226. package/dist/api/resources/organization/client/Client.d.ts +31 -13
  227. package/dist/api/resources/organization/client/Client.js +109 -55
  228. package/dist/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +6 -0
  229. package/dist/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +6 -0
  230. package/dist/api/resources/permissions/client/Client.d.ts +2 -7
  231. package/dist/api/resources/permissions/resources/index.js +7 -17
  232. package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +33 -5
  233. package/dist/api/resources/permissions/resources/policies/client/Client.js +105 -47
  234. package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +38 -5
  235. package/dist/api/resources/permissions/resources/roles/client/Client.js +110 -47
  236. package/dist/api/resources/queryRunner/client/Client.d.ts +26 -7
  237. package/dist/api/resources/queryRunner/client/Client.js +63 -35
  238. package/dist/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +3 -0
  239. package/dist/api/resources/schemas/client/Client.d.ts +118 -23
  240. package/dist/api/resources/schemas/client/Client.js +232 -86
  241. package/dist/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +1 -0
  242. package/dist/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +1 -0
  243. package/dist/api/resources/users/client/Client.d.ts +44 -16
  244. package/dist/api/resources/users/client/Client.js +133 -66
  245. package/dist/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +3 -0
  246. package/dist/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +3 -0
  247. package/dist/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +3 -0
  248. package/dist/api/resources/webhooks/client/Client.d.ts +67 -21
  249. package/dist/api/resources/webhooks/client/Client.js +165 -75
  250. package/dist/api/types/ApiKeyResponse.d.ts +1 -0
  251. package/dist/api/types/BulkBulkSyncSchedule.d.ts +1 -0
  252. package/dist/api/types/BulkDiscover.d.ts +1 -1
  253. package/dist/api/types/BulkExecutionStatus.d.ts +1 -1
  254. package/dist/api/types/BulkFetchMode.d.ts +1 -1
  255. package/dist/api/types/BulkNormalizeNames.d.ts +1 -1
  256. package/dist/api/types/BulkOutputDisposition.d.ts +9 -0
  257. package/dist/api/types/BulkOutputDisposition.js +11 -0
  258. package/dist/api/types/BulkResyncMode.d.ts +9 -0
  259. package/dist/api/types/BulkResyncMode.js +11 -0
  260. package/dist/api/types/BulkScheduleSyncMode.d.ts +1 -1
  261. package/dist/api/types/BulkSchema.d.ts +2 -0
  262. package/dist/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
  263. package/dist/api/types/BulkSchemaExecutionStatus.js +1 -0
  264. package/dist/api/types/BulkSelectiveMode.d.ts +1 -1
  265. package/dist/api/types/BulkSyncDest.d.ts +2 -0
  266. package/dist/api/types/BulkSyncExecution.d.ts +1 -0
  267. package/dist/api/types/BulkSyncExecutionStatus.d.ts +3 -0
  268. package/dist/api/types/BulkSyncIngestionStatus.d.ts +14 -0
  269. package/{version.js → dist/api/types/BulkSyncIngestionStatus.js} +3 -2
  270. package/dist/api/types/BulkSyncMode.d.ts +1 -1
  271. package/dist/api/types/BulkSyncResponse.d.ts +2 -2
  272. package/dist/api/types/BulkSyncSchemaExecutionStatus.d.ts +7 -0
  273. package/dist/api/types/BulkSyncSource.d.ts +1 -0
  274. package/dist/api/types/BulkSyncStatusResponse.d.ts +1 -0
  275. package/dist/api/types/ConnectCardResponse.d.ts +1 -0
  276. package/dist/api/types/ConnectionResponseSchema.d.ts +2 -2
  277. package/dist/api/types/Event.d.ts +4 -0
  278. package/dist/api/types/EventBody.d.ts +1 -1
  279. package/dist/api/types/ExecutionStatus.d.ts +1 -1
  280. package/dist/api/types/FilterFieldReferenceType.d.ts +1 -1
  281. package/dist/api/types/FilterFunction.d.ts +1 -1
  282. package/dist/api/types/GetIdentityResponseSchema.d.ts +2 -0
  283. package/dist/api/types/IngestionStatusLevel.d.ts +12 -0
  284. package/dist/api/types/IngestionStatusLevel.js +11 -0
  285. package/dist/api/types/JobResponse.d.ts +3 -0
  286. package/dist/api/types/JsonschemaDefinitions.d.ts +1 -1
  287. package/dist/api/types/JsonschemaForm.d.ts +1 -1
  288. package/dist/api/types/LabelLabel.d.ts +1 -1
  289. package/dist/api/types/ModelField.d.ts +1 -1
  290. package/dist/api/types/ModelResponse.d.ts +2 -2
  291. package/dist/api/types/ModelSyncMode.d.ts +2 -1
  292. package/dist/api/types/ModelSyncMode.js +1 -0
  293. package/dist/api/types/ModelSyncResponse.d.ts +2 -2
  294. package/dist/api/types/ModelSyncSourceMetaResponse.d.ts +3 -0
  295. package/dist/api/types/Organization.d.ts +5 -0
  296. package/dist/api/types/{CommonOutputActor.d.ts → OutputActor.d.ts} +1 -1
  297. package/dist/api/types/OutputActor.js +5 -0
  298. package/dist/api/types/ScheduleFrequency.d.ts +1 -1
  299. package/dist/api/types/SchemaIdentityFunction.d.ts +1 -1
  300. package/dist/api/types/SourceMeta.d.ts +3 -0
  301. package/dist/api/types/TypesType.d.ts +1 -1
  302. package/dist/api/types/User.d.ts +5 -0
  303. package/dist/api/types/UtilFieldType.d.ts +1 -1
  304. package/dist/api/types/V2EnricherConfiguration.d.ts +1 -1
  305. package/dist/api/types/V2EnricherMapping.d.ts +1 -1
  306. package/dist/api/types/V2ExecutionLogType.d.ts +1 -1
  307. package/dist/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
  308. package/dist/api/types/V2SampleRecord.d.ts +1 -1
  309. package/dist/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
  310. package/dist/api/types/V3BulkSyncSourceCapabilities.d.ts +6 -0
  311. package/dist/api/types/V3BulkSyncSourceCapabilities.js +5 -0
  312. package/dist/api/types/V4BulkSyncExecutionLogs.d.ts +6 -1
  313. package/dist/api/types/V4BulkSyncScheduleApi.d.ts +5 -0
  314. package/dist/api/types/V4ExportSyncLogsResponse.d.ts +1 -0
  315. package/dist/api/types/V4GlobalErrorSubscribersResponse.d.ts +1 -0
  316. package/dist/api/types/V4RunQueryResult.d.ts +2 -1
  317. package/dist/api/types/V4UserFieldRequest.d.ts +4 -0
  318. package/dist/api/types/WorkTaskStatus.d.ts +1 -1
  319. package/dist/api/types/index.d.ts +11 -6
  320. package/dist/api/types/index.js +11 -6
  321. package/dist/core/auth/BearerToken.d.ts +1 -1
  322. package/dist/core/fetcher/APIResponse.d.ts +1 -1
  323. package/dist/core/fetcher/Fetcher.d.ts +3 -6
  324. package/dist/core/fetcher/Fetcher.js +189 -20
  325. package/dist/core/fetcher/Supplier.d.ts +1 -1
  326. package/dist/core/fetcher/getHeader.js +2 -1
  327. package/dist/core/runtime/runtime.d.ts +1 -2
  328. package/dist/core/runtime/runtime.js +41 -52
  329. package/dist/environments.d.ts +1 -1
  330. package/dist/errors/PolytomicError.js +1 -2
  331. package/dist/errors/PolytomicTimeoutError.d.ts +1 -1
  332. package/dist/errors/PolytomicTimeoutError.js +2 -2
  333. package/dist/index.js +7 -17
  334. package/environments.d.ts +1 -1
  335. package/errors/PolytomicError.js +1 -2
  336. package/errors/PolytomicTimeoutError.d.ts +1 -1
  337. package/errors/PolytomicTimeoutError.js +2 -2
  338. package/index.js +7 -17
  339. package/{jest.config.mjs → jest.config.js} +1 -4
  340. package/package.json +17 -18
  341. package/core/fetcher/createRequestUrl.d.ts +0 -1
  342. package/core/fetcher/createRequestUrl.js +0 -12
  343. package/core/fetcher/getFetchFn.d.ts +0 -4
  344. package/core/fetcher/getFetchFn.js +0 -68
  345. package/core/fetcher/getRequestBody.d.ts +0 -7
  346. package/core/fetcher/getRequestBody.js +0 -23
  347. package/core/fetcher/getResponseBody.d.ts +0 -1
  348. package/core/fetcher/getResponseBody.js +0 -54
  349. package/core/fetcher/makeRequest.d.ts +0 -1
  350. package/core/fetcher/makeRequest.js +0 -42
  351. package/core/fetcher/requestWithRetries.d.ts +0 -1
  352. package/core/fetcher/requestWithRetries.js +0 -40
  353. package/core/fetcher/signals.d.ts +0 -11
  354. package/core/fetcher/signals.js +0 -36
  355. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  356. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
  357. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  358. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
  359. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  360. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
  361. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  362. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
  363. package/core/json.d.ts +0 -15
  364. package/core/json.js +0 -24
  365. package/dist/core/fetcher/createRequestUrl.d.ts +0 -1
  366. package/dist/core/fetcher/createRequestUrl.js +0 -12
  367. package/dist/core/fetcher/getFetchFn.d.ts +0 -4
  368. package/dist/core/fetcher/getFetchFn.js +0 -68
  369. package/dist/core/fetcher/getRequestBody.d.ts +0 -7
  370. package/dist/core/fetcher/getRequestBody.js +0 -23
  371. package/dist/core/fetcher/getResponseBody.d.ts +0 -1
  372. package/dist/core/fetcher/getResponseBody.js +0 -54
  373. package/dist/core/fetcher/makeRequest.d.ts +0 -1
  374. package/dist/core/fetcher/makeRequest.js +0 -42
  375. package/dist/core/fetcher/requestWithRetries.d.ts +0 -1
  376. package/dist/core/fetcher/requestWithRetries.js +0 -40
  377. package/dist/core/fetcher/signals.d.ts +0 -11
  378. package/dist/core/fetcher/signals.js +0 -36
  379. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  380. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
  381. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  382. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
  383. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  384. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
  385. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  386. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
  387. package/dist/core/json.d.ts +0 -15
  388. package/dist/core/json.js +0 -24
  389. package/dist/version.d.ts +0 -1
  390. package/reference.md +0 -6663
  391. package/scripts/rename-to-esm-files.js +0 -115
  392. package/version.d.ts +0 -1
  393. /package/api/types/{CommonOutputActor.js → BulkSyncIngestionStatus.js} +0 -0
  394. /package/{dist/api/types/CommonOutputActor.js → api/types/OutputActor.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) {
@@ -61,19 +51,20 @@ class BulkSync {
61
51
  constructor(_options) {
62
52
  this._options = _options;
63
53
  }
64
- get executions() {
65
- var _a;
66
- return ((_a = this._executions) !== null && _a !== void 0 ? _a : (this._executions = new Client_1.Executions(this._options)));
67
- }
68
- get schemas() {
69
- var _a;
70
- return ((_a = this._schemas) !== null && _a !== void 0 ? _a : (this._schemas = new Client_2.Schemas(this._options)));
71
- }
72
- get schedules() {
73
- var _a;
74
- return ((_a = this._schedules) !== null && _a !== void 0 ? _a : (this._schedules = new Client_3.Schedules(this._options)));
75
- }
76
54
  /**
55
+ * Lists bulk syncs in the caller's organization.
56
+ *
57
+ * Results are returned as a single `data` array. This version of the endpoint
58
+ * supports the `active` filter but does not support cursor pagination, `limit`,
59
+ * or `page_token` query parameters.
60
+ *
61
+ * If you need a cursor-paginated bulk sync list, use API version `2025-09-18` or
62
+ * later.
63
+ *
64
+ * > 📘 To retrieve a specific sync, use
65
+ * > [`GET /api/bulk/syncs/{id}`](../../../api-reference/bulk-sync/get)
66
+ * > instead of filtering the list client-side.
67
+ *
77
68
  * @param {Polytomic.BulkSyncListRequest} request
78
69
  * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
79
70
  *
@@ -85,23 +76,30 @@ class BulkSync {
85
76
  * active: true
86
77
  * })
87
78
  */
88
- list() {
89
- return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
90
- var _a, _b;
79
+ list(request = {}, requestOptions) {
80
+ var _a;
81
+ return __awaiter(this, void 0, void 0, function* () {
91
82
  const { active } = request;
92
83
  const _queryParams = {};
93
84
  if (active != null) {
94
85
  _queryParams["active"] = active.toString();
95
86
  }
96
87
  const _response = yield core.fetcher({
97
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/bulk/syncs"),
88
+ 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"),
98
89
  method: "GET",
99
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
90
+ headers: {
91
+ Authorization: yield this._getAuthorizationHeader(),
92
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
100
93
  ? yield core.Supplier.get(this._options.version)
101
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
94
+ : undefined,
95
+ "X-Fern-Language": "JavaScript",
96
+ "X-Fern-SDK-Name": "polytomic",
97
+ "X-Fern-SDK-Version": "1.18.1",
98
+ "X-Fern-Runtime": core.RUNTIME.type,
99
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
100
+ },
102
101
  contentType: "application/json",
103
102
  queryParameters: _queryParams,
104
- requestType: "json",
105
103
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
106
104
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
107
105
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -129,7 +127,7 @@ class BulkSync {
129
127
  body: _response.error.rawBody,
130
128
  });
131
129
  case "timeout":
132
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/bulk/syncs.");
130
+ throw new errors.PolytomicTimeoutError();
133
131
  case "unknown":
134
132
  throw new errors.PolytomicError({
135
133
  message: _response.error.errorMessage,
@@ -138,9 +136,9 @@ class BulkSync {
138
136
  });
139
137
  }
140
138
  /**
141
- * Create a new Bulk Sync from a source to a destination (data warehouse, database, or cloud storage bucket like S3).
139
+ * Creates a new bulk sync from a source connection to a destination connection.
142
140
  *
143
- * Bulk Syncs are used for the ELT pattern (Extract, Load, and Transform), where you want to sync un-transformed data to your data warehouses, databases, or cloud storage buckets like S3.
141
+ * Bulk syncs are used for the ELT pattern (Extract, Load, and Transform), where you want to sync un-transformed data to your data warehouses, databases, or cloud storage buckets like S3.
144
142
  *
145
143
  * All of the functionality described in [the product
146
144
  * documentation](https://docs.polytomic.com/docs/bulk-syncs) is configurable via
@@ -148,9 +146,9 @@ class BulkSync {
148
146
  *
149
147
  * Sample code examples:
150
148
  *
151
- * - [Bulk sync (ELT) from Salesforce to S3](https://apidocs.polytomic.com/guides/code-examples/bulk-sync-elt-from-salesforce-to-s-3)
152
- * - [Bulk sync (ELT) from Salesforce to Snowflake](https://apidocs.polytomic.com/guides/code-examples/bulk-sync-elt-from-salesforce-to-snowflake)
153
- * - [Bulk sync (ELT) from HubSpot to PostgreSQL](https://apidocs.polytomic.com/guides/code-examples/bulk-sync-elt-from-hub-spot-to-postgre-sql)
149
+ * - [Bulk sync (ELT) from Salesforce to S3](../../../guides/code-examples/bulk-sync-elt-from-salesforce-to-s-3)
150
+ * - [Bulk sync (ELT) from Salesforce to Snowflake](../../../guides/code-examples/bulk-sync-elt-from-salesforce-to-snowflake)
151
+ * - [Bulk sync (ELT) from HubSpot to PostgreSQL](../../../guides/code-examples/bulk-sync-elt-from-hub-spot-to-postgre-sql)
154
152
  *
155
153
  * ## Connection specific configuration
156
154
  *
@@ -162,8 +160,24 @@ class BulkSync {
162
160
  * Polytomic reads data from the source connection. This will not be available for
163
161
  * integrations that do not support additional configuration.
164
162
  *
165
- * Consult the [connection configurations](https://apidocs.polytomic.com/2024-02-08/guides/configuring-your-connections/overview)
166
- * to see configurations for particular integrations (for example, [here](https://apidocs.polytomic.com/2024-02-08/guides/configuring-your-connections/connections/postgre-sql#source-1) is the available source configuration for the PostgreSQL bulk sync source).
163
+ * Consult the [connection configurations](../../../guides/configuring-your-connections/overview)
164
+ * to see configurations for particular integrations (for example, [here](../../../guides/configuring-your-connections/connections/postgre-sql#source-1) is the available source configuration for the PostgreSQL bulk sync source).
165
+ *
166
+ * ## Defaults and selection behavior
167
+ *
168
+ * If `schemas` is omitted, the sync is created with all available source schemas
169
+ * selected. Pass `schemas` explicitly if you want the initial sync to include
170
+ * only a subset of tables or objects.
171
+ *
172
+ * Schedule times are interpreted in UTC.
173
+ *
174
+ * When omitted, automatic discovery defaults are conservative:
175
+ *
176
+ * - `automatically_add_new_objects` defaults to not enabling newly discovered
177
+ * source objects automatically.
178
+ * - `automatically_add_new_fields` defaults to enabling newly discovered fields
179
+ * on already selected objects.
180
+ * - `normalize_names` defaults to enabled.
167
181
  *
168
182
  * @param {Polytomic.CreateBulkSyncRequest} request
169
183
  * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
@@ -182,22 +196,29 @@ class BulkSync {
182
196
  * destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
183
197
  * name: "My Bulk Sync",
184
198
  * schedule: {
185
- * frequency: "manual"
199
+ * frequency: Polytomic.ScheduleFrequency.Manual
186
200
  * },
187
201
  * source_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
188
202
  * })
189
203
  */
190
204
  create(request, requestOptions) {
205
+ var _a;
191
206
  return __awaiter(this, void 0, void 0, function* () {
192
- var _a, _b;
193
207
  const _response = yield core.fetcher({
194
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/bulk/syncs"),
208
+ 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"),
195
209
  method: "POST",
196
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
210
+ headers: {
211
+ Authorization: yield this._getAuthorizationHeader(),
212
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
197
213
  ? yield core.Supplier.get(this._options.version)
198
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
214
+ : undefined,
215
+ "X-Fern-Language": "JavaScript",
216
+ "X-Fern-SDK-Name": "polytomic",
217
+ "X-Fern-SDK-Version": "1.18.1",
218
+ "X-Fern-Runtime": core.RUNTIME.type,
219
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
220
+ },
199
221
  contentType: "application/json",
200
- requestType: "json",
201
222
  body: request,
202
223
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
203
224
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -232,7 +253,7 @@ class BulkSync {
232
253
  body: _response.error.rawBody,
233
254
  });
234
255
  case "timeout":
235
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/bulk/syncs.");
256
+ throw new errors.PolytomicTimeoutError();
236
257
  case "unknown":
237
258
  throw new errors.PolytomicError({
238
259
  message: _response.error.errorMessage,
@@ -241,6 +262,16 @@ class BulkSync {
241
262
  });
242
263
  }
243
264
  /**
265
+ * Returns a single bulk sync by ID.
266
+ *
267
+ * The response includes the sync's top-level configuration — source, destination,
268
+ * schedules, and discovery settings.
269
+ *
270
+ * - To check whether the sync is running and see the most-recent execution result,
271
+ * use [`GET /api/bulk/syncs/{id}/status`](../../../../api-reference/bulk-sync/get-status).
272
+ * - To inspect which schemas are selected and how they are configured, use
273
+ * [`GET /api/bulk/syncs/{id}/schemas`](../../../../api-reference/bulk-sync/schemas/list).
274
+ *
244
275
  * @param {string} id
245
276
  * @param {Polytomic.BulkSyncGetRequest} request
246
277
  * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
@@ -253,23 +284,30 @@ class BulkSync {
253
284
  * refresh_schemas: true
254
285
  * })
255
286
  */
256
- get(id_1) {
257
- return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
258
- var _a, _b;
287
+ get(id, request = {}, requestOptions) {
288
+ var _a;
289
+ return __awaiter(this, void 0, void 0, function* () {
259
290
  const { refresh_schemas: refreshSchemas } = request;
260
291
  const _queryParams = {};
261
292
  if (refreshSchemas != null) {
262
293
  _queryParams["refresh_schemas"] = refreshSchemas.toString();
263
294
  }
264
295
  const _response = yield core.fetcher({
265
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}`),
296
+ 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(id)}`),
266
297
  method: "GET",
267
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
298
+ headers: {
299
+ Authorization: yield this._getAuthorizationHeader(),
300
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
268
301
  ? yield core.Supplier.get(this._options.version)
269
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
302
+ : undefined,
303
+ "X-Fern-Language": "JavaScript",
304
+ "X-Fern-SDK-Name": "polytomic",
305
+ "X-Fern-SDK-Version": "1.18.1",
306
+ "X-Fern-Runtime": core.RUNTIME.type,
307
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
308
+ },
270
309
  contentType: "application/json",
271
310
  queryParameters: _queryParams,
272
- requestType: "json",
273
311
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
274
312
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
275
313
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -297,7 +335,7 @@ class BulkSync {
297
335
  body: _response.error.rawBody,
298
336
  });
299
337
  case "timeout":
300
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/bulk/syncs/{id}.");
338
+ throw new errors.PolytomicTimeoutError();
301
339
  case "unknown":
302
340
  throw new errors.PolytomicError({
303
341
  message: _response.error.errorMessage,
@@ -306,9 +344,41 @@ class BulkSync {
306
344
  });
307
345
  }
308
346
  /**
347
+ * Updates an existing bulk sync's top-level configuration.
348
+ *
349
+ * Updating a bulk sync is a **full replacement** of the sync's top-level
350
+ * configuration. Every field in the request body is written to the sync; any
351
+ * field you omit is cleared or reset to its default value.
352
+ *
353
+ * To make a partial change — for example, toggling `active` or swapping a
354
+ * schedule — fetch the current sync with
355
+ * [`GET /api/bulk/syncs/{id}`](../../../../api-reference/bulk-sync/get),
356
+ * modify the fields you want to change, and send the complete object back in
357
+ * the update request.
358
+ *
359
+ * Updates to `active`, `schedules`, and `policies` take effect immediately.
360
+ * Changes to source or destination configuration take effect on the sync's
361
+ * next execution.
362
+ *
363
+ * Because omitted fields are reset to their defaults, the discovery and
364
+ * naming options behave the same as on create when left out:
365
+ *
366
+ * - `automatically_add_new_objects` resets to not enabling newly discovered
367
+ * source objects automatically.
368
+ * - `automatically_add_new_fields` resets to enabling newly discovered
369
+ * fields on already selected objects.
370
+ * - `normalize_names` resets to enabled.
371
+ *
372
+ * Send the existing values explicitly if you want to preserve a non-default or
373
+ * non-empty setting, including schema and field selections.
374
+ *
309
375
  * > 📘 Updating schemas
310
376
  * >
311
- * > Schema updates can be performed using the [Update Bulk Sync Schemas](https://apidocs.polytomic.com/api-reference/bulk-sync/schemas/patch) endpoint.
377
+ * > Schema updates are not performed through this endpoint. Use the
378
+ * > [Update Bulk Sync Schemas](../../../../api-reference/bulk-sync/schemas/patch)
379
+ * > endpoint to change a subset of schemas, or
380
+ * > [Update Bulk Sync Schema](../../../../api-reference/bulk-sync/schemas/update)
381
+ * > to replace a single schema's configuration.
312
382
  *
313
383
  * @param {string} id
314
384
  * @param {Polytomic.UpdateBulkSyncRequest} request
@@ -328,22 +398,29 @@ class BulkSync {
328
398
  * destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
329
399
  * name: "My Bulk Sync",
330
400
  * schedule: {
331
- * frequency: "manual"
401
+ * frequency: Polytomic.ScheduleFrequency.Manual
332
402
  * },
333
403
  * source_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
334
404
  * })
335
405
  */
336
406
  update(id, request, requestOptions) {
407
+ var _a;
337
408
  return __awaiter(this, void 0, void 0, function* () {
338
- var _a, _b;
339
409
  const _response = yield core.fetcher({
340
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}`),
410
+ 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(id)}`),
341
411
  method: "PUT",
342
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
412
+ headers: {
413
+ Authorization: yield this._getAuthorizationHeader(),
414
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
343
415
  ? yield core.Supplier.get(this._options.version)
344
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
416
+ : undefined,
417
+ "X-Fern-Language": "JavaScript",
418
+ "X-Fern-SDK-Name": "polytomic",
419
+ "X-Fern-SDK-Version": "1.18.1",
420
+ "X-Fern-Runtime": core.RUNTIME.type,
421
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
422
+ },
345
423
  contentType: "application/json",
346
- requestType: "json",
347
424
  body: request,
348
425
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
349
426
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -378,7 +455,7 @@ class BulkSync {
378
455
  body: _response.error.rawBody,
379
456
  });
380
457
  case "timeout":
381
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling PUT /api/bulk/syncs/{id}.");
458
+ throw new errors.PolytomicTimeoutError();
382
459
  case "unknown":
383
460
  throw new errors.PolytomicError({
384
461
  message: _response.error.errorMessage,
@@ -387,6 +464,14 @@ class BulkSync {
387
464
  });
388
465
  }
389
466
  /**
467
+ * Deletes a bulk sync, cancelling any running executions.
468
+ *
469
+ * Any execution that is currently running is cancelled before the sync record is
470
+ * removed.
471
+ *
472
+ * > 🚧 All associated schedules, schema configurations, and execution history are
473
+ * > deleted along with the sync.
474
+ *
390
475
  * @param {string} id
391
476
  * @param {Polytomic.BulkSyncRemoveRequest} request
392
477
  * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
@@ -401,23 +486,30 @@ class BulkSync {
401
486
  * refresh_schemas: true
402
487
  * })
403
488
  */
404
- remove(id_1) {
405
- return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
406
- var _a, _b;
489
+ remove(id, request = {}, requestOptions) {
490
+ var _a;
491
+ return __awaiter(this, void 0, void 0, function* () {
407
492
  const { refresh_schemas: refreshSchemas } = request;
408
493
  const _queryParams = {};
409
494
  if (refreshSchemas != null) {
410
495
  _queryParams["refresh_schemas"] = refreshSchemas.toString();
411
496
  }
412
497
  const _response = yield core.fetcher({
413
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}`),
498
+ 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(id)}`),
414
499
  method: "DELETE",
415
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
500
+ headers: {
501
+ Authorization: yield this._getAuthorizationHeader(),
502
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
416
503
  ? yield core.Supplier.get(this._options.version)
417
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
504
+ : undefined,
505
+ "X-Fern-Language": "JavaScript",
506
+ "X-Fern-SDK-Name": "polytomic",
507
+ "X-Fern-SDK-Version": "1.18.1",
508
+ "X-Fern-Runtime": core.RUNTIME.type,
509
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
510
+ },
418
511
  contentType: "application/json",
419
512
  queryParameters: _queryParams,
420
- requestType: "json",
421
513
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
422
514
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
423
515
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -449,7 +541,7 @@ class BulkSync {
449
541
  body: _response.error.rawBody,
450
542
  });
451
543
  case "timeout":
452
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling DELETE /api/bulk/syncs/{id}.");
544
+ throw new errors.PolytomicTimeoutError();
453
545
  case "unknown":
454
546
  throw new errors.PolytomicError({
455
547
  message: _response.error.errorMessage,
@@ -458,6 +550,17 @@ class BulkSync {
458
550
  });
459
551
  }
460
552
  /**
553
+ * Sets whether a bulk sync is active.
554
+ *
555
+ * Only active syncs are eligible to execute on their configured schedule.
556
+ * Deactivating a sync prevents future scheduled runs and requests cancellation of
557
+ * any execution that is currently in progress.
558
+ *
559
+ * > 📘 To start or stop a running execution directly, use
560
+ * > [`POST /api/bulk/syncs/{id}/executions`](../../../../../api-reference/bulk-sync/start)
561
+ * > or
562
+ * > [`POST /api/bulk/syncs/{id}/cancel`](../../../../../api-reference/bulk-sync/cancel).
563
+ *
461
564
  * @param {string} id
462
565
  * @param {Polytomic.ActivateSyncInput} request
463
566
  * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
@@ -473,16 +576,23 @@ class BulkSync {
473
576
  * })
474
577
  */
475
578
  activate(id, request, requestOptions) {
579
+ var _a;
476
580
  return __awaiter(this, void 0, void 0, function* () {
477
- var _a, _b;
478
581
  const _response = yield core.fetcher({
479
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}/activate`),
582
+ 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(id)}/activate`),
480
583
  method: "POST",
481
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
584
+ headers: {
585
+ Authorization: yield this._getAuthorizationHeader(),
586
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
482
587
  ? yield core.Supplier.get(this._options.version)
483
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
588
+ : undefined,
589
+ "X-Fern-Language": "JavaScript",
590
+ "X-Fern-SDK-Name": "polytomic",
591
+ "X-Fern-SDK-Version": "1.18.1",
592
+ "X-Fern-Runtime": core.RUNTIME.type,
593
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
594
+ },
484
595
  contentType: "application/json",
485
- requestType: "json",
486
596
  body: request,
487
597
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
488
598
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -515,7 +625,7 @@ class BulkSync {
515
625
  body: _response.error.rawBody,
516
626
  });
517
627
  case "timeout":
518
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/bulk/syncs/{id}/activate.");
628
+ throw new errors.PolytomicTimeoutError();
519
629
  case "unknown":
520
630
  throw new errors.PolytomicError({
521
631
  message: _response.error.errorMessage,
@@ -524,6 +634,14 @@ class BulkSync {
524
634
  });
525
635
  }
526
636
  /**
637
+ * Requests cancellation of any running executions on a bulk sync.
638
+ *
639
+ * Cancellation is asynchronous. A successful response means the cancellation
640
+ * signal has been queued; the running execution continues until the signal is
641
+ * processed. Poll `GET /api/bulk/syncs/{id}/status` until the current execution
642
+ * reaches a terminal state (`completed`, `canceled`, or `failed`) to confirm
643
+ * cancellation has taken effect.
644
+ *
527
645
  * @param {string} id - The active execution of this bulk sync ID will be cancelled.
528
646
  * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
529
647
  *
@@ -536,16 +654,23 @@ class BulkSync {
536
654
  * await client.bulkSync.cancel("248df4b7-aa70-47b8-a036-33ac447e668d")
537
655
  */
538
656
  cancel(id, requestOptions) {
657
+ var _a;
539
658
  return __awaiter(this, void 0, void 0, function* () {
540
- var _a, _b;
541
659
  const _response = yield core.fetcher({
542
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}/cancel`),
660
+ 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(id)}/cancel`),
543
661
  method: "POST",
544
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
662
+ headers: {
663
+ Authorization: yield this._getAuthorizationHeader(),
664
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
545
665
  ? yield core.Supplier.get(this._options.version)
546
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
666
+ : undefined,
667
+ "X-Fern-Language": "JavaScript",
668
+ "X-Fern-SDK-Name": "polytomic",
669
+ "X-Fern-SDK-Version": "1.18.1",
670
+ "X-Fern-Runtime": core.RUNTIME.type,
671
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
672
+ },
547
673
  contentType: "application/json",
548
- requestType: "json",
549
674
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
550
675
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
551
676
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -577,7 +702,7 @@ class BulkSync {
577
702
  body: _response.error.rawBody,
578
703
  });
579
704
  case "timeout":
580
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/bulk/syncs/{id}/cancel.");
705
+ throw new errors.PolytomicTimeoutError();
581
706
  case "unknown":
582
707
  throw new errors.PolytomicError({
583
708
  message: _response.error.errorMessage,
@@ -586,7 +711,24 @@ class BulkSync {
586
711
  });
587
712
  }
588
713
  /**
589
- * @param {string} id
714
+ * Starts a new execution of a bulk sync.
715
+ *
716
+ * This endpoint returns the execution record immediately after the run is queued
717
+ * or started. Use the execution ID with the bulk-sync execution endpoints if you
718
+ * need to monitor progress in detail.
719
+ *
720
+ * ## Execution modes
721
+ *
722
+ * - Set `test=true` to validate the sync without writing to the destination.
723
+ * - Use `resync_mode` for destructive or full-refresh style reruns.
724
+ * - `test` and `resync_mode` are mutually exclusive.
725
+ *
726
+ * The legacy `resync` boolean is no longer accepted on this v5 endpoint. Send
727
+ * `resync_mode` instead.
728
+ *
729
+ * If another execution is already running, the endpoint returns `409 Conflict`.
730
+ *
731
+ * @param {string} id - Unique identifier of the bulk sync.
590
732
  * @param {Polytomic.StartBulkSyncRequest} request
591
733
  * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
592
734
  *
@@ -597,17 +739,24 @@ class BulkSync {
597
739
  * @example
598
740
  * await client.bulkSync.start("248df4b7-aa70-47b8-a036-33ac447e668d")
599
741
  */
600
- start(id_1) {
601
- return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
602
- var _a, _b;
742
+ start(id, request = {}, requestOptions) {
743
+ var _a;
744
+ return __awaiter(this, void 0, void 0, function* () {
603
745
  const _response = yield core.fetcher({
604
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}/executions`),
746
+ 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(id)}/executions`),
605
747
  method: "POST",
606
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
748
+ headers: {
749
+ Authorization: yield this._getAuthorizationHeader(),
750
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
607
751
  ? yield core.Supplier.get(this._options.version)
608
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
752
+ : undefined,
753
+ "X-Fern-Language": "JavaScript",
754
+ "X-Fern-SDK-Name": "polytomic",
755
+ "X-Fern-SDK-Version": "1.18.1",
756
+ "X-Fern-Runtime": core.RUNTIME.type,
757
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
758
+ },
609
759
  contentType: "application/json",
610
- requestType: "json",
611
760
  body: request,
612
761
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
613
762
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -638,7 +787,7 @@ class BulkSync {
638
787
  body: _response.error.rawBody,
639
788
  });
640
789
  case "timeout":
641
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/bulk/syncs/{id}/executions.");
790
+ throw new errors.PolytomicTimeoutError();
642
791
  case "unknown":
643
792
  throw new errors.PolytomicError({
644
793
  message: _response.error.errorMessage,
@@ -647,7 +796,19 @@ class BulkSync {
647
796
  });
648
797
  }
649
798
  /**
650
- * @param {string} id
799
+ * Returns the current status of a bulk sync.
800
+ *
801
+ * The response includes the sync's current active/inactive state together with
802
+ * information about the most recent execution — its status, start time, and any
803
+ * errors — making this endpoint well-suited for health checks and monitoring
804
+ * dashboards.
805
+ *
806
+ * For the complete execution history, use
807
+ * [`GET /api/bulk/syncs/{id}/executions`](../../../../../api-reference/bulk-sync/executions/list).
808
+ * For the full details of a specific run, including per-schema breakdowns, use
809
+ * [`GET /api/bulk/syncs/{id}/executions/{exec_id}`](../../../../../api-reference/bulk-sync/executions/get).
810
+ *
811
+ * @param {string} id - Unique identifier of the bulk sync.
651
812
  * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
652
813
  *
653
814
  * @throws {@link Polytomic.UnauthorizedError}
@@ -658,16 +819,23 @@ class BulkSync {
658
819
  * await client.bulkSync.getStatus("248df4b7-aa70-47b8-a036-33ac447e668d")
659
820
  */
660
821
  getStatus(id, requestOptions) {
822
+ var _a;
661
823
  return __awaiter(this, void 0, void 0, function* () {
662
- var _a, _b;
663
824
  const _response = yield core.fetcher({
664
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}/status`),
825
+ 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(id)}/status`),
665
826
  method: "GET",
666
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
827
+ headers: {
828
+ Authorization: yield this._getAuthorizationHeader(),
829
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
667
830
  ? yield core.Supplier.get(this._options.version)
668
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
831
+ : undefined,
832
+ "X-Fern-Language": "JavaScript",
833
+ "X-Fern-SDK-Name": "polytomic",
834
+ "X-Fern-SDK-Version": "1.18.1",
835
+ "X-Fern-Runtime": core.RUNTIME.type,
836
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
837
+ },
669
838
  contentType: "application/json",
670
- requestType: "json",
671
839
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
672
840
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
673
841
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -697,7 +865,7 @@ class BulkSync {
697
865
  body: _response.error.rawBody,
698
866
  });
699
867
  case "timeout":
700
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/bulk/syncs/{id}/status.");
868
+ throw new errors.PolytomicTimeoutError();
701
869
  case "unknown":
702
870
  throw new errors.PolytomicError({
703
871
  message: _response.error.errorMessage,
@@ -706,7 +874,22 @@ class BulkSync {
706
874
  });
707
875
  }
708
876
  /**
709
- * @param {string} id
877
+ * Lists the schemas (tables or objects) available on a connection for use as a bulk sync source, optionally including per-schema field details.
878
+ *
879
+ * The response reflects what the
880
+ * connection currently has cached; if the upstream source has changed, trigger
881
+ * a refresh first with
882
+ * [`POST /api/connections/{id}/schemas/refresh`](../../../../../api-reference/schemas/refresh).
883
+ *
884
+ * These are the schemas available for selection, not the schemas already
885
+ * configured on any particular sync. To inspect schemas on a running sync, use
886
+ * [`GET /api/bulk/syncs/{id}/schemas`](../../../../../api-reference/bulk-sync/schemas/list).
887
+ *
888
+ * Pass `include_fields=true` to receive per-schema field details in a single call.
889
+ * Omit it when you only need the schema list, as field enumeration can be slow for
890
+ * large sources.
891
+ *
892
+ * @param {string} id - Unique identifier of the connection.
710
893
  * @param {Polytomic.BulkSyncGetSourceRequest} request
711
894
  * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
712
895
  *
@@ -720,23 +903,30 @@ class BulkSync {
720
903
  * include_fields: true
721
904
  * })
722
905
  */
723
- getSource(id_1) {
724
- return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
725
- var _a, _b;
906
+ getSource(id, request = {}, requestOptions) {
907
+ var _a;
908
+ return __awaiter(this, void 0, void 0, function* () {
726
909
  const { include_fields: includeFields } = request;
727
910
  const _queryParams = {};
728
911
  if (includeFields != null) {
729
912
  _queryParams["include_fields"] = includeFields.toString();
730
913
  }
731
914
  const _response = yield core.fetcher({
732
- 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)}/bulksync/source`),
915
+ 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)}/bulksync/source`),
733
916
  method: "GET",
734
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
917
+ headers: {
918
+ Authorization: yield this._getAuthorizationHeader(),
919
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
735
920
  ? yield core.Supplier.get(this._options.version)
736
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
921
+ : undefined,
922
+ "X-Fern-Language": "JavaScript",
923
+ "X-Fern-SDK-Name": "polytomic",
924
+ "X-Fern-SDK-Version": "1.18.1",
925
+ "X-Fern-Runtime": core.RUNTIME.type,
926
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
927
+ },
737
928
  contentType: "application/json",
738
929
  queryParameters: _queryParams,
739
- requestType: "json",
740
930
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
741
931
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
742
932
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -768,7 +958,7 @@ class BulkSync {
768
958
  body: _response.error.rawBody,
769
959
  });
770
960
  case "timeout":
771
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}/bulksync/source.");
961
+ throw new errors.PolytomicTimeoutError();
772
962
  case "unknown":
773
963
  throw new errors.PolytomicError({
774
964
  message: _response.error.errorMessage,
@@ -777,6 +967,18 @@ class BulkSync {
777
967
  });
778
968
  }
779
969
  /**
970
+ * Describes the destination configuration schema a connection accepts when used as a bulk sync destination.
971
+ *
972
+ * The response is a JSON Schema object describing the shape of the
973
+ * `destination_configuration` field you must supply when
974
+ * [creating](../../../../../api-reference/bulk-sync/create) or
975
+ * [updating](../../../../../api-reference/bulk-sync/update) a bulk sync that uses this
976
+ * connection as its destination. Required fields vary by connection type.
977
+ *
978
+ * > 📘 Fetch this endpoint once per connection type rather than once per sync.
979
+ * > The configuration schema is the same for all syncs sharing the same
980
+ * > destination connection.
981
+ *
780
982
  * @param {string} id
781
983
  * @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
782
984
  *
@@ -789,16 +991,23 @@ class BulkSync {
789
991
  * await client.bulkSync.getDestination("248df4b7-aa70-47b8-a036-33ac447e668d")
790
992
  */
791
993
  getDestination(id, requestOptions) {
994
+ var _a;
792
995
  return __awaiter(this, void 0, void 0, function* () {
793
- var _a, _b;
794
996
  const _response = yield core.fetcher({
795
- 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)}/bulksync/target`),
997
+ 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)}/bulksync/target`),
796
998
  method: "GET",
797
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
999
+ headers: {
1000
+ Authorization: yield this._getAuthorizationHeader(),
1001
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
798
1002
  ? yield core.Supplier.get(this._options.version)
799
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1003
+ : undefined,
1004
+ "X-Fern-Language": "JavaScript",
1005
+ "X-Fern-SDK-Name": "polytomic",
1006
+ "X-Fern-SDK-Version": "1.18.1",
1007
+ "X-Fern-Runtime": core.RUNTIME.type,
1008
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1009
+ },
800
1010
  contentType: "application/json",
801
- requestType: "json",
802
1011
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
803
1012
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
804
1013
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -830,7 +1039,7 @@ class BulkSync {
830
1039
  body: _response.error.rawBody,
831
1040
  });
832
1041
  case "timeout":
833
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}/bulksync/target.");
1042
+ throw new errors.PolytomicTimeoutError();
834
1043
  case "unknown":
835
1044
  throw new errors.PolytomicError({
836
1045
  message: _response.error.errorMessage,
@@ -838,6 +1047,18 @@ class BulkSync {
838
1047
  }
839
1048
  });
840
1049
  }
1050
+ get executions() {
1051
+ var _a;
1052
+ return ((_a = this._executions) !== null && _a !== void 0 ? _a : (this._executions = new Client_1.Executions(this._options)));
1053
+ }
1054
+ get schemas() {
1055
+ var _a;
1056
+ return ((_a = this._schemas) !== null && _a !== void 0 ? _a : (this._schemas = new Client_2.Schemas(this._options)));
1057
+ }
1058
+ get schedules() {
1059
+ var _a;
1060
+ return ((_a = this._schedules) !== null && _a !== void 0 ? _a : (this._schedules = new Client_3.Schedules(this._options)));
1061
+ }
841
1062
  _getAuthorizationHeader() {
842
1063
  return __awaiter(this, void 0, void 0, function* () {
843
1064
  return `Bearer ${yield core.Supplier.get(this._options.token)}`;