@airweave/sdk 0.2.26 → 0.2.27

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 (526) hide show
  1. package/Client.d.ts +8 -13
  2. package/Client.js +13 -23
  3. package/README.md +10 -8
  4. package/api/index.d.ts +1 -1
  5. package/api/index.js +1 -1
  6. package/api/resources/collections/client/Client.d.ts +112 -0
  7. package/{dist/api/resources/apiKeys → api/resources/collections}/client/Client.js +133 -94
  8. package/api/resources/collections/client/requests/CollectionCreate.d.ts +15 -0
  9. package/{dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts → api/resources/collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.d.ts} +1 -1
  10. package/{dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts → api/resources/collections/client/requests/ListCollectionsCollectionsGetRequest.d.ts} +1 -1
  11. package/api/resources/collections/client/requests/index.d.ts +3 -0
  12. package/api/resources/connections/client/Client.d.ts +3 -177
  13. package/api/resources/connections/client/Client.js +7 -553
  14. package/api/resources/connections/client/index.d.ts +1 -1
  15. package/api/resources/connections/client/index.js +0 -15
  16. package/api/resources/index.d.ts +4 -9
  17. package/api/resources/index.js +5 -10
  18. package/api/resources/sourceConnections/client/Client.d.ts +191 -0
  19. package/{dist/api/resources/sync → api/resources/sourceConnections}/client/Client.js +121 -412
  20. package/api/resources/sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.d.ts +10 -0
  21. package/api/resources/sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.d.ts +10 -0
  22. package/api/resources/{sync/client/requests/ListSyncsSyncGetRequest.d.ts → sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.d.ts} +5 -2
  23. package/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +17 -0
  24. package/api/resources/sourceConnections/client/requests/index.d.ts +4 -0
  25. package/api/resources/sources/client/Client.d.ts +4 -2
  26. package/api/resources/sources/client/Client.js +11 -6
  27. package/api/resources/whiteLabels/client/Client.d.ts +3 -47
  28. package/api/resources/whiteLabels/client/Client.js +20 -170
  29. package/api/types/ApiKey.d.ts +3 -3
  30. package/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.d.ts +2 -2
  31. package/{dist/api/resources/connections/client/requests → api/types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -9
  32. package/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +8 -0
  33. package/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
  34. package/api/types/Collection.d.ts +19 -0
  35. package/api/types/CollectionStatus.d.ts +13 -0
  36. package/api/types/CollectionStatus.js +12 -0
  37. package/api/types/CollectionUpdate.d.ts +10 -0
  38. package/api/types/ConfigValues.d.ts +9 -0
  39. package/{dist/api/types/DestinationWithConfigFields.d.ts → api/types/DestinationWithAuthenticationFields.d.ts} +2 -2
  40. package/{dist/api/types/EmbeddingModelWithConfigFields.d.ts → api/types/EmbeddingModelWithAuthenticationFields.d.ts} +2 -2
  41. package/api/types/EntityCount.d.ts +9 -0
  42. package/api/types/Organization.d.ts +13 -0
  43. package/api/types/ResponseType.d.ts +11 -0
  44. package/api/types/ResponseType.js +10 -0
  45. package/api/types/SearchResponse.d.ts +13 -0
  46. package/api/types/SearchStatus.d.ts +12 -0
  47. package/api/types/SearchStatus.js +11 -0
  48. package/api/types/SourceConnection.d.ts +31 -0
  49. package/api/types/SourceConnectionAuthFields.d.ts +5 -0
  50. package/api/types/SourceConnectionCreate.d.ts +21 -0
  51. package/api/types/SourceConnectionJob.d.ts +30 -0
  52. package/api/types/SourceConnectionListItem.d.ts +21 -0
  53. package/api/types/SourceConnectionStatus.d.ts +12 -0
  54. package/api/types/SourceConnectionStatus.js +11 -0
  55. package/api/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +2 -2
  56. package/{dist/api/resources/sync/client/requests → api/types}/SyncCreate.d.ts +2 -7
  57. package/api/types/SyncJob.d.ts +6 -4
  58. package/api/{resources/sync/client/requests → types}/SyncUpdate.d.ts +2 -3
  59. package/api/types/User.d.ts +1 -1
  60. package/api/types/UserCreate.d.ts +11 -0
  61. package/api/types/index.d.ts +24 -4
  62. package/api/types/index.js +24 -4
  63. package/core/auth/BasicAuth.d.ts +8 -0
  64. package/core/auth/BasicAuth.js +26 -0
  65. package/core/auth/BearerToken.d.ts +5 -0
  66. package/core/auth/BearerToken.js +15 -0
  67. package/core/auth/index.d.ts +2 -0
  68. package/core/auth/index.js +7 -0
  69. package/core/index.d.ts +1 -0
  70. package/core/index.js +1 -0
  71. package/dist/Client.d.ts +8 -13
  72. package/dist/Client.js +13 -23
  73. package/dist/api/index.d.ts +1 -1
  74. package/dist/api/index.js +1 -1
  75. package/dist/api/resources/collections/client/Client.d.ts +112 -0
  76. package/{api/resources/apiKeys → dist/api/resources/collections}/client/Client.js +133 -94
  77. package/dist/api/resources/collections/client/requests/CollectionCreate.d.ts +15 -0
  78. package/{api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts → dist/api/resources/collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.d.ts} +1 -1
  79. package/{api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts → dist/api/resources/collections/client/requests/ListCollectionsCollectionsGetRequest.d.ts} +1 -1
  80. package/dist/api/resources/collections/client/requests/index.d.ts +3 -0
  81. package/dist/api/resources/connections/client/Client.d.ts +3 -177
  82. package/dist/api/resources/connections/client/Client.js +7 -553
  83. package/dist/api/resources/connections/client/index.d.ts +1 -1
  84. package/dist/api/resources/connections/client/index.js +0 -15
  85. package/dist/api/resources/index.d.ts +4 -9
  86. package/dist/api/resources/index.js +5 -10
  87. package/dist/api/resources/sourceConnections/client/Client.d.ts +191 -0
  88. package/{api/resources/sync → dist/api/resources/sourceConnections}/client/Client.js +121 -412
  89. package/dist/api/resources/sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.d.ts +10 -0
  90. package/dist/api/resources/sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.js +5 -0
  91. package/dist/api/resources/sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.d.ts +10 -0
  92. package/dist/api/resources/sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.js +5 -0
  93. package/{api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts → dist/api/resources/sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.d.ts} +5 -1
  94. package/dist/api/resources/sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.js +5 -0
  95. package/dist/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +17 -0
  96. package/dist/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +5 -0
  97. package/dist/api/resources/sourceConnections/client/requests/index.d.ts +4 -0
  98. package/dist/api/resources/sources/client/Client.d.ts +4 -2
  99. package/dist/api/resources/sources/client/Client.js +11 -6
  100. package/dist/api/resources/whiteLabels/client/Client.d.ts +3 -47
  101. package/dist/api/resources/whiteLabels/client/Client.js +20 -170
  102. package/dist/api/types/ApiKey.d.ts +3 -3
  103. package/dist/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.d.ts +2 -2
  104. package/dist/api/types/ApiKeyCreate.js +5 -0
  105. package/{api/resources/connections/client/requests → dist/api/types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -9
  106. package/dist/api/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +5 -0
  107. package/dist/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +8 -0
  108. package/dist/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js +5 -0
  109. package/dist/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
  110. package/dist/api/types/Collection.d.ts +19 -0
  111. package/dist/api/types/Collection.js +5 -0
  112. package/dist/api/types/CollectionStatus.d.ts +13 -0
  113. package/dist/api/types/CollectionStatus.js +12 -0
  114. package/dist/api/types/CollectionUpdate.d.ts +10 -0
  115. package/dist/api/types/CollectionUpdate.js +5 -0
  116. package/dist/api/types/ConfigValues.d.ts +9 -0
  117. package/dist/api/types/ConfigValues.js +5 -0
  118. package/{api/types/DestinationWithConfigFields.d.ts → dist/api/types/DestinationWithAuthenticationFields.d.ts} +2 -2
  119. package/dist/api/types/DestinationWithAuthenticationFields.js +5 -0
  120. package/{api/types/EmbeddingModelWithConfigFields.d.ts → dist/api/types/EmbeddingModelWithAuthenticationFields.d.ts} +2 -2
  121. package/dist/api/types/EmbeddingModelWithAuthenticationFields.js +5 -0
  122. package/dist/api/types/EntityCount.d.ts +9 -0
  123. package/dist/api/types/EntityCount.js +5 -0
  124. package/dist/api/types/Organization.d.ts +13 -0
  125. package/dist/api/types/Organization.js +5 -0
  126. package/dist/api/types/ResponseType.d.ts +11 -0
  127. package/dist/api/types/ResponseType.js +10 -0
  128. package/dist/api/types/SearchResponse.d.ts +13 -0
  129. package/dist/api/types/SearchResponse.js +5 -0
  130. package/dist/api/types/SearchStatus.d.ts +12 -0
  131. package/dist/api/types/SearchStatus.js +11 -0
  132. package/dist/api/types/SourceConnection.d.ts +31 -0
  133. package/dist/api/types/SourceConnection.js +5 -0
  134. package/dist/api/types/SourceConnectionAuthFields.d.ts +5 -0
  135. package/dist/api/types/SourceConnectionAuthFields.js +5 -0
  136. package/dist/api/types/SourceConnectionCreate.d.ts +21 -0
  137. package/dist/api/types/SourceConnectionCreate.js +5 -0
  138. package/dist/api/types/SourceConnectionJob.d.ts +30 -0
  139. package/dist/api/types/SourceConnectionJob.js +5 -0
  140. package/dist/api/types/SourceConnectionListItem.d.ts +21 -0
  141. package/dist/api/types/SourceConnectionListItem.js +5 -0
  142. package/dist/api/types/SourceConnectionStatus.d.ts +12 -0
  143. package/dist/api/types/SourceConnectionStatus.js +11 -0
  144. package/dist/api/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +2 -2
  145. package/dist/api/types/SourceWithAuthenticationFields.js +5 -0
  146. package/{api/resources/sync/client/requests → dist/api/types}/SyncCreate.d.ts +2 -7
  147. package/dist/api/types/SyncCreate.js +5 -0
  148. package/dist/api/types/SyncJob.d.ts +6 -4
  149. package/dist/api/{resources/sync/client/requests → types}/SyncUpdate.d.ts +2 -3
  150. package/dist/api/types/SyncUpdate.js +5 -0
  151. package/dist/api/types/User.d.ts +1 -1
  152. package/dist/api/types/UserCreate.d.ts +11 -0
  153. package/dist/api/types/UserCreate.js +5 -0
  154. package/dist/api/types/index.d.ts +24 -4
  155. package/dist/api/types/index.js +24 -4
  156. package/dist/core/auth/BasicAuth.d.ts +8 -0
  157. package/dist/core/auth/BasicAuth.js +26 -0
  158. package/dist/core/auth/BearerToken.d.ts +5 -0
  159. package/dist/core/auth/BearerToken.js +15 -0
  160. package/dist/core/auth/index.d.ts +2 -0
  161. package/dist/core/auth/index.js +7 -0
  162. package/dist/core/index.d.ts +1 -0
  163. package/dist/core/index.js +1 -0
  164. package/dist/serialization/index.d.ts +1 -1
  165. package/dist/serialization/index.js +1 -1
  166. package/dist/serialization/resources/collections/client/index.d.ts +3 -0
  167. package/dist/serialization/resources/{apiKeys → collections}/client/index.js +3 -2
  168. package/dist/serialization/resources/{apiKeys/client/readApiKeys.d.ts → collections/client/listCollections.d.ts} +3 -3
  169. package/{serialization/resources/connections/client/listConnectedIntegrations.js → dist/serialization/resources/collections/client/listCollections.js} +2 -2
  170. package/dist/serialization/resources/{embeddingModels/client/readEmbeddingModels.d.ts → collections/client/refreshAllSourceConnections.d.ts} +3 -3
  171. package/dist/serialization/resources/{apiKeys/client/readApiKeys.js → collections/client/refreshAllSourceConnections.js} +2 -2
  172. package/dist/serialization/resources/{apiKeys/client/requests/ApiKeyCreate.d.ts → collections/client/requests/CollectionCreate.d.ts} +4 -3
  173. package/dist/serialization/resources/collections/client/requests/CollectionCreate.js +44 -0
  174. package/dist/serialization/resources/collections/client/requests/index.d.ts +1 -0
  175. package/dist/serialization/resources/collections/client/requests/index.js +5 -0
  176. package/dist/serialization/resources/connections/client/index.d.ts +0 -5
  177. package/dist/serialization/resources/connections/client/index.js +1 -9
  178. package/dist/serialization/resources/index.d.ts +4 -8
  179. package/dist/serialization/resources/index.js +5 -9
  180. package/dist/serialization/resources/sourceConnections/client/index.d.ts +3 -0
  181. package/{serialization/resources/sync → dist/serialization/resources/sourceConnections}/client/index.js +3 -3
  182. package/dist/serialization/resources/{connections/client/listConnectedIntegrations.d.ts → sourceConnections/client/listSourceConnectionJobs.d.ts} +3 -3
  183. package/dist/serialization/resources/{connections/client/getConnectionCredentials.js → sourceConnections/client/listSourceConnectionJobs.js} +2 -1
  184. package/dist/serialization/resources/sourceConnections/client/listSourceConnections.d.ts +11 -0
  185. package/dist/serialization/resources/sourceConnections/client/listSourceConnections.js +42 -0
  186. package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +18 -0
  187. package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +49 -0
  188. package/dist/serialization/resources/sourceConnections/client/requests/index.d.ts +1 -0
  189. package/dist/serialization/resources/sourceConnections/client/requests/index.js +5 -0
  190. package/dist/serialization/resources/whiteLabels/client/index.d.ts +0 -2
  191. package/dist/serialization/resources/whiteLabels/client/index.js +1 -3
  192. package/dist/serialization/types/ApiKey.d.ts +2 -2
  193. package/dist/serialization/types/ApiKey.js +2 -2
  194. package/dist/serialization/types/ApiKeyCreate.d.ts +12 -0
  195. package/{serialization/resources/apiKeys/client/requests → dist/serialization/types}/ApiKeyCreate.js +1 -1
  196. package/dist/serialization/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +13 -0
  197. package/dist/serialization/{resources/connections/client/requests → types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +2 -2
  198. package/dist/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +14 -0
  199. package/dist/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js +45 -0
  200. package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
  201. package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +2 -0
  202. package/dist/serialization/types/{ApiKeyWithPlainKey.d.ts → Collection.d.ts} +7 -7
  203. package/{serialization/types/ApiKeyWithPlainKey.js → dist/serialization/types/Collection.js} +7 -7
  204. package/dist/serialization/types/CollectionStatus.d.ts +10 -0
  205. package/dist/serialization/types/CollectionStatus.js +41 -0
  206. package/dist/serialization/types/CollectionUpdate.d.ts +12 -0
  207. package/dist/serialization/types/CollectionUpdate.js +43 -0
  208. package/dist/serialization/types/ConfigValues.d.ts +10 -0
  209. package/dist/serialization/types/ConfigValues.js +41 -0
  210. package/dist/serialization/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +3 -3
  211. package/dist/serialization/types/{DestinationWithConfigFields.js → DestinationWithAuthenticationFields.js} +3 -3
  212. package/{serialization/types/EmbeddingModelWithConfigFields.d.ts → dist/serialization/types/EmbeddingModelWithAuthenticationFields.d.ts} +3 -3
  213. package/{serialization/types/EmbeddingModelWithConfigFields.js → dist/serialization/types/EmbeddingModelWithAuthenticationFields.js} +3 -3
  214. package/dist/serialization/types/EntityCount.d.ts +12 -0
  215. package/dist/serialization/{resources/connections/client/sendOauth2WhiteLabelCode.js → types/EntityCount.js} +5 -3
  216. package/dist/serialization/types/Organization.d.ts +16 -0
  217. package/dist/serialization/types/Organization.js +47 -0
  218. package/dist/serialization/types/ResponseType.d.ts +10 -0
  219. package/dist/serialization/{resources/connections/client/getOauth2WhiteLabelAuthUrl.js → types/ResponseType.js} +3 -3
  220. package/dist/serialization/types/SearchResponse.d.ts +17 -0
  221. package/dist/serialization/types/SearchResponse.js +48 -0
  222. package/dist/serialization/types/SearchStatus.d.ts +10 -0
  223. package/dist/serialization/types/SearchStatus.js +41 -0
  224. package/dist/serialization/types/SourceConnection.d.ts +36 -0
  225. package/dist/serialization/types/SourceConnection.js +67 -0
  226. package/dist/serialization/types/SourceConnectionAuthFields.d.ts +11 -0
  227. package/dist/serialization/types/SourceConnectionAuthFields.js +42 -0
  228. package/dist/serialization/types/SourceConnectionCreate.d.ts +20 -0
  229. package/dist/serialization/types/SourceConnectionCreate.js +51 -0
  230. package/dist/serialization/types/SourceConnectionJob.d.ts +30 -0
  231. package/dist/serialization/types/SourceConnectionJob.js +61 -0
  232. package/dist/serialization/types/SourceConnectionListItem.d.ts +21 -0
  233. package/dist/serialization/types/SourceConnectionListItem.js +52 -0
  234. package/dist/serialization/types/SourceConnectionStatus.d.ts +10 -0
  235. package/dist/serialization/types/SourceConnectionStatus.js +41 -0
  236. package/dist/serialization/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +3 -3
  237. package/dist/serialization/types/{SourceWithConfigFields.js → SourceWithAuthenticationFields.js} +3 -3
  238. package/{serialization/resources/sync/client/requests → dist/serialization/types}/SyncCreate.d.ts +5 -5
  239. package/dist/serialization/{resources/sync/client/requests → types}/SyncCreate.js +2 -2
  240. package/dist/serialization/types/SyncJob.d.ts +6 -4
  241. package/dist/serialization/types/SyncJob.js +6 -4
  242. package/dist/serialization/{resources/sync/client/requests → types}/SyncUpdate.d.ts +5 -5
  243. package/{serialization/resources/sync/client/requests → dist/serialization/types}/SyncUpdate.js +2 -2
  244. package/dist/serialization/types/User.d.ts +1 -1
  245. package/dist/serialization/types/User.js +1 -1
  246. package/dist/serialization/types/UserCreate.d.ts +14 -0
  247. package/dist/serialization/types/UserCreate.js +45 -0
  248. package/dist/serialization/types/index.d.ts +24 -4
  249. package/dist/serialization/types/index.js +24 -4
  250. package/dist/version.d.ts +1 -1
  251. package/dist/version.js +1 -1
  252. package/package.json +3 -2
  253. package/reference.md +257 -1437
  254. package/serialization/index.d.ts +1 -1
  255. package/serialization/index.js +1 -1
  256. package/serialization/resources/collections/client/index.d.ts +3 -0
  257. package/serialization/resources/{apiKeys → collections}/client/index.js +3 -2
  258. package/{dist/serialization/resources/sync/client/listSyncJobs.d.ts → serialization/resources/collections/client/listCollections.d.ts} +3 -3
  259. package/{dist/serialization/resources/connections/client/listConnectedIntegrations.js → serialization/resources/collections/client/listCollections.js} +2 -2
  260. package/{dist/serialization/resources/sync/client/listAllJobs.d.ts → serialization/resources/collections/client/refreshAllSourceConnections.d.ts} +3 -3
  261. package/serialization/resources/collections/client/refreshAllSourceConnections.js +42 -0
  262. package/serialization/resources/{apiKeys/client/requests/ApiKeyCreate.d.ts → collections/client/requests/CollectionCreate.d.ts} +4 -3
  263. package/serialization/resources/collections/client/requests/CollectionCreate.js +44 -0
  264. package/serialization/resources/collections/client/requests/index.d.ts +1 -0
  265. package/serialization/resources/collections/client/requests/index.js +5 -0
  266. package/serialization/resources/connections/client/index.d.ts +0 -5
  267. package/serialization/resources/connections/client/index.js +1 -9
  268. package/serialization/resources/index.d.ts +4 -8
  269. package/serialization/resources/index.js +5 -9
  270. package/serialization/resources/sourceConnections/client/index.d.ts +3 -0
  271. package/{dist/serialization/resources/sync → serialization/resources/sourceConnections}/client/index.js +3 -3
  272. package/serialization/resources/sourceConnections/client/listSourceConnectionJobs.d.ts +11 -0
  273. package/serialization/resources/sourceConnections/client/listSourceConnectionJobs.js +42 -0
  274. package/serialization/resources/sourceConnections/client/listSourceConnections.d.ts +11 -0
  275. package/serialization/resources/sourceConnections/client/listSourceConnections.js +42 -0
  276. package/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +18 -0
  277. package/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +49 -0
  278. package/serialization/resources/sourceConnections/client/requests/index.d.ts +1 -0
  279. package/serialization/resources/sourceConnections/client/requests/index.js +5 -0
  280. package/serialization/resources/whiteLabels/client/index.d.ts +0 -2
  281. package/serialization/resources/whiteLabels/client/index.js +1 -3
  282. package/serialization/types/ApiKey.d.ts +2 -2
  283. package/serialization/types/ApiKey.js +2 -2
  284. package/serialization/types/ApiKeyCreate.d.ts +12 -0
  285. package/{dist/serialization/resources/apiKeys/client/requests → serialization/types}/ApiKeyCreate.js +1 -1
  286. package/serialization/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +13 -0
  287. package/serialization/{resources/connections/client/requests → types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +2 -2
  288. package/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +14 -0
  289. package/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js +45 -0
  290. package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
  291. package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +2 -0
  292. package/serialization/types/{ApiKeyWithPlainKey.d.ts → Collection.d.ts} +7 -7
  293. package/{dist/serialization/types/ApiKeyWithPlainKey.js → serialization/types/Collection.js} +7 -7
  294. package/serialization/types/CollectionStatus.d.ts +10 -0
  295. package/serialization/types/CollectionStatus.js +41 -0
  296. package/serialization/types/CollectionUpdate.d.ts +12 -0
  297. package/serialization/types/CollectionUpdate.js +43 -0
  298. package/serialization/types/ConfigValues.d.ts +10 -0
  299. package/serialization/types/ConfigValues.js +41 -0
  300. package/serialization/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +3 -3
  301. package/serialization/types/{DestinationWithConfigFields.js → DestinationWithAuthenticationFields.js} +3 -3
  302. package/{dist/serialization/types/EmbeddingModelWithConfigFields.d.ts → serialization/types/EmbeddingModelWithAuthenticationFields.d.ts} +3 -3
  303. package/{dist/serialization/types/EmbeddingModelWithConfigFields.js → serialization/types/EmbeddingModelWithAuthenticationFields.js} +3 -3
  304. package/serialization/types/EntityCount.d.ts +12 -0
  305. package/{dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js → serialization/types/EntityCount.js} +5 -3
  306. package/serialization/types/Organization.d.ts +16 -0
  307. package/serialization/types/Organization.js +47 -0
  308. package/serialization/types/ResponseType.d.ts +10 -0
  309. package/{dist/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js → serialization/types/ResponseType.js} +3 -3
  310. package/serialization/types/SearchResponse.d.ts +17 -0
  311. package/serialization/types/SearchResponse.js +48 -0
  312. package/serialization/types/SearchStatus.d.ts +10 -0
  313. package/serialization/types/SearchStatus.js +41 -0
  314. package/serialization/types/SourceConnection.d.ts +36 -0
  315. package/serialization/types/SourceConnection.js +67 -0
  316. package/serialization/types/SourceConnectionAuthFields.d.ts +11 -0
  317. package/serialization/types/SourceConnectionAuthFields.js +42 -0
  318. package/serialization/types/SourceConnectionCreate.d.ts +20 -0
  319. package/serialization/types/SourceConnectionCreate.js +51 -0
  320. package/serialization/types/SourceConnectionJob.d.ts +30 -0
  321. package/serialization/types/SourceConnectionJob.js +61 -0
  322. package/serialization/types/SourceConnectionListItem.d.ts +21 -0
  323. package/serialization/types/SourceConnectionListItem.js +52 -0
  324. package/serialization/types/SourceConnectionStatus.d.ts +10 -0
  325. package/serialization/types/SourceConnectionStatus.js +41 -0
  326. package/serialization/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +3 -3
  327. package/serialization/types/{SourceWithConfigFields.js → SourceWithAuthenticationFields.js} +3 -3
  328. package/{dist/serialization/resources/sync/client/requests → serialization/types}/SyncCreate.d.ts +5 -5
  329. package/serialization/{resources/sync/client/requests → types}/SyncCreate.js +2 -2
  330. package/serialization/types/SyncJob.d.ts +6 -4
  331. package/serialization/types/SyncJob.js +6 -4
  332. package/serialization/{resources/sync/client/requests → types}/SyncUpdate.d.ts +5 -5
  333. package/{dist/serialization/resources/sync/client/requests → serialization/types}/SyncUpdate.js +2 -2
  334. package/serialization/types/User.d.ts +1 -1
  335. package/serialization/types/User.js +1 -1
  336. package/serialization/types/UserCreate.d.ts +14 -0
  337. package/serialization/types/UserCreate.js +45 -0
  338. package/serialization/types/index.d.ts +24 -4
  339. package/serialization/types/index.js +24 -4
  340. package/version.d.ts +1 -1
  341. package/version.js +1 -1
  342. package/api/resources/apiKeys/client/Client.d.ts +0 -131
  343. package/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +0 -12
  344. package/api/resources/apiKeys/client/requests/index.d.ts +0 -3
  345. package/api/resources/connections/client/requests/index.d.ts +0 -1
  346. package/api/resources/embeddingModels/client/Client.d.ts +0 -71
  347. package/api/resources/embeddingModels/client/Client.js +0 -211
  348. package/api/resources/embeddingModels/client/index.d.ts +0 -1
  349. package/api/resources/search/client/Client.d.ts +0 -55
  350. package/api/resources/search/client/Client.js +0 -147
  351. package/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +0 -20
  352. package/api/resources/search/client/requests/index.d.ts +0 -1
  353. package/api/resources/sync/client/Client.d.ts +0 -275
  354. package/api/resources/sync/client/requests/index.d.ts +0 -5
  355. package/api/resources/sync/client/requests/index.js +0 -2
  356. package/api/resources/sync/index.d.ts +0 -2
  357. package/api/resources/sync/index.js +0 -18
  358. package/api/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -5
  359. package/api/resources/sync/types/index.d.ts +0 -1
  360. package/api/resources/sync/types/index.js +0 -17
  361. package/api/types/ApiKeyWithPlainKey.d.ts +0 -18
  362. package/dist/api/resources/apiKeys/client/Client.d.ts +0 -131
  363. package/dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +0 -12
  364. package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +0 -11
  365. package/dist/api/resources/apiKeys/client/requests/index.d.ts +0 -3
  366. package/dist/api/resources/apiKeys/client/requests/index.js +0 -2
  367. package/dist/api/resources/connections/client/requests/index.d.ts +0 -1
  368. package/dist/api/resources/connections/client/requests/index.js +0 -2
  369. package/dist/api/resources/embeddingModels/client/Client.d.ts +0 -71
  370. package/dist/api/resources/embeddingModels/client/Client.js +0 -211
  371. package/dist/api/resources/embeddingModels/client/index.d.ts +0 -1
  372. package/dist/api/resources/embeddingModels/client/index.js +0 -2
  373. package/dist/api/resources/search/client/Client.d.ts +0 -55
  374. package/dist/api/resources/search/client/Client.js +0 -147
  375. package/dist/api/resources/search/client/index.d.ts +0 -1
  376. package/dist/api/resources/search/client/index.js +0 -17
  377. package/dist/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +0 -20
  378. package/dist/api/resources/search/client/requests/index.d.ts +0 -1
  379. package/dist/api/resources/search/client/requests/index.js +0 -2
  380. package/dist/api/resources/sync/client/Client.d.ts +0 -275
  381. package/dist/api/resources/sync/client/index.d.ts +0 -1
  382. package/dist/api/resources/sync/client/index.js +0 -17
  383. package/dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.d.ts +0 -12
  384. package/dist/api/resources/sync/client/requests/index.d.ts +0 -5
  385. package/dist/api/resources/sync/client/requests/index.js +0 -2
  386. package/dist/api/resources/sync/index.d.ts +0 -2
  387. package/dist/api/resources/sync/index.js +0 -18
  388. package/dist/api/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -5
  389. package/dist/api/resources/sync/types/index.d.ts +0 -1
  390. package/dist/api/resources/sync/types/index.js +0 -17
  391. package/dist/api/types/ApiKeyWithPlainKey.d.ts +0 -18
  392. package/dist/serialization/resources/apiKeys/client/index.d.ts +0 -2
  393. package/dist/serialization/resources/apiKeys/client/requests/index.d.ts +0 -1
  394. package/dist/serialization/resources/apiKeys/client/requests/index.js +0 -5
  395. package/dist/serialization/resources/connections/client/getConnectionCredentials.d.ts +0 -9
  396. package/dist/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +0 -9
  397. package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
  398. package/dist/serialization/resources/connections/client/requests/index.d.ts +0 -1
  399. package/dist/serialization/resources/connections/client/requests/index.js +0 -5
  400. package/dist/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +0 -9
  401. package/dist/serialization/resources/embeddingModels/client/index.d.ts +0 -1
  402. package/dist/serialization/resources/embeddingModels/client/index.js +0 -37
  403. package/dist/serialization/resources/embeddingModels/client/readEmbeddingModels.js +0 -42
  404. package/dist/serialization/resources/search/client/index.d.ts +0 -1
  405. package/dist/serialization/resources/search/client/index.js +0 -37
  406. package/dist/serialization/resources/search/client/search.d.ts +0 -9
  407. package/dist/serialization/resources/search/client/search.js +0 -41
  408. package/dist/serialization/resources/search/index.d.ts +0 -1
  409. package/dist/serialization/resources/search/index.js +0 -17
  410. package/dist/serialization/resources/sync/client/index.d.ts +0 -3
  411. package/dist/serialization/resources/sync/client/listAllJobs.js +0 -42
  412. package/dist/serialization/resources/sync/client/listSyncJobs.js +0 -42
  413. package/dist/serialization/resources/sync/client/requests/index.d.ts +0 -2
  414. package/dist/serialization/resources/sync/client/requests/index.js +0 -7
  415. package/dist/serialization/resources/sync/index.d.ts +0 -2
  416. package/dist/serialization/resources/sync/index.js +0 -18
  417. package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -12
  418. package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +0 -46
  419. package/dist/serialization/resources/sync/types/index.d.ts +0 -1
  420. package/dist/serialization/resources/sync/types/index.js +0 -17
  421. package/dist/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +0 -9
  422. package/dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +0 -9
  423. package/serialization/resources/apiKeys/client/index.d.ts +0 -2
  424. package/serialization/resources/apiKeys/client/readApiKeys.d.ts +0 -11
  425. package/serialization/resources/apiKeys/client/readApiKeys.js +0 -42
  426. package/serialization/resources/apiKeys/client/requests/index.d.ts +0 -1
  427. package/serialization/resources/apiKeys/client/requests/index.js +0 -5
  428. package/serialization/resources/apiKeys/index.d.ts +0 -1
  429. package/serialization/resources/apiKeys/index.js +0 -17
  430. package/serialization/resources/connections/client/getConnectionCredentials.d.ts +0 -9
  431. package/serialization/resources/connections/client/getConnectionCredentials.js +0 -41
  432. package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +0 -9
  433. package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.js +0 -41
  434. package/serialization/resources/connections/client/listConnectedIntegrations.d.ts +0 -11
  435. package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
  436. package/serialization/resources/connections/client/requests/index.d.ts +0 -1
  437. package/serialization/resources/connections/client/requests/index.js +0 -5
  438. package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +0 -9
  439. package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.js +0 -41
  440. package/serialization/resources/embeddingModels/client/index.d.ts +0 -1
  441. package/serialization/resources/embeddingModels/client/index.js +0 -37
  442. package/serialization/resources/embeddingModels/client/readEmbeddingModels.d.ts +0 -11
  443. package/serialization/resources/embeddingModels/client/readEmbeddingModels.js +0 -42
  444. package/serialization/resources/embeddingModels/index.d.ts +0 -1
  445. package/serialization/resources/embeddingModels/index.js +0 -17
  446. package/serialization/resources/search/client/index.d.ts +0 -1
  447. package/serialization/resources/search/client/index.js +0 -37
  448. package/serialization/resources/search/client/search.d.ts +0 -9
  449. package/serialization/resources/search/client/search.js +0 -41
  450. package/serialization/resources/search/index.d.ts +0 -1
  451. package/serialization/resources/search/index.js +0 -17
  452. package/serialization/resources/sync/client/index.d.ts +0 -3
  453. package/serialization/resources/sync/client/listAllJobs.d.ts +0 -11
  454. package/serialization/resources/sync/client/listAllJobs.js +0 -42
  455. package/serialization/resources/sync/client/listSyncJobs.d.ts +0 -11
  456. package/serialization/resources/sync/client/listSyncJobs.js +0 -42
  457. package/serialization/resources/sync/client/requests/index.d.ts +0 -2
  458. package/serialization/resources/sync/client/requests/index.js +0 -7
  459. package/serialization/resources/sync/index.d.ts +0 -2
  460. package/serialization/resources/sync/index.js +0 -18
  461. package/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -12
  462. package/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +0 -46
  463. package/serialization/resources/sync/types/index.d.ts +0 -1
  464. package/serialization/resources/sync/types/index.js +0 -17
  465. package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +0 -9
  466. package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js +0 -41
  467. package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +0 -9
  468. package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js +0 -41
  469. /package/api/resources/{apiKeys → collections}/client/index.d.ts +0 -0
  470. /package/api/resources/{apiKeys → collections}/client/index.js +0 -0
  471. /package/api/resources/{apiKeys/client/requests/ApiKeyCreate.js → collections/client/requests/CollectionCreate.js} +0 -0
  472. /package/api/resources/{apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js → collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.js} +0 -0
  473. /package/api/resources/{apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js → collections/client/requests/ListCollectionsCollectionsGetRequest.js} +0 -0
  474. /package/api/resources/{apiKeys → collections}/client/requests/index.js +0 -0
  475. /package/api/resources/{apiKeys → collections}/index.d.ts +0 -0
  476. /package/api/resources/{apiKeys → collections}/index.js +0 -0
  477. /package/api/resources/{search → sourceConnections}/client/index.d.ts +0 -0
  478. /package/api/resources/{search → sourceConnections}/client/index.js +0 -0
  479. /package/api/resources/{connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.js} +0 -0
  480. /package/api/resources/{search/client/requests/SearchSearchGetRequest.js → sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.js} +0 -0
  481. /package/api/resources/{sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js → sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.js} +0 -0
  482. /package/api/resources/{sync/client/requests/ListAllJobsSyncJobsGetRequest.js → sourceConnections/client/requests/SourceConnectionUpdate.js} +0 -0
  483. /package/api/resources/{connections → sourceConnections}/client/requests/index.js +0 -0
  484. /package/api/resources/{embeddingModels → sourceConnections}/index.d.ts +0 -0
  485. /package/api/resources/{embeddingModels → sourceConnections}/index.js +0 -0
  486. /package/{dist/api/resources/apiKeys/client/requests → api/types}/ApiKeyCreate.js +0 -0
  487. /package/{dist/api/resources/connections/client/requests → api/types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +0 -0
  488. /package/api/{resources/sync/client/requests/ListSyncsSyncGetRequest.js → types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js} +0 -0
  489. /package/api/{resources/sync/client/requests/SyncCreate.js → types/Collection.js} +0 -0
  490. /package/api/{resources/sync/client/requests/SyncUpdate.js → types/CollectionUpdate.js} +0 -0
  491. /package/api/{resources/sync/types/ListSyncsSyncGetResponse.js → types/ConfigValues.js} +0 -0
  492. /package/api/types/{ApiKeyWithPlainKey.js → DestinationWithAuthenticationFields.js} +0 -0
  493. /package/api/types/{DestinationWithConfigFields.js → EmbeddingModelWithAuthenticationFields.js} +0 -0
  494. /package/api/types/{EmbeddingModelWithConfigFields.js → EntityCount.js} +0 -0
  495. /package/api/types/{SourceWithConfigFields.js → Organization.js} +0 -0
  496. /package/{dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js → api/types/SearchResponse.js} +0 -0
  497. /package/{dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js → api/types/SourceConnection.js} +0 -0
  498. /package/{dist/api/resources/search/client/requests/SearchSearchGetRequest.js → api/types/SourceConnectionAuthFields.js} +0 -0
  499. /package/{dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js → api/types/SourceConnectionCreate.js} +0 -0
  500. /package/{dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.js → api/types/SourceConnectionJob.js} +0 -0
  501. /package/{dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.js → api/types/SourceConnectionListItem.js} +0 -0
  502. /package/{dist/api/resources/sync/client/requests/SyncCreate.js → api/types/SourceWithAuthenticationFields.js} +0 -0
  503. /package/{dist/api/resources/sync/client/requests/SyncUpdate.js → api/types/SyncCreate.js} +0 -0
  504. /package/{dist/api/resources/sync/types/ListSyncsSyncGetResponse.js → api/types/SyncUpdate.js} +0 -0
  505. /package/{dist/api/types/ApiKeyWithPlainKey.js → api/types/UserCreate.js} +0 -0
  506. /package/{api/resources/sync → dist/api/resources/collections}/client/index.d.ts +0 -0
  507. /package/{api/resources/sync → dist/api/resources/collections}/client/index.js +0 -0
  508. /package/dist/api/{types/DestinationWithConfigFields.js → resources/collections/client/requests/CollectionCreate.js} +0 -0
  509. /package/dist/api/{types/EmbeddingModelWithConfigFields.js → resources/collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.js} +0 -0
  510. /package/dist/api/{types/SourceWithConfigFields.js → resources/collections/client/requests/ListCollectionsCollectionsGetRequest.js} +0 -0
  511. /package/{api/resources/embeddingModels/client → dist/api/resources/collections/client/requests}/index.js +0 -0
  512. /package/{api/resources/search → dist/api/resources/collections}/index.d.ts +0 -0
  513. /package/{api/resources/search → dist/api/resources/collections}/index.js +0 -0
  514. /package/dist/api/resources/{apiKeys → sourceConnections}/client/index.d.ts +0 -0
  515. /package/dist/api/resources/{apiKeys → sourceConnections}/client/index.js +0 -0
  516. /package/{api/resources/search → dist/api/resources/sourceConnections}/client/requests/index.js +0 -0
  517. /package/dist/api/resources/{apiKeys → sourceConnections}/index.d.ts +0 -0
  518. /package/dist/api/resources/{apiKeys → sourceConnections}/index.js +0 -0
  519. /package/dist/{api/resources/embeddingModels → serialization/resources/collections}/index.d.ts +0 -0
  520. /package/dist/{api/resources/embeddingModels → serialization/resources/collections}/index.js +0 -0
  521. /package/dist/{api/resources/search → serialization/resources/sourceConnections}/index.d.ts +0 -0
  522. /package/dist/{api/resources/search → serialization/resources/sourceConnections}/index.js +0 -0
  523. /package/{dist/serialization/resources/apiKeys → serialization/resources/collections}/index.d.ts +0 -0
  524. /package/{dist/serialization/resources/apiKeys → serialization/resources/collections}/index.js +0 -0
  525. /package/{dist/serialization/resources/embeddingModels → serialization/resources/sourceConnections}/index.d.ts +0 -0
  526. /package/{dist/serialization/resources/embeddingModels → serialization/resources/sourceConnections}/index.js +0 -0
@@ -48,60 +48,58 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
48
48
  return (mod && mod.__esModule) ? mod : { "default": mod };
49
49
  };
50
50
  Object.defineProperty(exports, "__esModule", { value: true });
51
- exports.Sync = void 0;
51
+ exports.SourceConnections = void 0;
52
52
  const environments = __importStar(require("../../../../environments"));
53
53
  const core = __importStar(require("../../../../core"));
54
54
  const AirweaveSDK = __importStar(require("../../../index"));
55
55
  const url_join_1 = __importDefault(require("url-join"));
56
56
  const serializers = __importStar(require("../../../../serialization/index"));
57
57
  const errors = __importStar(require("../../../../errors/index"));
58
- class Sync {
59
- constructor(_options = {}) {
58
+ class SourceConnections {
59
+ constructor(_options) {
60
60
  this._options = _options;
61
61
  }
62
62
  /**
63
- * List all syncs for the current user.
63
+ * List all source connections for the current user.
64
64
  *
65
65
  * Args:
66
- * -----
67
66
  * db: The database session
68
- * skip: The number of syncs to skip
69
- * limit: The number of syncs to return
70
- * with_source_connection: Whether to include the source connection in the response
67
+ * collection: The collection to filter by
68
+ * skip: The number of connections to skip
69
+ * limit: The number of connections to return
71
70
  * user: The current user
72
71
  *
73
72
  * Returns:
74
- * --------
75
- * list[schemas.Sync] | list[schemas.SyncWithSourceConnection]: A list of syncs
73
+ * A list of source connection list items with essential information
76
74
  *
77
- * @param {AirweaveSDK.ListSyncsSyncGetRequest} request
78
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
75
+ * @param {AirweaveSDK.ListSourceConnectionsSourceConnectionsGetRequest} request
76
+ * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
79
77
  *
80
78
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
81
79
  *
82
80
  * @example
83
- * await client.sync.listSyncs()
81
+ * await client.sourceConnections.listSourceConnections()
84
82
  */
85
- listSyncs() {
83
+ listSourceConnections() {
86
84
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
87
85
  var _a;
88
- const { skip, limit, withSourceConnection } = request;
86
+ const { collection, skip, limit } = request;
89
87
  const _queryParams = {};
88
+ if (collection != null) {
89
+ _queryParams["collection"] = collection;
90
+ }
90
91
  if (skip != null) {
91
92
  _queryParams["skip"] = skip.toString();
92
93
  }
93
94
  if (limit != null) {
94
95
  _queryParams["limit"] = limit.toString();
95
96
  }
96
- if (withSourceConnection != null) {
97
- _queryParams["with_source_connection"] = withSourceConnection.toString();
98
- }
99
97
  const _response = yield core.fetcher({
100
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "sync/"),
98
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "source-connections"),
101
99
  method: "GET",
102
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
100
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
103
101
  ? yield core.Supplier.get(this._options.apiKey)
104
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
102
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
105
103
  contentType: "application/json",
106
104
  queryParameters: _queryParams,
107
105
  requestType: "json",
@@ -110,7 +108,7 @@ class Sync {
110
108
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
111
109
  });
112
110
  if (_response.ok) {
113
- return serializers.ListSyncsSyncGetResponse.parseOrThrow(_response.body, {
111
+ return serializers.sourceConnections.listSourceConnections.Response.parseOrThrow(_response.body, {
114
112
  unrecognizedObjectKeys: "passthrough",
115
113
  allowUnrecognizedUnionMembers: true,
116
114
  allowUnrecognizedEnumValues: true,
@@ -140,7 +138,7 @@ class Sync {
140
138
  body: _response.error.rawBody,
141
139
  });
142
140
  case "timeout":
143
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/.");
141
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /source-connections.");
144
142
  case "unknown":
145
143
  throw new errors.AirweaveSDKError({
146
144
  message: _response.error.errorMessage,
@@ -149,49 +147,53 @@ class Sync {
149
147
  });
150
148
  }
151
149
  /**
152
- * Create a new sync configuration.
150
+ * Create a new source connection.
151
+ *
152
+ * This endpoint creates:
153
+ * 1. An integration credential with the provided auth fields
154
+ * 2. A collection if not provided
155
+ * 3. The source connection
156
+ * 4. A sync configuration and DAG
157
+ * 5. A sync job if immediate execution is requested
153
158
  *
154
159
  * Args:
155
- * -----
156
160
  * db: The database session
157
- * sync_in: The sync to create
161
+ * source_connection_in: The source connection to create
158
162
  * user: The current user
159
- * background_tasks: The background tasks
163
+ * background_tasks: Background tasks for async operations
160
164
  *
161
165
  * Returns:
162
- * --------
163
- * sync (schemas.Sync): The created sync
166
+ * The created source connection
164
167
  *
165
- * @param {AirweaveSDK.SyncCreate} request
166
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
168
+ * @param {AirweaveSDK.SourceConnectionCreate} request
169
+ * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
167
170
  *
168
171
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
169
172
  *
170
173
  * @example
171
- * await client.sync.createSync({
174
+ * await client.sourceConnections.createSourceConnection({
172
175
  * name: "name",
173
- * sourceConnectionId: "source_connection_id",
174
- * destinationConnectionIds: ["destination_connection_ids"]
176
+ * shortName: "short_name"
175
177
  * })
176
178
  */
177
- createSync(request, requestOptions) {
179
+ createSourceConnection(request, requestOptions) {
178
180
  return __awaiter(this, void 0, void 0, function* () {
179
181
  var _a;
180
182
  const _response = yield core.fetcher({
181
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "sync/"),
183
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "source-connections"),
182
184
  method: "POST",
183
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
185
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
184
186
  ? yield core.Supplier.get(this._options.apiKey)
185
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
187
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
186
188
  contentType: "application/json",
187
189
  requestType: "json",
188
- body: serializers.SyncCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
190
+ body: serializers.SourceConnectionCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
189
191
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
190
192
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
191
193
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
192
194
  });
193
195
  if (_response.ok) {
194
- return serializers.Sync.parseOrThrow(_response.body, {
196
+ return serializers.SourceConnection.parseOrThrow(_response.body, {
195
197
  unrecognizedObjectKeys: "passthrough",
196
198
  allowUnrecognizedUnionMembers: true,
197
199
  allowUnrecognizedEnumValues: true,
@@ -221,7 +223,7 @@ class Sync {
221
223
  body: _response.error.rawBody,
222
224
  });
223
225
  case "timeout":
224
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /sync/.");
226
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /source-connections.");
225
227
  case "unknown":
226
228
  throw new errors.AirweaveSDKError({
227
229
  message: _response.error.errorMessage,
@@ -230,44 +232,40 @@ class Sync {
230
232
  });
231
233
  }
232
234
  /**
233
- * List all sync jobs across all syncs.
235
+ * Get a specific source connection by ID.
234
236
  *
235
237
  * Args:
236
- * -----
237
238
  * db: The database session
238
- * skip: The number of jobs to skip
239
- * limit: The number of jobs to return
239
+ * source_connection_id: The ID of the source connection
240
+ * show_auth_fields: Whether to show the auth fields, default is False
240
241
  * user: The current user
241
242
  *
242
243
  * Returns:
243
- * --------
244
- * list[schemas.SyncJob]: A list of all sync jobs
244
+ * The source connection
245
245
  *
246
- * @param {AirweaveSDK.ListAllJobsSyncJobsGetRequest} request
247
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
246
+ * @param {string} sourceConnectionId
247
+ * @param {AirweaveSDK.GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest} request
248
+ * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
248
249
  *
249
250
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
250
251
  *
251
252
  * @example
252
- * await client.sync.listAllJobs()
253
+ * await client.sourceConnections.getSourceConnection("source_connection_id")
253
254
  */
254
- listAllJobs() {
255
- return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
255
+ getSourceConnection(sourceConnectionId_1) {
256
+ return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
256
257
  var _a;
257
- const { skip, limit } = request;
258
+ const { showAuthFields } = request;
258
259
  const _queryParams = {};
259
- if (skip != null) {
260
- _queryParams["skip"] = skip.toString();
261
- }
262
- if (limit != null) {
263
- _queryParams["limit"] = limit.toString();
260
+ if (showAuthFields != null) {
261
+ _queryParams["show_auth_fields"] = showAuthFields.toString();
264
262
  }
265
263
  const _response = yield core.fetcher({
266
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "sync/jobs"),
264
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
267
265
  method: "GET",
268
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
266
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
269
267
  ? yield core.Supplier.get(this._options.apiKey)
270
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
268
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
271
269
  contentType: "application/json",
272
270
  queryParameters: _queryParams,
273
271
  requestType: "json",
@@ -276,7 +274,7 @@ class Sync {
276
274
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
277
275
  });
278
276
  if (_response.ok) {
279
- return serializers.sync.listAllJobs.Response.parseOrThrow(_response.body, {
277
+ return serializers.SourceConnection.parseOrThrow(_response.body, {
280
278
  unrecognizedObjectKeys: "passthrough",
281
279
  allowUnrecognizedUnionMembers: true,
282
280
  allowUnrecognizedEnumValues: true,
@@ -306,7 +304,7 @@ class Sync {
306
304
  body: _response.error.rawBody,
307
305
  });
308
306
  case "timeout":
309
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/jobs.");
307
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /source-connections/{source_connection_id}.");
310
308
  case "unknown":
311
309
  throw new errors.AirweaveSDKError({
312
310
  message: _response.error.errorMessage,
@@ -315,43 +313,44 @@ class Sync {
315
313
  });
316
314
  }
317
315
  /**
318
- * Get a specific sync by ID.
316
+ * Update a source connection.
319
317
  *
320
318
  * Args:
321
- * -----
322
319
  * db: The database session
323
- * sync_id: The ID of the sync to get
320
+ * source_connection_id: The ID of the source connection to update
321
+ * source_connection_in: The updated source connection data
324
322
  * user: The current user
325
323
  *
326
324
  * Returns:
327
- * --------
328
- * sync (schemas.Sync): The sync
325
+ * The updated source connection
329
326
  *
330
- * @param {string} syncId
331
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
327
+ * @param {string} sourceConnectionId
328
+ * @param {AirweaveSDK.SourceConnectionUpdate} request
329
+ * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
332
330
  *
333
331
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
334
332
  *
335
333
  * @example
336
- * await client.sync.getSync("sync_id")
334
+ * await client.sourceConnections.updateSourceConnection("source_connection_id")
337
335
  */
338
- getSync(syncId, requestOptions) {
339
- return __awaiter(this, void 0, void 0, function* () {
336
+ updateSourceConnection(sourceConnectionId_1) {
337
+ return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
340
338
  var _a;
341
339
  const _response = yield core.fetcher({
342
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}`),
343
- method: "GET",
344
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
340
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
341
+ method: "PUT",
342
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
345
343
  ? yield core.Supplier.get(this._options.apiKey)
346
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
344
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
347
345
  contentType: "application/json",
348
346
  requestType: "json",
347
+ body: serializers.SourceConnectionUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
349
348
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
350
349
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
351
350
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
352
351
  });
353
352
  if (_response.ok) {
354
- return serializers.Sync.parseOrThrow(_response.body, {
353
+ return serializers.SourceConnection.parseOrThrow(_response.body, {
355
354
  unrecognizedObjectKeys: "passthrough",
356
355
  allowUnrecognizedUnionMembers: true,
357
356
  allowUnrecognizedEnumValues: true,
@@ -381,7 +380,7 @@ class Sync {
381
380
  body: _response.error.rawBody,
382
381
  });
383
382
  case "timeout":
384
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/{sync_id}.");
383
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /source-connections/{source_connection_id}.");
385
384
  case "unknown":
386
385
  throw new errors.AirweaveSDKError({
387
386
  message: _response.error.errorMessage,
@@ -390,30 +389,28 @@ class Sync {
390
389
  });
391
390
  }
392
391
  /**
393
- * Delete a sync configuration and optionally its associated data.
392
+ * Delete a source connection and all related components.
394
393
  *
395
394
  * Args:
396
- * -----
397
395
  * db: The database session
398
- * sync_id: The ID of the sync to delete
399
- * delete_data: Whether to delete the data associated with the sync
396
+ * source_connection_id: The ID of the source connection to delete
397
+ * delete_data: Whether to delete the associated data in destinations
400
398
  * user: The current user
401
399
  *
402
400
  * Returns:
403
- * --------
404
- * sync (schemas.Sync): The deleted sync
401
+ * The deleted source connection
405
402
  *
406
- * @param {string} syncId
407
- * @param {AirweaveSDK.DeleteSyncSyncSyncIdDeleteRequest} request
408
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
403
+ * @param {string} sourceConnectionId
404
+ * @param {AirweaveSDK.DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest} request
405
+ * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
409
406
  *
410
407
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
411
408
  *
412
409
  * @example
413
- * await client.sync.deleteSync("sync_id")
410
+ * await client.sourceConnections.deleteSourceConnection("source_connection_id")
414
411
  */
415
- deleteSync(syncId_1) {
416
- return __awaiter(this, arguments, void 0, function* (syncId, request = {}, requestOptions) {
412
+ deleteSourceConnection(sourceConnectionId_1) {
413
+ return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
417
414
  var _a;
418
415
  const { deleteData } = request;
419
416
  const _queryParams = {};
@@ -421,11 +418,11 @@ class Sync {
421
418
  _queryParams["delete_data"] = deleteData.toString();
422
419
  }
423
420
  const _response = yield core.fetcher({
424
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}`),
421
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
425
422
  method: "DELETE",
426
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
423
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
427
424
  ? yield core.Supplier.get(this._options.apiKey)
428
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
425
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
429
426
  contentType: "application/json",
430
427
  queryParameters: _queryParams,
431
428
  requestType: "json",
@@ -434,7 +431,7 @@ class Sync {
434
431
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
435
432
  });
436
433
  if (_response.ok) {
437
- return serializers.Sync.parseOrThrow(_response.body, {
434
+ return serializers.SourceConnection.parseOrThrow(_response.body, {
438
435
  unrecognizedObjectKeys: "passthrough",
439
436
  allowUnrecognizedUnionMembers: true,
440
437
  allowUnrecognizedEnumValues: true,
@@ -464,7 +461,7 @@ class Sync {
464
461
  body: _response.error.rawBody,
465
462
  });
466
463
  case "timeout":
467
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling DELETE /sync/{sync_id}.");
464
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling DELETE /source-connections/{source_connection_id}.");
468
465
  case "unknown":
469
466
  throw new errors.AirweaveSDKError({
470
467
  message: _response.error.errorMessage,
@@ -473,189 +470,34 @@ class Sync {
473
470
  });
474
471
  }
475
472
  /**
476
- * Update a sync configuration.
473
+ * Trigger a sync run for a source connection.
477
474
  *
478
475
  * Args:
479
- * -----
480
476
  * db: The database session
481
- * sync_id: The ID of the sync to update
482
- * sync_update: The sync update data
477
+ * source_connection_id: The ID of the source connection to run
483
478
  * user: The current user
479
+ * background_tasks: Background tasks for async operations
484
480
  *
485
481
  * Returns:
486
- * --------
487
- * sync (schemas.Sync): The updated sync
482
+ * The created sync job
488
483
  *
489
- * @param {string} syncId
490
- * @param {AirweaveSDK.SyncUpdate} request
491
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
484
+ * @param {string} sourceConnectionId
485
+ * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
492
486
  *
493
487
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
494
488
  *
495
489
  * @example
496
- * await client.sync.updateSync("sync_id")
490
+ * await client.sourceConnections.runSourceConnection("source_connection_id")
497
491
  */
498
- updateSync(syncId_1) {
499
- return __awaiter(this, arguments, void 0, function* (syncId, request = {}, requestOptions) {
500
- var _a;
501
- const _response = yield core.fetcher({
502
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}`),
503
- method: "PATCH",
504
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
505
- ? yield core.Supplier.get(this._options.apiKey)
506
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
507
- contentType: "application/json",
508
- requestType: "json",
509
- body: serializers.SyncUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
510
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
511
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
512
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
513
- });
514
- if (_response.ok) {
515
- return serializers.Sync.parseOrThrow(_response.body, {
516
- unrecognizedObjectKeys: "passthrough",
517
- allowUnrecognizedUnionMembers: true,
518
- allowUnrecognizedEnumValues: true,
519
- breadcrumbsPrefix: ["response"],
520
- });
521
- }
522
- if (_response.error.reason === "status-code") {
523
- switch (_response.error.statusCode) {
524
- case 422:
525
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
526
- unrecognizedObjectKeys: "passthrough",
527
- allowUnrecognizedUnionMembers: true,
528
- allowUnrecognizedEnumValues: true,
529
- breadcrumbsPrefix: ["response"],
530
- }));
531
- default:
532
- throw new errors.AirweaveSDKError({
533
- statusCode: _response.error.statusCode,
534
- body: _response.error.body,
535
- });
536
- }
537
- }
538
- switch (_response.error.reason) {
539
- case "non-json":
540
- throw new errors.AirweaveSDKError({
541
- statusCode: _response.error.statusCode,
542
- body: _response.error.rawBody,
543
- });
544
- case "timeout":
545
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PATCH /sync/{sync_id}.");
546
- case "unknown":
547
- throw new errors.AirweaveSDKError({
548
- message: _response.error.errorMessage,
549
- });
550
- }
551
- });
552
- }
553
- /**
554
- * Trigger a sync run.
555
- *
556
- * Args:
557
- * -----
558
- * db: The database session
559
- * sync_id: The ID of the sync to run
560
- * user: The current user
561
- * background_tasks: The background tasks
562
- *
563
- * Returns:
564
- * --------
565
- * sync_job (schemas.SyncJob): The sync job
566
- *
567
- * @param {string} syncId
568
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
569
- *
570
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
571
- *
572
- * @example
573
- * await client.sync.runSync("sync_id")
574
- */
575
- runSync(syncId, requestOptions) {
492
+ runSourceConnection(sourceConnectionId, requestOptions) {
576
493
  return __awaiter(this, void 0, void 0, function* () {
577
494
  var _a;
578
495
  const _response = yield core.fetcher({
579
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}/run`),
496
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/run`),
580
497
  method: "POST",
581
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
582
- ? yield core.Supplier.get(this._options.apiKey)
583
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
584
- contentType: "application/json",
585
- requestType: "json",
586
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
587
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
588
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
589
- });
590
- if (_response.ok) {
591
- return serializers.SyncJob.parseOrThrow(_response.body, {
592
- unrecognizedObjectKeys: "passthrough",
593
- allowUnrecognizedUnionMembers: true,
594
- allowUnrecognizedEnumValues: true,
595
- breadcrumbsPrefix: ["response"],
596
- });
597
- }
598
- if (_response.error.reason === "status-code") {
599
- switch (_response.error.statusCode) {
600
- case 422:
601
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
602
- unrecognizedObjectKeys: "passthrough",
603
- allowUnrecognizedUnionMembers: true,
604
- allowUnrecognizedEnumValues: true,
605
- breadcrumbsPrefix: ["response"],
606
- }));
607
- default:
608
- throw new errors.AirweaveSDKError({
609
- statusCode: _response.error.statusCode,
610
- body: _response.error.body,
611
- });
612
- }
613
- }
614
- switch (_response.error.reason) {
615
- case "non-json":
616
- throw new errors.AirweaveSDKError({
617
- statusCode: _response.error.statusCode,
618
- body: _response.error.rawBody,
619
- });
620
- case "timeout":
621
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /sync/{sync_id}/run.");
622
- case "unknown":
623
- throw new errors.AirweaveSDKError({
624
- message: _response.error.errorMessage,
625
- });
626
- }
627
- });
628
- }
629
- /**
630
- * List all jobs for a specific sync.
631
- *
632
- * Args:
633
- * -----
634
- * db: The database session
635
- * sync_id: The ID of the sync to list jobs for
636
- * user: The current user
637
- *
638
- * Returns:
639
- * --------
640
- * list[schemas.SyncJob]: A list of sync jobs
641
- *
642
- * @param {string} syncId
643
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
644
- *
645
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
646
- *
647
- * @example
648
- * await client.sync.listSyncJobs("sync_id")
649
- */
650
- listSyncJobs(syncId, requestOptions) {
651
- return __awaiter(this, void 0, void 0, function* () {
652
- var _a;
653
- const _response = yield core.fetcher({
654
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}/jobs`),
655
- method: "GET",
656
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
498
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
657
499
  ? yield core.Supplier.get(this._options.apiKey)
658
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
500
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
659
501
  contentType: "application/json",
660
502
  requestType: "json",
661
503
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -663,7 +505,7 @@ class Sync {
663
505
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
664
506
  });
665
507
  if (_response.ok) {
666
- return serializers.sync.listSyncJobs.Response.parseOrThrow(_response.body, {
508
+ return serializers.SourceConnectionJob.parseOrThrow(_response.body, {
667
509
  unrecognizedObjectKeys: "passthrough",
668
510
  allowUnrecognizedUnionMembers: true,
669
511
  allowUnrecognizedEnumValues: true,
@@ -693,7 +535,7 @@ class Sync {
693
535
  body: _response.error.rawBody,
694
536
  });
695
537
  case "timeout":
696
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/{sync_id}/jobs.");
538
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /source-connections/{source_connection_id}/run.");
697
539
  case "unknown":
698
540
  throw new errors.AirweaveSDKError({
699
541
  message: _response.error.errorMessage,
@@ -702,37 +544,33 @@ class Sync {
702
544
  });
703
545
  }
704
546
  /**
705
- * Get details of a specific sync job.
547
+ * List all sync jobs for a source connection.
706
548
  *
707
549
  * Args:
708
- * -----
709
550
  * db: The database session
710
- * sync_id: The ID of the sync to list jobs for
711
- * job_id: The ID of the job to get
551
+ * source_connection_id: The ID of the source connection
712
552
  * user: The current user
713
553
  *
714
554
  * Returns:
715
- * --------
716
- * sync_job (schemas.SyncJob): The sync job
555
+ * A list of sync jobs
717
556
  *
718
- * @param {string} syncId
719
- * @param {string} jobId
720
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
557
+ * @param {string} sourceConnectionId
558
+ * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
721
559
  *
722
560
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
723
561
  *
724
562
  * @example
725
- * await client.sync.getSyncJob("sync_id", "job_id")
563
+ * await client.sourceConnections.listSourceConnectionJobs("source_connection_id")
726
564
  */
727
- getSyncJob(syncId, jobId, requestOptions) {
565
+ listSourceConnectionJobs(sourceConnectionId, requestOptions) {
728
566
  return __awaiter(this, void 0, void 0, function* () {
729
567
  var _a;
730
568
  const _response = yield core.fetcher({
731
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}/job/${encodeURIComponent(jobId)}`),
569
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs`),
732
570
  method: "GET",
733
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
571
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
734
572
  ? yield core.Supplier.get(this._options.apiKey)
735
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
573
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
736
574
  contentType: "application/json",
737
575
  requestType: "json",
738
576
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -740,7 +578,7 @@ class Sync {
740
578
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
741
579
  });
742
580
  if (_response.ok) {
743
- return serializers.SyncJob.parseOrThrow(_response.body, {
581
+ return serializers.sourceConnections.listSourceConnectionJobs.Response.parseOrThrow(_response.body, {
744
582
  unrecognizedObjectKeys: "passthrough",
745
583
  allowUnrecognizedUnionMembers: true,
746
584
  allowUnrecognizedEnumValues: true,
@@ -770,7 +608,7 @@ class Sync {
770
608
  body: _response.error.rawBody,
771
609
  });
772
610
  case "timeout":
773
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/{sync_id}/job/{job_id}.");
611
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /source-connections/{source_connection_id}/jobs.");
774
612
  case "unknown":
775
613
  throw new errors.AirweaveSDKError({
776
614
  message: _response.error.errorMessage,
@@ -778,139 +616,10 @@ class Sync {
778
616
  }
779
617
  });
780
618
  }
781
- /**
782
- * Server-Sent Events (SSE) endpoint to subscribe to a sync job's progress.
783
- *
784
- * Args:
785
- * -----
786
- * job_id: The ID of the job to subscribe to
787
- * user: The current user
788
- *
789
- * Returns:
790
- * --------
791
- * StreamingResponse: The streaming response
792
- *
793
- * @param {string} jobId
794
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
795
- *
796
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
797
- *
798
- * @example
799
- * await client.sync.subscribeSyncJob("job_id")
800
- */
801
- subscribeSyncJob(jobId, requestOptions) {
619
+ _getAuthorizationHeader() {
802
620
  return __awaiter(this, void 0, void 0, function* () {
803
- var _a;
804
- const _response = yield core.fetcher({
805
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/job/${encodeURIComponent(jobId)}/subscribe`),
806
- method: "GET",
807
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
808
- ? yield core.Supplier.get(this._options.apiKey)
809
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
810
- contentType: "application/json",
811
- requestType: "json",
812
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
813
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
814
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
815
- });
816
- if (_response.ok) {
817
- return _response.body;
818
- }
819
- if (_response.error.reason === "status-code") {
820
- switch (_response.error.statusCode) {
821
- case 422:
822
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
823
- unrecognizedObjectKeys: "passthrough",
824
- allowUnrecognizedUnionMembers: true,
825
- allowUnrecognizedEnumValues: true,
826
- breadcrumbsPrefix: ["response"],
827
- }));
828
- default:
829
- throw new errors.AirweaveSDKError({
830
- statusCode: _response.error.statusCode,
831
- body: _response.error.body,
832
- });
833
- }
834
- }
835
- switch (_response.error.reason) {
836
- case "non-json":
837
- throw new errors.AirweaveSDKError({
838
- statusCode: _response.error.statusCode,
839
- body: _response.error.rawBody,
840
- });
841
- case "timeout":
842
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/job/{job_id}/subscribe.");
843
- case "unknown":
844
- throw new errors.AirweaveSDKError({
845
- message: _response.error.errorMessage,
846
- });
847
- }
848
- });
849
- }
850
- /**
851
- * Get the DAG for a specific sync.
852
- *
853
- * @param {string} syncId
854
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
855
- *
856
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
857
- *
858
- * @example
859
- * await client.sync.getSyncDag("sync_id")
860
- */
861
- getSyncDag(syncId, requestOptions) {
862
- return __awaiter(this, void 0, void 0, function* () {
863
- var _a;
864
- const _response = yield core.fetcher({
865
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}/dag`),
866
- method: "GET",
867
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
868
- ? yield core.Supplier.get(this._options.apiKey)
869
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
870
- contentType: "application/json",
871
- requestType: "json",
872
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
873
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
874
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
875
- });
876
- if (_response.ok) {
877
- return serializers.SyncDag.parseOrThrow(_response.body, {
878
- unrecognizedObjectKeys: "passthrough",
879
- allowUnrecognizedUnionMembers: true,
880
- allowUnrecognizedEnumValues: true,
881
- breadcrumbsPrefix: ["response"],
882
- });
883
- }
884
- if (_response.error.reason === "status-code") {
885
- switch (_response.error.statusCode) {
886
- case 422:
887
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
888
- unrecognizedObjectKeys: "passthrough",
889
- allowUnrecognizedUnionMembers: true,
890
- allowUnrecognizedEnumValues: true,
891
- breadcrumbsPrefix: ["response"],
892
- }));
893
- default:
894
- throw new errors.AirweaveSDKError({
895
- statusCode: _response.error.statusCode,
896
- body: _response.error.body,
897
- });
898
- }
899
- }
900
- switch (_response.error.reason) {
901
- case "non-json":
902
- throw new errors.AirweaveSDKError({
903
- statusCode: _response.error.statusCode,
904
- body: _response.error.rawBody,
905
- });
906
- case "timeout":
907
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/{sync_id}/dag.");
908
- case "unknown":
909
- throw new errors.AirweaveSDKError({
910
- message: _response.error.errorMessage,
911
- });
912
- }
621
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
913
622
  });
914
623
  }
915
624
  }
916
- exports.Sync = Sync;
625
+ exports.SourceConnections = SourceConnections;