polytomic 1.16.0 → 1.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/Client.d.ts +14 -19
  2. package/api/errors/BadRequestError.js +7 -17
  3. package/api/errors/ConflictError.js +7 -17
  4. package/api/errors/ForbiddenError.js +7 -17
  5. package/api/errors/InternalServerError.js +7 -17
  6. package/api/errors/NotFoundError.js +7 -17
  7. package/api/errors/UnauthorizedError.js +7 -17
  8. package/api/errors/UnprocessableEntityError.js +7 -17
  9. package/api/resources/bulkSync/client/Client.d.ts +173 -24
  10. package/api/resources/bulkSync/client/Client.js +339 -118
  11. package/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +3 -0
  12. package/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +3 -0
  13. package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
  14. package/api/resources/bulkSync/client/requests/StartBulkSyncRequest.d.ts +4 -0
  15. package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
  16. package/api/resources/bulkSync/resources/executions/client/Client.d.ts +77 -12
  17. package/api/resources/bulkSync/resources/executions/client/Client.js +168 -66
  18. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +12 -0
  19. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +3 -3
  20. package/api/resources/bulkSync/resources/index.js +7 -17
  21. package/api/resources/bulkSync/resources/schedules/client/Client.d.ts +44 -15
  22. package/api/resources/bulkSync/resources/schedules/client/Client.js +116 -57
  23. package/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +1 -1
  24. package/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +1 -1
  25. package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +71 -11
  26. package/api/resources/bulkSync/resources/schemas/client/Client.js +150 -61
  27. package/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -0
  28. package/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +3 -0
  29. package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +7 -0
  30. package/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
  31. package/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
  32. package/api/resources/connections/client/Client.d.ts +160 -12
  33. package/api/resources/connections/client/Client.js +473 -86
  34. package/api/resources/connections/client/requests/ApiRequest.d.ts +13 -0
  35. package/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.d.ts +15 -0
  36. package/api/resources/connections/client/requests/index.d.ts +2 -0
  37. package/api/resources/events/client/Client.d.ts +20 -7
  38. package/api/resources/events/client/Client.js +55 -33
  39. package/api/resources/events/client/requests/EventsListRequest.d.ts +17 -2
  40. package/api/resources/identity/client/Client.d.ts +11 -6
  41. package/api/resources/identity/client/Client.js +31 -24
  42. package/api/resources/index.js +7 -17
  43. package/api/resources/jobs/client/Client.d.ts +15 -8
  44. package/api/resources/jobs/client/Client.js +35 -26
  45. package/api/resources/modelSync/client/Client.d.ts +110 -19
  46. package/api/resources/modelSync/client/Client.js +287 -118
  47. package/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -1
  48. package/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +3 -0
  49. package/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +3 -0
  50. package/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -1
  51. package/api/resources/modelSync/resources/executions/client/Client.d.ts +41 -12
  52. package/api/resources/modelSync/resources/executions/client/Client.js +115 -56
  53. package/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +1 -1
  54. package/api/resources/modelSync/resources/index.js +7 -17
  55. package/api/resources/modelSync/resources/targets/client/Client.d.ts +28 -11
  56. package/api/resources/modelSync/resources/targets/client/Client.js +89 -49
  57. package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts +6 -0
  58. package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts +6 -0
  59. package/api/resources/models/client/Client.d.ts +79 -8
  60. package/api/resources/models/client/Client.js +214 -86
  61. package/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +3 -0
  62. package/api/resources/notifications/client/Client.d.ts +13 -5
  63. package/api/resources/notifications/client/Client.js +48 -31
  64. package/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +1 -0
  65. package/api/resources/organization/client/Client.d.ts +31 -13
  66. package/api/resources/organization/client/Client.js +109 -55
  67. package/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +6 -0
  68. package/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +6 -0
  69. package/api/resources/permissions/client/Client.d.ts +2 -7
  70. package/api/resources/permissions/resources/index.js +7 -17
  71. package/api/resources/permissions/resources/policies/client/Client.d.ts +33 -5
  72. package/api/resources/permissions/resources/policies/client/Client.js +105 -47
  73. package/api/resources/permissions/resources/roles/client/Client.d.ts +38 -5
  74. package/api/resources/permissions/resources/roles/client/Client.js +110 -47
  75. package/api/resources/queryRunner/client/Client.d.ts +26 -7
  76. package/api/resources/queryRunner/client/Client.js +63 -35
  77. package/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +3 -0
  78. package/api/resources/schemas/client/Client.d.ts +118 -23
  79. package/api/resources/schemas/client/Client.js +232 -86
  80. package/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +1 -0
  81. package/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +1 -0
  82. package/api/resources/users/client/Client.d.ts +44 -16
  83. package/api/resources/users/client/Client.js +133 -66
  84. package/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +4 -0
  85. package/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +4 -0
  86. package/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +3 -0
  87. package/api/resources/webhooks/client/Client.d.ts +67 -21
  88. package/api/resources/webhooks/client/Client.js +165 -75
  89. package/api/types/ApiKeyResponse.d.ts +1 -0
  90. package/api/types/BulkBulkSyncSchedule.d.ts +1 -0
  91. package/api/types/BulkDiscover.d.ts +1 -1
  92. package/api/types/BulkExecutionStatus.d.ts +1 -1
  93. package/api/types/BulkFetchMode.d.ts +1 -1
  94. package/api/types/BulkNormalizeNames.d.ts +1 -1
  95. package/api/types/BulkOutputDisposition.d.ts +9 -0
  96. package/api/types/BulkOutputDisposition.js +11 -0
  97. package/api/types/BulkResyncMode.d.ts +9 -0
  98. package/api/types/BulkResyncMode.js +11 -0
  99. package/api/types/BulkScheduleSyncMode.d.ts +1 -1
  100. package/api/types/BulkSchema.d.ts +2 -0
  101. package/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
  102. package/api/types/BulkSchemaExecutionStatus.js +1 -0
  103. package/api/types/BulkSelectiveMode.d.ts +1 -1
  104. package/api/types/BulkSyncDest.d.ts +2 -0
  105. package/api/types/BulkSyncExecution.d.ts +1 -0
  106. package/api/types/BulkSyncExecutionStatus.d.ts +3 -0
  107. package/api/types/BulkSyncIngestionStatus.d.ts +14 -0
  108. package/{dist/version.js → api/types/BulkSyncIngestionStatus.js} +3 -2
  109. package/api/types/BulkSyncMode.d.ts +1 -1
  110. package/api/types/BulkSyncResponse.d.ts +2 -2
  111. package/api/types/BulkSyncSchemaExecutionStatus.d.ts +7 -0
  112. package/api/types/BulkSyncSource.d.ts +1 -0
  113. package/api/types/BulkSyncStatusResponse.d.ts +1 -0
  114. package/api/types/ConnectCardResponse.d.ts +1 -0
  115. package/api/types/ConnectionResponseSchema.d.ts +4 -2
  116. package/api/types/CreateSharedConnectionResponseSchema.d.ts +6 -0
  117. package/{version.js → api/types/CreateSharedConnectionResponseSchema.js} +3 -2
  118. package/api/types/Event.d.ts +4 -0
  119. package/api/types/EventBody.d.ts +1 -1
  120. package/api/types/ExecutionStatus.d.ts +1 -1
  121. package/api/types/FilterFieldReferenceType.d.ts +1 -1
  122. package/api/types/FilterFunction.d.ts +1 -1
  123. package/api/types/GetIdentityResponseSchema.d.ts +2 -0
  124. package/api/types/IngestionStatusLevel.d.ts +12 -0
  125. package/api/types/IngestionStatusLevel.js +11 -0
  126. package/api/types/JobResponse.d.ts +3 -0
  127. package/api/types/JsonschemaDefinitions.d.ts +1 -1
  128. package/api/types/JsonschemaForm.d.ts +1 -1
  129. package/api/types/LabelLabel.d.ts +1 -1
  130. package/api/types/ModelField.d.ts +1 -1
  131. package/api/types/ModelResponse.d.ts +2 -2
  132. package/api/types/ModelSyncMode.d.ts +2 -1
  133. package/api/types/ModelSyncMode.js +1 -0
  134. package/api/types/ModelSyncResponse.d.ts +2 -2
  135. package/api/types/ModelSyncSourceMetaResponse.d.ts +3 -0
  136. package/api/types/Organization.d.ts +5 -0
  137. package/api/types/{CommonOutputActor.d.ts → OutputActor.d.ts} +1 -1
  138. package/api/types/OutputActor.js +5 -0
  139. package/api/types/ScheduleFrequency.d.ts +1 -1
  140. package/api/types/SchemaIdentityFunction.d.ts +1 -1
  141. package/api/types/SourceMeta.d.ts +3 -0
  142. package/api/types/TypesType.d.ts +1 -1
  143. package/api/types/User.d.ts +6 -0
  144. package/api/types/UtilFieldType.d.ts +1 -1
  145. package/api/types/V2CreateSharedConnectionResponseEnvelope.d.ts +7 -0
  146. package/api/types/V2CreateSharedConnectionResponseEnvelope.js +5 -0
  147. package/api/types/V2EnricherConfiguration.d.ts +1 -1
  148. package/api/types/V2EnricherMapping.d.ts +1 -1
  149. package/api/types/V2ExecutionLogType.d.ts +1 -1
  150. package/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
  151. package/api/types/V2SampleRecord.d.ts +1 -1
  152. package/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
  153. package/api/types/V3BulkSyncSourceCapabilities.d.ts +6 -0
  154. package/api/types/V3BulkSyncSourceCapabilities.js +5 -0
  155. package/api/types/V4BulkSyncExecutionLogs.d.ts +6 -1
  156. package/api/types/V4BulkSyncScheduleApi.d.ts +5 -0
  157. package/api/types/V4ExportSyncLogsResponse.d.ts +1 -0
  158. package/api/types/V4GlobalErrorSubscribersResponse.d.ts +1 -0
  159. package/api/types/V4RunQueryResult.d.ts +2 -1
  160. package/api/types/V4UserFieldRequest.d.ts +4 -0
  161. package/api/types/WorkTaskStatus.d.ts +1 -1
  162. package/api/types/index.d.ts +13 -6
  163. package/api/types/index.js +13 -6
  164. package/core/auth/BearerToken.d.ts +1 -1
  165. package/core/fetcher/APIResponse.d.ts +1 -1
  166. package/core/fetcher/Fetcher.d.ts +3 -6
  167. package/core/fetcher/Fetcher.js +189 -20
  168. package/core/fetcher/Supplier.d.ts +1 -1
  169. package/core/fetcher/getHeader.js +2 -1
  170. package/core/runtime/runtime.d.ts +1 -2
  171. package/core/runtime/runtime.js +41 -52
  172. package/dist/Client.d.ts +14 -19
  173. package/dist/api/errors/BadRequestError.js +7 -17
  174. package/dist/api/errors/ConflictError.js +7 -17
  175. package/dist/api/errors/ForbiddenError.js +7 -17
  176. package/dist/api/errors/InternalServerError.js +7 -17
  177. package/dist/api/errors/NotFoundError.js +7 -17
  178. package/dist/api/errors/UnauthorizedError.js +7 -17
  179. package/dist/api/errors/UnprocessableEntityError.js +7 -17
  180. package/dist/api/resources/bulkSync/client/Client.d.ts +173 -24
  181. package/dist/api/resources/bulkSync/client/Client.js +339 -118
  182. package/dist/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +3 -0
  183. package/dist/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +3 -0
  184. package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
  185. package/dist/api/resources/bulkSync/client/requests/StartBulkSyncRequest.d.ts +4 -0
  186. package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
  187. package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +77 -12
  188. package/dist/api/resources/bulkSync/resources/executions/client/Client.js +168 -66
  189. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +12 -0
  190. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +3 -3
  191. package/dist/api/resources/bulkSync/resources/index.js +7 -17
  192. package/dist/api/resources/bulkSync/resources/schedules/client/Client.d.ts +44 -15
  193. package/dist/api/resources/bulkSync/resources/schedules/client/Client.js +116 -57
  194. package/dist/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +1 -1
  195. package/dist/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +1 -1
  196. package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +71 -11
  197. package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +150 -61
  198. package/dist/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -0
  199. package/dist/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +3 -0
  200. package/dist/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +7 -0
  201. package/dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
  202. package/dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
  203. package/dist/api/resources/connections/client/Client.d.ts +160 -12
  204. package/dist/api/resources/connections/client/Client.js +473 -86
  205. package/dist/api/resources/connections/client/requests/ApiRequest.d.ts +13 -0
  206. package/dist/api/resources/connections/client/requests/ApiRequest.js +5 -0
  207. package/dist/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.d.ts +15 -0
  208. package/dist/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.js +5 -0
  209. package/dist/api/resources/connections/client/requests/index.d.ts +2 -0
  210. package/dist/api/resources/events/client/Client.d.ts +20 -7
  211. package/dist/api/resources/events/client/Client.js +55 -33
  212. package/dist/api/resources/events/client/requests/EventsListRequest.d.ts +17 -2
  213. package/dist/api/resources/identity/client/Client.d.ts +11 -6
  214. package/dist/api/resources/identity/client/Client.js +31 -24
  215. package/dist/api/resources/index.js +7 -17
  216. package/dist/api/resources/jobs/client/Client.d.ts +15 -8
  217. package/dist/api/resources/jobs/client/Client.js +35 -26
  218. package/dist/api/resources/modelSync/client/Client.d.ts +110 -19
  219. package/dist/api/resources/modelSync/client/Client.js +287 -118
  220. package/dist/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -1
  221. package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +3 -0
  222. package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +3 -0
  223. package/dist/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -1
  224. package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +41 -12
  225. package/dist/api/resources/modelSync/resources/executions/client/Client.js +115 -56
  226. package/dist/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +1 -1
  227. package/dist/api/resources/modelSync/resources/index.js +7 -17
  228. package/dist/api/resources/modelSync/resources/targets/client/Client.d.ts +28 -11
  229. package/dist/api/resources/modelSync/resources/targets/client/Client.js +89 -49
  230. package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts +6 -0
  231. package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts +6 -0
  232. package/dist/api/resources/models/client/Client.d.ts +79 -8
  233. package/dist/api/resources/models/client/Client.js +214 -86
  234. package/dist/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +3 -0
  235. package/dist/api/resources/notifications/client/Client.d.ts +13 -5
  236. package/dist/api/resources/notifications/client/Client.js +48 -31
  237. package/dist/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +1 -0
  238. package/dist/api/resources/organization/client/Client.d.ts +31 -13
  239. package/dist/api/resources/organization/client/Client.js +109 -55
  240. package/dist/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +6 -0
  241. package/dist/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +6 -0
  242. package/dist/api/resources/permissions/client/Client.d.ts +2 -7
  243. package/dist/api/resources/permissions/resources/index.js +7 -17
  244. package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +33 -5
  245. package/dist/api/resources/permissions/resources/policies/client/Client.js +105 -47
  246. package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +38 -5
  247. package/dist/api/resources/permissions/resources/roles/client/Client.js +110 -47
  248. package/dist/api/resources/queryRunner/client/Client.d.ts +26 -7
  249. package/dist/api/resources/queryRunner/client/Client.js +63 -35
  250. package/dist/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +3 -0
  251. package/dist/api/resources/schemas/client/Client.d.ts +118 -23
  252. package/dist/api/resources/schemas/client/Client.js +232 -86
  253. package/dist/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +1 -0
  254. package/dist/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +1 -0
  255. package/dist/api/resources/users/client/Client.d.ts +44 -16
  256. package/dist/api/resources/users/client/Client.js +133 -66
  257. package/dist/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +4 -0
  258. package/dist/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +4 -0
  259. package/dist/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +3 -0
  260. package/dist/api/resources/webhooks/client/Client.d.ts +67 -21
  261. package/dist/api/resources/webhooks/client/Client.js +165 -75
  262. package/dist/api/types/ApiKeyResponse.d.ts +1 -0
  263. package/dist/api/types/BulkBulkSyncSchedule.d.ts +1 -0
  264. package/dist/api/types/BulkDiscover.d.ts +1 -1
  265. package/dist/api/types/BulkExecutionStatus.d.ts +1 -1
  266. package/dist/api/types/BulkFetchMode.d.ts +1 -1
  267. package/dist/api/types/BulkNormalizeNames.d.ts +1 -1
  268. package/dist/api/types/BulkOutputDisposition.d.ts +9 -0
  269. package/dist/api/types/BulkOutputDisposition.js +11 -0
  270. package/dist/api/types/BulkResyncMode.d.ts +9 -0
  271. package/dist/api/types/BulkResyncMode.js +11 -0
  272. package/dist/api/types/BulkScheduleSyncMode.d.ts +1 -1
  273. package/dist/api/types/BulkSchema.d.ts +2 -0
  274. package/dist/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
  275. package/dist/api/types/BulkSchemaExecutionStatus.js +1 -0
  276. package/dist/api/types/BulkSelectiveMode.d.ts +1 -1
  277. package/dist/api/types/BulkSyncDest.d.ts +2 -0
  278. package/dist/api/types/BulkSyncExecution.d.ts +1 -0
  279. package/dist/api/types/BulkSyncExecutionStatus.d.ts +3 -0
  280. package/dist/api/types/BulkSyncIngestionStatus.d.ts +14 -0
  281. package/dist/api/types/BulkSyncIngestionStatus.js +5 -0
  282. package/dist/api/types/BulkSyncMode.d.ts +1 -1
  283. package/dist/api/types/BulkSyncResponse.d.ts +2 -2
  284. package/dist/api/types/BulkSyncSchemaExecutionStatus.d.ts +7 -0
  285. package/dist/api/types/BulkSyncSource.d.ts +1 -0
  286. package/dist/api/types/BulkSyncStatusResponse.d.ts +1 -0
  287. package/dist/api/types/ConnectCardResponse.d.ts +1 -0
  288. package/dist/api/types/ConnectionResponseSchema.d.ts +4 -2
  289. package/dist/api/types/CreateSharedConnectionResponseSchema.d.ts +6 -0
  290. package/dist/api/types/CreateSharedConnectionResponseSchema.js +5 -0
  291. package/dist/api/types/Event.d.ts +4 -0
  292. package/dist/api/types/EventBody.d.ts +1 -1
  293. package/dist/api/types/ExecutionStatus.d.ts +1 -1
  294. package/dist/api/types/FilterFieldReferenceType.d.ts +1 -1
  295. package/dist/api/types/FilterFunction.d.ts +1 -1
  296. package/dist/api/types/GetIdentityResponseSchema.d.ts +2 -0
  297. package/dist/api/types/IngestionStatusLevel.d.ts +12 -0
  298. package/dist/api/types/IngestionStatusLevel.js +11 -0
  299. package/dist/api/types/JobResponse.d.ts +3 -0
  300. package/dist/api/types/JsonschemaDefinitions.d.ts +1 -1
  301. package/dist/api/types/JsonschemaForm.d.ts +1 -1
  302. package/dist/api/types/LabelLabel.d.ts +1 -1
  303. package/dist/api/types/ModelField.d.ts +1 -1
  304. package/dist/api/types/ModelResponse.d.ts +2 -2
  305. package/dist/api/types/ModelSyncMode.d.ts +2 -1
  306. package/dist/api/types/ModelSyncMode.js +1 -0
  307. package/dist/api/types/ModelSyncResponse.d.ts +2 -2
  308. package/dist/api/types/ModelSyncSourceMetaResponse.d.ts +3 -0
  309. package/dist/api/types/Organization.d.ts +5 -0
  310. package/dist/api/types/{CommonOutputActor.d.ts → OutputActor.d.ts} +1 -1
  311. package/dist/api/types/OutputActor.js +5 -0
  312. package/dist/api/types/ScheduleFrequency.d.ts +1 -1
  313. package/dist/api/types/SchemaIdentityFunction.d.ts +1 -1
  314. package/dist/api/types/SourceMeta.d.ts +3 -0
  315. package/dist/api/types/TypesType.d.ts +1 -1
  316. package/dist/api/types/User.d.ts +6 -0
  317. package/dist/api/types/UtilFieldType.d.ts +1 -1
  318. package/dist/api/types/V2CreateSharedConnectionResponseEnvelope.d.ts +7 -0
  319. package/dist/api/types/V2CreateSharedConnectionResponseEnvelope.js +5 -0
  320. package/dist/api/types/V2EnricherConfiguration.d.ts +1 -1
  321. package/dist/api/types/V2EnricherMapping.d.ts +1 -1
  322. package/dist/api/types/V2ExecutionLogType.d.ts +1 -1
  323. package/dist/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
  324. package/dist/api/types/V2SampleRecord.d.ts +1 -1
  325. package/dist/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
  326. package/dist/api/types/V3BulkSyncSourceCapabilities.d.ts +6 -0
  327. package/dist/api/types/V3BulkSyncSourceCapabilities.js +5 -0
  328. package/dist/api/types/V4BulkSyncExecutionLogs.d.ts +6 -1
  329. package/dist/api/types/V4BulkSyncScheduleApi.d.ts +5 -0
  330. package/dist/api/types/V4ExportSyncLogsResponse.d.ts +1 -0
  331. package/dist/api/types/V4GlobalErrorSubscribersResponse.d.ts +1 -0
  332. package/dist/api/types/V4RunQueryResult.d.ts +2 -1
  333. package/dist/api/types/V4UserFieldRequest.d.ts +4 -0
  334. package/dist/api/types/WorkTaskStatus.d.ts +1 -1
  335. package/dist/api/types/index.d.ts +13 -6
  336. package/dist/api/types/index.js +13 -6
  337. package/dist/core/auth/BearerToken.d.ts +1 -1
  338. package/dist/core/fetcher/APIResponse.d.ts +1 -1
  339. package/dist/core/fetcher/Fetcher.d.ts +3 -6
  340. package/dist/core/fetcher/Fetcher.js +189 -20
  341. package/dist/core/fetcher/Supplier.d.ts +1 -1
  342. package/dist/core/fetcher/getHeader.js +2 -1
  343. package/dist/core/runtime/runtime.d.ts +1 -2
  344. package/dist/core/runtime/runtime.js +41 -52
  345. package/dist/environments.d.ts +1 -1
  346. package/dist/errors/PolytomicError.js +1 -2
  347. package/dist/errors/PolytomicTimeoutError.d.ts +1 -1
  348. package/dist/errors/PolytomicTimeoutError.js +2 -2
  349. package/dist/index.js +7 -17
  350. package/environments.d.ts +1 -1
  351. package/errors/PolytomicError.js +1 -2
  352. package/errors/PolytomicTimeoutError.d.ts +1 -1
  353. package/errors/PolytomicTimeoutError.js +2 -2
  354. package/index.js +7 -17
  355. package/{jest.config.mjs → jest.config.js} +1 -4
  356. package/package.json +17 -18
  357. package/core/fetcher/createRequestUrl.d.ts +0 -1
  358. package/core/fetcher/createRequestUrl.js +0 -12
  359. package/core/fetcher/getFetchFn.d.ts +0 -4
  360. package/core/fetcher/getFetchFn.js +0 -68
  361. package/core/fetcher/getRequestBody.d.ts +0 -7
  362. package/core/fetcher/getRequestBody.js +0 -23
  363. package/core/fetcher/getResponseBody.d.ts +0 -1
  364. package/core/fetcher/getResponseBody.js +0 -54
  365. package/core/fetcher/makeRequest.d.ts +0 -1
  366. package/core/fetcher/makeRequest.js +0 -42
  367. package/core/fetcher/requestWithRetries.d.ts +0 -1
  368. package/core/fetcher/requestWithRetries.js +0 -40
  369. package/core/fetcher/signals.d.ts +0 -11
  370. package/core/fetcher/signals.js +0 -36
  371. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  372. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
  373. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  374. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
  375. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  376. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
  377. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  378. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
  379. package/core/json.d.ts +0 -15
  380. package/core/json.js +0 -24
  381. package/dist/core/fetcher/createRequestUrl.d.ts +0 -1
  382. package/dist/core/fetcher/createRequestUrl.js +0 -12
  383. package/dist/core/fetcher/getFetchFn.d.ts +0 -4
  384. package/dist/core/fetcher/getFetchFn.js +0 -68
  385. package/dist/core/fetcher/getRequestBody.d.ts +0 -7
  386. package/dist/core/fetcher/getRequestBody.js +0 -23
  387. package/dist/core/fetcher/getResponseBody.d.ts +0 -1
  388. package/dist/core/fetcher/getResponseBody.js +0 -54
  389. package/dist/core/fetcher/makeRequest.d.ts +0 -1
  390. package/dist/core/fetcher/makeRequest.js +0 -42
  391. package/dist/core/fetcher/requestWithRetries.d.ts +0 -1
  392. package/dist/core/fetcher/requestWithRetries.js +0 -40
  393. package/dist/core/fetcher/signals.d.ts +0 -11
  394. package/dist/core/fetcher/signals.js +0 -36
  395. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  396. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
  397. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  398. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
  399. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  400. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
  401. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  402. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
  403. package/dist/core/json.d.ts +0 -15
  404. package/dist/core/json.js +0 -24
  405. package/dist/version.d.ts +0 -1
  406. package/reference.md +0 -6547
  407. package/scripts/rename-to-esm-files.js +0 -115
  408. package/version.d.ts +0 -1
  409. /package/api/{types/CommonOutputActor.js → resources/connections/client/requests/ApiRequest.js} +0 -0
  410. /package/{dist/api/types/CommonOutputActor.js → api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.js} +0 -0
@@ -4,4 +4,4 @@
4
4
  /**
5
5
  * A map of `fieldSource` -> `fieldName: fieldValue`. Because there may be field name conflicts between the base model and enrichments, the base model fields are placed in a map under the model ID. Fields from enrichments are placed under the enricher ID.
6
6
  */
7
- export type V2SampleRecord = Record<string, Record<string, unknown>>;
7
+ export declare type V2SampleRecord = Record<string, Record<string, unknown>>;
@@ -2,4 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Polytomic from "../index";
5
- export type V2SchemaConfigurationFieldsItem = string | Polytomic.FieldConfiguration;
5
+ export declare type V2SchemaConfigurationFieldsItem = string | Polytomic.FieldConfiguration;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface V3BulkSyncSourceCapabilities {
5
+ supports_tracking_fields?: boolean;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,9 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type V4BulkSyncExecutionLogs = Record<string, unknown>;
4
+ export interface V4BulkSyncExecutionLogs {
5
+ /** Timestamp at which the signed URLs in URLs stop working. */
6
+ Expires?: string;
7
+ /** Signed URLs that download the execution's log files. These URLs expire at the Expires timestamp. */
8
+ URLs?: string[];
9
+ }
@@ -3,11 +3,16 @@
3
3
  */
4
4
  import * as Polytomic from "../index";
5
5
  export interface V4BulkSyncScheduleApi {
6
+ /** Day of the month (1-31) for monthly schedules. */
6
7
  dayOfMonth?: string;
8
+ /** Day of the week for weekly schedules. */
7
9
  dayOfWeek?: string;
8
10
  frequency: Polytomic.ScheduleFrequency;
11
+ /** Hour of the day (0-23, in UTC) the schedule fires. */
9
12
  hour?: string;
13
+ /** Minute of the hour (0-59) the schedule fires. */
10
14
  minute?: string;
15
+ /** Month of the year (1-12) for yearly schedules. */
11
16
  month?: string;
12
17
  selectiveMode?: Polytomic.BulkSelectiveMode;
13
18
  }
@@ -2,5 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface V4ExportSyncLogsResponse {
5
+ /** Signed URL to download the exported log archive. */
5
6
  url?: string;
6
7
  }
@@ -2,5 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface V4GlobalErrorSubscribersResponse {
5
+ /** Email addresses subscribed to global sync error notifications for the organization. */
5
6
  emails?: string[];
6
7
  }
@@ -5,12 +5,13 @@ import * as Polytomic from "../index";
5
5
  export interface V4RunQueryResult {
6
6
  /** The number of rows returned by the query. This will not be returned until the query completes. */
7
7
  count?: number;
8
+ /** Error message if the query failed. */
8
9
  error?: string;
9
10
  /** The time at which the query will expire and be deleted. This will not be returned until the query completes. */
10
11
  expires?: string;
11
12
  /** The names of the fields returned by the query. This will not be returned until the query completes. */
12
13
  fields?: string[];
13
- /** The ID of the query task. */
14
+ /** The ID of the query task. Poll GET /api/queries/{id} until the task reaches done or failed to retrieve results. */
14
15
  id?: string;
15
16
  /** The query results, returned as an array of objects. */
16
17
  results?: Record<string, unknown>[];
@@ -3,8 +3,12 @@
3
3
  */
4
4
  export interface V4UserFieldRequest {
5
5
  example?: unknown;
6
+ /** Stable identifier for the user-defined field. Reuse an existing field_id to update a field in place. */
6
7
  field_id: string;
8
+ /** Human-readable label shown to users selecting this field in the app. */
7
9
  label: string;
10
+ /** JSON path expression that extracts the field's value from the source record. Required for nested or computed fields; omit for top-level fields. */
8
11
  path?: string;
12
+ /** Polytomic type of the field (e.g. string, integer, boolean). */
9
13
  type: string;
10
14
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type WorkTaskStatus = "created" | "running" | "done" | "failed";
4
+ export declare type WorkTaskStatus = "created" | "running" | "done" | "failed";
5
5
  export declare const WorkTaskStatus: {
6
6
  readonly Created: "created";
7
7
  readonly Running: "running";
@@ -4,15 +4,18 @@ export * from "./BackendOAuthPrompt";
4
4
  export * from "./BulkBulkSyncSchedule";
5
5
  export * from "./BulkDiscover";
6
6
  export * from "./BulkExecutionStatus";
7
+ export * from "./BulkFilter";
7
8
  export * from "./BulkItemizedSchedule";
8
9
  export * from "./BulkMultiScheduleConfiguration";
9
10
  export * from "./BulkNormalizeNames";
11
+ export * from "./BulkOutputDisposition";
12
+ export * from "./BulkResyncMode";
10
13
  export * from "./BulkSchedule";
11
14
  export * from "./BulkScheduleSyncMode";
12
15
  export * from "./BulkSchemaExecutionStatus";
13
16
  export * from "./BulkSelectiveMode";
14
17
  export * from "./BulkSyncMode";
15
- export * from "./CommonOutputActor";
18
+ export * from "./ConfigurationValue";
16
19
  export * from "./BulkSyncCanceledEvent";
17
20
  export * from "./BulkSyncCompletedEvent";
18
21
  export * from "./BulkSyncCompletedWithErrorEvent";
@@ -33,7 +36,11 @@ export * from "./ModelModelFieldRequest";
33
36
  export * from "./ModelRelation";
34
37
  export * from "./ModelRelationTo";
35
38
  export * from "./ModelSyncMode";
39
+ export * from "./OutputActor";
40
+ export * from "./PaginationDetails";
36
41
  export * from "./RestErrResponse";
42
+ export * from "./RunAfter";
43
+ export * from "./Schedule";
37
44
  export * from "./ScheduleFrequency";
38
45
  export * from "./ScheduleScheduleOption";
39
46
  export * from "./SchemaAssociation";
@@ -50,7 +57,6 @@ export * from "./ApiKeyResponseEnvelope";
50
57
  export * from "./ActivateSyncEnvelope";
51
58
  export * from "./ActivateSyncInput";
52
59
  export * from "./ActivateSyncOutput";
53
- export * from "./BulkFilter";
54
60
  export * from "./BulkSyncDest";
55
61
  export * from "./BulkSyncDestEnvelope";
56
62
  export * from "./BulkSyncListEnvelope";
@@ -60,7 +66,6 @@ export * from "./CancelBulkSyncResponse";
60
66
  export * from "./CancelBulkSyncResponseEnvelope";
61
67
  export * from "./CancelModelSyncResponse";
62
68
  export * from "./CancelModelSyncResponseEnvelope";
63
- export * from "./ConfigurationValue";
64
69
  export * from "./V2ConnectionForm";
65
70
  export * from "./ConnectionListResponseEnvelope";
66
71
  export * from "./ConnectionMeta";
@@ -76,6 +81,8 @@ export * from "./ConnectionTypeSchema";
76
81
  export * from "./CreateConnectionResponseEnvelope";
77
82
  export * from "./CreateConnectionResponseSchema";
78
83
  export * from "./CreateModelRequest";
84
+ export * from "./V2CreateSharedConnectionResponseEnvelope";
85
+ export * from "./CreateSharedConnectionResponseSchema";
79
86
  export * from "./V2EnricherConfiguration";
80
87
  export * from "./V2EnricherMapping";
81
88
  export * from "./Enrichment";
@@ -116,7 +123,6 @@ export * from "./Organization";
116
123
  export * from "./OrganizationEnvelope";
117
124
  export * from "./OrganizationsEnvelope";
118
125
  export * from "./Override";
119
- export * from "./PaginationDetails";
120
126
  export * from "./PolicyAction";
121
127
  export * from "./PolicyResponse";
122
128
  export * from "./PolicyResponseEnvelope";
@@ -125,9 +131,7 @@ export * from "./RelationTo";
125
131
  export * from "./RoleListResponseEnvelope";
126
132
  export * from "./RoleResponse";
127
133
  export * from "./RoleResponseEnvelope";
128
- export * from "./RunAfter";
129
134
  export * from "./V2SampleRecord";
130
- export * from "./Schedule";
131
135
  export * from "./ScheduleOptionResponse";
132
136
  export * from "./ScheduleOptionResponseEnvelope";
133
137
  export * from "./V2SchemaConfigurationFieldsItem";
@@ -156,8 +160,10 @@ export * from "./BulkSchema";
156
160
  export * from "./BulkSchemaEnvelope";
157
161
  export * from "./BulkSyncExecution";
158
162
  export * from "./BulkSyncExecutionEnvelope";
163
+ export * from "./BulkSyncIngestionStatus";
159
164
  export * from "./BulkSyncSchemaExecution";
160
165
  export * from "./BulkSyncSource";
166
+ export * from "./V3BulkSyncSourceCapabilities";
161
167
  export * from "./BulkSyncSourceEnvelope";
162
168
  export * from "./BulkSyncSourceSchemaEnvelope";
163
169
  export * from "./BulkSyncSourceStatus";
@@ -166,6 +172,7 @@ export * from "./BulkSyncStatusEnvelope";
166
172
  export * from "./BulkSyncStatusResponse";
167
173
  export * from "./ConnectCardResponse";
168
174
  export * from "./ConnectCardResponseEnvelope";
175
+ export * from "./IngestionStatusLevel";
169
176
  export * from "./ListBulkSchema";
170
177
  export * from "./ListBulkSyncExecutionsEnvelope";
171
178
  export * from "./PickValue";
@@ -20,15 +20,18 @@ __exportStar(require("./BackendOAuthPrompt"), exports);
20
20
  __exportStar(require("./BulkBulkSyncSchedule"), exports);
21
21
  __exportStar(require("./BulkDiscover"), exports);
22
22
  __exportStar(require("./BulkExecutionStatus"), exports);
23
+ __exportStar(require("./BulkFilter"), exports);
23
24
  __exportStar(require("./BulkItemizedSchedule"), exports);
24
25
  __exportStar(require("./BulkMultiScheduleConfiguration"), exports);
25
26
  __exportStar(require("./BulkNormalizeNames"), exports);
27
+ __exportStar(require("./BulkOutputDisposition"), exports);
28
+ __exportStar(require("./BulkResyncMode"), exports);
26
29
  __exportStar(require("./BulkSchedule"), exports);
27
30
  __exportStar(require("./BulkScheduleSyncMode"), exports);
28
31
  __exportStar(require("./BulkSchemaExecutionStatus"), exports);
29
32
  __exportStar(require("./BulkSelectiveMode"), exports);
30
33
  __exportStar(require("./BulkSyncMode"), exports);
31
- __exportStar(require("./CommonOutputActor"), exports);
34
+ __exportStar(require("./ConfigurationValue"), exports);
32
35
  __exportStar(require("./BulkSyncCanceledEvent"), exports);
33
36
  __exportStar(require("./BulkSyncCompletedEvent"), exports);
34
37
  __exportStar(require("./BulkSyncCompletedWithErrorEvent"), exports);
@@ -49,7 +52,11 @@ __exportStar(require("./ModelModelFieldRequest"), exports);
49
52
  __exportStar(require("./ModelRelation"), exports);
50
53
  __exportStar(require("./ModelRelationTo"), exports);
51
54
  __exportStar(require("./ModelSyncMode"), exports);
55
+ __exportStar(require("./OutputActor"), exports);
56
+ __exportStar(require("./PaginationDetails"), exports);
52
57
  __exportStar(require("./RestErrResponse"), exports);
58
+ __exportStar(require("./RunAfter"), exports);
59
+ __exportStar(require("./Schedule"), exports);
53
60
  __exportStar(require("./ScheduleFrequency"), exports);
54
61
  __exportStar(require("./ScheduleScheduleOption"), exports);
55
62
  __exportStar(require("./SchemaAssociation"), exports);
@@ -66,7 +73,6 @@ __exportStar(require("./ApiKeyResponseEnvelope"), exports);
66
73
  __exportStar(require("./ActivateSyncEnvelope"), exports);
67
74
  __exportStar(require("./ActivateSyncInput"), exports);
68
75
  __exportStar(require("./ActivateSyncOutput"), exports);
69
- __exportStar(require("./BulkFilter"), exports);
70
76
  __exportStar(require("./BulkSyncDest"), exports);
71
77
  __exportStar(require("./BulkSyncDestEnvelope"), exports);
72
78
  __exportStar(require("./BulkSyncListEnvelope"), exports);
@@ -76,7 +82,6 @@ __exportStar(require("./CancelBulkSyncResponse"), exports);
76
82
  __exportStar(require("./CancelBulkSyncResponseEnvelope"), exports);
77
83
  __exportStar(require("./CancelModelSyncResponse"), exports);
78
84
  __exportStar(require("./CancelModelSyncResponseEnvelope"), exports);
79
- __exportStar(require("./ConfigurationValue"), exports);
80
85
  __exportStar(require("./V2ConnectionForm"), exports);
81
86
  __exportStar(require("./ConnectionListResponseEnvelope"), exports);
82
87
  __exportStar(require("./ConnectionMeta"), exports);
@@ -92,6 +97,8 @@ __exportStar(require("./ConnectionTypeSchema"), exports);
92
97
  __exportStar(require("./CreateConnectionResponseEnvelope"), exports);
93
98
  __exportStar(require("./CreateConnectionResponseSchema"), exports);
94
99
  __exportStar(require("./CreateModelRequest"), exports);
100
+ __exportStar(require("./V2CreateSharedConnectionResponseEnvelope"), exports);
101
+ __exportStar(require("./CreateSharedConnectionResponseSchema"), exports);
95
102
  __exportStar(require("./V2EnricherConfiguration"), exports);
96
103
  __exportStar(require("./V2EnricherMapping"), exports);
97
104
  __exportStar(require("./Enrichment"), exports);
@@ -132,7 +139,6 @@ __exportStar(require("./Organization"), exports);
132
139
  __exportStar(require("./OrganizationEnvelope"), exports);
133
140
  __exportStar(require("./OrganizationsEnvelope"), exports);
134
141
  __exportStar(require("./Override"), exports);
135
- __exportStar(require("./PaginationDetails"), exports);
136
142
  __exportStar(require("./PolicyAction"), exports);
137
143
  __exportStar(require("./PolicyResponse"), exports);
138
144
  __exportStar(require("./PolicyResponseEnvelope"), exports);
@@ -141,9 +147,7 @@ __exportStar(require("./RelationTo"), exports);
141
147
  __exportStar(require("./RoleListResponseEnvelope"), exports);
142
148
  __exportStar(require("./RoleResponse"), exports);
143
149
  __exportStar(require("./RoleResponseEnvelope"), exports);
144
- __exportStar(require("./RunAfter"), exports);
145
150
  __exportStar(require("./V2SampleRecord"), exports);
146
- __exportStar(require("./Schedule"), exports);
147
151
  __exportStar(require("./ScheduleOptionResponse"), exports);
148
152
  __exportStar(require("./ScheduleOptionResponseEnvelope"), exports);
149
153
  __exportStar(require("./V2SchemaConfigurationFieldsItem"), exports);
@@ -172,8 +176,10 @@ __exportStar(require("./BulkSchema"), exports);
172
176
  __exportStar(require("./BulkSchemaEnvelope"), exports);
173
177
  __exportStar(require("./BulkSyncExecution"), exports);
174
178
  __exportStar(require("./BulkSyncExecutionEnvelope"), exports);
179
+ __exportStar(require("./BulkSyncIngestionStatus"), exports);
175
180
  __exportStar(require("./BulkSyncSchemaExecution"), exports);
176
181
  __exportStar(require("./BulkSyncSource"), exports);
182
+ __exportStar(require("./V3BulkSyncSourceCapabilities"), exports);
177
183
  __exportStar(require("./BulkSyncSourceEnvelope"), exports);
178
184
  __exportStar(require("./BulkSyncSourceSchemaEnvelope"), exports);
179
185
  __exportStar(require("./BulkSyncSourceStatus"), exports);
@@ -182,6 +188,7 @@ __exportStar(require("./BulkSyncStatusEnvelope"), exports);
182
188
  __exportStar(require("./BulkSyncStatusResponse"), exports);
183
189
  __exportStar(require("./ConnectCardResponse"), exports);
184
190
  __exportStar(require("./ConnectCardResponseEnvelope"), exports);
191
+ __exportStar(require("./IngestionStatusLevel"), exports);
185
192
  __exportStar(require("./ListBulkSchema"), exports);
186
193
  __exportStar(require("./ListBulkSyncExecutionsEnvelope"), exports);
187
194
  __exportStar(require("./PickValue"), exports);
@@ -1,4 +1,4 @@
1
- export type BearerToken = string;
1
+ export declare type BearerToken = string;
2
2
  export declare const BearerToken: {
3
3
  toAuthorizationHeader: (token: BearerToken | undefined) => string | undefined;
4
4
  fromAuthorizationHeader: (header: string) => BearerToken;
@@ -1,4 +1,4 @@
1
- export type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
1
+ export declare type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
2
2
  export interface SuccessfulResponse<T> {
3
3
  ok: true;
4
4
  body: T;
@@ -1,20 +1,18 @@
1
1
  import { APIResponse } from "./APIResponse";
2
- export type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
2
+ export declare type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
3
3
  export declare namespace Fetcher {
4
4
  interface Args {
5
5
  url: string;
6
6
  method: string;
7
7
  contentType?: string;
8
8
  headers?: Record<string, string | undefined>;
9
- queryParameters?: Record<string, string | string[] | object | object[] | null>;
9
+ queryParameters?: Record<string, string | string[] | object | object[]>;
10
10
  body?: unknown;
11
11
  timeoutMs?: number;
12
12
  maxRetries?: number;
13
13
  withCredentials?: boolean;
14
14
  abortSignal?: AbortSignal;
15
- requestType?: "json" | "file" | "bytes";
16
- responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer";
17
- duplex?: "half";
15
+ responseType?: "json" | "blob" | "streaming" | "text";
18
16
  }
19
17
  type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
20
18
  interface FailedStatusCodeError {
@@ -35,5 +33,4 @@ export declare namespace Fetcher {
35
33
  errorMessage: string;
36
34
  }
37
35
  }
38
- export declare function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIResponse<R, Fetcher.Error>>;
39
36
  export declare const fetcher: FetchFunction;
@@ -1,4 +1,27 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
26
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
27
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -8,17 +31,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
31
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
32
  });
10
33
  };
34
+ var __importDefault = (this && this.__importDefault) || function (mod) {
35
+ return (mod && mod.__esModule) ? mod : { "default": mod };
36
+ };
11
37
  Object.defineProperty(exports, "__esModule", { value: true });
12
38
  exports.fetcher = void 0;
13
- exports.fetcherImpl = fetcherImpl;
14
- const json_1 = require("../json");
15
- const createRequestUrl_1 = require("./createRequestUrl");
16
- const getFetchFn_1 = require("./getFetchFn");
17
- const getRequestBody_1 = require("./getRequestBody");
18
- const getResponseBody_1 = require("./getResponseBody");
19
- const makeRequest_1 = require("./makeRequest");
20
- const requestWithRetries_1 = require("./requestWithRetries");
39
+ const qs_1 = __importDefault(require("qs"));
40
+ const runtime_1 = require("../runtime");
41
+ const INITIAL_RETRY_DELAY = 1;
42
+ const MAX_RETRY_DELAY = 60;
43
+ const DEFAULT_MAX_RETRIES = 2;
21
44
  function fetcherImpl(args) {
45
+ var _a, _b;
22
46
  return __awaiter(this, void 0, void 0, function* () {
23
47
  const headers = {};
24
48
  if (args.body !== undefined && args.contentType != null) {
@@ -31,21 +55,116 @@ function fetcherImpl(args) {
31
55
  }
32
56
  }
33
57
  }
34
- const url = (0, createRequestUrl_1.createRequestUrl)(args.url, args.queryParameters);
35
- const requestBody = yield (0, getRequestBody_1.getRequestBody)({
36
- body: args.body,
37
- type: args.requestType === "json" ? "json" : "other",
58
+ const url = Object.keys((_a = args.queryParameters) !== null && _a !== void 0 ? _a : {}).length > 0
59
+ ? `${args.url}?${qs_1.default.stringify(args.queryParameters, { arrayFormat: "repeat" })}`
60
+ : args.url;
61
+ let body = undefined;
62
+ const maybeStringifyBody = (body) => {
63
+ if (body instanceof Uint8Array) {
64
+ return body;
65
+ }
66
+ else if (args.contentType === "application/x-www-form-urlencoded" && typeof args.body === "string") {
67
+ return args.body;
68
+ }
69
+ else {
70
+ return JSON.stringify(body);
71
+ }
72
+ };
73
+ if (runtime_1.RUNTIME.type === "node") {
74
+ if (args.body instanceof (yield Promise.resolve().then(() => __importStar(require("formdata-node")))).FormData) {
75
+ // @ts-expect-error
76
+ body = args.body;
77
+ }
78
+ else if (args.body instanceof (yield Promise.resolve().then(() => __importStar(require("stream")))).Readable) {
79
+ // @ts-expect-error
80
+ body = args.body;
81
+ }
82
+ else {
83
+ body = maybeStringifyBody(args.body);
84
+ }
85
+ }
86
+ else {
87
+ if (args.body instanceof (yield Promise.resolve().then(() => __importStar(require("form-data")))).default) {
88
+ // @ts-expect-error
89
+ body = args.body;
90
+ }
91
+ else {
92
+ body = maybeStringifyBody(args.body);
93
+ }
94
+ }
95
+ const fetchFn = yield getFetchFn();
96
+ const makeRequest = () => __awaiter(this, void 0, void 0, function* () {
97
+ const signals = [];
98
+ // Add timeout signal
99
+ let timeoutAbortId = undefined;
100
+ if (args.timeoutMs != null) {
101
+ const { signal, abortId } = getTimeoutSignal(args.timeoutMs);
102
+ timeoutAbortId = abortId;
103
+ signals.push(signal);
104
+ }
105
+ // Add arbitrary signal
106
+ if (args.abortSignal != null) {
107
+ signals.push(args.abortSignal);
108
+ }
109
+ const response = yield fetchFn(url, {
110
+ method: args.method,
111
+ headers,
112
+ body,
113
+ signal: anySignal(signals),
114
+ credentials: args.withCredentials ? "include" : undefined,
115
+ });
116
+ if (timeoutAbortId != null) {
117
+ clearTimeout(timeoutAbortId);
118
+ }
119
+ return response;
38
120
  });
39
- const fetchFn = yield (0, getFetchFn_1.getFetchFn)();
40
121
  try {
41
- const response = yield (0, requestWithRetries_1.requestWithRetries)(() => __awaiter(this, void 0, void 0, function* () {
42
- return (0, makeRequest_1.makeRequest)(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex);
43
- }), args.maxRetries);
44
- const responseBody = yield (0, getResponseBody_1.getResponseBody)(response, args.responseType);
122
+ let response = yield makeRequest();
123
+ for (let i = 0; i < ((_b = args.maxRetries) !== null && _b !== void 0 ? _b : DEFAULT_MAX_RETRIES); ++i) {
124
+ if (response.status === 408 ||
125
+ response.status === 409 ||
126
+ response.status === 429 ||
127
+ response.status >= 500) {
128
+ const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(i, 2), MAX_RETRY_DELAY);
129
+ yield new Promise((resolve) => setTimeout(resolve, delay));
130
+ response = yield makeRequest();
131
+ }
132
+ else {
133
+ break;
134
+ }
135
+ }
136
+ let body;
137
+ if (response.body != null && args.responseType === "blob") {
138
+ body = yield response.blob();
139
+ }
140
+ else if (response.body != null && args.responseType === "streaming") {
141
+ body = response.body;
142
+ }
143
+ else if (response.body != null && args.responseType === "text") {
144
+ body = yield response.text();
145
+ }
146
+ else {
147
+ const text = yield response.text();
148
+ if (text.length > 0) {
149
+ try {
150
+ body = JSON.parse(text);
151
+ }
152
+ catch (err) {
153
+ return {
154
+ ok: false,
155
+ error: {
156
+ reason: "non-json",
157
+ statusCode: response.status,
158
+ rawBody: text,
159
+ },
160
+ };
161
+ }
162
+ }
163
+ }
45
164
  if (response.status >= 200 && response.status < 400) {
46
165
  return {
47
166
  ok: true,
48
- body: responseBody,
167
+ body: body,
49
168
  headers: response.headers,
50
169
  };
51
170
  }
@@ -55,7 +174,7 @@ function fetcherImpl(args) {
55
174
  error: {
56
175
  reason: "status-code",
57
176
  statusCode: response.status,
58
- body: responseBody,
177
+ body,
59
178
  },
60
179
  };
61
180
  }
@@ -91,10 +210,60 @@ function fetcherImpl(args) {
91
210
  ok: false,
92
211
  error: {
93
212
  reason: "unknown",
94
- errorMessage: (0, json_1.toJson)(error),
213
+ errorMessage: JSON.stringify(error),
95
214
  },
96
215
  };
97
216
  }
98
217
  });
99
218
  }
219
+ const TIMEOUT = "timeout";
220
+ function getTimeoutSignal(timeoutMs) {
221
+ const controller = new AbortController();
222
+ const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);
223
+ return { signal: controller.signal, abortId };
224
+ }
225
+ /**
226
+ * Returns an abort signal that is getting aborted when
227
+ * at least one of the specified abort signals is aborted.
228
+ *
229
+ * Requires at least node.js 18.
230
+ */
231
+ function anySignal(...args) {
232
+ // Allowing signals to be passed either as array
233
+ // of signals or as multiple arguments.
234
+ const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args);
235
+ const controller = new AbortController();
236
+ for (const signal of signals) {
237
+ if (signal.aborted) {
238
+ // Exiting early if one of the signals
239
+ // is already aborted.
240
+ controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason);
241
+ break;
242
+ }
243
+ // Listening for signals and removing the listeners
244
+ // when at least one symbol is aborted.
245
+ signal.addEventListener("abort", () => controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason), {
246
+ signal: controller.signal,
247
+ });
248
+ }
249
+ return controller.signal;
250
+ }
251
+ /**
252
+ * Returns a fetch function based on the runtime
253
+ */
254
+ function getFetchFn() {
255
+ return __awaiter(this, void 0, void 0, function* () {
256
+ // In Node.js environments, the SDK always uses`node-fetch`.
257
+ if (runtime_1.RUNTIME.type === "node") {
258
+ return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
259
+ }
260
+ // Otherwise the SDK uses global fetch if available,
261
+ // and falls back to node-fetch.
262
+ if (typeof fetch == "function") {
263
+ return fetch;
264
+ }
265
+ // Defaults to node `node-fetch` if global fetch isn't available
266
+ return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
267
+ });
268
+ }
100
269
  exports.fetcher = fetcherImpl;
@@ -1,4 +1,4 @@
1
- export type Supplier<T> = T | Promise<T> | (() => T | Promise<T>);
1
+ export declare type Supplier<T> = T | Promise<T> | (() => T | Promise<T>);
2
2
  export declare const Supplier: {
3
3
  get: <T>(supplier: Supplier<T>) => Promise<T>;
4
4
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getHeader = getHeader;
3
+ exports.getHeader = void 0;
4
4
  function getHeader(headers, header) {
5
5
  for (const [headerKey, headerValue] of Object.entries(headers)) {
6
6
  if (headerKey.toLowerCase() === header.toLowerCase()) {
@@ -9,3 +9,4 @@ function getHeader(headers, header) {
9
9
  }
10
10
  return undefined;
11
11
  }
12
+ exports.getHeader = getHeader;
@@ -3,7 +3,6 @@
3
3
  */
4
4
  export declare const RUNTIME: Runtime;
5
5
  export interface Runtime {
6
- type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd" | "edge-runtime";
6
+ type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd";
7
7
  version?: string;
8
- parsedVersion?: number;
9
8
  }