@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
@@ -56,7 +56,7 @@ const url_join_1 = __importDefault(require("url-join"));
56
56
  const serializers = __importStar(require("../../../../serialization/index"));
57
57
  const errors = __importStar(require("../../../../errors/index"));
58
58
  class Connections {
59
- constructor(_options = {}) {
59
+ constructor(_options) {
60
60
  this._options = _options;
61
61
  }
62
62
  /**
@@ -86,9 +86,9 @@ class Connections {
86
86
  const _response = yield core.fetcher({
87
87
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/detail/${encodeURIComponent(connectionId)}`),
88
88
  method: "GET",
89
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
89
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
90
90
  ? yield core.Supplier.get(this._options.apiKey)
91
- : 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),
91
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
92
92
  contentType: "application/json",
93
93
  requestType: "json",
94
94
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -159,9 +159,9 @@ class Connections {
159
159
  const _response = yield core.fetcher({
160
160
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/list"),
161
161
  method: "GET",
162
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
162
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
163
163
  ? yield core.Supplier.get(this._options.apiKey)
164
- : 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),
164
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
165
165
  contentType: "application/json",
166
166
  requestType: "json",
167
167
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -207,794 +207,9 @@ class Connections {
207
207
  }
208
208
  });
209
209
  }
210
- /**
211
- * Get all integrations of specified type connected to the current user.
212
- *
213
- * Args:
214
- * -----
215
- * integration_type (IntegrationType): The type of integration to get connections for.
216
- * db (AsyncSession): The database session.
217
- * user (schemas.User): The current user.
218
- *
219
- * Returns:
220
- * -------
221
- * list[schemas.Connection]: The list of connections.
222
- *
223
- * @param {AirweaveSDK.IntegrationType} integrationType
224
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
225
- *
226
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
227
- *
228
- * @example
229
- * await client.connections.listConnectedIntegrations("source")
230
- */
231
- listConnectedIntegrations(integrationType, requestOptions) {
232
- return __awaiter(this, void 0, void 0, function* () {
233
- var _a;
234
- const _response = yield core.fetcher({
235
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/list/${encodeURIComponent(serializers.IntegrationType.jsonOrThrow(integrationType))}`),
236
- method: "GET",
237
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
238
- ? yield core.Supplier.get(this._options.apiKey)
239
- : 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),
240
- contentType: "application/json",
241
- requestType: "json",
242
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
243
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
244
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
245
- });
246
- if (_response.ok) {
247
- return serializers.connections.listConnectedIntegrations.Response.parseOrThrow(_response.body, {
248
- unrecognizedObjectKeys: "passthrough",
249
- allowUnrecognizedUnionMembers: true,
250
- allowUnrecognizedEnumValues: true,
251
- breadcrumbsPrefix: ["response"],
252
- });
253
- }
254
- if (_response.error.reason === "status-code") {
255
- switch (_response.error.statusCode) {
256
- case 422:
257
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
258
- unrecognizedObjectKeys: "passthrough",
259
- allowUnrecognizedUnionMembers: true,
260
- allowUnrecognizedEnumValues: true,
261
- breadcrumbsPrefix: ["response"],
262
- }));
263
- default:
264
- throw new errors.AirweaveSDKError({
265
- statusCode: _response.error.statusCode,
266
- body: _response.error.body,
267
- });
268
- }
269
- }
270
- switch (_response.error.reason) {
271
- case "non-json":
272
- throw new errors.AirweaveSDKError({
273
- statusCode: _response.error.statusCode,
274
- body: _response.error.rawBody,
275
- });
276
- case "timeout":
277
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/list/{integration_type}.");
278
- case "unknown":
279
- throw new errors.AirweaveSDKError({
280
- message: _response.error.errorMessage,
281
- });
282
- }
283
- });
284
- }
285
- /**
286
- * Connect to a source, destination, or embedding model.
287
- *
288
- * Expects a POST body with:
289
- * ```json
290
- * {
291
- * "name": "required connection name",
292
- * ... other config fields specific to the integration type ...
293
- * }
294
- * ```
295
- *
296
- * Args:
297
- * -----
298
- * db: The database session.
299
- * integration_type: The type of integration to connect to.
300
- * short_name: The short name of the integration to connect to.
301
- * name: The name of the connection.
302
- * config_fields: The config fields for the integration.
303
- * user: The current user.
304
- *
305
- * Returns:
306
- * -------
307
- * schemas.Connection: The connection.
308
- *
309
- * @param {AirweaveSDK.IntegrationType} integrationType
310
- * @param {string} shortName
311
- * @param {AirweaveSDK.BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost} request
312
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
313
- *
314
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
315
- *
316
- * @example
317
- * await client.connections.connectIntegration("source", "short_name", {
318
- * configFields: {
319
- * "key": "value"
320
- * }
321
- * })
322
- */
323
- connectIntegration(integrationType, shortName, request, requestOptions) {
324
- return __awaiter(this, void 0, void 0, function* () {
325
- var _a;
326
- const _response = yield core.fetcher({
327
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/connect/${encodeURIComponent(serializers.IntegrationType.jsonOrThrow(integrationType))}/${encodeURIComponent(shortName)}`),
328
- method: "POST",
329
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
330
- ? yield core.Supplier.get(this._options.apiKey)
331
- : 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),
332
- contentType: "application/json",
333
- requestType: "json",
334
- body: serializers.BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
335
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
336
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
337
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
338
- });
339
- if (_response.ok) {
340
- return serializers.Connection.parseOrThrow(_response.body, {
341
- unrecognizedObjectKeys: "passthrough",
342
- allowUnrecognizedUnionMembers: true,
343
- allowUnrecognizedEnumValues: true,
344
- breadcrumbsPrefix: ["response"],
345
- });
346
- }
347
- if (_response.error.reason === "status-code") {
348
- switch (_response.error.statusCode) {
349
- case 422:
350
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
351
- unrecognizedObjectKeys: "passthrough",
352
- allowUnrecognizedUnionMembers: true,
353
- allowUnrecognizedEnumValues: true,
354
- breadcrumbsPrefix: ["response"],
355
- }));
356
- default:
357
- throw new errors.AirweaveSDKError({
358
- statusCode: _response.error.statusCode,
359
- body: _response.error.body,
360
- });
361
- }
362
- }
363
- switch (_response.error.reason) {
364
- case "non-json":
365
- throw new errors.AirweaveSDKError({
366
- statusCode: _response.error.statusCode,
367
- body: _response.error.rawBody,
368
- });
369
- case "timeout":
370
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/connect/{integration_type}/{short_name}.");
371
- case "unknown":
372
- throw new errors.AirweaveSDKError({
373
- message: _response.error.errorMessage,
374
- });
375
- }
376
- });
377
- }
378
- /**
379
- * Get the credentials for a connection.
380
- *
381
- * Args:
382
- * -----
383
- * connection_id (UUID): The ID of the connection to get credentials for
384
- * db (AsyncSession): The database session
385
- * user (schemas.User): The current user
386
- *
387
- * Returns:
388
- * -------
389
- * decrypted_credentials (dict): The credentials for the connection
390
- *
391
- * @param {string} connectionId
392
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
393
- *
394
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
395
- *
396
- * @example
397
- * await client.connections.getConnectionCredentials("connection_id")
398
- */
399
- getConnectionCredentials(connectionId, requestOptions) {
400
- return __awaiter(this, void 0, void 0, function* () {
401
- var _a;
402
- const _response = yield core.fetcher({
403
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/credentials/${encodeURIComponent(connectionId)}`),
404
- method: "GET",
405
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
406
- ? yield core.Supplier.get(this._options.apiKey)
407
- : 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),
408
- contentType: "application/json",
409
- requestType: "json",
410
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
411
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
412
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
413
- });
414
- if (_response.ok) {
415
- return serializers.connections.getConnectionCredentials.Response.parseOrThrow(_response.body, {
416
- unrecognizedObjectKeys: "passthrough",
417
- allowUnrecognizedUnionMembers: true,
418
- allowUnrecognizedEnumValues: true,
419
- breadcrumbsPrefix: ["response"],
420
- });
421
- }
422
- if (_response.error.reason === "status-code") {
423
- switch (_response.error.statusCode) {
424
- case 422:
425
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
426
- unrecognizedObjectKeys: "passthrough",
427
- allowUnrecognizedUnionMembers: true,
428
- allowUnrecognizedEnumValues: true,
429
- breadcrumbsPrefix: ["response"],
430
- }));
431
- default:
432
- throw new errors.AirweaveSDKError({
433
- statusCode: _response.error.statusCode,
434
- body: _response.error.body,
435
- });
436
- }
437
- }
438
- switch (_response.error.reason) {
439
- case "non-json":
440
- throw new errors.AirweaveSDKError({
441
- statusCode: _response.error.statusCode,
442
- body: _response.error.rawBody,
443
- });
444
- case "timeout":
445
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/credentials/{connection_id}.");
446
- case "unknown":
447
- throw new errors.AirweaveSDKError({
448
- message: _response.error.errorMessage,
449
- });
450
- }
451
- });
452
- }
453
- /**
454
- * Delete a connection.
455
- *
456
- * Deletes the connection and integration credential.
457
- *
458
- * Args:
459
- * -----
460
- * db (AsyncSession): The database session
461
- * connection_id (UUID): The ID of the connection to delete
462
- * user (schemas.User): The current user
463
- *
464
- * Returns:
465
- * --------
466
- * connection (schemas.Connection): The deleted connection
467
- *
468
- * @param {string} connectionId
469
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
470
- *
471
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
472
- *
473
- * @example
474
- * await client.connections.deleteConnection("connection_id")
475
- */
476
- deleteConnection(connectionId, requestOptions) {
477
- return __awaiter(this, void 0, void 0, function* () {
478
- var _a;
479
- const _response = yield core.fetcher({
480
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/delete/source/${encodeURIComponent(connectionId)}`),
481
- method: "DELETE",
482
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
483
- ? yield core.Supplier.get(this._options.apiKey)
484
- : 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),
485
- contentType: "application/json",
486
- requestType: "json",
487
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
488
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
489
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
490
- });
491
- if (_response.ok) {
492
- return serializers.Connection.parseOrThrow(_response.body, {
493
- unrecognizedObjectKeys: "passthrough",
494
- allowUnrecognizedUnionMembers: true,
495
- allowUnrecognizedEnumValues: true,
496
- breadcrumbsPrefix: ["response"],
497
- });
498
- }
499
- if (_response.error.reason === "status-code") {
500
- switch (_response.error.statusCode) {
501
- case 422:
502
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
503
- unrecognizedObjectKeys: "passthrough",
504
- allowUnrecognizedUnionMembers: true,
505
- allowUnrecognizedEnumValues: true,
506
- breadcrumbsPrefix: ["response"],
507
- }));
508
- default:
509
- throw new errors.AirweaveSDKError({
510
- statusCode: _response.error.statusCode,
511
- body: _response.error.body,
512
- });
513
- }
514
- }
515
- switch (_response.error.reason) {
516
- case "non-json":
517
- throw new errors.AirweaveSDKError({
518
- statusCode: _response.error.statusCode,
519
- body: _response.error.rawBody,
520
- });
521
- case "timeout":
522
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling DELETE /connections/delete/source/{connection_id}.");
523
- case "unknown":
524
- throw new errors.AirweaveSDKError({
525
- message: _response.error.errorMessage,
526
- });
527
- }
528
- });
529
- }
530
- /**
531
- * Disconnect from a source connection.
532
- *
533
- * Args:
534
- * -----
535
- * db (AsyncSession): The database session
536
- * connection_id (UUID): The ID of the connection to disconnect
537
- * user (schemas.User): The current user
538
- *
539
- * Returns:
540
- * --------
541
- * connection_schema (schemas.Connection): The disconnected connection
542
- *
543
- * @param {string} connectionId
544
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
545
- *
546
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
547
- *
548
- * @example
549
- * await client.connections.disconnectSourceConnection("connection_id")
550
- */
551
- disconnectSourceConnection(connectionId, requestOptions) {
552
- return __awaiter(this, void 0, void 0, function* () {
553
- var _a;
554
- const _response = yield core.fetcher({
555
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/disconnect/source/${encodeURIComponent(connectionId)}`),
556
- method: "PUT",
557
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
558
- ? yield core.Supplier.get(this._options.apiKey)
559
- : 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),
560
- contentType: "application/json",
561
- requestType: "json",
562
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
563
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
564
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
565
- });
566
- if (_response.ok) {
567
- return serializers.Connection.parseOrThrow(_response.body, {
568
- unrecognizedObjectKeys: "passthrough",
569
- allowUnrecognizedUnionMembers: true,
570
- allowUnrecognizedEnumValues: true,
571
- breadcrumbsPrefix: ["response"],
572
- });
573
- }
574
- if (_response.error.reason === "status-code") {
575
- switch (_response.error.statusCode) {
576
- case 422:
577
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
578
- unrecognizedObjectKeys: "passthrough",
579
- allowUnrecognizedUnionMembers: true,
580
- allowUnrecognizedEnumValues: true,
581
- breadcrumbsPrefix: ["response"],
582
- }));
583
- default:
584
- throw new errors.AirweaveSDKError({
585
- statusCode: _response.error.statusCode,
586
- body: _response.error.body,
587
- });
588
- }
589
- }
590
- switch (_response.error.reason) {
591
- case "non-json":
592
- throw new errors.AirweaveSDKError({
593
- statusCode: _response.error.statusCode,
594
- body: _response.error.rawBody,
595
- });
596
- case "timeout":
597
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /connections/disconnect/source/{connection_id}.");
598
- case "unknown":
599
- throw new errors.AirweaveSDKError({
600
- message: _response.error.errorMessage,
601
- });
602
- }
603
- });
604
- }
605
- /**
606
- * Disconnect from a destination connection.
607
- *
608
- * Args:
609
- * -----
610
- * db (AsyncSession): The database session
611
- * connection_id (UUID): The ID of the connection to disconnect
612
- * user (schemas.User): The current user
613
- *
614
- * Returns:
615
- * --------
616
- * connection_schema (schemas.Connection): The disconnected connection
617
- *
618
- * @param {string} connectionId
619
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
620
- *
621
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
622
- *
623
- * @example
624
- * await client.connections.disconnectDestinationConnection("connection_id")
625
- */
626
- disconnectDestinationConnection(connectionId, requestOptions) {
627
- return __awaiter(this, void 0, void 0, function* () {
628
- var _a;
629
- const _response = yield core.fetcher({
630
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/disconnect/destination/${encodeURIComponent(connectionId)}`),
631
- method: "PUT",
632
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
633
- ? yield core.Supplier.get(this._options.apiKey)
634
- : 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),
635
- contentType: "application/json",
636
- requestType: "json",
637
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
638
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
639
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
640
- });
641
- if (_response.ok) {
642
- return serializers.Connection.parseOrThrow(_response.body, {
643
- unrecognizedObjectKeys: "passthrough",
644
- allowUnrecognizedUnionMembers: true,
645
- allowUnrecognizedEnumValues: true,
646
- breadcrumbsPrefix: ["response"],
647
- });
648
- }
649
- if (_response.error.reason === "status-code") {
650
- switch (_response.error.statusCode) {
651
- case 422:
652
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
653
- unrecognizedObjectKeys: "passthrough",
654
- allowUnrecognizedUnionMembers: true,
655
- allowUnrecognizedEnumValues: true,
656
- breadcrumbsPrefix: ["response"],
657
- }));
658
- default:
659
- throw new errors.AirweaveSDKError({
660
- statusCode: _response.error.statusCode,
661
- body: _response.error.body,
662
- });
663
- }
664
- }
665
- switch (_response.error.reason) {
666
- case "non-json":
667
- throw new errors.AirweaveSDKError({
668
- statusCode: _response.error.statusCode,
669
- body: _response.error.rawBody,
670
- });
671
- case "timeout":
672
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /connections/disconnect/destination/{connection_id}.");
673
- case "unknown":
674
- throw new errors.AirweaveSDKError({
675
- message: _response.error.errorMessage,
676
- });
677
- }
678
- });
679
- }
680
- /**
681
- * Get the OAuth2 authorization URL for a source.
682
- *
683
- * Args:
684
- * -----
685
- * db: The database session
686
- * short_name: The short name of the source
687
- * user: The current user
688
- *
689
- * @param {AirweaveSDK.GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest} request
690
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
691
- *
692
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
693
- *
694
- * @example
695
- * await client.connections.getOauth2AuthUrl({
696
- * shortName: "short_name"
697
- * })
698
- */
699
- getOauth2AuthUrl(request, requestOptions) {
700
- return __awaiter(this, void 0, void 0, function* () {
701
- var _a;
702
- const { shortName } = request;
703
- const _queryParams = {};
704
- _queryParams["short_name"] = shortName;
705
- const _response = yield core.fetcher({
706
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/oauth2/source/auth_url"),
707
- method: "GET",
708
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
709
- ? yield core.Supplier.get(this._options.apiKey)
710
- : 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),
711
- contentType: "application/json",
712
- queryParameters: _queryParams,
713
- requestType: "json",
714
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
715
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
716
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
717
- });
718
- if (_response.ok) {
719
- return serializers.connections.getOauth2AuthUrl.Response.parseOrThrow(_response.body, {
720
- unrecognizedObjectKeys: "passthrough",
721
- allowUnrecognizedUnionMembers: true,
722
- allowUnrecognizedEnumValues: true,
723
- breadcrumbsPrefix: ["response"],
724
- });
725
- }
726
- if (_response.error.reason === "status-code") {
727
- switch (_response.error.statusCode) {
728
- case 422:
729
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
730
- unrecognizedObjectKeys: "passthrough",
731
- allowUnrecognizedUnionMembers: true,
732
- allowUnrecognizedEnumValues: true,
733
- breadcrumbsPrefix: ["response"],
734
- }));
735
- default:
736
- throw new errors.AirweaveSDKError({
737
- statusCode: _response.error.statusCode,
738
- body: _response.error.body,
739
- });
740
- }
741
- }
742
- switch (_response.error.reason) {
743
- case "non-json":
744
- throw new errors.AirweaveSDKError({
745
- statusCode: _response.error.statusCode,
746
- body: _response.error.rawBody,
747
- });
748
- case "timeout":
749
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/source/auth_url.");
750
- case "unknown":
751
- throw new errors.AirweaveSDKError({
752
- message: _response.error.errorMessage,
753
- });
754
- }
755
- });
756
- }
757
- /**
758
- * Send the OAuth2 authorization code for a source.
759
- *
760
- * This will:
761
- * 1. Get the OAuth2 settings for the source
762
- * 2. Exchange the authorization code for a token
763
- * 3. Create an integration credential with the token
764
- *
765
- * Args:
766
- * -----
767
- * db: The database session
768
- * short_name: The short name of the source
769
- * code: The authorization code
770
- * user: The current user
771
- *
772
- * Returns:
773
- * --------
774
- * connection (schemas.Connection): The created connection
775
- *
776
- * @param {AirweaveSDK.BodySendOauth2CodeConnectionsOauth2SourceCodePost} request
777
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
778
- *
779
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
780
- *
781
- * @example
782
- * await client.connections.sendOauth2Code({
783
- * shortName: "short_name",
784
- * code: "code"
785
- * })
786
- */
787
- sendOauth2Code(request, requestOptions) {
788
- return __awaiter(this, void 0, void 0, function* () {
789
- var _a;
790
- const _response = yield core.fetcher({
791
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/oauth2/source/code"),
792
- method: "POST",
793
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
794
- ? yield core.Supplier.get(this._options.apiKey)
795
- : 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),
796
- contentType: "application/json",
797
- requestType: "json",
798
- body: serializers.BodySendOauth2CodeConnectionsOauth2SourceCodePost.jsonOrThrow(request, {
799
- unrecognizedObjectKeys: "strip",
800
- }),
801
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
802
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
803
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
804
- });
805
- if (_response.ok) {
806
- return serializers.Connection.parseOrThrow(_response.body, {
807
- unrecognizedObjectKeys: "passthrough",
808
- allowUnrecognizedUnionMembers: true,
809
- allowUnrecognizedEnumValues: true,
810
- breadcrumbsPrefix: ["response"],
811
- });
812
- }
813
- if (_response.error.reason === "status-code") {
814
- switch (_response.error.statusCode) {
815
- case 422:
816
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
817
- unrecognizedObjectKeys: "passthrough",
818
- allowUnrecognizedUnionMembers: true,
819
- allowUnrecognizedEnumValues: true,
820
- breadcrumbsPrefix: ["response"],
821
- }));
822
- default:
823
- throw new errors.AirweaveSDKError({
824
- statusCode: _response.error.statusCode,
825
- body: _response.error.body,
826
- });
827
- }
828
- }
829
- switch (_response.error.reason) {
830
- case "non-json":
831
- throw new errors.AirweaveSDKError({
832
- statusCode: _response.error.statusCode,
833
- body: _response.error.rawBody,
834
- });
835
- case "timeout":
836
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/oauth2/source/code.");
837
- case "unknown":
838
- throw new errors.AirweaveSDKError({
839
- message: _response.error.errorMessage,
840
- });
841
- }
842
- });
843
- }
844
- /**
845
- * Exchange the OAuth2 authorization code for a white label integration.
846
- *
847
- * Args:
848
- * -----
849
- * db: The database session
850
- * white_label_id: The ID of the white label integration
851
- * code: The authorization code
852
- * user: The current user
853
- * background_tasks: The background tasks
854
- *
855
- * Returns:
856
- * --------
857
- * connection (schemas.Connection): The created connection
858
- *
859
- * @param {string} whiteLabelId
860
- * @param {string} request
861
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
862
- *
863
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
864
- *
865
- * @example
866
- * await client.connections.sendOauth2WhiteLabelCode("white_label_id", "string")
867
- */
868
- sendOauth2WhiteLabelCode(whiteLabelId, request, requestOptions) {
869
- return __awaiter(this, void 0, void 0, function* () {
870
- var _a;
871
- const _response = yield core.fetcher({
872
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/oauth2/white-label/${encodeURIComponent(whiteLabelId)}/code`),
873
- method: "POST",
874
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
875
- ? yield core.Supplier.get(this._options.apiKey)
876
- : 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),
877
- contentType: "application/json",
878
- requestType: "json",
879
- body: serializers.connections.sendOauth2WhiteLabelCode.Request.jsonOrThrow(request, {
880
- unrecognizedObjectKeys: "strip",
881
- }),
882
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
883
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
884
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
885
- });
886
- if (_response.ok) {
887
- return serializers.Connection.parseOrThrow(_response.body, {
888
- unrecognizedObjectKeys: "passthrough",
889
- allowUnrecognizedUnionMembers: true,
890
- allowUnrecognizedEnumValues: true,
891
- breadcrumbsPrefix: ["response"],
892
- });
893
- }
894
- if (_response.error.reason === "status-code") {
895
- switch (_response.error.statusCode) {
896
- case 422:
897
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
898
- unrecognizedObjectKeys: "passthrough",
899
- allowUnrecognizedUnionMembers: true,
900
- allowUnrecognizedEnumValues: true,
901
- breadcrumbsPrefix: ["response"],
902
- }));
903
- default:
904
- throw new errors.AirweaveSDKError({
905
- statusCode: _response.error.statusCode,
906
- body: _response.error.body,
907
- });
908
- }
909
- }
910
- switch (_response.error.reason) {
911
- case "non-json":
912
- throw new errors.AirweaveSDKError({
913
- statusCode: _response.error.statusCode,
914
- body: _response.error.rawBody,
915
- });
916
- case "timeout":
917
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/oauth2/white-label/{white_label_id}/code.");
918
- case "unknown":
919
- throw new errors.AirweaveSDKError({
920
- message: _response.error.errorMessage,
921
- });
922
- }
923
- });
924
- }
925
- /**
926
- * Get the OAuth2 authorization URL for a white label integration.
927
- *
928
- * Args:
929
- * -----
930
- * db: The database session
931
- * white_label_id: The ID of the white label integration
932
- * user: The current user
933
- *
934
- * Returns:
935
- * --------
936
- * str: The OAuth2 authorization URL
937
- *
938
- * @param {string} whiteLabelId
939
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
940
- *
941
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
942
- *
943
- * @example
944
- * await client.connections.getOauth2WhiteLabelAuthUrl("white_label_id")
945
- */
946
- getOauth2WhiteLabelAuthUrl(whiteLabelId, requestOptions) {
210
+ _getAuthorizationHeader() {
947
211
  return __awaiter(this, void 0, void 0, function* () {
948
- var _a;
949
- const _response = yield core.fetcher({
950
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/oauth2/white-label/${encodeURIComponent(whiteLabelId)}/auth_url`),
951
- method: "GET",
952
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
953
- ? yield core.Supplier.get(this._options.apiKey)
954
- : 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),
955
- contentType: "application/json",
956
- requestType: "json",
957
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
958
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
959
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
960
- });
961
- if (_response.ok) {
962
- return serializers.connections.getOauth2WhiteLabelAuthUrl.Response.parseOrThrow(_response.body, {
963
- unrecognizedObjectKeys: "passthrough",
964
- allowUnrecognizedUnionMembers: true,
965
- allowUnrecognizedEnumValues: true,
966
- breadcrumbsPrefix: ["response"],
967
- });
968
- }
969
- if (_response.error.reason === "status-code") {
970
- switch (_response.error.statusCode) {
971
- case 422:
972
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
973
- unrecognizedObjectKeys: "passthrough",
974
- allowUnrecognizedUnionMembers: true,
975
- allowUnrecognizedEnumValues: true,
976
- breadcrumbsPrefix: ["response"],
977
- }));
978
- default:
979
- throw new errors.AirweaveSDKError({
980
- statusCode: _response.error.statusCode,
981
- body: _response.error.body,
982
- });
983
- }
984
- }
985
- switch (_response.error.reason) {
986
- case "non-json":
987
- throw new errors.AirweaveSDKError({
988
- statusCode: _response.error.statusCode,
989
- body: _response.error.rawBody,
990
- });
991
- case "timeout":
992
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/white-label/{white_label_id}/auth_url.");
993
- case "unknown":
994
- throw new errors.AirweaveSDKError({
995
- message: _response.error.errorMessage,
996
- });
997
- }
212
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
998
213
  });
999
214
  }
1000
215
  }