@airweave/sdk 0.2.19 → 0.2.22

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 (353) hide show
  1. package/Client.d.ts +3 -12
  2. package/Client.js +13 -28
  3. package/README.md +13 -10
  4. package/api/resources/apiKeys/client/Client.d.ts +58 -0
  5. package/{dist/api/resources/destinations → api/resources/apiKeys}/client/Client.js +22 -98
  6. package/{dist/api/resources/users/client/requests/ReadUserUsersGetRequest.d.ts → api/resources/apiKeys/client/requests/ReadApiKeyApiKeysIdGetRequest.d.ts} +1 -1
  7. package/api/resources/apiKeys/client/requests/index.d.ts +1 -0
  8. package/api/resources/connections/client/Client.d.ts +0 -32
  9. package/api/resources/connections/client/Client.js +9 -101
  10. package/api/resources/connections/client/requests/index.d.ts +0 -1
  11. package/api/resources/embeddingModels/client/Client.js +2 -2
  12. package/api/resources/index.d.ts +2 -9
  13. package/api/resources/index.js +3 -10
  14. package/api/resources/search/client/Client.js +1 -1
  15. package/api/resources/sources/client/Client.js +2 -2
  16. package/api/resources/sync/client/Client.d.ts +1 -0
  17. package/api/resources/sync/client/Client.js +21 -12
  18. package/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +4 -0
  19. package/api/resources/whiteLabels/client/Client.js +8 -8
  20. package/api/types/ApiKey.d.ts +1 -1
  21. package/api/types/ApiKeyCreate.d.ts +1 -0
  22. package/api/types/ApiKeyWithPlainKey.d.ts +1 -1
  23. package/api/{resources/connections/client/requests → types}/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -9
  24. package/api/types/EntityCount.d.ts +9 -0
  25. package/api/types/EntityDefinitionCreate.d.ts +16 -0
  26. package/api/types/EntityDefinitionUpdate.d.ts +16 -0
  27. package/{dist/api/resources/entities/client/requests → api/types}/EntityRelationCreate.d.ts +1 -9
  28. package/{dist/api/resources/entities/client/requests → api/types}/EntityRelationUpdate.d.ts +1 -9
  29. package/api/types/Organization.d.ts +13 -0
  30. package/api/types/SyncJob.d.ts +5 -4
  31. package/api/types/TransformerCreate.d.ts +15 -0
  32. package/api/types/TransformerUpdate.d.ts +15 -0
  33. package/{dist/api/resources/users/client/requests → api/types}/UserCreate.d.ts +1 -8
  34. package/api/types/index.d.ts +12 -0
  35. package/api/types/index.js +12 -0
  36. package/dist/Client.d.ts +3 -12
  37. package/dist/Client.js +13 -28
  38. package/dist/api/resources/apiKeys/client/Client.d.ts +58 -0
  39. package/{api/resources/destinations → dist/api/resources/apiKeys}/client/Client.js +22 -98
  40. package/{api/resources/users/client/requests/ReadUserUsersGetRequest.d.ts → dist/api/resources/apiKeys/client/requests/ReadApiKeyApiKeysIdGetRequest.d.ts} +1 -1
  41. package/dist/api/resources/apiKeys/client/requests/index.d.ts +1 -0
  42. package/dist/api/resources/connections/client/Client.d.ts +0 -32
  43. package/dist/api/resources/connections/client/Client.js +9 -101
  44. package/dist/api/resources/connections/client/requests/index.d.ts +0 -1
  45. package/dist/api/resources/embeddingModels/client/Client.js +2 -2
  46. package/dist/api/resources/index.d.ts +2 -9
  47. package/dist/api/resources/index.js +3 -10
  48. package/dist/api/resources/search/client/Client.js +1 -1
  49. package/dist/api/resources/sources/client/Client.js +2 -2
  50. package/dist/api/resources/sync/client/Client.d.ts +1 -0
  51. package/dist/api/resources/sync/client/Client.js +21 -12
  52. package/dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +4 -0
  53. package/dist/api/resources/whiteLabels/client/Client.js +8 -8
  54. package/dist/api/types/ApiKey.d.ts +1 -1
  55. package/dist/api/types/ApiKeyCreate.d.ts +1 -0
  56. package/dist/api/types/ApiKeyWithPlainKey.d.ts +1 -1
  57. package/dist/api/{resources/connections/client/requests → types}/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -9
  58. package/dist/api/types/EntityCount.d.ts +9 -0
  59. package/dist/api/types/EntityDefinitionCreate.d.ts +16 -0
  60. package/dist/api/types/EntityDefinitionUpdate.d.ts +16 -0
  61. package/{api/resources/entities/client/requests → dist/api/types}/EntityRelationCreate.d.ts +1 -9
  62. package/{api/resources/entities/client/requests → dist/api/types}/EntityRelationUpdate.d.ts +1 -9
  63. package/dist/api/types/Organization.d.ts +13 -0
  64. package/dist/api/types/SyncJob.d.ts +5 -4
  65. package/dist/api/types/TransformerCreate.d.ts +15 -0
  66. package/dist/api/types/TransformerUpdate.d.ts +15 -0
  67. package/{api/resources/users/client/requests → dist/api/types}/UserCreate.d.ts +1 -8
  68. package/dist/api/types/index.d.ts +12 -0
  69. package/dist/api/types/index.js +12 -0
  70. package/dist/serialization/resources/connections/client/requests/index.d.ts +0 -1
  71. package/dist/serialization/resources/connections/client/requests/index.js +1 -3
  72. package/dist/serialization/resources/index.d.ts +0 -8
  73. package/dist/serialization/resources/index.js +1 -9
  74. package/dist/serialization/types/ApiKey.d.ts +1 -1
  75. package/dist/serialization/types/ApiKey.js +1 -1
  76. package/dist/serialization/types/ApiKeyWithPlainKey.d.ts +1 -1
  77. package/dist/serialization/types/ApiKeyWithPlainKey.js +1 -1
  78. package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +13 -0
  79. package/dist/serialization/{resources/connections/client/requests → types}/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +1 -1
  80. package/dist/serialization/types/EntityCount.d.ts +12 -0
  81. package/dist/serialization/{resources/transformers/client/listTransformers.js → types/EntityCount.js} +5 -4
  82. package/{serialization/resources/entities/client/requests → dist/serialization/types}/EntityDefinitionCreate.d.ts +6 -6
  83. package/dist/serialization/{resources/entities/client/requests → types}/EntityDefinitionCreate.js +3 -3
  84. package/dist/serialization/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.d.ts +3 -3
  85. package/dist/serialization/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.js +1 -1
  86. package/dist/serialization/{resources/entities/client/requests → types}/EntityDefinitionUpdate.d.ts +6 -6
  87. package/dist/serialization/{resources/entities/client/requests → types}/EntityDefinitionUpdate.js +3 -3
  88. package/dist/serialization/{resources/entities/types → types}/EntityDefinitionUpdateEntitySchema.d.ts +3 -3
  89. package/dist/serialization/{resources/entities/types → types}/EntityDefinitionUpdateEntitySchema.js +1 -1
  90. package/dist/serialization/types/EntityRelationCreate.d.ts +15 -0
  91. package/dist/serialization/{resources/entities/client/requests → types}/EntityRelationCreate.js +1 -1
  92. package/dist/serialization/types/EntityRelationUpdate.d.ts +15 -0
  93. package/dist/serialization/{resources/entities/client/requests → types}/EntityRelationUpdate.js +1 -1
  94. package/dist/serialization/types/Organization.d.ts +16 -0
  95. package/dist/serialization/types/Organization.js +47 -0
  96. package/dist/serialization/types/SyncJob.d.ts +5 -4
  97. package/dist/serialization/types/SyncJob.js +5 -4
  98. package/{serialization/resources/transformers/client/requests → dist/serialization/types}/TransformerCreate.d.ts +4 -4
  99. package/dist/serialization/{resources/transformers/client/requests → types}/TransformerCreate.js +1 -1
  100. package/dist/serialization/{resources/transformers/client/requests → types}/TransformerUpdate.d.ts +4 -4
  101. package/{serialization/resources/transformers/client/requests → dist/serialization/types}/TransformerUpdate.js +1 -1
  102. package/dist/serialization/types/UserCreate.d.ts +14 -0
  103. package/dist/serialization/{resources/users/client/requests → types}/UserCreate.js +1 -1
  104. package/dist/serialization/types/index.d.ts +12 -0
  105. package/dist/serialization/types/index.js +12 -0
  106. package/dist/version.d.ts +1 -1
  107. package/dist/version.js +1 -1
  108. package/package.json +1 -1
  109. package/reference.md +49 -1147
  110. package/serialization/resources/connections/client/requests/index.d.ts +0 -1
  111. package/serialization/resources/connections/client/requests/index.js +1 -3
  112. package/serialization/resources/index.d.ts +0 -8
  113. package/serialization/resources/index.js +1 -9
  114. package/serialization/types/ApiKey.d.ts +1 -1
  115. package/serialization/types/ApiKey.js +1 -1
  116. package/serialization/types/ApiKeyWithPlainKey.d.ts +1 -1
  117. package/serialization/types/ApiKeyWithPlainKey.js +1 -1
  118. package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +13 -0
  119. package/serialization/{resources/connections/client/requests → types}/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +1 -1
  120. package/serialization/types/EntityCount.d.ts +12 -0
  121. package/serialization/{resources/transformers/client/listTransformers.js → types/EntityCount.js} +5 -4
  122. package/{dist/serialization/resources/entities/client/requests → serialization/types}/EntityDefinitionCreate.d.ts +6 -6
  123. package/serialization/{resources/entities/client/requests → types}/EntityDefinitionCreate.js +3 -3
  124. package/serialization/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.d.ts +3 -3
  125. package/serialization/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.js +1 -1
  126. package/serialization/{resources/entities/client/requests → types}/EntityDefinitionUpdate.d.ts +6 -6
  127. package/serialization/{resources/entities/client/requests → types}/EntityDefinitionUpdate.js +3 -3
  128. package/serialization/{resources/entities/types → types}/EntityDefinitionUpdateEntitySchema.d.ts +3 -3
  129. package/serialization/{resources/entities/types → types}/EntityDefinitionUpdateEntitySchema.js +1 -1
  130. package/serialization/types/EntityRelationCreate.d.ts +15 -0
  131. package/serialization/{resources/entities/client/requests → types}/EntityRelationCreate.js +1 -1
  132. package/serialization/types/EntityRelationUpdate.d.ts +15 -0
  133. package/serialization/{resources/entities/client/requests → types}/EntityRelationUpdate.js +1 -1
  134. package/serialization/types/Organization.d.ts +16 -0
  135. package/serialization/types/Organization.js +47 -0
  136. package/serialization/types/SyncJob.d.ts +5 -4
  137. package/serialization/types/SyncJob.js +5 -4
  138. package/{dist/serialization/resources/transformers/client/requests → serialization/types}/TransformerCreate.d.ts +4 -4
  139. package/serialization/{resources/transformers/client/requests → types}/TransformerCreate.js +1 -1
  140. package/serialization/{resources/transformers/client/requests → types}/TransformerUpdate.d.ts +4 -4
  141. package/{dist/serialization/resources/transformers/client/requests → serialization/types}/TransformerUpdate.js +1 -1
  142. package/serialization/types/UserCreate.d.ts +14 -0
  143. package/serialization/{resources/users/client/requests → types}/UserCreate.js +1 -1
  144. package/serialization/types/index.d.ts +12 -0
  145. package/serialization/types/index.js +12 -0
  146. package/version.d.ts +1 -1
  147. package/version.js +1 -1
  148. package/api/resources/destinations/client/Client.d.ts +0 -77
  149. package/api/resources/destinations/client/requests/ListDestinationsDestinationsListGetRequest.d.ts +0 -12
  150. package/api/resources/destinations/client/requests/ReadDestinationDestinationsDetailShortNameGetRequest.d.ts +0 -12
  151. package/api/resources/destinations/client/requests/index.d.ts +0 -2
  152. package/api/resources/entities/client/Client.d.ts +0 -175
  153. package/api/resources/entities/client/Client.js +0 -684
  154. package/api/resources/entities/client/requests/EntityDefinitionCreate.d.ts +0 -27
  155. package/api/resources/entities/client/requests/EntityDefinitionUpdate.d.ts +0 -27
  156. package/api/resources/entities/client/requests/GetEntityDefinitionsByIdsEntitiesDefinitionsByIdsPostRequest.d.ts +0 -14
  157. package/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +0 -14
  158. package/api/resources/entities/client/requests/ListEntityDefinitionsEntitiesDefinitionsGetRequest.d.ts +0 -12
  159. package/api/resources/entities/client/requests/ListEntityRelationsEntitiesRelationsGetRequest.d.ts +0 -12
  160. package/api/resources/entities/client/requests/index.d.ts +0 -8
  161. package/api/resources/entities/index.d.ts +0 -2
  162. package/api/resources/entities/index.js +0 -18
  163. package/api/resources/entities/types/index.d.ts +0 -2
  164. package/api/resources/entities/types/index.js +0 -18
  165. package/api/resources/transformers/client/Client.d.ts +0 -86
  166. package/api/resources/transformers/client/Client.js +0 -304
  167. package/api/resources/transformers/client/index.d.ts +0 -1
  168. package/api/resources/transformers/client/index.js +0 -17
  169. package/api/resources/transformers/client/requests/ListTransformersTransformersGetRequest.d.ts +0 -12
  170. package/api/resources/transformers/client/requests/ListTransformersTransformersGetRequest.js +0 -5
  171. package/api/resources/transformers/client/requests/TransformerCreate.d.ts +0 -26
  172. package/api/resources/transformers/client/requests/TransformerUpdate.d.ts +0 -26
  173. package/api/resources/transformers/client/requests/index.d.ts +0 -3
  174. package/api/resources/transformers/client/requests/index.js +0 -2
  175. package/api/resources/users/client/Client.d.ts +0 -81
  176. package/api/resources/users/client/Client.js +0 -241
  177. package/api/resources/users/client/index.d.ts +0 -1
  178. package/api/resources/users/client/index.js +0 -17
  179. package/api/resources/users/client/requests/ReadUserUsersGetRequest.js +0 -5
  180. package/api/resources/users/client/requests/index.d.ts +0 -2
  181. package/api/resources/users/client/requests/index.js +0 -2
  182. package/api/resources/users/index.d.ts +0 -1
  183. package/api/resources/users/index.js +0 -17
  184. package/dist/api/resources/destinations/client/Client.d.ts +0 -77
  185. package/dist/api/resources/destinations/client/index.d.ts +0 -1
  186. package/dist/api/resources/destinations/client/index.js +0 -17
  187. package/dist/api/resources/destinations/client/requests/ListDestinationsDestinationsListGetRequest.d.ts +0 -12
  188. package/dist/api/resources/destinations/client/requests/ListDestinationsDestinationsListGetRequest.js +0 -5
  189. package/dist/api/resources/destinations/client/requests/ReadDestinationDestinationsDetailShortNameGetRequest.d.ts +0 -12
  190. package/dist/api/resources/destinations/client/requests/ReadDestinationDestinationsDetailShortNameGetRequest.js +0 -5
  191. package/dist/api/resources/destinations/client/requests/index.d.ts +0 -2
  192. package/dist/api/resources/destinations/client/requests/index.js +0 -2
  193. package/dist/api/resources/destinations/index.d.ts +0 -1
  194. package/dist/api/resources/destinations/index.js +0 -17
  195. package/dist/api/resources/entities/client/Client.d.ts +0 -175
  196. package/dist/api/resources/entities/client/Client.js +0 -684
  197. package/dist/api/resources/entities/client/index.d.ts +0 -1
  198. package/dist/api/resources/entities/client/index.js +0 -17
  199. package/dist/api/resources/entities/client/requests/EntityDefinitionCreate.d.ts +0 -27
  200. package/dist/api/resources/entities/client/requests/EntityDefinitionUpdate.d.ts +0 -27
  201. package/dist/api/resources/entities/client/requests/GetEntityDefinitionsByIdsEntitiesDefinitionsByIdsPostRequest.d.ts +0 -14
  202. package/dist/api/resources/entities/client/requests/GetEntityDefinitionsByIdsEntitiesDefinitionsByIdsPostRequest.js +0 -5
  203. package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +0 -14
  204. package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js +0 -5
  205. package/dist/api/resources/entities/client/requests/ListEntityDefinitionsEntitiesDefinitionsGetRequest.d.ts +0 -12
  206. package/dist/api/resources/entities/client/requests/ListEntityDefinitionsEntitiesDefinitionsGetRequest.js +0 -5
  207. package/dist/api/resources/entities/client/requests/ListEntityRelationsEntitiesRelationsGetRequest.d.ts +0 -12
  208. package/dist/api/resources/entities/client/requests/ListEntityRelationsEntitiesRelationsGetRequest.js +0 -5
  209. package/dist/api/resources/entities/client/requests/index.d.ts +0 -8
  210. package/dist/api/resources/entities/client/requests/index.js +0 -2
  211. package/dist/api/resources/entities/index.d.ts +0 -2
  212. package/dist/api/resources/entities/index.js +0 -18
  213. package/dist/api/resources/entities/types/index.d.ts +0 -2
  214. package/dist/api/resources/entities/types/index.js +0 -18
  215. package/dist/api/resources/transformers/client/Client.d.ts +0 -86
  216. package/dist/api/resources/transformers/client/Client.js +0 -304
  217. package/dist/api/resources/transformers/client/index.d.ts +0 -1
  218. package/dist/api/resources/transformers/client/index.js +0 -17
  219. package/dist/api/resources/transformers/client/requests/ListTransformersTransformersGetRequest.d.ts +0 -12
  220. package/dist/api/resources/transformers/client/requests/ListTransformersTransformersGetRequest.js +0 -5
  221. package/dist/api/resources/transformers/client/requests/TransformerCreate.d.ts +0 -26
  222. package/dist/api/resources/transformers/client/requests/TransformerUpdate.d.ts +0 -26
  223. package/dist/api/resources/transformers/client/requests/index.d.ts +0 -3
  224. package/dist/api/resources/transformers/client/requests/index.js +0 -2
  225. package/dist/api/resources/transformers/index.d.ts +0 -1
  226. package/dist/api/resources/transformers/index.js +0 -17
  227. package/dist/api/resources/users/client/Client.d.ts +0 -81
  228. package/dist/api/resources/users/client/Client.js +0 -241
  229. package/dist/api/resources/users/client/index.d.ts +0 -1
  230. package/dist/api/resources/users/client/index.js +0 -17
  231. package/dist/api/resources/users/client/requests/ReadUserUsersGetRequest.js +0 -5
  232. package/dist/api/resources/users/client/requests/index.d.ts +0 -2
  233. package/dist/api/resources/users/client/requests/index.js +0 -2
  234. package/dist/api/resources/users/index.d.ts +0 -1
  235. package/dist/api/resources/users/index.js +0 -17
  236. package/dist/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -13
  237. package/dist/serialization/resources/destinations/client/index.d.ts +0 -1
  238. package/dist/serialization/resources/destinations/client/index.js +0 -37
  239. package/dist/serialization/resources/destinations/client/listDestinations.d.ts +0 -11
  240. package/dist/serialization/resources/destinations/client/listDestinations.js +0 -42
  241. package/dist/serialization/resources/destinations/index.d.ts +0 -1
  242. package/dist/serialization/resources/destinations/index.js +0 -17
  243. package/dist/serialization/resources/entities/client/getEntityDefinitionsByIds.d.ts +0 -15
  244. package/dist/serialization/resources/entities/client/getEntityDefinitionsByIds.js +0 -43
  245. package/dist/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.d.ts +0 -11
  246. package/dist/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +0 -42
  247. package/dist/serialization/resources/entities/client/index.d.ts +0 -5
  248. package/dist/serialization/resources/entities/client/index.js +0 -44
  249. package/dist/serialization/resources/entities/client/listEntityDefinitions.d.ts +0 -11
  250. package/dist/serialization/resources/entities/client/listEntityDefinitions.js +0 -42
  251. package/dist/serialization/resources/entities/client/listEntityRelations.d.ts +0 -11
  252. package/dist/serialization/resources/entities/client/listEntityRelations.js +0 -42
  253. package/dist/serialization/resources/entities/client/requests/EntityRelationCreate.d.ts +0 -15
  254. package/dist/serialization/resources/entities/client/requests/EntityRelationUpdate.d.ts +0 -15
  255. package/dist/serialization/resources/entities/client/requests/index.d.ts +0 -4
  256. package/dist/serialization/resources/entities/client/requests/index.js +0 -11
  257. package/dist/serialization/resources/entities/index.d.ts +0 -2
  258. package/dist/serialization/resources/entities/index.js +0 -18
  259. package/dist/serialization/resources/entities/types/index.d.ts +0 -2
  260. package/dist/serialization/resources/entities/types/index.js +0 -18
  261. package/dist/serialization/resources/transformers/client/index.d.ts +0 -2
  262. package/dist/serialization/resources/transformers/client/index.js +0 -41
  263. package/dist/serialization/resources/transformers/client/listTransformers.d.ts +0 -11
  264. package/dist/serialization/resources/transformers/client/requests/index.d.ts +0 -2
  265. package/dist/serialization/resources/transformers/client/requests/index.js +0 -7
  266. package/dist/serialization/resources/transformers/index.d.ts +0 -1
  267. package/dist/serialization/resources/transformers/index.js +0 -17
  268. package/dist/serialization/resources/users/client/index.d.ts +0 -1
  269. package/dist/serialization/resources/users/client/index.js +0 -17
  270. package/dist/serialization/resources/users/client/requests/UserCreate.d.ts +0 -14
  271. package/dist/serialization/resources/users/client/requests/index.d.ts +0 -1
  272. package/dist/serialization/resources/users/client/requests/index.js +0 -5
  273. package/dist/serialization/resources/users/index.d.ts +0 -1
  274. package/dist/serialization/resources/users/index.js +0 -17
  275. package/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -13
  276. package/serialization/resources/destinations/client/index.d.ts +0 -1
  277. package/serialization/resources/destinations/client/index.js +0 -37
  278. package/serialization/resources/destinations/client/listDestinations.d.ts +0 -11
  279. package/serialization/resources/destinations/client/listDestinations.js +0 -42
  280. package/serialization/resources/destinations/index.d.ts +0 -1
  281. package/serialization/resources/destinations/index.js +0 -17
  282. package/serialization/resources/entities/client/getEntityDefinitionsByIds.d.ts +0 -15
  283. package/serialization/resources/entities/client/getEntityDefinitionsByIds.js +0 -43
  284. package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.d.ts +0 -11
  285. package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +0 -42
  286. package/serialization/resources/entities/client/index.d.ts +0 -5
  287. package/serialization/resources/entities/client/index.js +0 -44
  288. package/serialization/resources/entities/client/listEntityDefinitions.d.ts +0 -11
  289. package/serialization/resources/entities/client/listEntityDefinitions.js +0 -42
  290. package/serialization/resources/entities/client/listEntityRelations.d.ts +0 -11
  291. package/serialization/resources/entities/client/listEntityRelations.js +0 -42
  292. package/serialization/resources/entities/client/requests/EntityRelationCreate.d.ts +0 -15
  293. package/serialization/resources/entities/client/requests/EntityRelationUpdate.d.ts +0 -15
  294. package/serialization/resources/entities/client/requests/index.d.ts +0 -4
  295. package/serialization/resources/entities/client/requests/index.js +0 -11
  296. package/serialization/resources/entities/index.d.ts +0 -2
  297. package/serialization/resources/entities/index.js +0 -18
  298. package/serialization/resources/entities/types/index.d.ts +0 -2
  299. package/serialization/resources/entities/types/index.js +0 -18
  300. package/serialization/resources/transformers/client/index.d.ts +0 -2
  301. package/serialization/resources/transformers/client/index.js +0 -41
  302. package/serialization/resources/transformers/client/listTransformers.d.ts +0 -11
  303. package/serialization/resources/transformers/client/requests/index.d.ts +0 -2
  304. package/serialization/resources/transformers/client/requests/index.js +0 -7
  305. package/serialization/resources/transformers/index.d.ts +0 -1
  306. package/serialization/resources/transformers/index.js +0 -17
  307. package/serialization/resources/users/client/index.d.ts +0 -1
  308. package/serialization/resources/users/client/index.js +0 -17
  309. package/serialization/resources/users/client/requests/UserCreate.d.ts +0 -14
  310. package/serialization/resources/users/client/requests/index.d.ts +0 -1
  311. package/serialization/resources/users/client/requests/index.js +0 -5
  312. package/serialization/resources/users/index.d.ts +0 -1
  313. package/serialization/resources/users/index.js +0 -17
  314. /package/api/resources/{destinations → apiKeys}/client/index.d.ts +0 -0
  315. /package/api/resources/{destinations → apiKeys}/client/index.js +0 -0
  316. /package/api/resources/{connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → apiKeys/client/requests/ReadApiKeyApiKeysIdGetRequest.js} +0 -0
  317. /package/api/resources/{destinations → apiKeys}/client/requests/index.js +0 -0
  318. /package/api/resources/{destinations → apiKeys}/index.d.ts +0 -0
  319. /package/api/resources/{destinations → apiKeys}/index.js +0 -0
  320. /package/{dist/api/resources/connections/client/requests → api/types}/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +0 -0
  321. /package/api/{resources/destinations/client/requests/ListDestinationsDestinationsListGetRequest.js → types/EntityCount.js} +0 -0
  322. /package/api/{resources/entities/client/requests → types}/EntityDefinitionCreate.js +0 -0
  323. /package/api/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.d.ts +0 -0
  324. /package/api/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.js +0 -0
  325. /package/api/{resources/entities/client/requests → types}/EntityDefinitionUpdate.js +0 -0
  326. /package/api/{resources/entities/types → types}/EntityDefinitionUpdateEntitySchema.d.ts +0 -0
  327. /package/api/{resources/entities/types → types}/EntityDefinitionUpdateEntitySchema.js +0 -0
  328. /package/api/{resources/entities/client/requests → types}/EntityRelationCreate.js +0 -0
  329. /package/api/{resources/entities/client/requests → types}/EntityRelationUpdate.js +0 -0
  330. /package/api/{resources/destinations/client/requests/ReadDestinationDestinationsDetailShortNameGetRequest.js → types/Organization.js} +0 -0
  331. /package/api/{resources/transformers/client/requests → types}/TransformerCreate.js +0 -0
  332. /package/api/{resources/transformers/client/requests → types}/TransformerUpdate.js +0 -0
  333. /package/api/{resources/users/client/requests → types}/UserCreate.js +0 -0
  334. /package/{api/resources/entities → dist/api/resources/apiKeys}/client/index.d.ts +0 -0
  335. /package/{api/resources/entities → dist/api/resources/apiKeys}/client/index.js +0 -0
  336. /package/{api/resources/entities/client/requests/GetEntityDefinitionsByIdsEntitiesDefinitionsByIdsPostRequest.js → dist/api/resources/apiKeys/client/requests/ReadApiKeyApiKeysIdGetRequest.js} +0 -0
  337. /package/{api/resources/entities → dist/api/resources/apiKeys}/client/requests/index.js +0 -0
  338. /package/{api/resources/transformers → dist/api/resources/apiKeys}/index.d.ts +0 -0
  339. /package/{api/resources/transformers → dist/api/resources/apiKeys}/index.js +0 -0
  340. /package/{api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js → dist/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js} +0 -0
  341. /package/{api/resources/entities/client/requests/ListEntityDefinitionsEntitiesDefinitionsGetRequest.js → dist/api/types/EntityCount.js} +0 -0
  342. /package/dist/api/{resources/entities/client/requests → types}/EntityDefinitionCreate.js +0 -0
  343. /package/dist/api/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.d.ts +0 -0
  344. /package/dist/api/{resources/entities/types → types}/EntityDefinitionCreateEntitySchema.js +0 -0
  345. /package/dist/api/{resources/entities/client/requests → types}/EntityDefinitionUpdate.js +0 -0
  346. /package/dist/api/{resources/entities/types → types}/EntityDefinitionUpdateEntitySchema.d.ts +0 -0
  347. /package/dist/api/{resources/entities/types → types}/EntityDefinitionUpdateEntitySchema.js +0 -0
  348. /package/dist/api/{resources/entities/client/requests → types}/EntityRelationCreate.js +0 -0
  349. /package/dist/api/{resources/entities/client/requests → types}/EntityRelationUpdate.js +0 -0
  350. /package/{api/resources/entities/client/requests/ListEntityRelationsEntitiesRelationsGetRequest.js → dist/api/types/Organization.js} +0 -0
  351. /package/dist/api/{resources/transformers/client/requests → types}/TransformerCreate.js +0 -0
  352. /package/dist/api/{resources/transformers/client/requests → types}/TransformerUpdate.js +0 -0
  353. /package/dist/api/{resources/users/client/requests → types}/UserCreate.js +0 -0
@@ -1,684 +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 __rest = (this && this.__rest) || function (s, e) {
48
- var t = {};
49
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
- t[p] = s[p];
51
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
- t[p[i]] = s[p[i]];
55
- }
56
- return t;
57
- };
58
- var __importDefault = (this && this.__importDefault) || function (mod) {
59
- return (mod && mod.__esModule) ? mod : { "default": mod };
60
- };
61
- Object.defineProperty(exports, "__esModule", { value: true });
62
- exports.Entities = void 0;
63
- const environments = __importStar(require("../../../../environments"));
64
- const core = __importStar(require("../../../../core"));
65
- const AirweaveSDK = __importStar(require("../../../index"));
66
- const url_join_1 = __importDefault(require("url-join"));
67
- const serializers = __importStar(require("../../../../serialization/index"));
68
- const errors = __importStar(require("../../../../errors/index"));
69
- class Entities {
70
- constructor(_options = {}) {
71
- this._options = _options;
72
- }
73
- /**
74
- * List all entity definitions for the current user's organization.
75
- *
76
- * @param {AirweaveSDK.ListEntityDefinitionsEntitiesDefinitionsGetRequest} request
77
- * @param {Entities.RequestOptions} requestOptions - Request-specific configuration.
78
- *
79
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
80
- *
81
- * @example
82
- * await client.entities.listEntityDefinitions({
83
- * creds: "creds"
84
- * })
85
- */
86
- listEntityDefinitions(request, requestOptions) {
87
- return __awaiter(this, void 0, void 0, function* () {
88
- var _a;
89
- const { creds } = request;
90
- const _queryParams = {};
91
- _queryParams["creds"] = creds;
92
- const _response = yield core.fetcher({
93
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "entities/definitions/"),
94
- method: "GET",
95
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
96
- ? yield core.Supplier.get(this._options.apiKey)
97
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.19", "User-Agent": "@airweave/sdk/v0.2.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
98
- contentType: "application/json",
99
- queryParameters: _queryParams,
100
- requestType: "json",
101
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
102
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
103
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
104
- });
105
- if (_response.ok) {
106
- return serializers.entities.listEntityDefinitions.Response.parseOrThrow(_response.body, {
107
- unrecognizedObjectKeys: "passthrough",
108
- allowUnrecognizedUnionMembers: true,
109
- allowUnrecognizedEnumValues: true,
110
- breadcrumbsPrefix: ["response"],
111
- });
112
- }
113
- if (_response.error.reason === "status-code") {
114
- switch (_response.error.statusCode) {
115
- case 422:
116
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
117
- unrecognizedObjectKeys: "passthrough",
118
- allowUnrecognizedUnionMembers: true,
119
- allowUnrecognizedEnumValues: true,
120
- breadcrumbsPrefix: ["response"],
121
- }));
122
- default:
123
- throw new errors.AirweaveSDKError({
124
- statusCode: _response.error.statusCode,
125
- body: _response.error.body,
126
- });
127
- }
128
- }
129
- switch (_response.error.reason) {
130
- case "non-json":
131
- throw new errors.AirweaveSDKError({
132
- statusCode: _response.error.statusCode,
133
- body: _response.error.rawBody,
134
- });
135
- case "timeout":
136
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /entities/definitions/.");
137
- case "unknown":
138
- throw new errors.AirweaveSDKError({
139
- message: _response.error.errorMessage,
140
- });
141
- }
142
- });
143
- }
144
- /**
145
- * Create a new entity definition.
146
- *
147
- * @param {AirweaveSDK.EntityDefinitionCreate} request
148
- * @param {Entities.RequestOptions} requestOptions - Request-specific configuration.
149
- *
150
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
151
- *
152
- * @example
153
- * await client.entities.createEntityDefinition({
154
- * creds: "creds",
155
- * name: "name",
156
- * description: undefined,
157
- * type: "file",
158
- * entitySchema: ["entity_schema", "entity_schema"],
159
- * parentId: undefined,
160
- * moduleName: "module_name",
161
- * className: "class_name"
162
- * })
163
- */
164
- createEntityDefinition(request, requestOptions) {
165
- return __awaiter(this, void 0, void 0, function* () {
166
- var _a;
167
- const { creds } = request, _body = __rest(request, ["creds"]);
168
- const _queryParams = {};
169
- _queryParams["creds"] = creds;
170
- const _response = yield core.fetcher({
171
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "entities/definitions/"),
172
- method: "POST",
173
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
174
- ? yield core.Supplier.get(this._options.apiKey)
175
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.19", "User-Agent": "@airweave/sdk/v0.2.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
176
- contentType: "application/json",
177
- queryParameters: _queryParams,
178
- requestType: "json",
179
- body: serializers.EntityDefinitionCreate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
180
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
181
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
182
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
183
- });
184
- if (_response.ok) {
185
- return serializers.EntityDefinition.parseOrThrow(_response.body, {
186
- unrecognizedObjectKeys: "passthrough",
187
- allowUnrecognizedUnionMembers: true,
188
- allowUnrecognizedEnumValues: true,
189
- breadcrumbsPrefix: ["response"],
190
- });
191
- }
192
- if (_response.error.reason === "status-code") {
193
- switch (_response.error.statusCode) {
194
- case 422:
195
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
196
- unrecognizedObjectKeys: "passthrough",
197
- allowUnrecognizedUnionMembers: true,
198
- allowUnrecognizedEnumValues: true,
199
- breadcrumbsPrefix: ["response"],
200
- }));
201
- default:
202
- throw new errors.AirweaveSDKError({
203
- statusCode: _response.error.statusCode,
204
- body: _response.error.body,
205
- });
206
- }
207
- }
208
- switch (_response.error.reason) {
209
- case "non-json":
210
- throw new errors.AirweaveSDKError({
211
- statusCode: _response.error.statusCode,
212
- body: _response.error.rawBody,
213
- });
214
- case "timeout":
215
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /entities/definitions/.");
216
- case "unknown":
217
- throw new errors.AirweaveSDKError({
218
- message: _response.error.errorMessage,
219
- });
220
- }
221
- });
222
- }
223
- /**
224
- * Update an entity definition.
225
- *
226
- * @param {string} definitionId
227
- * @param {AirweaveSDK.EntityDefinitionUpdate} request
228
- * @param {Entities.RequestOptions} requestOptions - Request-specific configuration.
229
- *
230
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
231
- *
232
- * @example
233
- * await client.entities.updateEntityDefinition("definition_id", {
234
- * creds: "creds",
235
- * name: "name",
236
- * description: undefined,
237
- * type: "file",
238
- * entitySchema: ["entity_schema", "entity_schema"],
239
- * parentId: undefined,
240
- * moduleName: "module_name",
241
- * className: "class_name"
242
- * })
243
- */
244
- updateEntityDefinition(definitionId, request, requestOptions) {
245
- return __awaiter(this, void 0, void 0, function* () {
246
- var _a;
247
- const { creds } = request, _body = __rest(request, ["creds"]);
248
- const _queryParams = {};
249
- _queryParams["creds"] = creds;
250
- const _response = yield core.fetcher({
251
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `entities/definitions/${encodeURIComponent(definitionId)}`),
252
- method: "PUT",
253
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
254
- ? yield core.Supplier.get(this._options.apiKey)
255
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.19", "User-Agent": "@airweave/sdk/v0.2.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
256
- contentType: "application/json",
257
- queryParameters: _queryParams,
258
- requestType: "json",
259
- body: serializers.EntityDefinitionUpdate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
260
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
261
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
262
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
263
- });
264
- if (_response.ok) {
265
- return serializers.EntityDefinition.parseOrThrow(_response.body, {
266
- unrecognizedObjectKeys: "passthrough",
267
- allowUnrecognizedUnionMembers: true,
268
- allowUnrecognizedEnumValues: true,
269
- breadcrumbsPrefix: ["response"],
270
- });
271
- }
272
- if (_response.error.reason === "status-code") {
273
- switch (_response.error.statusCode) {
274
- case 422:
275
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
276
- unrecognizedObjectKeys: "passthrough",
277
- allowUnrecognizedUnionMembers: true,
278
- allowUnrecognizedEnumValues: true,
279
- breadcrumbsPrefix: ["response"],
280
- }));
281
- default:
282
- throw new errors.AirweaveSDKError({
283
- statusCode: _response.error.statusCode,
284
- body: _response.error.body,
285
- });
286
- }
287
- }
288
- switch (_response.error.reason) {
289
- case "non-json":
290
- throw new errors.AirweaveSDKError({
291
- statusCode: _response.error.statusCode,
292
- body: _response.error.rawBody,
293
- });
294
- case "timeout":
295
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /entities/definitions/{definition_id}.");
296
- case "unknown":
297
- throw new errors.AirweaveSDKError({
298
- message: _response.error.errorMessage,
299
- });
300
- }
301
- });
302
- }
303
- /**
304
- * List all entity relations for the current user's organization.
305
- *
306
- * @param {AirweaveSDK.ListEntityRelationsEntitiesRelationsGetRequest} request
307
- * @param {Entities.RequestOptions} requestOptions - Request-specific configuration.
308
- *
309
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
310
- *
311
- * @example
312
- * await client.entities.listEntityRelations({
313
- * creds: "creds"
314
- * })
315
- */
316
- listEntityRelations(request, requestOptions) {
317
- return __awaiter(this, void 0, void 0, function* () {
318
- var _a;
319
- const { creds } = request;
320
- const _queryParams = {};
321
- _queryParams["creds"] = creds;
322
- const _response = yield core.fetcher({
323
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "entities/relations/"),
324
- method: "GET",
325
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
326
- ? yield core.Supplier.get(this._options.apiKey)
327
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.19", "User-Agent": "@airweave/sdk/v0.2.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
328
- contentType: "application/json",
329
- queryParameters: _queryParams,
330
- requestType: "json",
331
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
332
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
333
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
334
- });
335
- if (_response.ok) {
336
- return serializers.entities.listEntityRelations.Response.parseOrThrow(_response.body, {
337
- unrecognizedObjectKeys: "passthrough",
338
- allowUnrecognizedUnionMembers: true,
339
- allowUnrecognizedEnumValues: true,
340
- breadcrumbsPrefix: ["response"],
341
- });
342
- }
343
- if (_response.error.reason === "status-code") {
344
- switch (_response.error.statusCode) {
345
- case 422:
346
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
347
- unrecognizedObjectKeys: "passthrough",
348
- allowUnrecognizedUnionMembers: true,
349
- allowUnrecognizedEnumValues: true,
350
- breadcrumbsPrefix: ["response"],
351
- }));
352
- default:
353
- throw new errors.AirweaveSDKError({
354
- statusCode: _response.error.statusCode,
355
- body: _response.error.body,
356
- });
357
- }
358
- }
359
- switch (_response.error.reason) {
360
- case "non-json":
361
- throw new errors.AirweaveSDKError({
362
- statusCode: _response.error.statusCode,
363
- body: _response.error.rawBody,
364
- });
365
- case "timeout":
366
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /entities/relations/.");
367
- case "unknown":
368
- throw new errors.AirweaveSDKError({
369
- message: _response.error.errorMessage,
370
- });
371
- }
372
- });
373
- }
374
- /**
375
- * Create a new entity relation.
376
- *
377
- * @param {AirweaveSDK.EntityRelationCreate} request
378
- * @param {Entities.RequestOptions} requestOptions - Request-specific configuration.
379
- *
380
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
381
- *
382
- * @example
383
- * await client.entities.createEntityRelation({
384
- * creds: "creds",
385
- * name: "name",
386
- * description: undefined,
387
- * fromEntityId: "from_entity_id",
388
- * toEntityId: "to_entity_id"
389
- * })
390
- */
391
- createEntityRelation(request, requestOptions) {
392
- return __awaiter(this, void 0, void 0, function* () {
393
- var _a;
394
- const { creds } = request, _body = __rest(request, ["creds"]);
395
- const _queryParams = {};
396
- _queryParams["creds"] = creds;
397
- const _response = yield core.fetcher({
398
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "entities/relations/"),
399
- method: "POST",
400
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
401
- ? yield core.Supplier.get(this._options.apiKey)
402
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.19", "User-Agent": "@airweave/sdk/v0.2.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
403
- contentType: "application/json",
404
- queryParameters: _queryParams,
405
- requestType: "json",
406
- body: serializers.EntityRelationCreate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
407
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
408
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
409
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
410
- });
411
- if (_response.ok) {
412
- return serializers.EntityRelation.parseOrThrow(_response.body, {
413
- unrecognizedObjectKeys: "passthrough",
414
- allowUnrecognizedUnionMembers: true,
415
- allowUnrecognizedEnumValues: true,
416
- breadcrumbsPrefix: ["response"],
417
- });
418
- }
419
- if (_response.error.reason === "status-code") {
420
- switch (_response.error.statusCode) {
421
- case 422:
422
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
423
- unrecognizedObjectKeys: "passthrough",
424
- allowUnrecognizedUnionMembers: true,
425
- allowUnrecognizedEnumValues: true,
426
- breadcrumbsPrefix: ["response"],
427
- }));
428
- default:
429
- throw new errors.AirweaveSDKError({
430
- statusCode: _response.error.statusCode,
431
- body: _response.error.body,
432
- });
433
- }
434
- }
435
- switch (_response.error.reason) {
436
- case "non-json":
437
- throw new errors.AirweaveSDKError({
438
- statusCode: _response.error.statusCode,
439
- body: _response.error.rawBody,
440
- });
441
- case "timeout":
442
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /entities/relations/.");
443
- case "unknown":
444
- throw new errors.AirweaveSDKError({
445
- message: _response.error.errorMessage,
446
- });
447
- }
448
- });
449
- }
450
- /**
451
- * Update an entity relation.
452
- *
453
- * @param {string} relationId
454
- * @param {AirweaveSDK.EntityRelationUpdate} request
455
- * @param {Entities.RequestOptions} requestOptions - Request-specific configuration.
456
- *
457
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
458
- *
459
- * @example
460
- * await client.entities.updateEntityRelation("relation_id", {
461
- * creds: "creds",
462
- * name: "name",
463
- * description: undefined,
464
- * fromEntityId: "from_entity_id",
465
- * toEntityId: "to_entity_id"
466
- * })
467
- */
468
- updateEntityRelation(relationId, request, requestOptions) {
469
- return __awaiter(this, void 0, void 0, function* () {
470
- var _a;
471
- const { creds } = request, _body = __rest(request, ["creds"]);
472
- const _queryParams = {};
473
- _queryParams["creds"] = creds;
474
- const _response = yield core.fetcher({
475
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `entities/relations/${encodeURIComponent(relationId)}`),
476
- method: "PUT",
477
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
478
- ? yield core.Supplier.get(this._options.apiKey)
479
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.19", "User-Agent": "@airweave/sdk/v0.2.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
480
- contentType: "application/json",
481
- queryParameters: _queryParams,
482
- requestType: "json",
483
- body: serializers.EntityRelationUpdate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
484
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
485
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
486
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
487
- });
488
- if (_response.ok) {
489
- return serializers.EntityRelation.parseOrThrow(_response.body, {
490
- unrecognizedObjectKeys: "passthrough",
491
- allowUnrecognizedUnionMembers: true,
492
- allowUnrecognizedEnumValues: true,
493
- breadcrumbsPrefix: ["response"],
494
- });
495
- }
496
- if (_response.error.reason === "status-code") {
497
- switch (_response.error.statusCode) {
498
- case 422:
499
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
500
- unrecognizedObjectKeys: "passthrough",
501
- allowUnrecognizedUnionMembers: true,
502
- allowUnrecognizedEnumValues: true,
503
- breadcrumbsPrefix: ["response"],
504
- }));
505
- default:
506
- throw new errors.AirweaveSDKError({
507
- statusCode: _response.error.statusCode,
508
- body: _response.error.body,
509
- });
510
- }
511
- }
512
- switch (_response.error.reason) {
513
- case "non-json":
514
- throw new errors.AirweaveSDKError({
515
- statusCode: _response.error.statusCode,
516
- body: _response.error.rawBody,
517
- });
518
- case "timeout":
519
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /entities/relations/{relation_id}.");
520
- case "unknown":
521
- throw new errors.AirweaveSDKError({
522
- message: _response.error.errorMessage,
523
- });
524
- }
525
- });
526
- }
527
- /**
528
- * Get multiple entity definitions by their IDs.
529
- *
530
- * Args:
531
- * ids: List of entity definition IDs to fetch
532
- * db: Database session
533
- * current_user: Current authenticated user
534
- *
535
- * Returns:
536
- * List of entity definitions matching the provided IDs
537
- *
538
- * @param {AirweaveSDK.GetEntityDefinitionsByIdsEntitiesDefinitionsByIdsPostRequest} request
539
- * @param {Entities.RequestOptions} requestOptions - Request-specific configuration.
540
- *
541
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
542
- *
543
- * @example
544
- * await client.entities.getEntityDefinitionsByIds({
545
- * creds: "creds",
546
- * body: ["string", "string"]
547
- * })
548
- */
549
- getEntityDefinitionsByIds(request, requestOptions) {
550
- return __awaiter(this, void 0, void 0, function* () {
551
- var _a;
552
- const { creds, body: _body } = request;
553
- const _queryParams = {};
554
- _queryParams["creds"] = creds;
555
- const _response = yield core.fetcher({
556
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "entities/definitions/by-ids/"),
557
- method: "POST",
558
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
559
- ? yield core.Supplier.get(this._options.apiKey)
560
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.19", "User-Agent": "@airweave/sdk/v0.2.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
561
- contentType: "application/json",
562
- queryParameters: _queryParams,
563
- requestType: "json",
564
- body: serializers.entities.getEntityDefinitionsByIds.Request.jsonOrThrow(_body, {
565
- unrecognizedObjectKeys: "strip",
566
- }),
567
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
568
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
569
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
570
- });
571
- if (_response.ok) {
572
- return serializers.entities.getEntityDefinitionsByIds.Response.parseOrThrow(_response.body, {
573
- unrecognizedObjectKeys: "passthrough",
574
- allowUnrecognizedUnionMembers: true,
575
- allowUnrecognizedEnumValues: true,
576
- breadcrumbsPrefix: ["response"],
577
- });
578
- }
579
- if (_response.error.reason === "status-code") {
580
- switch (_response.error.statusCode) {
581
- case 422:
582
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
583
- unrecognizedObjectKeys: "passthrough",
584
- allowUnrecognizedUnionMembers: true,
585
- allowUnrecognizedEnumValues: true,
586
- breadcrumbsPrefix: ["response"],
587
- }));
588
- default:
589
- throw new errors.AirweaveSDKError({
590
- statusCode: _response.error.statusCode,
591
- body: _response.error.body,
592
- });
593
- }
594
- }
595
- switch (_response.error.reason) {
596
- case "non-json":
597
- throw new errors.AirweaveSDKError({
598
- statusCode: _response.error.statusCode,
599
- body: _response.error.rawBody,
600
- });
601
- case "timeout":
602
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /entities/definitions/by-ids/.");
603
- case "unknown":
604
- throw new errors.AirweaveSDKError({
605
- message: _response.error.errorMessage,
606
- });
607
- }
608
- });
609
- }
610
- /**
611
- * Get all entity definitions for a given source.
612
- *
613
- * @param {AirweaveSDK.GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest} request
614
- * @param {Entities.RequestOptions} requestOptions - Request-specific configuration.
615
- *
616
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
617
- *
618
- * @example
619
- * await client.entities.getEntityDefinitionsBySourceShortName({
620
- * sourceShortName: "source_short_name",
621
- * creds: "creds"
622
- * })
623
- */
624
- getEntityDefinitionsBySourceShortName(request, requestOptions) {
625
- return __awaiter(this, void 0, void 0, function* () {
626
- var _a;
627
- const { sourceShortName, creds } = request;
628
- const _queryParams = {};
629
- _queryParams["source_short_name"] = sourceShortName;
630
- _queryParams["creds"] = creds;
631
- const _response = yield core.fetcher({
632
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "entities/definitions/by-source/"),
633
- method: "GET",
634
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
635
- ? yield core.Supplier.get(this._options.apiKey)
636
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.19", "User-Agent": "@airweave/sdk/v0.2.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
637
- contentType: "application/json",
638
- queryParameters: _queryParams,
639
- requestType: "json",
640
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
641
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
642
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
643
- });
644
- if (_response.ok) {
645
- return serializers.entities.getEntityDefinitionsBySourceShortName.Response.parseOrThrow(_response.body, {
646
- unrecognizedObjectKeys: "passthrough",
647
- allowUnrecognizedUnionMembers: true,
648
- allowUnrecognizedEnumValues: true,
649
- breadcrumbsPrefix: ["response"],
650
- });
651
- }
652
- if (_response.error.reason === "status-code") {
653
- switch (_response.error.statusCode) {
654
- case 422:
655
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
656
- unrecognizedObjectKeys: "passthrough",
657
- allowUnrecognizedUnionMembers: true,
658
- allowUnrecognizedEnumValues: true,
659
- breadcrumbsPrefix: ["response"],
660
- }));
661
- default:
662
- throw new errors.AirweaveSDKError({
663
- statusCode: _response.error.statusCode,
664
- body: _response.error.body,
665
- });
666
- }
667
- }
668
- switch (_response.error.reason) {
669
- case "non-json":
670
- throw new errors.AirweaveSDKError({
671
- statusCode: _response.error.statusCode,
672
- body: _response.error.rawBody,
673
- });
674
- case "timeout":
675
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /entities/definitions/by-source/.");
676
- case "unknown":
677
- throw new errors.AirweaveSDKError({
678
- message: _response.error.errorMessage,
679
- });
680
- }
681
- });
682
- }
683
- }
684
- exports.Entities = Entities;