@airweave/sdk 0.7.20 → 0.8.77

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 (277) hide show
  1. package/README.md +1 -5
  2. package/dist/cjs/Client.d.ts +3 -8
  3. package/dist/cjs/Client.js +7 -4
  4. package/dist/cjs/api/errors/ConflictError.d.ts +9 -0
  5. package/dist/cjs/api/errors/ConflictError.js +52 -0
  6. package/dist/cjs/api/errors/NotFoundError.d.ts +9 -0
  7. package/dist/cjs/api/errors/NotFoundError.js +52 -0
  8. package/dist/cjs/api/errors/TooManyRequestsError.d.ts +9 -0
  9. package/dist/cjs/api/errors/TooManyRequestsError.js +52 -0
  10. package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +1 -2
  11. package/dist/cjs/api/errors/index.d.ts +3 -0
  12. package/dist/cjs/api/errors/index.js +3 -0
  13. package/dist/cjs/api/resources/collections/client/Client.d.ts +107 -42
  14. package/dist/cjs/api/resources/collections/client/Client.js +205 -58
  15. package/dist/cjs/api/resources/collections/client/requests/CollectionCreate.d.ts +3 -0
  16. package/dist/cjs/api/resources/collections/client/requests/CollectionUpdate.d.ts +16 -0
  17. package/dist/cjs/api/resources/collections/client/requests/ListCollectionsGetRequest.d.ts +4 -4
  18. package/dist/cjs/api/resources/collections/client/requests/SearchGetLegacyCollectionsReadableIdSearchGetRequest.d.ts +4 -4
  19. package/dist/cjs/api/resources/collections/client/requests/index.d.ts +1 -0
  20. package/dist/cjs/api/resources/collections/types/index.d.ts +0 -1
  21. package/dist/cjs/api/resources/collections/types/index.js +0 -1
  22. package/dist/cjs/api/resources/index.d.ts +2 -0
  23. package/dist/cjs/api/resources/index.js +3 -1
  24. package/dist/cjs/api/resources/sourceConnections/client/Client.d.ts +96 -62
  25. package/dist/cjs/api/resources/sourceConnections/client/Client.js +152 -78
  26. package/dist/cjs/api/resources/sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.d.ts +2 -1
  27. package/dist/cjs/api/resources/sourceConnections/client/requests/ListSourceConnectionsGetRequest.d.ts +4 -2
  28. package/dist/cjs/api/resources/sourceConnections/client/requests/RunSourceConnectionsSourceConnectionIdRunPostRequest.d.ts +2 -2
  29. package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.ts +10 -9
  30. package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +6 -3
  31. package/dist/cjs/api/resources/sources/client/Client.d.ts +24 -13
  32. package/dist/cjs/api/resources/sources/client/Client.js +36 -11
  33. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +231 -0
  34. package/dist/cjs/api/resources/webhooks/client/Client.js +689 -0
  35. package/dist/cjs/api/resources/webhooks/client/index.d.ts +2 -0
  36. package/dist/cjs/api/resources/webhooks/client/index.js +17 -0
  37. package/dist/cjs/api/resources/webhooks/client/requests/CreateSubscriptionRequest.d.ts +19 -0
  38. package/dist/cjs/api/resources/webhooks/client/requests/GetMessageWebhooksMessagesMessageIdGetRequest.d.ts +13 -0
  39. package/dist/cjs/api/resources/webhooks/client/requests/GetMessagesWebhooksMessagesGetRequest.d.ts +11 -0
  40. package/dist/cjs/api/resources/webhooks/client/requests/GetSubscriptionWebhooksSubscriptionsSubscriptionIdGetRequest.d.ts +13 -0
  41. package/dist/cjs/api/resources/webhooks/client/requests/PatchSubscriptionRequest.d.ts +18 -0
  42. package/dist/cjs/api/resources/webhooks/client/requests/RecoverMessagesRequest.d.ts +15 -0
  43. package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +6 -0
  44. package/dist/cjs/api/resources/webhooks/client/requests/index.js +2 -0
  45. package/dist/cjs/api/resources/webhooks/index.d.ts +1 -0
  46. package/dist/cjs/api/resources/webhooks/index.js +17 -0
  47. package/dist/cjs/api/types/AdminSearchDestination.d.ts +11 -0
  48. package/dist/cjs/api/types/AdminSearchDestination.js +10 -0
  49. package/dist/cjs/api/types/{SyncWithSourceConnection.d.ts → AdminSyncInfo.d.ts} +14 -3
  50. package/dist/cjs/api/types/BehaviorConfig.d.ts +14 -0
  51. package/dist/cjs/api/types/BodyResyncWithExecutionConfigAdminResyncSyncIdPost.d.ts +10 -0
  52. package/dist/cjs/api/types/Collection.d.ts +4 -2
  53. package/dist/cjs/api/types/ConfigField.d.ts +2 -0
  54. package/dist/cjs/api/types/ConflictErrorResponse.d.ts +13 -0
  55. package/dist/cjs/api/types/CursorConfig.d.ts +12 -0
  56. package/dist/cjs/api/types/DeliveryAttempt.d.ts +28 -0
  57. package/dist/cjs/api/types/DestinationConfig.d.ts +16 -0
  58. package/dist/cjs/api/types/EventType.d.ts +24 -0
  59. package/dist/cjs/api/types/EventType.js +19 -0
  60. package/dist/cjs/api/types/FeatureFlag.d.ts +4 -1
  61. package/dist/cjs/api/types/FeatureFlag.js +3 -0
  62. package/dist/cjs/api/types/HandlerConfig.d.ts +14 -0
  63. package/dist/cjs/api/types/LegacySearchRequest.d.ts +2 -2
  64. package/dist/cjs/api/types/NotFoundErrorResponse.d.ts +10 -0
  65. package/dist/cjs/api/types/RateLimitErrorResponse.d.ts +13 -0
  66. package/dist/cjs/api/types/RecoveryTask.d.ts +16 -0
  67. package/dist/cjs/api/types/S3ConfigRequest.d.ts +5 -9
  68. package/dist/cjs/api/types/SearchRequest.d.ts +15 -12
  69. package/dist/cjs/api/types/SearchResponse.d.ts +6 -3
  70. package/dist/cjs/api/types/Source.d.ts +4 -0
  71. package/dist/cjs/api/types/SourceConnection.d.ts +21 -3
  72. package/dist/cjs/api/types/SourceConnectionJob.d.ts +16 -1
  73. package/dist/cjs/api/types/SourceConnectionListItem.d.ts +13 -2
  74. package/dist/cjs/api/types/Sync.d.ts +1 -0
  75. package/dist/cjs/api/types/SyncConfig.d.ts +17 -0
  76. package/dist/cjs/api/types/SyncCreate.d.ts +1 -0
  77. package/dist/cjs/api/types/SyncJob.d.ts +2 -0
  78. package/dist/cjs/api/types/SyncUpdate.d.ts +1 -0
  79. package/dist/cjs/api/types/ValidationErrorDetail.d.ts +14 -0
  80. package/dist/cjs/api/types/ValidationErrorResponse.d.ts +14 -0
  81. package/dist/cjs/api/types/WebhookMessage.d.ts +22 -0
  82. package/dist/cjs/api/types/WebhookMessageWithAttempts.d.ts +23 -0
  83. package/dist/cjs/api/types/WebhookSubscription.d.ts +27 -0
  84. package/dist/cjs/api/types/index.d.ts +19 -25
  85. package/dist/cjs/api/types/index.js +19 -25
  86. package/dist/cjs/version.d.ts +1 -1
  87. package/dist/cjs/version.js +1 -1
  88. package/dist/esm/Client.d.mts +3 -8
  89. package/dist/esm/Client.mjs +7 -4
  90. package/dist/esm/api/errors/ConflictError.d.mts +9 -0
  91. package/dist/esm/api/errors/ConflictError.mjs +15 -0
  92. package/dist/esm/api/errors/NotFoundError.d.mts +9 -0
  93. package/dist/esm/api/errors/NotFoundError.mjs +15 -0
  94. package/dist/esm/api/errors/TooManyRequestsError.d.mts +9 -0
  95. package/dist/esm/api/errors/TooManyRequestsError.mjs +15 -0
  96. package/dist/esm/api/errors/UnprocessableEntityError.d.mts +1 -2
  97. package/dist/esm/api/errors/index.d.mts +3 -0
  98. package/dist/esm/api/errors/index.mjs +3 -0
  99. package/dist/esm/api/resources/collections/client/Client.d.mts +107 -42
  100. package/dist/esm/api/resources/collections/client/Client.mjs +205 -58
  101. package/dist/esm/api/resources/collections/client/requests/CollectionCreate.d.mts +3 -0
  102. package/dist/esm/api/resources/collections/client/requests/CollectionUpdate.d.mts +16 -0
  103. package/dist/esm/api/resources/collections/client/requests/ListCollectionsGetRequest.d.mts +4 -4
  104. package/dist/esm/api/resources/collections/client/requests/SearchGetLegacyCollectionsReadableIdSearchGetRequest.d.mts +4 -4
  105. package/dist/esm/api/resources/collections/client/requests/index.d.mts +1 -0
  106. package/dist/esm/api/resources/collections/types/index.d.mts +0 -1
  107. package/dist/esm/api/resources/collections/types/index.mjs +0 -1
  108. package/dist/esm/api/resources/index.d.mts +2 -0
  109. package/dist/esm/api/resources/index.mjs +2 -0
  110. package/dist/esm/api/resources/sourceConnections/client/Client.d.mts +96 -62
  111. package/dist/esm/api/resources/sourceConnections/client/Client.mjs +152 -78
  112. package/dist/esm/api/resources/sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.d.mts +2 -1
  113. package/dist/esm/api/resources/sourceConnections/client/requests/ListSourceConnectionsGetRequest.d.mts +4 -2
  114. package/dist/esm/api/resources/sourceConnections/client/requests/RunSourceConnectionsSourceConnectionIdRunPostRequest.d.mts +2 -2
  115. package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.mts +10 -9
  116. package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.mts +6 -3
  117. package/dist/esm/api/resources/sources/client/Client.d.mts +24 -13
  118. package/dist/esm/api/resources/sources/client/Client.mjs +36 -11
  119. package/dist/esm/api/resources/webhooks/client/Client.d.mts +231 -0
  120. package/dist/esm/api/resources/webhooks/client/Client.mjs +652 -0
  121. package/dist/esm/api/resources/webhooks/client/index.d.mts +2 -0
  122. package/dist/esm/api/resources/webhooks/client/index.mjs +1 -0
  123. package/dist/esm/api/resources/webhooks/client/requests/CreateSubscriptionRequest.d.mts +19 -0
  124. package/dist/esm/api/resources/webhooks/client/requests/GetMessageWebhooksMessagesMessageIdGetRequest.d.mts +13 -0
  125. package/dist/esm/api/resources/webhooks/client/requests/GetMessagesWebhooksMessagesGetRequest.d.mts +11 -0
  126. package/dist/esm/api/resources/webhooks/client/requests/GetSubscriptionWebhooksSubscriptionsSubscriptionIdGetRequest.d.mts +13 -0
  127. package/dist/esm/api/resources/webhooks/client/requests/PatchSubscriptionRequest.d.mts +18 -0
  128. package/dist/esm/api/resources/webhooks/client/requests/RecoverMessagesRequest.d.mts +15 -0
  129. package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +6 -0
  130. package/dist/esm/api/resources/webhooks/client/requests/index.mjs +1 -0
  131. package/dist/esm/api/resources/webhooks/index.d.mts +1 -0
  132. package/dist/esm/api/resources/webhooks/index.mjs +1 -0
  133. package/dist/esm/api/types/AdminSearchDestination.d.mts +11 -0
  134. package/dist/esm/api/types/AdminSearchDestination.mjs +7 -0
  135. package/dist/esm/api/types/{SyncWithSourceConnection.d.mts → AdminSyncInfo.d.mts} +14 -3
  136. package/dist/esm/api/types/BehaviorConfig.d.mts +14 -0
  137. package/dist/esm/api/types/BodyResyncWithExecutionConfigAdminResyncSyncIdPost.d.mts +10 -0
  138. package/dist/esm/api/types/Collection.d.mts +4 -2
  139. package/dist/esm/api/types/ConfigField.d.mts +2 -0
  140. package/dist/esm/api/types/ConflictErrorResponse.d.mts +13 -0
  141. package/dist/esm/api/types/CursorConfig.d.mts +12 -0
  142. package/dist/esm/api/types/DeliveryAttempt.d.mts +28 -0
  143. package/dist/esm/api/types/DestinationConfig.d.mts +16 -0
  144. package/dist/esm/api/types/EventType.d.mts +24 -0
  145. package/dist/esm/api/types/EventType.mjs +16 -0
  146. package/dist/esm/api/types/FeatureFlag.d.mts +4 -1
  147. package/dist/esm/api/types/FeatureFlag.mjs +3 -0
  148. package/dist/esm/api/types/HandlerConfig.d.mts +14 -0
  149. package/dist/esm/api/types/LegacySearchRequest.d.mts +2 -2
  150. package/dist/esm/api/types/NotFoundErrorResponse.d.mts +10 -0
  151. package/dist/esm/api/types/RateLimitErrorResponse.d.mts +13 -0
  152. package/dist/esm/api/types/RecoveryTask.d.mts +16 -0
  153. package/dist/esm/api/types/S3ConfigRequest.d.mts +5 -9
  154. package/dist/esm/api/types/SearchRequest.d.mts +15 -12
  155. package/dist/esm/api/types/SearchResponse.d.mts +6 -3
  156. package/dist/esm/api/types/Source.d.mts +4 -0
  157. package/dist/esm/api/types/SourceConnection.d.mts +21 -3
  158. package/dist/esm/api/types/SourceConnectionJob.d.mts +16 -1
  159. package/dist/esm/api/types/SourceConnectionListItem.d.mts +13 -2
  160. package/dist/esm/api/types/Sync.d.mts +1 -0
  161. package/dist/esm/api/types/SyncConfig.d.mts +17 -0
  162. package/dist/esm/api/types/SyncCreate.d.mts +1 -0
  163. package/dist/esm/api/types/SyncJob.d.mts +2 -0
  164. package/dist/esm/api/types/SyncUpdate.d.mts +1 -0
  165. package/dist/esm/api/types/ValidationErrorDetail.d.mts +14 -0
  166. package/dist/esm/api/types/ValidationErrorResponse.d.mts +14 -0
  167. package/dist/esm/api/types/WebhookMessage.d.mts +22 -0
  168. package/dist/esm/api/types/WebhookMessageWithAttempts.d.mts +23 -0
  169. package/dist/esm/api/types/WebhookSubscription.d.mts +27 -0
  170. package/dist/esm/api/types/index.d.mts +19 -25
  171. package/dist/esm/api/types/index.mjs +19 -25
  172. package/dist/esm/version.d.mts +1 -1
  173. package/dist/esm/version.mjs +1 -1
  174. package/package.json +1 -1
  175. package/reference.md +891 -121
  176. package/dist/cjs/api/resources/collections/types/SearchCollectionsReadableIdSearchPostResponse.d.ts +0 -5
  177. package/dist/cjs/api/types/CollectionUpdate.d.ts +0 -13
  178. package/dist/cjs/api/types/DatetimeRange.d.ts +0 -34
  179. package/dist/cjs/api/types/FieldCondition.d.ts +0 -33
  180. package/dist/cjs/api/types/Filter.d.ts +0 -28
  181. package/dist/cjs/api/types/GeoBoundingBox.d.ts +0 -13
  182. package/dist/cjs/api/types/GeoLineString.d.ts +0 -11
  183. package/dist/cjs/api/types/GeoPoint.d.ts +0 -12
  184. package/dist/cjs/api/types/GeoPolygon.d.ts +0 -13
  185. package/dist/cjs/api/types/GeoRadius.d.ts +0 -13
  186. package/dist/cjs/api/types/HasIdCondition.d.ts +0 -16
  187. package/dist/cjs/api/types/HasVectorCondition.d.ts +0 -10
  188. package/dist/cjs/api/types/IsEmptyCondition.d.ts +0 -11
  189. package/dist/cjs/api/types/IsNullCondition.d.ts +0 -11
  190. package/dist/cjs/api/types/MatchAny.d.ts +0 -16
  191. package/dist/cjs/api/types/MatchExcept.d.ts +0 -16
  192. package/dist/cjs/api/types/MatchPhrase.d.ts +0 -10
  193. package/dist/cjs/api/types/MatchText.d.ts +0 -10
  194. package/dist/cjs/api/types/MatchValue.d.ts +0 -16
  195. package/dist/cjs/api/types/MinShould.d.ts +0 -16
  196. package/dist/cjs/api/types/Nested.d.ts +0 -13
  197. package/dist/cjs/api/types/NestedCondition.d.ts +0 -8
  198. package/dist/cjs/api/types/PayloadField.d.ts +0 -10
  199. package/dist/cjs/api/types/Range.d.ts +0 -16
  200. package/dist/cjs/api/types/SyncWithSourceConnection.js +0 -5
  201. package/dist/cjs/api/types/ValuesCount.d.ts +0 -16
  202. package/dist/cjs/api/types/ValuesCount.js +0 -5
  203. package/dist/esm/api/resources/collections/types/SearchCollectionsReadableIdSearchPostResponse.d.mts +0 -5
  204. package/dist/esm/api/types/CollectionUpdate.d.mts +0 -13
  205. package/dist/esm/api/types/DatetimeRange.d.mts +0 -34
  206. package/dist/esm/api/types/FieldCondition.d.mts +0 -33
  207. package/dist/esm/api/types/Filter.d.mts +0 -28
  208. package/dist/esm/api/types/GeoBoundingBox.d.mts +0 -13
  209. package/dist/esm/api/types/GeoLineString.d.mts +0 -11
  210. package/dist/esm/api/types/GeoPoint.d.mts +0 -12
  211. package/dist/esm/api/types/GeoPolygon.d.mts +0 -13
  212. package/dist/esm/api/types/GeoRadius.d.mts +0 -13
  213. package/dist/esm/api/types/HasIdCondition.d.mts +0 -16
  214. package/dist/esm/api/types/HasVectorCondition.d.mts +0 -10
  215. package/dist/esm/api/types/IsEmptyCondition.d.mts +0 -11
  216. package/dist/esm/api/types/IsNullCondition.d.mts +0 -11
  217. package/dist/esm/api/types/MatchAny.d.mts +0 -16
  218. package/dist/esm/api/types/MatchExcept.d.mts +0 -16
  219. package/dist/esm/api/types/MatchPhrase.d.mts +0 -10
  220. package/dist/esm/api/types/MatchText.d.mts +0 -10
  221. package/dist/esm/api/types/MatchValue.d.mts +0 -16
  222. package/dist/esm/api/types/MinShould.d.mts +0 -16
  223. package/dist/esm/api/types/Nested.d.mts +0 -13
  224. package/dist/esm/api/types/NestedCondition.d.mts +0 -8
  225. package/dist/esm/api/types/PayloadField.d.mts +0 -10
  226. package/dist/esm/api/types/Range.d.mts +0 -16
  227. package/dist/esm/api/types/SyncWithSourceConnection.mjs +0 -4
  228. package/dist/esm/api/types/ValuesCount.d.mts +0 -16
  229. package/dist/esm/api/types/ValuesCount.mjs +0 -4
  230. /package/dist/cjs/api/{types → resources/collections/client/requests}/CollectionUpdate.js +0 -0
  231. /package/dist/cjs/api/resources/{collections/types/SearchCollectionsReadableIdSearchPostResponse.js → webhooks/client/requests/CreateSubscriptionRequest.js} +0 -0
  232. /package/dist/cjs/api/{types/DatetimeRange.js → resources/webhooks/client/requests/GetMessageWebhooksMessagesMessageIdGetRequest.js} +0 -0
  233. /package/dist/cjs/api/{types/FieldCondition.js → resources/webhooks/client/requests/GetMessagesWebhooksMessagesGetRequest.js} +0 -0
  234. /package/dist/cjs/api/{types/Filter.js → resources/webhooks/client/requests/GetSubscriptionWebhooksSubscriptionsSubscriptionIdGetRequest.js} +0 -0
  235. /package/dist/cjs/api/{types/GeoBoundingBox.js → resources/webhooks/client/requests/PatchSubscriptionRequest.js} +0 -0
  236. /package/dist/cjs/api/{types/GeoLineString.js → resources/webhooks/client/requests/RecoverMessagesRequest.js} +0 -0
  237. /package/dist/cjs/api/types/{GeoPoint.js → AdminSyncInfo.js} +0 -0
  238. /package/dist/cjs/api/types/{GeoPolygon.js → BehaviorConfig.js} +0 -0
  239. /package/dist/cjs/api/types/{GeoRadius.js → BodyResyncWithExecutionConfigAdminResyncSyncIdPost.js} +0 -0
  240. /package/dist/cjs/api/types/{HasIdCondition.js → ConflictErrorResponse.js} +0 -0
  241. /package/dist/cjs/api/types/{HasVectorCondition.js → CursorConfig.js} +0 -0
  242. /package/dist/cjs/api/types/{IsEmptyCondition.js → DeliveryAttempt.js} +0 -0
  243. /package/dist/cjs/api/types/{IsNullCondition.js → DestinationConfig.js} +0 -0
  244. /package/dist/cjs/api/types/{MatchAny.js → HandlerConfig.js} +0 -0
  245. /package/dist/cjs/api/types/{MatchExcept.js → NotFoundErrorResponse.js} +0 -0
  246. /package/dist/cjs/api/types/{MatchPhrase.js → RateLimitErrorResponse.js} +0 -0
  247. /package/dist/cjs/api/types/{MatchText.js → RecoveryTask.js} +0 -0
  248. /package/dist/cjs/api/types/{MatchValue.js → SyncConfig.js} +0 -0
  249. /package/dist/cjs/api/types/{MinShould.js → ValidationErrorDetail.js} +0 -0
  250. /package/dist/cjs/api/types/{Nested.js → ValidationErrorResponse.js} +0 -0
  251. /package/dist/cjs/api/types/{NestedCondition.js → WebhookMessage.js} +0 -0
  252. /package/dist/cjs/api/types/{PayloadField.js → WebhookMessageWithAttempts.js} +0 -0
  253. /package/dist/cjs/api/types/{Range.js → WebhookSubscription.js} +0 -0
  254. /package/dist/esm/api/{types → resources/collections/client/requests}/CollectionUpdate.mjs +0 -0
  255. /package/dist/esm/api/resources/{collections/types/SearchCollectionsReadableIdSearchPostResponse.mjs → webhooks/client/requests/CreateSubscriptionRequest.mjs} +0 -0
  256. /package/dist/esm/api/{types/DatetimeRange.mjs → resources/webhooks/client/requests/GetMessageWebhooksMessagesMessageIdGetRequest.mjs} +0 -0
  257. /package/dist/esm/api/{types/FieldCondition.mjs → resources/webhooks/client/requests/GetMessagesWebhooksMessagesGetRequest.mjs} +0 -0
  258. /package/dist/esm/api/{types/Filter.mjs → resources/webhooks/client/requests/GetSubscriptionWebhooksSubscriptionsSubscriptionIdGetRequest.mjs} +0 -0
  259. /package/dist/esm/api/{types/GeoBoundingBox.mjs → resources/webhooks/client/requests/PatchSubscriptionRequest.mjs} +0 -0
  260. /package/dist/esm/api/{types/GeoLineString.mjs → resources/webhooks/client/requests/RecoverMessagesRequest.mjs} +0 -0
  261. /package/dist/esm/api/types/{GeoPoint.mjs → AdminSyncInfo.mjs} +0 -0
  262. /package/dist/esm/api/types/{GeoPolygon.mjs → BehaviorConfig.mjs} +0 -0
  263. /package/dist/esm/api/types/{GeoRadius.mjs → BodyResyncWithExecutionConfigAdminResyncSyncIdPost.mjs} +0 -0
  264. /package/dist/esm/api/types/{HasIdCondition.mjs → ConflictErrorResponse.mjs} +0 -0
  265. /package/dist/esm/api/types/{HasVectorCondition.mjs → CursorConfig.mjs} +0 -0
  266. /package/dist/esm/api/types/{IsEmptyCondition.mjs → DeliveryAttempt.mjs} +0 -0
  267. /package/dist/esm/api/types/{IsNullCondition.mjs → DestinationConfig.mjs} +0 -0
  268. /package/dist/esm/api/types/{MatchAny.mjs → HandlerConfig.mjs} +0 -0
  269. /package/dist/esm/api/types/{MatchExcept.mjs → NotFoundErrorResponse.mjs} +0 -0
  270. /package/dist/esm/api/types/{MatchPhrase.mjs → RateLimitErrorResponse.mjs} +0 -0
  271. /package/dist/esm/api/types/{MatchText.mjs → RecoveryTask.mjs} +0 -0
  272. /package/dist/esm/api/types/{MatchValue.mjs → SyncConfig.mjs} +0 -0
  273. /package/dist/esm/api/types/{MinShould.mjs → ValidationErrorDetail.mjs} +0 -0
  274. /package/dist/esm/api/types/{Nested.mjs → ValidationErrorResponse.mjs} +0 -0
  275. /package/dist/esm/api/types/{NestedCondition.mjs → WebhookMessage.mjs} +0 -0
  276. /package/dist/esm/api/types/{PayloadField.mjs → WebhookMessageWithAttempts.mjs} +0 -0
  277. /package/dist/esm/api/types/{Range.mjs → WebhookSubscription.mjs} +0 -0
@@ -59,18 +59,25 @@ class SourceConnections {
59
59
  this._options = _options;
60
60
  }
61
61
  /**
62
- * List source connections with minimal fields for performance.
62
+ * Retrieve all source connections for your organization.
63
+ *
64
+ * Returns a lightweight list of source connections with essential fields for
65
+ * display and navigation. Use the collection filter to see connections within
66
+ * a specific collection.
67
+ *
68
+ * For full connection details including sync history, use the GET /{id} endpoint.
63
69
  *
64
70
  * @param {AirweaveSDK.ListSourceConnectionsGetRequest} request
65
71
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
66
72
  *
67
73
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
74
+ * @throws {@link AirweaveSDK.TooManyRequestsError}
68
75
  *
69
76
  * @example
70
77
  * await client.sourceConnections.list({
71
78
  * collection: "collection",
72
- * skip: 1,
73
- * limit: 1
79
+ * skip: 0,
80
+ * limit: 100
74
81
  * })
75
82
  */
76
83
  list(request = {}, requestOptions) {
@@ -78,7 +85,7 @@ class SourceConnections {
78
85
  }
79
86
  __list() {
80
87
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
81
- var _a, _b, _c, _d, _e, _f, _g;
88
+ var _a, _b, _c;
82
89
  const { collection, skip, limit } = request;
83
90
  const _queryParams = {};
84
91
  if (collection != null) {
@@ -90,9 +97,9 @@ class SourceConnections {
90
97
  if (limit != null) {
91
98
  _queryParams["limit"] = limit.toString();
92
99
  }
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({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
100
+ 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
101
  const _response = yield core.fetcher({
95
- url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "source-connections"),
102
+ 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
103
  method: "GET",
97
104
  headers: _headers,
98
105
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -110,6 +117,8 @@ class SourceConnections {
110
117
  switch (_response.error.statusCode) {
111
118
  case 422:
112
119
  throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
120
+ case 429:
121
+ throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
113
122
  default:
114
123
  throw new errors.AirweaveSDKError({
115
124
  statusCode: _response.error.statusCode,
@@ -136,30 +145,27 @@ class SourceConnections {
136
145
  });
137
146
  }
138
147
  /**
139
- * Create a new source connection.
148
+ * Create a new source connection to sync data from an external source.
140
149
  *
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
150
+ * The authentication method determines the creation flow:
146
151
  *
147
- * BYOC (Bring Your Own Client) is detected when client_id and client_secret
148
- * are provided in OAuthBrowserAuthentication.
152
+ * - **Direct**: Provide credentials (API key, token) directly. Connection is created immediately.
153
+ * - **OAuth Browser**: Returns a connection with an `auth_url` to redirect users for authentication.
154
+ * - **OAuth Token**: Provide an existing OAuth token. Connection is created immediately.
155
+ * - **Auth Provider**: Use a pre-configured auth provider (e.g., Composio, Pipedream).
149
156
  *
150
- * sync_immediately defaults:
151
- * - True for: direct, oauth_token, auth_provider
152
- * - False for: oauth_browser, oauth_byoc (these sync after authentication)
157
+ * After successful authentication, data sync can begin automatically or on-demand.
153
158
  *
154
159
  * @param {AirweaveSDK.SourceConnectionCreate} request
155
160
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
156
161
  *
157
162
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
163
+ * @throws {@link AirweaveSDK.TooManyRequestsError}
158
164
  *
159
165
  * @example
160
166
  * await client.sourceConnections.create({
161
- * short_name: "short_name",
162
- * readable_collection_id: "readable_collection_id"
167
+ * short_name: "github",
168
+ * readable_collection_id: "customer-support-tickets-x7k9m"
163
169
  * })
164
170
  */
165
171
  create(request, requestOptions) {
@@ -167,10 +173,10 @@ class SourceConnections {
167
173
  }
168
174
  __create(request, requestOptions) {
169
175
  return __awaiter(this, void 0, void 0, function* () {
170
- var _a, _b, _c, _d, _e, _f, _g;
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({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
176
+ var _a, _b, _c;
177
+ 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);
172
178
  const _response = yield core.fetcher({
173
- url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "source-connections"),
179
+ 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"),
174
180
  method: "POST",
175
181
  headers: _headers,
176
182
  contentType: "application/json",
@@ -188,6 +194,8 @@ class SourceConnections {
188
194
  switch (_response.error.statusCode) {
189
195
  case 422:
190
196
  throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
197
+ case 429:
198
+ throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
191
199
  default:
192
200
  throw new errors.AirweaveSDKError({
193
201
  statusCode: _response.error.statusCode,
@@ -214,25 +222,33 @@ class SourceConnections {
214
222
  });
215
223
  }
216
224
  /**
217
- * Get a source connection with optional depth expansion.
225
+ * Retrieve details of a specific source connection.
226
+ *
227
+ * Returns complete information about the connection including:
228
+ * - Configuration settings
229
+ * - Authentication status
230
+ * - Sync schedule and history
231
+ * - Entity statistics
218
232
  *
219
- * @param {string} sourceConnectionId
233
+ * @param {string} sourceConnectionId - Unique identifier of the source connection (UUID)
220
234
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
221
235
  *
236
+ * @throws {@link AirweaveSDK.NotFoundError}
222
237
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
238
+ * @throws {@link AirweaveSDK.TooManyRequestsError}
223
239
  *
224
240
  * @example
225
- * await client.sourceConnections.get("source_connection_id")
241
+ * await client.sourceConnections.get("550e8400-e29b-41d4-a716-446655440000")
226
242
  */
227
243
  get(sourceConnectionId, requestOptions) {
228
244
  return core.HttpResponsePromise.fromPromise(this.__get(sourceConnectionId, requestOptions));
229
245
  }
230
246
  __get(sourceConnectionId, requestOptions) {
231
247
  return __awaiter(this, void 0, void 0, function* () {
232
- var _a, _b, _c, _d, _e, _f, _g;
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({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
248
+ var _a, _b, _c;
249
+ 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);
234
250
  const _response = yield core.fetcher({
235
- url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
251
+ 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)}`),
236
252
  method: "GET",
237
253
  headers: _headers,
238
254
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -245,8 +261,12 @@ class SourceConnections {
245
261
  }
246
262
  if (_response.error.reason === "status-code") {
247
263
  switch (_response.error.statusCode) {
264
+ case 404:
265
+ throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
248
266
  case 422:
249
267
  throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
268
+ case 429:
269
+ throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
250
270
  default:
251
271
  throw new errors.AirweaveSDKError({
252
272
  statusCode: _response.error.statusCode,
@@ -273,25 +293,34 @@ class SourceConnections {
273
293
  });
274
294
  }
275
295
  /**
276
- * Delete a source connection and all related data.
296
+ * Permanently delete a source connection and all its synced data.
297
+ *
298
+ * This operation:
299
+ * - Removes all entities synced from this source from the vector database
300
+ * - Cancels any scheduled or running sync jobs
301
+ * - Deletes the connection configuration and credentials
302
+ *
303
+ * **Warning**: This action cannot be undone. All synced data will be permanently deleted.
277
304
  *
278
- * @param {string} sourceConnectionId
305
+ * @param {string} sourceConnectionId - Unique identifier of the source connection to delete (UUID)
279
306
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
280
307
  *
308
+ * @throws {@link AirweaveSDK.NotFoundError}
281
309
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
310
+ * @throws {@link AirweaveSDK.TooManyRequestsError}
282
311
  *
283
312
  * @example
284
- * await client.sourceConnections.delete("source_connection_id")
313
+ * await client.sourceConnections.delete("550e8400-e29b-41d4-a716-446655440000")
285
314
  */
286
315
  delete(sourceConnectionId, requestOptions) {
287
316
  return core.HttpResponsePromise.fromPromise(this.__delete(sourceConnectionId, requestOptions));
288
317
  }
289
318
  __delete(sourceConnectionId, requestOptions) {
290
319
  return __awaiter(this, void 0, void 0, function* () {
291
- var _a, _b, _c, _d, _e, _f, _g;
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({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
320
+ var _a, _b, _c;
321
+ 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);
293
322
  const _response = yield core.fetcher({
294
- url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
323
+ 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)}`),
295
324
  method: "DELETE",
296
325
  headers: _headers,
297
326
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -304,8 +333,12 @@ class SourceConnections {
304
333
  }
305
334
  if (_response.error.reason === "status-code") {
306
335
  switch (_response.error.statusCode) {
336
+ case 404:
337
+ throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
307
338
  case 422:
308
339
  throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
340
+ case 429:
341
+ throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
309
342
  default:
310
343
  throw new errors.AirweaveSDKError({
311
344
  statusCode: _response.error.statusCode,
@@ -332,32 +365,36 @@ class SourceConnections {
332
365
  });
333
366
  }
334
367
  /**
335
- * Update a source connection.
368
+ * Update an existing source connection's configuration.
336
369
  *
337
- * Updateable fields:
338
- * - name, description
339
- * - config_fields
340
- * - cron_schedule
341
- * - auth_fields (direct auth only)
370
+ * You can modify:
371
+ * - **Name and description**: Display information
372
+ * - **Configuration**: Source-specific settings (e.g., repository name, filters)
373
+ * - **Schedule**: Cron expression for automatic syncs
374
+ * - **Authentication**: Update credentials (direct auth only)
342
375
  *
343
- * @param {string} sourceConnectionId
376
+ * Only include the fields you want to change; omitted fields retain their current values.
377
+ *
378
+ * @param {string} sourceConnectionId - Unique identifier of the source connection to update (UUID)
344
379
  * @param {AirweaveSDK.SourceConnectionUpdate} request
345
380
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
346
381
  *
382
+ * @throws {@link AirweaveSDK.NotFoundError}
347
383
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
384
+ * @throws {@link AirweaveSDK.TooManyRequestsError}
348
385
  *
349
386
  * @example
350
- * await client.sourceConnections.update("source_connection_id")
387
+ * await client.sourceConnections.update("550e8400-e29b-41d4-a716-446655440000")
351
388
  */
352
389
  update(sourceConnectionId, request = {}, requestOptions) {
353
390
  return core.HttpResponsePromise.fromPromise(this.__update(sourceConnectionId, request, requestOptions));
354
391
  }
355
392
  __update(sourceConnectionId_1) {
356
393
  return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
357
- var _a, _b, _c, _d, _e, _f, _g;
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({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
394
+ var _a, _b, _c;
395
+ 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);
359
396
  const _response = yield core.fetcher({
360
- url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
397
+ 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
398
  method: "PATCH",
362
399
  headers: _headers,
363
400
  contentType: "application/json",
@@ -373,8 +410,12 @@ class SourceConnections {
373
410
  }
374
411
  if (_response.error.reason === "status-code") {
375
412
  switch (_response.error.statusCode) {
413
+ case 404:
414
+ throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
376
415
  case 422:
377
416
  throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
417
+ case 429:
418
+ throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
378
419
  default:
379
420
  throw new errors.AirweaveSDKError({
380
421
  statusCode: _response.error.statusCode,
@@ -401,28 +442,27 @@ class SourceConnections {
401
442
  });
402
443
  }
403
444
  /**
404
- * Trigger a sync run for a source connection.
445
+ * Trigger a data synchronization job for a source connection.
405
446
  *
406
- * Runs are always executed through Temporal workflow engine.
447
+ * Starts an asynchronous sync job that pulls the latest data from the connected
448
+ * source. The job runs in the background and you can monitor its progress using
449
+ * the jobs endpoint.
407
450
  *
408
- * Args:
409
- * db: Database session
410
- * source_connection_id: ID of the source connection to run
411
- * ctx: API context with organization and user information
412
- * guard_rail: Guard rail service for usage limits
413
- * force_full_sync: If True, forces a full sync with orphaned entity cleanup
414
- * for continuous syncs. Raises 400 error if used on
415
- * non-continuous syncs (which are always full syncs).
451
+ * For continuous sync connections, this performs an incremental sync by default.
452
+ * Use `force_full_sync=true` to perform a complete re-sync of all data.
416
453
  *
417
- * @param {string} sourceConnectionId
454
+ * @param {string} sourceConnectionId - Unique identifier of the source connection to sync (UUID)
418
455
  * @param {AirweaveSDK.RunSourceConnectionsSourceConnectionIdRunPostRequest} request
419
456
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
420
457
  *
458
+ * @throws {@link AirweaveSDK.NotFoundError}
459
+ * @throws {@link AirweaveSDK.ConflictError}
421
460
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
461
+ * @throws {@link AirweaveSDK.TooManyRequestsError}
422
462
  *
423
463
  * @example
424
- * await client.sourceConnections.run("source_connection_id", {
425
- * force_full_sync: true
464
+ * await client.sourceConnections.run("550e8400-e29b-41d4-a716-446655440000", {
465
+ * force_full_sync: false
426
466
  * })
427
467
  */
428
468
  run(sourceConnectionId, request = {}, requestOptions) {
@@ -430,15 +470,15 @@ class SourceConnections {
430
470
  }
431
471
  __run(sourceConnectionId_1) {
432
472
  return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
433
- var _a, _b, _c, _d, _e, _f, _g;
473
+ var _a, _b, _c;
434
474
  const { force_full_sync: forceFullSync } = request;
435
475
  const _queryParams = {};
436
476
  if (forceFullSync != null) {
437
477
  _queryParams["force_full_sync"] = forceFullSync.toString();
438
478
  }
439
- 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({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
479
+ 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);
440
480
  const _response = yield core.fetcher({
441
- url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/run`),
481
+ 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`),
442
482
  method: "POST",
443
483
  headers: _headers,
444
484
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -451,8 +491,14 @@ class SourceConnections {
451
491
  }
452
492
  if (_response.error.reason === "status-code") {
453
493
  switch (_response.error.statusCode) {
494
+ case 404:
495
+ throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
496
+ case 409:
497
+ throw new AirweaveSDK.ConflictError(_response.error.body, _response.rawResponse);
454
498
  case 422:
455
499
  throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
500
+ case 429:
501
+ throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
456
502
  default:
457
503
  throw new errors.AirweaveSDKError({
458
504
  statusCode: _response.error.statusCode,
@@ -479,17 +525,30 @@ class SourceConnections {
479
525
  });
480
526
  }
481
527
  /**
482
- * Get sync jobs for a source connection.
528
+ * Retrieve the sync job history for a source connection.
529
+ *
530
+ * Returns a list of sync jobs ordered by creation time (newest first). Each job
531
+ * includes status, timing information, and entity counts.
483
532
  *
484
- * @param {string} sourceConnectionId
533
+ * Job statuses:
534
+ * - **PENDING**: Job is queued and waiting to start
535
+ * - **RUNNING**: Sync is actively pulling and processing data
536
+ * - **COMPLETED**: Sync finished successfully
537
+ * - **FAILED**: Sync encountered an error
538
+ * - **CANCELLED**: Sync was manually cancelled
539
+ * - **CANCELLING**: Cancellation has been requested
540
+ *
541
+ * @param {string} sourceConnectionId - Unique identifier of the source connection (UUID)
485
542
  * @param {AirweaveSDK.GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest} request
486
543
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
487
544
  *
545
+ * @throws {@link AirweaveSDK.NotFoundError}
488
546
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
547
+ * @throws {@link AirweaveSDK.TooManyRequestsError}
489
548
  *
490
549
  * @example
491
- * await client.sourceConnections.getSourceConnectionJobs("source_connection_id", {
492
- * limit: 1
550
+ * await client.sourceConnections.getSourceConnectionJobs("550e8400-e29b-41d4-a716-446655440000", {
551
+ * limit: 100
493
552
  * })
494
553
  */
495
554
  getSourceConnectionJobs(sourceConnectionId, request = {}, requestOptions) {
@@ -497,15 +556,15 @@ class SourceConnections {
497
556
  }
498
557
  __getSourceConnectionJobs(sourceConnectionId_1) {
499
558
  return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
500
- var _a, _b, _c, _d, _e, _f, _g;
559
+ var _a, _b, _c;
501
560
  const { limit } = request;
502
561
  const _queryParams = {};
503
562
  if (limit != null) {
504
563
  _queryParams["limit"] = limit.toString();
505
564
  }
506
- 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({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
565
+ 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);
507
566
  const _response = yield core.fetcher({
508
- url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs`),
567
+ 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`),
509
568
  method: "GET",
510
569
  headers: _headers,
511
570
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -518,8 +577,12 @@ class SourceConnections {
518
577
  }
519
578
  if (_response.error.reason === "status-code") {
520
579
  switch (_response.error.statusCode) {
580
+ case 404:
581
+ throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
521
582
  case 422:
522
583
  throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
584
+ case 429:
585
+ throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
523
586
  default:
524
587
  throw new errors.AirweaveSDKError({
525
588
  statusCode: _response.error.statusCode,
@@ -546,30 +609,35 @@ class SourceConnections {
546
609
  });
547
610
  }
548
611
  /**
549
- * Cancel a running sync job for a source connection.
612
+ * Request cancellation of a running sync job.
613
+ *
614
+ * The job will be marked as CANCELLING and the sync workflow will stop at the
615
+ * next checkpoint. Already-processed entities are retained.
550
616
  *
551
- * This endpoint requests cancellation and marks the job as CANCELLING.
552
- * The workflow updates the final status to CANCELLED when it processes
553
- * the cancellation request.
617
+ * **Note**: Cancellation is asynchronous. The job status will change to CANCELLED
618
+ * once the workflow has fully stopped.
554
619
  *
555
- * @param {string} sourceConnectionId
556
- * @param {string} jobId
620
+ * @param {string} sourceConnectionId - Unique identifier of the source connection (UUID)
621
+ * @param {string} jobId - Unique identifier of the sync job to cancel (UUID)
557
622
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
558
623
  *
624
+ * @throws {@link AirweaveSDK.NotFoundError}
625
+ * @throws {@link AirweaveSDK.ConflictError}
559
626
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
627
+ * @throws {@link AirweaveSDK.TooManyRequestsError}
560
628
  *
561
629
  * @example
562
- * await client.sourceConnections.cancelJob("source_connection_id", "job_id")
630
+ * await client.sourceConnections.cancelJob("550e8400-e29b-41d4-a716-446655440000", "660e8400-e29b-41d4-a716-446655440001")
563
631
  */
564
632
  cancelJob(sourceConnectionId, jobId, requestOptions) {
565
633
  return core.HttpResponsePromise.fromPromise(this.__cancelJob(sourceConnectionId, jobId, requestOptions));
566
634
  }
567
635
  __cancelJob(sourceConnectionId, jobId, requestOptions) {
568
636
  return __awaiter(this, void 0, void 0, function* () {
569
- var _a, _b, _c, _d, _e, _f, _g;
570
- 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({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
637
+ var _a, _b, _c;
638
+ 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);
571
639
  const _response = yield core.fetcher({
572
- url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs/${encodeURIComponent(jobId)}/cancel`),
640
+ 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`),
573
641
  method: "POST",
574
642
  headers: _headers,
575
643
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -582,8 +650,14 @@ class SourceConnections {
582
650
  }
583
651
  if (_response.error.reason === "status-code") {
584
652
  switch (_response.error.statusCode) {
653
+ case 404:
654
+ throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
655
+ case 409:
656
+ throw new AirweaveSDK.ConflictError(_response.error.body, _response.rawResponse);
585
657
  case 422:
586
658
  throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
659
+ case 429:
660
+ throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
587
661
  default:
588
662
  throw new errors.AirweaveSDKError({
589
663
  statusCode: _response.error.statusCode,
@@ -4,9 +4,10 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * limit: 1
7
+ * limit: 100
8
8
  * }
9
9
  */
10
10
  export interface GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest {
11
+ /** Maximum number of jobs to return (1-1000) */
11
12
  limit?: number;
12
13
  }
@@ -5,13 +5,15 @@
5
5
  * @example
6
6
  * {
7
7
  * collection: "collection",
8
- * skip: 1,
9
- * limit: 1
8
+ * skip: 0,
9
+ * limit: 100
10
10
  * }
11
11
  */
12
12
  export interface ListSourceConnectionsGetRequest {
13
13
  /** Filter by collection readable ID */
14
14
  collection?: string;
15
+ /** Number of connections to skip for pagination */
15
16
  skip?: number;
17
+ /** Maximum number of connections to return (1-1000) */
16
18
  limit?: number;
17
19
  }
@@ -4,10 +4,10 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * force_full_sync: true
7
+ * force_full_sync: false
8
8
  * }
9
9
  */
10
10
  export interface RunSourceConnectionsSourceConnectionIdRunPostRequest {
11
- /** Force a full sync ignoring cursor data instead of waiting for the daily cleanup schedule. Only allowed for continuous syncs. */
11
+ /** Force a full sync ignoring cursor data. Only applies to continuous sync connections. Non-continuous connections always perform full syncs. */
12
12
  force_full_sync?: boolean;
13
13
  }
@@ -5,32 +5,33 @@ import * as AirweaveSDK from "../../../../index.js";
5
5
  /**
6
6
  * @example
7
7
  * {
8
- * short_name: "short_name",
9
- * readable_collection_id: "readable_collection_id"
8
+ * short_name: "github",
9
+ * readable_collection_id: "customer-support-tickets-x7k9m"
10
10
  * }
11
11
  */
12
12
  export interface SourceConnectionCreate {
13
- /** Connection name (defaults to '{Source Name} Connection') */
13
+ /** Display name for the connection. If not provided, defaults to '{Source Name} Connection'. */
14
14
  name?: string;
15
- /** Source identifier (e.g., 'slack', 'github') */
15
+ /** Source type identifier (e.g., 'slack', 'github', 'notion') */
16
16
  short_name: string;
17
- /** Collection readable ID */
17
+ /** The readable ID of the collection to add this connection to */
18
18
  readable_collection_id: string;
19
- /** Connection description */
19
+ /** Optional description of what this connection is used for */
20
20
  description?: string;
21
- /** Source-specific configuration */
21
+ /** Source-specific configuration (e.g., repository name, filters) */
22
22
  config?: Record<string, unknown>;
23
+ /** Optional sync schedule configuration */
23
24
  schedule?: AirweaveSDK.ScheduleConfig;
24
25
  /** Run initial sync after creation. Defaults to True for direct/token/auth_provider, False for OAuth browser/BYOC flows (which sync after authentication) */
25
26
  sync_immediately?: boolean;
26
- /** Authentication config (defaults to OAuth browser flow for OAuth sources) */
27
+ /** Authentication configuration. Type is auto-detected from provided fields. */
27
28
  authentication?: SourceConnectionCreate.Authentication;
28
29
  /** URL to redirect to after OAuth flow completes (only used for OAuth flows) */
29
30
  redirect_url?: string;
30
31
  }
31
32
  export declare namespace SourceConnectionCreate {
32
33
  /**
33
- * Authentication config (defaults to OAuth browser flow for OAuth sources)
34
+ * Updated authentication credentials (direct auth only)
34
35
  */
35
36
  type Authentication = AirweaveSDK.DirectAuthentication | AirweaveSDK.OAuthTokenAuthentication | AirweaveSDK.OAuthBrowserAuthentication | AirweaveSDK.AuthProviderAuthentication;
36
37
  }
@@ -7,17 +7,20 @@ import * as AirweaveSDK from "../../../../index.js";
7
7
  * {}
8
8
  */
9
9
  export interface SourceConnectionUpdate {
10
+ /** Updated display name for the connection */
10
11
  name?: string;
12
+ /** Updated description */
11
13
  description?: string;
12
- /** Source-specific configuration */
14
+ /** Updated source-specific configuration */
13
15
  config?: Record<string, unknown>;
16
+ /** Updated sync schedule configuration */
14
17
  schedule?: AirweaveSDK.ScheduleConfig;
15
- /** Authentication config (defaults to OAuth browser flow for OAuth sources) */
18
+ /** Updated authentication credentials (direct auth only) */
16
19
  authentication?: SourceConnectionUpdate.Authentication;
17
20
  }
18
21
  export declare namespace SourceConnectionUpdate {
19
22
  /**
20
- * Authentication config (defaults to OAuth browser flow for OAuth sources)
23
+ * Updated authentication credentials (direct auth only)
21
24
  */
22
25
  type Authentication = AirweaveSDK.DirectAuthentication | AirweaveSDK.OAuthTokenAuthentication | AirweaveSDK.OAuthBrowserAuthentication | AirweaveSDK.AuthProviderAuthentication;
23
26
  }