@airweave/sdk 0.6.0 → 0.6.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/README.md +14 -3
  2. package/dist/cjs/Client.d.ts +4 -8
  3. package/dist/cjs/Client.js +6 -16
  4. package/dist/cjs/api/resources/collections/client/Client.d.ts +14 -27
  5. package/dist/cjs/api/resources/collections/client/Client.js +37 -85
  6. package/dist/cjs/api/resources/collections/client/requests/ListCollectionsGetRequest.d.ts +6 -7
  7. package/dist/cjs/api/resources/collections/client/requests/SearchCollectionsReadableIdSearchGetRequest.d.ts +10 -16
  8. package/dist/cjs/api/resources/collections/client/requests/index.d.ts +0 -1
  9. package/dist/cjs/api/resources/index.d.ts +0 -4
  10. package/dist/cjs/api/resources/index.js +1 -5
  11. package/dist/cjs/api/resources/sourceConnections/client/Client.d.ts +60 -80
  12. package/dist/cjs/api/resources/sourceConnections/client/Client.js +104 -157
  13. package/dist/cjs/api/resources/sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.d.ts +12 -0
  14. package/dist/cjs/api/resources/sourceConnections/client/requests/ListSourceConnectionsGetRequest.d.ts +6 -10
  15. package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.ts +21 -20
  16. package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +7 -18
  17. package/dist/cjs/api/resources/sourceConnections/client/requests/index.d.ts +1 -2
  18. package/dist/cjs/api/resources/sources/client/Client.d.ts +17 -17
  19. package/dist/cjs/api/resources/sources/client/Client.js +24 -20
  20. package/dist/cjs/api/types/ActionCheckRequest.d.ts +10 -0
  21. package/dist/cjs/api/types/ActionCheckResponse.d.ts +3 -16
  22. package/dist/cjs/api/types/ActionCheckResponse.js +0 -8
  23. package/dist/cjs/api/types/AuthProvider.d.ts +0 -2
  24. package/dist/cjs/api/types/AuthProviderAuthentication.d.ts +12 -0
  25. package/dist/cjs/api/types/AuthProviderConnection.d.ts +2 -0
  26. package/dist/cjs/api/{resources/authProviders/client/requests → types}/AuthProviderConnectionCreate.d.ts +2 -10
  27. package/dist/cjs/api/types/AuthenticationDetails.d.ts +19 -0
  28. package/dist/cjs/api/types/AuthenticationMethod.d.ts +14 -0
  29. package/dist/cjs/api/types/AuthenticationMethod.js +13 -0
  30. package/dist/cjs/api/{resources/collections/client/requests → types}/CollectionUpdate.d.ts +4 -4
  31. package/dist/cjs/api/types/Destination.d.ts +0 -2
  32. package/dist/cjs/api/types/DestinationWithAuthenticationFields.d.ts +0 -1
  33. package/dist/cjs/api/types/DirectAuthentication.d.ts +10 -0
  34. package/dist/cjs/api/types/EmbeddingModel.d.ts +0 -2
  35. package/dist/cjs/api/types/EmbeddingModelWithAuthenticationFields.d.ts +0 -1
  36. package/dist/cjs/api/types/EntityCountWithDefinition.d.ts +1 -0
  37. package/dist/cjs/api/types/EntitySummary.d.ts +11 -0
  38. package/dist/cjs/api/types/EntityTypeStats.d.ts +10 -0
  39. package/dist/cjs/api/types/FieldCondition.d.ts +3 -3
  40. package/dist/cjs/api/types/IntegrationCredentialInDb.d.ts +2 -1
  41. package/dist/cjs/api/types/IntegrationCredentialRawCreate.d.ts +2 -1
  42. package/dist/cjs/api/types/MatchPhrase.d.ts +10 -0
  43. package/dist/cjs/api/types/OAuthBrowserAuthentication.d.ts +14 -0
  44. package/dist/cjs/api/types/OAuthTokenAuthentication.d.ts +14 -0
  45. package/dist/cjs/api/types/OAuthType.d.ts +12 -0
  46. package/dist/cjs/api/types/OAuthType.js +11 -0
  47. package/dist/cjs/api/types/ScheduleConfig.d.ts +14 -0
  48. package/dist/cjs/api/types/ScheduleDetails.d.ts +13 -0
  49. package/dist/cjs/api/types/SingleActionCheckResponse.d.ts +23 -0
  50. package/dist/cjs/api/types/SingleActionCheckResponse.js +13 -0
  51. package/dist/cjs/api/types/Source.d.ts +13 -9
  52. package/dist/cjs/api/types/SourceConnection.d.ts +9 -52
  53. package/dist/cjs/api/types/SourceConnectionJob.d.ts +9 -34
  54. package/dist/cjs/api/types/SourceConnectionListItem.d.ts +8 -16
  55. package/dist/cjs/api/types/SourceConnectionStatus.d.ts +7 -4
  56. package/dist/cjs/api/types/SourceConnectionStatus.js +5 -2
  57. package/dist/cjs/api/types/SubscriptionInfo.d.ts +12 -0
  58. package/dist/cjs/api/types/Sync.d.ts +0 -1
  59. package/dist/cjs/api/types/SyncCreate.d.ts +0 -1
  60. package/dist/cjs/api/types/SyncDetails.d.ts +13 -0
  61. package/dist/cjs/api/types/SyncJobDetails.d.ts +20 -0
  62. package/dist/cjs/api/types/SyncJobStatus.d.ts +3 -2
  63. package/dist/cjs/api/types/SyncJobStatus.js +2 -1
  64. package/dist/cjs/api/types/SyncUpdate.d.ts +0 -1
  65. package/dist/cjs/api/types/SyncWithSourceConnection.d.ts +0 -1
  66. package/dist/cjs/api/types/UpdatePlanRequest.d.ts +2 -0
  67. package/dist/cjs/api/types/UsageSnapshot.d.ts +4 -8
  68. package/dist/cjs/api/types/index.d.ts +18 -10
  69. package/dist/cjs/api/types/index.js +18 -10
  70. package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
  71. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
  72. package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
  73. package/dist/cjs/core/fetcher/Fetcher.d.ts +5 -3
  74. package/dist/cjs/core/fetcher/Fetcher.js +4 -3
  75. package/dist/cjs/core/fetcher/index.d.ts +7 -5
  76. package/dist/cjs/core/fetcher/index.js +7 -5
  77. package/dist/cjs/core/fetcher/requestWithRetries.js +44 -8
  78. package/dist/cjs/core/headers.d.ts +2 -3
  79. package/dist/cjs/version.d.ts +1 -1
  80. package/dist/cjs/version.js +1 -1
  81. package/dist/esm/Client.d.mts +4 -8
  82. package/dist/esm/Client.mjs +2 -12
  83. package/dist/esm/api/resources/collections/client/Client.d.mts +14 -27
  84. package/dist/esm/api/resources/collections/client/Client.mjs +37 -85
  85. package/dist/esm/api/resources/collections/client/requests/ListCollectionsGetRequest.d.mts +6 -7
  86. package/dist/esm/api/resources/collections/client/requests/SearchCollectionsReadableIdSearchGetRequest.d.mts +10 -16
  87. package/dist/esm/api/resources/collections/client/requests/index.d.mts +0 -1
  88. package/dist/esm/api/resources/index.d.mts +0 -4
  89. package/dist/esm/api/resources/index.mjs +0 -4
  90. package/dist/esm/api/resources/sourceConnections/client/Client.d.mts +60 -80
  91. package/dist/esm/api/resources/sourceConnections/client/Client.mjs +104 -157
  92. package/dist/esm/api/resources/sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.d.mts +12 -0
  93. package/dist/esm/api/resources/sourceConnections/client/requests/ListSourceConnectionsGetRequest.d.mts +6 -10
  94. package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.mts +21 -20
  95. package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.mts +7 -18
  96. package/dist/esm/api/resources/sourceConnections/client/requests/index.d.mts +1 -2
  97. package/dist/esm/api/resources/sources/client/Client.d.mts +17 -17
  98. package/dist/esm/api/resources/sources/client/Client.mjs +24 -20
  99. package/dist/esm/api/types/ActionCheckRequest.d.mts +10 -0
  100. package/dist/esm/api/types/ActionCheckResponse.d.mts +3 -16
  101. package/dist/esm/api/types/ActionCheckResponse.mjs +1 -7
  102. package/dist/esm/api/types/AuthProvider.d.mts +0 -2
  103. package/dist/esm/api/types/AuthProviderAuthentication.d.mts +12 -0
  104. package/dist/esm/api/types/AuthProviderConnection.d.mts +2 -0
  105. package/dist/esm/api/{resources/authProviders/client/requests → types}/AuthProviderConnectionCreate.d.mts +2 -10
  106. package/dist/esm/api/types/AuthenticationDetails.d.mts +19 -0
  107. package/dist/esm/api/types/AuthenticationMethod.d.mts +14 -0
  108. package/dist/esm/api/types/AuthenticationMethod.mjs +10 -0
  109. package/dist/esm/api/{resources/collections/client/requests → types}/CollectionUpdate.d.mts +4 -4
  110. package/dist/esm/api/types/Destination.d.mts +0 -2
  111. package/dist/esm/api/types/DestinationWithAuthenticationFields.d.mts +0 -1
  112. package/dist/esm/api/types/DirectAuthentication.d.mts +10 -0
  113. package/dist/esm/api/types/EmbeddingModel.d.mts +0 -2
  114. package/dist/esm/api/types/EmbeddingModelWithAuthenticationFields.d.mts +0 -1
  115. package/dist/esm/api/types/EntityCountWithDefinition.d.mts +1 -0
  116. package/dist/esm/api/types/EntitySummary.d.mts +11 -0
  117. package/dist/esm/api/types/EntityTypeStats.d.mts +10 -0
  118. package/dist/esm/api/types/FieldCondition.d.mts +3 -3
  119. package/dist/esm/api/types/IntegrationCredentialInDb.d.mts +2 -1
  120. package/dist/esm/api/types/IntegrationCredentialRawCreate.d.mts +2 -1
  121. package/dist/esm/api/types/MatchPhrase.d.mts +10 -0
  122. package/dist/esm/api/types/OAuthBrowserAuthentication.d.mts +14 -0
  123. package/dist/esm/api/types/OAuthTokenAuthentication.d.mts +14 -0
  124. package/dist/esm/api/types/OAuthType.d.mts +12 -0
  125. package/dist/esm/api/types/OAuthType.mjs +8 -0
  126. package/dist/esm/api/types/ScheduleConfig.d.mts +14 -0
  127. package/dist/esm/api/types/ScheduleDetails.d.mts +13 -0
  128. package/dist/esm/api/types/SingleActionCheckResponse.d.mts +23 -0
  129. package/dist/esm/api/types/SingleActionCheckResponse.mjs +10 -0
  130. package/dist/esm/api/types/Source.d.mts +13 -9
  131. package/dist/esm/api/types/SourceConnection.d.mts +9 -52
  132. package/dist/esm/api/types/SourceConnectionJob.d.mts +9 -34
  133. package/dist/esm/api/types/SourceConnectionListItem.d.mts +8 -16
  134. package/dist/esm/api/types/SourceConnectionStatus.d.mts +7 -4
  135. package/dist/esm/api/types/SourceConnectionStatus.mjs +5 -2
  136. package/dist/esm/api/types/SubscriptionInfo.d.mts +12 -0
  137. package/dist/esm/api/types/Sync.d.mts +0 -1
  138. package/dist/esm/api/types/SyncCreate.d.mts +0 -1
  139. package/dist/esm/api/types/SyncDetails.d.mts +13 -0
  140. package/dist/esm/api/types/SyncJobDetails.d.mts +20 -0
  141. package/dist/esm/api/types/SyncJobStatus.d.mts +3 -2
  142. package/dist/esm/api/types/SyncJobStatus.mjs +2 -1
  143. package/dist/esm/api/types/SyncUpdate.d.mts +0 -1
  144. package/dist/esm/api/types/SyncWithSourceConnection.d.mts +0 -1
  145. package/dist/esm/api/types/UpdatePlanRequest.d.mts +2 -0
  146. package/dist/esm/api/types/UsageSnapshot.d.mts +4 -8
  147. package/dist/esm/api/types/index.d.mts +18 -10
  148. package/dist/esm/api/types/index.mjs +18 -10
  149. package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
  150. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
  151. package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
  152. package/dist/esm/core/fetcher/Fetcher.d.mts +5 -3
  153. package/dist/esm/core/fetcher/Fetcher.mjs +4 -3
  154. package/dist/esm/core/fetcher/index.d.mts +7 -5
  155. package/dist/esm/core/fetcher/index.mjs +3 -2
  156. package/dist/esm/core/fetcher/requestWithRetries.mjs +44 -8
  157. package/dist/esm/core/headers.d.mts +2 -3
  158. package/dist/esm/version.d.mts +1 -1
  159. package/dist/esm/version.mjs +1 -1
  160. package/package.json +8 -13
  161. package/reference.md +218 -1092
  162. package/dist/cjs/api/resources/authProviders/client/Client.d.ts +0 -90
  163. package/dist/cjs/api/resources/authProviders/client/Client.js +0 -213
  164. package/dist/cjs/api/resources/authProviders/client/index.d.ts +0 -2
  165. package/dist/cjs/api/resources/authProviders/client/index.js +0 -17
  166. package/dist/cjs/api/resources/authProviders/client/requests/index.d.ts +0 -1
  167. package/dist/cjs/api/resources/authProviders/index.d.ts +0 -1
  168. package/dist/cjs/api/resources/authProviders/index.js +0 -17
  169. package/dist/cjs/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionsSourceConnectionIdRunPost.d.ts +0 -11
  170. package/dist/cjs/api/resources/sourceConnections/client/requests/GetSourceConnectionsSourceConnectionIdGetRequest.d.ts +0 -13
  171. package/dist/cjs/api/resources/whiteLabels/client/Client.d.ts +0 -189
  172. package/dist/cjs/api/resources/whiteLabels/client/Client.js +0 -585
  173. package/dist/cjs/api/resources/whiteLabels/client/index.d.ts +0 -2
  174. package/dist/cjs/api/resources/whiteLabels/client/index.js +0 -17
  175. package/dist/cjs/api/resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +0 -16
  176. package/dist/cjs/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +0 -28
  177. package/dist/cjs/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +0 -23
  178. package/dist/cjs/api/resources/whiteLabels/client/requests/index.d.ts +0 -3
  179. package/dist/cjs/api/resources/whiteLabels/client/requests/index.js +0 -2
  180. package/dist/cjs/api/resources/whiteLabels/index.d.ts +0 -1
  181. package/dist/cjs/api/resources/whiteLabels/index.js +0 -17
  182. package/dist/cjs/api/types/AuthType.d.ts +0 -27
  183. package/dist/cjs/api/types/AuthType.js +0 -16
  184. package/dist/cjs/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +0 -13
  185. package/dist/cjs/api/types/CancelSubscriptionRequest.d.ts +0 -11
  186. package/dist/cjs/api/types/OAuth2AuthUrl.d.ts +0 -13
  187. package/dist/cjs/api/types/SourceConnectionContinuousResponse.d.ts +0 -67
  188. package/dist/cjs/api/types/SourceConnectionCreateContinuous.d.ts +0 -33
  189. package/dist/cjs/api/types/SourceConnectionCreateWithCredential.d.ts +0 -25
  190. package/dist/cjs/api/types/SourceConnectionCreateWithWhiteLabel.d.ts +0 -29
  191. package/dist/cjs/api/types/SourceConnectionMakeContinuous.d.ts +0 -14
  192. package/dist/cjs/api/types/WhiteLabel.d.ts +0 -32
  193. package/dist/esm/api/resources/authProviders/client/Client.d.mts +0 -90
  194. package/dist/esm/api/resources/authProviders/client/Client.mjs +0 -176
  195. package/dist/esm/api/resources/authProviders/client/index.d.mts +0 -2
  196. package/dist/esm/api/resources/authProviders/client/index.mjs +0 -1
  197. package/dist/esm/api/resources/authProviders/client/requests/index.d.mts +0 -1
  198. package/dist/esm/api/resources/authProviders/index.d.mts +0 -1
  199. package/dist/esm/api/resources/authProviders/index.mjs +0 -1
  200. package/dist/esm/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionsSourceConnectionIdRunPost.d.mts +0 -11
  201. package/dist/esm/api/resources/sourceConnections/client/requests/GetSourceConnectionsSourceConnectionIdGetRequest.d.mts +0 -13
  202. package/dist/esm/api/resources/whiteLabels/client/Client.d.mts +0 -189
  203. package/dist/esm/api/resources/whiteLabels/client/Client.mjs +0 -548
  204. package/dist/esm/api/resources/whiteLabels/client/index.d.mts +0 -2
  205. package/dist/esm/api/resources/whiteLabels/client/index.mjs +0 -1
  206. package/dist/esm/api/resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.mts +0 -16
  207. package/dist/esm/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.mts +0 -28
  208. package/dist/esm/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.mts +0 -23
  209. package/dist/esm/api/resources/whiteLabels/client/requests/index.d.mts +0 -3
  210. package/dist/esm/api/resources/whiteLabels/client/requests/index.mjs +0 -1
  211. package/dist/esm/api/resources/whiteLabels/index.d.mts +0 -1
  212. package/dist/esm/api/resources/whiteLabels/index.mjs +0 -1
  213. package/dist/esm/api/types/AuthType.d.mts +0 -27
  214. package/dist/esm/api/types/AuthType.mjs +0 -13
  215. package/dist/esm/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.mts +0 -13
  216. package/dist/esm/api/types/CancelSubscriptionRequest.d.mts +0 -11
  217. package/dist/esm/api/types/OAuth2AuthUrl.d.mts +0 -13
  218. package/dist/esm/api/types/SourceConnectionContinuousResponse.d.mts +0 -67
  219. package/dist/esm/api/types/SourceConnectionCreateContinuous.d.mts +0 -33
  220. package/dist/esm/api/types/SourceConnectionCreateWithCredential.d.mts +0 -25
  221. package/dist/esm/api/types/SourceConnectionCreateWithWhiteLabel.d.mts +0 -29
  222. package/dist/esm/api/types/SourceConnectionMakeContinuous.d.mts +0 -14
  223. package/dist/esm/api/types/WhiteLabel.d.mts +0 -32
  224. /package/dist/cjs/api/resources/{authProviders/client/requests/AuthProviderConnectionCreate.js → sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.js} +0 -0
  225. /package/dist/cjs/api/{resources/collections/client/requests/CollectionUpdate.js → types/ActionCheckRequest.js} +0 -0
  226. /package/dist/cjs/api/{resources/sourceConnections/client/requests/BodyRunSourceConnectionsSourceConnectionIdRunPost.js → types/AuthProviderAuthentication.js} +0 -0
  227. /package/dist/cjs/api/{resources/sourceConnections/client/requests/GetSourceConnectionsSourceConnectionIdGetRequest.js → types/AuthProviderConnectionCreate.js} +0 -0
  228. /package/dist/cjs/api/{resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js → types/AuthenticationDetails.js} +0 -0
  229. /package/dist/cjs/api/{resources/whiteLabels/client/requests/WhiteLabelCreate.js → types/CollectionUpdate.js} +0 -0
  230. /package/dist/cjs/api/{resources/whiteLabels/client/requests/WhiteLabelUpdate.js → types/DirectAuthentication.js} +0 -0
  231. /package/dist/cjs/api/types/{BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js → EntitySummary.js} +0 -0
  232. /package/dist/cjs/api/types/{CancelSubscriptionRequest.js → EntityTypeStats.js} +0 -0
  233. /package/dist/cjs/api/types/{OAuth2AuthUrl.js → MatchPhrase.js} +0 -0
  234. /package/dist/cjs/api/types/{SourceConnectionContinuousResponse.js → OAuthBrowserAuthentication.js} +0 -0
  235. /package/dist/cjs/api/types/{SourceConnectionCreateContinuous.js → OAuthTokenAuthentication.js} +0 -0
  236. /package/dist/cjs/api/types/{SourceConnectionCreateWithCredential.js → ScheduleConfig.js} +0 -0
  237. /package/dist/cjs/api/types/{SourceConnectionCreateWithWhiteLabel.js → ScheduleDetails.js} +0 -0
  238. /package/dist/cjs/api/types/{SourceConnectionMakeContinuous.js → SyncDetails.js} +0 -0
  239. /package/dist/cjs/api/types/{WhiteLabel.js → SyncJobDetails.js} +0 -0
  240. /package/dist/cjs/{api/resources/authProviders/client/requests/index.js → core/fetcher/EndpointMetadata.js} +0 -0
  241. /package/dist/esm/api/resources/{authProviders/client/requests/AuthProviderConnectionCreate.mjs → sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.mjs} +0 -0
  242. /package/dist/esm/api/{resources/collections/client/requests/CollectionUpdate.mjs → types/ActionCheckRequest.mjs} +0 -0
  243. /package/dist/esm/api/{resources/sourceConnections/client/requests/BodyRunSourceConnectionsSourceConnectionIdRunPost.mjs → types/AuthProviderAuthentication.mjs} +0 -0
  244. /package/dist/esm/api/{resources/sourceConnections/client/requests/GetSourceConnectionsSourceConnectionIdGetRequest.mjs → types/AuthProviderConnectionCreate.mjs} +0 -0
  245. /package/dist/esm/api/{resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.mjs → types/AuthenticationDetails.mjs} +0 -0
  246. /package/dist/esm/api/{resources/whiteLabels/client/requests/WhiteLabelCreate.mjs → types/CollectionUpdate.mjs} +0 -0
  247. /package/dist/esm/api/{resources/whiteLabels/client/requests/WhiteLabelUpdate.mjs → types/DirectAuthentication.mjs} +0 -0
  248. /package/dist/esm/api/types/{BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.mjs → EntitySummary.mjs} +0 -0
  249. /package/dist/esm/api/types/{CancelSubscriptionRequest.mjs → EntityTypeStats.mjs} +0 -0
  250. /package/dist/esm/api/types/{OAuth2AuthUrl.mjs → MatchPhrase.mjs} +0 -0
  251. /package/dist/esm/api/types/{SourceConnectionContinuousResponse.mjs → OAuthBrowserAuthentication.mjs} +0 -0
  252. /package/dist/esm/api/types/{SourceConnectionCreateContinuous.mjs → OAuthTokenAuthentication.mjs} +0 -0
  253. /package/dist/esm/api/types/{SourceConnectionCreateWithCredential.mjs → ScheduleConfig.mjs} +0 -0
  254. /package/dist/esm/api/types/{SourceConnectionCreateWithWhiteLabel.mjs → ScheduleDetails.mjs} +0 -0
  255. /package/dist/esm/api/types/{SourceConnectionMakeContinuous.mjs → SyncDetails.mjs} +0 -0
  256. /package/dist/esm/api/types/{WhiteLabel.mjs → SyncJobDetails.mjs} +0 -0
  257. /package/dist/esm/{api/resources/authProviders/client/requests/index.mjs → core/fetcher/EndpointMetadata.mjs} +0 -0
@@ -59,12 +59,7 @@ class SourceConnections {
59
59
  this._options = _options;
60
60
  }
61
61
  /**
62
- * List source connections across your organization.
63
- *
64
- * By default, returns ALL source connections from every collection in your
65
- * organization. Use the 'collection' parameter to filter results to a specific
66
- * collection. This is useful for getting an overview of all your data sources
67
- * or managing connections within a particular collection.
62
+ * List source connections with minimal fields for performance.
68
63
  *
69
64
  * @param {AirweaveSDK.ListSourceConnectionsGetRequest} request
70
65
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
@@ -72,7 +67,11 @@ class SourceConnections {
72
67
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
73
68
  *
74
69
  * @example
75
- * await client.sourceConnections.list()
70
+ * await client.sourceConnections.list({
71
+ * collection: "collection",
72
+ * skip: 1,
73
+ * limit: 1
74
+ * })
76
75
  */
77
76
  list(request = {}, requestOptions) {
78
77
  return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
@@ -91,11 +90,12 @@ class SourceConnections {
91
90
  if (limit != null) {
92
91
  _queryParams["limit"] = limit.toString();
93
92
  }
93
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
94
94
  const _response = yield core.fetcher({
95
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, "source-connections"),
95
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, "source-connections"),
96
96
  method: "GET",
97
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
98
- queryParameters: _queryParams,
97
+ headers: _headers,
98
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
99
99
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
100
100
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
101
101
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -136,20 +136,20 @@ class SourceConnections {
136
136
  });
137
137
  }
138
138
  /**
139
- * Create a new source connection to sync data into your collection.
139
+ * Create a new source connection.
140
140
  *
141
- * **This endpoint only works for sources that do not use OAuth2.0.**
142
- * Sources that do use OAuth2.0 like Google Drive, Slack, or HubSpot must be
143
- * connected through the UI where you can complete the OAuth consent flow
144
- * or using Auth Providers (see [Auth Providers](/docs/auth-providers)).<br/><br/>
141
+ * The authentication configuration determines the flow:
142
+ * - DirectAuthentication: Immediate creation with provided credentials
143
+ * - OAuthBrowserAuthentication: Returns shell with authentication URL
144
+ * - OAuthTokenAuthentication: Immediate creation with provided token
145
+ * - AuthProviderAuthentication: Using external auth provider
145
146
  *
146
- * Credentials for a source have to be provided using the `auth_fields` field.
147
- * Currently, it is not automatically checked if the provided credentials are valid.
148
- * If they are not valid, the data synchronization will fail.<br/><br/>
147
+ * BYOC (Bring Your Own Client) is detected when client_id and client_secret
148
+ * are provided in OAuthBrowserAuthentication.
149
149
  *
150
- * Check the documentation of a specific source (for example
151
- * [Github](https://docs.airweave.ai/docs/connectors/github)) to see what kind
152
- * of authentication is used.
150
+ * sync_immediately defaults:
151
+ * - True for: direct, oauth_token, auth_provider
152
+ * - False for: oauth_browser, oauth_byoc (these sync after authentication)
153
153
  *
154
154
  * @param {AirweaveSDK.SourceConnectionCreate} request
155
155
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
@@ -158,8 +158,8 @@ class SourceConnections {
158
158
  *
159
159
  * @example
160
160
  * await client.sourceConnections.create({
161
- * name: "Production Stripe Account",
162
- * short_name: "stripe"
161
+ * short_name: "short_name",
162
+ * readable_collection_id: "readable_collection_id"
163
163
  * })
164
164
  */
165
165
  create(request, requestOptions) {
@@ -168,11 +168,13 @@ class SourceConnections {
168
168
  __create(request, requestOptions) {
169
169
  return __awaiter(this, void 0, void 0, function* () {
170
170
  var _a, _b, _c;
171
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
171
172
  const _response = yield core.fetcher({
172
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, "source-connections"),
173
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, "source-connections"),
173
174
  method: "POST",
174
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
175
+ headers: _headers,
175
176
  contentType: "application/json",
177
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
176
178
  requestType: "json",
177
179
  body: request,
178
180
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -212,10 +214,9 @@ class SourceConnections {
212
214
  });
213
215
  }
214
216
  /**
215
- * Retrieve a specific source connection by its ID.
217
+ * Get a source connection with optional depth expansion.
216
218
  *
217
- * @param {string} sourceConnectionId - The unique identifier of the source connection
218
- * @param {AirweaveSDK.GetSourceConnectionsSourceConnectionIdGetRequest} request
219
+ * @param {string} sourceConnectionId
219
220
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
220
221
  *
221
222
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
@@ -223,22 +224,18 @@ class SourceConnections {
223
224
  * @example
224
225
  * await client.sourceConnections.get("source_connection_id")
225
226
  */
226
- get(sourceConnectionId, request = {}, requestOptions) {
227
- return core.HttpResponsePromise.fromPromise(this.__get(sourceConnectionId, request, requestOptions));
227
+ get(sourceConnectionId, requestOptions) {
228
+ return core.HttpResponsePromise.fromPromise(this.__get(sourceConnectionId, requestOptions));
228
229
  }
229
- __get(sourceConnectionId_1) {
230
- return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
230
+ __get(sourceConnectionId, requestOptions) {
231
+ return __awaiter(this, void 0, void 0, function* () {
231
232
  var _a, _b, _c;
232
- const { show_auth_fields: showAuthFields } = request;
233
- const _queryParams = {};
234
- if (showAuthFields != null) {
235
- _queryParams["show_auth_fields"] = showAuthFields.toString();
236
- }
233
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
237
234
  const _response = yield core.fetcher({
238
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
235
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
239
236
  method: "GET",
240
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
241
- queryParameters: _queryParams,
237
+ headers: _headers,
238
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
242
239
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
243
240
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
244
241
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -276,77 +273,9 @@ class SourceConnections {
276
273
  });
277
274
  }
278
275
  /**
279
- * Update a source connection's properties.
280
- *
281
- * Modify the configuration of an existing source connection including its name,
282
- * authentication credentials, configuration fields, sync schedule, or source-specific settings.
283
- *
284
- * @param {string} sourceConnectionId - The unique identifier of the source connection to update
285
- * @param {AirweaveSDK.SourceConnectionUpdate} request
286
- * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
287
- *
288
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
289
- *
290
- * @example
291
- * await client.sourceConnections.update("source_connection_id")
292
- */
293
- update(sourceConnectionId, request = {}, requestOptions) {
294
- return core.HttpResponsePromise.fromPromise(this.__update(sourceConnectionId, request, requestOptions));
295
- }
296
- __update(sourceConnectionId_1) {
297
- return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
298
- var _a, _b, _c;
299
- const _response = yield core.fetcher({
300
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
301
- method: "PUT",
302
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
303
- contentType: "application/json",
304
- requestType: "json",
305
- body: request,
306
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
307
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
308
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
309
- });
310
- if (_response.ok) {
311
- return { data: _response.body, rawResponse: _response.rawResponse };
312
- }
313
- if (_response.error.reason === "status-code") {
314
- switch (_response.error.statusCode) {
315
- case 422:
316
- throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
317
- default:
318
- throw new errors.AirweaveSDKError({
319
- statusCode: _response.error.statusCode,
320
- body: _response.error.body,
321
- rawResponse: _response.rawResponse,
322
- });
323
- }
324
- }
325
- switch (_response.error.reason) {
326
- case "non-json":
327
- throw new errors.AirweaveSDKError({
328
- statusCode: _response.error.statusCode,
329
- body: _response.error.rawBody,
330
- rawResponse: _response.rawResponse,
331
- });
332
- case "timeout":
333
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /source-connections/{source_connection_id}.");
334
- case "unknown":
335
- throw new errors.AirweaveSDKError({
336
- message: _response.error.errorMessage,
337
- rawResponse: _response.rawResponse,
338
- });
339
- }
340
- });
341
- }
342
- /**
343
- * Delete a source connection and all associated data.
344
- *
345
- * Permanently removes the source connection configuration and credentials.
346
- * By default, previously synced data remains in your destination systems for continuity.
347
- * Use delete_data=true to also remove all associated data from destination systems.
276
+ * Delete a source connection and all related data.
348
277
  *
349
- * @param {string} sourceConnectionId - The unique identifier of the source connection to delete
278
+ * @param {string} sourceConnectionId
350
279
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
351
280
  *
352
281
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
@@ -360,10 +289,12 @@ class SourceConnections {
360
289
  __delete(sourceConnectionId, requestOptions) {
361
290
  return __awaiter(this, void 0, void 0, function* () {
362
291
  var _a, _b, _c;
292
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
363
293
  const _response = yield core.fetcher({
364
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
294
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
365
295
  method: "DELETE",
366
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
296
+ headers: _headers,
297
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
367
298
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
368
299
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
369
300
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -401,32 +332,36 @@ class SourceConnections {
401
332
  });
402
333
  }
403
334
  /**
404
- * Manually trigger a data sync for this source connection.
335
+ * Update a source connection.
405
336
  *
406
- * Starts an immediate synchronization job that extracts fresh data from your source,
407
- * transforms it according to your configuration, and updates the destination systems.
408
- * The job runs asynchronously and endpoint returns immediately with tracking information.
337
+ * Updateable fields:
338
+ * - name, description
339
+ * - config_fields
340
+ * - cron_schedule
341
+ * - auth_fields (direct auth only)
409
342
  *
410
- * @param {string} sourceConnectionId - The unique identifier of the source connection to sync
411
- * @param {AirweaveSDK.BodyRunSourceConnectionsSourceConnectionIdRunPost} request
343
+ * @param {string} sourceConnectionId
344
+ * @param {AirweaveSDK.SourceConnectionUpdate} request
412
345
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
413
346
  *
414
347
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
415
348
  *
416
349
  * @example
417
- * await client.sourceConnections.run("source_connection_id")
350
+ * await client.sourceConnections.update("source_connection_id")
418
351
  */
419
- run(sourceConnectionId, request = {}, requestOptions) {
420
- return core.HttpResponsePromise.fromPromise(this.__run(sourceConnectionId, request, requestOptions));
352
+ update(sourceConnectionId, request = {}, requestOptions) {
353
+ return core.HttpResponsePromise.fromPromise(this.__update(sourceConnectionId, request, requestOptions));
421
354
  }
422
- __run(sourceConnectionId_1) {
355
+ __update(sourceConnectionId_1) {
423
356
  return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
424
357
  var _a, _b, _c;
358
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
425
359
  const _response = yield core.fetcher({
426
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/run`),
427
- method: "POST",
428
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
360
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
361
+ method: "PATCH",
362
+ headers: _headers,
429
363
  contentType: "application/json",
364
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
430
365
  requestType: "json",
431
366
  body: request,
432
367
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -456,7 +391,7 @@ class SourceConnections {
456
391
  rawResponse: _response.rawResponse,
457
392
  });
458
393
  case "timeout":
459
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /source-connections/{source_connection_id}/run.");
394
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PATCH /source-connections/{source_connection_id}.");
460
395
  case "unknown":
461
396
  throw new errors.AirweaveSDKError({
462
397
  message: _response.error.errorMessage,
@@ -466,29 +401,30 @@ class SourceConnections {
466
401
  });
467
402
  }
468
403
  /**
469
- * List all sync jobs for a source connection.
404
+ * Trigger a sync run for a source connection.
470
405
  *
471
- * Returns the complete history of data synchronization jobs including successful syncs,
472
- * failed attempts, and currently running operations.
406
+ * Runs are always executed through Temporal workflow engine.
473
407
  *
474
- * @param {string} sourceConnectionId - The unique identifier of the source connection
408
+ * @param {string} sourceConnectionId
475
409
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
476
410
  *
477
411
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
478
412
  *
479
413
  * @example
480
- * await client.sourceConnections.listJobs("source_connection_id")
414
+ * await client.sourceConnections.run("source_connection_id")
481
415
  */
482
- listJobs(sourceConnectionId, requestOptions) {
483
- return core.HttpResponsePromise.fromPromise(this.__listJobs(sourceConnectionId, requestOptions));
416
+ run(sourceConnectionId, requestOptions) {
417
+ return core.HttpResponsePromise.fromPromise(this.__run(sourceConnectionId, requestOptions));
484
418
  }
485
- __listJobs(sourceConnectionId, requestOptions) {
419
+ __run(sourceConnectionId, requestOptions) {
486
420
  return __awaiter(this, void 0, void 0, function* () {
487
421
  var _a, _b, _c;
422
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
488
423
  const _response = yield core.fetcher({
489
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs`),
490
- method: "GET",
491
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
424
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/run`),
425
+ method: "POST",
426
+ headers: _headers,
427
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
492
428
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
493
429
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
494
430
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -516,7 +452,7 @@ class SourceConnections {
516
452
  rawResponse: _response.rawResponse,
517
453
  });
518
454
  case "timeout":
519
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /source-connections/{source_connection_id}/jobs.");
455
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /source-connections/{source_connection_id}/run.");
520
456
  case "unknown":
521
457
  throw new errors.AirweaveSDKError({
522
458
  message: _response.error.errorMessage,
@@ -526,27 +462,36 @@ class SourceConnections {
526
462
  });
527
463
  }
528
464
  /**
529
- * Get detailed information about a specific sync job.
465
+ * Get sync jobs for a source connection.
530
466
  *
531
- * @param {string} sourceConnectionId - The unique identifier of the source connection
532
- * @param {string} jobId - The unique identifier of the sync job
467
+ * @param {string} sourceConnectionId
468
+ * @param {AirweaveSDK.GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest} request
533
469
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
534
470
  *
535
471
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
536
472
  *
537
473
  * @example
538
- * await client.sourceConnections.getJob("source_connection_id", "job_id")
474
+ * await client.sourceConnections.getSourceConnectionJobs("source_connection_id", {
475
+ * limit: 1
476
+ * })
539
477
  */
540
- getJob(sourceConnectionId, jobId, requestOptions) {
541
- return core.HttpResponsePromise.fromPromise(this.__getJob(sourceConnectionId, jobId, requestOptions));
478
+ getSourceConnectionJobs(sourceConnectionId, request = {}, requestOptions) {
479
+ return core.HttpResponsePromise.fromPromise(this.__getSourceConnectionJobs(sourceConnectionId, request, requestOptions));
542
480
  }
543
- __getJob(sourceConnectionId, jobId, requestOptions) {
544
- return __awaiter(this, void 0, void 0, function* () {
481
+ __getSourceConnectionJobs(sourceConnectionId_1) {
482
+ return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
545
483
  var _a, _b, _c;
484
+ const { limit } = request;
485
+ const _queryParams = {};
486
+ if (limit != null) {
487
+ _queryParams["limit"] = limit.toString();
488
+ }
489
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
546
490
  const _response = yield core.fetcher({
547
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs/${encodeURIComponent(jobId)}`),
491
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs`),
548
492
  method: "GET",
549
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
493
+ headers: _headers,
494
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
550
495
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
551
496
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
552
497
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -574,7 +519,7 @@ class SourceConnections {
574
519
  rawResponse: _response.rawResponse,
575
520
  });
576
521
  case "timeout":
577
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /source-connections/{source_connection_id}/jobs/{job_id}.");
522
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /source-connections/{source_connection_id}/jobs.");
578
523
  case "unknown":
579
524
  throw new errors.AirweaveSDKError({
580
525
  message: _response.error.errorMessage,
@@ -584,14 +529,14 @@ class SourceConnections {
584
529
  });
585
530
  }
586
531
  /**
587
- * Cancel a running sync job.
532
+ * Cancel a running sync job for a source connection.
588
533
  *
589
- * Sends a cancellation signal to stop an in-progress data synchronization.
590
- * The job will complete its current operation and then terminate gracefully.
591
- * Only jobs in 'created', 'pending', or 'in_progress' states can be cancelled.
534
+ * This endpoint requests cancellation and marks the job as CANCELLING.
535
+ * The workflow updates the final status to CANCELLED when it processes
536
+ * the cancellation request.
592
537
  *
593
- * @param {string} sourceConnectionId - The unique identifier of the source connection
594
- * @param {string} jobId - The unique identifier of the sync job to cancel
538
+ * @param {string} sourceConnectionId
539
+ * @param {string} jobId
595
540
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
596
541
  *
597
542
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
@@ -605,10 +550,12 @@ class SourceConnections {
605
550
  __cancelJob(sourceConnectionId, jobId, requestOptions) {
606
551
  return __awaiter(this, void 0, void 0, function* () {
607
552
  var _a, _b, _c;
553
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
608
554
  const _response = yield core.fetcher({
609
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs/${encodeURIComponent(jobId)}/cancel`),
555
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs/${encodeURIComponent(jobId)}/cancel`),
610
556
  method: "POST",
611
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
557
+ headers: _headers,
558
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
612
559
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
613
560
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
614
561
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * limit: 1
8
+ * }
9
+ */
10
+ export interface GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest {
11
+ limit?: number;
12
+ }
@@ -3,19 +3,15 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {}
6
+ * {
7
+ * collection: "collection",
8
+ * skip: 1,
9
+ * limit: 1
10
+ * }
7
11
  */
8
12
  export interface ListSourceConnectionsGetRequest {
9
- /**
10
- * Filter source connections by collection readable ID
11
- */
13
+ /** Filter by collection readable ID */
12
14
  collection?: string;
13
- /**
14
- * Number of source connections to skip for pagination
15
- */
16
15
  skip?: number;
17
- /**
18
- * Maximum number of source connections to return (1-1000)
19
- */
20
16
  limit?: number;
21
17
  }
@@ -5,29 +5,30 @@ import * as AirweaveSDK from "../../../../index.js";
5
5
  /**
6
6
  * @example
7
7
  * {
8
- * name: "Production Stripe Account",
9
- * short_name: "stripe"
8
+ * short_name: "short_name",
9
+ * readable_collection_id: "readable_collection_id"
10
10
  * }
11
11
  */
12
12
  export interface SourceConnectionCreate {
13
- /** Human-readable name for the source connection. This helps you identify the connection in the UI and should clearly describe what data it connects to. */
14
- name: string;
15
- /** Optional detailed description of what this source connection provides. Use this to document the purpose, data types, or any special considerations for this connection. */
16
- description?: string;
17
- /** Source-specific configuration parameters required for data extraction. These vary by source type and control how data is retrieved (e.g., database queries, API filters, file paths). Check the documentation of a specific source (for example [Github](https://docs.airweave.ai/docs/connectors/github)) to see what is required. */
18
- config_fields?: AirweaveSDK.ConfigValues;
19
- /** Technical identifier of the source type that determines which connector to use for data synchronization. */
13
+ /** Connection name (defaults to '{Source Name} Connection') */
14
+ name?: string;
15
+ /** Source identifier (e.g., 'slack', 'github') */
20
16
  short_name: string;
21
- /** Readable ID of the collection where synced data will be stored. If not provided, a new collection will be automatically created. */
22
- collection?: string;
23
- /** Cron expression for automatic data synchronization schedule. If not provided, data will only sync when manually triggered. Use standard cron format: minute hour day month weekday. */
24
- cron_schedule?: string;
25
- /** Authentication credentials required to access the data source. The required fields vary by source type. Check the documentation of a specific source (for example [Github](https://docs.airweave.ai/docs/connectors/github)) to see what is required. */
26
- auth_fields?: AirweaveSDK.ConfigValues;
27
- /** Unique readable ID of a connected auth provider to use for authentication instead of providing auth_fields directly. When specified, credentials for the source will be obtained and refreshed automatically by Airweave interaction with the auth provider. To see which auth providers are supported and learn more about how to use them, check [this page](https://docs.airweave.ai/docs/auth-providers). */
28
- auth_provider?: string;
29
- /** Configuration for the auth provider when using auth_provider field. Required fields vary by auth provider. For Composio, use auth_config_id and account_id to specify which integration and account from Composio you want to use to connect to the source. */
30
- auth_provider_config?: AirweaveSDK.ConfigValues;
31
- /** Whether to start an initial data synchronization immediately after creating the connection. */
17
+ /** Collection readable ID */
18
+ readable_collection_id: string;
19
+ /** Connection description */
20
+ description?: string;
21
+ /** Source-specific configuration */
22
+ config?: Record<string, unknown>;
23
+ schedule?: AirweaveSDK.ScheduleConfig;
24
+ /** Run initial sync after creation. Defaults to True for direct/token/auth_provider, False for OAuth browser/BYOC flows (which sync after authentication) */
32
25
  sync_immediately?: boolean;
26
+ /** Authentication config (defaults to OAuth browser flow for OAuth sources) */
27
+ authentication?: SourceConnectionCreate.Authentication;
28
+ }
29
+ export declare namespace SourceConnectionCreate {
30
+ /**
31
+ * Authentication config (defaults to OAuth browser flow for OAuth sources)
32
+ */
33
+ type Authentication = AirweaveSDK.DirectAuthentication | AirweaveSDK.OAuthTokenAuthentication | AirweaveSDK.OAuthBrowserAuthentication | AirweaveSDK.AuthProviderAuthentication;
33
34
  }
@@ -7,28 +7,17 @@ import * as AirweaveSDK from "../../../../index.js";
7
7
  * {}
8
8
  */
9
9
  export interface SourceConnectionUpdate {
10
- /** Updated name for the source connection. Must be between 4 and 42 characters. */
11
10
  name?: string;
12
- /** Updated description of what this source connection provides. */
13
11
  description?: string;
14
- /** Updated authentication credentials for the data source. Provide new credentials to refresh or update authentication. */
15
- auth_fields?: SourceConnectionUpdate.AuthFields;
16
- /** Source-specific configuration parameters required for data extraction. These vary by source type and control how data is retrieved (e.g., database queries, API filters, file paths). Check the documentation of a specific source (for example [Github](https://docs.airweave.ai/docs/connectors/github)) to see what is required. */
17
- config_fields?: AirweaveSDK.ConfigValues;
18
- /** Updated cron expression for automatic synchronization schedule. Set to null to disable automatic syncing. */
19
- cron_schedule?: string;
20
- /** Internal connection identifier. This is typically managed automatically and should not be modified manually. */
21
- connection_id?: string;
22
- /** ID of the white label integration. Used for custom OAuth integrations with your own branding. */
23
- white_label_id?: string;
24
- /** Updated auth provider readable ID. Only relevant if the connection uses an auth provider. */
25
- auth_provider?: string;
26
- /** Updated configuration for the auth provider. Only relevant if the connection uses an auth provider. */
27
- auth_provider_config?: Record<string, unknown>;
12
+ /** Source-specific configuration */
13
+ config?: Record<string, unknown>;
14
+ schedule?: AirweaveSDK.ScheduleConfig;
15
+ /** Authentication config (defaults to OAuth browser flow for OAuth sources) */
16
+ authentication?: SourceConnectionUpdate.Authentication;
28
17
  }
29
18
  export declare namespace SourceConnectionUpdate {
30
19
  /**
31
- * Updated authentication credentials for the data source. Provide new credentials to refresh or update authentication.
20
+ * Authentication config (defaults to OAuth browser flow for OAuth sources)
32
21
  */
33
- type AuthFields = AirweaveSDK.ConfigValues | string;
22
+ type Authentication = AirweaveSDK.DirectAuthentication | AirweaveSDK.OAuthTokenAuthentication | AirweaveSDK.OAuthBrowserAuthentication | AirweaveSDK.AuthProviderAuthentication;
34
23
  }
@@ -1,5 +1,4 @@
1
1
  export { type ListSourceConnectionsGetRequest } from "./ListSourceConnectionsGetRequest.js";
2
2
  export { type SourceConnectionCreate } from "./SourceConnectionCreate.js";
3
- export { type GetSourceConnectionsSourceConnectionIdGetRequest } from "./GetSourceConnectionsSourceConnectionIdGetRequest.js";
4
3
  export { type SourceConnectionUpdate } from "./SourceConnectionUpdate.js";
5
- export { type BodyRunSourceConnectionsSourceConnectionIdRunPost } from "./BodyRunSourceConnectionsSourceConnectionIdRunPost.js";
4
+ export { type GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest } from "./GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.js";