@airweave/sdk 0.1.27 → 0.1.34

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 (303) hide show
  1. package/Client.d.ts +15 -0
  2. package/Client.js +45 -20
  3. package/README.md +7 -11
  4. package/api/resources/apiKeys/client/Client.d.ts +131 -0
  5. package/api/resources/apiKeys/client/Client.js +391 -0
  6. package/api/resources/apiKeys/client/index.d.ts +1 -0
  7. package/api/resources/apiKeys/client/index.js +17 -0
  8. package/{dist/api/types → api/resources/apiKeys/client/requests}/ApiKeyCreate.d.ts +2 -1
  9. package/api/resources/{sync/client/requests/GetSyncJobSyncJobJobIdGetRequest.d.ts → apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts} +3 -3
  10. package/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +11 -0
  11. package/api/resources/apiKeys/client/requests/index.d.ts +3 -0
  12. package/api/resources/apiKeys/client/requests/index.js +2 -0
  13. package/api/resources/apiKeys/index.d.ts +1 -0
  14. package/api/resources/apiKeys/index.js +17 -0
  15. package/api/resources/chat/client/Client.d.ts +209 -0
  16. package/api/resources/chat/client/Client.js +669 -0
  17. package/api/resources/chat/client/index.d.ts +1 -0
  18. package/api/resources/chat/client/index.js +17 -0
  19. package/{dist/api/types → api/resources/chat/client/requests}/ChatCreate.d.ts +5 -1
  20. package/api/{types → resources/chat/client/requests}/ChatMessageCreate.d.ts +4 -1
  21. package/api/{types → resources/chat/client/requests}/ChatUpdate.d.ts +2 -1
  22. package/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +11 -0
  23. package/api/resources/chat/client/requests/index.d.ts +4 -0
  24. package/api/resources/chat/client/requests/index.js +2 -0
  25. package/api/resources/chat/index.d.ts +1 -0
  26. package/api/resources/chat/index.js +17 -0
  27. package/api/resources/connections/client/Client.d.ts +26 -25
  28. package/api/resources/connections/client/Client.js +88 -84
  29. package/api/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
  30. package/api/resources/connections/client/requests/index.d.ts +1 -0
  31. package/api/resources/cursorDevelopment/client/Client.d.ts +78 -0
  32. package/api/resources/cursorDevelopment/client/Client.js +218 -0
  33. package/api/resources/cursorDevelopment/client/index.d.ts +1 -0
  34. package/api/resources/cursorDevelopment/client/index.js +2 -0
  35. package/api/resources/cursorDevelopment/index.d.ts +1 -0
  36. package/api/resources/cursorDevelopment/index.js +17 -0
  37. package/api/resources/dag/client/Client.js +4 -4
  38. package/api/resources/destinations/client/Client.js +2 -2
  39. package/api/resources/embeddingModels/client/Client.js +2 -2
  40. package/api/resources/entities/client/Client.d.ts +14 -0
  41. package/api/resources/entities/client/Client.js +78 -7
  42. package/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +12 -0
  43. package/api/resources/entities/client/requests/index.d.ts +1 -0
  44. package/api/resources/health/client/Client.d.ts +41 -0
  45. package/api/resources/health/client/Client.js +118 -0
  46. package/api/resources/health/client/index.d.ts +1 -0
  47. package/api/resources/health/client/index.js +2 -0
  48. package/api/resources/health/index.d.ts +1 -0
  49. package/api/resources/health/index.js +17 -0
  50. package/api/resources/index.d.ts +8 -0
  51. package/api/resources/index.js +9 -1
  52. package/api/resources/search/client/Client.d.ts +55 -0
  53. package/api/resources/search/client/Client.js +147 -0
  54. package/api/resources/search/client/index.d.ts +1 -0
  55. package/api/resources/search/client/index.js +17 -0
  56. package/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +20 -0
  57. package/api/resources/search/client/requests/index.d.ts +1 -0
  58. package/api/resources/search/client/requests/index.js +2 -0
  59. package/api/resources/search/index.d.ts +1 -0
  60. package/api/resources/search/index.js +17 -0
  61. package/api/resources/sources/client/Client.js +2 -2
  62. package/api/resources/sync/client/Client.d.ts +26 -5
  63. package/api/resources/sync/client/Client.js +100 -21
  64. package/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +11 -0
  65. package/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.js +5 -0
  66. package/api/resources/sync/client/requests/index.d.ts +1 -1
  67. package/api/resources/transformers/client/Client.js +3 -3
  68. package/api/resources/users/client/Client.js +1 -1
  69. package/api/resources/whiteLabels/client/Client.js +8 -8
  70. package/api/types/EntityDefinition.d.ts +1 -3
  71. package/api/types/SyncJob.d.ts +2 -0
  72. package/api/types/index.d.ts +0 -4
  73. package/api/types/index.js +0 -4
  74. package/dist/Client.d.ts +15 -0
  75. package/dist/Client.js +45 -20
  76. package/dist/api/resources/apiKeys/client/Client.d.ts +131 -0
  77. package/dist/api/resources/apiKeys/client/Client.js +391 -0
  78. package/dist/api/resources/apiKeys/client/index.d.ts +1 -0
  79. package/dist/api/resources/apiKeys/client/index.js +17 -0
  80. package/{api/types → dist/api/resources/apiKeys/client/requests}/ApiKeyCreate.d.ts +2 -1
  81. package/dist/api/resources/apiKeys/client/requests/ApiKeyCreate.js +5 -0
  82. package/dist/api/resources/{sync/client/requests/GetSyncJobSyncJobJobIdGetRequest.d.ts → apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts} +3 -3
  83. package/dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js +5 -0
  84. package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +11 -0
  85. package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js +5 -0
  86. package/dist/api/resources/apiKeys/client/requests/index.d.ts +3 -0
  87. package/dist/api/resources/apiKeys/client/requests/index.js +2 -0
  88. package/dist/api/resources/apiKeys/index.d.ts +1 -0
  89. package/dist/api/resources/apiKeys/index.js +17 -0
  90. package/dist/api/resources/chat/client/Client.d.ts +209 -0
  91. package/dist/api/resources/chat/client/Client.js +669 -0
  92. package/dist/api/resources/chat/client/index.d.ts +1 -0
  93. package/dist/api/resources/chat/client/index.js +17 -0
  94. package/{api/types → dist/api/resources/chat/client/requests}/ChatCreate.d.ts +5 -1
  95. package/dist/api/resources/chat/client/requests/ChatCreate.js +5 -0
  96. package/dist/api/{types → resources/chat/client/requests}/ChatMessageCreate.d.ts +4 -1
  97. package/dist/api/resources/chat/client/requests/ChatMessageCreate.js +5 -0
  98. package/dist/api/{types → resources/chat/client/requests}/ChatUpdate.d.ts +2 -1
  99. package/dist/api/resources/chat/client/requests/ChatUpdate.js +5 -0
  100. package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +11 -0
  101. package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.js +5 -0
  102. package/dist/api/resources/chat/client/requests/index.d.ts +4 -0
  103. package/dist/api/resources/chat/client/requests/index.js +2 -0
  104. package/dist/api/resources/chat/index.d.ts +1 -0
  105. package/dist/api/resources/chat/index.js +17 -0
  106. package/dist/api/resources/connections/client/Client.d.ts +26 -25
  107. package/dist/api/resources/connections/client/Client.js +88 -84
  108. package/dist/api/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
  109. package/dist/api/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js +5 -0
  110. package/dist/api/resources/connections/client/requests/index.d.ts +1 -0
  111. package/dist/api/resources/cursorDevelopment/client/Client.d.ts +78 -0
  112. package/dist/api/resources/cursorDevelopment/client/Client.js +218 -0
  113. package/dist/api/resources/cursorDevelopment/client/index.d.ts +1 -0
  114. package/dist/api/resources/cursorDevelopment/client/index.js +2 -0
  115. package/dist/api/resources/cursorDevelopment/index.d.ts +1 -0
  116. package/dist/api/resources/cursorDevelopment/index.js +17 -0
  117. package/dist/api/resources/dag/client/Client.js +4 -4
  118. package/dist/api/resources/destinations/client/Client.js +2 -2
  119. package/dist/api/resources/embeddingModels/client/Client.js +2 -2
  120. package/dist/api/resources/entities/client/Client.d.ts +14 -0
  121. package/dist/api/resources/entities/client/Client.js +78 -7
  122. package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +12 -0
  123. package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js +5 -0
  124. package/dist/api/resources/entities/client/requests/index.d.ts +1 -0
  125. package/dist/api/resources/health/client/Client.d.ts +41 -0
  126. package/dist/api/resources/health/client/Client.js +118 -0
  127. package/dist/api/resources/health/client/index.d.ts +1 -0
  128. package/dist/api/resources/health/client/index.js +2 -0
  129. package/dist/api/resources/health/index.d.ts +1 -0
  130. package/dist/api/resources/health/index.js +17 -0
  131. package/dist/api/resources/index.d.ts +8 -0
  132. package/dist/api/resources/index.js +9 -1
  133. package/dist/api/resources/search/client/Client.d.ts +55 -0
  134. package/dist/api/resources/search/client/Client.js +147 -0
  135. package/dist/api/resources/search/client/index.d.ts +1 -0
  136. package/dist/api/resources/search/client/index.js +17 -0
  137. package/dist/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +20 -0
  138. package/dist/api/resources/search/client/requests/SearchSearchGetRequest.js +5 -0
  139. package/dist/api/resources/search/client/requests/index.d.ts +1 -0
  140. package/dist/api/resources/search/client/requests/index.js +2 -0
  141. package/dist/api/resources/search/index.d.ts +1 -0
  142. package/dist/api/resources/search/index.js +17 -0
  143. package/dist/api/resources/sources/client/Client.js +2 -2
  144. package/dist/api/resources/sync/client/Client.d.ts +26 -5
  145. package/dist/api/resources/sync/client/Client.js +100 -21
  146. package/dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +11 -0
  147. package/dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.js +5 -0
  148. package/dist/api/resources/sync/client/requests/index.d.ts +1 -1
  149. package/dist/api/resources/transformers/client/Client.js +3 -3
  150. package/dist/api/resources/users/client/Client.js +1 -1
  151. package/dist/api/resources/whiteLabels/client/Client.js +8 -8
  152. package/dist/api/types/EntityDefinition.d.ts +1 -3
  153. package/dist/api/types/SyncJob.d.ts +2 -0
  154. package/dist/api/types/index.d.ts +0 -4
  155. package/dist/api/types/index.js +0 -4
  156. package/dist/serialization/resources/apiKeys/client/index.d.ts +2 -0
  157. package/dist/serialization/resources/apiKeys/client/index.js +41 -0
  158. package/dist/serialization/resources/apiKeys/client/readApiKeys.d.ts +11 -0
  159. package/dist/serialization/resources/apiKeys/client/readApiKeys.js +42 -0
  160. package/dist/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +12 -0
  161. package/dist/serialization/{types → resources/apiKeys/client/requests}/ApiKeyCreate.js +1 -1
  162. package/dist/serialization/resources/apiKeys/client/requests/index.d.ts +1 -0
  163. package/dist/serialization/resources/apiKeys/client/requests/index.js +5 -0
  164. package/dist/serialization/resources/apiKeys/index.d.ts +1 -0
  165. package/dist/serialization/resources/apiKeys/index.js +17 -0
  166. package/dist/serialization/resources/chat/client/index.d.ts +3 -0
  167. package/dist/serialization/resources/chat/client/index.js +42 -0
  168. package/dist/serialization/resources/chat/client/listChats.d.ts +11 -0
  169. package/dist/serialization/resources/chat/client/listChats.js +42 -0
  170. package/dist/serialization/resources/chat/client/openaiKeySet.d.ts +9 -0
  171. package/dist/serialization/resources/chat/client/openaiKeySet.js +41 -0
  172. package/{serialization/types → dist/serialization/resources/chat/client/requests}/ChatCreate.d.ts +4 -4
  173. package/{serialization/types → dist/serialization/resources/chat/client/requests}/ChatCreate.js +1 -1
  174. package/dist/serialization/resources/chat/client/requests/ChatMessageCreate.d.ts +13 -0
  175. package/dist/serialization/{types → resources/chat/client/requests}/ChatMessageCreate.js +1 -1
  176. package/{serialization/types → dist/serialization/resources/chat/client/requests}/ChatUpdate.d.ts +4 -4
  177. package/dist/serialization/{types → resources/chat/client/requests}/ChatUpdate.js +1 -1
  178. package/dist/serialization/resources/chat/client/requests/index.d.ts +3 -0
  179. package/dist/serialization/resources/chat/client/requests/index.js +9 -0
  180. package/dist/serialization/resources/chat/index.d.ts +1 -0
  181. package/dist/serialization/resources/chat/index.js +17 -0
  182. package/dist/serialization/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
  183. package/dist/serialization/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js +44 -0
  184. package/dist/serialization/resources/connections/client/requests/index.d.ts +1 -0
  185. package/dist/serialization/resources/connections/client/requests/index.js +3 -1
  186. package/dist/serialization/resources/cursorDevelopment/client/checkConnectionStatus.d.ts +11 -0
  187. package/dist/serialization/resources/cursorDevelopment/client/checkConnectionStatus.js +42 -0
  188. package/dist/serialization/resources/cursorDevelopment/client/index.d.ts +1 -0
  189. package/dist/serialization/resources/cursorDevelopment/client/index.js +37 -0
  190. package/dist/serialization/resources/cursorDevelopment/index.d.ts +1 -0
  191. package/dist/serialization/resources/cursorDevelopment/index.js +17 -0
  192. package/dist/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.d.ts +11 -0
  193. package/dist/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +42 -0
  194. package/dist/serialization/resources/entities/client/index.d.ts +1 -0
  195. package/dist/serialization/resources/entities/client/index.js +2 -1
  196. package/dist/serialization/resources/health/client/healthCheck.d.ts +9 -0
  197. package/dist/serialization/resources/health/client/healthCheck.js +41 -0
  198. package/dist/serialization/resources/health/client/index.d.ts +1 -0
  199. package/dist/serialization/resources/health/client/index.js +37 -0
  200. package/dist/serialization/resources/health/index.d.ts +1 -0
  201. package/dist/serialization/resources/health/index.js +17 -0
  202. package/dist/serialization/resources/index.d.ts +7 -0
  203. package/dist/serialization/resources/index.js +8 -1
  204. package/dist/serialization/resources/search/client/index.d.ts +1 -0
  205. package/dist/serialization/resources/search/client/index.js +37 -0
  206. package/dist/serialization/resources/search/client/search.d.ts +9 -0
  207. package/dist/serialization/resources/search/client/search.js +41 -0
  208. package/dist/serialization/resources/search/index.d.ts +1 -0
  209. package/dist/serialization/resources/search/index.js +17 -0
  210. package/dist/serialization/resources/sync/client/index.d.ts +1 -0
  211. package/dist/serialization/resources/sync/client/index.js +2 -1
  212. package/dist/serialization/resources/sync/client/listAllJobs.d.ts +11 -0
  213. package/dist/serialization/resources/sync/client/listAllJobs.js +42 -0
  214. package/dist/serialization/types/EntityDefinition.d.ts +1 -3
  215. package/dist/serialization/types/EntityDefinition.js +1 -3
  216. package/dist/serialization/types/SyncJob.d.ts +1 -0
  217. package/dist/serialization/types/SyncJob.js +1 -0
  218. package/dist/serialization/types/index.d.ts +0 -4
  219. package/dist/serialization/types/index.js +0 -4
  220. package/dist/version.d.ts +1 -1
  221. package/dist/version.js +1 -1
  222. package/package.json +1 -1
  223. package/reference.md +1777 -441
  224. package/serialization/resources/apiKeys/client/index.d.ts +2 -0
  225. package/serialization/resources/apiKeys/client/index.js +41 -0
  226. package/serialization/resources/apiKeys/client/readApiKeys.d.ts +11 -0
  227. package/serialization/resources/apiKeys/client/readApiKeys.js +42 -0
  228. package/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +12 -0
  229. package/serialization/{types → resources/apiKeys/client/requests}/ApiKeyCreate.js +1 -1
  230. package/serialization/resources/apiKeys/client/requests/index.d.ts +1 -0
  231. package/serialization/resources/apiKeys/client/requests/index.js +5 -0
  232. package/serialization/resources/apiKeys/index.d.ts +1 -0
  233. package/serialization/resources/apiKeys/index.js +17 -0
  234. package/serialization/resources/chat/client/index.d.ts +3 -0
  235. package/serialization/resources/chat/client/index.js +42 -0
  236. package/serialization/resources/chat/client/listChats.d.ts +11 -0
  237. package/serialization/resources/chat/client/listChats.js +42 -0
  238. package/serialization/resources/chat/client/openaiKeySet.d.ts +9 -0
  239. package/serialization/resources/chat/client/openaiKeySet.js +41 -0
  240. package/{dist/serialization/types → serialization/resources/chat/client/requests}/ChatCreate.d.ts +4 -4
  241. package/{dist/serialization/types → serialization/resources/chat/client/requests}/ChatCreate.js +1 -1
  242. package/serialization/resources/chat/client/requests/ChatMessageCreate.d.ts +13 -0
  243. package/serialization/{types → resources/chat/client/requests}/ChatMessageCreate.js +1 -1
  244. package/{dist/serialization/types → serialization/resources/chat/client/requests}/ChatUpdate.d.ts +4 -4
  245. package/serialization/{types → resources/chat/client/requests}/ChatUpdate.js +1 -1
  246. package/serialization/resources/chat/client/requests/index.d.ts +3 -0
  247. package/serialization/resources/chat/client/requests/index.js +9 -0
  248. package/serialization/resources/chat/index.d.ts +1 -0
  249. package/serialization/resources/chat/index.js +17 -0
  250. package/serialization/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
  251. package/serialization/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js +44 -0
  252. package/serialization/resources/connections/client/requests/index.d.ts +1 -0
  253. package/serialization/resources/connections/client/requests/index.js +3 -1
  254. package/serialization/resources/cursorDevelopment/client/checkConnectionStatus.d.ts +11 -0
  255. package/serialization/resources/cursorDevelopment/client/checkConnectionStatus.js +42 -0
  256. package/serialization/resources/cursorDevelopment/client/index.d.ts +1 -0
  257. package/serialization/resources/cursorDevelopment/client/index.js +37 -0
  258. package/serialization/resources/cursorDevelopment/index.d.ts +1 -0
  259. package/serialization/resources/cursorDevelopment/index.js +17 -0
  260. package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.d.ts +11 -0
  261. package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +42 -0
  262. package/serialization/resources/entities/client/index.d.ts +1 -0
  263. package/serialization/resources/entities/client/index.js +2 -1
  264. package/serialization/resources/health/client/healthCheck.d.ts +9 -0
  265. package/serialization/resources/health/client/healthCheck.js +41 -0
  266. package/serialization/resources/health/client/index.d.ts +1 -0
  267. package/serialization/resources/health/client/index.js +37 -0
  268. package/serialization/resources/health/index.d.ts +1 -0
  269. package/serialization/resources/health/index.js +17 -0
  270. package/serialization/resources/index.d.ts +7 -0
  271. package/serialization/resources/index.js +8 -1
  272. package/serialization/resources/search/client/index.d.ts +1 -0
  273. package/serialization/resources/search/client/index.js +37 -0
  274. package/serialization/resources/search/client/search.d.ts +9 -0
  275. package/serialization/resources/search/client/search.js +41 -0
  276. package/serialization/resources/search/index.d.ts +1 -0
  277. package/serialization/resources/search/index.js +17 -0
  278. package/serialization/resources/sync/client/index.d.ts +1 -0
  279. package/serialization/resources/sync/client/index.js +2 -1
  280. package/serialization/resources/sync/client/listAllJobs.d.ts +11 -0
  281. package/serialization/resources/sync/client/listAllJobs.js +42 -0
  282. package/serialization/types/EntityDefinition.d.ts +1 -3
  283. package/serialization/types/EntityDefinition.js +1 -3
  284. package/serialization/types/SyncJob.d.ts +1 -0
  285. package/serialization/types/SyncJob.js +1 -0
  286. package/serialization/types/index.d.ts +0 -4
  287. package/serialization/types/index.js +0 -4
  288. package/version.d.ts +1 -1
  289. package/version.js +1 -1
  290. package/dist/serialization/types/ApiKeyCreate.d.ts +0 -12
  291. package/dist/serialization/types/ChatMessageCreate.d.ts +0 -13
  292. package/serialization/types/ApiKeyCreate.d.ts +0 -12
  293. package/serialization/types/ChatMessageCreate.d.ts +0 -13
  294. /package/api/{types → resources/apiKeys/client/requests}/ApiKeyCreate.js +0 -0
  295. /package/api/resources/{sync/client/requests/GetSyncJobSyncJobJobIdGetRequest.js → apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js} +0 -0
  296. /package/api/{types/ChatCreate.js → resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js} +0 -0
  297. /package/{dist/api/types → api/resources/chat/client/requests}/ChatCreate.js +0 -0
  298. /package/api/{types → resources/chat/client/requests}/ChatMessageCreate.js +0 -0
  299. /package/api/{types → resources/chat/client/requests}/ChatUpdate.js +0 -0
  300. /package/{dist/api/resources/sync/client/requests/GetSyncJobSyncJobJobIdGetRequest.js → api/resources/chat/client/requests/ListChatsChatGetRequest.js} +0 -0
  301. /package/{dist/api/types/ApiKeyCreate.js → api/resources/connections/client/requests/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js} +0 -0
  302. /package/{dist/api/types/ChatMessageCreate.js → api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js} +0 -0
  303. /package/{dist/api/types/ChatUpdate.js → api/resources/search/client/requests/SearchSearchGetRequest.js} +0 -0
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -2,7 +2,11 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * Schema for creating a chat.
5
+ * @example
6
+ * {
7
+ * name: "name",
8
+ * syncId: "sync_id"
9
+ * }
6
10
  */
7
11
  export interface ChatCreate {
8
12
  name: string;
@@ -2,7 +2,10 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * Schema for creating a chat message.
5
+ * @example
6
+ * {
7
+ * content: "content"
8
+ * }
6
9
  */
7
10
  export interface ChatMessageCreate {
8
11
  content: string;
@@ -2,7 +2,8 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * Schema for updating a chat.
5
+ * @example
6
+ * {}
6
7
  */
7
8
  export interface ChatUpdate {
8
9
  name?: string;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface ListChatsChatGetRequest {
9
+ skip?: number;
10
+ limit?: number;
11
+ }
@@ -0,0 +1,4 @@
1
+ export { type ListChatsChatGetRequest } from "./ListChatsChatGetRequest";
2
+ export { type ChatCreate } from "./ChatCreate";
3
+ export { type ChatUpdate } from "./ChatUpdate";
4
+ export { type ChatMessageCreate } from "./ChatMessageCreate";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
@@ -186,7 +186,7 @@ export declare class Connections {
186
186
  *
187
187
  * Returns:
188
188
  * --------
189
- * connection_schema (schemas.Connection): The disconnected connection
189
+ * connection (schemas.Connection): The disconnected connection
190
190
  *
191
191
  * @param {string} connectionId
192
192
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
@@ -197,36 +197,12 @@ export declare class Connections {
197
197
  * await client.connections.disconnectSourceConnection("connection_id")
198
198
  */
199
199
  disconnectSourceConnection(connectionId: string, requestOptions?: Connections.RequestOptions): Promise<AirweaveSDK.Connection>;
200
- /**
201
- * Disconnect from a destination connection.
202
- *
203
- * Args:
204
- * -----
205
- * db (AsyncSession): The database session
206
- * connection_id (UUID): The ID of the connection to disconnect
207
- * user (schemas.User): The current user
208
- *
209
- * Returns:
210
- * --------
211
- * connection_schema (schemas.Connection): The disconnected connection
212
- *
213
- * @param {string} connectionId
214
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
215
- *
216
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
217
- *
218
- * @example
219
- * await client.connections.disconnectDestinationConnection("connection_id")
220
- */
221
- disconnectDestinationConnection(connectionId: string, requestOptions?: Connections.RequestOptions): Promise<AirweaveSDK.Connection>;
222
200
  /**
223
201
  * Get the OAuth2 authorization URL for a source.
224
202
  *
225
203
  * Args:
226
204
  * -----
227
- * db: The database session
228
205
  * short_name: The short name of the source
229
- * user: The current user
230
206
  *
231
207
  * @param {AirweaveSDK.GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest} request
232
208
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
@@ -317,4 +293,29 @@ export declare class Connections {
317
293
  * await client.connections.getOauth2WhiteLabelAuthUrl("white_label_id")
318
294
  */
319
295
  getOauth2WhiteLabelAuthUrl(whiteLabelId: string, requestOptions?: Connections.RequestOptions): Promise<string>;
296
+ /**
297
+ * Connect to Slack using a direct API token (for local development only).
298
+ *
299
+ * Args:
300
+ * -----
301
+ * db: The database session.
302
+ * token: The Slack API token.
303
+ * name: The name of the connection.
304
+ * user: The current user.
305
+ *
306
+ * Returns:
307
+ * -------
308
+ * schemas.Connection: The connection.
309
+ *
310
+ * @param {AirweaveSDK.BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost} request
311
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
312
+ *
313
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
314
+ *
315
+ * @example
316
+ * await client.connections.connectSlackWithToken({
317
+ * token: "token"
318
+ * })
319
+ */
320
+ connectSlackWithToken(request: AirweaveSDK.BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost, requestOptions?: Connections.RequestOptions): Promise<AirweaveSDK.Connection>;
320
321
  }
@@ -88,7 +88,7 @@ class Connections {
88
88
  method: "GET",
89
89
  headers: Object.assign({ "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.27", "User-Agent": "@airweave/sdk/0.1.27", "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.34", "User-Agent": "@airweave/sdk/v0.1.34", "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,
@@ -161,7 +161,7 @@ class Connections {
161
161
  method: "GET",
162
162
  headers: Object.assign({ "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.27", "User-Agent": "@airweave/sdk/0.1.27", "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.34", "User-Agent": "@airweave/sdk/v0.1.34", "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,
@@ -236,7 +236,7 @@ class Connections {
236
236
  method: "GET",
237
237
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
238
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.27", "User-Agent": "@airweave/sdk/0.1.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
239
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
240
240
  contentType: "application/json",
241
241
  requestType: "json",
242
242
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -328,7 +328,7 @@ class Connections {
328
328
  method: "POST",
329
329
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
330
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.27", "User-Agent": "@airweave/sdk/0.1.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
331
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
332
332
  contentType: "application/json",
333
333
  requestType: "json",
334
334
  body: serializers.BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -404,7 +404,7 @@ class Connections {
404
404
  method: "GET",
405
405
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
406
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.27", "User-Agent": "@airweave/sdk/0.1.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
407
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
408
408
  contentType: "application/json",
409
409
  requestType: "json",
410
410
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -481,7 +481,7 @@ class Connections {
481
481
  method: "DELETE",
482
482
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
483
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.27", "User-Agent": "@airweave/sdk/0.1.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
484
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
485
485
  contentType: "application/json",
486
486
  requestType: "json",
487
487
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -538,7 +538,7 @@ class Connections {
538
538
  *
539
539
  * Returns:
540
540
  * --------
541
- * connection_schema (schemas.Connection): The disconnected connection
541
+ * connection (schemas.Connection): The disconnected connection
542
542
  *
543
543
  * @param {string} connectionId
544
544
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
@@ -556,7 +556,7 @@ class Connections {
556
556
  method: "PUT",
557
557
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
558
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.27", "User-Agent": "@airweave/sdk/0.1.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
559
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
560
560
  contentType: "application/json",
561
561
  requestType: "json",
562
562
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -603,43 +603,43 @@ class Connections {
603
603
  });
604
604
  }
605
605
  /**
606
- * Disconnect from a destination connection.
606
+ * Get the OAuth2 authorization URL for a source.
607
607
  *
608
608
  * Args:
609
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
610
+ * short_name: The short name of the source
617
611
  *
618
- * @param {string} connectionId
612
+ * @param {AirweaveSDK.GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest} request
619
613
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
620
614
  *
621
615
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
622
616
  *
623
617
  * @example
624
- * await client.connections.disconnectDestinationConnection("connection_id")
618
+ * await client.connections.getOauth2AuthUrl({
619
+ * shortName: "short_name"
620
+ * })
625
621
  */
626
- disconnectDestinationConnection(connectionId, requestOptions) {
622
+ getOauth2AuthUrl(request, requestOptions) {
627
623
  return __awaiter(this, void 0, void 0, function* () {
628
624
  var _a;
625
+ const { shortName } = request;
626
+ const _queryParams = {};
627
+ _queryParams["short_name"] = shortName;
629
628
  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",
629
+ 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"),
630
+ method: "GET",
632
631
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
633
632
  ? 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.27", "User-Agent": "@airweave/sdk/0.1.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
633
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
635
634
  contentType: "application/json",
635
+ queryParameters: _queryParams,
636
636
  requestType: "json",
637
637
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
638
638
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
639
639
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
640
640
  });
641
641
  if (_response.ok) {
642
- return serializers.Connection.parseOrThrow(_response.body, {
642
+ return serializers.connections.getOauth2AuthUrl.Response.parseOrThrow(_response.body, {
643
643
  unrecognizedObjectKeys: "passthrough",
644
644
  allowUnrecognizedUnionMembers: true,
645
645
  allowUnrecognizedEnumValues: true,
@@ -669,7 +669,7 @@ class Connections {
669
669
  body: _response.error.rawBody,
670
670
  });
671
671
  case "timeout":
672
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /connections/disconnect/destination/{connection_id}.");
672
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/source/auth_url.");
673
673
  case "unknown":
674
674
  throw new errors.AirweaveSDKError({
675
675
  message: _response.error.errorMessage,
@@ -678,45 +678,55 @@ class Connections {
678
678
  });
679
679
  }
680
680
  /**
681
- * Get the OAuth2 authorization URL for a source.
681
+ * Send the OAuth2 authorization code for a source.
682
+ *
683
+ * This will:
684
+ * 1. Get the OAuth2 settings for the source
685
+ * 2. Exchange the authorization code for a token
686
+ * 3. Create an integration credential with the token
682
687
  *
683
688
  * Args:
684
689
  * -----
685
690
  * db: The database session
686
691
  * short_name: The short name of the source
692
+ * code: The authorization code
687
693
  * user: The current user
688
694
  *
689
- * @param {AirweaveSDK.GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest} request
695
+ * Returns:
696
+ * --------
697
+ * connection (schemas.Connection): The created connection
698
+ *
699
+ * @param {AirweaveSDK.BodySendOauth2CodeConnectionsOauth2SourceCodePost} request
690
700
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
691
701
  *
692
702
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
693
703
  *
694
704
  * @example
695
- * await client.connections.getOauth2AuthUrl({
696
- * shortName: "short_name"
705
+ * await client.connections.sendOauth2Code({
706
+ * shortName: "short_name",
707
+ * code: "code"
697
708
  * })
698
709
  */
699
- getOauth2AuthUrl(request, requestOptions) {
710
+ sendOauth2Code(request, requestOptions) {
700
711
  return __awaiter(this, void 0, void 0, function* () {
701
712
  var _a;
702
- const { shortName } = request;
703
- const _queryParams = {};
704
- _queryParams["short_name"] = shortName;
705
713
  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",
714
+ 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"),
715
+ method: "POST",
708
716
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
709
717
  ? 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.27", "User-Agent": "@airweave/sdk/0.1.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
718
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
711
719
  contentType: "application/json",
712
- queryParameters: _queryParams,
713
720
  requestType: "json",
721
+ body: serializers.BodySendOauth2CodeConnectionsOauth2SourceCodePost.jsonOrThrow(request, {
722
+ unrecognizedObjectKeys: "strip",
723
+ }),
714
724
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
715
725
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
716
726
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
717
727
  });
718
728
  if (_response.ok) {
719
- return serializers.connections.getOauth2AuthUrl.Response.parseOrThrow(_response.body, {
729
+ return serializers.Connection.parseOrThrow(_response.body, {
720
730
  unrecognizedObjectKeys: "passthrough",
721
731
  allowUnrecognizedUnionMembers: true,
722
732
  allowUnrecognizedEnumValues: true,
@@ -746,7 +756,7 @@ class Connections {
746
756
  body: _response.error.rawBody,
747
757
  });
748
758
  case "timeout":
749
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/source/auth_url.");
759
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/oauth2/source/code.");
750
760
  case "unknown":
751
761
  throw new errors.AirweaveSDKError({
752
762
  message: _response.error.errorMessage,
@@ -755,47 +765,41 @@ class Connections {
755
765
  });
756
766
  }
757
767
  /**
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
768
+ * Exchange the OAuth2 authorization code for a white label integration.
764
769
  *
765
770
  * Args:
766
771
  * -----
767
772
  * db: The database session
768
- * short_name: The short name of the source
773
+ * white_label_id: The ID of the white label integration
769
774
  * code: The authorization code
770
775
  * user: The current user
776
+ * background_tasks: The background tasks
771
777
  *
772
778
  * Returns:
773
779
  * --------
774
780
  * connection (schemas.Connection): The created connection
775
781
  *
776
- * @param {AirweaveSDK.BodySendOauth2CodeConnectionsOauth2SourceCodePost} request
782
+ * @param {string} whiteLabelId
783
+ * @param {string} request
777
784
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
778
785
  *
779
786
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
780
787
  *
781
788
  * @example
782
- * await client.connections.sendOauth2Code({
783
- * shortName: "short_name",
784
- * code: "code"
785
- * })
789
+ * await client.connections.sendOauth2WhiteLabelCode("white_label_id", "string")
786
790
  */
787
- sendOauth2Code(request, requestOptions) {
791
+ sendOauth2WhiteLabelCode(whiteLabelId, request, requestOptions) {
788
792
  return __awaiter(this, void 0, void 0, function* () {
789
793
  var _a;
790
794
  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"),
795
+ 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`),
792
796
  method: "POST",
793
797
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
794
798
  ? 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.27", "User-Agent": "@airweave/sdk/0.1.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
799
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
796
800
  contentType: "application/json",
797
801
  requestType: "json",
798
- body: serializers.BodySendOauth2CodeConnectionsOauth2SourceCodePost.jsonOrThrow(request, {
802
+ body: serializers.connections.sendOauth2WhiteLabelCode.Request.jsonOrThrow(request, {
799
803
  unrecognizedObjectKeys: "strip",
800
804
  }),
801
805
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -833,7 +837,7 @@ class Connections {
833
837
  body: _response.error.rawBody,
834
838
  });
835
839
  case "timeout":
836
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/oauth2/source/code.");
840
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/oauth2/white-label/{white_label_id}/code.");
837
841
  case "unknown":
838
842
  throw new errors.AirweaveSDKError({
839
843
  message: _response.error.errorMessage,
@@ -842,49 +846,43 @@ class Connections {
842
846
  });
843
847
  }
844
848
  /**
845
- * Exchange the OAuth2 authorization code for a white label integration.
849
+ * Get the OAuth2 authorization URL for a white label integration.
846
850
  *
847
851
  * Args:
848
852
  * -----
849
853
  * db: The database session
850
854
  * white_label_id: The ID of the white label integration
851
- * code: The authorization code
852
855
  * user: The current user
853
- * background_tasks: The background tasks
854
856
  *
855
857
  * Returns:
856
858
  * --------
857
- * connection (schemas.Connection): The created connection
859
+ * str: The OAuth2 authorization URL
858
860
  *
859
861
  * @param {string} whiteLabelId
860
- * @param {string} request
861
862
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
862
863
  *
863
864
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
864
865
  *
865
866
  * @example
866
- * await client.connections.sendOauth2WhiteLabelCode("white_label_id", "string")
867
+ * await client.connections.getOauth2WhiteLabelAuthUrl("white_label_id")
867
868
  */
868
- sendOauth2WhiteLabelCode(whiteLabelId, request, requestOptions) {
869
+ getOauth2WhiteLabelAuthUrl(whiteLabelId, requestOptions) {
869
870
  return __awaiter(this, void 0, void 0, function* () {
870
871
  var _a;
871
872
  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",
873
+ 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`),
874
+ method: "GET",
874
875
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
875
876
  ? 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.27", "User-Agent": "@airweave/sdk/0.1.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
877
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
877
878
  contentType: "application/json",
878
879
  requestType: "json",
879
- body: serializers.connections.sendOauth2WhiteLabelCode.Request.jsonOrThrow(request, {
880
- unrecognizedObjectKeys: "strip",
881
- }),
882
880
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
883
881
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
884
882
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
885
883
  });
886
884
  if (_response.ok) {
887
- return serializers.Connection.parseOrThrow(_response.body, {
885
+ return serializers.connections.getOauth2WhiteLabelAuthUrl.Response.parseOrThrow(_response.body, {
888
886
  unrecognizedObjectKeys: "passthrough",
889
887
  allowUnrecognizedUnionMembers: true,
890
888
  allowUnrecognizedEnumValues: true,
@@ -914,7 +912,7 @@ class Connections {
914
912
  body: _response.error.rawBody,
915
913
  });
916
914
  case "timeout":
917
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/oauth2/white-label/{white_label_id}/code.");
915
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/white-label/{white_label_id}/auth_url.");
918
916
  case "unknown":
919
917
  throw new errors.AirweaveSDKError({
920
918
  message: _response.error.errorMessage,
@@ -923,43 +921,49 @@ class Connections {
923
921
  });
924
922
  }
925
923
  /**
926
- * Get the OAuth2 authorization URL for a white label integration.
924
+ * Connect to Slack using a direct API token (for local development only).
927
925
  *
928
926
  * Args:
929
927
  * -----
930
- * db: The database session
931
- * white_label_id: The ID of the white label integration
932
- * user: The current user
928
+ * db: The database session.
929
+ * token: The Slack API token.
930
+ * name: The name of the connection.
931
+ * user: The current user.
933
932
  *
934
933
  * Returns:
935
- * --------
936
- * str: The OAuth2 authorization URL
934
+ * -------
935
+ * schemas.Connection: The connection.
937
936
  *
938
- * @param {string} whiteLabelId
937
+ * @param {AirweaveSDK.BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost} request
939
938
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
940
939
  *
941
940
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
942
941
  *
943
942
  * @example
944
- * await client.connections.getOauth2WhiteLabelAuthUrl("white_label_id")
943
+ * await client.connections.connectSlackWithToken({
944
+ * token: "token"
945
+ * })
945
946
  */
946
- getOauth2WhiteLabelAuthUrl(whiteLabelId, requestOptions) {
947
+ connectSlackWithToken(request, requestOptions) {
947
948
  return __awaiter(this, void 0, void 0, function* () {
948
949
  var _a;
949
950
  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",
951
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/direct-token/slack"),
952
+ method: "POST",
952
953
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
953
954
  ? 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.27", "User-Agent": "@airweave/sdk/0.1.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
955
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.34", "User-Agent": "@airweave/sdk/v0.1.34", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
955
956
  contentType: "application/json",
956
957
  requestType: "json",
958
+ body: serializers.BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.jsonOrThrow(request, {
959
+ unrecognizedObjectKeys: "strip",
960
+ }),
957
961
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
958
962
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
959
963
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
960
964
  });
961
965
  if (_response.ok) {
962
- return serializers.connections.getOauth2WhiteLabelAuthUrl.Response.parseOrThrow(_response.body, {
966
+ return serializers.Connection.parseOrThrow(_response.body, {
963
967
  unrecognizedObjectKeys: "passthrough",
964
968
  allowUnrecognizedUnionMembers: true,
965
969
  allowUnrecognizedEnumValues: true,
@@ -989,7 +993,7 @@ class Connections {
989
993
  body: _response.error.rawBody,
990
994
  });
991
995
  case "timeout":
992
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/white-label/{white_label_id}/auth_url.");
996
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/direct-token/slack.");
993
997
  case "unknown":
994
998
  throw new errors.AirweaveSDKError({
995
999
  message: _response.error.errorMessage,
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * token: "token"
8
+ * }
9
+ */
10
+ export interface BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost {
11
+ token: string;
12
+ name?: string;
13
+ }
@@ -1,3 +1,4 @@
1
1
  export { type BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost } from "./BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost";
2
2
  export { type GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest } from "./GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest";
3
3
  export { type BodySendOauth2CodeConnectionsOauth2SourceCodePost } from "./BodySendOauth2CodeConnectionsOauth2SourceCodePost";
4
+ export { type BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost } from "./BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost";