@airweave/sdk 0.0.1 → 0.0.82

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 (1208) hide show
  1. package/Client.d.ts +61 -0
  2. package/Client.js +67 -0
  3. package/README.md +155 -1
  4. package/api/errors/UnprocessableEntityError.d.ts +8 -0
  5. package/api/errors/UnprocessableEntityError.js +51 -0
  6. package/api/errors/index.d.ts +1 -0
  7. package/api/errors/index.js +17 -0
  8. package/api/index.d.ts +3 -0
  9. package/api/index.js +19 -0
  10. package/api/resources/connections/client/Client.d.ts +320 -0
  11. package/api/resources/connections/client/Client.js +1001 -0
  12. package/api/resources/connections/client/index.d.ts +1 -0
  13. package/api/resources/connections/client/index.js +17 -0
  14. package/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +15 -0
  15. package/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +5 -0
  16. package/api/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +14 -0
  17. package/api/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +5 -0
  18. package/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.d.ts +12 -0
  19. package/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.js +5 -0
  20. package/api/resources/connections/client/requests/index.d.ts +3 -0
  21. package/api/resources/connections/client/requests/index.js +2 -0
  22. package/api/resources/connections/index.d.ts +1 -0
  23. package/api/resources/connections/index.js +17 -0
  24. package/api/resources/cursorDevelopment/client/Client.d.ts +56 -0
  25. package/api/resources/cursorDevelopment/client/Client.js +143 -0
  26. package/api/resources/cursorDevelopment/client/index.d.ts +1 -0
  27. package/api/resources/cursorDevelopment/client/index.js +2 -0
  28. package/api/resources/cursorDevelopment/index.d.ts +1 -0
  29. package/api/resources/cursorDevelopment/index.js +17 -0
  30. package/api/resources/destinations/client/Client.d.ts +71 -0
  31. package/api/resources/destinations/client/Client.js +211 -0
  32. package/api/resources/destinations/client/index.d.ts +1 -0
  33. package/api/resources/destinations/client/index.js +2 -0
  34. package/api/resources/destinations/index.d.ts +1 -0
  35. package/api/resources/destinations/index.js +17 -0
  36. package/api/resources/embeddingModels/client/Client.d.ts +71 -0
  37. package/api/resources/embeddingModels/client/Client.js +211 -0
  38. package/api/resources/embeddingModels/client/index.d.ts +1 -0
  39. package/api/resources/embeddingModels/client/index.js +2 -0
  40. package/api/resources/embeddingModels/index.d.ts +1 -0
  41. package/api/resources/embeddingModels/index.js +17 -0
  42. package/api/resources/entities/client/Client.d.ts +155 -0
  43. package/api/resources/entities/client/Client.js +624 -0
  44. package/api/resources/entities/client/index.d.ts +1 -0
  45. package/api/resources/entities/client/index.js +17 -0
  46. package/api/resources/entities/client/requests/EntityDefinitionCreate.d.ts +23 -0
  47. package/api/resources/entities/client/requests/EntityDefinitionCreate.js +5 -0
  48. package/api/resources/entities/client/requests/EntityDefinitionUpdate.d.ts +23 -0
  49. package/api/resources/entities/client/requests/EntityDefinitionUpdate.js +5 -0
  50. package/api/resources/entities/client/requests/EntityRelationCreate.d.ts +17 -0
  51. package/api/resources/entities/client/requests/EntityRelationCreate.js +5 -0
  52. package/api/resources/entities/client/requests/EntityRelationUpdate.d.ts +17 -0
  53. package/api/resources/entities/client/requests/EntityRelationUpdate.js +5 -0
  54. package/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +12 -0
  55. package/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js +5 -0
  56. package/api/resources/entities/client/requests/index.d.ts +5 -0
  57. package/api/resources/entities/client/requests/index.js +2 -0
  58. package/api/resources/entities/index.d.ts +2 -0
  59. package/api/resources/entities/index.js +18 -0
  60. package/api/resources/entities/types/EntityDefinitionCreateEntitySchema.d.ts +4 -0
  61. package/api/resources/entities/types/EntityDefinitionCreateEntitySchema.js +5 -0
  62. package/api/resources/entities/types/EntityDefinitionUpdateEntitySchema.d.ts +4 -0
  63. package/api/resources/entities/types/EntityDefinitionUpdateEntitySchema.js +5 -0
  64. package/api/resources/entities/types/index.d.ts +2 -0
  65. package/api/resources/entities/types/index.js +18 -0
  66. package/api/resources/index.d.ts +19 -0
  67. package/api/resources/index.js +58 -0
  68. package/api/resources/search/client/Client.d.ts +55 -0
  69. package/api/resources/search/client/Client.js +147 -0
  70. package/api/resources/search/client/index.d.ts +1 -0
  71. package/api/resources/search/client/index.js +17 -0
  72. package/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +20 -0
  73. package/api/resources/search/client/requests/SearchSearchGetRequest.js +5 -0
  74. package/api/resources/search/client/requests/index.d.ts +1 -0
  75. package/api/resources/search/client/requests/index.js +2 -0
  76. package/api/resources/search/index.d.ts +1 -0
  77. package/api/resources/search/index.js +17 -0
  78. package/api/resources/sources/client/Client.d.ts +71 -0
  79. package/api/resources/sources/client/Client.js +211 -0
  80. package/api/resources/sources/client/index.d.ts +1 -0
  81. package/api/resources/sources/client/index.js +2 -0
  82. package/api/resources/sources/index.d.ts +1 -0
  83. package/api/resources/sources/index.js +17 -0
  84. package/api/resources/sync/client/Client.d.ts +275 -0
  85. package/api/resources/sync/client/Client.js +916 -0
  86. package/api/resources/sync/client/index.d.ts +1 -0
  87. package/api/resources/sync/client/index.js +17 -0
  88. package/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts +10 -0
  89. package/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js +5 -0
  90. package/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +11 -0
  91. package/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.js +5 -0
  92. package/api/resources/sync/client/requests/ListSyncsSyncGetRequest.d.ts +12 -0
  93. package/api/resources/sync/client/requests/ListSyncsSyncGetRequest.js +5 -0
  94. package/api/resources/sync/client/requests/SyncCreate.d.ts +26 -0
  95. package/api/resources/sync/client/requests/SyncCreate.js +5 -0
  96. package/api/resources/sync/client/requests/SyncUpdate.d.ts +17 -0
  97. package/api/resources/sync/client/requests/SyncUpdate.js +5 -0
  98. package/api/resources/sync/client/requests/index.d.ts +5 -0
  99. package/api/resources/sync/client/requests/index.js +2 -0
  100. package/api/resources/sync/index.d.ts +2 -0
  101. package/api/resources/sync/index.js +18 -0
  102. package/api/resources/sync/types/ListSyncsSyncGetResponse.d.ts +5 -0
  103. package/api/resources/sync/types/ListSyncsSyncGetResponse.js +5 -0
  104. package/api/resources/sync/types/index.d.ts +1 -0
  105. package/api/resources/sync/types/index.js +17 -0
  106. package/api/resources/transformers/client/Client.d.ts +77 -0
  107. package/api/resources/transformers/client/Client.js +272 -0
  108. package/api/resources/transformers/client/index.d.ts +1 -0
  109. package/api/resources/transformers/client/index.js +17 -0
  110. package/api/resources/transformers/client/requests/TransformerCreate.d.ts +22 -0
  111. package/api/resources/transformers/client/requests/TransformerCreate.js +5 -0
  112. package/api/resources/transformers/client/requests/TransformerUpdate.d.ts +22 -0
  113. package/api/resources/transformers/client/requests/TransformerUpdate.js +5 -0
  114. package/api/resources/transformers/client/requests/index.d.ts +2 -0
  115. package/api/resources/transformers/client/requests/index.js +2 -0
  116. package/api/resources/transformers/index.d.ts +1 -0
  117. package/api/resources/transformers/index.js +17 -0
  118. package/api/resources/users/client/Client.d.ts +48 -0
  119. package/api/resources/users/client/Client.js +135 -0
  120. package/api/resources/users/client/index.d.ts +1 -0
  121. package/api/resources/users/client/index.js +2 -0
  122. package/api/resources/users/index.d.ts +1 -0
  123. package/api/resources/users/index.js +17 -0
  124. package/api/resources/whiteLabels/client/Client.d.ts +213 -0
  125. package/api/resources/whiteLabels/client/Client.js +676 -0
  126. package/api/resources/whiteLabels/client/index.d.ts +1 -0
  127. package/api/resources/whiteLabels/client/index.js +17 -0
  128. package/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +20 -0
  129. package/api/resources/whiteLabels/client/requests/WhiteLabelCreate.js +5 -0
  130. package/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +13 -0
  131. package/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.js +5 -0
  132. package/api/resources/whiteLabels/client/requests/index.d.ts +2 -0
  133. package/api/resources/whiteLabels/client/requests/index.js +2 -0
  134. package/api/resources/whiteLabels/index.d.ts +1 -0
  135. package/api/resources/whiteLabels/index.js +17 -0
  136. package/api/types/ApiKey.d.ts +17 -0
  137. package/api/types/ApiKey.js +5 -0
  138. package/api/types/ApiKeyCreate.d.ts +9 -0
  139. package/api/types/ApiKeyCreate.js +5 -0
  140. package/api/types/ApiKeyWithPlainKey.d.ts +18 -0
  141. package/api/types/ApiKeyWithPlainKey.js +5 -0
  142. package/api/types/AuthType.d.ts +28 -0
  143. package/api/types/AuthType.js +16 -0
  144. package/api/types/Chat.d.ts +22 -0
  145. package/api/types/Chat.js +5 -0
  146. package/api/types/ChatCreate.d.ts +14 -0
  147. package/api/types/ChatCreate.js +5 -0
  148. package/api/types/ChatMessage.d.ts +18 -0
  149. package/api/types/ChatMessage.js +5 -0
  150. package/api/types/ChatMessageCreate.d.ts +10 -0
  151. package/api/types/ChatMessageCreate.js +5 -0
  152. package/api/types/ChatUpdate.d.ts +12 -0
  153. package/api/types/ChatUpdate.js +5 -0
  154. package/api/types/ConfigField.d.ts +12 -0
  155. package/api/types/ConfigField.js +5 -0
  156. package/api/types/Connection.d.ts +18 -0
  157. package/api/types/Connection.js +5 -0
  158. package/api/types/ConnectionStatus.d.ts +12 -0
  159. package/api/types/ConnectionStatus.js +11 -0
  160. package/api/types/DagEdge.d.ts +15 -0
  161. package/api/types/DagEdge.js +5 -0
  162. package/api/types/DagEdgeCreate.d.ts +10 -0
  163. package/api/types/DagEdgeCreate.js +5 -0
  164. package/api/types/DagNode.d.ts +20 -0
  165. package/api/types/DagNode.js +5 -0
  166. package/api/types/DagNodeCreate.d.ts +17 -0
  167. package/api/types/DagNodeCreate.js +5 -0
  168. package/api/types/Destination.d.ts +22 -0
  169. package/api/types/Destination.js +5 -0
  170. package/api/types/DestinationWithConfigFields.d.ts +23 -0
  171. package/api/types/DestinationWithConfigFields.js +5 -0
  172. package/api/types/EmbeddingModel.d.ts +20 -0
  173. package/api/types/EmbeddingModel.js +5 -0
  174. package/api/types/EmbeddingModelWithConfigFields.d.ts +21 -0
  175. package/api/types/EmbeddingModelWithConfigFields.js +5 -0
  176. package/api/types/EntityDefinition.d.ts +18 -0
  177. package/api/types/EntityDefinition.js +5 -0
  178. package/api/types/EntityDefinitionEntitySchema.d.ts +4 -0
  179. package/api/types/EntityDefinitionEntitySchema.js +5 -0
  180. package/api/types/EntityRelation.d.ts +16 -0
  181. package/api/types/EntityRelation.js +5 -0
  182. package/api/types/EntityType.d.ts +11 -0
  183. package/api/types/EntityType.js +10 -0
  184. package/api/types/Fields.d.ts +10 -0
  185. package/api/types/Fields.js +5 -0
  186. package/api/types/HttpValidationError.d.ts +7 -0
  187. package/api/types/HttpValidationError.js +5 -0
  188. package/api/types/IntegrationType.d.ts +12 -0
  189. package/api/types/IntegrationType.js +11 -0
  190. package/api/types/NodeType.d.ts +13 -0
  191. package/api/types/NodeType.js +12 -0
  192. package/api/types/Source.d.ts +22 -0
  193. package/api/types/Source.js +5 -0
  194. package/api/types/SourceWithConfigFields.d.ts +23 -0
  195. package/api/types/SourceWithConfigFields.js +5 -0
  196. package/api/types/Sync.d.ts +26 -0
  197. package/api/types/Sync.js +5 -0
  198. package/api/types/SyncDag.d.ts +29 -0
  199. package/api/types/SyncDag.js +5 -0
  200. package/api/types/SyncDagCreate.d.ts +14 -0
  201. package/api/types/SyncDagCreate.js +5 -0
  202. package/api/types/SyncDagUpdate.d.ts +14 -0
  203. package/api/types/SyncDagUpdate.js +5 -0
  204. package/api/types/SyncJob.d.ts +27 -0
  205. package/api/types/SyncJob.js +5 -0
  206. package/api/types/SyncJobStatus.d.ts +13 -0
  207. package/api/types/SyncJobStatus.js +12 -0
  208. package/api/types/SyncStatus.d.ts +12 -0
  209. package/api/types/SyncStatus.js +11 -0
  210. package/api/types/SyncWithSourceConnection.d.ts +27 -0
  211. package/api/types/SyncWithSourceConnection.js +5 -0
  212. package/api/types/Transformer.d.ts +19 -0
  213. package/api/types/Transformer.js +5 -0
  214. package/api/types/User.d.ts +13 -0
  215. package/api/types/User.js +5 -0
  216. package/api/types/ValidationError.d.ts +9 -0
  217. package/api/types/ValidationError.js +5 -0
  218. package/api/types/ValidationErrorLocItem.d.ts +4 -0
  219. package/api/types/ValidationErrorLocItem.js +5 -0
  220. package/api/types/WhiteLabel.d.ts +19 -0
  221. package/api/types/WhiteLabel.js +5 -0
  222. package/api/types/index.d.ts +43 -0
  223. package/api/types/index.js +59 -0
  224. package/core/fetcher/APIResponse.d.ts +10 -0
  225. package/core/fetcher/APIResponse.js +2 -0
  226. package/core/fetcher/Fetcher.d.ts +39 -0
  227. package/core/fetcher/Fetcher.js +99 -0
  228. package/core/fetcher/Supplier.d.ts +4 -0
  229. package/core/fetcher/Supplier.js +22 -0
  230. package/core/fetcher/createRequestUrl.d.ts +1 -0
  231. package/core/fetcher/createRequestUrl.js +12 -0
  232. package/core/fetcher/getFetchFn.d.ts +4 -0
  233. package/core/fetcher/getFetchFn.js +68 -0
  234. package/core/fetcher/getHeader.d.ts +1 -0
  235. package/core/fetcher/getHeader.js +11 -0
  236. package/core/fetcher/getRequestBody.d.ts +7 -0
  237. package/core/fetcher/getRequestBody.js +22 -0
  238. package/core/fetcher/getResponseBody.d.ts +1 -0
  239. package/core/fetcher/getResponseBody.js +54 -0
  240. package/core/fetcher/index.d.ts +5 -0
  241. package/core/fetcher/index.js +9 -0
  242. package/core/fetcher/makeRequest.d.ts +1 -0
  243. package/core/fetcher/makeRequest.js +42 -0
  244. package/core/fetcher/requestWithRetries.d.ts +1 -0
  245. package/core/fetcher/requestWithRetries.js +40 -0
  246. package/core/fetcher/signals.d.ts +11 -0
  247. package/core/fetcher/signals.js +36 -0
  248. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  249. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  250. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  251. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
  252. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  253. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  254. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  255. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
  256. package/core/index.d.ts +3 -0
  257. package/core/index.js +42 -0
  258. package/core/runtime/index.d.ts +1 -0
  259. package/core/runtime/index.js +5 -0
  260. package/core/runtime/runtime.d.ts +9 -0
  261. package/core/runtime/runtime.js +93 -0
  262. package/core/schemas/Schema.d.ts +85 -0
  263. package/core/schemas/Schema.js +22 -0
  264. package/core/schemas/builders/bigint/bigint.d.ts +2 -0
  265. package/core/schemas/builders/bigint/bigint.js +49 -0
  266. package/core/schemas/builders/bigint/index.d.ts +1 -0
  267. package/core/schemas/builders/bigint/index.js +5 -0
  268. package/core/schemas/builders/date/date.d.ts +2 -0
  269. package/core/schemas/builders/date/date.js +62 -0
  270. package/core/schemas/builders/date/index.d.ts +1 -0
  271. package/core/schemas/builders/date/index.js +5 -0
  272. package/core/schemas/builders/enum/enum.d.ts +2 -0
  273. package/core/schemas/builders/enum/enum.js +38 -0
  274. package/core/schemas/builders/enum/index.d.ts +1 -0
  275. package/core/schemas/builders/enum/index.js +5 -0
  276. package/core/schemas/builders/index.d.ts +14 -0
  277. package/core/schemas/builders/index.js +30 -0
  278. package/core/schemas/builders/lazy/index.d.ts +3 -0
  279. package/core/schemas/builders/lazy/index.js +7 -0
  280. package/core/schemas/builders/lazy/lazy.d.ts +5 -0
  281. package/core/schemas/builders/lazy/lazy.js +24 -0
  282. package/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
  283. package/core/schemas/builders/lazy/lazyObject.js +11 -0
  284. package/core/schemas/builders/list/index.d.ts +1 -0
  285. package/core/schemas/builders/list/index.js +5 -0
  286. package/core/schemas/builders/list/list.d.ts +2 -0
  287. package/core/schemas/builders/list/list.js +54 -0
  288. package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
  289. package/core/schemas/builders/literals/booleanLiteral.js +28 -0
  290. package/core/schemas/builders/literals/index.d.ts +2 -0
  291. package/core/schemas/builders/literals/index.js +7 -0
  292. package/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
  293. package/core/schemas/builders/literals/stringLiteral.js +28 -0
  294. package/core/schemas/builders/object/index.d.ts +6 -0
  295. package/core/schemas/builders/object/index.js +11 -0
  296. package/core/schemas/builders/object/object.d.ts +3 -0
  297. package/core/schemas/builders/object/object.js +260 -0
  298. package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
  299. package/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -0
  300. package/core/schemas/builders/object/property.d.ts +8 -0
  301. package/core/schemas/builders/object/property.js +15 -0
  302. package/core/schemas/builders/object/types.d.ts +31 -0
  303. package/core/schemas/builders/object/types.js +2 -0
  304. package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
  305. package/core/schemas/builders/object-like/getObjectLikeUtils.js +53 -0
  306. package/core/schemas/builders/object-like/index.d.ts +2 -0
  307. package/core/schemas/builders/object-like/index.js +6 -0
  308. package/core/schemas/builders/object-like/types.d.ts +7 -0
  309. package/core/schemas/builders/object-like/types.js +2 -0
  310. package/core/schemas/builders/primitives/any.d.ts +1 -0
  311. package/core/schemas/builders/primitives/any.js +6 -0
  312. package/core/schemas/builders/primitives/boolean.d.ts +1 -0
  313. package/core/schemas/builders/primitives/boolean.js +25 -0
  314. package/core/schemas/builders/primitives/index.d.ts +5 -0
  315. package/core/schemas/builders/primitives/index.js +13 -0
  316. package/core/schemas/builders/primitives/number.d.ts +1 -0
  317. package/core/schemas/builders/primitives/number.js +25 -0
  318. package/core/schemas/builders/primitives/string.d.ts +1 -0
  319. package/core/schemas/builders/primitives/string.js +25 -0
  320. package/core/schemas/builders/primitives/unknown.d.ts +1 -0
  321. package/core/schemas/builders/primitives/unknown.js +6 -0
  322. package/core/schemas/builders/record/index.d.ts +2 -0
  323. package/core/schemas/builders/record/index.js +5 -0
  324. package/core/schemas/builders/record/record.d.ts +3 -0
  325. package/core/schemas/builders/record/record.js +94 -0
  326. package/core/schemas/builders/record/types.d.ts +4 -0
  327. package/core/schemas/builders/record/types.js +2 -0
  328. package/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
  329. package/core/schemas/builders/schema-utils/JsonError.js +12 -0
  330. package/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
  331. package/core/schemas/builders/schema-utils/ParseError.js +12 -0
  332. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
  333. package/core/schemas/builders/schema-utils/getSchemaUtils.js +81 -0
  334. package/core/schemas/builders/schema-utils/index.d.ts +4 -0
  335. package/core/schemas/builders/schema-utils/index.js +11 -0
  336. package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
  337. package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +9 -0
  338. package/core/schemas/builders/set/index.d.ts +1 -0
  339. package/core/schemas/builders/set/index.js +5 -0
  340. package/core/schemas/builders/set/set.d.ts +2 -0
  341. package/core/schemas/builders/set/set.js +43 -0
  342. package/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
  343. package/core/schemas/builders/undiscriminated-union/index.js +5 -0
  344. package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
  345. package/core/schemas/builders/undiscriminated-union/types.js +2 -0
  346. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
  347. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +39 -0
  348. package/core/schemas/builders/union/discriminant.d.ts +5 -0
  349. package/core/schemas/builders/union/discriminant.js +9 -0
  350. package/core/schemas/builders/union/index.d.ts +4 -0
  351. package/core/schemas/builders/union/index.js +7 -0
  352. package/core/schemas/builders/union/types.d.ts +13 -0
  353. package/core/schemas/builders/union/types.js +2 -0
  354. package/core/schemas/builders/union/union.d.ts +4 -0
  355. package/core/schemas/builders/union/union.js +129 -0
  356. package/core/schemas/index.d.ts +2 -0
  357. package/core/schemas/index.js +17 -0
  358. package/core/schemas/utils/MaybePromise.d.ts +1 -0
  359. package/core/schemas/utils/MaybePromise.js +2 -0
  360. package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
  361. package/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
  362. package/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
  363. package/core/schemas/utils/createIdentitySchemaCreator.js +15 -0
  364. package/core/schemas/utils/entries.d.ts +1 -0
  365. package/core/schemas/utils/entries.js +6 -0
  366. package/core/schemas/utils/filterObject.d.ts +1 -0
  367. package/core/schemas/utils/filterObject.js +13 -0
  368. package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
  369. package/core/schemas/utils/getErrorMessageForIncorrectType.js +27 -0
  370. package/core/schemas/utils/isPlainObject.d.ts +1 -0
  371. package/core/schemas/utils/isPlainObject.js +17 -0
  372. package/core/schemas/utils/keys.d.ts +1 -0
  373. package/core/schemas/utils/keys.js +6 -0
  374. package/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
  375. package/core/schemas/utils/maybeSkipValidation.js +27 -0
  376. package/core/schemas/utils/partition.d.ts +1 -0
  377. package/core/schemas/utils/partition.js +15 -0
  378. package/dist/Client.d.ts +61 -0
  379. package/dist/Client.js +67 -0
  380. package/dist/api/errors/UnprocessableEntityError.d.ts +8 -0
  381. package/dist/api/errors/UnprocessableEntityError.js +51 -0
  382. package/dist/api/errors/index.d.ts +1 -0
  383. package/dist/api/errors/index.js +17 -0
  384. package/dist/api/index.d.ts +3 -0
  385. package/dist/api/index.js +19 -0
  386. package/dist/api/resources/connections/client/Client.d.ts +320 -0
  387. package/dist/api/resources/connections/client/Client.js +1001 -0
  388. package/dist/api/resources/connections/client/index.d.ts +1 -0
  389. package/dist/api/resources/connections/client/index.js +17 -0
  390. package/dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +15 -0
  391. package/dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +5 -0
  392. package/dist/api/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +14 -0
  393. package/dist/api/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +5 -0
  394. package/dist/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.d.ts +12 -0
  395. package/dist/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.js +5 -0
  396. package/dist/api/resources/connections/client/requests/index.d.ts +3 -0
  397. package/dist/api/resources/connections/client/requests/index.js +2 -0
  398. package/dist/api/resources/connections/index.d.ts +1 -0
  399. package/dist/api/resources/connections/index.js +17 -0
  400. package/dist/api/resources/cursorDevelopment/client/Client.d.ts +56 -0
  401. package/dist/api/resources/cursorDevelopment/client/Client.js +143 -0
  402. package/dist/api/resources/cursorDevelopment/client/index.d.ts +1 -0
  403. package/dist/api/resources/cursorDevelopment/client/index.js +2 -0
  404. package/dist/api/resources/cursorDevelopment/index.d.ts +1 -0
  405. package/dist/api/resources/cursorDevelopment/index.js +17 -0
  406. package/dist/api/resources/destinations/client/Client.d.ts +71 -0
  407. package/dist/api/resources/destinations/client/Client.js +211 -0
  408. package/dist/api/resources/destinations/client/index.d.ts +1 -0
  409. package/dist/api/resources/destinations/client/index.js +2 -0
  410. package/dist/api/resources/destinations/index.d.ts +1 -0
  411. package/dist/api/resources/destinations/index.js +17 -0
  412. package/dist/api/resources/embeddingModels/client/Client.d.ts +71 -0
  413. package/dist/api/resources/embeddingModels/client/Client.js +211 -0
  414. package/dist/api/resources/embeddingModels/client/index.d.ts +1 -0
  415. package/dist/api/resources/embeddingModels/client/index.js +2 -0
  416. package/dist/api/resources/embeddingModels/index.d.ts +1 -0
  417. package/dist/api/resources/embeddingModels/index.js +17 -0
  418. package/dist/api/resources/entities/client/Client.d.ts +155 -0
  419. package/dist/api/resources/entities/client/Client.js +624 -0
  420. package/dist/api/resources/entities/client/index.d.ts +1 -0
  421. package/dist/api/resources/entities/client/index.js +17 -0
  422. package/dist/api/resources/entities/client/requests/EntityDefinitionCreate.d.ts +23 -0
  423. package/dist/api/resources/entities/client/requests/EntityDefinitionCreate.js +5 -0
  424. package/dist/api/resources/entities/client/requests/EntityDefinitionUpdate.d.ts +23 -0
  425. package/dist/api/resources/entities/client/requests/EntityDefinitionUpdate.js +5 -0
  426. package/dist/api/resources/entities/client/requests/EntityRelationCreate.d.ts +17 -0
  427. package/dist/api/resources/entities/client/requests/EntityRelationCreate.js +5 -0
  428. package/dist/api/resources/entities/client/requests/EntityRelationUpdate.d.ts +17 -0
  429. package/dist/api/resources/entities/client/requests/EntityRelationUpdate.js +5 -0
  430. package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +12 -0
  431. package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js +5 -0
  432. package/dist/api/resources/entities/client/requests/index.d.ts +5 -0
  433. package/dist/api/resources/entities/client/requests/index.js +2 -0
  434. package/dist/api/resources/entities/index.d.ts +2 -0
  435. package/dist/api/resources/entities/index.js +18 -0
  436. package/dist/api/resources/entities/types/EntityDefinitionCreateEntitySchema.d.ts +4 -0
  437. package/dist/api/resources/entities/types/EntityDefinitionCreateEntitySchema.js +5 -0
  438. package/dist/api/resources/entities/types/EntityDefinitionUpdateEntitySchema.d.ts +4 -0
  439. package/dist/api/resources/entities/types/EntityDefinitionUpdateEntitySchema.js +5 -0
  440. package/dist/api/resources/entities/types/index.d.ts +2 -0
  441. package/dist/api/resources/entities/types/index.js +18 -0
  442. package/dist/api/resources/index.d.ts +19 -0
  443. package/dist/api/resources/index.js +58 -0
  444. package/dist/api/resources/search/client/Client.d.ts +55 -0
  445. package/dist/api/resources/search/client/Client.js +147 -0
  446. package/dist/api/resources/search/client/index.d.ts +1 -0
  447. package/dist/api/resources/search/client/index.js +17 -0
  448. package/dist/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +20 -0
  449. package/dist/api/resources/search/client/requests/SearchSearchGetRequest.js +5 -0
  450. package/dist/api/resources/search/client/requests/index.d.ts +1 -0
  451. package/dist/api/resources/search/client/requests/index.js +2 -0
  452. package/dist/api/resources/search/index.d.ts +1 -0
  453. package/dist/api/resources/search/index.js +17 -0
  454. package/dist/api/resources/sources/client/Client.d.ts +71 -0
  455. package/dist/api/resources/sources/client/Client.js +211 -0
  456. package/dist/api/resources/sources/client/index.d.ts +1 -0
  457. package/dist/api/resources/sources/client/index.js +2 -0
  458. package/dist/api/resources/sources/index.d.ts +1 -0
  459. package/dist/api/resources/sources/index.js +17 -0
  460. package/dist/api/resources/sync/client/Client.d.ts +275 -0
  461. package/dist/api/resources/sync/client/Client.js +916 -0
  462. package/dist/api/resources/sync/client/index.d.ts +1 -0
  463. package/dist/api/resources/sync/client/index.js +17 -0
  464. package/dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts +10 -0
  465. package/dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js +5 -0
  466. package/dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +11 -0
  467. package/dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.js +5 -0
  468. package/dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.d.ts +12 -0
  469. package/dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.js +5 -0
  470. package/dist/api/resources/sync/client/requests/SyncCreate.d.ts +26 -0
  471. package/dist/api/resources/sync/client/requests/SyncCreate.js +5 -0
  472. package/dist/api/resources/sync/client/requests/SyncUpdate.d.ts +17 -0
  473. package/dist/api/resources/sync/client/requests/SyncUpdate.js +5 -0
  474. package/dist/api/resources/sync/client/requests/index.d.ts +5 -0
  475. package/dist/api/resources/sync/client/requests/index.js +2 -0
  476. package/dist/api/resources/sync/index.d.ts +2 -0
  477. package/dist/api/resources/sync/index.js +18 -0
  478. package/dist/api/resources/sync/types/ListSyncsSyncGetResponse.d.ts +5 -0
  479. package/dist/api/resources/sync/types/ListSyncsSyncGetResponse.js +5 -0
  480. package/dist/api/resources/sync/types/index.d.ts +1 -0
  481. package/dist/api/resources/sync/types/index.js +17 -0
  482. package/dist/api/resources/transformers/client/Client.d.ts +77 -0
  483. package/dist/api/resources/transformers/client/Client.js +272 -0
  484. package/dist/api/resources/transformers/client/index.d.ts +1 -0
  485. package/dist/api/resources/transformers/client/index.js +17 -0
  486. package/dist/api/resources/transformers/client/requests/TransformerCreate.d.ts +22 -0
  487. package/dist/api/resources/transformers/client/requests/TransformerCreate.js +5 -0
  488. package/dist/api/resources/transformers/client/requests/TransformerUpdate.d.ts +22 -0
  489. package/dist/api/resources/transformers/client/requests/TransformerUpdate.js +5 -0
  490. package/dist/api/resources/transformers/client/requests/index.d.ts +2 -0
  491. package/dist/api/resources/transformers/client/requests/index.js +2 -0
  492. package/dist/api/resources/transformers/index.d.ts +1 -0
  493. package/dist/api/resources/transformers/index.js +17 -0
  494. package/dist/api/resources/users/client/Client.d.ts +48 -0
  495. package/dist/api/resources/users/client/Client.js +135 -0
  496. package/dist/api/resources/users/client/index.d.ts +1 -0
  497. package/dist/api/resources/users/client/index.js +2 -0
  498. package/dist/api/resources/users/index.d.ts +1 -0
  499. package/dist/api/resources/users/index.js +17 -0
  500. package/dist/api/resources/whiteLabels/client/Client.d.ts +213 -0
  501. package/dist/api/resources/whiteLabels/client/Client.js +676 -0
  502. package/dist/api/resources/whiteLabels/client/index.d.ts +1 -0
  503. package/dist/api/resources/whiteLabels/client/index.js +17 -0
  504. package/dist/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +20 -0
  505. package/dist/api/resources/whiteLabels/client/requests/WhiteLabelCreate.js +5 -0
  506. package/dist/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +13 -0
  507. package/dist/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.js +5 -0
  508. package/dist/api/resources/whiteLabels/client/requests/index.d.ts +2 -0
  509. package/dist/api/resources/whiteLabels/client/requests/index.js +2 -0
  510. package/dist/api/resources/whiteLabels/index.d.ts +1 -0
  511. package/dist/api/resources/whiteLabels/index.js +17 -0
  512. package/dist/api/types/ApiKey.d.ts +17 -0
  513. package/dist/api/types/ApiKey.js +5 -0
  514. package/dist/api/types/ApiKeyCreate.d.ts +9 -0
  515. package/dist/api/types/ApiKeyCreate.js +5 -0
  516. package/dist/api/types/ApiKeyWithPlainKey.d.ts +18 -0
  517. package/dist/api/types/ApiKeyWithPlainKey.js +5 -0
  518. package/dist/api/types/AuthType.d.ts +28 -0
  519. package/dist/api/types/AuthType.js +16 -0
  520. package/dist/api/types/Chat.d.ts +22 -0
  521. package/dist/api/types/Chat.js +5 -0
  522. package/dist/api/types/ChatCreate.d.ts +14 -0
  523. package/dist/api/types/ChatCreate.js +5 -0
  524. package/dist/api/types/ChatMessage.d.ts +18 -0
  525. package/dist/api/types/ChatMessage.js +5 -0
  526. package/dist/api/types/ChatMessageCreate.d.ts +10 -0
  527. package/dist/api/types/ChatMessageCreate.js +5 -0
  528. package/dist/api/types/ChatUpdate.d.ts +12 -0
  529. package/dist/api/types/ChatUpdate.js +5 -0
  530. package/dist/api/types/ConfigField.d.ts +12 -0
  531. package/dist/api/types/ConfigField.js +5 -0
  532. package/dist/api/types/Connection.d.ts +18 -0
  533. package/dist/api/types/Connection.js +5 -0
  534. package/dist/api/types/ConnectionStatus.d.ts +12 -0
  535. package/dist/api/types/ConnectionStatus.js +11 -0
  536. package/dist/api/types/DagEdge.d.ts +15 -0
  537. package/dist/api/types/DagEdge.js +5 -0
  538. package/dist/api/types/DagEdgeCreate.d.ts +10 -0
  539. package/dist/api/types/DagEdgeCreate.js +5 -0
  540. package/dist/api/types/DagNode.d.ts +20 -0
  541. package/dist/api/types/DagNode.js +5 -0
  542. package/dist/api/types/DagNodeCreate.d.ts +17 -0
  543. package/dist/api/types/DagNodeCreate.js +5 -0
  544. package/dist/api/types/Destination.d.ts +22 -0
  545. package/dist/api/types/Destination.js +5 -0
  546. package/dist/api/types/DestinationWithConfigFields.d.ts +23 -0
  547. package/dist/api/types/DestinationWithConfigFields.js +5 -0
  548. package/dist/api/types/EmbeddingModel.d.ts +20 -0
  549. package/dist/api/types/EmbeddingModel.js +5 -0
  550. package/dist/api/types/EmbeddingModelWithConfigFields.d.ts +21 -0
  551. package/dist/api/types/EmbeddingModelWithConfigFields.js +5 -0
  552. package/dist/api/types/EntityDefinition.d.ts +18 -0
  553. package/dist/api/types/EntityDefinition.js +5 -0
  554. package/dist/api/types/EntityDefinitionEntitySchema.d.ts +4 -0
  555. package/dist/api/types/EntityDefinitionEntitySchema.js +5 -0
  556. package/dist/api/types/EntityRelation.d.ts +16 -0
  557. package/dist/api/types/EntityRelation.js +5 -0
  558. package/dist/api/types/EntityType.d.ts +11 -0
  559. package/dist/api/types/EntityType.js +10 -0
  560. package/dist/api/types/Fields.d.ts +10 -0
  561. package/dist/api/types/Fields.js +5 -0
  562. package/dist/api/types/HttpValidationError.d.ts +7 -0
  563. package/dist/api/types/HttpValidationError.js +5 -0
  564. package/dist/api/types/IntegrationType.d.ts +12 -0
  565. package/dist/api/types/IntegrationType.js +11 -0
  566. package/dist/api/types/NodeType.d.ts +13 -0
  567. package/dist/api/types/NodeType.js +12 -0
  568. package/dist/api/types/Source.d.ts +22 -0
  569. package/dist/api/types/Source.js +5 -0
  570. package/dist/api/types/SourceWithConfigFields.d.ts +23 -0
  571. package/dist/api/types/SourceWithConfigFields.js +5 -0
  572. package/dist/api/types/Sync.d.ts +26 -0
  573. package/dist/api/types/Sync.js +5 -0
  574. package/dist/api/types/SyncDag.d.ts +29 -0
  575. package/dist/api/types/SyncDag.js +5 -0
  576. package/dist/api/types/SyncDagCreate.d.ts +14 -0
  577. package/dist/api/types/SyncDagCreate.js +5 -0
  578. package/dist/api/types/SyncDagUpdate.d.ts +14 -0
  579. package/dist/api/types/SyncDagUpdate.js +5 -0
  580. package/dist/api/types/SyncJob.d.ts +27 -0
  581. package/dist/api/types/SyncJob.js +5 -0
  582. package/dist/api/types/SyncJobStatus.d.ts +13 -0
  583. package/dist/api/types/SyncJobStatus.js +12 -0
  584. package/dist/api/types/SyncStatus.d.ts +12 -0
  585. package/dist/api/types/SyncStatus.js +11 -0
  586. package/dist/api/types/SyncWithSourceConnection.d.ts +27 -0
  587. package/dist/api/types/SyncWithSourceConnection.js +5 -0
  588. package/dist/api/types/Transformer.d.ts +19 -0
  589. package/dist/api/types/Transformer.js +5 -0
  590. package/dist/api/types/User.d.ts +13 -0
  591. package/dist/api/types/User.js +5 -0
  592. package/dist/api/types/ValidationError.d.ts +9 -0
  593. package/dist/api/types/ValidationError.js +5 -0
  594. package/dist/api/types/ValidationErrorLocItem.d.ts +4 -0
  595. package/dist/api/types/ValidationErrorLocItem.js +5 -0
  596. package/dist/api/types/WhiteLabel.d.ts +19 -0
  597. package/dist/api/types/WhiteLabel.js +5 -0
  598. package/dist/api/types/index.d.ts +43 -0
  599. package/dist/api/types/index.js +59 -0
  600. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  601. package/dist/core/fetcher/APIResponse.js +2 -0
  602. package/dist/core/fetcher/Fetcher.d.ts +39 -0
  603. package/dist/core/fetcher/Fetcher.js +99 -0
  604. package/dist/core/fetcher/Supplier.d.ts +4 -0
  605. package/dist/core/fetcher/Supplier.js +22 -0
  606. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  607. package/dist/core/fetcher/createRequestUrl.js +12 -0
  608. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  609. package/dist/core/fetcher/getFetchFn.js +68 -0
  610. package/dist/core/fetcher/getHeader.d.ts +1 -0
  611. package/dist/core/fetcher/getHeader.js +11 -0
  612. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  613. package/dist/core/fetcher/getRequestBody.js +22 -0
  614. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  615. package/dist/core/fetcher/getResponseBody.js +54 -0
  616. package/dist/core/fetcher/index.d.ts +5 -0
  617. package/dist/core/fetcher/index.js +9 -0
  618. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  619. package/dist/core/fetcher/makeRequest.js +42 -0
  620. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  621. package/dist/core/fetcher/requestWithRetries.js +40 -0
  622. package/dist/core/fetcher/signals.d.ts +11 -0
  623. package/dist/core/fetcher/signals.js +36 -0
  624. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  625. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  626. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  627. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
  628. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  629. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  630. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  631. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
  632. package/dist/core/index.d.ts +3 -0
  633. package/dist/core/index.js +42 -0
  634. package/dist/core/runtime/index.d.ts +1 -0
  635. package/dist/core/runtime/index.js +5 -0
  636. package/dist/core/runtime/runtime.d.ts +9 -0
  637. package/dist/core/runtime/runtime.js +93 -0
  638. package/dist/core/schemas/Schema.d.ts +85 -0
  639. package/dist/core/schemas/Schema.js +22 -0
  640. package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
  641. package/dist/core/schemas/builders/bigint/bigint.js +49 -0
  642. package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
  643. package/dist/core/schemas/builders/bigint/index.js +5 -0
  644. package/dist/core/schemas/builders/date/date.d.ts +2 -0
  645. package/dist/core/schemas/builders/date/date.js +62 -0
  646. package/dist/core/schemas/builders/date/index.d.ts +1 -0
  647. package/dist/core/schemas/builders/date/index.js +5 -0
  648. package/dist/core/schemas/builders/enum/enum.d.ts +2 -0
  649. package/dist/core/schemas/builders/enum/enum.js +38 -0
  650. package/dist/core/schemas/builders/enum/index.d.ts +1 -0
  651. package/dist/core/schemas/builders/enum/index.js +5 -0
  652. package/dist/core/schemas/builders/index.d.ts +14 -0
  653. package/dist/core/schemas/builders/index.js +30 -0
  654. package/dist/core/schemas/builders/lazy/index.d.ts +3 -0
  655. package/dist/core/schemas/builders/lazy/index.js +7 -0
  656. package/dist/core/schemas/builders/lazy/lazy.d.ts +5 -0
  657. package/dist/core/schemas/builders/lazy/lazy.js +24 -0
  658. package/dist/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
  659. package/dist/core/schemas/builders/lazy/lazyObject.js +11 -0
  660. package/dist/core/schemas/builders/list/index.d.ts +1 -0
  661. package/dist/core/schemas/builders/list/index.js +5 -0
  662. package/dist/core/schemas/builders/list/list.d.ts +2 -0
  663. package/dist/core/schemas/builders/list/list.js +54 -0
  664. package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
  665. package/dist/core/schemas/builders/literals/booleanLiteral.js +28 -0
  666. package/dist/core/schemas/builders/literals/index.d.ts +2 -0
  667. package/dist/core/schemas/builders/literals/index.js +7 -0
  668. package/dist/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
  669. package/dist/core/schemas/builders/literals/stringLiteral.js +28 -0
  670. package/dist/core/schemas/builders/object/index.d.ts +6 -0
  671. package/dist/core/schemas/builders/object/index.js +11 -0
  672. package/dist/core/schemas/builders/object/object.d.ts +3 -0
  673. package/dist/core/schemas/builders/object/object.js +260 -0
  674. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
  675. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -0
  676. package/dist/core/schemas/builders/object/property.d.ts +8 -0
  677. package/dist/core/schemas/builders/object/property.js +15 -0
  678. package/dist/core/schemas/builders/object/types.d.ts +31 -0
  679. package/dist/core/schemas/builders/object/types.js +2 -0
  680. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
  681. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +53 -0
  682. package/dist/core/schemas/builders/object-like/index.d.ts +2 -0
  683. package/dist/core/schemas/builders/object-like/index.js +6 -0
  684. package/dist/core/schemas/builders/object-like/types.d.ts +7 -0
  685. package/dist/core/schemas/builders/object-like/types.js +2 -0
  686. package/dist/core/schemas/builders/primitives/any.d.ts +1 -0
  687. package/dist/core/schemas/builders/primitives/any.js +6 -0
  688. package/dist/core/schemas/builders/primitives/boolean.d.ts +1 -0
  689. package/dist/core/schemas/builders/primitives/boolean.js +25 -0
  690. package/dist/core/schemas/builders/primitives/index.d.ts +5 -0
  691. package/dist/core/schemas/builders/primitives/index.js +13 -0
  692. package/dist/core/schemas/builders/primitives/number.d.ts +1 -0
  693. package/dist/core/schemas/builders/primitives/number.js +25 -0
  694. package/dist/core/schemas/builders/primitives/string.d.ts +1 -0
  695. package/dist/core/schemas/builders/primitives/string.js +25 -0
  696. package/dist/core/schemas/builders/primitives/unknown.d.ts +1 -0
  697. package/dist/core/schemas/builders/primitives/unknown.js +6 -0
  698. package/dist/core/schemas/builders/record/index.d.ts +2 -0
  699. package/dist/core/schemas/builders/record/index.js +5 -0
  700. package/dist/core/schemas/builders/record/record.d.ts +3 -0
  701. package/dist/core/schemas/builders/record/record.js +94 -0
  702. package/dist/core/schemas/builders/record/types.d.ts +4 -0
  703. package/dist/core/schemas/builders/record/types.js +2 -0
  704. package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
  705. package/dist/core/schemas/builders/schema-utils/JsonError.js +12 -0
  706. package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
  707. package/dist/core/schemas/builders/schema-utils/ParseError.js +12 -0
  708. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
  709. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +81 -0
  710. package/dist/core/schemas/builders/schema-utils/index.d.ts +4 -0
  711. package/dist/core/schemas/builders/schema-utils/index.js +11 -0
  712. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
  713. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +9 -0
  714. package/dist/core/schemas/builders/set/index.d.ts +1 -0
  715. package/dist/core/schemas/builders/set/index.js +5 -0
  716. package/dist/core/schemas/builders/set/set.d.ts +2 -0
  717. package/dist/core/schemas/builders/set/set.js +43 -0
  718. package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
  719. package/dist/core/schemas/builders/undiscriminated-union/index.js +5 -0
  720. package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
  721. package/dist/core/schemas/builders/undiscriminated-union/types.js +2 -0
  722. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
  723. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +39 -0
  724. package/dist/core/schemas/builders/union/discriminant.d.ts +5 -0
  725. package/dist/core/schemas/builders/union/discriminant.js +9 -0
  726. package/dist/core/schemas/builders/union/index.d.ts +4 -0
  727. package/dist/core/schemas/builders/union/index.js +7 -0
  728. package/dist/core/schemas/builders/union/types.d.ts +13 -0
  729. package/dist/core/schemas/builders/union/types.js +2 -0
  730. package/dist/core/schemas/builders/union/union.d.ts +4 -0
  731. package/dist/core/schemas/builders/union/union.js +129 -0
  732. package/dist/core/schemas/index.d.ts +2 -0
  733. package/dist/core/schemas/index.js +17 -0
  734. package/dist/core/schemas/utils/MaybePromise.d.ts +1 -0
  735. package/dist/core/schemas/utils/MaybePromise.js +2 -0
  736. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
  737. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
  738. package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
  739. package/dist/core/schemas/utils/createIdentitySchemaCreator.js +15 -0
  740. package/dist/core/schemas/utils/entries.d.ts +1 -0
  741. package/dist/core/schemas/utils/entries.js +6 -0
  742. package/dist/core/schemas/utils/filterObject.d.ts +1 -0
  743. package/dist/core/schemas/utils/filterObject.js +13 -0
  744. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
  745. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +27 -0
  746. package/dist/core/schemas/utils/isPlainObject.d.ts +1 -0
  747. package/dist/core/schemas/utils/isPlainObject.js +17 -0
  748. package/dist/core/schemas/utils/keys.d.ts +1 -0
  749. package/dist/core/schemas/utils/keys.js +6 -0
  750. package/dist/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
  751. package/dist/core/schemas/utils/maybeSkipValidation.js +27 -0
  752. package/dist/core/schemas/utils/partition.d.ts +1 -0
  753. package/dist/core/schemas/utils/partition.js +15 -0
  754. package/dist/environments.d.ts +8 -0
  755. package/dist/environments.js +10 -0
  756. package/dist/errors/AirweaveSDKError.d.ts +12 -0
  757. package/dist/errors/AirweaveSDKError.js +32 -0
  758. package/dist/errors/AirweaveSDKTimeoutError.d.ts +6 -0
  759. package/dist/errors/AirweaveSDKTimeoutError.js +13 -0
  760. package/dist/errors/index.d.ts +2 -0
  761. package/dist/errors/index.js +7 -0
  762. package/dist/index.d.ts +4 -0
  763. package/dist/index.js +44 -0
  764. package/dist/serialization/index.d.ts +2 -0
  765. package/dist/serialization/index.js +18 -0
  766. package/dist/serialization/resources/connections/client/getConnectionCredentials.d.ts +9 -0
  767. package/dist/serialization/resources/connections/client/getConnectionCredentials.js +41 -0
  768. package/dist/serialization/resources/connections/client/getOauth2AuthUrl.d.ts +9 -0
  769. package/dist/serialization/resources/connections/client/getOauth2AuthUrl.js +41 -0
  770. package/dist/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +9 -0
  771. package/dist/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.js +41 -0
  772. package/dist/serialization/resources/connections/client/index.d.ts +7 -0
  773. package/dist/serialization/resources/connections/client/index.js +46 -0
  774. package/dist/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +11 -0
  775. package/dist/serialization/resources/connections/client/listAllConnectedIntegrations.js +42 -0
  776. package/dist/serialization/resources/connections/client/listConnectedIntegrations.d.ts +11 -0
  777. package/dist/serialization/resources/connections/client/listConnectedIntegrations.js +42 -0
  778. package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +13 -0
  779. package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +44 -0
  780. package/dist/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +13 -0
  781. package/dist/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +44 -0
  782. package/dist/serialization/resources/connections/client/requests/index.d.ts +2 -0
  783. package/dist/serialization/resources/connections/client/requests/index.js +7 -0
  784. package/dist/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +9 -0
  785. package/dist/serialization/resources/connections/client/sendOauth2WhiteLabelCode.js +41 -0
  786. package/dist/serialization/resources/connections/index.d.ts +1 -0
  787. package/dist/serialization/resources/connections/index.js +17 -0
  788. package/dist/serialization/resources/destinations/client/index.d.ts +1 -0
  789. package/dist/serialization/resources/destinations/client/index.js +37 -0
  790. package/dist/serialization/resources/destinations/client/listDestinations.d.ts +11 -0
  791. package/dist/serialization/resources/destinations/client/listDestinations.js +42 -0
  792. package/dist/serialization/resources/destinations/index.d.ts +1 -0
  793. package/dist/serialization/resources/destinations/index.js +17 -0
  794. package/dist/serialization/resources/embeddingModels/client/index.d.ts +1 -0
  795. package/dist/serialization/resources/embeddingModels/client/index.js +37 -0
  796. package/dist/serialization/resources/embeddingModels/client/readEmbeddingModels.d.ts +11 -0
  797. package/dist/serialization/resources/embeddingModels/client/readEmbeddingModels.js +42 -0
  798. package/dist/serialization/resources/embeddingModels/index.d.ts +1 -0
  799. package/dist/serialization/resources/embeddingModels/index.js +17 -0
  800. package/dist/serialization/resources/entities/client/getEntityDefinitionsByIds.d.ts +15 -0
  801. package/dist/serialization/resources/entities/client/getEntityDefinitionsByIds.js +43 -0
  802. package/dist/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.d.ts +11 -0
  803. package/dist/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +42 -0
  804. package/dist/serialization/resources/entities/client/index.d.ts +5 -0
  805. package/dist/serialization/resources/entities/client/index.js +44 -0
  806. package/dist/serialization/resources/entities/client/listEntityDefinitions.d.ts +11 -0
  807. package/dist/serialization/resources/entities/client/listEntityDefinitions.js +42 -0
  808. package/dist/serialization/resources/entities/client/listEntityRelations.d.ts +11 -0
  809. package/dist/serialization/resources/entities/client/listEntityRelations.js +42 -0
  810. package/dist/serialization/resources/entities/client/requests/EntityDefinitionCreate.d.ts +20 -0
  811. package/dist/serialization/resources/entities/client/requests/EntityDefinitionCreate.js +51 -0
  812. package/dist/serialization/resources/entities/client/requests/EntityDefinitionUpdate.d.ts +20 -0
  813. package/dist/serialization/resources/entities/client/requests/EntityDefinitionUpdate.js +51 -0
  814. package/dist/serialization/resources/entities/client/requests/EntityRelationCreate.d.ts +15 -0
  815. package/dist/serialization/resources/entities/client/requests/EntityRelationCreate.js +46 -0
  816. package/dist/serialization/resources/entities/client/requests/EntityRelationUpdate.d.ts +15 -0
  817. package/dist/serialization/resources/entities/client/requests/EntityRelationUpdate.js +46 -0
  818. package/dist/serialization/resources/entities/client/requests/index.d.ts +4 -0
  819. package/dist/serialization/resources/entities/client/requests/index.js +11 -0
  820. package/dist/serialization/resources/entities/index.d.ts +2 -0
  821. package/dist/serialization/resources/entities/index.js +18 -0
  822. package/dist/serialization/resources/entities/types/EntityDefinitionCreateEntitySchema.d.ts +10 -0
  823. package/dist/serialization/resources/entities/types/EntityDefinitionCreateEntitySchema.js +44 -0
  824. package/dist/serialization/resources/entities/types/EntityDefinitionUpdateEntitySchema.d.ts +10 -0
  825. package/dist/serialization/resources/entities/types/EntityDefinitionUpdateEntitySchema.js +44 -0
  826. package/dist/serialization/resources/entities/types/index.d.ts +2 -0
  827. package/dist/serialization/resources/entities/types/index.js +18 -0
  828. package/dist/serialization/resources/index.d.ts +16 -0
  829. package/dist/serialization/resources/index.js +55 -0
  830. package/dist/serialization/resources/search/client/index.d.ts +1 -0
  831. package/dist/serialization/resources/search/client/index.js +37 -0
  832. package/dist/serialization/resources/search/client/search.d.ts +9 -0
  833. package/dist/serialization/resources/search/client/search.js +41 -0
  834. package/dist/serialization/resources/search/index.d.ts +1 -0
  835. package/dist/serialization/resources/search/index.js +17 -0
  836. package/dist/serialization/resources/sources/client/index.d.ts +1 -0
  837. package/dist/serialization/resources/sources/client/index.js +37 -0
  838. package/dist/serialization/resources/sources/client/readSources.d.ts +11 -0
  839. package/dist/serialization/resources/sources/client/readSources.js +42 -0
  840. package/dist/serialization/resources/sources/index.d.ts +1 -0
  841. package/dist/serialization/resources/sources/index.js +17 -0
  842. package/dist/serialization/resources/sync/client/index.d.ts +3 -0
  843. package/dist/serialization/resources/sync/client/index.js +42 -0
  844. package/dist/serialization/resources/sync/client/listAllJobs.d.ts +11 -0
  845. package/dist/serialization/resources/sync/client/listAllJobs.js +42 -0
  846. package/dist/serialization/resources/sync/client/listSyncJobs.d.ts +11 -0
  847. package/dist/serialization/resources/sync/client/listSyncJobs.js +42 -0
  848. package/dist/serialization/resources/sync/client/requests/SyncCreate.d.ts +24 -0
  849. package/dist/serialization/resources/sync/client/requests/SyncCreate.js +55 -0
  850. package/dist/serialization/resources/sync/client/requests/SyncUpdate.d.ts +19 -0
  851. package/dist/serialization/resources/sync/client/requests/SyncUpdate.js +50 -0
  852. package/dist/serialization/resources/sync/client/requests/index.d.ts +2 -0
  853. package/dist/serialization/resources/sync/client/requests/index.js +7 -0
  854. package/dist/serialization/resources/sync/index.d.ts +2 -0
  855. package/dist/serialization/resources/sync/index.js +18 -0
  856. package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +12 -0
  857. package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +46 -0
  858. package/dist/serialization/resources/sync/types/index.d.ts +1 -0
  859. package/dist/serialization/resources/sync/types/index.js +17 -0
  860. package/dist/serialization/resources/transformers/client/index.d.ts +2 -0
  861. package/dist/serialization/resources/transformers/client/index.js +41 -0
  862. package/dist/serialization/resources/transformers/client/listTransformers.d.ts +11 -0
  863. package/dist/serialization/resources/transformers/client/listTransformers.js +42 -0
  864. package/dist/serialization/resources/transformers/client/requests/TransformerCreate.d.ts +18 -0
  865. package/dist/serialization/resources/transformers/client/requests/TransformerCreate.js +49 -0
  866. package/dist/serialization/resources/transformers/client/requests/TransformerUpdate.d.ts +18 -0
  867. package/dist/serialization/resources/transformers/client/requests/TransformerUpdate.js +49 -0
  868. package/dist/serialization/resources/transformers/client/requests/index.d.ts +2 -0
  869. package/dist/serialization/resources/transformers/client/requests/index.js +7 -0
  870. package/dist/serialization/resources/transformers/index.d.ts +1 -0
  871. package/dist/serialization/resources/transformers/index.js +17 -0
  872. package/dist/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +9 -0
  873. package/dist/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js +41 -0
  874. package/dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +9 -0
  875. package/dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js +41 -0
  876. package/dist/serialization/resources/whiteLabels/client/index.d.ts +5 -0
  877. package/dist/serialization/resources/whiteLabels/client/index.js +44 -0
  878. package/dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts +11 -0
  879. package/dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js +42 -0
  880. package/dist/serialization/resources/whiteLabels/client/listWhiteLabels.d.ts +11 -0
  881. package/dist/serialization/resources/whiteLabels/client/listWhiteLabels.js +42 -0
  882. package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +16 -0
  883. package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.js +47 -0
  884. package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +15 -0
  885. package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.js +46 -0
  886. package/dist/serialization/resources/whiteLabels/client/requests/index.d.ts +2 -0
  887. package/dist/serialization/resources/whiteLabels/client/requests/index.js +7 -0
  888. package/dist/serialization/resources/whiteLabels/index.d.ts +1 -0
  889. package/dist/serialization/resources/whiteLabels/index.js +17 -0
  890. package/dist/serialization/types/ApiKey.d.ts +20 -0
  891. package/dist/serialization/types/ApiKey.js +51 -0
  892. package/dist/serialization/types/ApiKeyCreate.d.ts +12 -0
  893. package/dist/serialization/types/ApiKeyCreate.js +43 -0
  894. package/dist/serialization/types/ApiKeyWithPlainKey.d.ts +21 -0
  895. package/dist/serialization/types/ApiKeyWithPlainKey.js +52 -0
  896. package/dist/serialization/types/AuthType.d.ts +10 -0
  897. package/dist/serialization/types/AuthType.js +50 -0
  898. package/dist/serialization/types/Chat.d.ts +25 -0
  899. package/dist/serialization/types/Chat.js +56 -0
  900. package/dist/serialization/types/ChatCreate.d.ts +17 -0
  901. package/dist/serialization/types/ChatCreate.js +48 -0
  902. package/dist/serialization/types/ChatMessage.d.ts +21 -0
  903. package/dist/serialization/types/ChatMessage.js +52 -0
  904. package/dist/serialization/types/ChatMessageCreate.d.ts +13 -0
  905. package/dist/serialization/types/ChatMessageCreate.js +44 -0
  906. package/dist/serialization/types/ChatUpdate.d.ts +15 -0
  907. package/dist/serialization/types/ChatUpdate.js +46 -0
  908. package/dist/serialization/types/ConfigField.d.ts +15 -0
  909. package/dist/serialization/types/ConfigField.js +46 -0
  910. package/dist/serialization/types/Connection.d.ts +22 -0
  911. package/dist/serialization/types/Connection.js +53 -0
  912. package/dist/serialization/types/ConnectionStatus.d.ts +10 -0
  913. package/dist/serialization/types/ConnectionStatus.js +41 -0
  914. package/dist/serialization/types/DagEdge.d.ts +18 -0
  915. package/dist/serialization/types/DagEdge.js +49 -0
  916. package/dist/serialization/types/DagEdgeCreate.d.ts +13 -0
  917. package/dist/serialization/types/DagEdgeCreate.js +44 -0
  918. package/dist/serialization/types/DagNode.d.ts +23 -0
  919. package/dist/serialization/types/DagNode.js +54 -0
  920. package/dist/serialization/types/DagNodeCreate.d.ts +19 -0
  921. package/dist/serialization/types/DagNodeCreate.js +50 -0
  922. package/dist/serialization/types/Destination.d.ts +25 -0
  923. package/dist/serialization/types/Destination.js +56 -0
  924. package/dist/serialization/types/DestinationWithConfigFields.d.ts +27 -0
  925. package/dist/serialization/types/DestinationWithConfigFields.js +58 -0
  926. package/dist/serialization/types/EmbeddingModel.d.ts +23 -0
  927. package/dist/serialization/types/EmbeddingModel.js +54 -0
  928. package/dist/serialization/types/EmbeddingModelWithConfigFields.d.ts +25 -0
  929. package/dist/serialization/types/EmbeddingModelWithConfigFields.js +56 -0
  930. package/dist/serialization/types/EntityDefinition.d.ts +22 -0
  931. package/dist/serialization/types/EntityDefinition.js +53 -0
  932. package/dist/serialization/types/EntityDefinitionEntitySchema.d.ts +10 -0
  933. package/dist/serialization/types/EntityDefinitionEntitySchema.js +44 -0
  934. package/dist/serialization/types/EntityRelation.d.ts +19 -0
  935. package/dist/serialization/types/EntityRelation.js +50 -0
  936. package/dist/serialization/types/EntityType.d.ts +10 -0
  937. package/dist/serialization/types/EntityType.js +41 -0
  938. package/dist/serialization/types/Fields.d.ts +13 -0
  939. package/dist/serialization/types/Fields.js +44 -0
  940. package/dist/serialization/types/HttpValidationError.d.ts +13 -0
  941. package/dist/serialization/types/HttpValidationError.js +44 -0
  942. package/dist/serialization/types/IntegrationType.d.ts +10 -0
  943. package/dist/serialization/types/IntegrationType.js +41 -0
  944. package/dist/serialization/types/NodeType.d.ts +10 -0
  945. package/dist/serialization/types/NodeType.js +41 -0
  946. package/dist/serialization/types/Source.d.ts +25 -0
  947. package/dist/serialization/types/Source.js +56 -0
  948. package/dist/serialization/types/SourceWithConfigFields.d.ts +27 -0
  949. package/dist/serialization/types/SourceWithConfigFields.js +58 -0
  950. package/dist/serialization/types/Sync.d.ts +29 -0
  951. package/dist/serialization/types/Sync.js +60 -0
  952. package/dist/serialization/types/SyncDag.d.ts +22 -0
  953. package/dist/serialization/types/SyncDag.js +53 -0
  954. package/dist/serialization/types/SyncDagCreate.d.ts +18 -0
  955. package/dist/serialization/types/SyncDagCreate.js +49 -0
  956. package/dist/serialization/types/SyncDagUpdate.d.ts +18 -0
  957. package/dist/serialization/types/SyncDagUpdate.js +49 -0
  958. package/dist/serialization/types/SyncJob.d.ts +29 -0
  959. package/dist/serialization/types/SyncJob.js +60 -0
  960. package/dist/serialization/types/SyncJobStatus.d.ts +10 -0
  961. package/dist/serialization/types/SyncJobStatus.js +41 -0
  962. package/dist/serialization/types/SyncStatus.d.ts +10 -0
  963. package/dist/serialization/types/SyncStatus.js +41 -0
  964. package/dist/serialization/types/SyncWithSourceConnection.d.ts +31 -0
  965. package/dist/serialization/types/SyncWithSourceConnection.js +62 -0
  966. package/dist/serialization/types/Transformer.d.ts +22 -0
  967. package/dist/serialization/types/Transformer.js +53 -0
  968. package/dist/serialization/types/User.d.ts +16 -0
  969. package/dist/serialization/types/User.js +47 -0
  970. package/dist/serialization/types/ValidationError.d.ts +15 -0
  971. package/dist/serialization/types/ValidationError.js +46 -0
  972. package/dist/serialization/types/ValidationErrorLocItem.d.ts +10 -0
  973. package/dist/serialization/types/ValidationErrorLocItem.js +41 -0
  974. package/dist/serialization/types/WhiteLabel.d.ts +22 -0
  975. package/dist/serialization/types/WhiteLabel.js +53 -0
  976. package/dist/serialization/types/index.d.ts +43 -0
  977. package/dist/serialization/types/index.js +59 -0
  978. package/dist/version.d.ts +1 -0
  979. package/dist/version.js +4 -0
  980. package/environments.d.ts +8 -0
  981. package/environments.js +10 -0
  982. package/errors/AirweaveSDKError.d.ts +12 -0
  983. package/errors/AirweaveSDKError.js +32 -0
  984. package/errors/AirweaveSDKTimeoutError.d.ts +6 -0
  985. package/errors/AirweaveSDKTimeoutError.js +13 -0
  986. package/errors/index.d.ts +2 -0
  987. package/errors/index.js +7 -0
  988. package/index.d.ts +4 -0
  989. package/index.js +44 -1
  990. package/jest.config.js +5 -0
  991. package/package.json +41 -14
  992. package/reference.md +3733 -0
  993. package/serialization/index.d.ts +2 -0
  994. package/serialization/index.js +18 -0
  995. package/serialization/resources/connections/client/getConnectionCredentials.d.ts +9 -0
  996. package/serialization/resources/connections/client/getConnectionCredentials.js +41 -0
  997. package/serialization/resources/connections/client/getOauth2AuthUrl.d.ts +9 -0
  998. package/serialization/resources/connections/client/getOauth2AuthUrl.js +41 -0
  999. package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +9 -0
  1000. package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.js +41 -0
  1001. package/serialization/resources/connections/client/index.d.ts +7 -0
  1002. package/serialization/resources/connections/client/index.js +46 -0
  1003. package/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +11 -0
  1004. package/serialization/resources/connections/client/listAllConnectedIntegrations.js +42 -0
  1005. package/serialization/resources/connections/client/listConnectedIntegrations.d.ts +11 -0
  1006. package/serialization/resources/connections/client/listConnectedIntegrations.js +42 -0
  1007. package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +13 -0
  1008. package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +44 -0
  1009. package/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +13 -0
  1010. package/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +44 -0
  1011. package/serialization/resources/connections/client/requests/index.d.ts +2 -0
  1012. package/serialization/resources/connections/client/requests/index.js +7 -0
  1013. package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +9 -0
  1014. package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.js +41 -0
  1015. package/serialization/resources/connections/index.d.ts +1 -0
  1016. package/serialization/resources/connections/index.js +17 -0
  1017. package/serialization/resources/destinations/client/index.d.ts +1 -0
  1018. package/serialization/resources/destinations/client/index.js +37 -0
  1019. package/serialization/resources/destinations/client/listDestinations.d.ts +11 -0
  1020. package/serialization/resources/destinations/client/listDestinations.js +42 -0
  1021. package/serialization/resources/destinations/index.d.ts +1 -0
  1022. package/serialization/resources/destinations/index.js +17 -0
  1023. package/serialization/resources/embeddingModels/client/index.d.ts +1 -0
  1024. package/serialization/resources/embeddingModels/client/index.js +37 -0
  1025. package/serialization/resources/embeddingModels/client/readEmbeddingModels.d.ts +11 -0
  1026. package/serialization/resources/embeddingModels/client/readEmbeddingModels.js +42 -0
  1027. package/serialization/resources/embeddingModels/index.d.ts +1 -0
  1028. package/serialization/resources/embeddingModels/index.js +17 -0
  1029. package/serialization/resources/entities/client/getEntityDefinitionsByIds.d.ts +15 -0
  1030. package/serialization/resources/entities/client/getEntityDefinitionsByIds.js +43 -0
  1031. package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.d.ts +11 -0
  1032. package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +42 -0
  1033. package/serialization/resources/entities/client/index.d.ts +5 -0
  1034. package/serialization/resources/entities/client/index.js +44 -0
  1035. package/serialization/resources/entities/client/listEntityDefinitions.d.ts +11 -0
  1036. package/serialization/resources/entities/client/listEntityDefinitions.js +42 -0
  1037. package/serialization/resources/entities/client/listEntityRelations.d.ts +11 -0
  1038. package/serialization/resources/entities/client/listEntityRelations.js +42 -0
  1039. package/serialization/resources/entities/client/requests/EntityDefinitionCreate.d.ts +20 -0
  1040. package/serialization/resources/entities/client/requests/EntityDefinitionCreate.js +51 -0
  1041. package/serialization/resources/entities/client/requests/EntityDefinitionUpdate.d.ts +20 -0
  1042. package/serialization/resources/entities/client/requests/EntityDefinitionUpdate.js +51 -0
  1043. package/serialization/resources/entities/client/requests/EntityRelationCreate.d.ts +15 -0
  1044. package/serialization/resources/entities/client/requests/EntityRelationCreate.js +46 -0
  1045. package/serialization/resources/entities/client/requests/EntityRelationUpdate.d.ts +15 -0
  1046. package/serialization/resources/entities/client/requests/EntityRelationUpdate.js +46 -0
  1047. package/serialization/resources/entities/client/requests/index.d.ts +4 -0
  1048. package/serialization/resources/entities/client/requests/index.js +11 -0
  1049. package/serialization/resources/entities/index.d.ts +2 -0
  1050. package/serialization/resources/entities/index.js +18 -0
  1051. package/serialization/resources/entities/types/EntityDefinitionCreateEntitySchema.d.ts +10 -0
  1052. package/serialization/resources/entities/types/EntityDefinitionCreateEntitySchema.js +44 -0
  1053. package/serialization/resources/entities/types/EntityDefinitionUpdateEntitySchema.d.ts +10 -0
  1054. package/serialization/resources/entities/types/EntityDefinitionUpdateEntitySchema.js +44 -0
  1055. package/serialization/resources/entities/types/index.d.ts +2 -0
  1056. package/serialization/resources/entities/types/index.js +18 -0
  1057. package/serialization/resources/index.d.ts +16 -0
  1058. package/serialization/resources/index.js +55 -0
  1059. package/serialization/resources/search/client/index.d.ts +1 -0
  1060. package/serialization/resources/search/client/index.js +37 -0
  1061. package/serialization/resources/search/client/search.d.ts +9 -0
  1062. package/serialization/resources/search/client/search.js +41 -0
  1063. package/serialization/resources/search/index.d.ts +1 -0
  1064. package/serialization/resources/search/index.js +17 -0
  1065. package/serialization/resources/sources/client/index.d.ts +1 -0
  1066. package/serialization/resources/sources/client/index.js +37 -0
  1067. package/serialization/resources/sources/client/readSources.d.ts +11 -0
  1068. package/serialization/resources/sources/client/readSources.js +42 -0
  1069. package/serialization/resources/sources/index.d.ts +1 -0
  1070. package/serialization/resources/sources/index.js +17 -0
  1071. package/serialization/resources/sync/client/index.d.ts +3 -0
  1072. package/serialization/resources/sync/client/index.js +42 -0
  1073. package/serialization/resources/sync/client/listAllJobs.d.ts +11 -0
  1074. package/serialization/resources/sync/client/listAllJobs.js +42 -0
  1075. package/serialization/resources/sync/client/listSyncJobs.d.ts +11 -0
  1076. package/serialization/resources/sync/client/listSyncJobs.js +42 -0
  1077. package/serialization/resources/sync/client/requests/SyncCreate.d.ts +24 -0
  1078. package/serialization/resources/sync/client/requests/SyncCreate.js +55 -0
  1079. package/serialization/resources/sync/client/requests/SyncUpdate.d.ts +19 -0
  1080. package/serialization/resources/sync/client/requests/SyncUpdate.js +50 -0
  1081. package/serialization/resources/sync/client/requests/index.d.ts +2 -0
  1082. package/serialization/resources/sync/client/requests/index.js +7 -0
  1083. package/serialization/resources/sync/index.d.ts +2 -0
  1084. package/serialization/resources/sync/index.js +18 -0
  1085. package/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +12 -0
  1086. package/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +46 -0
  1087. package/serialization/resources/sync/types/index.d.ts +1 -0
  1088. package/serialization/resources/sync/types/index.js +17 -0
  1089. package/serialization/resources/transformers/client/index.d.ts +2 -0
  1090. package/serialization/resources/transformers/client/index.js +41 -0
  1091. package/serialization/resources/transformers/client/listTransformers.d.ts +11 -0
  1092. package/serialization/resources/transformers/client/listTransformers.js +42 -0
  1093. package/serialization/resources/transformers/client/requests/TransformerCreate.d.ts +18 -0
  1094. package/serialization/resources/transformers/client/requests/TransformerCreate.js +49 -0
  1095. package/serialization/resources/transformers/client/requests/TransformerUpdate.d.ts +18 -0
  1096. package/serialization/resources/transformers/client/requests/TransformerUpdate.js +49 -0
  1097. package/serialization/resources/transformers/client/requests/index.d.ts +2 -0
  1098. package/serialization/resources/transformers/client/requests/index.js +7 -0
  1099. package/serialization/resources/transformers/index.d.ts +1 -0
  1100. package/serialization/resources/transformers/index.js +17 -0
  1101. package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +9 -0
  1102. package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js +41 -0
  1103. package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +9 -0
  1104. package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js +41 -0
  1105. package/serialization/resources/whiteLabels/client/index.d.ts +5 -0
  1106. package/serialization/resources/whiteLabels/client/index.js +44 -0
  1107. package/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts +11 -0
  1108. package/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js +42 -0
  1109. package/serialization/resources/whiteLabels/client/listWhiteLabels.d.ts +11 -0
  1110. package/serialization/resources/whiteLabels/client/listWhiteLabels.js +42 -0
  1111. package/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +16 -0
  1112. package/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.js +47 -0
  1113. package/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +15 -0
  1114. package/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.js +46 -0
  1115. package/serialization/resources/whiteLabels/client/requests/index.d.ts +2 -0
  1116. package/serialization/resources/whiteLabels/client/requests/index.js +7 -0
  1117. package/serialization/resources/whiteLabels/index.d.ts +1 -0
  1118. package/serialization/resources/whiteLabels/index.js +17 -0
  1119. package/serialization/types/ApiKey.d.ts +20 -0
  1120. package/serialization/types/ApiKey.js +51 -0
  1121. package/serialization/types/ApiKeyCreate.d.ts +12 -0
  1122. package/serialization/types/ApiKeyCreate.js +43 -0
  1123. package/serialization/types/ApiKeyWithPlainKey.d.ts +21 -0
  1124. package/serialization/types/ApiKeyWithPlainKey.js +52 -0
  1125. package/serialization/types/AuthType.d.ts +10 -0
  1126. package/serialization/types/AuthType.js +50 -0
  1127. package/serialization/types/Chat.d.ts +25 -0
  1128. package/serialization/types/Chat.js +56 -0
  1129. package/serialization/types/ChatCreate.d.ts +17 -0
  1130. package/serialization/types/ChatCreate.js +48 -0
  1131. package/serialization/types/ChatMessage.d.ts +21 -0
  1132. package/serialization/types/ChatMessage.js +52 -0
  1133. package/serialization/types/ChatMessageCreate.d.ts +13 -0
  1134. package/serialization/types/ChatMessageCreate.js +44 -0
  1135. package/serialization/types/ChatUpdate.d.ts +15 -0
  1136. package/serialization/types/ChatUpdate.js +46 -0
  1137. package/serialization/types/ConfigField.d.ts +15 -0
  1138. package/serialization/types/ConfigField.js +46 -0
  1139. package/serialization/types/Connection.d.ts +22 -0
  1140. package/serialization/types/Connection.js +53 -0
  1141. package/serialization/types/ConnectionStatus.d.ts +10 -0
  1142. package/serialization/types/ConnectionStatus.js +41 -0
  1143. package/serialization/types/DagEdge.d.ts +18 -0
  1144. package/serialization/types/DagEdge.js +49 -0
  1145. package/serialization/types/DagEdgeCreate.d.ts +13 -0
  1146. package/serialization/types/DagEdgeCreate.js +44 -0
  1147. package/serialization/types/DagNode.d.ts +23 -0
  1148. package/serialization/types/DagNode.js +54 -0
  1149. package/serialization/types/DagNodeCreate.d.ts +19 -0
  1150. package/serialization/types/DagNodeCreate.js +50 -0
  1151. package/serialization/types/Destination.d.ts +25 -0
  1152. package/serialization/types/Destination.js +56 -0
  1153. package/serialization/types/DestinationWithConfigFields.d.ts +27 -0
  1154. package/serialization/types/DestinationWithConfigFields.js +58 -0
  1155. package/serialization/types/EmbeddingModel.d.ts +23 -0
  1156. package/serialization/types/EmbeddingModel.js +54 -0
  1157. package/serialization/types/EmbeddingModelWithConfigFields.d.ts +25 -0
  1158. package/serialization/types/EmbeddingModelWithConfigFields.js +56 -0
  1159. package/serialization/types/EntityDefinition.d.ts +22 -0
  1160. package/serialization/types/EntityDefinition.js +53 -0
  1161. package/serialization/types/EntityDefinitionEntitySchema.d.ts +10 -0
  1162. package/serialization/types/EntityDefinitionEntitySchema.js +44 -0
  1163. package/serialization/types/EntityRelation.d.ts +19 -0
  1164. package/serialization/types/EntityRelation.js +50 -0
  1165. package/serialization/types/EntityType.d.ts +10 -0
  1166. package/serialization/types/EntityType.js +41 -0
  1167. package/serialization/types/Fields.d.ts +13 -0
  1168. package/serialization/types/Fields.js +44 -0
  1169. package/serialization/types/HttpValidationError.d.ts +13 -0
  1170. package/serialization/types/HttpValidationError.js +44 -0
  1171. package/serialization/types/IntegrationType.d.ts +10 -0
  1172. package/serialization/types/IntegrationType.js +41 -0
  1173. package/serialization/types/NodeType.d.ts +10 -0
  1174. package/serialization/types/NodeType.js +41 -0
  1175. package/serialization/types/Source.d.ts +25 -0
  1176. package/serialization/types/Source.js +56 -0
  1177. package/serialization/types/SourceWithConfigFields.d.ts +27 -0
  1178. package/serialization/types/SourceWithConfigFields.js +58 -0
  1179. package/serialization/types/Sync.d.ts +29 -0
  1180. package/serialization/types/Sync.js +60 -0
  1181. package/serialization/types/SyncDag.d.ts +22 -0
  1182. package/serialization/types/SyncDag.js +53 -0
  1183. package/serialization/types/SyncDagCreate.d.ts +18 -0
  1184. package/serialization/types/SyncDagCreate.js +49 -0
  1185. package/serialization/types/SyncDagUpdate.d.ts +18 -0
  1186. package/serialization/types/SyncDagUpdate.js +49 -0
  1187. package/serialization/types/SyncJob.d.ts +29 -0
  1188. package/serialization/types/SyncJob.js +60 -0
  1189. package/serialization/types/SyncJobStatus.d.ts +10 -0
  1190. package/serialization/types/SyncJobStatus.js +41 -0
  1191. package/serialization/types/SyncStatus.d.ts +10 -0
  1192. package/serialization/types/SyncStatus.js +41 -0
  1193. package/serialization/types/SyncWithSourceConnection.d.ts +31 -0
  1194. package/serialization/types/SyncWithSourceConnection.js +62 -0
  1195. package/serialization/types/Transformer.d.ts +22 -0
  1196. package/serialization/types/Transformer.js +53 -0
  1197. package/serialization/types/User.d.ts +16 -0
  1198. package/serialization/types/User.js +47 -0
  1199. package/serialization/types/ValidationError.d.ts +15 -0
  1200. package/serialization/types/ValidationError.js +46 -0
  1201. package/serialization/types/ValidationErrorLocItem.d.ts +10 -0
  1202. package/serialization/types/ValidationErrorLocItem.js +41 -0
  1203. package/serialization/types/WhiteLabel.d.ts +22 -0
  1204. package/serialization/types/WhiteLabel.js +53 -0
  1205. package/serialization/types/index.d.ts +43 -0
  1206. package/serialization/types/index.js +59 -0
  1207. package/version.d.ts +1 -0
  1208. package/version.js +4 -0
@@ -0,0 +1,1001 @@
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.Connections = 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 Connections {
59
+ constructor(_options = {}) {
60
+ this._options = _options;
61
+ }
62
+ /**
63
+ * Get a specific connection.
64
+ *
65
+ * Args:
66
+ * -----
67
+ * connection_id: The ID of the connection to get.
68
+ * db: The database session.
69
+ * user: The current user.
70
+ *
71
+ * Returns:
72
+ * -------
73
+ * schemas.Connection: The connection.
74
+ *
75
+ * @param {string} connectionId
76
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
77
+ *
78
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
79
+ *
80
+ * @example
81
+ * await client.connections.getConnection("connection_id")
82
+ */
83
+ getConnection(connectionId, requestOptions) {
84
+ return __awaiter(this, void 0, void 0, function* () {
85
+ var _a;
86
+ const _response = yield core.fetcher({
87
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/detail/${encodeURIComponent(connectionId)}`),
88
+ method: "GET",
89
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
90
+ ? yield core.Supplier.get(this._options.apiKey)
91
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
92
+ contentType: "application/json",
93
+ requestType: "json",
94
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
95
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
96
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
97
+ });
98
+ if (_response.ok) {
99
+ return serializers.Connection.parseOrThrow(_response.body, {
100
+ unrecognizedObjectKeys: "passthrough",
101
+ allowUnrecognizedUnionMembers: true,
102
+ allowUnrecognizedEnumValues: true,
103
+ breadcrumbsPrefix: ["response"],
104
+ });
105
+ }
106
+ if (_response.error.reason === "status-code") {
107
+ switch (_response.error.statusCode) {
108
+ case 422:
109
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
110
+ unrecognizedObjectKeys: "passthrough",
111
+ allowUnrecognizedUnionMembers: true,
112
+ allowUnrecognizedEnumValues: true,
113
+ breadcrumbsPrefix: ["response"],
114
+ }));
115
+ default:
116
+ throw new errors.AirweaveSDKError({
117
+ statusCode: _response.error.statusCode,
118
+ body: _response.error.body,
119
+ });
120
+ }
121
+ }
122
+ switch (_response.error.reason) {
123
+ case "non-json":
124
+ throw new errors.AirweaveSDKError({
125
+ statusCode: _response.error.statusCode,
126
+ body: _response.error.rawBody,
127
+ });
128
+ case "timeout":
129
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/detail/{connection_id}.");
130
+ case "unknown":
131
+ throw new errors.AirweaveSDKError({
132
+ message: _response.error.errorMessage,
133
+ });
134
+ }
135
+ });
136
+ }
137
+ /**
138
+ * Get all active connections for the current user across all integration types.
139
+ *
140
+ * Args:
141
+ * -----
142
+ * db: The database session.
143
+ * user: The current user.
144
+ *
145
+ * Returns:
146
+ * -------
147
+ * list[schemas.Connection]: The list of connections.
148
+ *
149
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
150
+ *
151
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
152
+ *
153
+ * @example
154
+ * await client.connections.listAllConnectedIntegrations()
155
+ */
156
+ listAllConnectedIntegrations(requestOptions) {
157
+ return __awaiter(this, void 0, void 0, function* () {
158
+ var _a;
159
+ const _response = yield core.fetcher({
160
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/list"),
161
+ method: "GET",
162
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
163
+ ? yield core.Supplier.get(this._options.apiKey)
164
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
165
+ contentType: "application/json",
166
+ requestType: "json",
167
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
168
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
169
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
170
+ });
171
+ if (_response.ok) {
172
+ return serializers.connections.listAllConnectedIntegrations.Response.parseOrThrow(_response.body, {
173
+ unrecognizedObjectKeys: "passthrough",
174
+ allowUnrecognizedUnionMembers: true,
175
+ allowUnrecognizedEnumValues: true,
176
+ breadcrumbsPrefix: ["response"],
177
+ });
178
+ }
179
+ if (_response.error.reason === "status-code") {
180
+ switch (_response.error.statusCode) {
181
+ case 422:
182
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
183
+ unrecognizedObjectKeys: "passthrough",
184
+ allowUnrecognizedUnionMembers: true,
185
+ allowUnrecognizedEnumValues: true,
186
+ breadcrumbsPrefix: ["response"],
187
+ }));
188
+ default:
189
+ throw new errors.AirweaveSDKError({
190
+ statusCode: _response.error.statusCode,
191
+ body: _response.error.body,
192
+ });
193
+ }
194
+ }
195
+ switch (_response.error.reason) {
196
+ case "non-json":
197
+ throw new errors.AirweaveSDKError({
198
+ statusCode: _response.error.statusCode,
199
+ body: _response.error.rawBody,
200
+ });
201
+ case "timeout":
202
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/list.");
203
+ case "unknown":
204
+ throw new errors.AirweaveSDKError({
205
+ message: _response.error.errorMessage,
206
+ });
207
+ }
208
+ });
209
+ }
210
+ /**
211
+ * Get all integrations of specified type connected to the current user.
212
+ *
213
+ * Args:
214
+ * -----
215
+ * integration_type (IntegrationType): The type of integration to get connections for.
216
+ * db (AsyncSession): The database session.
217
+ * user (schemas.User): The current user.
218
+ *
219
+ * Returns:
220
+ * -------
221
+ * list[schemas.Connection]: The list of connections.
222
+ *
223
+ * @param {AirweaveSDK.IntegrationType} integrationType
224
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
225
+ *
226
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
227
+ *
228
+ * @example
229
+ * await client.connections.listConnectedIntegrations("source")
230
+ */
231
+ listConnectedIntegrations(integrationType, requestOptions) {
232
+ return __awaiter(this, void 0, void 0, function* () {
233
+ var _a;
234
+ const _response = yield core.fetcher({
235
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/list/${encodeURIComponent(serializers.IntegrationType.jsonOrThrow(integrationType))}`),
236
+ method: "GET",
237
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
238
+ ? yield core.Supplier.get(this._options.apiKey)
239
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
240
+ contentType: "application/json",
241
+ requestType: "json",
242
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
243
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
244
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
245
+ });
246
+ if (_response.ok) {
247
+ return serializers.connections.listConnectedIntegrations.Response.parseOrThrow(_response.body, {
248
+ unrecognizedObjectKeys: "passthrough",
249
+ allowUnrecognizedUnionMembers: true,
250
+ allowUnrecognizedEnumValues: true,
251
+ breadcrumbsPrefix: ["response"],
252
+ });
253
+ }
254
+ if (_response.error.reason === "status-code") {
255
+ switch (_response.error.statusCode) {
256
+ case 422:
257
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
258
+ unrecognizedObjectKeys: "passthrough",
259
+ allowUnrecognizedUnionMembers: true,
260
+ allowUnrecognizedEnumValues: true,
261
+ breadcrumbsPrefix: ["response"],
262
+ }));
263
+ default:
264
+ throw new errors.AirweaveSDKError({
265
+ statusCode: _response.error.statusCode,
266
+ body: _response.error.body,
267
+ });
268
+ }
269
+ }
270
+ switch (_response.error.reason) {
271
+ case "non-json":
272
+ throw new errors.AirweaveSDKError({
273
+ statusCode: _response.error.statusCode,
274
+ body: _response.error.rawBody,
275
+ });
276
+ case "timeout":
277
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/list/{integration_type}.");
278
+ case "unknown":
279
+ throw new errors.AirweaveSDKError({
280
+ message: _response.error.errorMessage,
281
+ });
282
+ }
283
+ });
284
+ }
285
+ /**
286
+ * Connect to a source, destination, or embedding model.
287
+ *
288
+ * Expects a POST body with:
289
+ * ```json
290
+ * {
291
+ * "name": "required connection name",
292
+ * ... other config fields specific to the integration type ...
293
+ * }
294
+ * ```
295
+ *
296
+ * Args:
297
+ * -----
298
+ * db: The database session.
299
+ * integration_type: The type of integration to connect to.
300
+ * short_name: The short name of the integration to connect to.
301
+ * name: The name of the connection.
302
+ * config_fields: The config fields for the integration.
303
+ * user: The current user.
304
+ *
305
+ * Returns:
306
+ * -------
307
+ * schemas.Connection: The connection.
308
+ *
309
+ * @param {AirweaveSDK.IntegrationType} integrationType
310
+ * @param {string} shortName
311
+ * @param {AirweaveSDK.BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost} request
312
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
313
+ *
314
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
315
+ *
316
+ * @example
317
+ * await client.connections.connectIntegration("source", "short_name", {
318
+ * configFields: {
319
+ * "key": "value"
320
+ * }
321
+ * })
322
+ */
323
+ connectIntegration(integrationType, shortName, request, requestOptions) {
324
+ return __awaiter(this, void 0, void 0, function* () {
325
+ var _a;
326
+ const _response = yield core.fetcher({
327
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/connect/${encodeURIComponent(serializers.IntegrationType.jsonOrThrow(integrationType))}/${encodeURIComponent(shortName)}`),
328
+ method: "POST",
329
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
330
+ ? yield core.Supplier.get(this._options.apiKey)
331
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
332
+ contentType: "application/json",
333
+ requestType: "json",
334
+ body: serializers.BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
335
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
336
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
337
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
338
+ });
339
+ if (_response.ok) {
340
+ return serializers.Connection.parseOrThrow(_response.body, {
341
+ unrecognizedObjectKeys: "passthrough",
342
+ allowUnrecognizedUnionMembers: true,
343
+ allowUnrecognizedEnumValues: true,
344
+ breadcrumbsPrefix: ["response"],
345
+ });
346
+ }
347
+ if (_response.error.reason === "status-code") {
348
+ switch (_response.error.statusCode) {
349
+ case 422:
350
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
351
+ unrecognizedObjectKeys: "passthrough",
352
+ allowUnrecognizedUnionMembers: true,
353
+ allowUnrecognizedEnumValues: true,
354
+ breadcrumbsPrefix: ["response"],
355
+ }));
356
+ default:
357
+ throw new errors.AirweaveSDKError({
358
+ statusCode: _response.error.statusCode,
359
+ body: _response.error.body,
360
+ });
361
+ }
362
+ }
363
+ switch (_response.error.reason) {
364
+ case "non-json":
365
+ throw new errors.AirweaveSDKError({
366
+ statusCode: _response.error.statusCode,
367
+ body: _response.error.rawBody,
368
+ });
369
+ case "timeout":
370
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/connect/{integration_type}/{short_name}.");
371
+ case "unknown":
372
+ throw new errors.AirweaveSDKError({
373
+ message: _response.error.errorMessage,
374
+ });
375
+ }
376
+ });
377
+ }
378
+ /**
379
+ * Get the credentials for a connection.
380
+ *
381
+ * Args:
382
+ * -----
383
+ * connection_id (UUID): The ID of the connection to get credentials for
384
+ * db (AsyncSession): The database session
385
+ * user (schemas.User): The current user
386
+ *
387
+ * Returns:
388
+ * -------
389
+ * decrypted_credentials (dict): The credentials for the connection
390
+ *
391
+ * @param {string} connectionId
392
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
393
+ *
394
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
395
+ *
396
+ * @example
397
+ * await client.connections.getConnectionCredentials("connection_id")
398
+ */
399
+ getConnectionCredentials(connectionId, requestOptions) {
400
+ return __awaiter(this, void 0, void 0, function* () {
401
+ var _a;
402
+ const _response = yield core.fetcher({
403
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/credentials/${encodeURIComponent(connectionId)}`),
404
+ method: "GET",
405
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
406
+ ? yield core.Supplier.get(this._options.apiKey)
407
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
408
+ contentType: "application/json",
409
+ requestType: "json",
410
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
411
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
412
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
413
+ });
414
+ if (_response.ok) {
415
+ return serializers.connections.getConnectionCredentials.Response.parseOrThrow(_response.body, {
416
+ unrecognizedObjectKeys: "passthrough",
417
+ allowUnrecognizedUnionMembers: true,
418
+ allowUnrecognizedEnumValues: true,
419
+ breadcrumbsPrefix: ["response"],
420
+ });
421
+ }
422
+ if (_response.error.reason === "status-code") {
423
+ switch (_response.error.statusCode) {
424
+ case 422:
425
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
426
+ unrecognizedObjectKeys: "passthrough",
427
+ allowUnrecognizedUnionMembers: true,
428
+ allowUnrecognizedEnumValues: true,
429
+ breadcrumbsPrefix: ["response"],
430
+ }));
431
+ default:
432
+ throw new errors.AirweaveSDKError({
433
+ statusCode: _response.error.statusCode,
434
+ body: _response.error.body,
435
+ });
436
+ }
437
+ }
438
+ switch (_response.error.reason) {
439
+ case "non-json":
440
+ throw new errors.AirweaveSDKError({
441
+ statusCode: _response.error.statusCode,
442
+ body: _response.error.rawBody,
443
+ });
444
+ case "timeout":
445
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/credentials/{connection_id}.");
446
+ case "unknown":
447
+ throw new errors.AirweaveSDKError({
448
+ message: _response.error.errorMessage,
449
+ });
450
+ }
451
+ });
452
+ }
453
+ /**
454
+ * Delete a connection.
455
+ *
456
+ * Deletes the connection and integration credential.
457
+ *
458
+ * Args:
459
+ * -----
460
+ * db (AsyncSession): The database session
461
+ * connection_id (UUID): The ID of the connection to delete
462
+ * user (schemas.User): The current user
463
+ *
464
+ * Returns:
465
+ * --------
466
+ * connection (schemas.Connection): The deleted connection
467
+ *
468
+ * @param {string} connectionId
469
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
470
+ *
471
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
472
+ *
473
+ * @example
474
+ * await client.connections.deleteConnection("connection_id")
475
+ */
476
+ deleteConnection(connectionId, requestOptions) {
477
+ return __awaiter(this, void 0, void 0, function* () {
478
+ var _a;
479
+ const _response = yield core.fetcher({
480
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/delete/source/${encodeURIComponent(connectionId)}`),
481
+ method: "DELETE",
482
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
483
+ ? yield core.Supplier.get(this._options.apiKey)
484
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
485
+ contentType: "application/json",
486
+ requestType: "json",
487
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
488
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
489
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
490
+ });
491
+ if (_response.ok) {
492
+ return serializers.Connection.parseOrThrow(_response.body, {
493
+ unrecognizedObjectKeys: "passthrough",
494
+ allowUnrecognizedUnionMembers: true,
495
+ allowUnrecognizedEnumValues: true,
496
+ breadcrumbsPrefix: ["response"],
497
+ });
498
+ }
499
+ if (_response.error.reason === "status-code") {
500
+ switch (_response.error.statusCode) {
501
+ case 422:
502
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
503
+ unrecognizedObjectKeys: "passthrough",
504
+ allowUnrecognizedUnionMembers: true,
505
+ allowUnrecognizedEnumValues: true,
506
+ breadcrumbsPrefix: ["response"],
507
+ }));
508
+ default:
509
+ throw new errors.AirweaveSDKError({
510
+ statusCode: _response.error.statusCode,
511
+ body: _response.error.body,
512
+ });
513
+ }
514
+ }
515
+ switch (_response.error.reason) {
516
+ case "non-json":
517
+ throw new errors.AirweaveSDKError({
518
+ statusCode: _response.error.statusCode,
519
+ body: _response.error.rawBody,
520
+ });
521
+ case "timeout":
522
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling DELETE /connections/delete/source/{connection_id}.");
523
+ case "unknown":
524
+ throw new errors.AirweaveSDKError({
525
+ message: _response.error.errorMessage,
526
+ });
527
+ }
528
+ });
529
+ }
530
+ /**
531
+ * Disconnect from a source connection.
532
+ *
533
+ * Args:
534
+ * -----
535
+ * db (AsyncSession): The database session
536
+ * connection_id (UUID): The ID of the connection to disconnect
537
+ * user (schemas.User): The current user
538
+ *
539
+ * Returns:
540
+ * --------
541
+ * connection_schema (schemas.Connection): The disconnected connection
542
+ *
543
+ * @param {string} connectionId
544
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
545
+ *
546
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
547
+ *
548
+ * @example
549
+ * await client.connections.disconnectSourceConnection("connection_id")
550
+ */
551
+ disconnectSourceConnection(connectionId, requestOptions) {
552
+ return __awaiter(this, void 0, void 0, function* () {
553
+ var _a;
554
+ const _response = yield core.fetcher({
555
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/disconnect/source/${encodeURIComponent(connectionId)}`),
556
+ method: "PUT",
557
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
558
+ ? yield core.Supplier.get(this._options.apiKey)
559
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
560
+ contentType: "application/json",
561
+ requestType: "json",
562
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
563
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
564
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
565
+ });
566
+ if (_response.ok) {
567
+ return serializers.Connection.parseOrThrow(_response.body, {
568
+ unrecognizedObjectKeys: "passthrough",
569
+ allowUnrecognizedUnionMembers: true,
570
+ allowUnrecognizedEnumValues: true,
571
+ breadcrumbsPrefix: ["response"],
572
+ });
573
+ }
574
+ if (_response.error.reason === "status-code") {
575
+ switch (_response.error.statusCode) {
576
+ case 422:
577
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
578
+ unrecognizedObjectKeys: "passthrough",
579
+ allowUnrecognizedUnionMembers: true,
580
+ allowUnrecognizedEnumValues: true,
581
+ breadcrumbsPrefix: ["response"],
582
+ }));
583
+ default:
584
+ throw new errors.AirweaveSDKError({
585
+ statusCode: _response.error.statusCode,
586
+ body: _response.error.body,
587
+ });
588
+ }
589
+ }
590
+ switch (_response.error.reason) {
591
+ case "non-json":
592
+ throw new errors.AirweaveSDKError({
593
+ statusCode: _response.error.statusCode,
594
+ body: _response.error.rawBody,
595
+ });
596
+ case "timeout":
597
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /connections/disconnect/source/{connection_id}.");
598
+ case "unknown":
599
+ throw new errors.AirweaveSDKError({
600
+ message: _response.error.errorMessage,
601
+ });
602
+ }
603
+ });
604
+ }
605
+ /**
606
+ * Disconnect from a destination connection.
607
+ *
608
+ * Args:
609
+ * -----
610
+ * db (AsyncSession): The database session
611
+ * connection_id (UUID): The ID of the connection to disconnect
612
+ * user (schemas.User): The current user
613
+ *
614
+ * Returns:
615
+ * --------
616
+ * connection_schema (schemas.Connection): The disconnected connection
617
+ *
618
+ * @param {string} connectionId
619
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
620
+ *
621
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
622
+ *
623
+ * @example
624
+ * await client.connections.disconnectDestinationConnection("connection_id")
625
+ */
626
+ disconnectDestinationConnection(connectionId, requestOptions) {
627
+ return __awaiter(this, void 0, void 0, function* () {
628
+ var _a;
629
+ const _response = yield core.fetcher({
630
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/disconnect/destination/${encodeURIComponent(connectionId)}`),
631
+ method: "PUT",
632
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
633
+ ? yield core.Supplier.get(this._options.apiKey)
634
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
635
+ contentType: "application/json",
636
+ requestType: "json",
637
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
638
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
639
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
640
+ });
641
+ if (_response.ok) {
642
+ return serializers.Connection.parseOrThrow(_response.body, {
643
+ unrecognizedObjectKeys: "passthrough",
644
+ allowUnrecognizedUnionMembers: true,
645
+ allowUnrecognizedEnumValues: true,
646
+ breadcrumbsPrefix: ["response"],
647
+ });
648
+ }
649
+ if (_response.error.reason === "status-code") {
650
+ switch (_response.error.statusCode) {
651
+ case 422:
652
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
653
+ unrecognizedObjectKeys: "passthrough",
654
+ allowUnrecognizedUnionMembers: true,
655
+ allowUnrecognizedEnumValues: true,
656
+ breadcrumbsPrefix: ["response"],
657
+ }));
658
+ default:
659
+ throw new errors.AirweaveSDKError({
660
+ statusCode: _response.error.statusCode,
661
+ body: _response.error.body,
662
+ });
663
+ }
664
+ }
665
+ switch (_response.error.reason) {
666
+ case "non-json":
667
+ throw new errors.AirweaveSDKError({
668
+ statusCode: _response.error.statusCode,
669
+ body: _response.error.rawBody,
670
+ });
671
+ case "timeout":
672
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /connections/disconnect/destination/{connection_id}.");
673
+ case "unknown":
674
+ throw new errors.AirweaveSDKError({
675
+ message: _response.error.errorMessage,
676
+ });
677
+ }
678
+ });
679
+ }
680
+ /**
681
+ * Get the OAuth2 authorization URL for a source.
682
+ *
683
+ * Args:
684
+ * -----
685
+ * db: The database session
686
+ * short_name: The short name of the source
687
+ * user: The current user
688
+ *
689
+ * @param {AirweaveSDK.GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest} request
690
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
691
+ *
692
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
693
+ *
694
+ * @example
695
+ * await client.connections.getOauth2AuthUrl({
696
+ * shortName: "short_name"
697
+ * })
698
+ */
699
+ getOauth2AuthUrl(request, requestOptions) {
700
+ return __awaiter(this, void 0, void 0, function* () {
701
+ var _a;
702
+ const { shortName } = request;
703
+ const _queryParams = {};
704
+ _queryParams["short_name"] = shortName;
705
+ const _response = yield core.fetcher({
706
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/oauth2/source/auth_url"),
707
+ method: "GET",
708
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
709
+ ? yield core.Supplier.get(this._options.apiKey)
710
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
711
+ contentType: "application/json",
712
+ queryParameters: _queryParams,
713
+ requestType: "json",
714
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
715
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
716
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
717
+ });
718
+ if (_response.ok) {
719
+ return serializers.connections.getOauth2AuthUrl.Response.parseOrThrow(_response.body, {
720
+ unrecognizedObjectKeys: "passthrough",
721
+ allowUnrecognizedUnionMembers: true,
722
+ allowUnrecognizedEnumValues: true,
723
+ breadcrumbsPrefix: ["response"],
724
+ });
725
+ }
726
+ if (_response.error.reason === "status-code") {
727
+ switch (_response.error.statusCode) {
728
+ case 422:
729
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
730
+ unrecognizedObjectKeys: "passthrough",
731
+ allowUnrecognizedUnionMembers: true,
732
+ allowUnrecognizedEnumValues: true,
733
+ breadcrumbsPrefix: ["response"],
734
+ }));
735
+ default:
736
+ throw new errors.AirweaveSDKError({
737
+ statusCode: _response.error.statusCode,
738
+ body: _response.error.body,
739
+ });
740
+ }
741
+ }
742
+ switch (_response.error.reason) {
743
+ case "non-json":
744
+ throw new errors.AirweaveSDKError({
745
+ statusCode: _response.error.statusCode,
746
+ body: _response.error.rawBody,
747
+ });
748
+ case "timeout":
749
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/source/auth_url.");
750
+ case "unknown":
751
+ throw new errors.AirweaveSDKError({
752
+ message: _response.error.errorMessage,
753
+ });
754
+ }
755
+ });
756
+ }
757
+ /**
758
+ * Send the OAuth2 authorization code for a source.
759
+ *
760
+ * This will:
761
+ * 1. Get the OAuth2 settings for the source
762
+ * 2. Exchange the authorization code for a token
763
+ * 3. Create an integration credential with the token
764
+ *
765
+ * Args:
766
+ * -----
767
+ * db: The database session
768
+ * short_name: The short name of the source
769
+ * code: The authorization code
770
+ * user: The current user
771
+ *
772
+ * Returns:
773
+ * --------
774
+ * connection (schemas.Connection): The created connection
775
+ *
776
+ * @param {AirweaveSDK.BodySendOauth2CodeConnectionsOauth2SourceCodePost} request
777
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
778
+ *
779
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
780
+ *
781
+ * @example
782
+ * await client.connections.sendOauth2Code({
783
+ * shortName: "short_name",
784
+ * code: "code"
785
+ * })
786
+ */
787
+ sendOauth2Code(request, requestOptions) {
788
+ return __awaiter(this, void 0, void 0, function* () {
789
+ var _a;
790
+ const _response = yield core.fetcher({
791
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/oauth2/source/code"),
792
+ method: "POST",
793
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
794
+ ? yield core.Supplier.get(this._options.apiKey)
795
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
796
+ contentType: "application/json",
797
+ requestType: "json",
798
+ body: serializers.BodySendOauth2CodeConnectionsOauth2SourceCodePost.jsonOrThrow(request, {
799
+ unrecognizedObjectKeys: "strip",
800
+ }),
801
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
802
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
803
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
804
+ });
805
+ if (_response.ok) {
806
+ return serializers.Connection.parseOrThrow(_response.body, {
807
+ unrecognizedObjectKeys: "passthrough",
808
+ allowUnrecognizedUnionMembers: true,
809
+ allowUnrecognizedEnumValues: true,
810
+ breadcrumbsPrefix: ["response"],
811
+ });
812
+ }
813
+ if (_response.error.reason === "status-code") {
814
+ switch (_response.error.statusCode) {
815
+ case 422:
816
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
817
+ unrecognizedObjectKeys: "passthrough",
818
+ allowUnrecognizedUnionMembers: true,
819
+ allowUnrecognizedEnumValues: true,
820
+ breadcrumbsPrefix: ["response"],
821
+ }));
822
+ default:
823
+ throw new errors.AirweaveSDKError({
824
+ statusCode: _response.error.statusCode,
825
+ body: _response.error.body,
826
+ });
827
+ }
828
+ }
829
+ switch (_response.error.reason) {
830
+ case "non-json":
831
+ throw new errors.AirweaveSDKError({
832
+ statusCode: _response.error.statusCode,
833
+ body: _response.error.rawBody,
834
+ });
835
+ case "timeout":
836
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/oauth2/source/code.");
837
+ case "unknown":
838
+ throw new errors.AirweaveSDKError({
839
+ message: _response.error.errorMessage,
840
+ });
841
+ }
842
+ });
843
+ }
844
+ /**
845
+ * Exchange the OAuth2 authorization code for a white label integration.
846
+ *
847
+ * Args:
848
+ * -----
849
+ * db: The database session
850
+ * white_label_id: The ID of the white label integration
851
+ * code: The authorization code
852
+ * user: The current user
853
+ * background_tasks: The background tasks
854
+ *
855
+ * Returns:
856
+ * --------
857
+ * connection (schemas.Connection): The created connection
858
+ *
859
+ * @param {string} whiteLabelId
860
+ * @param {string} request
861
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
862
+ *
863
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
864
+ *
865
+ * @example
866
+ * await client.connections.sendOauth2WhiteLabelCode("white_label_id", "string")
867
+ */
868
+ sendOauth2WhiteLabelCode(whiteLabelId, request, requestOptions) {
869
+ return __awaiter(this, void 0, void 0, function* () {
870
+ var _a;
871
+ const _response = yield core.fetcher({
872
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/oauth2/white-label/${encodeURIComponent(whiteLabelId)}/code`),
873
+ method: "POST",
874
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
875
+ ? yield core.Supplier.get(this._options.apiKey)
876
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
877
+ contentType: "application/json",
878
+ requestType: "json",
879
+ body: serializers.connections.sendOauth2WhiteLabelCode.Request.jsonOrThrow(request, {
880
+ unrecognizedObjectKeys: "strip",
881
+ }),
882
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
883
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
884
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
885
+ });
886
+ if (_response.ok) {
887
+ return serializers.Connection.parseOrThrow(_response.body, {
888
+ unrecognizedObjectKeys: "passthrough",
889
+ allowUnrecognizedUnionMembers: true,
890
+ allowUnrecognizedEnumValues: true,
891
+ breadcrumbsPrefix: ["response"],
892
+ });
893
+ }
894
+ if (_response.error.reason === "status-code") {
895
+ switch (_response.error.statusCode) {
896
+ case 422:
897
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
898
+ unrecognizedObjectKeys: "passthrough",
899
+ allowUnrecognizedUnionMembers: true,
900
+ allowUnrecognizedEnumValues: true,
901
+ breadcrumbsPrefix: ["response"],
902
+ }));
903
+ default:
904
+ throw new errors.AirweaveSDKError({
905
+ statusCode: _response.error.statusCode,
906
+ body: _response.error.body,
907
+ });
908
+ }
909
+ }
910
+ switch (_response.error.reason) {
911
+ case "non-json":
912
+ throw new errors.AirweaveSDKError({
913
+ statusCode: _response.error.statusCode,
914
+ body: _response.error.rawBody,
915
+ });
916
+ case "timeout":
917
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/oauth2/white-label/{white_label_id}/code.");
918
+ case "unknown":
919
+ throw new errors.AirweaveSDKError({
920
+ message: _response.error.errorMessage,
921
+ });
922
+ }
923
+ });
924
+ }
925
+ /**
926
+ * Get the OAuth2 authorization URL for a white label integration.
927
+ *
928
+ * Args:
929
+ * -----
930
+ * db: The database session
931
+ * white_label_id: The ID of the white label integration
932
+ * user: The current user
933
+ *
934
+ * Returns:
935
+ * --------
936
+ * str: The OAuth2 authorization URL
937
+ *
938
+ * @param {string} whiteLabelId
939
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
940
+ *
941
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
942
+ *
943
+ * @example
944
+ * await client.connections.getOauth2WhiteLabelAuthUrl("white_label_id")
945
+ */
946
+ getOauth2WhiteLabelAuthUrl(whiteLabelId, requestOptions) {
947
+ return __awaiter(this, void 0, void 0, function* () {
948
+ var _a;
949
+ const _response = yield core.fetcher({
950
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/oauth2/white-label/${encodeURIComponent(whiteLabelId)}/auth_url`),
951
+ method: "GET",
952
+ headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
953
+ ? yield core.Supplier.get(this._options.apiKey)
954
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
955
+ contentType: "application/json",
956
+ requestType: "json",
957
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
958
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
959
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
960
+ });
961
+ if (_response.ok) {
962
+ return serializers.connections.getOauth2WhiteLabelAuthUrl.Response.parseOrThrow(_response.body, {
963
+ unrecognizedObjectKeys: "passthrough",
964
+ allowUnrecognizedUnionMembers: true,
965
+ allowUnrecognizedEnumValues: true,
966
+ breadcrumbsPrefix: ["response"],
967
+ });
968
+ }
969
+ if (_response.error.reason === "status-code") {
970
+ switch (_response.error.statusCode) {
971
+ case 422:
972
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
973
+ unrecognizedObjectKeys: "passthrough",
974
+ allowUnrecognizedUnionMembers: true,
975
+ allowUnrecognizedEnumValues: true,
976
+ breadcrumbsPrefix: ["response"],
977
+ }));
978
+ default:
979
+ throw new errors.AirweaveSDKError({
980
+ statusCode: _response.error.statusCode,
981
+ body: _response.error.body,
982
+ });
983
+ }
984
+ }
985
+ switch (_response.error.reason) {
986
+ case "non-json":
987
+ throw new errors.AirweaveSDKError({
988
+ statusCode: _response.error.statusCode,
989
+ body: _response.error.rawBody,
990
+ });
991
+ case "timeout":
992
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/white-label/{white_label_id}/auth_url.");
993
+ case "unknown":
994
+ throw new errors.AirweaveSDKError({
995
+ message: _response.error.errorMessage,
996
+ });
997
+ }
998
+ });
999
+ }
1000
+ }
1001
+ exports.Connections = Connections;