@airweave/sdk 0.7.20 → 0.8.76

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