@airweave/sdk 0.2.27 → 0.2.52

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 (310) hide show
  1. package/Client.d.ts +1 -8
  2. package/Client.js +3 -13
  3. package/README.md +1 -1
  4. package/api/index.d.ts +1 -1
  5. package/api/index.js +1 -1
  6. package/api/resources/collections/client/Client.d.ts +26 -3
  7. package/api/resources/collections/client/Client.js +96 -16
  8. package/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.d.ts +20 -0
  9. package/api/resources/collections/client/requests/index.d.ts +1 -0
  10. package/api/resources/index.d.ts +2 -4
  11. package/api/resources/index.js +3 -5
  12. package/api/resources/sourceConnections/client/Client.d.ts +4 -4
  13. package/api/resources/sourceConnections/client/Client.js +22 -22
  14. package/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +10 -0
  15. package/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +2 -1
  16. package/api/resources/sourceConnections/client/requests/index.d.ts +1 -0
  17. package/api/resources/sourceConnections/index.d.ts +1 -0
  18. package/api/resources/sourceConnections/index.js +1 -0
  19. package/api/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts +5 -0
  20. package/api/resources/sourceConnections/types/index.d.ts +1 -0
  21. package/api/resources/{connections → sourceConnections/types}/index.js +1 -1
  22. package/api/resources/sources/client/Client.d.ts +9 -14
  23. package/api/resources/sources/client/Client.js +13 -21
  24. package/api/types/AuthType.d.ts +2 -3
  25. package/api/types/AuthType.js +1 -1
  26. package/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +9 -0
  27. package/api/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +8 -0
  28. package/api/types/IntegrationCredentialInDb.d.ts +18 -0
  29. package/api/types/IntegrationCredentialRawCreate.d.ts +19 -0
  30. package/api/types/OAuth2AuthUrl.d.ts +13 -0
  31. package/api/types/Source.d.ts +4 -1
  32. package/api/types/SourceConnection.d.ts +2 -0
  33. package/api/types/SourceConnectionCreate.d.ts +2 -0
  34. package/api/types/SourceConnectionListItem.d.ts +1 -0
  35. package/api/types/Sync.d.ts +0 -2
  36. package/api/types/SyncCreate.d.ts +0 -2
  37. package/api/types/SyncJob.d.ts +1 -0
  38. package/api/types/SyncUpdate.d.ts +0 -2
  39. package/api/types/SyncWithSourceConnection.d.ts +0 -2
  40. package/api/types/WhiteLabel.d.ts +1 -0
  41. package/api/{resources/whiteLabels/client/requests → types}/WhiteLabelCreate.d.ts +2 -8
  42. package/api/{resources/whiteLabels/client/requests → types}/WhiteLabelUpdate.d.ts +2 -2
  43. package/api/types/index.d.ts +7 -4
  44. package/api/types/index.js +7 -4
  45. package/core/index.d.ts +0 -1
  46. package/core/index.js +0 -1
  47. package/dist/Client.d.ts +1 -8
  48. package/dist/Client.js +3 -13
  49. package/dist/api/index.d.ts +1 -1
  50. package/dist/api/index.js +1 -1
  51. package/dist/api/resources/collections/client/Client.d.ts +26 -3
  52. package/dist/api/resources/collections/client/Client.js +96 -16
  53. package/dist/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.d.ts +20 -0
  54. package/dist/api/resources/collections/client/requests/index.d.ts +1 -0
  55. package/dist/api/resources/index.d.ts +2 -4
  56. package/dist/api/resources/index.js +3 -5
  57. package/dist/api/resources/sourceConnections/client/Client.d.ts +4 -4
  58. package/dist/api/resources/sourceConnections/client/Client.js +22 -22
  59. package/dist/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +10 -0
  60. package/dist/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +2 -1
  61. package/dist/api/resources/sourceConnections/client/requests/index.d.ts +1 -0
  62. package/dist/api/resources/sourceConnections/index.d.ts +1 -0
  63. package/dist/api/resources/sourceConnections/index.js +1 -0
  64. package/dist/api/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts +5 -0
  65. package/dist/api/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.js +5 -0
  66. package/dist/api/resources/sourceConnections/types/index.d.ts +1 -0
  67. package/{api/resources/whiteLabels/client → dist/api/resources/sourceConnections/types}/index.js +1 -1
  68. package/dist/api/resources/sources/client/Client.d.ts +9 -14
  69. package/dist/api/resources/sources/client/Client.js +13 -21
  70. package/dist/api/types/AuthType.d.ts +2 -3
  71. package/dist/api/types/AuthType.js +1 -1
  72. package/dist/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +9 -0
  73. package/dist/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js +5 -0
  74. package/dist/api/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +8 -0
  75. package/dist/api/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js +5 -0
  76. package/dist/api/types/IntegrationCredentialInDb.d.ts +18 -0
  77. package/dist/api/types/IntegrationCredentialInDb.js +5 -0
  78. package/dist/api/types/IntegrationCredentialRawCreate.d.ts +19 -0
  79. package/dist/api/types/IntegrationCredentialRawCreate.js +5 -0
  80. package/dist/api/types/OAuth2AuthUrl.d.ts +13 -0
  81. package/dist/api/types/OAuth2AuthUrl.js +5 -0
  82. package/dist/api/types/Source.d.ts +4 -1
  83. package/dist/api/types/SourceConnection.d.ts +2 -0
  84. package/dist/api/types/SourceConnectionCreate.d.ts +2 -0
  85. package/dist/api/types/SourceConnectionListItem.d.ts +1 -0
  86. package/dist/api/types/Sync.d.ts +0 -2
  87. package/dist/api/types/SyncCreate.d.ts +0 -2
  88. package/dist/api/types/SyncJob.d.ts +1 -0
  89. package/dist/api/types/SyncUpdate.d.ts +0 -2
  90. package/dist/api/types/SyncWithSourceConnection.d.ts +0 -2
  91. package/dist/api/types/WhiteLabel.d.ts +1 -0
  92. package/dist/api/{resources/whiteLabels/client/requests → types}/WhiteLabelCreate.d.ts +2 -8
  93. package/dist/api/types/WhiteLabelCreate.js +5 -0
  94. package/dist/api/{resources/whiteLabels/client/requests → types}/WhiteLabelUpdate.d.ts +2 -2
  95. package/dist/api/types/WhiteLabelUpdate.js +5 -0
  96. package/dist/api/types/index.d.ts +7 -4
  97. package/dist/api/types/index.js +7 -4
  98. package/dist/core/index.d.ts +0 -1
  99. package/dist/core/index.js +0 -1
  100. package/dist/serialization/index.d.ts +1 -1
  101. package/dist/serialization/index.js +1 -1
  102. package/dist/serialization/resources/index.d.ts +2 -4
  103. package/dist/serialization/resources/index.js +3 -5
  104. package/dist/serialization/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +12 -0
  105. package/dist/serialization/resources/{connections/client/listAllConnectedIntegrations.js → sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js} +5 -4
  106. package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +3 -1
  107. package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +3 -1
  108. package/dist/serialization/resources/sourceConnections/client/requests/index.d.ts +1 -0
  109. package/dist/serialization/resources/sourceConnections/client/requests/index.js +3 -1
  110. package/dist/serialization/resources/sourceConnections/index.d.ts +1 -0
  111. package/dist/serialization/resources/sourceConnections/index.js +1 -0
  112. package/dist/serialization/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts +11 -0
  113. package/dist/serialization/resources/{whiteLabels/client/listWhiteLabels.js → sourceConnections/types/SourceConnectionUpdateAuthFields.js} +3 -3
  114. package/dist/serialization/resources/sourceConnections/types/index.d.ts +1 -0
  115. package/{api/resources/whiteLabels → dist/serialization/resources/sourceConnections/types}/index.js +1 -1
  116. package/dist/serialization/types/AuthType.d.ts +1 -1
  117. package/dist/serialization/types/AuthType.js +1 -1
  118. package/dist/serialization/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +15 -0
  119. package/dist/serialization/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js +46 -0
  120. package/dist/serialization/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +14 -0
  121. package/dist/serialization/types/{BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js → BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js} +4 -4
  122. package/dist/serialization/types/IntegrationCredentialInDb.d.ts +22 -0
  123. package/{serialization/types/SourceWithAuthenticationFields.js → dist/serialization/types/IntegrationCredentialInDb.js} +8 -13
  124. package/dist/serialization/types/IntegrationCredentialRawCreate.d.ts +20 -0
  125. package/dist/serialization/types/{BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → IntegrationCredentialRawCreate.js} +10 -3
  126. package/dist/serialization/types/OAuth2AuthUrl.d.ts +12 -0
  127. package/{serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js → dist/serialization/types/OAuth2AuthUrl.js} +5 -4
  128. package/dist/serialization/types/Source.d.ts +5 -1
  129. package/dist/serialization/types/Source.js +5 -1
  130. package/dist/serialization/types/SourceConnection.d.ts +2 -0
  131. package/dist/serialization/types/SourceConnection.js +2 -0
  132. package/dist/serialization/types/SourceConnectionCreate.d.ts +2 -0
  133. package/dist/serialization/types/SourceConnectionCreate.js +2 -0
  134. package/dist/serialization/types/SourceConnectionListItem.d.ts +1 -0
  135. package/dist/serialization/types/SourceConnectionListItem.js +1 -0
  136. package/dist/serialization/types/Sync.d.ts +0 -2
  137. package/dist/serialization/types/Sync.js +0 -2
  138. package/dist/serialization/types/SyncCreate.d.ts +0 -2
  139. package/dist/serialization/types/SyncCreate.js +0 -2
  140. package/dist/serialization/types/SyncJob.d.ts +1 -0
  141. package/dist/serialization/types/SyncJob.js +1 -0
  142. package/dist/serialization/types/SyncUpdate.d.ts +0 -2
  143. package/dist/serialization/types/SyncUpdate.js +0 -2
  144. package/dist/serialization/types/SyncWithSourceConnection.d.ts +0 -2
  145. package/dist/serialization/types/SyncWithSourceConnection.js +0 -2
  146. package/dist/serialization/types/WhiteLabel.d.ts +1 -0
  147. package/dist/serialization/types/WhiteLabel.js +1 -0
  148. package/dist/serialization/types/WhiteLabelCreate.d.ts +17 -0
  149. package/dist/serialization/{resources/whiteLabels/client/requests → types}/WhiteLabelCreate.js +2 -1
  150. package/dist/serialization/types/WhiteLabelUpdate.d.ts +16 -0
  151. package/dist/serialization/{resources/whiteLabels/client/requests → types}/WhiteLabelUpdate.js +2 -1
  152. package/dist/serialization/types/index.d.ts +7 -4
  153. package/dist/serialization/types/index.js +7 -4
  154. package/dist/version.d.ts +1 -1
  155. package/dist/version.js +1 -1
  156. package/package.json +2 -3
  157. package/reference.md +44 -543
  158. package/serialization/index.d.ts +1 -1
  159. package/serialization/index.js +1 -1
  160. package/serialization/resources/index.d.ts +2 -4
  161. package/serialization/resources/index.js +3 -5
  162. package/serialization/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +12 -0
  163. package/serialization/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js +43 -0
  164. package/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +3 -1
  165. package/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +3 -1
  166. package/serialization/resources/sourceConnections/client/requests/index.d.ts +1 -0
  167. package/serialization/resources/sourceConnections/client/requests/index.js +3 -1
  168. package/serialization/resources/sourceConnections/index.d.ts +1 -0
  169. package/serialization/resources/sourceConnections/index.js +1 -0
  170. package/serialization/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts +11 -0
  171. package/serialization/resources/{connections/client/listAllConnectedIntegrations.js → sourceConnections/types/SourceConnectionUpdateAuthFields.js} +3 -3
  172. package/serialization/resources/sourceConnections/types/index.d.ts +1 -0
  173. package/{dist/api/resources/connections → serialization/resources/sourceConnections/types}/index.js +1 -1
  174. package/serialization/types/AuthType.d.ts +1 -1
  175. package/serialization/types/AuthType.js +1 -1
  176. package/serialization/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +15 -0
  177. package/serialization/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js +46 -0
  178. package/serialization/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +14 -0
  179. package/serialization/types/{BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js → BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js} +4 -4
  180. package/serialization/types/IntegrationCredentialInDb.d.ts +22 -0
  181. package/{dist/serialization/types/SourceWithAuthenticationFields.js → serialization/types/IntegrationCredentialInDb.js} +8 -13
  182. package/serialization/types/IntegrationCredentialRawCreate.d.ts +20 -0
  183. package/serialization/types/{BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → IntegrationCredentialRawCreate.js} +10 -3
  184. package/serialization/types/OAuth2AuthUrl.d.ts +12 -0
  185. package/{dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js → serialization/types/OAuth2AuthUrl.js} +5 -4
  186. package/serialization/types/Source.d.ts +5 -1
  187. package/serialization/types/Source.js +5 -1
  188. package/serialization/types/SourceConnection.d.ts +2 -0
  189. package/serialization/types/SourceConnection.js +2 -0
  190. package/serialization/types/SourceConnectionCreate.d.ts +2 -0
  191. package/serialization/types/SourceConnectionCreate.js +2 -0
  192. package/serialization/types/SourceConnectionListItem.d.ts +1 -0
  193. package/serialization/types/SourceConnectionListItem.js +1 -0
  194. package/serialization/types/Sync.d.ts +0 -2
  195. package/serialization/types/Sync.js +0 -2
  196. package/serialization/types/SyncCreate.d.ts +0 -2
  197. package/serialization/types/SyncCreate.js +0 -2
  198. package/serialization/types/SyncJob.d.ts +1 -0
  199. package/serialization/types/SyncJob.js +1 -0
  200. package/serialization/types/SyncUpdate.d.ts +0 -2
  201. package/serialization/types/SyncUpdate.js +0 -2
  202. package/serialization/types/SyncWithSourceConnection.d.ts +0 -2
  203. package/serialization/types/SyncWithSourceConnection.js +0 -2
  204. package/serialization/types/WhiteLabel.d.ts +1 -0
  205. package/serialization/types/WhiteLabel.js +1 -0
  206. package/serialization/types/WhiteLabelCreate.d.ts +17 -0
  207. package/serialization/{resources/whiteLabels/client/requests → types}/WhiteLabelCreate.js +2 -1
  208. package/serialization/types/WhiteLabelUpdate.d.ts +16 -0
  209. package/serialization/{resources/whiteLabels/client/requests → types}/WhiteLabelUpdate.js +2 -1
  210. package/serialization/types/index.d.ts +7 -4
  211. package/serialization/types/index.js +7 -4
  212. package/version.d.ts +1 -1
  213. package/version.js +1 -1
  214. package/api/resources/connections/client/Client.d.ts +0 -73
  215. package/api/resources/connections/client/Client.js +0 -216
  216. package/api/resources/connections/client/index.d.ts +0 -1
  217. package/api/resources/connections/client/index.js +0 -2
  218. package/api/resources/connections/index.d.ts +0 -1
  219. package/api/resources/whiteLabels/client/Client.d.ts +0 -169
  220. package/api/resources/whiteLabels/client/Client.js +0 -526
  221. package/api/resources/whiteLabels/client/index.d.ts +0 -1
  222. package/api/resources/whiteLabels/client/requests/index.d.ts +0 -2
  223. package/api/resources/whiteLabels/client/requests/index.js +0 -2
  224. package/api/resources/whiteLabels/index.d.ts +0 -1
  225. package/api/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -7
  226. package/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +0 -8
  227. package/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -9
  228. package/api/types/SourceWithAuthenticationFields.d.ts +0 -23
  229. package/core/auth/BasicAuth.d.ts +0 -8
  230. package/core/auth/BasicAuth.js +0 -26
  231. package/core/auth/BearerToken.d.ts +0 -5
  232. package/core/auth/BearerToken.js +0 -15
  233. package/core/auth/index.d.ts +0 -2
  234. package/core/auth/index.js +0 -7
  235. package/dist/api/resources/connections/client/Client.d.ts +0 -73
  236. package/dist/api/resources/connections/client/Client.js +0 -216
  237. package/dist/api/resources/connections/client/index.d.ts +0 -1
  238. package/dist/api/resources/connections/client/index.js +0 -2
  239. package/dist/api/resources/connections/index.d.ts +0 -1
  240. package/dist/api/resources/whiteLabels/client/Client.d.ts +0 -169
  241. package/dist/api/resources/whiteLabels/client/Client.js +0 -526
  242. package/dist/api/resources/whiteLabels/client/index.d.ts +0 -1
  243. package/dist/api/resources/whiteLabels/client/index.js +0 -17
  244. package/dist/api/resources/whiteLabels/client/requests/index.d.ts +0 -2
  245. package/dist/api/resources/whiteLabels/client/requests/index.js +0 -2
  246. package/dist/api/resources/whiteLabels/index.d.ts +0 -1
  247. package/dist/api/resources/whiteLabels/index.js +0 -17
  248. package/dist/api/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -7
  249. package/dist/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +0 -8
  250. package/dist/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -9
  251. package/dist/api/types/SourceWithAuthenticationFields.d.ts +0 -23
  252. package/dist/core/auth/BasicAuth.d.ts +0 -8
  253. package/dist/core/auth/BasicAuth.js +0 -26
  254. package/dist/core/auth/BearerToken.d.ts +0 -5
  255. package/dist/core/auth/BearerToken.js +0 -15
  256. package/dist/core/auth/index.d.ts +0 -2
  257. package/dist/core/auth/index.js +0 -7
  258. package/dist/serialization/resources/connections/client/index.d.ts +0 -1
  259. package/dist/serialization/resources/connections/client/index.js +0 -37
  260. package/dist/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +0 -11
  261. package/dist/serialization/resources/connections/index.d.ts +0 -1
  262. package/dist/serialization/resources/connections/index.js +0 -17
  263. package/dist/serialization/resources/whiteLabels/client/index.d.ts +0 -3
  264. package/dist/serialization/resources/whiteLabels/client/index.js +0 -42
  265. package/dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts +0 -11
  266. package/dist/serialization/resources/whiteLabels/client/listWhiteLabels.d.ts +0 -11
  267. package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +0 -16
  268. package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +0 -15
  269. package/dist/serialization/resources/whiteLabels/client/requests/index.d.ts +0 -2
  270. package/dist/serialization/resources/whiteLabels/client/requests/index.js +0 -7
  271. package/dist/serialization/resources/whiteLabels/index.d.ts +0 -1
  272. package/dist/serialization/resources/whiteLabels/index.js +0 -17
  273. package/dist/serialization/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
  274. package/dist/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +0 -14
  275. package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -15
  276. package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +0 -46
  277. package/dist/serialization/types/SourceWithAuthenticationFields.d.ts +0 -27
  278. package/serialization/resources/connections/client/index.d.ts +0 -1
  279. package/serialization/resources/connections/client/index.js +0 -37
  280. package/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +0 -11
  281. package/serialization/resources/connections/index.d.ts +0 -1
  282. package/serialization/resources/connections/index.js +0 -17
  283. package/serialization/resources/whiteLabels/client/index.d.ts +0 -3
  284. package/serialization/resources/whiteLabels/client/index.js +0 -42
  285. package/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts +0 -11
  286. package/serialization/resources/whiteLabels/client/listWhiteLabels.d.ts +0 -11
  287. package/serialization/resources/whiteLabels/client/listWhiteLabels.js +0 -42
  288. package/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +0 -16
  289. package/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +0 -15
  290. package/serialization/resources/whiteLabels/client/requests/index.d.ts +0 -2
  291. package/serialization/resources/whiteLabels/client/requests/index.js +0 -7
  292. package/serialization/resources/whiteLabels/index.d.ts +0 -1
  293. package/serialization/resources/whiteLabels/index.js +0 -17
  294. package/serialization/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
  295. package/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +0 -14
  296. package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -15
  297. package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +0 -46
  298. package/serialization/types/SourceWithAuthenticationFields.d.ts +0 -27
  299. /package/api/resources/{whiteLabels/client/requests/WhiteLabelCreate.js → collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.js} +0 -0
  300. /package/api/resources/{whiteLabels/client/requests/WhiteLabelUpdate.js → sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js} +0 -0
  301. /package/api/{types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → resources/sourceConnections/types/SourceConnectionUpdateAuthFields.js} +0 -0
  302. /package/api/types/{BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js → BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js} +0 -0
  303. /package/api/types/{BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js} +0 -0
  304. /package/api/types/{SourceWithAuthenticationFields.js → IntegrationCredentialInDb.js} +0 -0
  305. /package/{dist/api/resources/whiteLabels/client/requests/WhiteLabelCreate.js → api/types/IntegrationCredentialRawCreate.js} +0 -0
  306. /package/{dist/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.js → api/types/OAuth2AuthUrl.js} +0 -0
  307. /package/{dist/api/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → api/types/WhiteLabelCreate.js} +0 -0
  308. /package/{dist/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js → api/types/WhiteLabelUpdate.js} +0 -0
  309. /package/dist/api/{types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.js} +0 -0
  310. /package/dist/api/{types/SourceWithAuthenticationFields.js → resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js} +0 -0
@@ -1,526 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
- return new (P || (P = Promise))(function (resolve, reject) {
41
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
- step((generator = generator.apply(thisArg, _arguments || [])).next());
45
- });
46
- };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
- Object.defineProperty(exports, "__esModule", { value: true });
51
- exports.WhiteLabels = 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 WhiteLabels {
59
- constructor(_options) {
60
- this._options = _options;
61
- }
62
- /**
63
- * List all white labels for the current user's organization.
64
- *
65
- * Args:
66
- * -----
67
- * db: The database session
68
- * current_user: The current user
69
- *
70
- * Returns:
71
- * --------
72
- * list[schemas.WhiteLabel]: A list of white labels
73
- *
74
- * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
75
- *
76
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
77
- *
78
- * @example
79
- * await client.whiteLabels.listWhiteLabels()
80
- */
81
- listWhiteLabels(requestOptions) {
82
- return __awaiter(this, void 0, void 0, function* () {
83
- var _a;
84
- const _response = yield core.fetcher({
85
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "white_labels/list"),
86
- method: "GET",
87
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
88
- ? yield core.Supplier.get(this._options.apiKey)
89
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
90
- contentType: "application/json",
91
- requestType: "json",
92
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
93
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
94
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
95
- });
96
- if (_response.ok) {
97
- return serializers.whiteLabels.listWhiteLabels.Response.parseOrThrow(_response.body, {
98
- unrecognizedObjectKeys: "passthrough",
99
- allowUnrecognizedUnionMembers: true,
100
- allowUnrecognizedEnumValues: true,
101
- breadcrumbsPrefix: ["response"],
102
- });
103
- }
104
- if (_response.error.reason === "status-code") {
105
- switch (_response.error.statusCode) {
106
- case 422:
107
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
108
- unrecognizedObjectKeys: "passthrough",
109
- allowUnrecognizedUnionMembers: true,
110
- allowUnrecognizedEnumValues: true,
111
- breadcrumbsPrefix: ["response"],
112
- }));
113
- default:
114
- throw new errors.AirweaveSDKError({
115
- statusCode: _response.error.statusCode,
116
- body: _response.error.body,
117
- });
118
- }
119
- }
120
- switch (_response.error.reason) {
121
- case "non-json":
122
- throw new errors.AirweaveSDKError({
123
- statusCode: _response.error.statusCode,
124
- body: _response.error.rawBody,
125
- });
126
- case "timeout":
127
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /white_labels/list.");
128
- case "unknown":
129
- throw new errors.AirweaveSDKError({
130
- message: _response.error.errorMessage,
131
- });
132
- }
133
- });
134
- }
135
- /**
136
- * Create new white label integration.
137
- *
138
- * Args:
139
- * -----
140
- * db: The database session
141
- * current_user: The current user
142
- * white_label_in: The white label to create
143
- *
144
- * Returns:
145
- * --------
146
- * white_label (schemas.WhiteLabel): The created white label
147
- *
148
- * @param {AirweaveSDK.WhiteLabelCreate} request
149
- * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
150
- *
151
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
152
- *
153
- * @example
154
- * await client.whiteLabels.createWhiteLabel({
155
- * name: "name",
156
- * sourceShortName: "source_short_name",
157
- * redirectUrl: "redirect_url",
158
- * clientId: "client_id",
159
- * clientSecret: "client_secret"
160
- * })
161
- */
162
- createWhiteLabel(request, requestOptions) {
163
- return __awaiter(this, void 0, void 0, function* () {
164
- var _a;
165
- const _response = yield core.fetcher({
166
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "white_labels"),
167
- method: "POST",
168
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
169
- ? yield core.Supplier.get(this._options.apiKey)
170
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
171
- contentType: "application/json",
172
- requestType: "json",
173
- body: serializers.WhiteLabelCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
174
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
175
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
176
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
177
- });
178
- if (_response.ok) {
179
- return serializers.WhiteLabel.parseOrThrow(_response.body, {
180
- unrecognizedObjectKeys: "passthrough",
181
- allowUnrecognizedUnionMembers: true,
182
- allowUnrecognizedEnumValues: true,
183
- breadcrumbsPrefix: ["response"],
184
- });
185
- }
186
- if (_response.error.reason === "status-code") {
187
- switch (_response.error.statusCode) {
188
- case 422:
189
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
190
- unrecognizedObjectKeys: "passthrough",
191
- allowUnrecognizedUnionMembers: true,
192
- allowUnrecognizedEnumValues: true,
193
- breadcrumbsPrefix: ["response"],
194
- }));
195
- default:
196
- throw new errors.AirweaveSDKError({
197
- statusCode: _response.error.statusCode,
198
- body: _response.error.body,
199
- });
200
- }
201
- }
202
- switch (_response.error.reason) {
203
- case "non-json":
204
- throw new errors.AirweaveSDKError({
205
- statusCode: _response.error.statusCode,
206
- body: _response.error.rawBody,
207
- });
208
- case "timeout":
209
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /white_labels.");
210
- case "unknown":
211
- throw new errors.AirweaveSDKError({
212
- message: _response.error.errorMessage,
213
- });
214
- }
215
- });
216
- }
217
- /**
218
- * Get a specific white label integration.
219
- *
220
- * Args:
221
- * -----
222
- * db: The database session
223
- * white_label_id: The ID of the white label to get
224
- * current_user: The current user
225
- *
226
- * Returns:
227
- * --------
228
- * white_label (schemas.WhiteLabel): The white label
229
- *
230
- * @param {string} whiteLabelId
231
- * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
232
- *
233
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
234
- *
235
- * @example
236
- * await client.whiteLabels.getWhiteLabel("white_label_id")
237
- */
238
- getWhiteLabel(whiteLabelId, requestOptions) {
239
- return __awaiter(this, void 0, void 0, function* () {
240
- var _a;
241
- const _response = yield core.fetcher({
242
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}`),
243
- method: "GET",
244
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
245
- ? yield core.Supplier.get(this._options.apiKey)
246
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
247
- contentType: "application/json",
248
- requestType: "json",
249
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
250
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
251
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
252
- });
253
- if (_response.ok) {
254
- return serializers.WhiteLabel.parseOrThrow(_response.body, {
255
- unrecognizedObjectKeys: "passthrough",
256
- allowUnrecognizedUnionMembers: true,
257
- allowUnrecognizedEnumValues: true,
258
- breadcrumbsPrefix: ["response"],
259
- });
260
- }
261
- if (_response.error.reason === "status-code") {
262
- switch (_response.error.statusCode) {
263
- case 422:
264
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
265
- unrecognizedObjectKeys: "passthrough",
266
- allowUnrecognizedUnionMembers: true,
267
- allowUnrecognizedEnumValues: true,
268
- breadcrumbsPrefix: ["response"],
269
- }));
270
- default:
271
- throw new errors.AirweaveSDKError({
272
- statusCode: _response.error.statusCode,
273
- body: _response.error.body,
274
- });
275
- }
276
- }
277
- switch (_response.error.reason) {
278
- case "non-json":
279
- throw new errors.AirweaveSDKError({
280
- statusCode: _response.error.statusCode,
281
- body: _response.error.rawBody,
282
- });
283
- case "timeout":
284
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /white_labels/{white_label_id}.");
285
- case "unknown":
286
- throw new errors.AirweaveSDKError({
287
- message: _response.error.errorMessage,
288
- });
289
- }
290
- });
291
- }
292
- /**
293
- * Update a white label integration.
294
- *
295
- * Args:
296
- * -----
297
- * db: The database session
298
- * current_user: The current user
299
- * white_label_id: The ID of the white label to update
300
- * white_label_in: The white label to update
301
- *
302
- * Returns:
303
- * --------
304
- * white_label (schemas.WhiteLabel): The updated white label
305
- *
306
- * @param {string} whiteLabelId
307
- * @param {AirweaveSDK.WhiteLabelUpdate} request
308
- * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
309
- *
310
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
311
- *
312
- * @example
313
- * await client.whiteLabels.updateWhiteLabel("white_label_id")
314
- */
315
- updateWhiteLabel(whiteLabelId_1) {
316
- return __awaiter(this, arguments, void 0, function* (whiteLabelId, request = {}, requestOptions) {
317
- var _a;
318
- const _response = yield core.fetcher({
319
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}`),
320
- method: "PUT",
321
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
322
- ? yield core.Supplier.get(this._options.apiKey)
323
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
324
- contentType: "application/json",
325
- requestType: "json",
326
- body: serializers.WhiteLabelUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
327
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
328
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
329
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
330
- });
331
- if (_response.ok) {
332
- return serializers.WhiteLabel.parseOrThrow(_response.body, {
333
- unrecognizedObjectKeys: "passthrough",
334
- allowUnrecognizedUnionMembers: true,
335
- allowUnrecognizedEnumValues: true,
336
- breadcrumbsPrefix: ["response"],
337
- });
338
- }
339
- if (_response.error.reason === "status-code") {
340
- switch (_response.error.statusCode) {
341
- case 422:
342
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
343
- unrecognizedObjectKeys: "passthrough",
344
- allowUnrecognizedUnionMembers: true,
345
- allowUnrecognizedEnumValues: true,
346
- breadcrumbsPrefix: ["response"],
347
- }));
348
- default:
349
- throw new errors.AirweaveSDKError({
350
- statusCode: _response.error.statusCode,
351
- body: _response.error.body,
352
- });
353
- }
354
- }
355
- switch (_response.error.reason) {
356
- case "non-json":
357
- throw new errors.AirweaveSDKError({
358
- statusCode: _response.error.statusCode,
359
- body: _response.error.rawBody,
360
- });
361
- case "timeout":
362
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /white_labels/{white_label_id}.");
363
- case "unknown":
364
- throw new errors.AirweaveSDKError({
365
- message: _response.error.errorMessage,
366
- });
367
- }
368
- });
369
- }
370
- /**
371
- * Delete a white label integration.
372
- *
373
- * Args:
374
- * -----
375
- * db: The database session
376
- * current_user: The current user
377
- * white_label_id: The ID of the white label to delete
378
- *
379
- * Returns:
380
- * --------
381
- * white_label (schemas.WhiteLabel): The deleted white label
382
- *
383
- * @param {string} whiteLabelId
384
- * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
385
- *
386
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
387
- *
388
- * @example
389
- * await client.whiteLabels.deleteWhiteLabel("white_label_id")
390
- */
391
- deleteWhiteLabel(whiteLabelId, requestOptions) {
392
- return __awaiter(this, void 0, void 0, function* () {
393
- var _a;
394
- const _response = yield core.fetcher({
395
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}`),
396
- method: "DELETE",
397
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
398
- ? yield core.Supplier.get(this._options.apiKey)
399
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
400
- contentType: "application/json",
401
- requestType: "json",
402
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
403
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
404
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
405
- });
406
- if (_response.ok) {
407
- return serializers.WhiteLabel.parseOrThrow(_response.body, {
408
- unrecognizedObjectKeys: "passthrough",
409
- allowUnrecognizedUnionMembers: true,
410
- allowUnrecognizedEnumValues: true,
411
- breadcrumbsPrefix: ["response"],
412
- });
413
- }
414
- if (_response.error.reason === "status-code") {
415
- switch (_response.error.statusCode) {
416
- case 422:
417
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
418
- unrecognizedObjectKeys: "passthrough",
419
- allowUnrecognizedUnionMembers: true,
420
- allowUnrecognizedEnumValues: true,
421
- breadcrumbsPrefix: ["response"],
422
- }));
423
- default:
424
- throw new errors.AirweaveSDKError({
425
- statusCode: _response.error.statusCode,
426
- body: _response.error.body,
427
- });
428
- }
429
- }
430
- switch (_response.error.reason) {
431
- case "non-json":
432
- throw new errors.AirweaveSDKError({
433
- statusCode: _response.error.statusCode,
434
- body: _response.error.rawBody,
435
- });
436
- case "timeout":
437
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling DELETE /white_labels/{white_label_id}.");
438
- case "unknown":
439
- throw new errors.AirweaveSDKError({
440
- message: _response.error.errorMessage,
441
- });
442
- }
443
- });
444
- }
445
- /**
446
- * List all syncs for a specific white label.
447
- *
448
- * Args:
449
- * -----
450
- * white_label_id: The ID of the white label to list syncs for
451
- * db: The database session
452
- * current_user: The current user
453
- *
454
- * Returns:
455
- * --------
456
- * list[schemas.Sync]: A list of syncs
457
- *
458
- * @param {string} whiteLabelId
459
- * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
460
- *
461
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
462
- *
463
- * @example
464
- * await client.whiteLabels.listWhiteLabelSyncs("white_label_id")
465
- */
466
- listWhiteLabelSyncs(whiteLabelId, requestOptions) {
467
- return __awaiter(this, void 0, void 0, function* () {
468
- var _a;
469
- const _response = yield core.fetcher({
470
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `white_labels/${encodeURIComponent(whiteLabelId)}/syncs`),
471
- method: "GET",
472
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
473
- ? yield core.Supplier.get(this._options.apiKey)
474
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
475
- contentType: "application/json",
476
- requestType: "json",
477
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
478
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
479
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
480
- });
481
- if (_response.ok) {
482
- return serializers.whiteLabels.listWhiteLabelSyncs.Response.parseOrThrow(_response.body, {
483
- unrecognizedObjectKeys: "passthrough",
484
- allowUnrecognizedUnionMembers: true,
485
- allowUnrecognizedEnumValues: true,
486
- breadcrumbsPrefix: ["response"],
487
- });
488
- }
489
- if (_response.error.reason === "status-code") {
490
- switch (_response.error.statusCode) {
491
- case 422:
492
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
493
- unrecognizedObjectKeys: "passthrough",
494
- allowUnrecognizedUnionMembers: true,
495
- allowUnrecognizedEnumValues: true,
496
- breadcrumbsPrefix: ["response"],
497
- }));
498
- default:
499
- throw new errors.AirweaveSDKError({
500
- statusCode: _response.error.statusCode,
501
- body: _response.error.body,
502
- });
503
- }
504
- }
505
- switch (_response.error.reason) {
506
- case "non-json":
507
- throw new errors.AirweaveSDKError({
508
- statusCode: _response.error.statusCode,
509
- body: _response.error.rawBody,
510
- });
511
- case "timeout":
512
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /white_labels/{white_label_id}/syncs.");
513
- case "unknown":
514
- throw new errors.AirweaveSDKError({
515
- message: _response.error.errorMessage,
516
- });
517
- }
518
- });
519
- }
520
- _getAuthorizationHeader() {
521
- return __awaiter(this, void 0, void 0, function* () {
522
- return `Bearer ${yield core.Supplier.get(this._options.token)}`;
523
- });
524
- }
525
- }
526
- exports.WhiteLabels = WhiteLabels;
@@ -1 +0,0 @@
1
- export * from "./requests";
@@ -1,2 +0,0 @@
1
- export { type WhiteLabelCreate } from "./WhiteLabelCreate";
2
- export { type WhiteLabelUpdate } from "./WhiteLabelUpdate";
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export * from "./client";
@@ -1,7 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost {
5
- name?: string;
6
- authFields: Record<string, unknown>;
7
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as AirweaveSDK from "../index";
5
- export interface BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost {
6
- connectionId: string;
7
- sourceConnectionIn: AirweaveSDK.SourceConnectionCreate;
8
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface BodySendOauth2CodeConnectionsOauth2SourceCodePost {
5
- shortName: string;
6
- code: string;
7
- connectionName?: string;
8
- authFields?: Record<string, unknown>;
9
- }
@@ -1,23 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as AirweaveSDK from "../index";
5
- /**
6
- * Schema for Source with auth config.
7
- */
8
- export interface SourceWithAuthenticationFields {
9
- name: string;
10
- description?: string;
11
- authType?: AirweaveSDK.AuthType;
12
- authConfigClass?: string;
13
- shortName: string;
14
- className: string;
15
- outputEntityDefinitionIds?: string[];
16
- organizationId?: string;
17
- configSchema?: Record<string, unknown>;
18
- labels?: string[];
19
- id: string;
20
- createdAt: Date;
21
- modifiedAt: Date;
22
- authFields?: AirweaveSDK.Fields;
23
- }
@@ -1,8 +0,0 @@
1
- export interface BasicAuth {
2
- username: string;
3
- password: string;
4
- }
5
- export declare const BasicAuth: {
6
- toAuthorizationHeader: (basicAuth: BasicAuth | undefined) => string | undefined;
7
- fromAuthorizationHeader: (header: string) => BasicAuth;
8
- };
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BasicAuth = void 0;
4
- const js_base64_1 = require("js-base64");
5
- const BASIC_AUTH_HEADER_PREFIX = /^Basic /i;
6
- exports.BasicAuth = {
7
- toAuthorizationHeader: (basicAuth) => {
8
- if (basicAuth == null) {
9
- return undefined;
10
- }
11
- const token = js_base64_1.Base64.encode(`${basicAuth.username}:${basicAuth.password}`);
12
- return `Basic ${token}`;
13
- },
14
- fromAuthorizationHeader: (header) => {
15
- const credentials = header.replace(BASIC_AUTH_HEADER_PREFIX, "");
16
- const decoded = js_base64_1.Base64.decode(credentials);
17
- const [username, password] = decoded.split(":", 2);
18
- if (username == null || password == null) {
19
- throw new Error("Invalid basic auth");
20
- }
21
- return {
22
- username,
23
- password,
24
- };
25
- },
26
- };
@@ -1,5 +0,0 @@
1
- export type BearerToken = string;
2
- export declare const BearerToken: {
3
- toAuthorizationHeader: (token: BearerToken | undefined) => string | undefined;
4
- fromAuthorizationHeader: (header: string) => BearerToken;
5
- };
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BearerToken = void 0;
4
- const BEARER_AUTH_HEADER_PREFIX = /^Bearer /i;
5
- exports.BearerToken = {
6
- toAuthorizationHeader: (token) => {
7
- if (token == null) {
8
- return undefined;
9
- }
10
- return `Bearer ${token}`;
11
- },
12
- fromAuthorizationHeader: (header) => {
13
- return header.replace(BEARER_AUTH_HEADER_PREFIX, "").trim();
14
- },
15
- };
@@ -1,2 +0,0 @@
1
- export { BasicAuth } from "./BasicAuth";
2
- export { BearerToken } from "./BearerToken";
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BearerToken = exports.BasicAuth = void 0;
4
- var BasicAuth_1 = require("./BasicAuth");
5
- Object.defineProperty(exports, "BasicAuth", { enumerable: true, get: function () { return BasicAuth_1.BasicAuth; } });
6
- var BearerToken_1 = require("./BearerToken");
7
- Object.defineProperty(exports, "BearerToken", { enumerable: true, get: function () { return BearerToken_1.BearerToken; } });