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) {
@@ -59,6 +49,15 @@ class Connections {
59
49
  this._options = _options;
60
50
  }
61
51
  /**
52
+ * Lists all connection types supported by this deployment.
53
+ *
54
+ * Each entry includes per-type metadata:
55
+ *
56
+ * - The available operations the connection type supports.
57
+ * - Its category.
58
+ * - Whether the connection type is enabled for the caller's organization.
59
+ * - Which modes (source, destination, enrichment) it can act as.
60
+ *
62
61
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
63
62
  *
64
63
  * @throws {@link Polytomic.UnauthorizedError}
@@ -68,16 +67,23 @@ class Connections {
68
67
  * await client.connections.getTypes()
69
68
  */
70
69
  getTypes(requestOptions) {
70
+ var _a;
71
71
  return __awaiter(this, void 0, void 0, function* () {
72
- var _a, _b;
73
72
  const _response = yield core.fetcher({
74
- 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/connection_types"),
73
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connection_types"),
75
74
  method: "GET",
76
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
75
+ headers: {
76
+ Authorization: yield this._getAuthorizationHeader(),
77
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
77
78
  ? yield core.Supplier.get(this._options.version)
78
- : 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),
79
+ : undefined,
80
+ "X-Fern-Language": "JavaScript",
81
+ "X-Fern-SDK-Name": "polytomic",
82
+ "X-Fern-SDK-Version": "1.18.1",
83
+ "X-Fern-Runtime": core.RUNTIME.type,
84
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
85
+ },
79
86
  contentType: "application/json",
80
- requestType: "json",
81
87
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
82
88
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
83
89
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -105,7 +111,7 @@ class Connections {
105
111
  body: _response.error.rawBody,
106
112
  });
107
113
  case "timeout":
108
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connection_types.");
114
+ throw new errors.PolytomicTimeoutError();
109
115
  case "unknown":
110
116
  throw new errors.PolytomicError({
111
117
  message: _response.error.errorMessage,
@@ -114,7 +120,16 @@ class Connections {
114
120
  });
115
121
  }
116
122
  /**
117
- * @param {string} id
123
+ * Returns the JSON schema for a connection type.
124
+ *
125
+ * This schema is intended for building forms or validating configuration payloads
126
+ * client-side. It describes the structure Polytomic expects when you create or
127
+ * update a connection of the given type.
128
+ *
129
+ * The response is metadata about the shape of the configuration, not a live
130
+ * connection instance and not a set of current credential values.
131
+ *
132
+ * @param {string} id - Connection type identifier (e.g. postgresql, salesforce, hubspot).
118
133
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
119
134
  *
120
135
  * @throws {@link Polytomic.UnauthorizedError}
@@ -125,16 +140,23 @@ class Connections {
125
140
  * await client.connections.getConnectionTypeSchema("postgresql")
126
141
  */
127
142
  getConnectionTypeSchema(id, requestOptions) {
143
+ var _a;
128
144
  return __awaiter(this, void 0, void 0, function* () {
129
- var _a, _b;
130
145
  const _response = yield core.fetcher({
131
- 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/connection_types/${encodeURIComponent(id)}`),
146
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connection_types/${encodeURIComponent(id)}`),
132
147
  method: "GET",
133
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
148
+ headers: {
149
+ Authorization: yield this._getAuthorizationHeader(),
150
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
134
151
  ? yield core.Supplier.get(this._options.version)
135
- : 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),
152
+ : undefined,
153
+ "X-Fern-Language": "JavaScript",
154
+ "X-Fern-SDK-Name": "polytomic",
155
+ "X-Fern-SDK-Version": "1.18.1",
156
+ "X-Fern-Runtime": core.RUNTIME.type,
157
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
158
+ },
136
159
  contentType: "application/json",
137
- requestType: "json",
138
160
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
139
161
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
140
162
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -164,7 +186,7 @@ class Connections {
164
186
  body: _response.error.rawBody,
165
187
  });
166
188
  case "timeout":
167
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connection_types/{id}.");
189
+ throw new errors.PolytomicTimeoutError();
168
190
  case "unknown":
169
191
  throw new errors.PolytomicError({
170
192
  message: _response.error.errorMessage,
@@ -173,7 +195,17 @@ class Connections {
173
195
  });
174
196
  }
175
197
  /**
176
- * @param {string} type_
198
+ * Returns completion values for parameter fields on a connection type.
199
+ *
200
+ * This endpoint is useful during connection setup, before a connection exists or
201
+ * before you want to persist it. The supplied `parameters` are applied to a
202
+ * temporary in-memory connection shape and used to resolve dependent options.
203
+ *
204
+ * When an endpoint requires upstream authorization before it can return values,
205
+ * Polytomic returns an error instead of guessing. In that case, complete the
206
+ * authorization flow first and call the endpoint again.
207
+ *
208
+ * @param {string} type
177
209
  * @param {Polytomic.GetConnectionTypeParameterValuesRequestSchema} request
178
210
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
179
211
  *
@@ -187,17 +219,24 @@ class Connections {
187
219
  * field: "field"
188
220
  * })
189
221
  */
190
- getTypeParameterValues(type_, request, requestOptions) {
222
+ getTypeParameterValues(type, request, requestOptions) {
223
+ var _a;
191
224
  return __awaiter(this, void 0, void 0, function* () {
192
- var _a, _b;
193
225
  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/connection_types/${encodeURIComponent(type_)}/parameter_values`),
226
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connection_types/${encodeURIComponent(type)}/parameter_values`),
195
227
  method: "POST",
196
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
228
+ headers: {
229
+ Authorization: yield this._getAuthorizationHeader(),
230
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
197
231
  ? 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),
232
+ : undefined,
233
+ "X-Fern-Language": "JavaScript",
234
+ "X-Fern-SDK-Name": "polytomic",
235
+ "X-Fern-SDK-Version": "1.18.1",
236
+ "X-Fern-Runtime": core.RUNTIME.type,
237
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
238
+ },
199
239
  contentType: "application/json",
200
- requestType: "json",
201
240
  body: request,
202
241
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
203
242
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -230,7 +269,7 @@ class Connections {
230
269
  body: _response.error.rawBody,
231
270
  });
232
271
  case "timeout":
233
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/connection_types/{type}/parameter_values.");
272
+ throw new errors.PolytomicTimeoutError();
234
273
  case "unknown":
235
274
  throw new errors.PolytomicError({
236
275
  message: _response.error.errorMessage,
@@ -239,6 +278,17 @@ class Connections {
239
278
  });
240
279
  }
241
280
  /**
281
+ * Lists every connection in the caller's organization, with sensitive fields redacted.
282
+ *
283
+ * Sensitive configuration values — passwords, API tokens, private keys — are
284
+ * redacted from all responses. To understand which fields a connection type
285
+ * exposes, consult the parameter schema returned by
286
+ * [`GET /api/connection_types`](../../api-reference/connections/get-types).
287
+ *
288
+ * To inspect the data objects available on a specific connection, use
289
+ * [`POST /api/connections/{id}/schemas/refresh`](../../api-reference/schemas/refresh)
290
+ * followed by [`GET /api/connections/{id}/schemas/status`](../../api-reference/schemas/get-status).
291
+ *
242
292
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
243
293
  *
244
294
  * @throws {@link Polytomic.UnauthorizedError}
@@ -248,16 +298,23 @@ class Connections {
248
298
  * await client.connections.list()
249
299
  */
250
300
  list(requestOptions) {
301
+ var _a;
251
302
  return __awaiter(this, void 0, void 0, function* () {
252
- var _a, _b;
253
303
  const _response = yield core.fetcher({
254
- 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"),
304
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections"),
255
305
  method: "GET",
256
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
306
+ headers: {
307
+ Authorization: yield this._getAuthorizationHeader(),
308
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
257
309
  ? yield core.Supplier.get(this._options.version)
258
- : 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),
310
+ : undefined,
311
+ "X-Fern-Language": "JavaScript",
312
+ "X-Fern-SDK-Name": "polytomic",
313
+ "X-Fern-SDK-Version": "1.18.1",
314
+ "X-Fern-Runtime": core.RUNTIME.type,
315
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
316
+ },
259
317
  contentType: "application/json",
260
- requestType: "json",
261
318
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
262
319
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
263
320
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -285,7 +342,7 @@ class Connections {
285
342
  body: _response.error.rawBody,
286
343
  });
287
344
  case "timeout":
288
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections.");
345
+ throw new errors.PolytomicTimeoutError();
289
346
  case "unknown":
290
347
  throw new errors.PolytomicError({
291
348
  message: _response.error.errorMessage,
@@ -294,6 +351,18 @@ class Connections {
294
351
  });
295
352
  }
296
353
  /**
354
+ * Creates a new connection of the specified type.
355
+ *
356
+ * Use [`GET /api/connection_types`](../../api-reference/connections/get-types) to retrieve the
357
+ * list of available types and their parameter schemas. The `configuration`
358
+ * object is type-specific; consult the [integration
359
+ * guides](../../guides/configuring-your-connections/overview)
360
+ * for the required and optional fields for each type.
361
+ *
362
+ * > 📘 Polytomic validates the connection against the upstream service
363
+ * > immediately on creation. The request will fail if the credentials or
364
+ * > endpoint cannot be reached.
365
+ *
297
366
  * @param {Polytomic.CreateConnectionRequestSchema} request
298
367
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
299
368
  *
@@ -317,16 +386,23 @@ class Connections {
317
386
  * })
318
387
  */
319
388
  create(request, requestOptions) {
389
+ var _a;
320
390
  return __awaiter(this, void 0, void 0, function* () {
321
- var _a, _b;
322
391
  const _response = yield core.fetcher({
323
- 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"),
392
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections"),
324
393
  method: "POST",
325
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
394
+ headers: {
395
+ Authorization: yield this._getAuthorizationHeader(),
396
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
326
397
  ? yield core.Supplier.get(this._options.version)
327
- : 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),
398
+ : undefined,
399
+ "X-Fern-Language": "JavaScript",
400
+ "X-Fern-SDK-Name": "polytomic",
401
+ "X-Fern-SDK-Version": "1.18.1",
402
+ "X-Fern-Runtime": core.RUNTIME.type,
403
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
404
+ },
328
405
  contentType: "application/json",
329
- requestType: "json",
330
406
  body: request,
331
407
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
332
408
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -361,7 +437,7 @@ class Connections {
361
437
  body: _response.error.rawBody,
362
438
  });
363
439
  case "timeout":
364
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/connections.");
440
+ throw new errors.PolytomicTimeoutError();
365
441
  case "unknown":
366
442
  throw new errors.PolytomicError({
367
443
  message: _response.error.errorMessage,
@@ -370,15 +446,11 @@ class Connections {
370
446
  });
371
447
  }
372
448
  /**
373
- * Creates a new request for [Polytomic Connect](https://www.polytomic.com/connect).
374
- *
375
- * This endpoint configures a Polytomic Connect request and returns the URL to
376
- * redirect users to. This allows embedding Polytomic connection authorization in
377
- * other applications.
449
+ * Creates a Polytomic Connect session and returns a redirect URL that embeds the Connect modal.
378
450
  *
379
451
  * See also:
380
452
  *
381
- * - [Embedding authentication](https://apidocs.polytomic.com/2024-02-08/guides/embedding-authentication), a guide to using Polytomic Connect.
453
+ * - [Embedding authentication](../../../guides/embedding-authentication), a guide to using Polytomic Connect.
382
454
  *
383
455
  * @param {Polytomic.ConnectCardRequest} request
384
456
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
@@ -395,16 +467,23 @@ class Connections {
395
467
  * })
396
468
  */
397
469
  connect(request, requestOptions) {
470
+ var _a;
398
471
  return __awaiter(this, void 0, void 0, function* () {
399
- var _a, _b;
400
472
  const _response = yield core.fetcher({
401
- 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/connect/"),
473
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections/connect/"),
402
474
  method: "POST",
403
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
475
+ headers: {
476
+ Authorization: yield this._getAuthorizationHeader(),
477
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
404
478
  ? yield core.Supplier.get(this._options.version)
405
- : 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),
479
+ : undefined,
480
+ "X-Fern-Language": "JavaScript",
481
+ "X-Fern-SDK-Name": "polytomic",
482
+ "X-Fern-SDK-Version": "1.18.1",
483
+ "X-Fern-Runtime": core.RUNTIME.type,
484
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
485
+ },
406
486
  contentType: "application/json",
407
- requestType: "json",
408
487
  body: request,
409
488
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
410
489
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -437,7 +516,7 @@ class Connections {
437
516
  body: _response.error.rawBody,
438
517
  });
439
518
  case "timeout":
440
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/connections/connect/.");
519
+ throw new errors.PolytomicTimeoutError();
441
520
  case "unknown":
442
521
  throw new errors.PolytomicError({
443
522
  message: _response.error.errorMessage,
@@ -448,6 +527,17 @@ class Connections {
448
527
  /**
449
528
  * Tests a connection configuration.
450
529
  *
530
+ * This endpoint is useful for setup flows that want to verify credentials before
531
+ * persisting them.
532
+ *
533
+ * If you provide `connection_id`, Polytomic starts from the saved configuration
534
+ * for that connection and then applies the request's `configuration` values on
535
+ * top. This lets callers test a partial change without resending every existing
536
+ * field.
537
+ *
538
+ * The request does not persist any configuration changes even when validation
539
+ * succeeds.
540
+ *
451
541
  * @param {Polytomic.TestConnectionRequest} request
452
542
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
453
543
  *
@@ -469,16 +559,23 @@ class Connections {
469
559
  * })
470
560
  */
471
561
  testConnection(request, requestOptions) {
562
+ var _a;
472
563
  return __awaiter(this, void 0, void 0, function* () {
473
- var _a, _b;
474
564
  const _response = yield core.fetcher({
475
- 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/test"),
565
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections/test"),
476
566
  method: "POST",
477
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
567
+ headers: {
568
+ Authorization: yield this._getAuthorizationHeader(),
569
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
478
570
  ? yield core.Supplier.get(this._options.version)
479
- : 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),
571
+ : undefined,
572
+ "X-Fern-Language": "JavaScript",
573
+ "X-Fern-SDK-Name": "polytomic",
574
+ "X-Fern-SDK-Version": "1.18.1",
575
+ "X-Fern-Runtime": core.RUNTIME.type,
576
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
577
+ },
480
578
  contentType: "application/json",
481
- requestType: "json",
482
579
  body: request,
483
580
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
484
581
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -511,7 +608,7 @@ class Connections {
511
608
  body: _response.error.rawBody,
512
609
  });
513
610
  case "timeout":
514
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/connections/test.");
611
+ throw new errors.PolytomicTimeoutError();
515
612
  case "unknown":
516
613
  throw new errors.PolytomicError({
517
614
  message: _response.error.errorMessage,
@@ -520,6 +617,13 @@ class Connections {
520
617
  });
521
618
  }
522
619
  /**
620
+ * Returns a single connection by ID, with sensitive fields redacted.
621
+ *
622
+ * To inspect the schemas available on this connection, trigger a refresh with
623
+ * [`POST /api/connections/{id}/schemas/refresh`](../../../api-reference/schemas/refresh) and
624
+ * track progress via
625
+ * [`GET /api/connections/{id}/schemas/status`](../../../api-reference/schemas/get-status).
626
+ *
523
627
  * @param {string} id
524
628
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
525
629
  *
@@ -531,16 +635,23 @@ class Connections {
531
635
  * await client.connections.get("248df4b7-aa70-47b8-a036-33ac447e668d")
532
636
  */
533
637
  get(id, requestOptions) {
638
+ var _a;
534
639
  return __awaiter(this, void 0, void 0, function* () {
535
- var _a, _b;
536
640
  const _response = yield core.fetcher({
537
- 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)}`),
641
+ 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)}`),
538
642
  method: "GET",
539
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
643
+ headers: {
644
+ Authorization: yield this._getAuthorizationHeader(),
645
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
540
646
  ? yield core.Supplier.get(this._options.version)
541
- : 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),
647
+ : undefined,
648
+ "X-Fern-Language": "JavaScript",
649
+ "X-Fern-SDK-Name": "polytomic",
650
+ "X-Fern-SDK-Version": "1.18.1",
651
+ "X-Fern-Runtime": core.RUNTIME.type,
652
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
653
+ },
542
654
  contentType: "application/json",
543
- requestType: "json",
544
655
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
545
656
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
546
657
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -570,7 +681,7 @@ class Connections {
570
681
  body: _response.error.rawBody,
571
682
  });
572
683
  case "timeout":
573
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}.");
684
+ throw new errors.PolytomicTimeoutError();
574
685
  case "unknown":
575
686
  throw new errors.PolytomicError({
576
687
  message: _response.error.errorMessage,
@@ -579,6 +690,21 @@ class Connections {
579
690
  });
580
691
  }
581
692
  /**
693
+ * Updates a connection's configuration.
694
+ *
695
+ * Updating a connection is a **full replacement** of its configuration. Any
696
+ * `configuration` field you omit is cleared. To make a partial change, fetch
697
+ * the current connection with
698
+ * [`GET /api/connections/{id}`](../../../api-reference/connections/get), apply your edits, and send the
699
+ * complete object back.
700
+ *
701
+ * > 📘 The connection is re-validated against the upstream service after every
702
+ * > update. The request will fail if the new credentials or endpoint cannot be
703
+ * > reached.
704
+ *
705
+ * Syncs that are already running when the update is submitted are not
706
+ * interrupted; the updated configuration takes effect on their next execution.
707
+ *
582
708
  * @param {string} id
583
709
  * @param {Polytomic.UpdateConnectionRequestSchema} request
584
710
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
@@ -603,16 +729,23 @@ class Connections {
603
729
  * })
604
730
  */
605
731
  update(id, request, requestOptions) {
732
+ var _a;
606
733
  return __awaiter(this, void 0, void 0, function* () {
607
- var _a, _b;
608
734
  const _response = yield core.fetcher({
609
- 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)}`),
735
+ 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)}`),
610
736
  method: "PUT",
611
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
737
+ headers: {
738
+ Authorization: yield this._getAuthorizationHeader(),
739
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
612
740
  ? yield core.Supplier.get(this._options.version)
613
- : 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),
741
+ : undefined,
742
+ "X-Fern-Language": "JavaScript",
743
+ "X-Fern-SDK-Name": "polytomic",
744
+ "X-Fern-SDK-Version": "1.18.1",
745
+ "X-Fern-Runtime": core.RUNTIME.type,
746
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
747
+ },
614
748
  contentType: "application/json",
615
- requestType: "json",
616
749
  body: request,
617
750
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
618
751
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -649,7 +782,7 @@ class Connections {
649
782
  body: _response.error.rawBody,
650
783
  });
651
784
  case "timeout":
652
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling PUT /api/connections/{id}.");
785
+ throw new errors.PolytomicTimeoutError();
653
786
  case "unknown":
654
787
  throw new errors.PolytomicError({
655
788
  message: _response.error.errorMessage,
@@ -658,6 +791,13 @@ class Connections {
658
791
  });
659
792
  }
660
793
  /**
794
+ * Deletes a connection.
795
+ *
796
+ * > 🚧 Deleting a connection that is referenced by fieldsets, syncs, bulk
797
+ * > syncs, or schedules returns `422 connection in use` unless you pass
798
+ * > `force=true`. With `force=true`, the API deletes those dependent
799
+ * > resources before removing the connection.
800
+ *
661
801
  * @param {string} id
662
802
  * @param {Polytomic.ConnectionsRemoveRequest} request
663
803
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
@@ -673,23 +813,30 @@ class Connections {
673
813
  * force: true
674
814
  * })
675
815
  */
676
- remove(id_1) {
677
- return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
678
- var _a, _b;
816
+ remove(id, request = {}, requestOptions) {
817
+ var _a;
818
+ return __awaiter(this, void 0, void 0, function* () {
679
819
  const { force } = request;
680
820
  const _queryParams = {};
681
821
  if (force != null) {
682
822
  _queryParams["force"] = force.toString();
683
823
  }
684
824
  const _response = yield core.fetcher({
685
- 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)}`),
825
+ 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)}`),
686
826
  method: "DELETE",
687
- 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
688
830
  ? yield core.Supplier.get(this._options.version)
689
- : 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
+ },
690
838
  contentType: "application/json",
691
839
  queryParameters: _queryParams,
692
- requestType: "json",
693
840
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
694
841
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
695
842
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -723,7 +870,7 @@ class Connections {
723
870
  body: _response.error.rawBody,
724
871
  });
725
872
  case "timeout":
726
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling DELETE /api/connections/{id}.");
873
+ throw new errors.PolytomicTimeoutError();
727
874
  case "unknown":
728
875
  throw new errors.PolytomicError({
729
876
  message: _response.error.errorMessage,
@@ -732,6 +879,17 @@ class Connections {
732
879
  });
733
880
  }
734
881
  /**
882
+ * Returns completion values for parameter fields on a persisted connection.
883
+ *
884
+ * Use this endpoint when the available options for one parameter depend on the
885
+ * connection's saved credentials or previously selected settings. For example,
886
+ * after a connection is authorized, the upstream service may be able to return
887
+ * lists of databases, schemas, or similar selectable values.
888
+ *
889
+ * For new setup flows, prefer
890
+ * [`POST /api/connection_types/{type}/parameter_values`](../../../../api-reference/connections/get-type-parameter-values),
891
+ * which lets you resolve completions before the connection has been created.
892
+ *
735
893
  * @param {string} id
736
894
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
737
895
  *
@@ -743,16 +901,23 @@ class Connections {
743
901
  * await client.connections.getParameterValues("248df4b7-aa70-47b8-a036-33ac447e668d")
744
902
  */
745
903
  getParameterValues(id, requestOptions) {
904
+ var _a;
746
905
  return __awaiter(this, void 0, void 0, function* () {
747
- var _a, _b;
748
906
  const _response = yield core.fetcher({
749
- 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)}/parameter_values`),
907
+ 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)}/parameter_values`),
750
908
  method: "GET",
751
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
909
+ headers: {
910
+ Authorization: yield this._getAuthorizationHeader(),
911
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
752
912
  ? yield core.Supplier.get(this._options.version)
753
- : 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),
913
+ : undefined,
914
+ "X-Fern-Language": "JavaScript",
915
+ "X-Fern-SDK-Name": "polytomic",
916
+ "X-Fern-SDK-Version": "1.18.1",
917
+ "X-Fern-Runtime": core.RUNTIME.type,
918
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
919
+ },
754
920
  contentType: "application/json",
755
- requestType: "json",
756
921
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
757
922
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
758
923
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -782,7 +947,7 @@ class Connections {
782
947
  body: _response.error.rawBody,
783
948
  });
784
949
  case "timeout":
785
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}/parameter_values.");
950
+ throw new errors.PolytomicTimeoutError();
786
951
  case "unknown":
787
952
  throw new errors.PolytomicError({
788
953
  message: _response.error.errorMessage,
@@ -791,31 +956,45 @@ class Connections {
791
956
  });
792
957
  }
793
958
  /**
794
- * @param {string} id
959
+ * Shares a connection with another organization in the caller's partner account.
960
+ *
961
+ * > 🚧 Requires partner key
962
+ * >
963
+ * > Shared connections can only be created by using [partner keys](../../../../guides/obtaining-api-keys#partner-keys).
964
+ *
965
+ * @param {string} parentConnectionId
795
966
  * @param {Polytomic.ApiRequest} request
796
967
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
797
968
  *
798
969
  * @throws {@link Polytomic.UnauthorizedError}
799
970
  * @throws {@link Polytomic.ForbiddenError}
800
971
  * @throws {@link Polytomic.NotFoundError}
972
+ * @throws {@link Polytomic.UnprocessableEntityError}
801
973
  * @throws {@link Polytomic.InternalServerError}
802
974
  *
803
975
  * @example
804
- * await client.connections.apiV2CreateSharedConnection("248df4b7-aa70-47b8-a036-33ac447e668d", {
805
- * organization_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
976
+ * await client.connections.createSharedConnection("248df4b7-aa70-47b8-a036-33ac447e668d", {
977
+ * child_organization_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
806
978
  * })
807
979
  */
808
- apiV2CreateSharedConnection(id, request, requestOptions) {
980
+ createSharedConnection(parentConnectionId, request, requestOptions) {
981
+ var _a;
809
982
  return __awaiter(this, void 0, void 0, function* () {
810
- var _a, _b;
811
983
  const _response = yield core.fetcher({
812
- 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)}/share`),
984
+ 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(parentConnectionId)}/share`),
813
985
  method: "POST",
814
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
986
+ headers: {
987
+ Authorization: yield this._getAuthorizationHeader(),
988
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
815
989
  ? yield core.Supplier.get(this._options.version)
816
- : 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),
990
+ : undefined,
991
+ "X-Fern-Language": "JavaScript",
992
+ "X-Fern-SDK-Name": "polytomic",
993
+ "X-Fern-SDK-Version": "1.18.1",
994
+ "X-Fern-Runtime": core.RUNTIME.type,
995
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
996
+ },
817
997
  contentType: "application/json",
818
- requestType: "json",
819
998
  body: request,
820
999
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
821
1000
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -832,6 +1011,82 @@ class Connections {
832
1011
  throw new Polytomic.ForbiddenError(_response.error.body);
833
1012
  case 404:
834
1013
  throw new Polytomic.NotFoundError(_response.error.body);
1014
+ case 422:
1015
+ throw new Polytomic.UnprocessableEntityError(_response.error.body);
1016
+ case 500:
1017
+ throw new Polytomic.InternalServerError(_response.error.body);
1018
+ default:
1019
+ throw new errors.PolytomicError({
1020
+ statusCode: _response.error.statusCode,
1021
+ body: _response.error.body,
1022
+ });
1023
+ }
1024
+ }
1025
+ switch (_response.error.reason) {
1026
+ case "non-json":
1027
+ throw new errors.PolytomicError({
1028
+ statusCode: _response.error.statusCode,
1029
+ body: _response.error.rawBody,
1030
+ });
1031
+ case "timeout":
1032
+ throw new errors.PolytomicTimeoutError();
1033
+ case "unknown":
1034
+ throw new errors.PolytomicError({
1035
+ message: _response.error.errorMessage,
1036
+ });
1037
+ }
1038
+ });
1039
+ }
1040
+ /**
1041
+ * Lists shared copies of a connection.
1042
+ *
1043
+ * @param {string} parentConnectionId
1044
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
1045
+ *
1046
+ * @throws {@link Polytomic.UnauthorizedError}
1047
+ * @throws {@link Polytomic.ForbiddenError}
1048
+ * @throws {@link Polytomic.NotFoundError}
1049
+ * @throws {@link Polytomic.UnprocessableEntityError}
1050
+ * @throws {@link Polytomic.InternalServerError}
1051
+ *
1052
+ * @example
1053
+ * await client.connections.listSharedConnections("248df4b7-aa70-47b8-a036-33ac447e668d")
1054
+ */
1055
+ listSharedConnections(parentConnectionId, requestOptions) {
1056
+ var _a;
1057
+ return __awaiter(this, void 0, void 0, function* () {
1058
+ const _response = yield core.fetcher({
1059
+ 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(parentConnectionId)}/shared`),
1060
+ method: "GET",
1061
+ headers: {
1062
+ Authorization: yield this._getAuthorizationHeader(),
1063
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
1064
+ ? yield core.Supplier.get(this._options.version)
1065
+ : undefined,
1066
+ "X-Fern-Language": "JavaScript",
1067
+ "X-Fern-SDK-Name": "polytomic",
1068
+ "X-Fern-SDK-Version": "1.18.1",
1069
+ "X-Fern-Runtime": core.RUNTIME.type,
1070
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
1071
+ },
1072
+ contentType: "application/json",
1073
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1074
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1075
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1076
+ });
1077
+ if (_response.ok) {
1078
+ return _response.body;
1079
+ }
1080
+ if (_response.error.reason === "status-code") {
1081
+ switch (_response.error.statusCode) {
1082
+ case 401:
1083
+ throw new Polytomic.UnauthorizedError(_response.error.body);
1084
+ case 403:
1085
+ throw new Polytomic.ForbiddenError(_response.error.body);
1086
+ case 404:
1087
+ throw new Polytomic.NotFoundError(_response.error.body);
1088
+ case 422:
1089
+ throw new Polytomic.UnprocessableEntityError(_response.error.body);
835
1090
  case 500:
836
1091
  throw new Polytomic.InternalServerError(_response.error.body);
837
1092
  default:
@@ -848,7 +1103,7 @@ class Connections {
848
1103
  body: _response.error.rawBody,
849
1104
  });
850
1105
  case "timeout":
851
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/connections/{id}/share.");
1106
+ throw new errors.PolytomicTimeoutError();
852
1107
  case "unknown":
853
1108
  throw new errors.PolytomicError({
854
1109
  message: _response.error.errorMessage,