@airweave/sdk 0.2.24 → 0.2.26

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