polytomic 0.0.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 (869) hide show
  1. package/Client.d.ts +50 -0
  2. package/Client.js +62 -0
  3. package/LICENSE +21 -0
  4. package/README.md +109 -0
  5. package/api/errors/UnauthorizedError.d.ts +8 -0
  6. package/api/errors/UnauthorizedError.js +41 -0
  7. package/api/errors/index.d.ts +1 -0
  8. package/api/errors/index.js +17 -0
  9. package/api/index.d.ts +3 -0
  10. package/api/index.js +19 -0
  11. package/api/resources/bulkSync/client/Client.d.ts +126 -0
  12. package/api/resources/bulkSync/client/Client.js +710 -0
  13. package/api/resources/bulkSync/client/index.d.ts +1 -0
  14. package/api/resources/bulkSync/client/index.js +17 -0
  15. package/api/resources/bulkSync/client/requests/BulkSyncGetRequest.d.ts +10 -0
  16. package/api/resources/bulkSync/client/requests/BulkSyncGetRequest.js +5 -0
  17. package/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +11 -0
  18. package/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.js +5 -0
  19. package/api/resources/bulkSync/client/requests/BulkSyncRemoveRequest.d.ts +10 -0
  20. package/api/resources/bulkSync/client/requests/BulkSyncRemoveRequest.js +5 -0
  21. package/api/resources/bulkSync/client/requests/V2CreateBulkSyncRequest.d.ts +34 -0
  22. package/api/resources/bulkSync/client/requests/V2CreateBulkSyncRequest.js +5 -0
  23. package/api/resources/bulkSync/client/requests/V2UpdateBulkSyncRequest.d.ts +29 -0
  24. package/api/resources/bulkSync/client/requests/V2UpdateBulkSyncRequest.js +5 -0
  25. package/api/resources/bulkSync/client/requests/index.d.ts +5 -0
  26. package/api/resources/bulkSync/client/requests/index.js +2 -0
  27. package/api/resources/bulkSync/index.d.ts +2 -0
  28. package/api/resources/bulkSync/index.js +18 -0
  29. package/api/resources/bulkSync/resources/executions/client/Client.d.ts +43 -0
  30. package/api/resources/bulkSync/resources/executions/client/Client.js +224 -0
  31. package/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -0
  32. package/api/resources/bulkSync/resources/executions/client/index.js +17 -0
  33. package/api/resources/bulkSync/resources/executions/client/requests/V3StartBulkSyncRequest.d.ts +12 -0
  34. package/api/resources/bulkSync/resources/executions/client/requests/V3StartBulkSyncRequest.js +5 -0
  35. package/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
  36. package/api/resources/bulkSync/resources/executions/client/requests/index.js +2 -0
  37. package/api/resources/bulkSync/resources/executions/index.d.ts +1 -0
  38. package/api/resources/bulkSync/resources/executions/index.js +17 -0
  39. package/api/resources/bulkSync/resources/index.d.ts +4 -0
  40. package/api/resources/bulkSync/resources/index.js +33 -0
  41. package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +43 -0
  42. package/api/resources/bulkSync/resources/schemas/client/Client.js +224 -0
  43. package/api/resources/bulkSync/resources/schemas/client/index.d.ts +1 -0
  44. package/api/resources/bulkSync/resources/schemas/client/index.js +17 -0
  45. package/api/resources/bulkSync/resources/schemas/client/requests/V3UpdateBulkSchema.d.ts +13 -0
  46. package/api/resources/bulkSync/resources/schemas/client/requests/V3UpdateBulkSchema.js +5 -0
  47. package/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +1 -0
  48. package/api/resources/bulkSync/resources/schemas/client/requests/index.js +2 -0
  49. package/api/resources/bulkSync/resources/schemas/index.d.ts +1 -0
  50. package/api/resources/bulkSync/resources/schemas/index.js +17 -0
  51. package/api/resources/connections/client/Client.d.ts +111 -0
  52. package/api/resources/connections/client/Client.js +729 -0
  53. package/api/resources/connections/client/index.d.ts +1 -0
  54. package/api/resources/connections/client/index.js +17 -0
  55. package/api/resources/connections/client/requests/ConnectionsGetTargetRequest.d.ts +11 -0
  56. package/api/resources/connections/client/requests/ConnectionsGetTargetRequest.js +5 -0
  57. package/api/resources/connections/client/requests/ConnectionsRemoveRequest.d.ts +10 -0
  58. package/api/resources/connections/client/requests/ConnectionsRemoveRequest.js +5 -0
  59. package/api/resources/connections/client/requests/V2CreateConnectionRequestSchema.d.ts +21 -0
  60. package/api/resources/connections/client/requests/V2CreateConnectionRequestSchema.js +5 -0
  61. package/api/resources/connections/client/requests/V2ModelFieldsRequest.d.ts +10 -0
  62. package/api/resources/connections/client/requests/V2ModelFieldsRequest.js +5 -0
  63. package/api/resources/connections/client/requests/V2TargetRequest.d.ts +13 -0
  64. package/api/resources/connections/client/requests/V2TargetRequest.js +5 -0
  65. package/api/resources/connections/client/requests/V2UpdateConnectionRequestSchema.d.ts +19 -0
  66. package/api/resources/connections/client/requests/V2UpdateConnectionRequestSchema.js +5 -0
  67. package/api/resources/connections/client/requests/V3ConnectCardRequest.d.ts +19 -0
  68. package/api/resources/connections/client/requests/V3ConnectCardRequest.js +5 -0
  69. package/api/resources/connections/client/requests/index.d.ts +7 -0
  70. package/api/resources/connections/client/requests/index.js +2 -0
  71. package/api/resources/connections/index.d.ts +1 -0
  72. package/api/resources/connections/index.js +17 -0
  73. package/api/resources/events/client/Client.d.ts +40 -0
  74. package/api/resources/events/client/Client.js +191 -0
  75. package/api/resources/events/client/index.d.ts +1 -0
  76. package/api/resources/events/client/index.js +17 -0
  77. package/api/resources/events/client/requests/EventsApiV2GetEventsRequest.d.ts +18 -0
  78. package/api/resources/events/client/requests/EventsApiV2GetEventsRequest.js +5 -0
  79. package/api/resources/events/client/requests/index.d.ts +1 -0
  80. package/api/resources/events/client/requests/index.js +2 -0
  81. package/api/resources/events/index.d.ts +1 -0
  82. package/api/resources/events/index.js +17 -0
  83. package/api/resources/index.d.ts +19 -0
  84. package/api/resources/index.js +48 -0
  85. package/api/resources/modelSync/client/Client.d.ts +131 -0
  86. package/api/resources/modelSync/client/Client.js +552 -0
  87. package/api/resources/modelSync/client/index.d.ts +1 -0
  88. package/api/resources/modelSync/client/index.js +17 -0
  89. package/api/resources/modelSync/client/requests/V2CreateSyncRequest.d.ts +48 -0
  90. package/api/resources/modelSync/client/requests/V2CreateSyncRequest.js +5 -0
  91. package/api/resources/modelSync/client/requests/V2StartSyncRequest.d.ts +10 -0
  92. package/api/resources/modelSync/client/requests/V2StartSyncRequest.js +5 -0
  93. package/api/resources/modelSync/client/requests/V2UpdateSyncRequest.d.ts +48 -0
  94. package/api/resources/modelSync/client/requests/V2UpdateSyncRequest.js +5 -0
  95. package/api/resources/modelSync/client/requests/index.d.ts +3 -0
  96. package/api/resources/modelSync/client/requests/index.js +2 -0
  97. package/api/resources/modelSync/index.d.ts +3 -0
  98. package/api/resources/modelSync/index.js +19 -0
  99. package/api/resources/modelSync/resources/executions/client/Client.d.ts +36 -0
  100. package/api/resources/modelSync/resources/executions/client/Client.js +169 -0
  101. package/api/resources/modelSync/resources/executions/client/index.d.ts +1 -0
  102. package/api/resources/modelSync/resources/executions/client/index.js +2 -0
  103. package/api/resources/modelSync/resources/executions/index.d.ts +1 -0
  104. package/api/resources/modelSync/resources/executions/index.js +17 -0
  105. package/api/resources/modelSync/resources/index.d.ts +1 -0
  106. package/api/resources/modelSync/resources/index.js +27 -0
  107. package/api/resources/modelSync/types/V2CreateSyncRequestMode.d.ts +12 -0
  108. package/api/resources/modelSync/types/V2CreateSyncRequestMode.js +14 -0
  109. package/api/resources/modelSync/types/V2UpdateSyncRequestMode.d.ts +12 -0
  110. package/api/resources/modelSync/types/V2UpdateSyncRequestMode.js +14 -0
  111. package/api/resources/modelSync/types/index.d.ts +2 -0
  112. package/api/resources/modelSync/types/index.js +18 -0
  113. package/api/resources/models/client/Client.d.ts +63 -0
  114. package/api/resources/models/client/Client.js +339 -0
  115. package/api/resources/models/client/index.d.ts +1 -0
  116. package/api/resources/models/client/index.js +17 -0
  117. package/api/resources/models/client/requests/V2CreateModelRequest.d.ts +24 -0
  118. package/api/resources/models/client/requests/V2CreateModelRequest.js +5 -0
  119. package/api/resources/models/client/requests/V2UpdateModelRequest.d.ts +24 -0
  120. package/api/resources/models/client/requests/V2UpdateModelRequest.js +5 -0
  121. package/api/resources/models/client/requests/index.d.ts +2 -0
  122. package/api/resources/models/client/requests/index.js +2 -0
  123. package/api/resources/models/index.d.ts +1 -0
  124. package/api/resources/models/index.js +17 -0
  125. package/api/resources/organization/client/Client.d.ts +76 -0
  126. package/api/resources/organization/client/Client.js +352 -0
  127. package/api/resources/organization/client/index.d.ts +1 -0
  128. package/api/resources/organization/client/index.js +17 -0
  129. package/api/resources/organization/client/requests/V2CreateOrganizationRequestSchema.d.ts +17 -0
  130. package/api/resources/organization/client/requests/V2CreateOrganizationRequestSchema.js +5 -0
  131. package/api/resources/organization/client/requests/V2UpdateOrganizationRequestSchema.d.ts +17 -0
  132. package/api/resources/organization/client/requests/V2UpdateOrganizationRequestSchema.js +5 -0
  133. package/api/resources/organization/client/requests/index.d.ts +2 -0
  134. package/api/resources/organization/client/requests/index.js +2 -0
  135. package/api/resources/organization/index.d.ts +1 -0
  136. package/api/resources/organization/index.js +17 -0
  137. package/api/resources/permissions/client/Client.d.ts +26 -0
  138. package/api/resources/permissions/client/Client.js +22 -0
  139. package/api/resources/permissions/client/index.d.ts +1 -0
  140. package/api/resources/permissions/client/index.js +2 -0
  141. package/api/resources/permissions/index.d.ts +2 -0
  142. package/api/resources/permissions/index.js +18 -0
  143. package/api/resources/permissions/resources/index.d.ts +4 -0
  144. package/api/resources/permissions/resources/index.js +33 -0
  145. package/api/resources/permissions/resources/policies/client/Client.d.ts +69 -0
  146. package/api/resources/permissions/resources/policies/client/Client.js +345 -0
  147. package/api/resources/permissions/resources/policies/client/index.d.ts +1 -0
  148. package/api/resources/permissions/resources/policies/client/index.js +17 -0
  149. package/api/resources/permissions/resources/policies/client/requests/V2CreatePolicyRequest.d.ts +19 -0
  150. package/api/resources/permissions/resources/policies/client/requests/V2CreatePolicyRequest.js +5 -0
  151. package/api/resources/permissions/resources/policies/client/requests/V2UpdatePolicyRequest.d.ts +19 -0
  152. package/api/resources/permissions/resources/policies/client/requests/V2UpdatePolicyRequest.js +5 -0
  153. package/api/resources/permissions/resources/policies/client/requests/index.d.ts +2 -0
  154. package/api/resources/permissions/resources/policies/client/requests/index.js +2 -0
  155. package/api/resources/permissions/resources/policies/index.d.ts +1 -0
  156. package/api/resources/permissions/resources/policies/index.js +17 -0
  157. package/api/resources/permissions/resources/roles/client/Client.d.ts +61 -0
  158. package/api/resources/permissions/resources/roles/client/Client.js +337 -0
  159. package/api/resources/permissions/resources/roles/client/index.d.ts +1 -0
  160. package/api/resources/permissions/resources/roles/client/index.js +17 -0
  161. package/api/resources/permissions/resources/roles/client/requests/V2CreateRoleRequest.d.ts +13 -0
  162. package/api/resources/permissions/resources/roles/client/requests/V2CreateRoleRequest.js +5 -0
  163. package/api/resources/permissions/resources/roles/client/requests/V2UpdateRoleRequest.d.ts +13 -0
  164. package/api/resources/permissions/resources/roles/client/requests/V2UpdateRoleRequest.js +5 -0
  165. package/api/resources/permissions/resources/roles/client/requests/index.d.ts +2 -0
  166. package/api/resources/permissions/resources/roles/client/requests/index.js +2 -0
  167. package/api/resources/permissions/resources/roles/index.d.ts +1 -0
  168. package/api/resources/permissions/resources/roles/index.js +17 -0
  169. package/api/resources/schemas/client/Client.d.ts +29 -0
  170. package/api/resources/schemas/client/Client.js +115 -0
  171. package/api/resources/schemas/client/index.d.ts +1 -0
  172. package/api/resources/schemas/client/index.js +2 -0
  173. package/api/resources/schemas/index.d.ts +1 -0
  174. package/api/resources/schemas/index.js +17 -0
  175. package/api/resources/users/client/Client.d.ts +86 -0
  176. package/api/resources/users/client/Client.js +415 -0
  177. package/api/resources/users/client/index.d.ts +1 -0
  178. package/api/resources/users/client/index.js +17 -0
  179. package/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +10 -0
  180. package/api/resources/users/client/requests/UsersCreateApiKeyRequest.js +5 -0
  181. package/api/resources/users/client/requests/V2CreateUserRequestSchema.d.ts +13 -0
  182. package/api/resources/users/client/requests/V2CreateUserRequestSchema.js +5 -0
  183. package/api/resources/users/client/requests/V2UpdateUserRequestSchema.d.ts +13 -0
  184. package/api/resources/users/client/requests/V2UpdateUserRequestSchema.js +5 -0
  185. package/api/resources/users/client/requests/index.d.ts +3 -0
  186. package/api/resources/users/client/requests/index.js +2 -0
  187. package/api/resources/users/index.d.ts +1 -0
  188. package/api/resources/users/index.js +17 -0
  189. package/api/resources/webhooks/client/Client.d.ts +83 -0
  190. package/api/resources/webhooks/client/Client.js +359 -0
  191. package/api/resources/webhooks/client/index.d.ts +1 -0
  192. package/api/resources/webhooks/client/index.js +17 -0
  193. package/api/resources/webhooks/client/requests/V2CreateWebhooksSchema.d.ts +15 -0
  194. package/api/resources/webhooks/client/requests/V2CreateWebhooksSchema.js +5 -0
  195. package/api/resources/webhooks/client/requests/V2UpdateWebhooksSchema.d.ts +15 -0
  196. package/api/resources/webhooks/client/requests/V2UpdateWebhooksSchema.js +5 -0
  197. package/api/resources/webhooks/client/requests/index.d.ts +2 -0
  198. package/api/resources/webhooks/client/requests/index.js +2 -0
  199. package/api/resources/webhooks/index.d.ts +1 -0
  200. package/api/resources/webhooks/index.js +17 -0
  201. package/api/types/BulkSchedule.d.ts +11 -0
  202. package/api/types/BulkSchedule.js +5 -0
  203. package/api/types/LabelLabel.d.ts +4 -0
  204. package/api/types/LabelLabel.js +5 -0
  205. package/api/types/RestErrResponse.d.ts +13 -0
  206. package/api/types/RestErrResponse.js +5 -0
  207. package/api/types/SchemaAssociation.d.ts +9 -0
  208. package/api/types/SchemaAssociation.js +5 -0
  209. package/api/types/SyncDestinationProperties.d.ts +15 -0
  210. package/api/types/SyncDestinationProperties.js +5 -0
  211. package/api/types/V2ActivateSyncEnvelope.d.ts +7 -0
  212. package/api/types/V2ActivateSyncEnvelope.js +5 -0
  213. package/api/types/V2ActivateSyncInput.d.ts +6 -0
  214. package/api/types/V2ActivateSyncInput.js +5 -0
  215. package/api/types/V2ActivateSyncOutput.d.ts +7 -0
  216. package/api/types/V2ActivateSyncOutput.js +5 -0
  217. package/api/types/V2ApiKeyResponse.d.ts +6 -0
  218. package/api/types/V2ApiKeyResponse.js +5 -0
  219. package/api/types/V2ApiKeyResponseEnvelope.d.ts +7 -0
  220. package/api/types/V2ApiKeyResponseEnvelope.js +5 -0
  221. package/api/types/V2BulkSyncDest.d.ts +8 -0
  222. package/api/types/V2BulkSyncDest.js +5 -0
  223. package/api/types/V2BulkSyncDestEnvelope.d.ts +7 -0
  224. package/api/types/V2BulkSyncDestEnvelope.js +5 -0
  225. package/api/types/V2BulkSyncListEnvelope.d.ts +7 -0
  226. package/api/types/V2BulkSyncListEnvelope.js +5 -0
  227. package/api/types/V2BulkSyncResponse.d.ts +18 -0
  228. package/api/types/V2BulkSyncResponse.js +5 -0
  229. package/api/types/V2BulkSyncResponseEnvelope.d.ts +7 -0
  230. package/api/types/V2BulkSyncResponseEnvelope.js +5 -0
  231. package/api/types/V2ConfigurationValue.d.ts +7 -0
  232. package/api/types/V2ConfigurationValue.js +5 -0
  233. package/api/types/V2ConnectionListResponseEnvelope.d.ts +7 -0
  234. package/api/types/V2ConnectionListResponseEnvelope.js +5 -0
  235. package/api/types/V2ConnectionMeta.d.ts +8 -0
  236. package/api/types/V2ConnectionMeta.js +5 -0
  237. package/api/types/V2ConnectionMetaResponse.d.ts +9 -0
  238. package/api/types/V2ConnectionMetaResponse.js +5 -0
  239. package/api/types/V2ConnectionResponseEnvelope.d.ts +7 -0
  240. package/api/types/V2ConnectionResponseEnvelope.js +5 -0
  241. package/api/types/V2ConnectionResponseSchema.d.ts +14 -0
  242. package/api/types/V2ConnectionResponseSchema.js +5 -0
  243. package/api/types/V2ConnectionType.d.ts +9 -0
  244. package/api/types/V2ConnectionType.js +5 -0
  245. package/api/types/V2ConnectionTypeResponseEnvelope.d.ts +7 -0
  246. package/api/types/V2ConnectionTypeResponseEnvelope.js +5 -0
  247. package/api/types/V2ConnectionTypeSchema.d.ts +7 -0
  248. package/api/types/V2ConnectionTypeSchema.js +5 -0
  249. package/api/types/V2CreateConnectionResponseEnvelope.d.ts +7 -0
  250. package/api/types/V2CreateConnectionResponseEnvelope.js +5 -0
  251. package/api/types/V2CreateConnectionResponseSchema.d.ts +18 -0
  252. package/api/types/V2CreateConnectionResponseSchema.js +5 -0
  253. package/api/types/V2Event.d.ts +10 -0
  254. package/api/types/V2Event.js +5 -0
  255. package/api/types/V2EventTypesEnvelope.d.ts +6 -0
  256. package/api/types/V2EventTypesEnvelope.js +5 -0
  257. package/api/types/V2EventsEnvelope.d.ts +7 -0
  258. package/api/types/V2EventsEnvelope.js +5 -0
  259. package/api/types/V2ExecutionCounts.d.ts +9 -0
  260. package/api/types/V2ExecutionCounts.js +5 -0
  261. package/api/types/V2Filter.d.ts +10 -0
  262. package/api/types/V2Filter.js +5 -0
  263. package/api/types/V2GetConnectionMetaEnvelope.d.ts +7 -0
  264. package/api/types/V2GetConnectionMetaEnvelope.js +5 -0
  265. package/api/types/V2GetExecutionResponseEnvelope.d.ts +7 -0
  266. package/api/types/V2GetExecutionResponseEnvelope.js +5 -0
  267. package/api/types/V2GetExecutionResponseSchema.d.ts +14 -0
  268. package/api/types/V2GetExecutionResponseSchema.js +5 -0
  269. package/api/types/V2GetIdentityResponseEnvelope.d.ts +7 -0
  270. package/api/types/V2GetIdentityResponseEnvelope.js +5 -0
  271. package/api/types/V2GetIdentityResponseSchema.d.ts +14 -0
  272. package/api/types/V2GetIdentityResponseSchema.js +5 -0
  273. package/api/types/V2Identity.d.ts +11 -0
  274. package/api/types/V2Identity.js +5 -0
  275. package/api/types/V2IdentityFunction.d.ts +7 -0
  276. package/api/types/V2IdentityFunction.js +5 -0
  277. package/api/types/V2ListExecutionResponseEnvelope.d.ts +7 -0
  278. package/api/types/V2ListExecutionResponseEnvelope.js +5 -0
  279. package/api/types/V2ListPoliciesResponseEnvelope.d.ts +7 -0
  280. package/api/types/V2ListPoliciesResponseEnvelope.js +5 -0
  281. package/api/types/V2ListSyncResponseEnvelope.d.ts +7 -0
  282. package/api/types/V2ListSyncResponseEnvelope.js +5 -0
  283. package/api/types/V2ListUsersEnvelope.d.ts +7 -0
  284. package/api/types/V2ListUsersEnvelope.js +5 -0
  285. package/api/types/V2Mode.d.ts +11 -0
  286. package/api/types/V2Mode.js +5 -0
  287. package/api/types/V2ModelField.d.ts +13 -0
  288. package/api/types/V2ModelField.js +5 -0
  289. package/api/types/V2ModelFieldRequest.d.ts +9 -0
  290. package/api/types/V2ModelFieldRequest.js +5 -0
  291. package/api/types/V2ModelFieldResponse.d.ts +7 -0
  292. package/api/types/V2ModelFieldResponse.js +5 -0
  293. package/api/types/V2ModelListResponseEnvelope.d.ts +7 -0
  294. package/api/types/V2ModelListResponseEnvelope.js +5 -0
  295. package/api/types/V2ModelResponse.d.ts +19 -0
  296. package/api/types/V2ModelResponse.js +5 -0
  297. package/api/types/V2ModelResponseEnvelope.d.ts +7 -0
  298. package/api/types/V2ModelResponseEnvelope.js +5 -0
  299. package/api/types/V2Organization.d.ts +10 -0
  300. package/api/types/V2Organization.js +5 -0
  301. package/api/types/V2OrganizationEnvelope.d.ts +7 -0
  302. package/api/types/V2OrganizationEnvelope.js +5 -0
  303. package/api/types/V2OrganizationsEnvelope.d.ts +7 -0
  304. package/api/types/V2OrganizationsEnvelope.js +5 -0
  305. package/api/types/V2Override.d.ts +9 -0
  306. package/api/types/V2Override.js +5 -0
  307. package/api/types/V2PolicyAction.d.ts +7 -0
  308. package/api/types/V2PolicyAction.js +5 -0
  309. package/api/types/V2PolicyResponse.d.ts +11 -0
  310. package/api/types/V2PolicyResponse.js +5 -0
  311. package/api/types/V2PolicyResponseEnvelope.d.ts +7 -0
  312. package/api/types/V2PolicyResponseEnvelope.js +5 -0
  313. package/api/types/V2Relation.d.ts +8 -0
  314. package/api/types/V2Relation.js +5 -0
  315. package/api/types/V2RelationTo.d.ts +7 -0
  316. package/api/types/V2RelationTo.js +5 -0
  317. package/api/types/V2RoleListResponseEnvelope.d.ts +7 -0
  318. package/api/types/V2RoleListResponseEnvelope.js +5 -0
  319. package/api/types/V2RoleResponse.d.ts +9 -0
  320. package/api/types/V2RoleResponse.js +5 -0
  321. package/api/types/V2RoleResponseEnvelope.d.ts +7 -0
  322. package/api/types/V2RoleResponseEnvelope.js +5 -0
  323. package/api/types/V2RunAfter.d.ts +7 -0
  324. package/api/types/V2RunAfter.js +5 -0
  325. package/api/types/V2Schedule.d.ts +13 -0
  326. package/api/types/V2Schedule.js +5 -0
  327. package/api/types/V2Source.d.ts +7 -0
  328. package/api/types/V2Source.js +5 -0
  329. package/api/types/V2StartSyncResponseEnvelope.d.ts +7 -0
  330. package/api/types/V2StartSyncResponseEnvelope.js +5 -0
  331. package/api/types/V2StartSyncResponseSchema.d.ts +8 -0
  332. package/api/types/V2StartSyncResponseSchema.js +5 -0
  333. package/api/types/V2SupportedMode.d.ts +12 -0
  334. package/api/types/V2SupportedMode.js +5 -0
  335. package/api/types/V2SyncField.d.ts +11 -0
  336. package/api/types/V2SyncField.js +5 -0
  337. package/api/types/V2SyncResponse.d.ts +21 -0
  338. package/api/types/V2SyncResponse.js +5 -0
  339. package/api/types/V2SyncResponseEnvelope.d.ts +7 -0
  340. package/api/types/V2SyncResponseEnvelope.js +5 -0
  341. package/api/types/V2SyncStatusEnvelope.d.ts +7 -0
  342. package/api/types/V2SyncStatusEnvelope.js +5 -0
  343. package/api/types/V2SyncStatusResponse.d.ts +9 -0
  344. package/api/types/V2SyncStatusResponse.js +5 -0
  345. package/api/types/V2Target.d.ts +11 -0
  346. package/api/types/V2Target.js +5 -0
  347. package/api/types/V2TargetField.d.ts +18 -0
  348. package/api/types/V2TargetField.js +5 -0
  349. package/api/types/V2TargetResponse.d.ts +12 -0
  350. package/api/types/V2TargetResponse.js +5 -0
  351. package/api/types/V2TargetResponseEnvelope.d.ts +7 -0
  352. package/api/types/V2TargetResponseEnvelope.js +5 -0
  353. package/api/types/V2User.d.ts +9 -0
  354. package/api/types/V2User.js +5 -0
  355. package/api/types/V2UserEnvelope.d.ts +7 -0
  356. package/api/types/V2UserEnvelope.js +5 -0
  357. package/api/types/V2Webhook.d.ts +10 -0
  358. package/api/types/V2Webhook.js +5 -0
  359. package/api/types/V2WebhookEnvelope.d.ts +7 -0
  360. package/api/types/V2WebhookEnvelope.js +5 -0
  361. package/api/types/V2WebhookListEnvelope.d.ts +7 -0
  362. package/api/types/V2WebhookListEnvelope.js +5 -0
  363. package/api/types/V3BulkField.d.ts +8 -0
  364. package/api/types/V3BulkField.js +5 -0
  365. package/api/types/V3BulkSchema.d.ts +10 -0
  366. package/api/types/V3BulkSchema.js +5 -0
  367. package/api/types/V3BulkSchemaEnvelope.d.ts +7 -0
  368. package/api/types/V3BulkSchemaEnvelope.js +5 -0
  369. package/api/types/V3BulkSyncExecution.d.ts +15 -0
  370. package/api/types/V3BulkSyncExecution.js +5 -0
  371. package/api/types/V3BulkSyncExecutionEnvelope.d.ts +7 -0
  372. package/api/types/V3BulkSyncExecutionEnvelope.js +5 -0
  373. package/api/types/V3BulkSyncSchemaExecution.d.ts +12 -0
  374. package/api/types/V3BulkSyncSchemaExecution.js +5 -0
  375. package/api/types/V3BulkSyncSource.d.ts +8 -0
  376. package/api/types/V3BulkSyncSource.js +5 -0
  377. package/api/types/V3BulkSyncSourceEnvelope.d.ts +7 -0
  378. package/api/types/V3BulkSyncSourceEnvelope.js +5 -0
  379. package/api/types/V3BulkSyncSourceSchemaEnvelope.d.ts +7 -0
  380. package/api/types/V3BulkSyncSourceSchemaEnvelope.js +5 -0
  381. package/api/types/V3BulkSyncSourceStatus.d.ts +8 -0
  382. package/api/types/V3BulkSyncSourceStatus.js +5 -0
  383. package/api/types/V3BulkSyncSourceStatusEnvelope.d.ts +7 -0
  384. package/api/types/V3BulkSyncSourceStatusEnvelope.js +5 -0
  385. package/api/types/V3BulkSyncStatusEnvelope.d.ts +7 -0
  386. package/api/types/V3BulkSyncStatusEnvelope.js +5 -0
  387. package/api/types/V3BulkSyncStatusResponse.d.ts +9 -0
  388. package/api/types/V3BulkSyncStatusResponse.js +5 -0
  389. package/api/types/V3ConnectCardResponse.d.ts +7 -0
  390. package/api/types/V3ConnectCardResponse.js +5 -0
  391. package/api/types/V3ConnectCardResponseEnvelope.d.ts +7 -0
  392. package/api/types/V3ConnectCardResponseEnvelope.js +5 -0
  393. package/api/types/V3ListBulkSchemaEnvelope.d.ts +7 -0
  394. package/api/types/V3ListBulkSchemaEnvelope.js +5 -0
  395. package/api/types/V3ListBulkSyncExecutionsEnvelope.d.ts +7 -0
  396. package/api/types/V3ListBulkSyncExecutionsEnvelope.js +5 -0
  397. package/api/types/V3PickValue.d.ts +7 -0
  398. package/api/types/V3PickValue.js +5 -0
  399. package/api/types/V3Schema.d.ts +9 -0
  400. package/api/types/V3Schema.js +5 -0
  401. package/api/types/V3SchemaField.d.ts +12 -0
  402. package/api/types/V3SchemaField.js +5 -0
  403. package/api/types/V3SchemaRecordsResponseEnvelope.d.ts +6 -0
  404. package/api/types/V3SchemaRecordsResponseEnvelope.js +5 -0
  405. package/api/types/index.d.ts +102 -0
  406. package/api/types/index.js +118 -0
  407. package/core/auth/BasicAuth.d.ts +8 -0
  408. package/core/auth/BasicAuth.js +26 -0
  409. package/core/auth/BearerToken.d.ts +5 -0
  410. package/core/auth/BearerToken.js +15 -0
  411. package/core/auth/index.d.ts +2 -0
  412. package/core/auth/index.js +7 -0
  413. package/core/fetcher/APIResponse.d.ts +10 -0
  414. package/core/fetcher/APIResponse.js +2 -0
  415. package/core/fetcher/Fetcher.d.ts +35 -0
  416. package/core/fetcher/Fetcher.js +151 -0
  417. package/core/fetcher/Supplier.d.ts +4 -0
  418. package/core/fetcher/Supplier.js +22 -0
  419. package/core/fetcher/getHeader.d.ts +1 -0
  420. package/core/fetcher/getHeader.js +12 -0
  421. package/core/fetcher/index.d.ts +5 -0
  422. package/core/fetcher/index.js +9 -0
  423. package/core/index.d.ts +2 -0
  424. package/core/index.js +18 -0
  425. package/dist/Client.d.ts +50 -0
  426. package/dist/Client.js +62 -0
  427. package/dist/api/errors/UnauthorizedError.d.ts +8 -0
  428. package/dist/api/errors/UnauthorizedError.js +41 -0
  429. package/dist/api/errors/index.d.ts +1 -0
  430. package/dist/api/errors/index.js +17 -0
  431. package/dist/api/index.d.ts +3 -0
  432. package/dist/api/index.js +19 -0
  433. package/dist/api/resources/bulkSync/client/Client.d.ts +126 -0
  434. package/dist/api/resources/bulkSync/client/Client.js +710 -0
  435. package/dist/api/resources/bulkSync/client/index.d.ts +1 -0
  436. package/dist/api/resources/bulkSync/client/index.js +17 -0
  437. package/dist/api/resources/bulkSync/client/requests/BulkSyncGetRequest.d.ts +10 -0
  438. package/dist/api/resources/bulkSync/client/requests/BulkSyncGetRequest.js +5 -0
  439. package/dist/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +11 -0
  440. package/dist/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.js +5 -0
  441. package/dist/api/resources/bulkSync/client/requests/BulkSyncRemoveRequest.d.ts +10 -0
  442. package/dist/api/resources/bulkSync/client/requests/BulkSyncRemoveRequest.js +5 -0
  443. package/dist/api/resources/bulkSync/client/requests/V2CreateBulkSyncRequest.d.ts +34 -0
  444. package/dist/api/resources/bulkSync/client/requests/V2CreateBulkSyncRequest.js +5 -0
  445. package/dist/api/resources/bulkSync/client/requests/V2UpdateBulkSyncRequest.d.ts +29 -0
  446. package/dist/api/resources/bulkSync/client/requests/V2UpdateBulkSyncRequest.js +5 -0
  447. package/dist/api/resources/bulkSync/client/requests/index.d.ts +5 -0
  448. package/dist/api/resources/bulkSync/client/requests/index.js +2 -0
  449. package/dist/api/resources/bulkSync/index.d.ts +2 -0
  450. package/dist/api/resources/bulkSync/index.js +18 -0
  451. package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +43 -0
  452. package/dist/api/resources/bulkSync/resources/executions/client/Client.js +224 -0
  453. package/dist/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -0
  454. package/dist/api/resources/bulkSync/resources/executions/client/index.js +17 -0
  455. package/dist/api/resources/bulkSync/resources/executions/client/requests/V3StartBulkSyncRequest.d.ts +12 -0
  456. package/dist/api/resources/bulkSync/resources/executions/client/requests/V3StartBulkSyncRequest.js +5 -0
  457. package/dist/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
  458. package/dist/api/resources/bulkSync/resources/executions/client/requests/index.js +2 -0
  459. package/dist/api/resources/bulkSync/resources/executions/index.d.ts +1 -0
  460. package/dist/api/resources/bulkSync/resources/executions/index.js +17 -0
  461. package/dist/api/resources/bulkSync/resources/index.d.ts +4 -0
  462. package/dist/api/resources/bulkSync/resources/index.js +33 -0
  463. package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +43 -0
  464. package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +224 -0
  465. package/dist/api/resources/bulkSync/resources/schemas/client/index.d.ts +1 -0
  466. package/dist/api/resources/bulkSync/resources/schemas/client/index.js +17 -0
  467. package/dist/api/resources/bulkSync/resources/schemas/client/requests/V3UpdateBulkSchema.d.ts +13 -0
  468. package/dist/api/resources/bulkSync/resources/schemas/client/requests/V3UpdateBulkSchema.js +5 -0
  469. package/dist/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +1 -0
  470. package/dist/api/resources/bulkSync/resources/schemas/client/requests/index.js +2 -0
  471. package/dist/api/resources/bulkSync/resources/schemas/index.d.ts +1 -0
  472. package/dist/api/resources/bulkSync/resources/schemas/index.js +17 -0
  473. package/dist/api/resources/connections/client/Client.d.ts +111 -0
  474. package/dist/api/resources/connections/client/Client.js +729 -0
  475. package/dist/api/resources/connections/client/index.d.ts +1 -0
  476. package/dist/api/resources/connections/client/index.js +17 -0
  477. package/dist/api/resources/connections/client/requests/ConnectionsGetTargetRequest.d.ts +11 -0
  478. package/dist/api/resources/connections/client/requests/ConnectionsGetTargetRequest.js +5 -0
  479. package/dist/api/resources/connections/client/requests/ConnectionsRemoveRequest.d.ts +10 -0
  480. package/dist/api/resources/connections/client/requests/ConnectionsRemoveRequest.js +5 -0
  481. package/dist/api/resources/connections/client/requests/V2CreateConnectionRequestSchema.d.ts +21 -0
  482. package/dist/api/resources/connections/client/requests/V2CreateConnectionRequestSchema.js +5 -0
  483. package/dist/api/resources/connections/client/requests/V2ModelFieldsRequest.d.ts +10 -0
  484. package/dist/api/resources/connections/client/requests/V2ModelFieldsRequest.js +5 -0
  485. package/dist/api/resources/connections/client/requests/V2TargetRequest.d.ts +13 -0
  486. package/dist/api/resources/connections/client/requests/V2TargetRequest.js +5 -0
  487. package/dist/api/resources/connections/client/requests/V2UpdateConnectionRequestSchema.d.ts +19 -0
  488. package/dist/api/resources/connections/client/requests/V2UpdateConnectionRequestSchema.js +5 -0
  489. package/dist/api/resources/connections/client/requests/V3ConnectCardRequest.d.ts +19 -0
  490. package/dist/api/resources/connections/client/requests/V3ConnectCardRequest.js +5 -0
  491. package/dist/api/resources/connections/client/requests/index.d.ts +7 -0
  492. package/dist/api/resources/connections/client/requests/index.js +2 -0
  493. package/dist/api/resources/connections/index.d.ts +1 -0
  494. package/dist/api/resources/connections/index.js +17 -0
  495. package/dist/api/resources/events/client/Client.d.ts +40 -0
  496. package/dist/api/resources/events/client/Client.js +191 -0
  497. package/dist/api/resources/events/client/index.d.ts +1 -0
  498. package/dist/api/resources/events/client/index.js +17 -0
  499. package/dist/api/resources/events/client/requests/EventsApiV2GetEventsRequest.d.ts +18 -0
  500. package/dist/api/resources/events/client/requests/EventsApiV2GetEventsRequest.js +5 -0
  501. package/dist/api/resources/events/client/requests/index.d.ts +1 -0
  502. package/dist/api/resources/events/client/requests/index.js +2 -0
  503. package/dist/api/resources/events/index.d.ts +1 -0
  504. package/dist/api/resources/events/index.js +17 -0
  505. package/dist/api/resources/index.d.ts +19 -0
  506. package/dist/api/resources/index.js +48 -0
  507. package/dist/api/resources/modelSync/client/Client.d.ts +131 -0
  508. package/dist/api/resources/modelSync/client/Client.js +552 -0
  509. package/dist/api/resources/modelSync/client/index.d.ts +1 -0
  510. package/dist/api/resources/modelSync/client/index.js +17 -0
  511. package/dist/api/resources/modelSync/client/requests/V2CreateSyncRequest.d.ts +48 -0
  512. package/dist/api/resources/modelSync/client/requests/V2CreateSyncRequest.js +5 -0
  513. package/dist/api/resources/modelSync/client/requests/V2StartSyncRequest.d.ts +10 -0
  514. package/dist/api/resources/modelSync/client/requests/V2StartSyncRequest.js +5 -0
  515. package/dist/api/resources/modelSync/client/requests/V2UpdateSyncRequest.d.ts +48 -0
  516. package/dist/api/resources/modelSync/client/requests/V2UpdateSyncRequest.js +5 -0
  517. package/dist/api/resources/modelSync/client/requests/index.d.ts +3 -0
  518. package/dist/api/resources/modelSync/client/requests/index.js +2 -0
  519. package/dist/api/resources/modelSync/index.d.ts +3 -0
  520. package/dist/api/resources/modelSync/index.js +19 -0
  521. package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +36 -0
  522. package/dist/api/resources/modelSync/resources/executions/client/Client.js +169 -0
  523. package/dist/api/resources/modelSync/resources/executions/client/index.d.ts +1 -0
  524. package/dist/api/resources/modelSync/resources/executions/client/index.js +2 -0
  525. package/dist/api/resources/modelSync/resources/executions/index.d.ts +1 -0
  526. package/dist/api/resources/modelSync/resources/executions/index.js +17 -0
  527. package/dist/api/resources/modelSync/resources/index.d.ts +1 -0
  528. package/dist/api/resources/modelSync/resources/index.js +27 -0
  529. package/dist/api/resources/modelSync/types/V2CreateSyncRequestMode.d.ts +12 -0
  530. package/dist/api/resources/modelSync/types/V2CreateSyncRequestMode.js +14 -0
  531. package/dist/api/resources/modelSync/types/V2UpdateSyncRequestMode.d.ts +12 -0
  532. package/dist/api/resources/modelSync/types/V2UpdateSyncRequestMode.js +14 -0
  533. package/dist/api/resources/modelSync/types/index.d.ts +2 -0
  534. package/dist/api/resources/modelSync/types/index.js +18 -0
  535. package/dist/api/resources/models/client/Client.d.ts +63 -0
  536. package/dist/api/resources/models/client/Client.js +339 -0
  537. package/dist/api/resources/models/client/index.d.ts +1 -0
  538. package/dist/api/resources/models/client/index.js +17 -0
  539. package/dist/api/resources/models/client/requests/V2CreateModelRequest.d.ts +24 -0
  540. package/dist/api/resources/models/client/requests/V2CreateModelRequest.js +5 -0
  541. package/dist/api/resources/models/client/requests/V2UpdateModelRequest.d.ts +24 -0
  542. package/dist/api/resources/models/client/requests/V2UpdateModelRequest.js +5 -0
  543. package/dist/api/resources/models/client/requests/index.d.ts +2 -0
  544. package/dist/api/resources/models/client/requests/index.js +2 -0
  545. package/dist/api/resources/models/index.d.ts +1 -0
  546. package/dist/api/resources/models/index.js +17 -0
  547. package/dist/api/resources/organization/client/Client.d.ts +76 -0
  548. package/dist/api/resources/organization/client/Client.js +352 -0
  549. package/dist/api/resources/organization/client/index.d.ts +1 -0
  550. package/dist/api/resources/organization/client/index.js +17 -0
  551. package/dist/api/resources/organization/client/requests/V2CreateOrganizationRequestSchema.d.ts +17 -0
  552. package/dist/api/resources/organization/client/requests/V2CreateOrganizationRequestSchema.js +5 -0
  553. package/dist/api/resources/organization/client/requests/V2UpdateOrganizationRequestSchema.d.ts +17 -0
  554. package/dist/api/resources/organization/client/requests/V2UpdateOrganizationRequestSchema.js +5 -0
  555. package/dist/api/resources/organization/client/requests/index.d.ts +2 -0
  556. package/dist/api/resources/organization/client/requests/index.js +2 -0
  557. package/dist/api/resources/organization/index.d.ts +1 -0
  558. package/dist/api/resources/organization/index.js +17 -0
  559. package/dist/api/resources/permissions/client/Client.d.ts +26 -0
  560. package/dist/api/resources/permissions/client/Client.js +22 -0
  561. package/dist/api/resources/permissions/client/index.d.ts +1 -0
  562. package/dist/api/resources/permissions/client/index.js +2 -0
  563. package/dist/api/resources/permissions/index.d.ts +2 -0
  564. package/dist/api/resources/permissions/index.js +18 -0
  565. package/dist/api/resources/permissions/resources/index.d.ts +4 -0
  566. package/dist/api/resources/permissions/resources/index.js +33 -0
  567. package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +69 -0
  568. package/dist/api/resources/permissions/resources/policies/client/Client.js +345 -0
  569. package/dist/api/resources/permissions/resources/policies/client/index.d.ts +1 -0
  570. package/dist/api/resources/permissions/resources/policies/client/index.js +17 -0
  571. package/dist/api/resources/permissions/resources/policies/client/requests/V2CreatePolicyRequest.d.ts +19 -0
  572. package/dist/api/resources/permissions/resources/policies/client/requests/V2CreatePolicyRequest.js +5 -0
  573. package/dist/api/resources/permissions/resources/policies/client/requests/V2UpdatePolicyRequest.d.ts +19 -0
  574. package/dist/api/resources/permissions/resources/policies/client/requests/V2UpdatePolicyRequest.js +5 -0
  575. package/dist/api/resources/permissions/resources/policies/client/requests/index.d.ts +2 -0
  576. package/dist/api/resources/permissions/resources/policies/client/requests/index.js +2 -0
  577. package/dist/api/resources/permissions/resources/policies/index.d.ts +1 -0
  578. package/dist/api/resources/permissions/resources/policies/index.js +17 -0
  579. package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +61 -0
  580. package/dist/api/resources/permissions/resources/roles/client/Client.js +337 -0
  581. package/dist/api/resources/permissions/resources/roles/client/index.d.ts +1 -0
  582. package/dist/api/resources/permissions/resources/roles/client/index.js +17 -0
  583. package/dist/api/resources/permissions/resources/roles/client/requests/V2CreateRoleRequest.d.ts +13 -0
  584. package/dist/api/resources/permissions/resources/roles/client/requests/V2CreateRoleRequest.js +5 -0
  585. package/dist/api/resources/permissions/resources/roles/client/requests/V2UpdateRoleRequest.d.ts +13 -0
  586. package/dist/api/resources/permissions/resources/roles/client/requests/V2UpdateRoleRequest.js +5 -0
  587. package/dist/api/resources/permissions/resources/roles/client/requests/index.d.ts +2 -0
  588. package/dist/api/resources/permissions/resources/roles/client/requests/index.js +2 -0
  589. package/dist/api/resources/permissions/resources/roles/index.d.ts +1 -0
  590. package/dist/api/resources/permissions/resources/roles/index.js +17 -0
  591. package/dist/api/resources/schemas/client/Client.d.ts +29 -0
  592. package/dist/api/resources/schemas/client/Client.js +115 -0
  593. package/dist/api/resources/schemas/client/index.d.ts +1 -0
  594. package/dist/api/resources/schemas/client/index.js +2 -0
  595. package/dist/api/resources/schemas/index.d.ts +1 -0
  596. package/dist/api/resources/schemas/index.js +17 -0
  597. package/dist/api/resources/users/client/Client.d.ts +86 -0
  598. package/dist/api/resources/users/client/Client.js +415 -0
  599. package/dist/api/resources/users/client/index.d.ts +1 -0
  600. package/dist/api/resources/users/client/index.js +17 -0
  601. package/dist/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +10 -0
  602. package/dist/api/resources/users/client/requests/UsersCreateApiKeyRequest.js +5 -0
  603. package/dist/api/resources/users/client/requests/V2CreateUserRequestSchema.d.ts +13 -0
  604. package/dist/api/resources/users/client/requests/V2CreateUserRequestSchema.js +5 -0
  605. package/dist/api/resources/users/client/requests/V2UpdateUserRequestSchema.d.ts +13 -0
  606. package/dist/api/resources/users/client/requests/V2UpdateUserRequestSchema.js +5 -0
  607. package/dist/api/resources/users/client/requests/index.d.ts +3 -0
  608. package/dist/api/resources/users/client/requests/index.js +2 -0
  609. package/dist/api/resources/users/index.d.ts +1 -0
  610. package/dist/api/resources/users/index.js +17 -0
  611. package/dist/api/resources/webhooks/client/Client.d.ts +83 -0
  612. package/dist/api/resources/webhooks/client/Client.js +359 -0
  613. package/dist/api/resources/webhooks/client/index.d.ts +1 -0
  614. package/dist/api/resources/webhooks/client/index.js +17 -0
  615. package/dist/api/resources/webhooks/client/requests/V2CreateWebhooksSchema.d.ts +15 -0
  616. package/dist/api/resources/webhooks/client/requests/V2CreateWebhooksSchema.js +5 -0
  617. package/dist/api/resources/webhooks/client/requests/V2UpdateWebhooksSchema.d.ts +15 -0
  618. package/dist/api/resources/webhooks/client/requests/V2UpdateWebhooksSchema.js +5 -0
  619. package/dist/api/resources/webhooks/client/requests/index.d.ts +2 -0
  620. package/dist/api/resources/webhooks/client/requests/index.js +2 -0
  621. package/dist/api/resources/webhooks/index.d.ts +1 -0
  622. package/dist/api/resources/webhooks/index.js +17 -0
  623. package/dist/api/types/BulkSchedule.d.ts +11 -0
  624. package/dist/api/types/BulkSchedule.js +5 -0
  625. package/dist/api/types/LabelLabel.d.ts +4 -0
  626. package/dist/api/types/LabelLabel.js +5 -0
  627. package/dist/api/types/RestErrResponse.d.ts +13 -0
  628. package/dist/api/types/RestErrResponse.js +5 -0
  629. package/dist/api/types/SchemaAssociation.d.ts +9 -0
  630. package/dist/api/types/SchemaAssociation.js +5 -0
  631. package/dist/api/types/SyncDestinationProperties.d.ts +15 -0
  632. package/dist/api/types/SyncDestinationProperties.js +5 -0
  633. package/dist/api/types/V2ActivateSyncEnvelope.d.ts +7 -0
  634. package/dist/api/types/V2ActivateSyncEnvelope.js +5 -0
  635. package/dist/api/types/V2ActivateSyncInput.d.ts +6 -0
  636. package/dist/api/types/V2ActivateSyncInput.js +5 -0
  637. package/dist/api/types/V2ActivateSyncOutput.d.ts +7 -0
  638. package/dist/api/types/V2ActivateSyncOutput.js +5 -0
  639. package/dist/api/types/V2ApiKeyResponse.d.ts +6 -0
  640. package/dist/api/types/V2ApiKeyResponse.js +5 -0
  641. package/dist/api/types/V2ApiKeyResponseEnvelope.d.ts +7 -0
  642. package/dist/api/types/V2ApiKeyResponseEnvelope.js +5 -0
  643. package/dist/api/types/V2BulkSyncDest.d.ts +8 -0
  644. package/dist/api/types/V2BulkSyncDest.js +5 -0
  645. package/dist/api/types/V2BulkSyncDestEnvelope.d.ts +7 -0
  646. package/dist/api/types/V2BulkSyncDestEnvelope.js +5 -0
  647. package/dist/api/types/V2BulkSyncListEnvelope.d.ts +7 -0
  648. package/dist/api/types/V2BulkSyncListEnvelope.js +5 -0
  649. package/dist/api/types/V2BulkSyncResponse.d.ts +18 -0
  650. package/dist/api/types/V2BulkSyncResponse.js +5 -0
  651. package/dist/api/types/V2BulkSyncResponseEnvelope.d.ts +7 -0
  652. package/dist/api/types/V2BulkSyncResponseEnvelope.js +5 -0
  653. package/dist/api/types/V2ConfigurationValue.d.ts +7 -0
  654. package/dist/api/types/V2ConfigurationValue.js +5 -0
  655. package/dist/api/types/V2ConnectionListResponseEnvelope.d.ts +7 -0
  656. package/dist/api/types/V2ConnectionListResponseEnvelope.js +5 -0
  657. package/dist/api/types/V2ConnectionMeta.d.ts +8 -0
  658. package/dist/api/types/V2ConnectionMeta.js +5 -0
  659. package/dist/api/types/V2ConnectionMetaResponse.d.ts +9 -0
  660. package/dist/api/types/V2ConnectionMetaResponse.js +5 -0
  661. package/dist/api/types/V2ConnectionResponseEnvelope.d.ts +7 -0
  662. package/dist/api/types/V2ConnectionResponseEnvelope.js +5 -0
  663. package/dist/api/types/V2ConnectionResponseSchema.d.ts +14 -0
  664. package/dist/api/types/V2ConnectionResponseSchema.js +5 -0
  665. package/dist/api/types/V2ConnectionType.d.ts +9 -0
  666. package/dist/api/types/V2ConnectionType.js +5 -0
  667. package/dist/api/types/V2ConnectionTypeResponseEnvelope.d.ts +7 -0
  668. package/dist/api/types/V2ConnectionTypeResponseEnvelope.js +5 -0
  669. package/dist/api/types/V2ConnectionTypeSchema.d.ts +7 -0
  670. package/dist/api/types/V2ConnectionTypeSchema.js +5 -0
  671. package/dist/api/types/V2CreateConnectionResponseEnvelope.d.ts +7 -0
  672. package/dist/api/types/V2CreateConnectionResponseEnvelope.js +5 -0
  673. package/dist/api/types/V2CreateConnectionResponseSchema.d.ts +18 -0
  674. package/dist/api/types/V2CreateConnectionResponseSchema.js +5 -0
  675. package/dist/api/types/V2Event.d.ts +10 -0
  676. package/dist/api/types/V2Event.js +5 -0
  677. package/dist/api/types/V2EventTypesEnvelope.d.ts +6 -0
  678. package/dist/api/types/V2EventTypesEnvelope.js +5 -0
  679. package/dist/api/types/V2EventsEnvelope.d.ts +7 -0
  680. package/dist/api/types/V2EventsEnvelope.js +5 -0
  681. package/dist/api/types/V2ExecutionCounts.d.ts +9 -0
  682. package/dist/api/types/V2ExecutionCounts.js +5 -0
  683. package/dist/api/types/V2Filter.d.ts +10 -0
  684. package/dist/api/types/V2Filter.js +5 -0
  685. package/dist/api/types/V2GetConnectionMetaEnvelope.d.ts +7 -0
  686. package/dist/api/types/V2GetConnectionMetaEnvelope.js +5 -0
  687. package/dist/api/types/V2GetExecutionResponseEnvelope.d.ts +7 -0
  688. package/dist/api/types/V2GetExecutionResponseEnvelope.js +5 -0
  689. package/dist/api/types/V2GetExecutionResponseSchema.d.ts +14 -0
  690. package/dist/api/types/V2GetExecutionResponseSchema.js +5 -0
  691. package/dist/api/types/V2GetIdentityResponseEnvelope.d.ts +7 -0
  692. package/dist/api/types/V2GetIdentityResponseEnvelope.js +5 -0
  693. package/dist/api/types/V2GetIdentityResponseSchema.d.ts +14 -0
  694. package/dist/api/types/V2GetIdentityResponseSchema.js +5 -0
  695. package/dist/api/types/V2Identity.d.ts +11 -0
  696. package/dist/api/types/V2Identity.js +5 -0
  697. package/dist/api/types/V2IdentityFunction.d.ts +7 -0
  698. package/dist/api/types/V2IdentityFunction.js +5 -0
  699. package/dist/api/types/V2ListExecutionResponseEnvelope.d.ts +7 -0
  700. package/dist/api/types/V2ListExecutionResponseEnvelope.js +5 -0
  701. package/dist/api/types/V2ListPoliciesResponseEnvelope.d.ts +7 -0
  702. package/dist/api/types/V2ListPoliciesResponseEnvelope.js +5 -0
  703. package/dist/api/types/V2ListSyncResponseEnvelope.d.ts +7 -0
  704. package/dist/api/types/V2ListSyncResponseEnvelope.js +5 -0
  705. package/dist/api/types/V2ListUsersEnvelope.d.ts +7 -0
  706. package/dist/api/types/V2ListUsersEnvelope.js +5 -0
  707. package/dist/api/types/V2Mode.d.ts +11 -0
  708. package/dist/api/types/V2Mode.js +5 -0
  709. package/dist/api/types/V2ModelField.d.ts +13 -0
  710. package/dist/api/types/V2ModelField.js +5 -0
  711. package/dist/api/types/V2ModelFieldRequest.d.ts +9 -0
  712. package/dist/api/types/V2ModelFieldRequest.js +5 -0
  713. package/dist/api/types/V2ModelFieldResponse.d.ts +7 -0
  714. package/dist/api/types/V2ModelFieldResponse.js +5 -0
  715. package/dist/api/types/V2ModelListResponseEnvelope.d.ts +7 -0
  716. package/dist/api/types/V2ModelListResponseEnvelope.js +5 -0
  717. package/dist/api/types/V2ModelResponse.d.ts +19 -0
  718. package/dist/api/types/V2ModelResponse.js +5 -0
  719. package/dist/api/types/V2ModelResponseEnvelope.d.ts +7 -0
  720. package/dist/api/types/V2ModelResponseEnvelope.js +5 -0
  721. package/dist/api/types/V2Organization.d.ts +10 -0
  722. package/dist/api/types/V2Organization.js +5 -0
  723. package/dist/api/types/V2OrganizationEnvelope.d.ts +7 -0
  724. package/dist/api/types/V2OrganizationEnvelope.js +5 -0
  725. package/dist/api/types/V2OrganizationsEnvelope.d.ts +7 -0
  726. package/dist/api/types/V2OrganizationsEnvelope.js +5 -0
  727. package/dist/api/types/V2Override.d.ts +9 -0
  728. package/dist/api/types/V2Override.js +5 -0
  729. package/dist/api/types/V2PolicyAction.d.ts +7 -0
  730. package/dist/api/types/V2PolicyAction.js +5 -0
  731. package/dist/api/types/V2PolicyResponse.d.ts +11 -0
  732. package/dist/api/types/V2PolicyResponse.js +5 -0
  733. package/dist/api/types/V2PolicyResponseEnvelope.d.ts +7 -0
  734. package/dist/api/types/V2PolicyResponseEnvelope.js +5 -0
  735. package/dist/api/types/V2Relation.d.ts +8 -0
  736. package/dist/api/types/V2Relation.js +5 -0
  737. package/dist/api/types/V2RelationTo.d.ts +7 -0
  738. package/dist/api/types/V2RelationTo.js +5 -0
  739. package/dist/api/types/V2RoleListResponseEnvelope.d.ts +7 -0
  740. package/dist/api/types/V2RoleListResponseEnvelope.js +5 -0
  741. package/dist/api/types/V2RoleResponse.d.ts +9 -0
  742. package/dist/api/types/V2RoleResponse.js +5 -0
  743. package/dist/api/types/V2RoleResponseEnvelope.d.ts +7 -0
  744. package/dist/api/types/V2RoleResponseEnvelope.js +5 -0
  745. package/dist/api/types/V2RunAfter.d.ts +7 -0
  746. package/dist/api/types/V2RunAfter.js +5 -0
  747. package/dist/api/types/V2Schedule.d.ts +13 -0
  748. package/dist/api/types/V2Schedule.js +5 -0
  749. package/dist/api/types/V2Source.d.ts +7 -0
  750. package/dist/api/types/V2Source.js +5 -0
  751. package/dist/api/types/V2StartSyncResponseEnvelope.d.ts +7 -0
  752. package/dist/api/types/V2StartSyncResponseEnvelope.js +5 -0
  753. package/dist/api/types/V2StartSyncResponseSchema.d.ts +8 -0
  754. package/dist/api/types/V2StartSyncResponseSchema.js +5 -0
  755. package/dist/api/types/V2SupportedMode.d.ts +12 -0
  756. package/dist/api/types/V2SupportedMode.js +5 -0
  757. package/dist/api/types/V2SyncField.d.ts +11 -0
  758. package/dist/api/types/V2SyncField.js +5 -0
  759. package/dist/api/types/V2SyncResponse.d.ts +21 -0
  760. package/dist/api/types/V2SyncResponse.js +5 -0
  761. package/dist/api/types/V2SyncResponseEnvelope.d.ts +7 -0
  762. package/dist/api/types/V2SyncResponseEnvelope.js +5 -0
  763. package/dist/api/types/V2SyncStatusEnvelope.d.ts +7 -0
  764. package/dist/api/types/V2SyncStatusEnvelope.js +5 -0
  765. package/dist/api/types/V2SyncStatusResponse.d.ts +9 -0
  766. package/dist/api/types/V2SyncStatusResponse.js +5 -0
  767. package/dist/api/types/V2Target.d.ts +11 -0
  768. package/dist/api/types/V2Target.js +5 -0
  769. package/dist/api/types/V2TargetField.d.ts +18 -0
  770. package/dist/api/types/V2TargetField.js +5 -0
  771. package/dist/api/types/V2TargetResponse.d.ts +12 -0
  772. package/dist/api/types/V2TargetResponse.js +5 -0
  773. package/dist/api/types/V2TargetResponseEnvelope.d.ts +7 -0
  774. package/dist/api/types/V2TargetResponseEnvelope.js +5 -0
  775. package/dist/api/types/V2User.d.ts +9 -0
  776. package/dist/api/types/V2User.js +5 -0
  777. package/dist/api/types/V2UserEnvelope.d.ts +7 -0
  778. package/dist/api/types/V2UserEnvelope.js +5 -0
  779. package/dist/api/types/V2Webhook.d.ts +10 -0
  780. package/dist/api/types/V2Webhook.js +5 -0
  781. package/dist/api/types/V2WebhookEnvelope.d.ts +7 -0
  782. package/dist/api/types/V2WebhookEnvelope.js +5 -0
  783. package/dist/api/types/V2WebhookListEnvelope.d.ts +7 -0
  784. package/dist/api/types/V2WebhookListEnvelope.js +5 -0
  785. package/dist/api/types/V3BulkField.d.ts +8 -0
  786. package/dist/api/types/V3BulkField.js +5 -0
  787. package/dist/api/types/V3BulkSchema.d.ts +10 -0
  788. package/dist/api/types/V3BulkSchema.js +5 -0
  789. package/dist/api/types/V3BulkSchemaEnvelope.d.ts +7 -0
  790. package/dist/api/types/V3BulkSchemaEnvelope.js +5 -0
  791. package/dist/api/types/V3BulkSyncExecution.d.ts +15 -0
  792. package/dist/api/types/V3BulkSyncExecution.js +5 -0
  793. package/dist/api/types/V3BulkSyncExecutionEnvelope.d.ts +7 -0
  794. package/dist/api/types/V3BulkSyncExecutionEnvelope.js +5 -0
  795. package/dist/api/types/V3BulkSyncSchemaExecution.d.ts +12 -0
  796. package/dist/api/types/V3BulkSyncSchemaExecution.js +5 -0
  797. package/dist/api/types/V3BulkSyncSource.d.ts +8 -0
  798. package/dist/api/types/V3BulkSyncSource.js +5 -0
  799. package/dist/api/types/V3BulkSyncSourceEnvelope.d.ts +7 -0
  800. package/dist/api/types/V3BulkSyncSourceEnvelope.js +5 -0
  801. package/dist/api/types/V3BulkSyncSourceSchemaEnvelope.d.ts +7 -0
  802. package/dist/api/types/V3BulkSyncSourceSchemaEnvelope.js +5 -0
  803. package/dist/api/types/V3BulkSyncSourceStatus.d.ts +8 -0
  804. package/dist/api/types/V3BulkSyncSourceStatus.js +5 -0
  805. package/dist/api/types/V3BulkSyncSourceStatusEnvelope.d.ts +7 -0
  806. package/dist/api/types/V3BulkSyncSourceStatusEnvelope.js +5 -0
  807. package/dist/api/types/V3BulkSyncStatusEnvelope.d.ts +7 -0
  808. package/dist/api/types/V3BulkSyncStatusEnvelope.js +5 -0
  809. package/dist/api/types/V3BulkSyncStatusResponse.d.ts +9 -0
  810. package/dist/api/types/V3BulkSyncStatusResponse.js +5 -0
  811. package/dist/api/types/V3ConnectCardResponse.d.ts +7 -0
  812. package/dist/api/types/V3ConnectCardResponse.js +5 -0
  813. package/dist/api/types/V3ConnectCardResponseEnvelope.d.ts +7 -0
  814. package/dist/api/types/V3ConnectCardResponseEnvelope.js +5 -0
  815. package/dist/api/types/V3ListBulkSchemaEnvelope.d.ts +7 -0
  816. package/dist/api/types/V3ListBulkSchemaEnvelope.js +5 -0
  817. package/dist/api/types/V3ListBulkSyncExecutionsEnvelope.d.ts +7 -0
  818. package/dist/api/types/V3ListBulkSyncExecutionsEnvelope.js +5 -0
  819. package/dist/api/types/V3PickValue.d.ts +7 -0
  820. package/dist/api/types/V3PickValue.js +5 -0
  821. package/dist/api/types/V3Schema.d.ts +9 -0
  822. package/dist/api/types/V3Schema.js +5 -0
  823. package/dist/api/types/V3SchemaField.d.ts +12 -0
  824. package/dist/api/types/V3SchemaField.js +5 -0
  825. package/dist/api/types/V3SchemaRecordsResponseEnvelope.d.ts +6 -0
  826. package/dist/api/types/V3SchemaRecordsResponseEnvelope.js +5 -0
  827. package/dist/api/types/index.d.ts +102 -0
  828. package/dist/api/types/index.js +118 -0
  829. package/dist/core/auth/BasicAuth.d.ts +8 -0
  830. package/dist/core/auth/BasicAuth.js +26 -0
  831. package/dist/core/auth/BearerToken.d.ts +5 -0
  832. package/dist/core/auth/BearerToken.js +15 -0
  833. package/dist/core/auth/index.d.ts +2 -0
  834. package/dist/core/auth/index.js +7 -0
  835. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  836. package/dist/core/fetcher/APIResponse.js +2 -0
  837. package/dist/core/fetcher/Fetcher.d.ts +35 -0
  838. package/dist/core/fetcher/Fetcher.js +151 -0
  839. package/dist/core/fetcher/Supplier.d.ts +4 -0
  840. package/dist/core/fetcher/Supplier.js +22 -0
  841. package/dist/core/fetcher/getHeader.d.ts +1 -0
  842. package/dist/core/fetcher/getHeader.js +12 -0
  843. package/dist/core/fetcher/index.d.ts +5 -0
  844. package/dist/core/fetcher/index.js +9 -0
  845. package/dist/core/index.d.ts +2 -0
  846. package/dist/core/index.js +18 -0
  847. package/dist/environments.d.ts +7 -0
  848. package/dist/environments.js +9 -0
  849. package/dist/errors/PolytomicError.d.ts +12 -0
  850. package/dist/errors/PolytomicError.js +32 -0
  851. package/dist/errors/PolytomicTimeoutError.d.ts +6 -0
  852. package/dist/errors/PolytomicTimeoutError.js +13 -0
  853. package/dist/errors/index.d.ts +2 -0
  854. package/dist/errors/index.js +7 -0
  855. package/dist/index.d.ts +4 -0
  856. package/dist/index.js +34 -0
  857. package/environments.d.ts +7 -0
  858. package/environments.js +9 -0
  859. package/errors/PolytomicError.d.ts +12 -0
  860. package/errors/PolytomicError.js +32 -0
  861. package/errors/PolytomicTimeoutError.d.ts +6 -0
  862. package/errors/PolytomicTimeoutError.js +13 -0
  863. package/errors/index.d.ts +2 -0
  864. package/errors/index.js +7 -0
  865. package/index.d.ts +4 -0
  866. package/index.js +34 -0
  867. package/jest.config.js +5 -0
  868. package/package.json +33 -0
  869. package/tests/client.test.ts +11 -0
@@ -0,0 +1,729 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
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
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.Connections = void 0;
42
+ const environments = __importStar(require("../../../../environments"));
43
+ const core = __importStar(require("../../../../core"));
44
+ const Polytomic = __importStar(require("../../.."));
45
+ const url_join_1 = __importDefault(require("url-join"));
46
+ const errors = __importStar(require("../../../../errors"));
47
+ class Connections {
48
+ constructor(_options = {}) {
49
+ this._options = _options;
50
+ }
51
+ /**
52
+ * @throws {@link Polytomic.UnauthorizedError}
53
+ *
54
+ * @example
55
+ * await polytomic.connections.getTypes()
56
+ */
57
+ getTypes(requestOptions) {
58
+ var _a;
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ const _response = yield core.fetcher({
61
+ 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"),
62
+ method: "GET",
63
+ headers: {
64
+ Authorization: yield this._getAuthorizationHeader(),
65
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
66
+ ? yield core.Supplier.get(this._options.polytomicVersion)
67
+ : undefined,
68
+ "X-Fern-Language": "JavaScript",
69
+ "X-Fern-SDK-Name": "polytomic",
70
+ "X-Fern-SDK-Version": "0.0.1",
71
+ },
72
+ contentType: "application/json",
73
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
74
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
75
+ });
76
+ if (_response.ok) {
77
+ return _response.body;
78
+ }
79
+ if (_response.error.reason === "status-code") {
80
+ switch (_response.error.statusCode) {
81
+ case 401:
82
+ throw new Polytomic.UnauthorizedError(_response.error.body);
83
+ default:
84
+ throw new errors.PolytomicError({
85
+ statusCode: _response.error.statusCode,
86
+ body: _response.error.body,
87
+ });
88
+ }
89
+ }
90
+ switch (_response.error.reason) {
91
+ case "non-json":
92
+ throw new errors.PolytomicError({
93
+ statusCode: _response.error.statusCode,
94
+ body: _response.error.rawBody,
95
+ });
96
+ case "timeout":
97
+ throw new errors.PolytomicTimeoutError();
98
+ case "unknown":
99
+ throw new errors.PolytomicError({
100
+ message: _response.error.errorMessage,
101
+ });
102
+ }
103
+ });
104
+ }
105
+ /**
106
+ * @throws {@link Polytomic.UnauthorizedError}
107
+ *
108
+ * @example
109
+ * await polytomic.connections.list()
110
+ */
111
+ list(requestOptions) {
112
+ var _a;
113
+ return __awaiter(this, void 0, void 0, function* () {
114
+ const _response = yield core.fetcher({
115
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections"),
116
+ method: "GET",
117
+ headers: {
118
+ Authorization: yield this._getAuthorizationHeader(),
119
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
120
+ ? yield core.Supplier.get(this._options.polytomicVersion)
121
+ : undefined,
122
+ "X-Fern-Language": "JavaScript",
123
+ "X-Fern-SDK-Name": "polytomic",
124
+ "X-Fern-SDK-Version": "0.0.1",
125
+ },
126
+ contentType: "application/json",
127
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
128
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
129
+ });
130
+ if (_response.ok) {
131
+ return _response.body;
132
+ }
133
+ if (_response.error.reason === "status-code") {
134
+ switch (_response.error.statusCode) {
135
+ case 401:
136
+ throw new Polytomic.UnauthorizedError(_response.error.body);
137
+ default:
138
+ throw new errors.PolytomicError({
139
+ statusCode: _response.error.statusCode,
140
+ body: _response.error.body,
141
+ });
142
+ }
143
+ }
144
+ switch (_response.error.reason) {
145
+ case "non-json":
146
+ throw new errors.PolytomicError({
147
+ statusCode: _response.error.statusCode,
148
+ body: _response.error.rawBody,
149
+ });
150
+ case "timeout":
151
+ throw new errors.PolytomicTimeoutError();
152
+ case "unknown":
153
+ throw new errors.PolytomicError({
154
+ message: _response.error.errorMessage,
155
+ });
156
+ }
157
+ });
158
+ }
159
+ /**
160
+ * @throws {@link Polytomic.UnauthorizedError}
161
+ *
162
+ * @example
163
+ * await polytomic.connections.create({
164
+ * name: "name",
165
+ * type: "type"
166
+ * })
167
+ */
168
+ create(request, requestOptions) {
169
+ var _a;
170
+ return __awaiter(this, void 0, void 0, function* () {
171
+ const _response = yield core.fetcher({
172
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections"),
173
+ method: "POST",
174
+ headers: {
175
+ Authorization: yield this._getAuthorizationHeader(),
176
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
177
+ ? yield core.Supplier.get(this._options.polytomicVersion)
178
+ : undefined,
179
+ "X-Fern-Language": "JavaScript",
180
+ "X-Fern-SDK-Name": "polytomic",
181
+ "X-Fern-SDK-Version": "0.0.1",
182
+ },
183
+ contentType: "application/json",
184
+ body: request,
185
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
186
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
187
+ });
188
+ if (_response.ok) {
189
+ return _response.body;
190
+ }
191
+ if (_response.error.reason === "status-code") {
192
+ switch (_response.error.statusCode) {
193
+ case 401:
194
+ throw new Polytomic.UnauthorizedError(_response.error.body);
195
+ default:
196
+ throw new errors.PolytomicError({
197
+ statusCode: _response.error.statusCode,
198
+ body: _response.error.body,
199
+ });
200
+ }
201
+ }
202
+ switch (_response.error.reason) {
203
+ case "non-json":
204
+ throw new errors.PolytomicError({
205
+ statusCode: _response.error.statusCode,
206
+ body: _response.error.rawBody,
207
+ });
208
+ case "timeout":
209
+ throw new errors.PolytomicTimeoutError();
210
+ case "unknown":
211
+ throw new errors.PolytomicError({
212
+ message: _response.error.errorMessage,
213
+ });
214
+ }
215
+ });
216
+ }
217
+ /**
218
+ * @throws {@link Polytomic.UnauthorizedError}
219
+ *
220
+ * @example
221
+ * await polytomic.connections.apiV3Connect({
222
+ * connection: "248df4b7-aa70-47b8-a036-33ac447e668d",
223
+ * name: "name",
224
+ * redirect_url: "redirect_url"
225
+ * })
226
+ */
227
+ apiV3Connect(request, requestOptions) {
228
+ var _a;
229
+ return __awaiter(this, void 0, void 0, function* () {
230
+ const _response = yield core.fetcher({
231
+ 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"),
232
+ method: "POST",
233
+ headers: {
234
+ Authorization: yield this._getAuthorizationHeader(),
235
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
236
+ ? yield core.Supplier.get(this._options.polytomicVersion)
237
+ : undefined,
238
+ "X-Fern-Language": "JavaScript",
239
+ "X-Fern-SDK-Name": "polytomic",
240
+ "X-Fern-SDK-Version": "0.0.1",
241
+ },
242
+ contentType: "application/json",
243
+ body: request,
244
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
245
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
246
+ });
247
+ if (_response.ok) {
248
+ return _response.body;
249
+ }
250
+ if (_response.error.reason === "status-code") {
251
+ switch (_response.error.statusCode) {
252
+ case 401:
253
+ throw new Polytomic.UnauthorizedError(_response.error.body);
254
+ default:
255
+ throw new errors.PolytomicError({
256
+ statusCode: _response.error.statusCode,
257
+ body: _response.error.body,
258
+ });
259
+ }
260
+ }
261
+ switch (_response.error.reason) {
262
+ case "non-json":
263
+ throw new errors.PolytomicError({
264
+ statusCode: _response.error.statusCode,
265
+ body: _response.error.rawBody,
266
+ });
267
+ case "timeout":
268
+ throw new errors.PolytomicTimeoutError();
269
+ case "unknown":
270
+ throw new errors.PolytomicError({
271
+ message: _response.error.errorMessage,
272
+ });
273
+ }
274
+ });
275
+ }
276
+ /**
277
+ * @throws {@link Polytomic.UnauthorizedError}
278
+ *
279
+ * @example
280
+ * await polytomic.connections.get("248df4b7-aa70-47b8-a036-33ac447e668d")
281
+ */
282
+ get(id, requestOptions) {
283
+ var _a;
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ const _response = yield core.fetcher({
286
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}`),
287
+ method: "GET",
288
+ headers: {
289
+ Authorization: yield this._getAuthorizationHeader(),
290
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
291
+ ? yield core.Supplier.get(this._options.polytomicVersion)
292
+ : undefined,
293
+ "X-Fern-Language": "JavaScript",
294
+ "X-Fern-SDK-Name": "polytomic",
295
+ "X-Fern-SDK-Version": "0.0.1",
296
+ },
297
+ contentType: "application/json",
298
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
299
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
300
+ });
301
+ if (_response.ok) {
302
+ return _response.body;
303
+ }
304
+ if (_response.error.reason === "status-code") {
305
+ switch (_response.error.statusCode) {
306
+ case 401:
307
+ throw new Polytomic.UnauthorizedError(_response.error.body);
308
+ default:
309
+ throw new errors.PolytomicError({
310
+ statusCode: _response.error.statusCode,
311
+ body: _response.error.body,
312
+ });
313
+ }
314
+ }
315
+ switch (_response.error.reason) {
316
+ case "non-json":
317
+ throw new errors.PolytomicError({
318
+ statusCode: _response.error.statusCode,
319
+ body: _response.error.rawBody,
320
+ });
321
+ case "timeout":
322
+ throw new errors.PolytomicTimeoutError();
323
+ case "unknown":
324
+ throw new errors.PolytomicError({
325
+ message: _response.error.errorMessage,
326
+ });
327
+ }
328
+ });
329
+ }
330
+ /**
331
+ * @throws {@link Polytomic.UnauthorizedError}
332
+ *
333
+ * @example
334
+ * await polytomic.connections.remove("248df4b7-aa70-47b8-a036-33ac447e668d", {})
335
+ */
336
+ remove(id, request = {}, requestOptions) {
337
+ var _a;
338
+ return __awaiter(this, void 0, void 0, function* () {
339
+ const { force } = request;
340
+ const _queryParams = {};
341
+ if (force != null) {
342
+ _queryParams["force"] = force.toString();
343
+ }
344
+ const _response = yield core.fetcher({
345
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}`),
346
+ method: "DELETE",
347
+ headers: {
348
+ Authorization: yield this._getAuthorizationHeader(),
349
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
350
+ ? yield core.Supplier.get(this._options.polytomicVersion)
351
+ : undefined,
352
+ "X-Fern-Language": "JavaScript",
353
+ "X-Fern-SDK-Name": "polytomic",
354
+ "X-Fern-SDK-Version": "0.0.1",
355
+ },
356
+ contentType: "application/json",
357
+ queryParameters: _queryParams,
358
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
359
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
360
+ });
361
+ if (_response.ok) {
362
+ return;
363
+ }
364
+ if (_response.error.reason === "status-code") {
365
+ switch (_response.error.statusCode) {
366
+ case 401:
367
+ throw new Polytomic.UnauthorizedError(_response.error.body);
368
+ default:
369
+ throw new errors.PolytomicError({
370
+ statusCode: _response.error.statusCode,
371
+ body: _response.error.body,
372
+ });
373
+ }
374
+ }
375
+ switch (_response.error.reason) {
376
+ case "non-json":
377
+ throw new errors.PolytomicError({
378
+ statusCode: _response.error.statusCode,
379
+ body: _response.error.rawBody,
380
+ });
381
+ case "timeout":
382
+ throw new errors.PolytomicTimeoutError();
383
+ case "unknown":
384
+ throw new errors.PolytomicError({
385
+ message: _response.error.errorMessage,
386
+ });
387
+ }
388
+ });
389
+ }
390
+ /**
391
+ * @throws {@link Polytomic.UnauthorizedError}
392
+ *
393
+ * @example
394
+ * await polytomic.connections.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
395
+ * name: "name"
396
+ * })
397
+ */
398
+ update(id, request, requestOptions) {
399
+ var _a;
400
+ return __awaiter(this, void 0, void 0, function* () {
401
+ const _response = yield core.fetcher({
402
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}`),
403
+ method: "PATCH",
404
+ headers: {
405
+ Authorization: yield this._getAuthorizationHeader(),
406
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
407
+ ? yield core.Supplier.get(this._options.polytomicVersion)
408
+ : undefined,
409
+ "X-Fern-Language": "JavaScript",
410
+ "X-Fern-SDK-Name": "polytomic",
411
+ "X-Fern-SDK-Version": "0.0.1",
412
+ },
413
+ contentType: "application/json",
414
+ body: request,
415
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
416
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
417
+ });
418
+ if (_response.ok) {
419
+ return _response.body;
420
+ }
421
+ if (_response.error.reason === "status-code") {
422
+ switch (_response.error.statusCode) {
423
+ case 401:
424
+ throw new Polytomic.UnauthorizedError(_response.error.body);
425
+ default:
426
+ throw new errors.PolytomicError({
427
+ statusCode: _response.error.statusCode,
428
+ body: _response.error.body,
429
+ });
430
+ }
431
+ }
432
+ switch (_response.error.reason) {
433
+ case "non-json":
434
+ throw new errors.PolytomicError({
435
+ statusCode: _response.error.statusCode,
436
+ body: _response.error.rawBody,
437
+ });
438
+ case "timeout":
439
+ throw new errors.PolytomicTimeoutError();
440
+ case "unknown":
441
+ throw new errors.PolytomicError({
442
+ message: _response.error.errorMessage,
443
+ });
444
+ }
445
+ });
446
+ }
447
+ /**
448
+ * @throws {@link Polytomic.UnauthorizedError}
449
+ *
450
+ * @example
451
+ * await polytomic.connections.getSource("248df4b7-aa70-47b8-a036-33ac447e668d")
452
+ */
453
+ getSource(id, requestOptions) {
454
+ var _a;
455
+ return __awaiter(this, void 0, void 0, function* () {
456
+ const _response = yield core.fetcher({
457
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}/source`),
458
+ method: "GET",
459
+ headers: {
460
+ Authorization: yield this._getAuthorizationHeader(),
461
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
462
+ ? yield core.Supplier.get(this._options.polytomicVersion)
463
+ : undefined,
464
+ "X-Fern-Language": "JavaScript",
465
+ "X-Fern-SDK-Name": "polytomic",
466
+ "X-Fern-SDK-Version": "0.0.1",
467
+ },
468
+ contentType: "application/json",
469
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
470
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
471
+ });
472
+ if (_response.ok) {
473
+ return _response.body;
474
+ }
475
+ if (_response.error.reason === "status-code") {
476
+ switch (_response.error.statusCode) {
477
+ case 401:
478
+ throw new Polytomic.UnauthorizedError(_response.error.body);
479
+ default:
480
+ throw new errors.PolytomicError({
481
+ statusCode: _response.error.statusCode,
482
+ body: _response.error.body,
483
+ });
484
+ }
485
+ }
486
+ switch (_response.error.reason) {
487
+ case "non-json":
488
+ throw new errors.PolytomicError({
489
+ statusCode: _response.error.statusCode,
490
+ body: _response.error.rawBody,
491
+ });
492
+ case "timeout":
493
+ throw new errors.PolytomicTimeoutError();
494
+ case "unknown":
495
+ throw new errors.PolytomicError({
496
+ message: _response.error.errorMessage,
497
+ });
498
+ }
499
+ });
500
+ }
501
+ /**
502
+ * @throws {@link Polytomic.UnauthorizedError}
503
+ *
504
+ * @example
505
+ * await polytomic.connections.getSourceFields("248df4b7-aa70-47b8-a036-33ac447e668d", {})
506
+ */
507
+ getSourceFields(id, request = {}, requestOptions) {
508
+ var _a;
509
+ return __awaiter(this, void 0, void 0, function* () {
510
+ const _response = yield core.fetcher({
511
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}/source/fields`),
512
+ method: "POST",
513
+ headers: {
514
+ Authorization: yield this._getAuthorizationHeader(),
515
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
516
+ ? yield core.Supplier.get(this._options.polytomicVersion)
517
+ : undefined,
518
+ "X-Fern-Language": "JavaScript",
519
+ "X-Fern-SDK-Name": "polytomic",
520
+ "X-Fern-SDK-Version": "0.0.1",
521
+ },
522
+ contentType: "application/json",
523
+ body: request,
524
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
525
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
526
+ });
527
+ if (_response.ok) {
528
+ return _response.body;
529
+ }
530
+ if (_response.error.reason === "status-code") {
531
+ switch (_response.error.statusCode) {
532
+ case 401:
533
+ throw new Polytomic.UnauthorizedError(_response.error.body);
534
+ default:
535
+ throw new errors.PolytomicError({
536
+ statusCode: _response.error.statusCode,
537
+ body: _response.error.body,
538
+ });
539
+ }
540
+ }
541
+ switch (_response.error.reason) {
542
+ case "non-json":
543
+ throw new errors.PolytomicError({
544
+ statusCode: _response.error.statusCode,
545
+ body: _response.error.rawBody,
546
+ });
547
+ case "timeout":
548
+ throw new errors.PolytomicTimeoutError();
549
+ case "unknown":
550
+ throw new errors.PolytomicError({
551
+ message: _response.error.errorMessage,
552
+ });
553
+ }
554
+ });
555
+ }
556
+ /**
557
+ * @throws {@link Polytomic.UnauthorizedError}
558
+ *
559
+ * @example
560
+ * await polytomic.connections.getTarget("248df4b7-aa70-47b8-a036-33ac447e668d", {})
561
+ */
562
+ getTarget(id, request = {}, requestOptions) {
563
+ var _a;
564
+ return __awaiter(this, void 0, void 0, function* () {
565
+ const { type: type_, search } = request;
566
+ const _queryParams = {};
567
+ if (type_ != null) {
568
+ _queryParams["type"] = type_;
569
+ }
570
+ if (search != null) {
571
+ _queryParams["search"] = search;
572
+ }
573
+ const _response = yield core.fetcher({
574
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}/target`),
575
+ method: "GET",
576
+ headers: {
577
+ Authorization: yield this._getAuthorizationHeader(),
578
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
579
+ ? yield core.Supplier.get(this._options.polytomicVersion)
580
+ : undefined,
581
+ "X-Fern-Language": "JavaScript",
582
+ "X-Fern-SDK-Name": "polytomic",
583
+ "X-Fern-SDK-Version": "0.0.1",
584
+ },
585
+ contentType: "application/json",
586
+ queryParameters: _queryParams,
587
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
588
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
589
+ });
590
+ if (_response.ok) {
591
+ return _response.body;
592
+ }
593
+ if (_response.error.reason === "status-code") {
594
+ switch (_response.error.statusCode) {
595
+ case 401:
596
+ throw new Polytomic.UnauthorizedError(_response.error.body);
597
+ default:
598
+ throw new errors.PolytomicError({
599
+ statusCode: _response.error.statusCode,
600
+ body: _response.error.body,
601
+ });
602
+ }
603
+ }
604
+ switch (_response.error.reason) {
605
+ case "non-json":
606
+ throw new errors.PolytomicError({
607
+ statusCode: _response.error.statusCode,
608
+ body: _response.error.rawBody,
609
+ });
610
+ case "timeout":
611
+ throw new errors.PolytomicTimeoutError();
612
+ case "unknown":
613
+ throw new errors.PolytomicError({
614
+ message: _response.error.errorMessage,
615
+ });
616
+ }
617
+ });
618
+ }
619
+ /**
620
+ * @throws {@link Polytomic.UnauthorizedError}
621
+ *
622
+ * @example
623
+ * await polytomic.connections.getTargetFields("248df4b7-aa70-47b8-a036-33ac447e668d", {
624
+ * target: "database.table"
625
+ * })
626
+ */
627
+ getTargetFields(id, request, requestOptions) {
628
+ var _a;
629
+ return __awaiter(this, void 0, void 0, function* () {
630
+ const _response = yield core.fetcher({
631
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}/target/fields`),
632
+ method: "POST",
633
+ headers: {
634
+ Authorization: yield this._getAuthorizationHeader(),
635
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
636
+ ? yield core.Supplier.get(this._options.polytomicVersion)
637
+ : undefined,
638
+ "X-Fern-Language": "JavaScript",
639
+ "X-Fern-SDK-Name": "polytomic",
640
+ "X-Fern-SDK-Version": "0.0.1",
641
+ },
642
+ contentType: "application/json",
643
+ body: request,
644
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
645
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
646
+ });
647
+ if (_response.ok) {
648
+ return _response.body;
649
+ }
650
+ if (_response.error.reason === "status-code") {
651
+ switch (_response.error.statusCode) {
652
+ case 401:
653
+ throw new Polytomic.UnauthorizedError(_response.error.body);
654
+ default:
655
+ throw new errors.PolytomicError({
656
+ statusCode: _response.error.statusCode,
657
+ body: _response.error.body,
658
+ });
659
+ }
660
+ }
661
+ switch (_response.error.reason) {
662
+ case "non-json":
663
+ throw new errors.PolytomicError({
664
+ statusCode: _response.error.statusCode,
665
+ body: _response.error.rawBody,
666
+ });
667
+ case "timeout":
668
+ throw new errors.PolytomicTimeoutError();
669
+ case "unknown":
670
+ throw new errors.PolytomicError({
671
+ message: _response.error.errorMessage,
672
+ });
673
+ }
674
+ });
675
+ }
676
+ connect(requestOptions) {
677
+ var _a;
678
+ return __awaiter(this, void 0, void 0, function* () {
679
+ const _response = yield core.fetcher({
680
+ 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"),
681
+ method: "POST",
682
+ headers: {
683
+ Authorization: yield this._getAuthorizationHeader(),
684
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
685
+ ? yield core.Supplier.get(this._options.polytomicVersion)
686
+ : undefined,
687
+ "X-Fern-Language": "JavaScript",
688
+ "X-Fern-SDK-Name": "polytomic",
689
+ "X-Fern-SDK-Version": "0.0.1",
690
+ },
691
+ contentType: "application/json",
692
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
693
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
694
+ });
695
+ if (_response.ok) {
696
+ return;
697
+ }
698
+ if (_response.error.reason === "status-code") {
699
+ throw new errors.PolytomicError({
700
+ statusCode: _response.error.statusCode,
701
+ body: _response.error.body,
702
+ });
703
+ }
704
+ switch (_response.error.reason) {
705
+ case "non-json":
706
+ throw new errors.PolytomicError({
707
+ statusCode: _response.error.statusCode,
708
+ body: _response.error.rawBody,
709
+ });
710
+ case "timeout":
711
+ throw new errors.PolytomicTimeoutError();
712
+ case "unknown":
713
+ throw new errors.PolytomicError({
714
+ message: _response.error.errorMessage,
715
+ });
716
+ }
717
+ });
718
+ }
719
+ _getAuthorizationHeader() {
720
+ return __awaiter(this, void 0, void 0, function* () {
721
+ const bearer = yield core.Supplier.get(this._options.token);
722
+ if (bearer != null) {
723
+ return `Bearer ${bearer}`;
724
+ }
725
+ return undefined;
726
+ });
727
+ }
728
+ }
729
+ exports.Connections = Connections;