@airweave/sdk 0.1.28 → 0.1.35

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 (714) hide show
  1. package/Client.d.ts +8 -22
  2. package/Client.js +13 -38
  3. package/README.md +9 -11
  4. package/api/index.d.ts +1 -1
  5. package/api/index.js +1 -1
  6. package/api/resources/collections/client/Client.d.ts +112 -0
  7. package/api/resources/{dag → collections}/client/Client.js +152 -69
  8. package/api/resources/collections/client/requests/CollectionCreate.d.ts +15 -0
  9. package/{dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts → api/resources/collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.d.ts} +1 -1
  10. package/{dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts → api/resources/collections/client/requests/ListCollectionsCollectionsGetRequest.d.ts} +1 -1
  11. package/api/resources/collections/client/requests/index.d.ts +3 -0
  12. package/api/resources/connections/client/Client.d.ts +3 -250
  13. package/api/resources/connections/client/Client.js +7 -792
  14. package/api/resources/connections/client/index.d.ts +1 -1
  15. package/api/resources/connections/client/index.js +0 -15
  16. package/api/resources/index.d.ts +4 -14
  17. package/api/resources/index.js +5 -15
  18. package/api/resources/sourceConnections/client/Client.d.ts +191 -0
  19. package/{dist/api/resources/entities → api/resources/sourceConnections}/client/Client.js +179 -178
  20. package/api/resources/sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.d.ts +10 -0
  21. package/api/resources/sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.d.ts +10 -0
  22. package/api/resources/{sync/client/requests/ListSyncsSyncGetRequest.d.ts → sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.d.ts} +5 -2
  23. package/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +17 -0
  24. package/api/resources/sourceConnections/client/requests/index.d.ts +4 -0
  25. package/api/resources/sources/client/Client.d.ts +4 -2
  26. package/api/resources/sources/client/Client.js +11 -6
  27. package/api/resources/whiteLabels/client/Client.d.ts +3 -47
  28. package/api/resources/whiteLabels/client/Client.js +20 -170
  29. package/api/types/ApiKey.d.ts +3 -3
  30. package/api/types/ApiKeyCreate.d.ts +1 -0
  31. package/api/{resources/connections/client/requests → types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -9
  32. package/api/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +7 -0
  33. package/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +8 -0
  34. package/{dist/api/resources/connections/client/requests → api/types}/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -7
  35. package/api/types/Collection.d.ts +19 -0
  36. package/api/types/CollectionStatus.d.ts +13 -0
  37. package/api/types/CollectionStatus.js +12 -0
  38. package/api/types/CollectionUpdate.d.ts +10 -0
  39. package/api/types/ConfigValues.d.ts +9 -0
  40. package/api/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +2 -2
  41. package/{dist/api/types/EmbeddingModelWithConfigFields.d.ts → api/types/EmbeddingModelWithAuthenticationFields.d.ts} +2 -2
  42. package/api/types/EntityCount.d.ts +9 -0
  43. package/api/{resources/entities/client/requests → types}/EntityDefinitionCreate.d.ts +2 -9
  44. package/api/{resources/entities/client/requests → types}/EntityDefinitionUpdate.d.ts +2 -9
  45. package/{dist/api/resources/entities/client/requests → api/types}/EntityRelationCreate.d.ts +1 -6
  46. package/{dist/api/resources/entities/client/requests → api/types}/EntityRelationUpdate.d.ts +1 -6
  47. package/api/types/Organization.d.ts +13 -0
  48. package/api/types/ResponseType.d.ts +11 -0
  49. package/api/types/ResponseType.js +10 -0
  50. package/api/types/SearchResponse.d.ts +13 -0
  51. package/api/types/SearchStatus.d.ts +12 -0
  52. package/api/types/SearchStatus.js +11 -0
  53. package/api/types/SourceConnection.d.ts +31 -0
  54. package/api/types/SourceConnectionAuthFields.d.ts +5 -0
  55. package/api/types/SourceConnectionCreate.d.ts +21 -0
  56. package/api/types/SourceConnectionJob.d.ts +30 -0
  57. package/api/types/SourceConnectionListItem.d.ts +21 -0
  58. package/api/types/SourceConnectionStatus.d.ts +12 -0
  59. package/api/types/SourceConnectionStatus.js +11 -0
  60. package/api/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +2 -2
  61. package/{dist/api/resources/sync/client/requests → api/types}/SyncCreate.d.ts +2 -7
  62. package/api/types/SyncDagCreate.d.ts +14 -0
  63. package/api/{resources/dag/client/requests → types}/SyncDagUpdate.d.ts +3 -7
  64. package/api/types/SyncJob.d.ts +6 -4
  65. package/api/{resources/sync/client/requests → types}/SyncUpdate.d.ts +2 -3
  66. package/{dist/api/resources/transformers/client/requests → api/types}/TransformerCreate.d.ts +1 -8
  67. package/api/{resources/transformers/client/requests → types}/TransformerUpdate.d.ts +1 -8
  68. package/api/types/User.d.ts +1 -1
  69. package/api/types/UserCreate.d.ts +11 -0
  70. package/api/types/index.d.ts +35 -4
  71. package/api/types/index.js +35 -4
  72. package/core/auth/BasicAuth.d.ts +8 -0
  73. package/core/auth/BasicAuth.js +26 -0
  74. package/core/auth/BearerToken.d.ts +5 -0
  75. package/core/auth/BearerToken.js +15 -0
  76. package/core/auth/index.d.ts +2 -0
  77. package/core/auth/index.js +7 -0
  78. package/core/index.d.ts +1 -0
  79. package/core/index.js +1 -0
  80. package/dist/Client.d.ts +8 -22
  81. package/dist/Client.js +13 -38
  82. package/dist/api/index.d.ts +1 -1
  83. package/dist/api/index.js +1 -1
  84. package/dist/api/resources/collections/client/Client.d.ts +112 -0
  85. package/dist/api/resources/{dag → collections}/client/Client.js +152 -69
  86. package/dist/api/resources/collections/client/requests/CollectionCreate.d.ts +15 -0
  87. package/{api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts → dist/api/resources/collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.d.ts} +1 -1
  88. package/{api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts → dist/api/resources/collections/client/requests/ListCollectionsCollectionsGetRequest.d.ts} +1 -1
  89. package/dist/api/resources/collections/client/requests/index.d.ts +3 -0
  90. package/dist/api/resources/connections/client/Client.d.ts +3 -250
  91. package/dist/api/resources/connections/client/Client.js +7 -792
  92. package/dist/api/resources/connections/client/index.d.ts +1 -1
  93. package/dist/api/resources/connections/client/index.js +0 -15
  94. package/dist/api/resources/index.d.ts +4 -14
  95. package/dist/api/resources/index.js +5 -15
  96. package/dist/api/resources/sourceConnections/client/Client.d.ts +191 -0
  97. package/{api/resources/entities → dist/api/resources/sourceConnections}/client/Client.js +179 -178
  98. package/dist/api/resources/sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.d.ts +10 -0
  99. package/dist/api/resources/sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.d.ts +10 -0
  100. package/dist/api/resources/{sync/client/requests/ListSyncsSyncGetRequest.d.ts → sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.d.ts} +5 -2
  101. package/dist/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +17 -0
  102. package/dist/api/resources/sourceConnections/client/requests/index.d.ts +4 -0
  103. package/dist/api/resources/sources/client/Client.d.ts +4 -2
  104. package/dist/api/resources/sources/client/Client.js +11 -6
  105. package/dist/api/resources/whiteLabels/client/Client.d.ts +3 -47
  106. package/dist/api/resources/whiteLabels/client/Client.js +20 -170
  107. package/dist/api/types/ApiKey.d.ts +3 -3
  108. package/dist/api/types/ApiKeyCreate.d.ts +1 -0
  109. package/dist/api/{resources/connections/client/requests → types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -9
  110. package/dist/api/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +7 -0
  111. package/dist/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +8 -0
  112. package/{api/resources/connections/client/requests → dist/api/types}/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -7
  113. package/dist/api/types/Collection.d.ts +19 -0
  114. package/dist/api/types/CollectionStatus.d.ts +13 -0
  115. package/dist/api/types/CollectionStatus.js +12 -0
  116. package/dist/api/types/CollectionUpdate.d.ts +10 -0
  117. package/dist/api/types/CollectionUpdate.js +5 -0
  118. package/dist/api/types/ConfigValues.d.ts +9 -0
  119. package/dist/api/types/ConfigValues.js +5 -0
  120. package/dist/api/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +2 -2
  121. package/dist/api/types/DestinationWithAuthenticationFields.js +5 -0
  122. package/{api/types/EmbeddingModelWithConfigFields.d.ts → dist/api/types/EmbeddingModelWithAuthenticationFields.d.ts} +2 -2
  123. package/dist/api/types/EmbeddingModelWithAuthenticationFields.js +5 -0
  124. package/dist/api/types/EntityCount.d.ts +9 -0
  125. package/dist/api/types/EntityCount.js +5 -0
  126. package/dist/api/{resources/entities/client/requests → types}/EntityDefinitionCreate.d.ts +2 -9
  127. package/dist/api/types/EntityDefinitionCreate.js +5 -0
  128. package/dist/api/types/EntityDefinitionCreateEntitySchema.js +5 -0
  129. package/dist/api/{resources/entities/client/requests → types}/EntityDefinitionUpdate.d.ts +2 -9
  130. package/dist/api/types/EntityDefinitionUpdate.js +5 -0
  131. package/dist/api/types/EntityDefinitionUpdateEntitySchema.js +5 -0
  132. package/{api/resources/entities/client/requests → dist/api/types}/EntityRelationCreate.d.ts +1 -6
  133. package/dist/api/types/EntityRelationCreate.js +5 -0
  134. package/{api/resources/entities/client/requests → dist/api/types}/EntityRelationUpdate.d.ts +1 -6
  135. package/dist/api/types/EntityRelationUpdate.js +5 -0
  136. package/dist/api/types/Organization.d.ts +13 -0
  137. package/dist/api/types/Organization.js +5 -0
  138. package/dist/api/types/ResponseType.d.ts +11 -0
  139. package/dist/api/types/ResponseType.js +10 -0
  140. package/dist/api/types/SearchResponse.d.ts +13 -0
  141. package/dist/api/types/SearchResponse.js +5 -0
  142. package/dist/api/types/SearchStatus.d.ts +12 -0
  143. package/dist/api/types/SearchStatus.js +11 -0
  144. package/dist/api/types/SourceConnection.d.ts +31 -0
  145. package/dist/api/types/SourceConnection.js +5 -0
  146. package/dist/api/types/SourceConnectionAuthFields.d.ts +5 -0
  147. package/dist/api/types/SourceConnectionAuthFields.js +5 -0
  148. package/dist/api/types/SourceConnectionCreate.d.ts +21 -0
  149. package/dist/api/types/SourceConnectionCreate.js +5 -0
  150. package/dist/api/types/SourceConnectionJob.d.ts +30 -0
  151. package/dist/api/types/SourceConnectionJob.js +5 -0
  152. package/dist/api/types/SourceConnectionListItem.d.ts +21 -0
  153. package/dist/api/types/SourceConnectionListItem.js +5 -0
  154. package/dist/api/types/SourceConnectionStatus.d.ts +12 -0
  155. package/dist/api/types/SourceConnectionStatus.js +11 -0
  156. package/dist/api/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +2 -2
  157. package/dist/api/types/SourceWithAuthenticationFields.js +5 -0
  158. package/{api/resources/sync/client/requests → dist/api/types}/SyncCreate.d.ts +2 -7
  159. package/dist/api/types/SyncCreate.js +5 -0
  160. package/dist/api/types/SyncDagCreate.d.ts +14 -0
  161. package/dist/api/types/SyncDagCreate.js +5 -0
  162. package/dist/api/{resources/dag/client/requests → types}/SyncDagUpdate.d.ts +3 -7
  163. package/dist/api/types/SyncDagUpdate.js +5 -0
  164. package/dist/api/types/SyncJob.d.ts +6 -4
  165. package/dist/api/{resources/sync/client/requests → types}/SyncUpdate.d.ts +2 -3
  166. package/dist/api/types/SyncUpdate.js +5 -0
  167. package/{api/resources/transformers/client/requests → dist/api/types}/TransformerCreate.d.ts +1 -8
  168. package/dist/api/types/TransformerCreate.js +5 -0
  169. package/dist/api/{resources/transformers/client/requests → types}/TransformerUpdate.d.ts +1 -8
  170. package/dist/api/types/TransformerUpdate.js +5 -0
  171. package/dist/api/types/User.d.ts +1 -1
  172. package/dist/api/types/UserCreate.d.ts +11 -0
  173. package/dist/api/types/UserCreate.js +5 -0
  174. package/dist/api/types/index.d.ts +35 -4
  175. package/dist/api/types/index.js +35 -4
  176. package/dist/core/auth/BasicAuth.d.ts +8 -0
  177. package/dist/core/auth/BasicAuth.js +26 -0
  178. package/dist/core/auth/BearerToken.d.ts +5 -0
  179. package/dist/core/auth/BearerToken.js +15 -0
  180. package/dist/core/auth/index.d.ts +2 -0
  181. package/dist/core/auth/index.js +7 -0
  182. package/dist/core/index.d.ts +1 -0
  183. package/dist/core/index.js +1 -0
  184. package/dist/serialization/index.d.ts +1 -1
  185. package/dist/serialization/index.js +1 -1
  186. package/dist/serialization/resources/collections/client/index.d.ts +3 -0
  187. package/dist/serialization/resources/{transformers → collections}/client/index.js +3 -2
  188. package/{serialization/resources/sync/client/listAllJobs.d.ts → dist/serialization/resources/collections/client/listCollections.d.ts} +3 -3
  189. package/{serialization/resources/connections/client/listConnectedIntegrations.js → dist/serialization/resources/collections/client/listCollections.js} +2 -2
  190. package/dist/serialization/resources/{destinations/client/listDestinations.d.ts → collections/client/refreshAllSourceConnections.d.ts} +3 -3
  191. package/dist/serialization/resources/{connections/client/getOauth2WhiteLabelAuthUrl.js → collections/client/refreshAllSourceConnections.js} +2 -1
  192. package/dist/serialization/resources/collections/client/requests/CollectionCreate.d.ts +13 -0
  193. package/dist/serialization/resources/collections/client/requests/CollectionCreate.js +44 -0
  194. package/dist/serialization/resources/collections/client/requests/index.d.ts +1 -0
  195. package/dist/serialization/resources/collections/client/requests/index.js +5 -0
  196. package/dist/serialization/resources/connections/client/index.d.ts +0 -6
  197. package/dist/serialization/resources/connections/client/index.js +1 -10
  198. package/dist/serialization/resources/index.d.ts +4 -13
  199. package/dist/serialization/resources/index.js +5 -14
  200. package/dist/serialization/resources/sourceConnections/client/index.d.ts +3 -0
  201. package/{serialization/resources/transformers → dist/serialization/resources/sourceConnections}/client/index.js +3 -2
  202. package/dist/serialization/resources/{entities/client/getEntityDefinitionsBySourceShortName.d.ts → sourceConnections/client/listSourceConnectionJobs.d.ts} +3 -3
  203. package/dist/serialization/resources/{connections/client/getConnectionCredentials.js → sourceConnections/client/listSourceConnectionJobs.js} +2 -1
  204. package/dist/serialization/resources/sourceConnections/client/listSourceConnections.d.ts +11 -0
  205. package/dist/serialization/resources/sourceConnections/client/listSourceConnections.js +42 -0
  206. package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +18 -0
  207. package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +49 -0
  208. package/dist/serialization/resources/sourceConnections/client/requests/index.d.ts +1 -0
  209. package/dist/serialization/resources/sourceConnections/client/requests/index.js +5 -0
  210. package/dist/serialization/resources/whiteLabels/client/index.d.ts +0 -2
  211. package/dist/serialization/resources/whiteLabels/client/index.js +1 -3
  212. package/dist/serialization/types/ApiKey.d.ts +2 -2
  213. package/dist/serialization/types/ApiKey.js +2 -2
  214. package/dist/serialization/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +13 -0
  215. package/dist/serialization/{resources/connections/client/requests → types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +2 -2
  216. package/dist/serialization/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
  217. package/dist/serialization/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js +44 -0
  218. package/dist/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +14 -0
  219. package/dist/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js +45 -0
  220. package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +15 -0
  221. package/{serialization/resources/connections/client/requests → dist/serialization/types}/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +3 -1
  222. package/dist/serialization/types/{ApiKeyWithPlainKey.d.ts → Collection.d.ts} +7 -7
  223. package/dist/serialization/types/{ApiKeyWithPlainKey.js → Collection.js} +7 -7
  224. package/dist/serialization/types/CollectionStatus.d.ts +10 -0
  225. package/dist/serialization/types/CollectionStatus.js +41 -0
  226. package/dist/serialization/types/CollectionUpdate.d.ts +12 -0
  227. package/dist/serialization/types/CollectionUpdate.js +43 -0
  228. package/dist/serialization/types/ConfigValues.d.ts +10 -0
  229. package/dist/serialization/types/ConfigValues.js +41 -0
  230. package/{serialization/types/DestinationWithConfigFields.d.ts → dist/serialization/types/DestinationWithAuthenticationFields.d.ts} +3 -3
  231. package/dist/serialization/types/{DestinationWithConfigFields.js → DestinationWithAuthenticationFields.js} +3 -3
  232. package/{serialization/types/EmbeddingModelWithConfigFields.d.ts → dist/serialization/types/EmbeddingModelWithAuthenticationFields.d.ts} +3 -3
  233. package/dist/serialization/types/{EmbeddingModelWithConfigFields.js → EmbeddingModelWithAuthenticationFields.js} +3 -3
  234. package/dist/serialization/types/EntityCount.d.ts +12 -0
  235. package/dist/serialization/{resources/connections/client/sendOauth2WhiteLabelCode.js → types/EntityCount.js} +5 -3
  236. package/{serialization/resources/entities/client/requests → dist/serialization/types}/EntityDefinitionCreate.d.ts +6 -6
  237. package/dist/serialization/{resources/entities/client/requests → types}/EntityDefinitionCreate.js +3 -3
  238. package/dist/serialization/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.d.ts +3 -3
  239. package/dist/serialization/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.js +1 -1
  240. package/dist/serialization/{resources/entities/client/requests → types}/EntityDefinitionUpdate.d.ts +6 -6
  241. package/dist/serialization/{resources/entities/client/requests → types}/EntityDefinitionUpdate.js +3 -3
  242. package/{serialization/resources/entities → dist/serialization}/types/EntityDefinitionUpdateEntitySchema.d.ts +3 -3
  243. package/dist/serialization/{resources/entities/types → types}/EntityDefinitionUpdateEntitySchema.js +1 -1
  244. package/dist/serialization/types/EntityRelationCreate.d.ts +15 -0
  245. package/{serialization/resources/entities/client/requests → dist/serialization/types}/EntityRelationCreate.js +1 -1
  246. package/dist/serialization/types/EntityRelationUpdate.d.ts +15 -0
  247. package/dist/serialization/{resources/entities/client/requests → types}/EntityRelationUpdate.js +1 -1
  248. package/dist/serialization/types/Organization.d.ts +16 -0
  249. package/dist/serialization/types/Organization.js +47 -0
  250. package/dist/serialization/types/ResponseType.d.ts +10 -0
  251. package/dist/serialization/{resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js → types/ResponseType.js} +3 -3
  252. package/dist/serialization/types/SearchResponse.d.ts +17 -0
  253. package/dist/serialization/types/SearchResponse.js +48 -0
  254. package/dist/serialization/types/SearchStatus.d.ts +10 -0
  255. package/dist/serialization/types/SearchStatus.js +41 -0
  256. package/dist/serialization/types/SourceConnection.d.ts +36 -0
  257. package/dist/serialization/types/SourceConnection.js +67 -0
  258. package/dist/serialization/types/SourceConnectionAuthFields.d.ts +11 -0
  259. package/dist/serialization/types/SourceConnectionAuthFields.js +42 -0
  260. package/dist/serialization/types/SourceConnectionCreate.d.ts +20 -0
  261. package/dist/serialization/types/SourceConnectionCreate.js +51 -0
  262. package/dist/serialization/types/SourceConnectionJob.d.ts +30 -0
  263. package/dist/serialization/types/SourceConnectionJob.js +61 -0
  264. package/dist/serialization/types/SourceConnectionListItem.d.ts +21 -0
  265. package/dist/serialization/types/SourceConnectionListItem.js +52 -0
  266. package/dist/serialization/types/SourceConnectionStatus.d.ts +10 -0
  267. package/dist/serialization/types/SourceConnectionStatus.js +41 -0
  268. package/{serialization/types/SourceWithConfigFields.d.ts → dist/serialization/types/SourceWithAuthenticationFields.d.ts} +3 -3
  269. package/dist/serialization/types/{SourceWithConfigFields.js → SourceWithAuthenticationFields.js} +3 -3
  270. package/dist/serialization/{resources/sync/client/requests → types}/SyncCreate.d.ts +5 -5
  271. package/dist/serialization/{resources/sync/client/requests → types}/SyncCreate.js +2 -2
  272. package/dist/serialization/types/SyncDagCreate.d.ts +18 -0
  273. package/{serialization/resources/dag/client/requests → dist/serialization/types}/SyncDagCreate.js +4 -4
  274. package/dist/serialization/types/SyncDagUpdate.d.ts +18 -0
  275. package/{serialization/resources/dag/client/requests → dist/serialization/types}/SyncDagUpdate.js +4 -4
  276. package/dist/serialization/types/SyncJob.d.ts +6 -4
  277. package/dist/serialization/types/SyncJob.js +6 -4
  278. package/dist/serialization/{resources/sync/client/requests → types}/SyncUpdate.d.ts +5 -5
  279. package/dist/serialization/{resources/sync/client/requests → types}/SyncUpdate.js +2 -2
  280. package/dist/serialization/{resources/transformers/client/requests → types}/TransformerCreate.d.ts +4 -4
  281. package/{serialization/resources/transformers/client/requests → dist/serialization/types}/TransformerCreate.js +1 -1
  282. package/dist/serialization/{resources/transformers/client/requests → types}/TransformerUpdate.d.ts +4 -4
  283. package/{serialization/resources/transformers/client/requests → dist/serialization/types}/TransformerUpdate.js +1 -1
  284. package/dist/serialization/types/User.d.ts +1 -1
  285. package/dist/serialization/types/User.js +1 -1
  286. package/dist/serialization/types/UserCreate.d.ts +14 -0
  287. package/dist/serialization/types/UserCreate.js +45 -0
  288. package/dist/serialization/types/index.d.ts +35 -4
  289. package/dist/serialization/types/index.js +35 -4
  290. package/dist/version.d.ts +1 -1
  291. package/dist/version.js +1 -1
  292. package/package.json +3 -2
  293. package/reference.md +268 -2521
  294. package/serialization/index.d.ts +1 -1
  295. package/serialization/index.js +1 -1
  296. package/serialization/resources/collections/client/index.d.ts +3 -0
  297. package/serialization/resources/{sync → collections}/client/index.js +3 -3
  298. package/{dist/serialization/resources/sync/client/listAllJobs.d.ts → serialization/resources/collections/client/listCollections.d.ts} +3 -3
  299. package/{dist/serialization/resources/connections/client/listConnectedIntegrations.js → serialization/resources/collections/client/listCollections.js} +2 -2
  300. package/{dist/serialization/resources/embeddingModels/client/readEmbeddingModels.d.ts → serialization/resources/collections/client/refreshAllSourceConnections.d.ts} +3 -3
  301. package/serialization/resources/collections/client/refreshAllSourceConnections.js +42 -0
  302. package/serialization/resources/collections/client/requests/CollectionCreate.d.ts +13 -0
  303. package/serialization/resources/collections/client/requests/CollectionCreate.js +44 -0
  304. package/serialization/resources/collections/client/requests/index.d.ts +1 -0
  305. package/serialization/resources/collections/client/requests/index.js +5 -0
  306. package/serialization/resources/connections/client/index.d.ts +0 -6
  307. package/serialization/resources/connections/client/index.js +1 -10
  308. package/serialization/resources/index.d.ts +4 -13
  309. package/serialization/resources/index.js +5 -14
  310. package/serialization/resources/sourceConnections/client/index.d.ts +3 -0
  311. package/{dist/serialization/resources/sync → serialization/resources/sourceConnections}/client/index.js +3 -3
  312. package/{dist/serialization/resources/connections/client/listConnectedIntegrations.d.ts → serialization/resources/sourceConnections/client/listSourceConnectionJobs.d.ts} +3 -3
  313. package/serialization/resources/sourceConnections/client/listSourceConnectionJobs.js +42 -0
  314. package/serialization/resources/sourceConnections/client/listSourceConnections.d.ts +11 -0
  315. package/serialization/resources/sourceConnections/client/listSourceConnections.js +42 -0
  316. package/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +18 -0
  317. package/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +49 -0
  318. package/serialization/resources/sourceConnections/client/requests/index.d.ts +1 -0
  319. package/serialization/resources/sourceConnections/client/requests/index.js +5 -0
  320. package/serialization/resources/whiteLabels/client/index.d.ts +0 -2
  321. package/serialization/resources/whiteLabels/client/index.js +1 -3
  322. package/serialization/types/ApiKey.d.ts +2 -2
  323. package/serialization/types/ApiKey.js +2 -2
  324. package/serialization/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +13 -0
  325. package/serialization/{resources/connections/client/requests → types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +2 -2
  326. package/serialization/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
  327. package/serialization/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js +44 -0
  328. package/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +14 -0
  329. package/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js +45 -0
  330. package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +15 -0
  331. package/{dist/serialization/resources/connections/client/requests → serialization/types}/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +3 -1
  332. package/serialization/types/{ApiKeyWithPlainKey.d.ts → Collection.d.ts} +7 -7
  333. package/serialization/types/{ApiKeyWithPlainKey.js → Collection.js} +7 -7
  334. package/serialization/types/CollectionStatus.d.ts +10 -0
  335. package/serialization/types/CollectionStatus.js +41 -0
  336. package/serialization/types/CollectionUpdate.d.ts +12 -0
  337. package/serialization/types/CollectionUpdate.js +43 -0
  338. package/serialization/types/ConfigValues.d.ts +10 -0
  339. package/serialization/types/ConfigValues.js +41 -0
  340. package/{dist/serialization/types/DestinationWithConfigFields.d.ts → serialization/types/DestinationWithAuthenticationFields.d.ts} +3 -3
  341. package/serialization/types/{DestinationWithConfigFields.js → DestinationWithAuthenticationFields.js} +3 -3
  342. package/{dist/serialization/types/EmbeddingModelWithConfigFields.d.ts → serialization/types/EmbeddingModelWithAuthenticationFields.d.ts} +3 -3
  343. package/serialization/types/{EmbeddingModelWithConfigFields.js → EmbeddingModelWithAuthenticationFields.js} +3 -3
  344. package/serialization/types/EntityCount.d.ts +12 -0
  345. package/serialization/types/EntityCount.js +43 -0
  346. package/{dist/serialization/resources/entities/client/requests → serialization/types}/EntityDefinitionCreate.d.ts +6 -6
  347. package/serialization/{resources/entities/client/requests → types}/EntityDefinitionCreate.js +3 -3
  348. package/serialization/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.d.ts +3 -3
  349. package/serialization/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.js +1 -1
  350. package/serialization/{resources/entities/client/requests → types}/EntityDefinitionUpdate.d.ts +6 -6
  351. package/serialization/{resources/entities/client/requests → types}/EntityDefinitionUpdate.js +3 -3
  352. package/{dist/serialization/resources/entities → serialization}/types/EntityDefinitionUpdateEntitySchema.d.ts +3 -3
  353. package/serialization/{resources/entities/types → types}/EntityDefinitionUpdateEntitySchema.js +1 -1
  354. package/serialization/types/EntityRelationCreate.d.ts +15 -0
  355. package/{dist/serialization/resources/entities/client/requests → serialization/types}/EntityRelationCreate.js +1 -1
  356. package/serialization/types/EntityRelationUpdate.d.ts +15 -0
  357. package/serialization/{resources/entities/client/requests → types}/EntityRelationUpdate.js +1 -1
  358. package/serialization/types/Organization.d.ts +16 -0
  359. package/serialization/types/Organization.js +47 -0
  360. package/serialization/types/ResponseType.d.ts +10 -0
  361. package/{dist/serialization/resources/connections/client/getOauth2AuthUrl.js → serialization/types/ResponseType.js} +3 -3
  362. package/serialization/types/SearchResponse.d.ts +17 -0
  363. package/serialization/types/SearchResponse.js +48 -0
  364. package/serialization/types/SearchStatus.d.ts +10 -0
  365. package/serialization/types/SearchStatus.js +41 -0
  366. package/serialization/types/SourceConnection.d.ts +36 -0
  367. package/serialization/types/SourceConnection.js +67 -0
  368. package/serialization/types/SourceConnectionAuthFields.d.ts +11 -0
  369. package/serialization/types/SourceConnectionAuthFields.js +42 -0
  370. package/serialization/types/SourceConnectionCreate.d.ts +20 -0
  371. package/serialization/types/SourceConnectionCreate.js +51 -0
  372. package/serialization/types/SourceConnectionJob.d.ts +30 -0
  373. package/serialization/types/SourceConnectionJob.js +61 -0
  374. package/serialization/types/SourceConnectionListItem.d.ts +21 -0
  375. package/serialization/types/SourceConnectionListItem.js +52 -0
  376. package/serialization/types/SourceConnectionStatus.d.ts +10 -0
  377. package/serialization/types/SourceConnectionStatus.js +41 -0
  378. package/{dist/serialization/types/SourceWithConfigFields.d.ts → serialization/types/SourceWithAuthenticationFields.d.ts} +3 -3
  379. package/serialization/types/{SourceWithConfigFields.js → SourceWithAuthenticationFields.js} +3 -3
  380. package/serialization/{resources/sync/client/requests → types}/SyncCreate.d.ts +5 -5
  381. package/serialization/{resources/sync/client/requests → types}/SyncCreate.js +2 -2
  382. package/serialization/types/SyncDagCreate.d.ts +18 -0
  383. package/{dist/serialization/resources/dag/client/requests → serialization/types}/SyncDagCreate.js +4 -4
  384. package/serialization/types/SyncDagUpdate.d.ts +18 -0
  385. package/{dist/serialization/resources/dag/client/requests → serialization/types}/SyncDagUpdate.js +4 -4
  386. package/serialization/types/SyncJob.d.ts +6 -4
  387. package/serialization/types/SyncJob.js +6 -4
  388. package/serialization/{resources/sync/client/requests → types}/SyncUpdate.d.ts +5 -5
  389. package/serialization/{resources/sync/client/requests → types}/SyncUpdate.js +2 -2
  390. package/serialization/{resources/transformers/client/requests → types}/TransformerCreate.d.ts +4 -4
  391. package/{dist/serialization/resources/transformers/client/requests → serialization/types}/TransformerCreate.js +1 -1
  392. package/serialization/{resources/transformers/client/requests → types}/TransformerUpdate.d.ts +4 -4
  393. package/{dist/serialization/resources/transformers/client/requests → serialization/types}/TransformerUpdate.js +1 -1
  394. package/serialization/types/User.d.ts +1 -1
  395. package/serialization/types/User.js +1 -1
  396. package/serialization/types/UserCreate.d.ts +14 -0
  397. package/serialization/types/UserCreate.js +45 -0
  398. package/serialization/types/index.d.ts +35 -4
  399. package/serialization/types/index.js +35 -4
  400. package/version.d.ts +1 -1
  401. package/version.js +1 -1
  402. package/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.d.ts +0 -12
  403. package/api/resources/connections/client/requests/index.d.ts +0 -3
  404. package/api/resources/dag/client/Client.d.ts +0 -95
  405. package/api/resources/dag/client/requests/InitializeDagDagInitGetRequest.d.ts +0 -12
  406. package/api/resources/dag/client/requests/SyncDagCreate.d.ts +0 -26
  407. package/api/resources/dag/client/requests/index.d.ts +0 -3
  408. package/api/resources/destinations/client/Client.d.ts +0 -71
  409. package/api/resources/destinations/client/Client.js +0 -211
  410. package/api/resources/destinations/client/index.d.ts +0 -1
  411. package/api/resources/embeddingModels/client/Client.d.ts +0 -71
  412. package/api/resources/embeddingModels/client/Client.js +0 -211
  413. package/api/resources/embeddingModels/client/index.d.ts +0 -1
  414. package/api/resources/entities/client/Client.d.ts +0 -155
  415. package/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +0 -12
  416. package/api/resources/entities/client/requests/index.d.ts +0 -5
  417. package/api/resources/entities/client/requests/index.js +0 -2
  418. package/api/resources/entities/index.d.ts +0 -2
  419. package/api/resources/entities/index.js +0 -18
  420. package/api/resources/entities/types/index.d.ts +0 -2
  421. package/api/resources/entities/types/index.js +0 -18
  422. package/api/resources/sync/client/Client.d.ts +0 -275
  423. package/api/resources/sync/client/Client.js +0 -916
  424. package/api/resources/sync/client/requests/index.d.ts +0 -5
  425. package/api/resources/sync/client/requests/index.js +0 -2
  426. package/api/resources/sync/index.d.ts +0 -2
  427. package/api/resources/sync/index.js +0 -18
  428. package/api/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -5
  429. package/api/resources/sync/types/index.d.ts +0 -1
  430. package/api/resources/sync/types/index.js +0 -17
  431. package/api/resources/transformers/client/Client.d.ts +0 -77
  432. package/api/resources/transformers/client/Client.js +0 -272
  433. package/api/resources/transformers/client/requests/index.d.ts +0 -2
  434. package/api/resources/transformers/client/requests/index.js +0 -2
  435. package/api/resources/users/client/Client.d.ts +0 -48
  436. package/api/resources/users/client/Client.js +0 -135
  437. package/api/resources/users/client/index.d.ts +0 -1
  438. package/api/resources/users/client/index.js +0 -2
  439. package/api/types/ApiKeyWithPlainKey.d.ts +0 -18
  440. package/dist/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.d.ts +0 -12
  441. package/dist/api/resources/connections/client/requests/index.d.ts +0 -3
  442. package/dist/api/resources/connections/client/requests/index.js +0 -2
  443. package/dist/api/resources/dag/client/Client.d.ts +0 -95
  444. package/dist/api/resources/dag/client/index.d.ts +0 -1
  445. package/dist/api/resources/dag/client/index.js +0 -17
  446. package/dist/api/resources/dag/client/requests/InitializeDagDagInitGetRequest.d.ts +0 -12
  447. package/dist/api/resources/dag/client/requests/SyncDagCreate.d.ts +0 -26
  448. package/dist/api/resources/dag/client/requests/index.d.ts +0 -3
  449. package/dist/api/resources/dag/client/requests/index.js +0 -2
  450. package/dist/api/resources/destinations/client/Client.d.ts +0 -71
  451. package/dist/api/resources/destinations/client/Client.js +0 -211
  452. package/dist/api/resources/destinations/client/index.d.ts +0 -1
  453. package/dist/api/resources/destinations/client/index.js +0 -2
  454. package/dist/api/resources/embeddingModels/client/Client.d.ts +0 -71
  455. package/dist/api/resources/embeddingModels/client/Client.js +0 -211
  456. package/dist/api/resources/embeddingModels/client/index.d.ts +0 -1
  457. package/dist/api/resources/embeddingModels/client/index.js +0 -2
  458. package/dist/api/resources/entities/client/Client.d.ts +0 -155
  459. package/dist/api/resources/entities/client/index.d.ts +0 -1
  460. package/dist/api/resources/entities/client/index.js +0 -17
  461. package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +0 -12
  462. package/dist/api/resources/entities/client/requests/index.d.ts +0 -5
  463. package/dist/api/resources/entities/client/requests/index.js +0 -2
  464. package/dist/api/resources/entities/index.d.ts +0 -2
  465. package/dist/api/resources/entities/index.js +0 -18
  466. package/dist/api/resources/entities/types/index.d.ts +0 -2
  467. package/dist/api/resources/entities/types/index.js +0 -18
  468. package/dist/api/resources/sync/client/Client.d.ts +0 -275
  469. package/dist/api/resources/sync/client/Client.js +0 -916
  470. package/dist/api/resources/sync/client/index.d.ts +0 -1
  471. package/dist/api/resources/sync/client/index.js +0 -17
  472. package/dist/api/resources/sync/client/requests/index.d.ts +0 -5
  473. package/dist/api/resources/sync/client/requests/index.js +0 -2
  474. package/dist/api/resources/sync/index.d.ts +0 -2
  475. package/dist/api/resources/sync/index.js +0 -18
  476. package/dist/api/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -5
  477. package/dist/api/resources/sync/types/index.d.ts +0 -1
  478. package/dist/api/resources/sync/types/index.js +0 -17
  479. package/dist/api/resources/transformers/client/Client.d.ts +0 -77
  480. package/dist/api/resources/transformers/client/Client.js +0 -272
  481. package/dist/api/resources/transformers/client/index.d.ts +0 -1
  482. package/dist/api/resources/transformers/client/index.js +0 -17
  483. package/dist/api/resources/transformers/client/requests/index.d.ts +0 -2
  484. package/dist/api/resources/transformers/client/requests/index.js +0 -2
  485. package/dist/api/resources/transformers/index.d.ts +0 -1
  486. package/dist/api/resources/transformers/index.js +0 -17
  487. package/dist/api/resources/users/client/Client.d.ts +0 -48
  488. package/dist/api/resources/users/client/Client.js +0 -135
  489. package/dist/api/resources/users/client/index.d.ts +0 -1
  490. package/dist/api/resources/users/client/index.js +0 -2
  491. package/dist/api/resources/users/index.d.ts +0 -1
  492. package/dist/api/resources/users/index.js +0 -17
  493. package/dist/api/types/ApiKeyWithPlainKey.d.ts +0 -18
  494. package/dist/serialization/resources/connections/client/getConnectionCredentials.d.ts +0 -9
  495. package/dist/serialization/resources/connections/client/getOauth2AuthUrl.d.ts +0 -9
  496. package/dist/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +0 -9
  497. package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
  498. package/dist/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -13
  499. package/dist/serialization/resources/connections/client/requests/index.d.ts +0 -2
  500. package/dist/serialization/resources/connections/client/requests/index.js +0 -7
  501. package/dist/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +0 -9
  502. package/dist/serialization/resources/dag/client/index.d.ts +0 -1
  503. package/dist/serialization/resources/dag/client/index.js +0 -17
  504. package/dist/serialization/resources/dag/client/requests/SyncDagCreate.d.ts +0 -18
  505. package/dist/serialization/resources/dag/client/requests/SyncDagUpdate.d.ts +0 -18
  506. package/dist/serialization/resources/dag/client/requests/index.d.ts +0 -2
  507. package/dist/serialization/resources/dag/client/requests/index.js +0 -7
  508. package/dist/serialization/resources/dag/index.d.ts +0 -1
  509. package/dist/serialization/resources/dag/index.js +0 -17
  510. package/dist/serialization/resources/destinations/client/index.d.ts +0 -1
  511. package/dist/serialization/resources/destinations/client/index.js +0 -37
  512. package/dist/serialization/resources/destinations/client/listDestinations.js +0 -42
  513. package/dist/serialization/resources/destinations/index.d.ts +0 -1
  514. package/dist/serialization/resources/destinations/index.js +0 -17
  515. package/dist/serialization/resources/embeddingModels/client/index.d.ts +0 -1
  516. package/dist/serialization/resources/embeddingModels/client/index.js +0 -37
  517. package/dist/serialization/resources/embeddingModels/client/readEmbeddingModels.js +0 -42
  518. package/dist/serialization/resources/embeddingModels/index.d.ts +0 -1
  519. package/dist/serialization/resources/embeddingModels/index.js +0 -17
  520. package/dist/serialization/resources/entities/client/getEntityDefinitionsByIds.d.ts +0 -15
  521. package/dist/serialization/resources/entities/client/getEntityDefinitionsByIds.js +0 -43
  522. package/dist/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +0 -42
  523. package/dist/serialization/resources/entities/client/index.d.ts +0 -5
  524. package/dist/serialization/resources/entities/client/index.js +0 -44
  525. package/dist/serialization/resources/entities/client/listEntityDefinitions.d.ts +0 -11
  526. package/dist/serialization/resources/entities/client/listEntityDefinitions.js +0 -42
  527. package/dist/serialization/resources/entities/client/listEntityRelations.d.ts +0 -11
  528. package/dist/serialization/resources/entities/client/listEntityRelations.js +0 -42
  529. package/dist/serialization/resources/entities/client/requests/EntityRelationCreate.d.ts +0 -15
  530. package/dist/serialization/resources/entities/client/requests/EntityRelationUpdate.d.ts +0 -15
  531. package/dist/serialization/resources/entities/client/requests/index.d.ts +0 -4
  532. package/dist/serialization/resources/entities/client/requests/index.js +0 -11
  533. package/dist/serialization/resources/entities/index.d.ts +0 -2
  534. package/dist/serialization/resources/entities/index.js +0 -18
  535. package/dist/serialization/resources/entities/types/index.d.ts +0 -2
  536. package/dist/serialization/resources/entities/types/index.js +0 -18
  537. package/dist/serialization/resources/sync/client/index.d.ts +0 -3
  538. package/dist/serialization/resources/sync/client/listAllJobs.js +0 -42
  539. package/dist/serialization/resources/sync/client/listSyncJobs.d.ts +0 -11
  540. package/dist/serialization/resources/sync/client/listSyncJobs.js +0 -42
  541. package/dist/serialization/resources/sync/client/requests/index.d.ts +0 -2
  542. package/dist/serialization/resources/sync/client/requests/index.js +0 -7
  543. package/dist/serialization/resources/sync/index.d.ts +0 -2
  544. package/dist/serialization/resources/sync/index.js +0 -18
  545. package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -12
  546. package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +0 -46
  547. package/dist/serialization/resources/sync/types/index.d.ts +0 -1
  548. package/dist/serialization/resources/sync/types/index.js +0 -17
  549. package/dist/serialization/resources/transformers/client/index.d.ts +0 -2
  550. package/dist/serialization/resources/transformers/client/listTransformers.d.ts +0 -11
  551. package/dist/serialization/resources/transformers/client/listTransformers.js +0 -42
  552. package/dist/serialization/resources/transformers/client/requests/index.d.ts +0 -2
  553. package/dist/serialization/resources/transformers/client/requests/index.js +0 -7
  554. package/dist/serialization/resources/transformers/index.d.ts +0 -1
  555. package/dist/serialization/resources/transformers/index.js +0 -17
  556. package/dist/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +0 -9
  557. package/dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +0 -9
  558. package/dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js +0 -41
  559. package/serialization/resources/connections/client/getConnectionCredentials.d.ts +0 -9
  560. package/serialization/resources/connections/client/getConnectionCredentials.js +0 -41
  561. package/serialization/resources/connections/client/getOauth2AuthUrl.d.ts +0 -9
  562. package/serialization/resources/connections/client/getOauth2AuthUrl.js +0 -41
  563. package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +0 -9
  564. package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.js +0 -41
  565. package/serialization/resources/connections/client/listConnectedIntegrations.d.ts +0 -11
  566. package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
  567. package/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -13
  568. package/serialization/resources/connections/client/requests/index.d.ts +0 -2
  569. package/serialization/resources/connections/client/requests/index.js +0 -7
  570. package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +0 -9
  571. package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.js +0 -41
  572. package/serialization/resources/dag/client/index.d.ts +0 -1
  573. package/serialization/resources/dag/client/index.js +0 -17
  574. package/serialization/resources/dag/client/requests/SyncDagCreate.d.ts +0 -18
  575. package/serialization/resources/dag/client/requests/SyncDagUpdate.d.ts +0 -18
  576. package/serialization/resources/dag/client/requests/index.d.ts +0 -2
  577. package/serialization/resources/dag/client/requests/index.js +0 -7
  578. package/serialization/resources/dag/index.d.ts +0 -1
  579. package/serialization/resources/dag/index.js +0 -17
  580. package/serialization/resources/destinations/client/index.d.ts +0 -1
  581. package/serialization/resources/destinations/client/index.js +0 -37
  582. package/serialization/resources/destinations/client/listDestinations.d.ts +0 -11
  583. package/serialization/resources/destinations/client/listDestinations.js +0 -42
  584. package/serialization/resources/destinations/index.d.ts +0 -1
  585. package/serialization/resources/destinations/index.js +0 -17
  586. package/serialization/resources/embeddingModels/client/index.d.ts +0 -1
  587. package/serialization/resources/embeddingModels/client/index.js +0 -37
  588. package/serialization/resources/embeddingModels/client/readEmbeddingModels.d.ts +0 -11
  589. package/serialization/resources/embeddingModels/client/readEmbeddingModels.js +0 -42
  590. package/serialization/resources/embeddingModels/index.d.ts +0 -1
  591. package/serialization/resources/embeddingModels/index.js +0 -17
  592. package/serialization/resources/entities/client/getEntityDefinitionsByIds.d.ts +0 -15
  593. package/serialization/resources/entities/client/getEntityDefinitionsByIds.js +0 -43
  594. package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.d.ts +0 -11
  595. package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +0 -42
  596. package/serialization/resources/entities/client/index.d.ts +0 -5
  597. package/serialization/resources/entities/client/index.js +0 -44
  598. package/serialization/resources/entities/client/listEntityDefinitions.d.ts +0 -11
  599. package/serialization/resources/entities/client/listEntityDefinitions.js +0 -42
  600. package/serialization/resources/entities/client/listEntityRelations.d.ts +0 -11
  601. package/serialization/resources/entities/client/listEntityRelations.js +0 -42
  602. package/serialization/resources/entities/client/requests/EntityRelationCreate.d.ts +0 -15
  603. package/serialization/resources/entities/client/requests/EntityRelationUpdate.d.ts +0 -15
  604. package/serialization/resources/entities/client/requests/index.d.ts +0 -4
  605. package/serialization/resources/entities/client/requests/index.js +0 -11
  606. package/serialization/resources/entities/index.d.ts +0 -2
  607. package/serialization/resources/entities/index.js +0 -18
  608. package/serialization/resources/entities/types/index.d.ts +0 -2
  609. package/serialization/resources/entities/types/index.js +0 -18
  610. package/serialization/resources/sync/client/index.d.ts +0 -3
  611. package/serialization/resources/sync/client/listAllJobs.js +0 -42
  612. package/serialization/resources/sync/client/listSyncJobs.d.ts +0 -11
  613. package/serialization/resources/sync/client/listSyncJobs.js +0 -42
  614. package/serialization/resources/sync/client/requests/index.d.ts +0 -2
  615. package/serialization/resources/sync/client/requests/index.js +0 -7
  616. package/serialization/resources/sync/index.d.ts +0 -2
  617. package/serialization/resources/sync/index.js +0 -18
  618. package/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -12
  619. package/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +0 -46
  620. package/serialization/resources/sync/types/index.d.ts +0 -1
  621. package/serialization/resources/sync/types/index.js +0 -17
  622. package/serialization/resources/transformers/client/index.d.ts +0 -2
  623. package/serialization/resources/transformers/client/listTransformers.d.ts +0 -11
  624. package/serialization/resources/transformers/client/listTransformers.js +0 -42
  625. package/serialization/resources/transformers/client/requests/index.d.ts +0 -2
  626. package/serialization/resources/transformers/client/requests/index.js +0 -7
  627. package/serialization/resources/transformers/index.d.ts +0 -1
  628. package/serialization/resources/transformers/index.js +0 -17
  629. package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +0 -9
  630. package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js +0 -41
  631. package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +0 -9
  632. package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js +0 -41
  633. /package/api/resources/{dag → collections}/client/index.d.ts +0 -0
  634. /package/api/resources/{dag → collections}/client/index.js +0 -0
  635. /package/api/resources/{connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → collections/client/requests/CollectionCreate.js} +0 -0
  636. /package/api/resources/{connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.js} +0 -0
  637. /package/api/resources/{connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.js → collections/client/requests/ListCollectionsCollectionsGetRequest.js} +0 -0
  638. /package/api/resources/{connections → collections}/client/requests/index.js +0 -0
  639. /package/api/resources/{dag → collections}/index.d.ts +0 -0
  640. /package/api/resources/{dag → collections}/index.js +0 -0
  641. /package/api/resources/{entities → sourceConnections}/client/index.d.ts +0 -0
  642. /package/api/resources/{entities → sourceConnections}/client/index.js +0 -0
  643. /package/api/resources/{dag/client/requests/InitializeDagDagInitGetRequest.js → sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.js} +0 -0
  644. /package/api/resources/{dag/client/requests/SyncDagCreate.js → sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.js} +0 -0
  645. /package/api/resources/{dag/client/requests/SyncDagUpdate.js → sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.js} +0 -0
  646. /package/api/resources/{entities/client/requests/EntityDefinitionCreate.js → sourceConnections/client/requests/SourceConnectionUpdate.js} +0 -0
  647. /package/api/resources/{dag → sourceConnections}/client/requests/index.js +0 -0
  648. /package/api/resources/{destinations → sourceConnections}/index.d.ts +0 -0
  649. /package/api/resources/{destinations → sourceConnections}/index.js +0 -0
  650. /package/{dist/api/resources/connections/client/requests → api/types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +0 -0
  651. /package/api/{resources/entities/client/requests/EntityDefinitionUpdate.js → types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js} +0 -0
  652. /package/api/{resources/entities/client/requests/EntityRelationCreate.js → types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js} +0 -0
  653. /package/{dist/api/resources/connections/client/requests → api/types}/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +0 -0
  654. /package/api/{resources/entities/client/requests/EntityRelationUpdate.js → types/Collection.js} +0 -0
  655. /package/api/{resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js → types/CollectionUpdate.js} +0 -0
  656. /package/api/{resources/entities/types/EntityDefinitionCreateEntitySchema.js → types/ConfigValues.js} +0 -0
  657. /package/api/{resources/entities/types/EntityDefinitionUpdateEntitySchema.js → types/DestinationWithAuthenticationFields.js} +0 -0
  658. /package/api/{resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js → types/EmbeddingModelWithAuthenticationFields.js} +0 -0
  659. /package/api/{resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.js → types/EntityCount.js} +0 -0
  660. /package/{dist/api/resources/entities/client/requests → api/types}/EntityDefinitionCreate.js +0 -0
  661. /package/api/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.d.ts +0 -0
  662. /package/{dist/api/resources/entities → api}/types/EntityDefinitionCreateEntitySchema.js +0 -0
  663. /package/{dist/api/resources/entities/client/requests → api/types}/EntityDefinitionUpdate.js +0 -0
  664. /package/api/{resources/entities/types → types}/EntityDefinitionUpdateEntitySchema.d.ts +0 -0
  665. /package/{dist/api/resources/entities → api}/types/EntityDefinitionUpdateEntitySchema.js +0 -0
  666. /package/{dist/api/resources/entities/client/requests → api/types}/EntityRelationCreate.js +0 -0
  667. /package/{dist/api/resources/entities/client/requests → api/types}/EntityRelationUpdate.js +0 -0
  668. /package/api/{resources/sync/client/requests/ListSyncsSyncGetRequest.js → types/Organization.js} +0 -0
  669. /package/api/{resources/sync/client/requests/SyncCreate.js → types/SearchResponse.js} +0 -0
  670. /package/api/{resources/sync/client/requests/SyncUpdate.js → types/SourceConnection.js} +0 -0
  671. /package/api/{resources/sync/types/ListSyncsSyncGetResponse.js → types/SourceConnectionAuthFields.js} +0 -0
  672. /package/api/{resources/transformers/client/requests/TransformerCreate.js → types/SourceConnectionCreate.js} +0 -0
  673. /package/api/{resources/transformers/client/requests/TransformerUpdate.js → types/SourceConnectionJob.js} +0 -0
  674. /package/api/types/{ApiKeyWithPlainKey.js → SourceConnectionListItem.js} +0 -0
  675. /package/api/types/{DestinationWithConfigFields.js → SourceWithAuthenticationFields.js} +0 -0
  676. /package/{dist/api/resources/sync/client/requests → api/types}/SyncCreate.js +0 -0
  677. /package/{dist/api/resources/dag/client/requests → api/types}/SyncDagCreate.js +0 -0
  678. /package/{dist/api/resources/dag/client/requests → api/types}/SyncDagUpdate.js +0 -0
  679. /package/{dist/api/resources/sync/client/requests → api/types}/SyncUpdate.js +0 -0
  680. /package/{dist/api/resources/transformers/client/requests → api/types}/TransformerCreate.js +0 -0
  681. /package/{dist/api/resources/transformers/client/requests → api/types}/TransformerUpdate.js +0 -0
  682. /package/api/types/{EmbeddingModelWithConfigFields.js → UserCreate.js} +0 -0
  683. /package/{api/resources/sync → dist/api/resources/collections}/client/index.d.ts +0 -0
  684. /package/{api/resources/sync → dist/api/resources/collections}/client/index.js +0 -0
  685. /package/{api/types/SourceWithConfigFields.js → dist/api/resources/collections/client/requests/CollectionCreate.js} +0 -0
  686. /package/dist/api/resources/{connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.js → collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.js} +0 -0
  687. /package/dist/api/resources/{dag/client/requests/InitializeDagDagInitGetRequest.js → collections/client/requests/ListCollectionsCollectionsGetRequest.js} +0 -0
  688. /package/{api/resources/destinations/client → dist/api/resources/collections/client/requests}/index.js +0 -0
  689. /package/{api/resources/embeddingModels → dist/api/resources/collections}/index.d.ts +0 -0
  690. /package/{api/resources/embeddingModels → dist/api/resources/collections}/index.js +0 -0
  691. /package/{api/resources/transformers → dist/api/resources/sourceConnections}/client/index.d.ts +0 -0
  692. /package/{api/resources/transformers → dist/api/resources/sourceConnections}/client/index.js +0 -0
  693. /package/dist/api/resources/{entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js → sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.js} +0 -0
  694. /package/dist/api/resources/{sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js → sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.js} +0 -0
  695. /package/dist/api/resources/{sync/client/requests/ListAllJobsSyncJobsGetRequest.js → sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.js} +0 -0
  696. /package/dist/api/resources/{sync/client/requests/ListSyncsSyncGetRequest.js → sourceConnections/client/requests/SourceConnectionUpdate.js} +0 -0
  697. /package/{api/resources/embeddingModels/client → dist/api/resources/sourceConnections/client/requests}/index.js +0 -0
  698. /package/{api/resources/transformers → dist/api/resources/sourceConnections}/index.d.ts +0 -0
  699. /package/{api/resources/transformers → dist/api/resources/sourceConnections}/index.js +0 -0
  700. /package/dist/api/{resources/sync/types/ListSyncsSyncGetResponse.js → types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js} +0 -0
  701. /package/dist/api/types/{ApiKeyWithPlainKey.js → BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js} +0 -0
  702. /package/dist/api/types/{DestinationWithConfigFields.js → BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js} +0 -0
  703. /package/dist/api/types/{EmbeddingModelWithConfigFields.js → BodySendOauth2CodeConnectionsOauth2SourceCodePost.js} +0 -0
  704. /package/dist/api/types/{SourceWithConfigFields.js → Collection.js} +0 -0
  705. /package/dist/api/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.d.ts +0 -0
  706. /package/dist/api/{resources/entities/types → types}/EntityDefinitionUpdateEntitySchema.d.ts +0 -0
  707. /package/{api/resources/users → dist/serialization/resources/collections}/index.d.ts +0 -0
  708. /package/{api/resources/users → dist/serialization/resources/collections}/index.js +0 -0
  709. /package/dist/{api/resources/dag → serialization/resources/sourceConnections}/index.d.ts +0 -0
  710. /package/dist/{api/resources/dag → serialization/resources/sourceConnections}/index.js +0 -0
  711. /package/{dist/api/resources/destinations → serialization/resources/collections}/index.d.ts +0 -0
  712. /package/{dist/api/resources/destinations → serialization/resources/collections}/index.js +0 -0
  713. /package/{dist/api/resources/embeddingModels → serialization/resources/sourceConnections}/index.d.ts +0 -0
  714. /package/{dist/api/resources/embeddingModels → serialization/resources/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.1.28", "User-Agent": "@airweave/sdk/0.1.28", "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.1.28", "User-Agent": "@airweave/sdk/0.1.28", "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.1.28", "User-Agent": "@airweave/sdk/0.1.28", "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.1.28", "User-Agent": "@airweave/sdk/0.1.28", "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.1.28", "User-Agent": "@airweave/sdk/0.1.28", "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.1.28", "User-Agent": "@airweave/sdk/0.1.28", "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.1.28", "User-Agent": "@airweave/sdk/0.1.28", "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.1.28", "User-Agent": "@airweave/sdk/0.1.28", "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.1.28", "User-Agent": "@airweave/sdk/0.1.28", "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.1.28", "User-Agent": "@airweave/sdk/0.1.28", "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.1.28", "User-Agent": "@airweave/sdk/0.1.28", "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;