@airweave/sdk 0.2.23 → 0.2.25

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 (380) hide show
  1. package/Client.d.ts +15 -0
  2. package/Client.js +37 -12
  3. package/api/resources/apiKeys/client/Client.js +12 -12
  4. package/api/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +1 -0
  5. package/api/resources/chat/client/Client.d.ts +77 -0
  6. package/api/resources/chat/client/Client.js +227 -0
  7. package/api/resources/chat/client/index.d.ts +1 -0
  8. package/api/resources/chat/client/index.js +17 -0
  9. package/api/{types → resources/chat/client/requests}/ChatCreate.d.ts +5 -1
  10. package/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +11 -0
  11. package/api/resources/chat/client/requests/index.d.ts +2 -0
  12. package/api/resources/chat/client/requests/index.js +2 -0
  13. package/api/resources/chat/index.d.ts +1 -0
  14. package/api/resources/chat/index.js +17 -0
  15. package/api/resources/connections/client/Client.d.ts +2 -2
  16. package/api/resources/connections/client/Client.js +11 -11
  17. package/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +2 -2
  18. package/api/resources/dag/client/Client.d.ts +81 -0
  19. package/api/resources/dag/client/Client.js +276 -0
  20. package/api/resources/dag/client/index.d.ts +1 -0
  21. package/api/resources/dag/client/index.js +17 -0
  22. package/api/resources/dag/client/requests/SyncDagCreate.d.ts +26 -0
  23. package/{dist/api/types → api/resources/dag/client/requests}/SyncDagUpdate.d.ts +7 -3
  24. package/api/resources/dag/client/requests/index.d.ts +2 -0
  25. package/api/resources/dag/client/requests/index.js +2 -0
  26. package/api/resources/dag/index.d.ts +1 -0
  27. package/api/resources/dag/index.js +17 -0
  28. package/api/resources/embeddingModels/client/Client.d.ts +1 -1
  29. package/api/resources/embeddingModels/client/Client.js +3 -3
  30. package/api/resources/entities/client/Client.d.ts +119 -0
  31. package/api/resources/entities/client/Client.js +480 -0
  32. package/api/resources/entities/client/index.d.ts +1 -0
  33. package/api/resources/entities/client/index.js +17 -0
  34. package/{dist/api/types → api/resources/entities/client/requests}/EntityDefinitionCreate.d.ts +9 -2
  35. package/{dist/api/types → api/resources/entities/client/requests}/EntityRelationCreate.d.ts +6 -1
  36. package/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +12 -0
  37. package/api/resources/entities/client/requests/index.d.ts +3 -0
  38. package/api/resources/entities/client/requests/index.js +2 -0
  39. package/api/resources/entities/index.d.ts +2 -0
  40. package/api/resources/entities/index.js +18 -0
  41. package/api/resources/entities/types/index.d.ts +1 -0
  42. package/api/resources/entities/types/index.js +17 -0
  43. package/api/resources/index.d.ts +10 -0
  44. package/api/resources/index.js +11 -1
  45. package/api/resources/search/client/Client.d.ts +3 -2
  46. package/api/resources/search/client/Client.js +9 -5
  47. package/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +5 -0
  48. package/api/resources/sources/client/Client.d.ts +1 -1
  49. package/api/resources/sources/client/Client.js +3 -3
  50. package/api/resources/sync/client/Client.d.ts +3 -1
  51. package/api/resources/sync/client/Client.js +27 -17
  52. package/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +4 -0
  53. package/api/resources/transformers/client/Client.d.ts +58 -0
  54. package/api/resources/transformers/client/Client.js +199 -0
  55. package/api/resources/transformers/client/index.d.ts +1 -0
  56. package/api/resources/transformers/client/index.js +17 -0
  57. package/{dist/api/types → api/resources/transformers/client/requests}/TransformerCreate.d.ts +8 -1
  58. package/api/resources/transformers/client/requests/index.d.ts +1 -0
  59. package/api/resources/transformers/client/requests/index.js +2 -0
  60. package/api/resources/transformers/index.d.ts +1 -0
  61. package/api/resources/transformers/index.js +17 -0
  62. package/api/resources/users/client/Client.d.ts +48 -0
  63. package/api/resources/users/client/Client.js +135 -0
  64. package/api/resources/users/client/index.d.ts +1 -0
  65. package/api/resources/users/client/index.js +2 -0
  66. package/api/resources/users/index.d.ts +1 -0
  67. package/api/resources/users/index.js +17 -0
  68. package/api/resources/whiteLabels/client/Client.js +10 -10
  69. package/api/types/ApiKey.d.ts +1 -1
  70. package/api/types/ApiKeyWithPlainKey.d.ts +1 -1
  71. package/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
  72. package/api/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +2 -2
  73. package/api/types/{EmbeddingModelWithConfigFields.d.ts → EmbeddingModelWithAuthenticationFields.d.ts} +2 -2
  74. package/api/types/EntityCount.d.ts +9 -0
  75. package/api/types/Organization.d.ts +13 -0
  76. package/api/types/ResponseType.d.ts +11 -0
  77. package/api/types/ResponseType.js +10 -0
  78. package/api/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +2 -2
  79. package/api/types/SyncJob.d.ts +5 -4
  80. package/api/types/User.d.ts +1 -1
  81. package/api/types/UserCreate.d.ts +11 -0
  82. package/api/types/index.d.ts +7 -10
  83. package/api/types/index.js +7 -10
  84. package/dist/Client.d.ts +15 -0
  85. package/dist/Client.js +37 -12
  86. package/dist/api/resources/apiKeys/client/Client.js +12 -12
  87. package/dist/api/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +1 -0
  88. package/dist/api/resources/chat/client/Client.d.ts +77 -0
  89. package/dist/api/resources/chat/client/Client.js +227 -0
  90. package/dist/api/resources/chat/client/index.d.ts +1 -0
  91. package/dist/api/resources/chat/client/index.js +17 -0
  92. package/dist/api/{types → resources/chat/client/requests}/ChatCreate.d.ts +5 -1
  93. package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +11 -0
  94. package/dist/api/resources/chat/client/requests/index.d.ts +2 -0
  95. package/dist/api/resources/chat/client/requests/index.js +2 -0
  96. package/dist/api/resources/chat/index.d.ts +1 -0
  97. package/dist/api/resources/chat/index.js +17 -0
  98. package/dist/api/resources/connections/client/Client.d.ts +2 -2
  99. package/dist/api/resources/connections/client/Client.js +11 -11
  100. package/dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +2 -2
  101. package/dist/api/resources/dag/client/Client.d.ts +81 -0
  102. package/dist/api/resources/dag/client/Client.js +276 -0
  103. package/dist/api/resources/dag/client/index.d.ts +1 -0
  104. package/dist/api/resources/dag/client/index.js +17 -0
  105. package/dist/api/resources/dag/client/requests/SyncDagCreate.d.ts +26 -0
  106. package/{api/types → dist/api/resources/dag/client/requests}/SyncDagUpdate.d.ts +7 -3
  107. package/dist/api/resources/dag/client/requests/index.d.ts +2 -0
  108. package/dist/api/resources/dag/client/requests/index.js +2 -0
  109. package/dist/api/resources/dag/index.d.ts +1 -0
  110. package/dist/api/resources/dag/index.js +17 -0
  111. package/dist/api/resources/embeddingModels/client/Client.d.ts +1 -1
  112. package/dist/api/resources/embeddingModels/client/Client.js +3 -3
  113. package/dist/api/resources/entities/client/Client.d.ts +119 -0
  114. package/dist/api/resources/entities/client/Client.js +480 -0
  115. package/dist/api/resources/entities/client/index.d.ts +1 -0
  116. package/dist/api/resources/entities/client/index.js +17 -0
  117. package/{api/types → dist/api/resources/entities/client/requests}/EntityDefinitionCreate.d.ts +9 -2
  118. package/{api/types → dist/api/resources/entities/client/requests}/EntityRelationCreate.d.ts +6 -1
  119. package/dist/api/resources/entities/client/requests/EntityRelationCreate.js +5 -0
  120. package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +12 -0
  121. package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js +5 -0
  122. package/dist/api/resources/entities/client/requests/index.d.ts +3 -0
  123. package/dist/api/resources/entities/client/requests/index.js +2 -0
  124. package/dist/api/resources/entities/index.d.ts +2 -0
  125. package/dist/api/resources/entities/index.js +18 -0
  126. package/dist/api/resources/entities/types/EntityDefinitionCreateEntitySchema.js +5 -0
  127. package/dist/api/resources/entities/types/index.d.ts +1 -0
  128. package/dist/api/resources/entities/types/index.js +17 -0
  129. package/dist/api/resources/index.d.ts +10 -0
  130. package/dist/api/resources/index.js +11 -1
  131. package/dist/api/resources/search/client/Client.d.ts +3 -2
  132. package/dist/api/resources/search/client/Client.js +9 -5
  133. package/dist/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +5 -0
  134. package/dist/api/resources/sources/client/Client.d.ts +1 -1
  135. package/dist/api/resources/sources/client/Client.js +3 -3
  136. package/dist/api/resources/sync/client/Client.d.ts +3 -1
  137. package/dist/api/resources/sync/client/Client.js +27 -17
  138. package/dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +4 -0
  139. package/dist/api/resources/transformers/client/Client.d.ts +58 -0
  140. package/dist/api/resources/transformers/client/Client.js +199 -0
  141. package/dist/api/resources/transformers/client/index.d.ts +1 -0
  142. package/dist/api/resources/transformers/client/index.js +17 -0
  143. package/{api/types → dist/api/resources/transformers/client/requests}/TransformerCreate.d.ts +8 -1
  144. package/dist/api/resources/transformers/client/requests/TransformerCreate.js +5 -0
  145. package/dist/api/resources/transformers/client/requests/index.d.ts +1 -0
  146. package/dist/api/resources/transformers/client/requests/index.js +2 -0
  147. package/dist/api/resources/transformers/index.d.ts +1 -0
  148. package/dist/api/resources/transformers/index.js +17 -0
  149. package/dist/api/resources/users/client/Client.d.ts +48 -0
  150. package/dist/api/resources/users/client/Client.js +135 -0
  151. package/dist/api/resources/users/client/index.d.ts +1 -0
  152. package/dist/api/resources/users/client/index.js +2 -0
  153. package/dist/api/resources/users/index.d.ts +1 -0
  154. package/dist/api/resources/users/index.js +17 -0
  155. package/dist/api/resources/whiteLabels/client/Client.js +10 -10
  156. package/dist/api/types/ApiKey.d.ts +1 -1
  157. package/dist/api/types/ApiKeyWithPlainKey.d.ts +1 -1
  158. package/dist/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
  159. package/dist/api/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +2 -2
  160. package/dist/api/types/DestinationWithAuthenticationFields.js +5 -0
  161. package/dist/api/types/{EmbeddingModelWithConfigFields.d.ts → EmbeddingModelWithAuthenticationFields.d.ts} +2 -2
  162. package/dist/api/types/EmbeddingModelWithAuthenticationFields.js +5 -0
  163. package/dist/api/types/EntityCount.d.ts +9 -0
  164. package/dist/api/types/EntityCount.js +5 -0
  165. package/dist/api/types/Organization.d.ts +13 -0
  166. package/dist/api/types/Organization.js +5 -0
  167. package/dist/api/types/ResponseType.d.ts +11 -0
  168. package/dist/api/types/ResponseType.js +10 -0
  169. package/dist/api/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +2 -2
  170. package/dist/api/types/SourceWithAuthenticationFields.js +5 -0
  171. package/dist/api/types/SyncJob.d.ts +5 -4
  172. package/dist/api/types/User.d.ts +1 -1
  173. package/dist/api/types/UserCreate.d.ts +11 -0
  174. package/dist/api/types/UserCreate.js +5 -0
  175. package/dist/api/types/index.d.ts +7 -10
  176. package/dist/api/types/index.js +7 -10
  177. package/dist/serialization/resources/chat/client/index.d.ts +2 -0
  178. package/dist/serialization/resources/chat/client/index.js +41 -0
  179. package/dist/serialization/resources/chat/client/listChats.d.ts +11 -0
  180. package/dist/serialization/resources/chat/client/listChats.js +42 -0
  181. package/dist/serialization/{types → resources/chat/client/requests}/ChatCreate.d.ts +4 -4
  182. package/{serialization/types → dist/serialization/resources/chat/client/requests}/ChatCreate.js +1 -1
  183. package/dist/serialization/resources/chat/client/requests/index.d.ts +1 -0
  184. package/dist/serialization/resources/chat/client/requests/index.js +5 -0
  185. package/dist/serialization/resources/chat/index.d.ts +1 -0
  186. package/dist/serialization/resources/chat/index.js +17 -0
  187. package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -1
  188. package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +1 -1
  189. package/dist/serialization/resources/dag/client/index.d.ts +1 -0
  190. package/dist/serialization/resources/dag/client/index.js +17 -0
  191. package/dist/serialization/resources/dag/client/requests/SyncDagCreate.d.ts +18 -0
  192. package/{serialization/types → dist/serialization/resources/dag/client/requests}/SyncDagCreate.js +4 -4
  193. package/dist/serialization/resources/dag/client/requests/SyncDagUpdate.d.ts +18 -0
  194. package/{serialization/types → dist/serialization/resources/dag/client/requests}/SyncDagUpdate.js +4 -4
  195. package/dist/serialization/resources/dag/client/requests/index.d.ts +2 -0
  196. package/dist/serialization/resources/dag/client/requests/index.js +7 -0
  197. package/dist/serialization/resources/dag/index.d.ts +1 -0
  198. package/dist/serialization/resources/dag/index.js +17 -0
  199. package/dist/serialization/resources/entities/client/getEntityDefinitionsByIds.d.ts +15 -0
  200. package/dist/serialization/resources/entities/client/getEntityDefinitionsByIds.js +43 -0
  201. package/dist/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.d.ts +11 -0
  202. package/dist/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +42 -0
  203. package/dist/serialization/resources/entities/client/index.d.ts +5 -0
  204. package/dist/serialization/resources/entities/client/index.js +44 -0
  205. package/dist/serialization/resources/entities/client/listEntityDefinitions.d.ts +11 -0
  206. package/dist/serialization/resources/entities/client/listEntityDefinitions.js +42 -0
  207. package/dist/serialization/resources/entities/client/listEntityRelations.d.ts +11 -0
  208. package/dist/serialization/resources/entities/client/listEntityRelations.js +42 -0
  209. package/{serialization/types → dist/serialization/resources/entities/client/requests}/EntityDefinitionCreate.d.ts +6 -6
  210. package/dist/serialization/{types → resources/entities/client/requests}/EntityDefinitionCreate.js +3 -3
  211. package/dist/serialization/resources/entities/client/requests/EntityRelationCreate.d.ts +15 -0
  212. package/{serialization/types → dist/serialization/resources/entities/client/requests}/EntityRelationCreate.js +1 -1
  213. package/dist/serialization/resources/entities/client/requests/index.d.ts +2 -0
  214. package/dist/serialization/resources/entities/client/requests/index.js +7 -0
  215. package/dist/serialization/resources/entities/index.d.ts +2 -0
  216. package/dist/serialization/resources/entities/index.js +18 -0
  217. package/dist/serialization/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.d.ts +3 -3
  218. package/dist/serialization/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.js +1 -1
  219. package/dist/serialization/resources/entities/types/index.d.ts +1 -0
  220. package/dist/serialization/resources/entities/types/index.js +17 -0
  221. package/dist/serialization/resources/index.d.ts +9 -0
  222. package/dist/serialization/resources/index.js +10 -1
  223. package/dist/serialization/resources/search/client/search.d.ts +2 -2
  224. package/dist/serialization/resources/search/client/search.js +1 -1
  225. package/dist/serialization/resources/transformers/client/index.d.ts +2 -0
  226. package/dist/serialization/resources/transformers/client/index.js +41 -0
  227. package/dist/serialization/resources/transformers/client/listTransformers.d.ts +11 -0
  228. package/dist/serialization/resources/transformers/client/listTransformers.js +42 -0
  229. package/dist/serialization/{types → resources/transformers/client/requests}/TransformerCreate.d.ts +4 -4
  230. package/dist/serialization/{types → resources/transformers/client/requests}/TransformerCreate.js +1 -1
  231. package/dist/serialization/resources/transformers/client/requests/index.d.ts +1 -0
  232. package/dist/serialization/resources/transformers/client/requests/index.js +5 -0
  233. package/dist/serialization/resources/transformers/index.d.ts +1 -0
  234. package/dist/serialization/resources/transformers/index.js +17 -0
  235. package/dist/serialization/types/ApiKey.d.ts +1 -1
  236. package/dist/serialization/types/ApiKey.js +1 -1
  237. package/dist/serialization/types/ApiKeyWithPlainKey.d.ts +1 -1
  238. package/dist/serialization/types/ApiKeyWithPlainKey.js +1 -1
  239. package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
  240. package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +2 -0
  241. package/dist/serialization/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +3 -3
  242. package/dist/serialization/types/{DestinationWithConfigFields.js → DestinationWithAuthenticationFields.js} +3 -3
  243. package/{serialization/types/EmbeddingModelWithConfigFields.d.ts → dist/serialization/types/EmbeddingModelWithAuthenticationFields.d.ts} +3 -3
  244. package/{serialization/types/EmbeddingModelWithConfigFields.js → dist/serialization/types/EmbeddingModelWithAuthenticationFields.js} +3 -3
  245. package/dist/serialization/types/EntityCount.d.ts +12 -0
  246. package/dist/serialization/types/EntityCount.js +43 -0
  247. package/dist/serialization/types/Organization.d.ts +16 -0
  248. package/dist/serialization/types/Organization.js +47 -0
  249. package/dist/serialization/types/ResponseType.d.ts +10 -0
  250. package/dist/serialization/types/ResponseType.js +41 -0
  251. package/dist/serialization/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +3 -3
  252. package/dist/serialization/types/{SourceWithConfigFields.js → SourceWithAuthenticationFields.js} +3 -3
  253. package/dist/serialization/types/SyncJob.d.ts +5 -4
  254. package/dist/serialization/types/SyncJob.js +5 -4
  255. package/dist/serialization/types/User.d.ts +1 -1
  256. package/dist/serialization/types/User.js +1 -1
  257. package/dist/serialization/types/UserCreate.d.ts +14 -0
  258. package/dist/serialization/types/UserCreate.js +45 -0
  259. package/dist/serialization/types/index.d.ts +7 -10
  260. package/dist/serialization/types/index.js +7 -10
  261. package/dist/version.d.ts +1 -1
  262. package/dist/version.js +1 -1
  263. package/package.json +1 -1
  264. package/reference.md +962 -7
  265. package/serialization/resources/chat/client/index.d.ts +2 -0
  266. package/serialization/resources/chat/client/index.js +41 -0
  267. package/serialization/resources/chat/client/listChats.d.ts +11 -0
  268. package/serialization/resources/chat/client/listChats.js +42 -0
  269. package/serialization/{types → resources/chat/client/requests}/ChatCreate.d.ts +4 -4
  270. package/{dist/serialization/types → serialization/resources/chat/client/requests}/ChatCreate.js +1 -1
  271. package/serialization/resources/chat/client/requests/index.d.ts +1 -0
  272. package/serialization/resources/chat/client/requests/index.js +5 -0
  273. package/serialization/resources/chat/index.d.ts +1 -0
  274. package/serialization/resources/chat/index.js +17 -0
  275. package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -1
  276. package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +1 -1
  277. package/serialization/resources/dag/client/index.d.ts +1 -0
  278. package/serialization/resources/dag/client/index.js +17 -0
  279. package/serialization/resources/dag/client/requests/SyncDagCreate.d.ts +18 -0
  280. package/{dist/serialization/types → serialization/resources/dag/client/requests}/SyncDagCreate.js +4 -4
  281. package/serialization/resources/dag/client/requests/SyncDagUpdate.d.ts +18 -0
  282. package/{dist/serialization/types → serialization/resources/dag/client/requests}/SyncDagUpdate.js +4 -4
  283. package/serialization/resources/dag/client/requests/index.d.ts +2 -0
  284. package/serialization/resources/dag/client/requests/index.js +7 -0
  285. package/serialization/resources/dag/index.d.ts +1 -0
  286. package/serialization/resources/dag/index.js +17 -0
  287. package/serialization/resources/entities/client/getEntityDefinitionsByIds.d.ts +15 -0
  288. package/serialization/resources/entities/client/getEntityDefinitionsByIds.js +43 -0
  289. package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.d.ts +11 -0
  290. package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +42 -0
  291. package/serialization/resources/entities/client/index.d.ts +5 -0
  292. package/serialization/resources/entities/client/index.js +44 -0
  293. package/serialization/resources/entities/client/listEntityDefinitions.d.ts +11 -0
  294. package/serialization/resources/entities/client/listEntityDefinitions.js +42 -0
  295. package/serialization/resources/entities/client/listEntityRelations.d.ts +11 -0
  296. package/serialization/resources/entities/client/listEntityRelations.js +42 -0
  297. package/{dist/serialization/types → serialization/resources/entities/client/requests}/EntityDefinitionCreate.d.ts +6 -6
  298. package/serialization/{types → resources/entities/client/requests}/EntityDefinitionCreate.js +3 -3
  299. package/serialization/resources/entities/client/requests/EntityRelationCreate.d.ts +15 -0
  300. package/{dist/serialization/types → serialization/resources/entities/client/requests}/EntityRelationCreate.js +1 -1
  301. package/serialization/resources/entities/client/requests/index.d.ts +2 -0
  302. package/serialization/resources/entities/client/requests/index.js +7 -0
  303. package/serialization/resources/entities/index.d.ts +2 -0
  304. package/serialization/resources/entities/index.js +18 -0
  305. package/serialization/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.d.ts +3 -3
  306. package/serialization/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.js +1 -1
  307. package/serialization/resources/entities/types/index.d.ts +1 -0
  308. package/serialization/resources/entities/types/index.js +17 -0
  309. package/serialization/resources/index.d.ts +9 -0
  310. package/serialization/resources/index.js +10 -1
  311. package/serialization/resources/search/client/search.d.ts +2 -2
  312. package/serialization/resources/search/client/search.js +1 -1
  313. package/serialization/resources/transformers/client/index.d.ts +2 -0
  314. package/serialization/resources/transformers/client/index.js +41 -0
  315. package/serialization/resources/transformers/client/listTransformers.d.ts +11 -0
  316. package/serialization/resources/transformers/client/listTransformers.js +42 -0
  317. package/serialization/{types → resources/transformers/client/requests}/TransformerCreate.d.ts +4 -4
  318. package/serialization/{types → resources/transformers/client/requests}/TransformerCreate.js +1 -1
  319. package/serialization/resources/transformers/client/requests/index.d.ts +1 -0
  320. package/serialization/resources/transformers/client/requests/index.js +5 -0
  321. package/serialization/resources/transformers/index.d.ts +1 -0
  322. package/serialization/resources/transformers/index.js +17 -0
  323. package/serialization/types/ApiKey.d.ts +1 -1
  324. package/serialization/types/ApiKey.js +1 -1
  325. package/serialization/types/ApiKeyWithPlainKey.d.ts +1 -1
  326. package/serialization/types/ApiKeyWithPlainKey.js +1 -1
  327. package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
  328. package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +2 -0
  329. package/serialization/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +3 -3
  330. package/serialization/types/{DestinationWithConfigFields.js → DestinationWithAuthenticationFields.js} +3 -3
  331. package/{dist/serialization/types/EmbeddingModelWithConfigFields.d.ts → serialization/types/EmbeddingModelWithAuthenticationFields.d.ts} +3 -3
  332. package/{dist/serialization/types/EmbeddingModelWithConfigFields.js → serialization/types/EmbeddingModelWithAuthenticationFields.js} +3 -3
  333. package/serialization/types/EntityCount.d.ts +12 -0
  334. package/serialization/types/EntityCount.js +43 -0
  335. package/serialization/types/Organization.d.ts +16 -0
  336. package/serialization/types/Organization.js +47 -0
  337. package/serialization/types/ResponseType.d.ts +10 -0
  338. package/serialization/types/ResponseType.js +41 -0
  339. package/serialization/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +3 -3
  340. package/serialization/types/{SourceWithConfigFields.js → SourceWithAuthenticationFields.js} +3 -3
  341. package/serialization/types/SyncJob.d.ts +5 -4
  342. package/serialization/types/SyncJob.js +5 -4
  343. package/serialization/types/User.d.ts +1 -1
  344. package/serialization/types/User.js +1 -1
  345. package/serialization/types/UserCreate.d.ts +14 -0
  346. package/serialization/types/UserCreate.js +45 -0
  347. package/serialization/types/index.d.ts +7 -10
  348. package/serialization/types/index.js +7 -10
  349. package/version.d.ts +1 -1
  350. package/version.js +1 -1
  351. package/api/types/SyncDagCreate.d.ts +0 -14
  352. package/dist/api/types/SyncDagCreate.d.ts +0 -14
  353. package/dist/serialization/types/EntityRelationCreate.d.ts +0 -15
  354. package/dist/serialization/types/SyncDagCreate.d.ts +0 -18
  355. package/dist/serialization/types/SyncDagUpdate.d.ts +0 -18
  356. package/serialization/types/EntityRelationCreate.d.ts +0 -15
  357. package/serialization/types/SyncDagCreate.d.ts +0 -18
  358. package/serialization/types/SyncDagUpdate.d.ts +0 -18
  359. /package/api/{types → resources/chat/client/requests}/ChatCreate.js +0 -0
  360. /package/api/{types/DestinationWithConfigFields.js → resources/chat/client/requests/ListChatsChatGetRequest.js} +0 -0
  361. /package/api/{types → resources/dag/client/requests}/SyncDagCreate.js +0 -0
  362. /package/api/{types → resources/dag/client/requests}/SyncDagUpdate.js +0 -0
  363. /package/api/{types → resources/entities/client/requests}/EntityDefinitionCreate.js +0 -0
  364. /package/api/{types → resources/entities/client/requests}/EntityRelationCreate.js +0 -0
  365. /package/api/{types/EmbeddingModelWithConfigFields.js → resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js} +0 -0
  366. /package/api/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.d.ts +0 -0
  367. /package/api/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.js +0 -0
  368. /package/api/{types → resources/transformers/client/requests}/TransformerCreate.js +0 -0
  369. /package/api/types/{SourceWithConfigFields.js → DestinationWithAuthenticationFields.js} +0 -0
  370. /package/{dist/api/types/ChatCreate.js → api/types/EmbeddingModelWithAuthenticationFields.js} +0 -0
  371. /package/{dist/api/types/DestinationWithConfigFields.js → api/types/EntityCount.js} +0 -0
  372. /package/{dist/api/types/EmbeddingModelWithConfigFields.js → api/types/Organization.js} +0 -0
  373. /package/{dist/api/types/EntityDefinitionCreate.js → api/types/SourceWithAuthenticationFields.js} +0 -0
  374. /package/{dist/api/types/EntityDefinitionCreateEntitySchema.js → api/types/UserCreate.js} +0 -0
  375. /package/dist/api/{types/EntityRelationCreate.js → resources/chat/client/requests/ChatCreate.js} +0 -0
  376. /package/dist/api/{types/SourceWithConfigFields.js → resources/chat/client/requests/ListChatsChatGetRequest.js} +0 -0
  377. /package/dist/api/{types → resources/dag/client/requests}/SyncDagCreate.js +0 -0
  378. /package/dist/api/{types → resources/dag/client/requests}/SyncDagUpdate.js +0 -0
  379. /package/dist/api/{types/TransformerCreate.js → resources/entities/client/requests/EntityDefinitionCreate.js} +0 -0
  380. /package/dist/api/{types → resources/entities/types}/EntityDefinitionCreateEntitySchema.d.ts +0 -0
@@ -0,0 +1,199 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.Transformers = void 0;
52
+ const environments = __importStar(require("../../../../environments"));
53
+ const core = __importStar(require("../../../../core"));
54
+ const AirweaveSDK = __importStar(require("../../../index"));
55
+ const url_join_1 = __importDefault(require("url-join"));
56
+ const serializers = __importStar(require("../../../../serialization/index"));
57
+ const errors = __importStar(require("../../../../errors/index"));
58
+ class Transformers {
59
+ constructor(_options = {}) {
60
+ this._options = _options;
61
+ }
62
+ /**
63
+ * List all transformers for the current user's organization.
64
+ *
65
+ * @param {Transformers.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
68
+ *
69
+ * @example
70
+ * await client.transformers.listTransformers()
71
+ */
72
+ listTransformers(requestOptions) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ var _a;
75
+ const _response = yield core.fetcher({
76
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "transformers"),
77
+ method: "GET",
78
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
79
+ ? yield core.Supplier.get(this._options.apiKey)
80
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.25", "User-Agent": "@airweave/sdk/v0.2.25", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
+ contentType: "application/json",
82
+ requestType: "json",
83
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
84
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
85
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
86
+ });
87
+ if (_response.ok) {
88
+ return serializers.transformers.listTransformers.Response.parseOrThrow(_response.body, {
89
+ unrecognizedObjectKeys: "passthrough",
90
+ allowUnrecognizedUnionMembers: true,
91
+ allowUnrecognizedEnumValues: true,
92
+ breadcrumbsPrefix: ["response"],
93
+ });
94
+ }
95
+ if (_response.error.reason === "status-code") {
96
+ switch (_response.error.statusCode) {
97
+ case 422:
98
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
99
+ unrecognizedObjectKeys: "passthrough",
100
+ allowUnrecognizedUnionMembers: true,
101
+ allowUnrecognizedEnumValues: true,
102
+ breadcrumbsPrefix: ["response"],
103
+ }));
104
+ default:
105
+ throw new errors.AirweaveSDKError({
106
+ statusCode: _response.error.statusCode,
107
+ body: _response.error.body,
108
+ });
109
+ }
110
+ }
111
+ switch (_response.error.reason) {
112
+ case "non-json":
113
+ throw new errors.AirweaveSDKError({
114
+ statusCode: _response.error.statusCode,
115
+ body: _response.error.rawBody,
116
+ });
117
+ case "timeout":
118
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /transformers.");
119
+ case "unknown":
120
+ throw new errors.AirweaveSDKError({
121
+ message: _response.error.errorMessage,
122
+ });
123
+ }
124
+ });
125
+ }
126
+ /**
127
+ * Create a new transformer.
128
+ *
129
+ * @param {AirweaveSDK.TransformerCreate} request
130
+ * @param {Transformers.RequestOptions} requestOptions - Request-specific configuration.
131
+ *
132
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
133
+ *
134
+ * @example
135
+ * await client.transformers.createTransformer({
136
+ * name: "name",
137
+ * methodName: "method_name",
138
+ * moduleName: "module_name",
139
+ * inputEntityDefinitionIds: ["input_entity_definition_ids"],
140
+ * outputEntityDefinitionIds: ["output_entity_definition_ids"]
141
+ * })
142
+ */
143
+ createTransformer(request, requestOptions) {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ var _a;
146
+ const _response = yield core.fetcher({
147
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "transformers"),
148
+ method: "POST",
149
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
150
+ ? yield core.Supplier.get(this._options.apiKey)
151
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.25", "User-Agent": "@airweave/sdk/v0.2.25", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
152
+ contentType: "application/json",
153
+ requestType: "json",
154
+ body: serializers.TransformerCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
155
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
156
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
157
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
158
+ });
159
+ if (_response.ok) {
160
+ return serializers.Transformer.parseOrThrow(_response.body, {
161
+ unrecognizedObjectKeys: "passthrough",
162
+ allowUnrecognizedUnionMembers: true,
163
+ allowUnrecognizedEnumValues: true,
164
+ breadcrumbsPrefix: ["response"],
165
+ });
166
+ }
167
+ if (_response.error.reason === "status-code") {
168
+ switch (_response.error.statusCode) {
169
+ case 422:
170
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
171
+ unrecognizedObjectKeys: "passthrough",
172
+ allowUnrecognizedUnionMembers: true,
173
+ allowUnrecognizedEnumValues: true,
174
+ breadcrumbsPrefix: ["response"],
175
+ }));
176
+ default:
177
+ throw new errors.AirweaveSDKError({
178
+ statusCode: _response.error.statusCode,
179
+ body: _response.error.body,
180
+ });
181
+ }
182
+ }
183
+ switch (_response.error.reason) {
184
+ case "non-json":
185
+ throw new errors.AirweaveSDKError({
186
+ statusCode: _response.error.statusCode,
187
+ body: _response.error.rawBody,
188
+ });
189
+ case "timeout":
190
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /transformers.");
191
+ case "unknown":
192
+ throw new errors.AirweaveSDKError({
193
+ message: _response.error.errorMessage,
194
+ });
195
+ }
196
+ });
197
+ }
198
+ }
199
+ exports.Transformers = Transformers;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -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,14 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * Schema for creating a transformer.
5
+ * @example
6
+ * {
7
+ * name: "name",
8
+ * methodName: "method_name",
9
+ * moduleName: "module_name",
10
+ * inputEntityDefinitionIds: ["input_entity_definition_ids"],
11
+ * outputEntityDefinitionIds: ["output_entity_definition_ids"]
12
+ * }
6
13
  */
7
14
  export interface TransformerCreate {
8
15
  name: string;
@@ -0,0 +1 @@
1
+ export { type TransformerCreate } from "./TransformerCreate";
@@ -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);
@@ -0,0 +1,48 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments";
5
+ import * as core from "../../../../core";
6
+ import * as AirweaveSDK from "../../../index";
7
+ export declare namespace Users {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
10
+ /** Override the x-api-key header */
11
+ apiKey?: core.Supplier<string | undefined>;
12
+ }
13
+ interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
15
+ timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
17
+ maxRetries?: number;
18
+ /** A hook to abort the request. */
19
+ abortSignal?: AbortSignal;
20
+ /** Override the x-api-key header */
21
+ apiKey?: string | undefined;
22
+ /** Additional headers to include in the request. */
23
+ headers?: Record<string, string>;
24
+ }
25
+ }
26
+ export declare class Users {
27
+ protected readonly _options: Users.Options;
28
+ constructor(_options?: Users.Options);
29
+ /**
30
+ * Get current user.
31
+ *
32
+ * Args:
33
+ * ----
34
+ * current_user (User): The current user.
35
+ *
36
+ * Returns:
37
+ * -------
38
+ * schemas.User: The user object.
39
+ *
40
+ * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
41
+ *
42
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
43
+ *
44
+ * @example
45
+ * await client.users.readUser()
46
+ */
47
+ readUser(requestOptions?: Users.RequestOptions): Promise<AirweaveSDK.User>;
48
+ }
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.Users = void 0;
52
+ const environments = __importStar(require("../../../../environments"));
53
+ const core = __importStar(require("../../../../core"));
54
+ const AirweaveSDK = __importStar(require("../../../index"));
55
+ const url_join_1 = __importDefault(require("url-join"));
56
+ const serializers = __importStar(require("../../../../serialization/index"));
57
+ const errors = __importStar(require("../../../../errors/index"));
58
+ class Users {
59
+ constructor(_options = {}) {
60
+ this._options = _options;
61
+ }
62
+ /**
63
+ * Get current user.
64
+ *
65
+ * Args:
66
+ * ----
67
+ * current_user (User): The current user.
68
+ *
69
+ * Returns:
70
+ * -------
71
+ * schemas.User: The user object.
72
+ *
73
+ * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
74
+ *
75
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
76
+ *
77
+ * @example
78
+ * await client.users.readUser()
79
+ */
80
+ readUser(requestOptions) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ var _a;
83
+ const _response = yield core.fetcher({
84
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "users"),
85
+ method: "GET",
86
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
87
+ ? yield core.Supplier.get(this._options.apiKey)
88
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.25", "User-Agent": "@airweave/sdk/v0.2.25", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
89
+ contentType: "application/json",
90
+ requestType: "json",
91
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
92
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
93
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
94
+ });
95
+ if (_response.ok) {
96
+ return serializers.User.parseOrThrow(_response.body, {
97
+ unrecognizedObjectKeys: "passthrough",
98
+ allowUnrecognizedUnionMembers: true,
99
+ allowUnrecognizedEnumValues: true,
100
+ breadcrumbsPrefix: ["response"],
101
+ });
102
+ }
103
+ if (_response.error.reason === "status-code") {
104
+ switch (_response.error.statusCode) {
105
+ case 422:
106
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
107
+ unrecognizedObjectKeys: "passthrough",
108
+ allowUnrecognizedUnionMembers: true,
109
+ allowUnrecognizedEnumValues: true,
110
+ breadcrumbsPrefix: ["response"],
111
+ }));
112
+ default:
113
+ throw new errors.AirweaveSDKError({
114
+ statusCode: _response.error.statusCode,
115
+ body: _response.error.body,
116
+ });
117
+ }
118
+ }
119
+ switch (_response.error.reason) {
120
+ case "non-json":
121
+ throw new errors.AirweaveSDKError({
122
+ statusCode: _response.error.statusCode,
123
+ body: _response.error.rawBody,
124
+ });
125
+ case "timeout":
126
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /users.");
127
+ case "unknown":
128
+ throw new errors.AirweaveSDKError({
129
+ message: _response.error.errorMessage,
130
+ });
131
+ }
132
+ });
133
+ }
134
+ }
135
+ exports.Users = Users;
@@ -0,0 +1 @@
1
+ export {};
@@ -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);
@@ -86,7 +86,7 @@ class WhiteLabels {
86
86
  method: "GET",
87
87
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
88
88
  ? yield core.Supplier.get(this._options.apiKey)
89
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.23", "User-Agent": "@airweave/sdk/0.2.23", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
89
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.25", "User-Agent": "@airweave/sdk/v0.2.25", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
90
90
  contentType: "application/json",
91
91
  requestType: "json",
92
92
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -163,11 +163,11 @@ class WhiteLabels {
163
163
  return __awaiter(this, void 0, void 0, function* () {
164
164
  var _a;
165
165
  const _response = yield core.fetcher({
166
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "white_labels/"),
166
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "white_labels"),
167
167
  method: "POST",
168
168
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
169
169
  ? yield core.Supplier.get(this._options.apiKey)
170
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.23", "User-Agent": "@airweave/sdk/0.2.23", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
170
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.25", "User-Agent": "@airweave/sdk/v0.2.25", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
171
171
  contentType: "application/json",
172
172
  requestType: "json",
173
173
  body: serializers.WhiteLabelCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -206,7 +206,7 @@ class WhiteLabels {
206
206
  body: _response.error.rawBody,
207
207
  });
208
208
  case "timeout":
209
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /white_labels/.");
209
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /white_labels.");
210
210
  case "unknown":
211
211
  throw new errors.AirweaveSDKError({
212
212
  message: _response.error.errorMessage,
@@ -243,7 +243,7 @@ class WhiteLabels {
243
243
  method: "GET",
244
244
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
245
245
  ? yield core.Supplier.get(this._options.apiKey)
246
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.23", "User-Agent": "@airweave/sdk/0.2.23", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
246
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.25", "User-Agent": "@airweave/sdk/v0.2.25", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
247
247
  contentType: "application/json",
248
248
  requestType: "json",
249
249
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -320,7 +320,7 @@ class WhiteLabels {
320
320
  method: "PUT",
321
321
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
322
322
  ? yield core.Supplier.get(this._options.apiKey)
323
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.23", "User-Agent": "@airweave/sdk/0.2.23", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
323
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.25", "User-Agent": "@airweave/sdk/v0.2.25", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
324
324
  contentType: "application/json",
325
325
  requestType: "json",
326
326
  body: serializers.WhiteLabelUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -396,7 +396,7 @@ class WhiteLabels {
396
396
  method: "DELETE",
397
397
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
398
398
  ? yield core.Supplier.get(this._options.apiKey)
399
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.23", "User-Agent": "@airweave/sdk/0.2.23", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
399
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.25", "User-Agent": "@airweave/sdk/v0.2.25", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
400
400
  contentType: "application/json",
401
401
  requestType: "json",
402
402
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -471,7 +471,7 @@ class WhiteLabels {
471
471
  method: "GET",
472
472
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
473
473
  ? yield core.Supplier.get(this._options.apiKey)
474
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.23", "User-Agent": "@airweave/sdk/0.2.23", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
474
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.25", "User-Agent": "@airweave/sdk/v0.2.25", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
475
475
  contentType: "application/json",
476
476
  requestType: "json",
477
477
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -548,7 +548,7 @@ class WhiteLabels {
548
548
  method: "POST",
549
549
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
550
550
  ? yield core.Supplier.get(this._options.apiKey)
551
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.23", "User-Agent": "@airweave/sdk/0.2.23", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
551
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.25", "User-Agent": "@airweave/sdk/v0.2.25", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
552
552
  contentType: "application/json",
553
553
  requestType: "json",
554
554
  body: serializers.whiteLabels.exchangeWhiteLabelOauth2Code.Request.jsonOrThrow(request, {
@@ -626,7 +626,7 @@ class WhiteLabels {
626
626
  method: "GET",
627
627
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
628
628
  ? yield core.Supplier.get(this._options.apiKey)
629
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.23", "User-Agent": "@airweave/sdk/0.2.23", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
629
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.25", "User-Agent": "@airweave/sdk/v0.2.25", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
630
630
  contentType: "application/json",
631
631
  requestType: "json",
632
632
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -7,7 +7,7 @@
7
7
  export interface ApiKey {
8
8
  id: string;
9
9
  keyPrefix: string;
10
- organization?: string;
10
+ organization: string;
11
11
  createdAt: Date;
12
12
  modifiedAt: Date;
13
13
  lastUsedDate?: Date;
@@ -7,7 +7,7 @@
7
7
  export interface ApiKeyWithPlainKey {
8
8
  id: string;
9
9
  keyPrefix: string;
10
- organization?: string;
10
+ organization: string;
11
11
  createdAt: Date;
12
12
  modifiedAt: Date;
13
13
  lastUsedDate?: Date;
@@ -4,4 +4,6 @@
4
4
  export interface BodySendOauth2CodeConnectionsOauth2SourceCodePost {
5
5
  shortName: string;
6
6
  code: string;
7
+ connectionName?: string;
8
+ authFields?: Record<string, unknown>;
7
9
  }
@@ -5,7 +5,7 @@ import * as AirweaveSDK from "../index";
5
5
  /**
6
6
  * Schema for Destination with auth config.
7
7
  */
8
- export interface DestinationWithConfigFields {
8
+ export interface DestinationWithAuthenticationFields {
9
9
  name: string;
10
10
  description?: string;
11
11
  shortName: string;
@@ -19,5 +19,5 @@ export interface DestinationWithConfigFields {
19
19
  id: string;
20
20
  createdAt: Date;
21
21
  modifiedAt: Date;
22
- configFields?: AirweaveSDK.Fields;
22
+ authFields?: AirweaveSDK.Fields;
23
23
  }
@@ -5,7 +5,7 @@ import * as AirweaveSDK from "../index";
5
5
  /**
6
6
  * Schema for EmbeddingModel with auth config.
7
7
  */
8
- export interface EmbeddingModelWithConfigFields {
8
+ export interface EmbeddingModelWithAuthenticationFields {
9
9
  name: string;
10
10
  shortName: string;
11
11
  description?: string;
@@ -17,5 +17,5 @@ export interface EmbeddingModelWithConfigFields {
17
17
  id: string;
18
18
  createdAt: Date;
19
19
  modifiedAt: Date;
20
- configFields?: AirweaveSDK.Fields;
20
+ authFields?: AirweaveSDK.Fields;
21
21
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Schema for entity count.
6
+ */
7
+ export interface EntityCount {
8
+ count: number;
9
+ }