@airweave/sdk 0.2.26 → 0.2.52

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 (644) hide show
  1. package/Client.d.ts +6 -18
  2. package/Client.js +8 -28
  3. package/README.md +9 -7
  4. package/api/resources/collections/client/Client.d.ts +135 -0
  5. package/api/resources/{apiKeys → collections}/client/Client.js +205 -86
  6. package/api/resources/collections/client/requests/CollectionCreate.d.ts +15 -0
  7. package/{dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts → api/resources/collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.d.ts} +1 -1
  8. package/{dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts → api/resources/collections/client/requests/ListCollectionsCollectionsGetRequest.d.ts} +1 -1
  9. package/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.d.ts +20 -0
  10. package/api/resources/collections/client/requests/index.d.ts +4 -0
  11. package/api/resources/index.d.ts +5 -12
  12. package/api/resources/index.js +6 -13
  13. package/api/resources/sourceConnections/client/Client.d.ts +191 -0
  14. package/{dist/api/resources/whiteLabels → api/resources/sourceConnections}/client/Client.js +138 -189
  15. package/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +10 -0
  16. package/api/resources/sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.d.ts +10 -0
  17. package/api/resources/sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.d.ts +10 -0
  18. package/api/resources/{sync/client/requests/ListSyncsSyncGetRequest.d.ts → sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.d.ts} +5 -2
  19. package/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +18 -0
  20. package/api/resources/sourceConnections/client/requests/index.d.ts +5 -0
  21. package/api/resources/{sync/types/ListSyncsSyncGetResponse.d.ts → sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts} +1 -1
  22. package/api/resources/sourceConnections/types/index.d.ts +1 -0
  23. package/api/resources/sourceConnections/types/index.js +17 -0
  24. package/api/resources/sources/client/Client.d.ts +8 -11
  25. package/api/resources/sources/client/Client.js +10 -13
  26. package/api/types/ApiKey.d.ts +3 -3
  27. package/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.d.ts +2 -2
  28. package/api/types/AuthType.d.ts +2 -3
  29. package/api/types/AuthType.js +1 -1
  30. package/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +9 -0
  31. package/api/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +8 -0
  32. package/api/types/Collection.d.ts +19 -0
  33. package/api/types/CollectionStatus.d.ts +13 -0
  34. package/api/types/CollectionStatus.js +12 -0
  35. package/api/types/CollectionUpdate.d.ts +10 -0
  36. package/api/types/ConfigValues.d.ts +9 -0
  37. package/{dist/api/types/DestinationWithConfigFields.d.ts → api/types/DestinationWithAuthenticationFields.d.ts} +2 -2
  38. package/{dist/api/types/EmbeddingModelWithConfigFields.d.ts → api/types/EmbeddingModelWithAuthenticationFields.d.ts} +2 -2
  39. package/api/types/EntityCount.d.ts +9 -0
  40. package/api/types/IntegrationCredentialInDb.d.ts +18 -0
  41. package/api/types/IntegrationCredentialRawCreate.d.ts +19 -0
  42. package/api/types/OAuth2AuthUrl.d.ts +13 -0
  43. package/api/types/Organization.d.ts +13 -0
  44. package/api/types/ResponseType.d.ts +11 -0
  45. package/api/types/ResponseType.js +10 -0
  46. package/api/types/SearchResponse.d.ts +13 -0
  47. package/api/types/SearchStatus.d.ts +12 -0
  48. package/api/types/SearchStatus.js +11 -0
  49. package/api/types/Source.d.ts +4 -1
  50. package/api/types/SourceConnection.d.ts +33 -0
  51. package/api/types/SourceConnectionAuthFields.d.ts +5 -0
  52. package/api/types/SourceConnectionCreate.d.ts +23 -0
  53. package/api/types/SourceConnectionJob.d.ts +30 -0
  54. package/api/types/SourceConnectionListItem.d.ts +22 -0
  55. package/api/types/SourceConnectionStatus.d.ts +12 -0
  56. package/api/types/SourceConnectionStatus.js +11 -0
  57. package/api/types/Sync.d.ts +0 -2
  58. package/{dist/api/resources/sync/client/requests → api/types}/SyncCreate.d.ts +2 -9
  59. package/api/types/SyncJob.d.ts +7 -4
  60. package/api/{resources/sync/client/requests → types}/SyncUpdate.d.ts +2 -5
  61. package/api/types/SyncWithSourceConnection.d.ts +0 -2
  62. package/api/types/User.d.ts +1 -1
  63. package/api/types/UserCreate.d.ts +11 -0
  64. package/api/types/WhiteLabel.d.ts +1 -0
  65. package/api/{resources/whiteLabels/client/requests → types}/WhiteLabelCreate.d.ts +2 -8
  66. package/api/{resources/whiteLabels/client/requests → types}/WhiteLabelUpdate.d.ts +2 -2
  67. package/api/types/index.d.ts +28 -5
  68. package/api/types/index.js +28 -5
  69. package/dist/Client.d.ts +6 -18
  70. package/dist/Client.js +8 -28
  71. package/dist/api/resources/collections/client/Client.d.ts +135 -0
  72. package/dist/api/resources/{apiKeys → collections}/client/Client.js +205 -86
  73. package/dist/api/resources/collections/client/requests/CollectionCreate.d.ts +15 -0
  74. package/{api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts → dist/api/resources/collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.d.ts} +1 -1
  75. package/{api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts → dist/api/resources/collections/client/requests/ListCollectionsCollectionsGetRequest.d.ts} +1 -1
  76. package/dist/api/resources/collections/client/requests/ListCollectionsCollectionsGetRequest.js +5 -0
  77. package/dist/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.d.ts +20 -0
  78. package/dist/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.js +5 -0
  79. package/dist/api/resources/collections/client/requests/index.d.ts +4 -0
  80. package/dist/api/resources/index.d.ts +5 -12
  81. package/dist/api/resources/index.js +6 -13
  82. package/dist/api/resources/sourceConnections/client/Client.d.ts +191 -0
  83. package/{api/resources/whiteLabels → dist/api/resources/sourceConnections}/client/Client.js +138 -189
  84. package/dist/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +10 -0
  85. package/dist/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js +5 -0
  86. package/dist/api/resources/sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.d.ts +10 -0
  87. package/dist/api/resources/sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.js +5 -0
  88. package/dist/api/resources/sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.d.ts +10 -0
  89. package/dist/api/resources/sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.js +5 -0
  90. package/{api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts → dist/api/resources/sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.d.ts} +5 -1
  91. package/dist/api/resources/sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.js +5 -0
  92. package/dist/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +18 -0
  93. package/dist/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +5 -0
  94. package/dist/api/resources/sourceConnections/client/requests/index.d.ts +5 -0
  95. package/dist/api/resources/{sync/types/ListSyncsSyncGetResponse.d.ts → sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts} +1 -1
  96. package/dist/api/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.js +5 -0
  97. package/dist/api/resources/sourceConnections/types/index.d.ts +1 -0
  98. package/dist/api/resources/sourceConnections/types/index.js +17 -0
  99. package/dist/api/resources/sources/client/Client.d.ts +8 -11
  100. package/dist/api/resources/sources/client/Client.js +10 -13
  101. package/dist/api/types/ApiKey.d.ts +3 -3
  102. package/dist/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.d.ts +2 -2
  103. package/dist/api/types/ApiKeyCreate.js +5 -0
  104. package/dist/api/types/AuthType.d.ts +2 -3
  105. package/dist/api/types/AuthType.js +1 -1
  106. package/dist/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +9 -0
  107. package/dist/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js +5 -0
  108. package/dist/api/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +8 -0
  109. package/dist/api/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js +5 -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/IntegrationCredentialInDb.d.ts +18 -0
  125. package/dist/api/types/IntegrationCredentialInDb.js +5 -0
  126. package/dist/api/types/IntegrationCredentialRawCreate.d.ts +19 -0
  127. package/dist/api/types/IntegrationCredentialRawCreate.js +5 -0
  128. package/dist/api/types/OAuth2AuthUrl.d.ts +13 -0
  129. package/dist/api/types/OAuth2AuthUrl.js +5 -0
  130. package/dist/api/types/Organization.d.ts +13 -0
  131. package/dist/api/types/Organization.js +5 -0
  132. package/dist/api/types/ResponseType.d.ts +11 -0
  133. package/dist/api/types/ResponseType.js +10 -0
  134. package/dist/api/types/SearchResponse.d.ts +13 -0
  135. package/dist/api/types/SearchResponse.js +5 -0
  136. package/dist/api/types/SearchStatus.d.ts +12 -0
  137. package/dist/api/types/SearchStatus.js +11 -0
  138. package/dist/api/types/Source.d.ts +4 -1
  139. package/dist/api/types/SourceConnection.d.ts +33 -0
  140. package/dist/api/types/SourceConnection.js +5 -0
  141. package/dist/api/types/SourceConnectionAuthFields.d.ts +5 -0
  142. package/dist/api/types/SourceConnectionAuthFields.js +5 -0
  143. package/dist/api/types/SourceConnectionCreate.d.ts +23 -0
  144. package/dist/api/types/SourceConnectionCreate.js +5 -0
  145. package/dist/api/types/SourceConnectionJob.d.ts +30 -0
  146. package/dist/api/types/SourceConnectionJob.js +5 -0
  147. package/dist/api/types/SourceConnectionListItem.d.ts +22 -0
  148. package/dist/api/types/SourceConnectionListItem.js +5 -0
  149. package/dist/api/types/SourceConnectionStatus.d.ts +12 -0
  150. package/dist/api/types/SourceConnectionStatus.js +11 -0
  151. package/dist/api/types/Sync.d.ts +0 -2
  152. package/{api/resources/sync/client/requests → dist/api/types}/SyncCreate.d.ts +2 -9
  153. package/dist/api/types/SyncCreate.js +5 -0
  154. package/dist/api/types/SyncJob.d.ts +7 -4
  155. package/dist/api/{resources/sync/client/requests → types}/SyncUpdate.d.ts +2 -5
  156. package/dist/api/types/SyncUpdate.js +5 -0
  157. package/dist/api/types/SyncWithSourceConnection.d.ts +0 -2
  158. package/dist/api/types/User.d.ts +1 -1
  159. package/dist/api/types/UserCreate.d.ts +11 -0
  160. package/dist/api/types/UserCreate.js +5 -0
  161. package/dist/api/types/WhiteLabel.d.ts +1 -0
  162. package/dist/api/{resources/whiteLabels/client/requests → types}/WhiteLabelCreate.d.ts +2 -8
  163. package/dist/api/types/WhiteLabelCreate.js +5 -0
  164. package/dist/api/{resources/whiteLabels/client/requests → types}/WhiteLabelUpdate.d.ts +2 -2
  165. package/dist/api/types/WhiteLabelUpdate.js +5 -0
  166. package/dist/api/types/index.d.ts +28 -5
  167. package/dist/api/types/index.js +28 -5
  168. package/dist/serialization/resources/collections/client/index.d.ts +3 -0
  169. package/dist/serialization/resources/{apiKeys → collections}/client/index.js +3 -2
  170. package/dist/serialization/resources/{apiKeys/client/readApiKeys.d.ts → collections/client/listCollections.d.ts} +3 -3
  171. package/dist/serialization/resources/{connections/client/listConnectedIntegrations.js → collections/client/listCollections.js} +2 -2
  172. package/dist/serialization/resources/{connections/client/listConnectedIntegrations.d.ts → collections/client/refreshAllSourceConnections.d.ts} +3 -3
  173. package/dist/serialization/resources/{apiKeys/client/readApiKeys.js → collections/client/refreshAllSourceConnections.js} +2 -2
  174. package/dist/serialization/resources/{apiKeys/client/requests/ApiKeyCreate.d.ts → collections/client/requests/CollectionCreate.d.ts} +4 -3
  175. package/dist/serialization/resources/collections/client/requests/CollectionCreate.js +44 -0
  176. package/dist/serialization/resources/collections/client/requests/index.d.ts +1 -0
  177. package/dist/serialization/resources/collections/client/requests/index.js +5 -0
  178. package/dist/serialization/resources/index.d.ts +5 -11
  179. package/dist/serialization/resources/index.js +6 -12
  180. package/dist/serialization/resources/sourceConnections/client/index.d.ts +3 -0
  181. package/{serialization/resources/apiKeys → dist/serialization/resources/sourceConnections}/client/index.js +3 -2
  182. package/dist/serialization/resources/{connections/client/listAllConnectedIntegrations.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/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +12 -0
  187. package/dist/serialization/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js +43 -0
  188. package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +20 -0
  189. package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +51 -0
  190. package/dist/serialization/resources/sourceConnections/client/requests/index.d.ts +2 -0
  191. package/dist/serialization/resources/sourceConnections/client/requests/index.js +7 -0
  192. package/dist/serialization/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts +11 -0
  193. package/dist/serialization/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.js +42 -0
  194. package/dist/serialization/resources/sourceConnections/types/index.d.ts +1 -0
  195. package/dist/serialization/resources/sourceConnections/types/index.js +17 -0
  196. package/dist/serialization/types/ApiKey.d.ts +2 -2
  197. package/dist/serialization/types/ApiKey.js +2 -2
  198. package/dist/serialization/types/ApiKeyCreate.d.ts +12 -0
  199. package/{serialization/resources/apiKeys/client/requests → dist/serialization/types}/ApiKeyCreate.js +1 -1
  200. package/dist/serialization/types/AuthType.d.ts +1 -1
  201. package/dist/serialization/types/AuthType.js +1 -1
  202. package/dist/serialization/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +15 -0
  203. package/dist/serialization/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js +46 -0
  204. package/dist/serialization/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +14 -0
  205. package/dist/serialization/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js +45 -0
  206. package/dist/serialization/types/{ApiKeyWithPlainKey.d.ts → Collection.d.ts} +7 -7
  207. package/dist/serialization/types/{ApiKeyWithPlainKey.js → Collection.js} +7 -7
  208. package/dist/serialization/types/CollectionStatus.d.ts +10 -0
  209. package/dist/serialization/types/CollectionStatus.js +41 -0
  210. package/dist/serialization/types/CollectionUpdate.d.ts +12 -0
  211. package/dist/serialization/types/CollectionUpdate.js +43 -0
  212. package/dist/serialization/types/ConfigValues.d.ts +10 -0
  213. package/dist/serialization/types/ConfigValues.js +41 -0
  214. package/{serialization/types/DestinationWithConfigFields.d.ts → dist/serialization/types/DestinationWithAuthenticationFields.d.ts} +3 -3
  215. package/{serialization/types/DestinationWithConfigFields.js → dist/serialization/types/DestinationWithAuthenticationFields.js} +3 -3
  216. package/{serialization/types/EmbeddingModelWithConfigFields.d.ts → dist/serialization/types/EmbeddingModelWithAuthenticationFields.d.ts} +3 -3
  217. package/{serialization/types/EmbeddingModelWithConfigFields.js → dist/serialization/types/EmbeddingModelWithAuthenticationFields.js} +3 -3
  218. package/dist/serialization/types/EntityCount.d.ts +12 -0
  219. package/dist/serialization/{resources/connections/client/sendOauth2WhiteLabelCode.js → types/EntityCount.js} +5 -3
  220. package/dist/serialization/types/IntegrationCredentialInDb.d.ts +22 -0
  221. package/dist/serialization/types/{SourceWithConfigFields.js → IntegrationCredentialInDb.js} +8 -13
  222. package/dist/serialization/types/IntegrationCredentialRawCreate.d.ts +20 -0
  223. package/dist/serialization/types/IntegrationCredentialRawCreate.js +51 -0
  224. package/dist/serialization/types/OAuth2AuthUrl.d.ts +12 -0
  225. package/dist/serialization/types/OAuth2AuthUrl.js +43 -0
  226. package/dist/serialization/types/Organization.d.ts +16 -0
  227. package/dist/serialization/types/Organization.js +47 -0
  228. package/dist/serialization/types/ResponseType.d.ts +10 -0
  229. package/dist/serialization/{resources/connections/client/getOauth2WhiteLabelAuthUrl.js → types/ResponseType.js} +3 -3
  230. package/dist/serialization/types/SearchResponse.d.ts +17 -0
  231. package/dist/serialization/types/SearchResponse.js +48 -0
  232. package/dist/serialization/types/SearchStatus.d.ts +10 -0
  233. package/dist/serialization/types/SearchStatus.js +41 -0
  234. package/dist/serialization/types/Source.d.ts +5 -1
  235. package/dist/serialization/types/Source.js +5 -1
  236. package/dist/serialization/types/SourceConnection.d.ts +38 -0
  237. package/dist/serialization/types/SourceConnection.js +69 -0
  238. package/dist/serialization/types/SourceConnectionAuthFields.d.ts +11 -0
  239. package/dist/serialization/types/{BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → SourceConnectionAuthFields.js} +3 -5
  240. package/dist/serialization/types/SourceConnectionCreate.d.ts +22 -0
  241. package/dist/serialization/types/SourceConnectionCreate.js +53 -0
  242. package/dist/serialization/types/SourceConnectionJob.d.ts +30 -0
  243. package/dist/serialization/types/SourceConnectionJob.js +61 -0
  244. package/dist/serialization/types/SourceConnectionListItem.d.ts +22 -0
  245. package/dist/serialization/types/SourceConnectionListItem.js +53 -0
  246. package/dist/serialization/types/SourceConnectionStatus.d.ts +10 -0
  247. package/dist/serialization/types/SourceConnectionStatus.js +41 -0
  248. package/dist/serialization/types/Sync.d.ts +0 -2
  249. package/dist/serialization/types/Sync.js +0 -2
  250. package/dist/serialization/{resources/sync/client/requests → types}/SyncCreate.d.ts +5 -7
  251. package/{serialization/resources/sync/client/requests → dist/serialization/types}/SyncCreate.js +2 -4
  252. package/dist/serialization/types/SyncJob.d.ts +7 -4
  253. package/dist/serialization/types/SyncJob.js +7 -4
  254. package/dist/serialization/types/SyncUpdate.d.ts +17 -0
  255. package/{serialization/resources/sync/client/requests → dist/serialization/types}/SyncUpdate.js +2 -4
  256. package/dist/serialization/types/SyncWithSourceConnection.d.ts +0 -2
  257. package/dist/serialization/types/SyncWithSourceConnection.js +0 -2
  258. package/dist/serialization/types/User.d.ts +1 -1
  259. package/dist/serialization/types/User.js +1 -1
  260. package/dist/serialization/types/UserCreate.d.ts +14 -0
  261. package/dist/serialization/types/UserCreate.js +45 -0
  262. package/dist/serialization/types/WhiteLabel.d.ts +1 -0
  263. package/dist/serialization/types/WhiteLabel.js +1 -0
  264. package/dist/serialization/types/WhiteLabelCreate.d.ts +17 -0
  265. package/{serialization/resources/whiteLabels/client/requests → dist/serialization/types}/WhiteLabelCreate.js +2 -1
  266. package/dist/serialization/types/WhiteLabelUpdate.d.ts +16 -0
  267. package/{serialization/resources/whiteLabels/client/requests → dist/serialization/types}/WhiteLabelUpdate.js +2 -1
  268. package/dist/serialization/types/index.d.ts +28 -5
  269. package/dist/serialization/types/index.js +28 -5
  270. package/dist/version.d.ts +1 -1
  271. package/dist/version.js +1 -1
  272. package/package.json +1 -1
  273. package/reference.md +188 -1867
  274. package/serialization/resources/collections/client/index.d.ts +3 -0
  275. package/serialization/resources/{sync → collections}/client/index.js +3 -3
  276. package/{dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts → serialization/resources/collections/client/listCollections.d.ts} +3 -3
  277. package/{dist/serialization/resources/connections/client/listAllConnectedIntegrations.js → serialization/resources/collections/client/listCollections.js} +2 -2
  278. package/{dist/serialization/resources/embeddingModels/client/readEmbeddingModels.d.ts → serialization/resources/collections/client/refreshAllSourceConnections.d.ts} +3 -3
  279. package/serialization/resources/collections/client/refreshAllSourceConnections.js +42 -0
  280. package/serialization/resources/{apiKeys/client/requests/ApiKeyCreate.d.ts → collections/client/requests/CollectionCreate.d.ts} +4 -3
  281. package/serialization/resources/collections/client/requests/CollectionCreate.js +44 -0
  282. package/serialization/resources/collections/client/requests/index.d.ts +1 -0
  283. package/serialization/resources/collections/client/requests/index.js +5 -0
  284. package/serialization/resources/index.d.ts +5 -11
  285. package/serialization/resources/index.js +6 -12
  286. package/serialization/resources/sourceConnections/client/index.d.ts +3 -0
  287. package/{dist/serialization/resources/sync → serialization/resources/sourceConnections}/client/index.js +3 -3
  288. package/serialization/resources/sourceConnections/client/listSourceConnectionJobs.d.ts +11 -0
  289. package/serialization/resources/sourceConnections/client/listSourceConnectionJobs.js +42 -0
  290. package/serialization/resources/sourceConnections/client/listSourceConnections.d.ts +11 -0
  291. package/serialization/resources/sourceConnections/client/listSourceConnections.js +42 -0
  292. package/serialization/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +12 -0
  293. package/serialization/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js +43 -0
  294. package/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +20 -0
  295. package/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +51 -0
  296. package/serialization/resources/sourceConnections/client/requests/index.d.ts +2 -0
  297. package/serialization/resources/sourceConnections/client/requests/index.js +7 -0
  298. package/serialization/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts +11 -0
  299. package/serialization/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.js +42 -0
  300. package/serialization/resources/sourceConnections/types/index.d.ts +1 -0
  301. package/serialization/resources/sourceConnections/types/index.js +17 -0
  302. package/serialization/types/ApiKey.d.ts +2 -2
  303. package/serialization/types/ApiKey.js +2 -2
  304. package/serialization/types/ApiKeyCreate.d.ts +12 -0
  305. package/{dist/serialization/resources/apiKeys/client/requests → serialization/types}/ApiKeyCreate.js +1 -1
  306. package/serialization/types/AuthType.d.ts +1 -1
  307. package/serialization/types/AuthType.js +1 -1
  308. package/serialization/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +15 -0
  309. package/serialization/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js +46 -0
  310. package/serialization/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +14 -0
  311. package/serialization/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js +45 -0
  312. package/serialization/types/{ApiKeyWithPlainKey.d.ts → Collection.d.ts} +7 -7
  313. package/serialization/types/{ApiKeyWithPlainKey.js → Collection.js} +7 -7
  314. package/serialization/types/CollectionStatus.d.ts +10 -0
  315. package/serialization/types/CollectionStatus.js +41 -0
  316. package/serialization/types/CollectionUpdate.d.ts +12 -0
  317. package/serialization/types/CollectionUpdate.js +43 -0
  318. package/serialization/types/ConfigValues.d.ts +10 -0
  319. package/serialization/types/ConfigValues.js +41 -0
  320. package/{dist/serialization/types/DestinationWithConfigFields.d.ts → serialization/types/DestinationWithAuthenticationFields.d.ts} +3 -3
  321. package/{dist/serialization/types/DestinationWithConfigFields.js → serialization/types/DestinationWithAuthenticationFields.js} +3 -3
  322. package/{dist/serialization/types/EmbeddingModelWithConfigFields.d.ts → serialization/types/EmbeddingModelWithAuthenticationFields.d.ts} +3 -3
  323. package/{dist/serialization/types/EmbeddingModelWithConfigFields.js → serialization/types/EmbeddingModelWithAuthenticationFields.js} +3 -3
  324. package/serialization/types/EntityCount.d.ts +12 -0
  325. package/{dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js → serialization/types/EntityCount.js} +5 -3
  326. package/serialization/types/IntegrationCredentialInDb.d.ts +22 -0
  327. package/serialization/types/{SourceWithConfigFields.js → IntegrationCredentialInDb.js} +8 -13
  328. package/serialization/types/IntegrationCredentialRawCreate.d.ts +20 -0
  329. package/serialization/types/IntegrationCredentialRawCreate.js +51 -0
  330. package/serialization/types/OAuth2AuthUrl.d.ts +12 -0
  331. package/serialization/types/OAuth2AuthUrl.js +43 -0
  332. package/serialization/types/Organization.d.ts +16 -0
  333. package/serialization/types/Organization.js +47 -0
  334. package/serialization/types/ResponseType.d.ts +10 -0
  335. package/{dist/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js → serialization/types/ResponseType.js} +3 -3
  336. package/serialization/types/SearchResponse.d.ts +17 -0
  337. package/serialization/types/SearchResponse.js +48 -0
  338. package/serialization/types/SearchStatus.d.ts +10 -0
  339. package/serialization/types/SearchStatus.js +41 -0
  340. package/serialization/types/Source.d.ts +5 -1
  341. package/serialization/types/Source.js +5 -1
  342. package/serialization/types/SourceConnection.d.ts +38 -0
  343. package/serialization/types/SourceConnection.js +69 -0
  344. package/serialization/types/SourceConnectionAuthFields.d.ts +11 -0
  345. package/serialization/types/{BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → SourceConnectionAuthFields.js} +3 -5
  346. package/serialization/types/SourceConnectionCreate.d.ts +22 -0
  347. package/serialization/types/SourceConnectionCreate.js +53 -0
  348. package/serialization/types/SourceConnectionJob.d.ts +30 -0
  349. package/serialization/types/SourceConnectionJob.js +61 -0
  350. package/serialization/types/SourceConnectionListItem.d.ts +22 -0
  351. package/serialization/types/SourceConnectionListItem.js +53 -0
  352. package/serialization/types/SourceConnectionStatus.d.ts +10 -0
  353. package/serialization/types/SourceConnectionStatus.js +41 -0
  354. package/serialization/types/Sync.d.ts +0 -2
  355. package/serialization/types/Sync.js +0 -2
  356. package/serialization/{resources/sync/client/requests → types}/SyncCreate.d.ts +5 -7
  357. package/{dist/serialization/resources/sync/client/requests → serialization/types}/SyncCreate.js +2 -4
  358. package/serialization/types/SyncJob.d.ts +7 -4
  359. package/serialization/types/SyncJob.js +7 -4
  360. package/serialization/types/SyncUpdate.d.ts +17 -0
  361. package/{dist/serialization/resources/sync/client/requests → serialization/types}/SyncUpdate.js +2 -4
  362. package/serialization/types/SyncWithSourceConnection.d.ts +0 -2
  363. package/serialization/types/SyncWithSourceConnection.js +0 -2
  364. package/serialization/types/User.d.ts +1 -1
  365. package/serialization/types/User.js +1 -1
  366. package/serialization/types/UserCreate.d.ts +14 -0
  367. package/serialization/types/UserCreate.js +45 -0
  368. package/serialization/types/WhiteLabel.d.ts +1 -0
  369. package/serialization/types/WhiteLabel.js +1 -0
  370. package/serialization/types/WhiteLabelCreate.d.ts +17 -0
  371. package/{dist/serialization/resources/whiteLabels/client/requests → serialization/types}/WhiteLabelCreate.js +2 -1
  372. package/serialization/types/WhiteLabelUpdate.d.ts +16 -0
  373. package/{dist/serialization/resources/whiteLabels/client/requests → serialization/types}/WhiteLabelUpdate.js +2 -1
  374. package/serialization/types/index.d.ts +28 -5
  375. package/serialization/types/index.js +28 -5
  376. package/version.d.ts +1 -1
  377. package/version.js +1 -1
  378. package/api/resources/apiKeys/client/Client.d.ts +0 -131
  379. package/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +0 -12
  380. package/api/resources/apiKeys/client/requests/index.d.ts +0 -3
  381. package/api/resources/connections/client/Client.d.ts +0 -247
  382. package/api/resources/connections/client/Client.js +0 -762
  383. package/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -15
  384. package/api/resources/connections/client/requests/index.d.ts +0 -1
  385. package/api/resources/embeddingModels/client/Client.d.ts +0 -71
  386. package/api/resources/embeddingModels/client/Client.js +0 -211
  387. package/api/resources/embeddingModels/client/index.d.ts +0 -1
  388. package/api/resources/search/client/Client.d.ts +0 -55
  389. package/api/resources/search/client/Client.js +0 -147
  390. package/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +0 -20
  391. package/api/resources/search/client/requests/index.d.ts +0 -1
  392. package/api/resources/sync/client/Client.d.ts +0 -275
  393. package/api/resources/sync/client/Client.js +0 -916
  394. package/api/resources/sync/client/requests/index.d.ts +0 -5
  395. package/api/resources/sync/client/requests/index.js +0 -2
  396. package/api/resources/sync/types/index.d.ts +0 -1
  397. package/api/resources/sync/types/index.js +0 -17
  398. package/api/resources/whiteLabels/client/Client.d.ts +0 -213
  399. package/api/resources/whiteLabels/client/index.d.ts +0 -1
  400. package/api/resources/whiteLabels/client/index.js +0 -17
  401. package/api/resources/whiteLabels/client/requests/index.d.ts +0 -2
  402. package/api/resources/whiteLabels/client/requests/index.js +0 -2
  403. package/api/resources/whiteLabels/index.d.ts +0 -1
  404. package/api/resources/whiteLabels/index.js +0 -17
  405. package/api/types/ApiKeyWithPlainKey.d.ts +0 -18
  406. package/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -7
  407. package/api/types/SourceWithConfigFields.d.ts +0 -23
  408. package/dist/api/resources/apiKeys/client/Client.d.ts +0 -131
  409. package/dist/api/resources/apiKeys/client/index.d.ts +0 -1
  410. package/dist/api/resources/apiKeys/client/index.js +0 -17
  411. package/dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +0 -12
  412. package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +0 -11
  413. package/dist/api/resources/apiKeys/client/requests/index.d.ts +0 -3
  414. package/dist/api/resources/apiKeys/client/requests/index.js +0 -2
  415. package/dist/api/resources/apiKeys/index.d.ts +0 -1
  416. package/dist/api/resources/apiKeys/index.js +0 -17
  417. package/dist/api/resources/connections/client/Client.d.ts +0 -247
  418. package/dist/api/resources/connections/client/Client.js +0 -762
  419. package/dist/api/resources/connections/client/index.d.ts +0 -1
  420. package/dist/api/resources/connections/client/index.js +0 -17
  421. package/dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -15
  422. package/dist/api/resources/connections/client/requests/index.d.ts +0 -1
  423. package/dist/api/resources/connections/client/requests/index.js +0 -2
  424. package/dist/api/resources/connections/index.d.ts +0 -1
  425. package/dist/api/resources/connections/index.js +0 -17
  426. package/dist/api/resources/embeddingModels/client/Client.d.ts +0 -71
  427. package/dist/api/resources/embeddingModels/client/Client.js +0 -211
  428. package/dist/api/resources/embeddingModels/client/index.d.ts +0 -1
  429. package/dist/api/resources/embeddingModels/client/index.js +0 -2
  430. package/dist/api/resources/embeddingModels/index.d.ts +0 -1
  431. package/dist/api/resources/embeddingModels/index.js +0 -17
  432. package/dist/api/resources/search/client/Client.d.ts +0 -55
  433. package/dist/api/resources/search/client/Client.js +0 -147
  434. package/dist/api/resources/search/client/index.d.ts +0 -1
  435. package/dist/api/resources/search/client/index.js +0 -17
  436. package/dist/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +0 -20
  437. package/dist/api/resources/search/client/requests/index.d.ts +0 -1
  438. package/dist/api/resources/search/client/requests/index.js +0 -2
  439. package/dist/api/resources/search/index.d.ts +0 -1
  440. package/dist/api/resources/search/index.js +0 -17
  441. package/dist/api/resources/sync/client/Client.d.ts +0 -275
  442. package/dist/api/resources/sync/client/Client.js +0 -916
  443. package/dist/api/resources/sync/client/index.d.ts +0 -1
  444. package/dist/api/resources/sync/client/index.js +0 -17
  445. package/dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.d.ts +0 -12
  446. package/dist/api/resources/sync/client/requests/index.d.ts +0 -5
  447. package/dist/api/resources/sync/client/requests/index.js +0 -2
  448. package/dist/api/resources/sync/types/index.d.ts +0 -1
  449. package/dist/api/resources/sync/types/index.js +0 -17
  450. package/dist/api/resources/whiteLabels/client/Client.d.ts +0 -213
  451. package/dist/api/resources/whiteLabels/client/index.d.ts +0 -1
  452. package/dist/api/resources/whiteLabels/client/index.js +0 -17
  453. package/dist/api/resources/whiteLabels/client/requests/index.d.ts +0 -2
  454. package/dist/api/resources/whiteLabels/client/requests/index.js +0 -2
  455. package/dist/api/resources/whiteLabels/index.d.ts +0 -1
  456. package/dist/api/resources/whiteLabels/index.js +0 -17
  457. package/dist/api/types/ApiKeyWithPlainKey.d.ts +0 -18
  458. package/dist/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -7
  459. package/dist/api/types/SourceWithConfigFields.d.ts +0 -23
  460. package/dist/serialization/resources/apiKeys/client/index.d.ts +0 -2
  461. package/dist/serialization/resources/apiKeys/client/requests/index.d.ts +0 -1
  462. package/dist/serialization/resources/apiKeys/client/requests/index.js +0 -5
  463. package/dist/serialization/resources/apiKeys/index.d.ts +0 -1
  464. package/dist/serialization/resources/apiKeys/index.js +0 -17
  465. package/dist/serialization/resources/connections/client/getConnectionCredentials.d.ts +0 -9
  466. package/dist/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +0 -9
  467. package/dist/serialization/resources/connections/client/index.d.ts +0 -6
  468. package/dist/serialization/resources/connections/client/index.js +0 -45
  469. package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
  470. package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +0 -44
  471. package/dist/serialization/resources/connections/client/requests/index.d.ts +0 -1
  472. package/dist/serialization/resources/connections/client/requests/index.js +0 -5
  473. package/dist/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +0 -9
  474. package/dist/serialization/resources/connections/index.d.ts +0 -1
  475. package/dist/serialization/resources/connections/index.js +0 -17
  476. package/dist/serialization/resources/embeddingModels/client/index.d.ts +0 -1
  477. package/dist/serialization/resources/embeddingModels/client/index.js +0 -37
  478. package/dist/serialization/resources/embeddingModels/client/readEmbeddingModels.js +0 -42
  479. package/dist/serialization/resources/embeddingModels/index.d.ts +0 -1
  480. package/dist/serialization/resources/embeddingModels/index.js +0 -17
  481. package/dist/serialization/resources/search/client/index.d.ts +0 -1
  482. package/dist/serialization/resources/search/client/index.js +0 -37
  483. package/dist/serialization/resources/search/client/search.d.ts +0 -9
  484. package/dist/serialization/resources/search/client/search.js +0 -41
  485. package/dist/serialization/resources/search/index.d.ts +0 -1
  486. package/dist/serialization/resources/search/index.js +0 -17
  487. package/dist/serialization/resources/sync/client/index.d.ts +0 -3
  488. package/dist/serialization/resources/sync/client/listAllJobs.d.ts +0 -11
  489. package/dist/serialization/resources/sync/client/listAllJobs.js +0 -42
  490. package/dist/serialization/resources/sync/client/listSyncJobs.d.ts +0 -11
  491. package/dist/serialization/resources/sync/client/listSyncJobs.js +0 -42
  492. package/dist/serialization/resources/sync/client/requests/SyncUpdate.d.ts +0 -19
  493. package/dist/serialization/resources/sync/client/requests/index.d.ts +0 -2
  494. package/dist/serialization/resources/sync/client/requests/index.js +0 -7
  495. package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -12
  496. package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +0 -46
  497. package/dist/serialization/resources/sync/types/index.d.ts +0 -1
  498. package/dist/serialization/resources/sync/types/index.js +0 -17
  499. package/dist/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +0 -9
  500. package/dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +0 -9
  501. package/dist/serialization/resources/whiteLabels/client/index.d.ts +0 -5
  502. package/dist/serialization/resources/whiteLabels/client/index.js +0 -44
  503. package/dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js +0 -42
  504. package/dist/serialization/resources/whiteLabels/client/listWhiteLabels.d.ts +0 -11
  505. package/dist/serialization/resources/whiteLabels/client/listWhiteLabels.js +0 -42
  506. package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +0 -16
  507. package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +0 -15
  508. package/dist/serialization/resources/whiteLabels/client/requests/index.d.ts +0 -2
  509. package/dist/serialization/resources/whiteLabels/client/requests/index.js +0 -7
  510. package/dist/serialization/resources/whiteLabels/index.d.ts +0 -1
  511. package/dist/serialization/resources/whiteLabels/index.js +0 -17
  512. package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -13
  513. package/dist/serialization/types/SourceWithConfigFields.d.ts +0 -27
  514. package/serialization/resources/apiKeys/client/index.d.ts +0 -2
  515. package/serialization/resources/apiKeys/client/readApiKeys.d.ts +0 -11
  516. package/serialization/resources/apiKeys/client/readApiKeys.js +0 -42
  517. package/serialization/resources/apiKeys/client/requests/index.d.ts +0 -1
  518. package/serialization/resources/apiKeys/client/requests/index.js +0 -5
  519. package/serialization/resources/apiKeys/index.d.ts +0 -1
  520. package/serialization/resources/apiKeys/index.js +0 -17
  521. package/serialization/resources/connections/client/getConnectionCredentials.d.ts +0 -9
  522. package/serialization/resources/connections/client/getConnectionCredentials.js +0 -41
  523. package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +0 -9
  524. package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.js +0 -41
  525. package/serialization/resources/connections/client/index.d.ts +0 -6
  526. package/serialization/resources/connections/client/index.js +0 -45
  527. package/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +0 -11
  528. package/serialization/resources/connections/client/listAllConnectedIntegrations.js +0 -42
  529. package/serialization/resources/connections/client/listConnectedIntegrations.d.ts +0 -11
  530. package/serialization/resources/connections/client/listConnectedIntegrations.js +0 -42
  531. package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
  532. package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +0 -44
  533. package/serialization/resources/connections/client/requests/index.d.ts +0 -1
  534. package/serialization/resources/connections/client/requests/index.js +0 -5
  535. package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +0 -9
  536. package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.js +0 -41
  537. package/serialization/resources/connections/index.d.ts +0 -1
  538. package/serialization/resources/connections/index.js +0 -17
  539. package/serialization/resources/embeddingModels/client/index.d.ts +0 -1
  540. package/serialization/resources/embeddingModels/client/index.js +0 -37
  541. package/serialization/resources/embeddingModels/client/readEmbeddingModels.d.ts +0 -11
  542. package/serialization/resources/embeddingModels/client/readEmbeddingModels.js +0 -42
  543. package/serialization/resources/embeddingModels/index.d.ts +0 -1
  544. package/serialization/resources/embeddingModels/index.js +0 -17
  545. package/serialization/resources/search/client/index.d.ts +0 -1
  546. package/serialization/resources/search/client/index.js +0 -37
  547. package/serialization/resources/search/client/search.d.ts +0 -9
  548. package/serialization/resources/search/client/search.js +0 -41
  549. package/serialization/resources/search/index.d.ts +0 -1
  550. package/serialization/resources/search/index.js +0 -17
  551. package/serialization/resources/sync/client/index.d.ts +0 -3
  552. package/serialization/resources/sync/client/listAllJobs.d.ts +0 -11
  553. package/serialization/resources/sync/client/listAllJobs.js +0 -42
  554. package/serialization/resources/sync/client/listSyncJobs.d.ts +0 -11
  555. package/serialization/resources/sync/client/listSyncJobs.js +0 -42
  556. package/serialization/resources/sync/client/requests/SyncUpdate.d.ts +0 -19
  557. package/serialization/resources/sync/client/requests/index.d.ts +0 -2
  558. package/serialization/resources/sync/client/requests/index.js +0 -7
  559. package/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -12
  560. package/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +0 -46
  561. package/serialization/resources/sync/types/index.d.ts +0 -1
  562. package/serialization/resources/sync/types/index.js +0 -17
  563. package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +0 -9
  564. package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js +0 -41
  565. package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +0 -9
  566. package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js +0 -41
  567. package/serialization/resources/whiteLabels/client/index.d.ts +0 -5
  568. package/serialization/resources/whiteLabels/client/index.js +0 -44
  569. package/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts +0 -11
  570. package/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js +0 -42
  571. package/serialization/resources/whiteLabels/client/listWhiteLabels.d.ts +0 -11
  572. package/serialization/resources/whiteLabels/client/listWhiteLabels.js +0 -42
  573. package/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +0 -16
  574. package/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +0 -15
  575. package/serialization/resources/whiteLabels/client/requests/index.d.ts +0 -2
  576. package/serialization/resources/whiteLabels/client/requests/index.js +0 -7
  577. package/serialization/resources/whiteLabels/index.d.ts +0 -1
  578. package/serialization/resources/whiteLabels/index.js +0 -17
  579. package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -13
  580. package/serialization/types/SourceWithConfigFields.d.ts +0 -27
  581. /package/api/resources/{apiKeys → collections}/client/index.d.ts +0 -0
  582. /package/api/resources/{apiKeys → collections}/client/index.js +0 -0
  583. /package/api/resources/{apiKeys/client/requests/ApiKeyCreate.js → collections/client/requests/CollectionCreate.js} +0 -0
  584. /package/api/resources/{apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js → collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.js} +0 -0
  585. /package/api/resources/{apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js → collections/client/requests/ListCollectionsCollectionsGetRequest.js} +0 -0
  586. /package/api/resources/{connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.js} +0 -0
  587. /package/api/resources/{apiKeys → collections}/client/requests/index.js +0 -0
  588. /package/api/resources/{apiKeys → collections}/index.d.ts +0 -0
  589. /package/api/resources/{apiKeys → collections}/index.js +0 -0
  590. /package/api/resources/{connections → sourceConnections}/client/index.d.ts +0 -0
  591. /package/api/resources/{connections → sourceConnections}/client/index.js +0 -0
  592. /package/api/resources/{search/client/requests/SearchSearchGetRequest.js → sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js} +0 -0
  593. /package/api/resources/{sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js → sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.js} +0 -0
  594. /package/api/resources/{sync/client/requests/ListAllJobsSyncJobsGetRequest.js → sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.js} +0 -0
  595. /package/api/resources/{sync/client/requests/ListSyncsSyncGetRequest.js → sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.js} +0 -0
  596. /package/api/resources/{sync/client/requests/SyncCreate.js → sourceConnections/client/requests/SourceConnectionUpdate.js} +0 -0
  597. /package/api/resources/{connections → sourceConnections}/client/requests/index.js +0 -0
  598. /package/api/resources/{sync → sourceConnections}/index.d.ts +0 -0
  599. /package/api/resources/{sync → sourceConnections}/index.js +0 -0
  600. /package/api/resources/{sync/client/requests/SyncUpdate.js → sourceConnections/types/SourceConnectionUpdateAuthFields.js} +0 -0
  601. /package/{dist/api/resources/apiKeys/client/requests → api/types}/ApiKeyCreate.js +0 -0
  602. /package/api/{resources/sync/types/ListSyncsSyncGetResponse.js → types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js} +0 -0
  603. /package/api/{resources/whiteLabels/client/requests/WhiteLabelCreate.js → types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js} +0 -0
  604. /package/api/{resources/whiteLabels/client/requests/WhiteLabelUpdate.js → types/Collection.js} +0 -0
  605. /package/api/types/{ApiKeyWithPlainKey.js → CollectionUpdate.js} +0 -0
  606. /package/api/types/{BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → ConfigValues.js} +0 -0
  607. /package/api/types/{DestinationWithConfigFields.js → DestinationWithAuthenticationFields.js} +0 -0
  608. /package/api/types/{EmbeddingModelWithConfigFields.js → EmbeddingModelWithAuthenticationFields.js} +0 -0
  609. /package/api/types/{SourceWithConfigFields.js → EntityCount.js} +0 -0
  610. /package/{dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js → api/types/IntegrationCredentialInDb.js} +0 -0
  611. /package/{dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js → api/types/IntegrationCredentialRawCreate.js} +0 -0
  612. /package/{dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → api/types/OAuth2AuthUrl.js} +0 -0
  613. /package/{dist/api/resources/search/client/requests/SearchSearchGetRequest.js → api/types/Organization.js} +0 -0
  614. /package/{dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js → api/types/SearchResponse.js} +0 -0
  615. /package/{dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.js → api/types/SourceConnection.js} +0 -0
  616. /package/{dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.js → api/types/SourceConnectionAuthFields.js} +0 -0
  617. /package/{dist/api/resources/sync/client/requests/SyncCreate.js → api/types/SourceConnectionCreate.js} +0 -0
  618. /package/{dist/api/resources/sync/client/requests/SyncUpdate.js → api/types/SourceConnectionJob.js} +0 -0
  619. /package/{dist/api/resources/sync/types/ListSyncsSyncGetResponse.js → api/types/SourceConnectionListItem.js} +0 -0
  620. /package/{dist/api/resources/whiteLabels/client/requests/WhiteLabelCreate.js → api/types/SyncCreate.js} +0 -0
  621. /package/{dist/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.js → api/types/SyncUpdate.js} +0 -0
  622. /package/{dist/api/types/ApiKeyWithPlainKey.js → api/types/UserCreate.js} +0 -0
  623. /package/{dist/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → api/types/WhiteLabelCreate.js} +0 -0
  624. /package/{dist/api/types/DestinationWithConfigFields.js → api/types/WhiteLabelUpdate.js} +0 -0
  625. /package/{api/resources/search → dist/api/resources/collections}/client/index.d.ts +0 -0
  626. /package/{api/resources/search → dist/api/resources/collections}/client/index.js +0 -0
  627. /package/dist/api/{types/EmbeddingModelWithConfigFields.js → resources/collections/client/requests/CollectionCreate.js} +0 -0
  628. /package/dist/api/{types/SourceWithConfigFields.js → resources/collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.js} +0 -0
  629. /package/{api/resources/embeddingModels/client → dist/api/resources/collections/client/requests}/index.js +0 -0
  630. /package/{api/resources/connections → dist/api/resources/collections}/index.d.ts +0 -0
  631. /package/{api/resources/connections → dist/api/resources/collections}/index.js +0 -0
  632. /package/{api/resources/sync → dist/api/resources/sourceConnections}/client/index.d.ts +0 -0
  633. /package/{api/resources/sync → dist/api/resources/sourceConnections}/client/index.js +0 -0
  634. /package/{api/resources/search → dist/api/resources/sourceConnections}/client/requests/index.js +0 -0
  635. /package/dist/api/resources/{sync → sourceConnections}/index.d.ts +0 -0
  636. /package/dist/api/resources/{sync → sourceConnections}/index.js +0 -0
  637. /package/{api/resources/embeddingModels → dist/serialization/resources/collections}/index.d.ts +0 -0
  638. /package/{api/resources/embeddingModels → dist/serialization/resources/collections}/index.js +0 -0
  639. /package/dist/serialization/resources/{sync → sourceConnections}/index.d.ts +0 -0
  640. /package/dist/serialization/resources/{sync → sourceConnections}/index.js +0 -0
  641. /package/{api/resources/search → serialization/resources/collections}/index.d.ts +0 -0
  642. /package/{api/resources/search → serialization/resources/collections}/index.js +0 -0
  643. /package/serialization/resources/{sync → sourceConnections}/index.d.ts +0 -0
  644. /package/serialization/resources/{sync → sourceConnections}/index.js +0 -0
@@ -1,916 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern 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 () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
- return new (P || (P = Promise))(function (resolve, reject) {
41
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
- step((generator = generator.apply(thisArg, _arguments || [])).next());
45
- });
46
- };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
- Object.defineProperty(exports, "__esModule", { value: true });
51
- exports.Sync = void 0;
52
- const environments = __importStar(require("../../../../environments"));
53
- const core = __importStar(require("../../../../core"));
54
- const AirweaveSDK = __importStar(require("../../../index"));
55
- const url_join_1 = __importDefault(require("url-join"));
56
- const serializers = __importStar(require("../../../../serialization/index"));
57
- const errors = __importStar(require("../../../../errors/index"));
58
- class Sync {
59
- constructor(_options = {}) {
60
- this._options = _options;
61
- }
62
- /**
63
- * List all syncs for the current user.
64
- *
65
- * Args:
66
- * -----
67
- * 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
71
- * user: The current user
72
- *
73
- * Returns:
74
- * --------
75
- * list[schemas.Sync] | list[schemas.SyncWithSourceConnection]: A list of syncs
76
- *
77
- * @param {AirweaveSDK.ListSyncsSyncGetRequest} request
78
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
79
- *
80
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
81
- *
82
- * @example
83
- * await client.sync.listSyncs()
84
- */
85
- listSyncs() {
86
- return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
87
- var _a;
88
- const { skip, limit, withSourceConnection } = request;
89
- const _queryParams = {};
90
- if (skip != null) {
91
- _queryParams["skip"] = skip.toString();
92
- }
93
- if (limit != null) {
94
- _queryParams["limit"] = limit.toString();
95
- }
96
- if (withSourceConnection != null) {
97
- _queryParams["with_source_connection"] = withSourceConnection.toString();
98
- }
99
- 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/"),
101
- method: "GET",
102
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
103
- ? 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),
105
- contentType: "application/json",
106
- queryParameters: _queryParams,
107
- requestType: "json",
108
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
109
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
110
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
111
- });
112
- if (_response.ok) {
113
- return serializers.ListSyncsSyncGetResponse.parseOrThrow(_response.body, {
114
- unrecognizedObjectKeys: "passthrough",
115
- allowUnrecognizedUnionMembers: true,
116
- allowUnrecognizedEnumValues: true,
117
- breadcrumbsPrefix: ["response"],
118
- });
119
- }
120
- if (_response.error.reason === "status-code") {
121
- switch (_response.error.statusCode) {
122
- case 422:
123
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
124
- unrecognizedObjectKeys: "passthrough",
125
- allowUnrecognizedUnionMembers: true,
126
- allowUnrecognizedEnumValues: true,
127
- breadcrumbsPrefix: ["response"],
128
- }));
129
- default:
130
- throw new errors.AirweaveSDKError({
131
- statusCode: _response.error.statusCode,
132
- body: _response.error.body,
133
- });
134
- }
135
- }
136
- switch (_response.error.reason) {
137
- case "non-json":
138
- throw new errors.AirweaveSDKError({
139
- statusCode: _response.error.statusCode,
140
- body: _response.error.rawBody,
141
- });
142
- case "timeout":
143
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/.");
144
- case "unknown":
145
- throw new errors.AirweaveSDKError({
146
- message: _response.error.errorMessage,
147
- });
148
- }
149
- });
150
- }
151
- /**
152
- * Create a new sync configuration.
153
- *
154
- * Args:
155
- * -----
156
- * db: The database session
157
- * sync_in: The sync to create
158
- * user: The current user
159
- * background_tasks: The background tasks
160
- *
161
- * Returns:
162
- * --------
163
- * sync (schemas.Sync): The created sync
164
- *
165
- * @param {AirweaveSDK.SyncCreate} request
166
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
167
- *
168
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
169
- *
170
- * @example
171
- * await client.sync.createSync({
172
- * name: "name",
173
- * sourceConnectionId: "source_connection_id",
174
- * destinationConnectionIds: ["destination_connection_ids"]
175
- * })
176
- */
177
- createSync(request, requestOptions) {
178
- return __awaiter(this, void 0, void 0, function* () {
179
- var _a;
180
- 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/"),
182
- method: "POST",
183
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
184
- ? 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),
186
- contentType: "application/json",
187
- requestType: "json",
188
- body: serializers.SyncCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
189
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
190
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
191
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
192
- });
193
- if (_response.ok) {
194
- return serializers.Sync.parseOrThrow(_response.body, {
195
- unrecognizedObjectKeys: "passthrough",
196
- allowUnrecognizedUnionMembers: true,
197
- allowUnrecognizedEnumValues: true,
198
- breadcrumbsPrefix: ["response"],
199
- });
200
- }
201
- if (_response.error.reason === "status-code") {
202
- switch (_response.error.statusCode) {
203
- case 422:
204
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
205
- unrecognizedObjectKeys: "passthrough",
206
- allowUnrecognizedUnionMembers: true,
207
- allowUnrecognizedEnumValues: true,
208
- breadcrumbsPrefix: ["response"],
209
- }));
210
- default:
211
- throw new errors.AirweaveSDKError({
212
- statusCode: _response.error.statusCode,
213
- body: _response.error.body,
214
- });
215
- }
216
- }
217
- switch (_response.error.reason) {
218
- case "non-json":
219
- throw new errors.AirweaveSDKError({
220
- statusCode: _response.error.statusCode,
221
- body: _response.error.rawBody,
222
- });
223
- case "timeout":
224
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /sync/.");
225
- case "unknown":
226
- throw new errors.AirweaveSDKError({
227
- message: _response.error.errorMessage,
228
- });
229
- }
230
- });
231
- }
232
- /**
233
- * List all sync jobs across all syncs.
234
- *
235
- * Args:
236
- * -----
237
- * db: The database session
238
- * skip: The number of jobs to skip
239
- * limit: The number of jobs to return
240
- * user: The current user
241
- *
242
- * Returns:
243
- * --------
244
- * list[schemas.SyncJob]: A list of all sync jobs
245
- *
246
- * @param {AirweaveSDK.ListAllJobsSyncJobsGetRequest} request
247
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
248
- *
249
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
250
- *
251
- * @example
252
- * await client.sync.listAllJobs()
253
- */
254
- listAllJobs() {
255
- return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
256
- var _a;
257
- const { skip, limit } = request;
258
- const _queryParams = {};
259
- if (skip != null) {
260
- _queryParams["skip"] = skip.toString();
261
- }
262
- if (limit != null) {
263
- _queryParams["limit"] = limit.toString();
264
- }
265
- 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"),
267
- method: "GET",
268
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
269
- ? 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),
271
- contentType: "application/json",
272
- queryParameters: _queryParams,
273
- requestType: "json",
274
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
275
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
276
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
277
- });
278
- if (_response.ok) {
279
- return serializers.sync.listAllJobs.Response.parseOrThrow(_response.body, {
280
- unrecognizedObjectKeys: "passthrough",
281
- allowUnrecognizedUnionMembers: true,
282
- allowUnrecognizedEnumValues: true,
283
- breadcrumbsPrefix: ["response"],
284
- });
285
- }
286
- if (_response.error.reason === "status-code") {
287
- switch (_response.error.statusCode) {
288
- case 422:
289
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
290
- unrecognizedObjectKeys: "passthrough",
291
- allowUnrecognizedUnionMembers: true,
292
- allowUnrecognizedEnumValues: true,
293
- breadcrumbsPrefix: ["response"],
294
- }));
295
- default:
296
- throw new errors.AirweaveSDKError({
297
- statusCode: _response.error.statusCode,
298
- body: _response.error.body,
299
- });
300
- }
301
- }
302
- switch (_response.error.reason) {
303
- case "non-json":
304
- throw new errors.AirweaveSDKError({
305
- statusCode: _response.error.statusCode,
306
- body: _response.error.rawBody,
307
- });
308
- case "timeout":
309
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/jobs.");
310
- case "unknown":
311
- throw new errors.AirweaveSDKError({
312
- message: _response.error.errorMessage,
313
- });
314
- }
315
- });
316
- }
317
- /**
318
- * Get a specific sync by ID.
319
- *
320
- * Args:
321
- * -----
322
- * db: The database session
323
- * sync_id: The ID of the sync to get
324
- * user: The current user
325
- *
326
- * Returns:
327
- * --------
328
- * sync (schemas.Sync): The sync
329
- *
330
- * @param {string} syncId
331
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
332
- *
333
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
334
- *
335
- * @example
336
- * await client.sync.getSync("sync_id")
337
- */
338
- getSync(syncId, requestOptions) {
339
- return __awaiter(this, void 0, void 0, function* () {
340
- var _a;
341
- 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
345
- ? 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),
347
- contentType: "application/json",
348
- requestType: "json",
349
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
350
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
351
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
352
- });
353
- if (_response.ok) {
354
- return serializers.Sync.parseOrThrow(_response.body, {
355
- unrecognizedObjectKeys: "passthrough",
356
- allowUnrecognizedUnionMembers: true,
357
- allowUnrecognizedEnumValues: true,
358
- breadcrumbsPrefix: ["response"],
359
- });
360
- }
361
- if (_response.error.reason === "status-code") {
362
- switch (_response.error.statusCode) {
363
- case 422:
364
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
365
- unrecognizedObjectKeys: "passthrough",
366
- allowUnrecognizedUnionMembers: true,
367
- allowUnrecognizedEnumValues: true,
368
- breadcrumbsPrefix: ["response"],
369
- }));
370
- default:
371
- throw new errors.AirweaveSDKError({
372
- statusCode: _response.error.statusCode,
373
- body: _response.error.body,
374
- });
375
- }
376
- }
377
- switch (_response.error.reason) {
378
- case "non-json":
379
- throw new errors.AirweaveSDKError({
380
- statusCode: _response.error.statusCode,
381
- body: _response.error.rawBody,
382
- });
383
- case "timeout":
384
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/{sync_id}.");
385
- case "unknown":
386
- throw new errors.AirweaveSDKError({
387
- message: _response.error.errorMessage,
388
- });
389
- }
390
- });
391
- }
392
- /**
393
- * Delete a sync configuration and optionally its associated data.
394
- *
395
- * Args:
396
- * -----
397
- * 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
400
- * user: The current user
401
- *
402
- * Returns:
403
- * --------
404
- * sync (schemas.Sync): The deleted sync
405
- *
406
- * @param {string} syncId
407
- * @param {AirweaveSDK.DeleteSyncSyncSyncIdDeleteRequest} request
408
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
409
- *
410
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
411
- *
412
- * @example
413
- * await client.sync.deleteSync("sync_id")
414
- */
415
- deleteSync(syncId_1) {
416
- return __awaiter(this, arguments, void 0, function* (syncId, request = {}, requestOptions) {
417
- var _a;
418
- const { deleteData } = request;
419
- const _queryParams = {};
420
- if (deleteData != null) {
421
- _queryParams["delete_data"] = deleteData.toString();
422
- }
423
- 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)}`),
425
- method: "DELETE",
426
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
427
- ? 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),
429
- contentType: "application/json",
430
- queryParameters: _queryParams,
431
- requestType: "json",
432
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
433
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
434
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
435
- });
436
- if (_response.ok) {
437
- return serializers.Sync.parseOrThrow(_response.body, {
438
- unrecognizedObjectKeys: "passthrough",
439
- allowUnrecognizedUnionMembers: true,
440
- allowUnrecognizedEnumValues: true,
441
- breadcrumbsPrefix: ["response"],
442
- });
443
- }
444
- if (_response.error.reason === "status-code") {
445
- switch (_response.error.statusCode) {
446
- case 422:
447
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
448
- unrecognizedObjectKeys: "passthrough",
449
- allowUnrecognizedUnionMembers: true,
450
- allowUnrecognizedEnumValues: true,
451
- breadcrumbsPrefix: ["response"],
452
- }));
453
- default:
454
- throw new errors.AirweaveSDKError({
455
- statusCode: _response.error.statusCode,
456
- body: _response.error.body,
457
- });
458
- }
459
- }
460
- switch (_response.error.reason) {
461
- case "non-json":
462
- throw new errors.AirweaveSDKError({
463
- statusCode: _response.error.statusCode,
464
- body: _response.error.rawBody,
465
- });
466
- case "timeout":
467
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling DELETE /sync/{sync_id}.");
468
- case "unknown":
469
- throw new errors.AirweaveSDKError({
470
- message: _response.error.errorMessage,
471
- });
472
- }
473
- });
474
- }
475
- /**
476
- * Update a sync configuration.
477
- *
478
- * Args:
479
- * -----
480
- * db: The database session
481
- * sync_id: The ID of the sync to update
482
- * sync_update: The sync update data
483
- * user: The current user
484
- *
485
- * Returns:
486
- * --------
487
- * sync (schemas.Sync): The updated sync
488
- *
489
- * @param {string} syncId
490
- * @param {AirweaveSDK.SyncUpdate} request
491
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
492
- *
493
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
494
- *
495
- * @example
496
- * await client.sync.updateSync("sync_id")
497
- */
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) {
576
- return __awaiter(this, void 0, void 0, function* () {
577
- var _a;
578
- 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`),
580
- 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
657
- ? 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),
659
- contentType: "application/json",
660
- requestType: "json",
661
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
662
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
663
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
664
- });
665
- if (_response.ok) {
666
- return serializers.sync.listSyncJobs.Response.parseOrThrow(_response.body, {
667
- unrecognizedObjectKeys: "passthrough",
668
- allowUnrecognizedUnionMembers: true,
669
- allowUnrecognizedEnumValues: true,
670
- breadcrumbsPrefix: ["response"],
671
- });
672
- }
673
- if (_response.error.reason === "status-code") {
674
- switch (_response.error.statusCode) {
675
- case 422:
676
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
677
- unrecognizedObjectKeys: "passthrough",
678
- allowUnrecognizedUnionMembers: true,
679
- allowUnrecognizedEnumValues: true,
680
- breadcrumbsPrefix: ["response"],
681
- }));
682
- default:
683
- throw new errors.AirweaveSDKError({
684
- statusCode: _response.error.statusCode,
685
- body: _response.error.body,
686
- });
687
- }
688
- }
689
- switch (_response.error.reason) {
690
- case "non-json":
691
- throw new errors.AirweaveSDKError({
692
- statusCode: _response.error.statusCode,
693
- body: _response.error.rawBody,
694
- });
695
- case "timeout":
696
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/{sync_id}/jobs.");
697
- case "unknown":
698
- throw new errors.AirweaveSDKError({
699
- message: _response.error.errorMessage,
700
- });
701
- }
702
- });
703
- }
704
- /**
705
- * Get details of a specific sync job.
706
- *
707
- * Args:
708
- * -----
709
- * 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
712
- * user: The current user
713
- *
714
- * Returns:
715
- * --------
716
- * sync_job (schemas.SyncJob): The sync job
717
- *
718
- * @param {string} syncId
719
- * @param {string} jobId
720
- * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
721
- *
722
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
723
- *
724
- * @example
725
- * await client.sync.getSyncJob("sync_id", "job_id")
726
- */
727
- getSyncJob(syncId, jobId, requestOptions) {
728
- return __awaiter(this, void 0, void 0, function* () {
729
- var _a;
730
- 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)}`),
732
- method: "GET",
733
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
734
- ? 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),
736
- contentType: "application/json",
737
- requestType: "json",
738
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
739
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
740
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
741
- });
742
- if (_response.ok) {
743
- return serializers.SyncJob.parseOrThrow(_response.body, {
744
- unrecognizedObjectKeys: "passthrough",
745
- allowUnrecognizedUnionMembers: true,
746
- allowUnrecognizedEnumValues: true,
747
- breadcrumbsPrefix: ["response"],
748
- });
749
- }
750
- if (_response.error.reason === "status-code") {
751
- switch (_response.error.statusCode) {
752
- case 422:
753
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
754
- unrecognizedObjectKeys: "passthrough",
755
- allowUnrecognizedUnionMembers: true,
756
- allowUnrecognizedEnumValues: true,
757
- breadcrumbsPrefix: ["response"],
758
- }));
759
- default:
760
- throw new errors.AirweaveSDKError({
761
- statusCode: _response.error.statusCode,
762
- body: _response.error.body,
763
- });
764
- }
765
- }
766
- switch (_response.error.reason) {
767
- case "non-json":
768
- throw new errors.AirweaveSDKError({
769
- statusCode: _response.error.statusCode,
770
- body: _response.error.rawBody,
771
- });
772
- case "timeout":
773
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/{sync_id}/job/{job_id}.");
774
- case "unknown":
775
- throw new errors.AirweaveSDKError({
776
- message: _response.error.errorMessage,
777
- });
778
- }
779
- });
780
- }
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) {
802
- 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
- }
913
- });
914
- }
915
- }
916
- exports.Sync = Sync;