@membranehq/sdk 0.1.0

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 (319) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -0
  3. package/dist/bundle.d.ts +2543 -0
  4. package/dist/bundle.js +26089 -0
  5. package/dist/bundle.js.map +1 -0
  6. package/dist/dts/__mocks__/axios.d.ts +4 -0
  7. package/dist/dts/_helper.d.ts +7 -0
  8. package/dist/dts/_helper.test.d.ts +1 -0
  9. package/dist/dts/accessors.d.ts +85 -0
  10. package/dist/dts/accessors.test.d.ts +1 -0
  11. package/dist/dts/actions/accessors.d.ts +49 -0
  12. package/dist/dts/actions/action-types.d.ts +26 -0
  13. package/dist/dts/actions/index.d.ts +3 -0
  14. package/dist/dts/actions/types.d.ts +95 -0
  15. package/dist/dts/alerts/index.d.ts +1 -0
  16. package/dist/dts/alerts/types.d.ts +24 -0
  17. package/dist/dts/api-client.d.ts +32 -0
  18. package/dist/dts/api-client.test.d.ts +1 -0
  19. package/dist/dts/app-data-schemas/accessors.d.ts +18 -0
  20. package/dist/dts/app-data-schemas/api.d.ts +33 -0
  21. package/dist/dts/app-data-schemas/index.d.ts +23 -0
  22. package/dist/dts/app-events/accessors.d.ts +20 -0
  23. package/dist/dts/app-events/api.d.ts +44 -0
  24. package/dist/dts/app-events/index.d.ts +42 -0
  25. package/dist/dts/apps/index.d.ts +1 -0
  26. package/dist/dts/apps/types.d.ts +18 -0
  27. package/dist/dts/auth/accessors.d.ts +10 -0
  28. package/dist/dts/auth/index.d.ts +7 -0
  29. package/dist/dts/client.d.ts +70 -0
  30. package/dist/dts/connections/accessors.d.ts +88 -0
  31. package/dist/dts/connections/api.d.ts +27 -0
  32. package/dist/dts/connections/create-or-update-connection.d.ts +14 -0
  33. package/dist/dts/connections/index.d.ts +3 -0
  34. package/dist/dts/connections/types.d.ts +52 -0
  35. package/dist/dts/connector-copilot/index.d.ts +1 -0
  36. package/dist/dts/connector-copilot/types.d.ts +160 -0
  37. package/dist/dts/connectors/auth.d.ts +171 -0
  38. package/dist/dts/connectors/constants.d.ts +5 -0
  39. package/dist/dts/connectors/data-locations/base.d.ts +10 -0
  40. package/dist/dts/connectors/data-locations/collections/events/implementation-types/connector-event.d.ts +14 -0
  41. package/dist/dts/connectors/data-locations/collections/events/implementation-types/custom-pull.d.ts +14 -0
  42. package/dist/dts/connectors/data-locations/collections/events/implementation-types/full-scan.d.ts +7 -0
  43. package/dist/dts/connectors/data-locations/collections/events/implementation-types/pull-latest-records.d.ts +17 -0
  44. package/dist/dts/connectors/data-locations/collections/events/implementation-types/webhook.d.ts +18 -0
  45. package/dist/dts/connectors/data-locations/collections/events/index.d.ts +50 -0
  46. package/dist/dts/connectors/data-locations/collections/events/methods.d.ts +15 -0
  47. package/dist/dts/connectors/data-locations/collections/index.d.ts +70 -0
  48. package/dist/dts/connectors/data-locations/collections/methods/base.d.ts +24 -0
  49. package/dist/dts/connectors/data-locations/collections/methods/create.d.ts +7 -0
  50. package/dist/dts/connectors/data-locations/collections/methods/delete.d.ts +2 -0
  51. package/dist/dts/connectors/data-locations/collections/methods/find-by-id.d.ts +2 -0
  52. package/dist/dts/connectors/data-locations/collections/methods/find.d.ts +6 -0
  53. package/dist/dts/connectors/data-locations/collections/methods/list.d.ts +5 -0
  54. package/dist/dts/connectors/data-locations/collections/methods/match.d.ts +5 -0
  55. package/dist/dts/connectors/data-locations/collections/methods/search.d.ts +2 -0
  56. package/dist/dts/connectors/data-locations/collections/methods/update.d.ts +6 -0
  57. package/dist/dts/connectors/data-locations/directories/index.d.ts +17 -0
  58. package/dist/dts/connectors/data-locations/directories/methods/base.d.ts +18 -0
  59. package/dist/dts/connectors/data-locations/directories/methods/list.d.ts +2 -0
  60. package/dist/dts/connectors/data-locations/index.d.ts +6 -0
  61. package/dist/dts/connectors/data-locations/methods.d.ts +6 -0
  62. package/dist/dts/connectors/data-locations/types.d.ts +258 -0
  63. package/dist/dts/connectors/data-locations/utils.d.ts +17 -0
  64. package/dist/dts/connectors/data-locations/utils.test.d.ts +1 -0
  65. package/dist/dts/connectors/data-records.d.ts +7 -0
  66. package/dist/dts/connectors/events/index.d.ts +1 -0
  67. package/dist/dts/connectors/events/types.d.ts +36 -0
  68. package/dist/dts/connectors/global-webhooks/index.d.ts +1 -0
  69. package/dist/dts/connectors/global-webhooks/types.d.ts +33 -0
  70. package/dist/dts/connectors/graphql-api.d.ts +17 -0
  71. package/dist/dts/connectors/index.d.ts +13 -0
  72. package/dist/dts/connectors/methods.d.ts +44 -0
  73. package/dist/dts/connectors/openapi.d.ts +11 -0
  74. package/dist/dts/connectors/operations/handlers.d.ts +9 -0
  75. package/dist/dts/connectors/operations/index.d.ts +2 -0
  76. package/dist/dts/connectors/operations/types.d.ts +26 -0
  77. package/dist/dts/connectors/rest-api.d.ts +67 -0
  78. package/dist/dts/connectors/types.d.ts +75 -0
  79. package/dist/dts/connectors/udm.d.ts +14 -0
  80. package/dist/dts/data-builder/formula-processors.d.ts +13 -0
  81. package/dist/dts/data-builder/formula-processors.test.d.ts +1 -0
  82. package/dist/dts/data-builder/formula-types.d.ts +4 -0
  83. package/dist/dts/data-builder/formulas/and.d.ts +9 -0
  84. package/dist/dts/data-builder/formulas/and.test.d.ts +1 -0
  85. package/dist/dts/data-builder/formulas/base.d.ts +47 -0
  86. package/dist/dts/data-builder/formulas/case.d.ts +18 -0
  87. package/dist/dts/data-builder/formulas/case.test.d.ts +1 -0
  88. package/dist/dts/data-builder/formulas/concat.d.ts +19 -0
  89. package/dist/dts/data-builder/formulas/concat.test.d.ts +1 -0
  90. package/dist/dts/data-builder/formulas/copy.d.ts +10 -0
  91. package/dist/dts/data-builder/formulas/copy.test.d.ts +1 -0
  92. package/dist/dts/data-builder/formulas/dataSchemaRef.d.ts +22 -0
  93. package/dist/dts/data-builder/formulas/dataSchemaRef.test.d.ts +1 -0
  94. package/dist/dts/data-builder/formulas/domainFromEmail.d.ts +10 -0
  95. package/dist/dts/data-builder/formulas/domainFromEmail.test.d.ts +1 -0
  96. package/dist/dts/data-builder/formulas/eval.d.ts +28 -0
  97. package/dist/dts/data-builder/formulas/eval.test.d.ts +1 -0
  98. package/dist/dts/data-builder/formulas/extractDate.d.ts +11 -0
  99. package/dist/dts/data-builder/formulas/extractDate.test.d.ts +1 -0
  100. package/dist/dts/data-builder/formulas/extractTime.d.ts +11 -0
  101. package/dist/dts/data-builder/formulas/extractTime.test.d.ts +1 -0
  102. package/dist/dts/data-builder/formulas/findAppRecordId.d.ts +17 -0
  103. package/dist/dts/data-builder/formulas/findAppRecordId.test.d.ts +1 -0
  104. package/dist/dts/data-builder/formulas/findExternalRecordId.d.ts +17 -0
  105. package/dist/dts/data-builder/formulas/findExternalRecordId.test.d.ts +1 -0
  106. package/dist/dts/data-builder/formulas/first-name.d.ts +10 -0
  107. package/dist/dts/data-builder/formulas/first-name.test.d.ts +1 -0
  108. package/dist/dts/data-builder/formulas/firstNotEmpty.d.ts +7 -0
  109. package/dist/dts/data-builder/formulas/firstNotEmpty.test.d.ts +1 -0
  110. package/dist/dts/data-builder/formulas/formula.d.ts +8 -0
  111. package/dist/dts/data-builder/formulas/formula.test.d.ts +1 -0
  112. package/dist/dts/data-builder/formulas/index.d.ts +26 -0
  113. package/dist/dts/data-builder/formulas/index.test.d.ts +1 -0
  114. package/dist/dts/data-builder/formulas/iterate.d.ts +19 -0
  115. package/dist/dts/data-builder/formulas/iterate.test.d.ts +1 -0
  116. package/dist/dts/data-builder/formulas/jsonata.d.ts +8 -0
  117. package/dist/dts/data-builder/formulas/jsonata.test.d.ts +1 -0
  118. package/dist/dts/data-builder/formulas/last-name.d.ts +11 -0
  119. package/dist/dts/data-builder/formulas/last-name.test.d.ts +1 -0
  120. package/dist/dts/data-builder/formulas/lookup.d.ts +12 -0
  121. package/dist/dts/data-builder/formulas/lookup.test.d.ts +1 -0
  122. package/dist/dts/data-builder/formulas/map.d.ts +17 -0
  123. package/dist/dts/data-builder/formulas/map.test.d.ts +1 -0
  124. package/dist/dts/data-builder/formulas/mergeObjects.d.ts +12 -0
  125. package/dist/dts/data-builder/formulas/mergeObjects.test.d.ts +1 -0
  126. package/dist/dts/data-builder/formulas/or.d.ts +9 -0
  127. package/dist/dts/data-builder/formulas/or.test.d.ts +1 -0
  128. package/dist/dts/data-builder/formulas/plain.d.ts +8 -0
  129. package/dist/dts/data-builder/formulas/plain.test.d.ts +1 -0
  130. package/dist/dts/data-builder/formulas/record.d.ts +11 -0
  131. package/dist/dts/data-builder/formulas/record.test.d.ts +1 -0
  132. package/dist/dts/data-builder/formulas/tpl.d.ts +15 -0
  133. package/dist/dts/data-builder/formulas/tpl.test.d.ts +1 -0
  134. package/dist/dts/data-builder/formulas/types.d.ts +27 -0
  135. package/dist/dts/data-builder/formulas/var.d.ts +11 -0
  136. package/dist/dts/data-builder/formulas/var.test.d.ts +1 -0
  137. package/dist/dts/data-builder/index.d.ts +9 -0
  138. package/dist/dts/data-builder/index.test.d.ts +1 -0
  139. package/dist/dts/data-builder/locators.d.ts +44 -0
  140. package/dist/dts/data-builder/locators.test.d.ts +1 -0
  141. package/dist/dts/data-collections/index.d.ts +1 -0
  142. package/dist/dts/data-collections/types.d.ts +24 -0
  143. package/dist/dts/data-filter/index.d.ts +13 -0
  144. package/dist/dts/data-filter/index.test.d.ts +1 -0
  145. package/dist/dts/data-filter/operators.d.ts +13 -0
  146. package/dist/dts/data-filter/operators.test.d.ts +1 -0
  147. package/dist/dts/data-form/data-field.d.ts +7 -0
  148. package/dist/dts/data-form/index.d.ts +21 -0
  149. package/dist/dts/data-links/accessors.d.ts +20 -0
  150. package/dist/dts/data-links/api.d.ts +56 -0
  151. package/dist/dts/data-links/index.d.ts +36 -0
  152. package/dist/dts/data-schema/create.d.ts +2 -0
  153. package/dist/dts/data-schema/create.test.d.ts +1 -0
  154. package/dist/dts/data-schema/data-field.d.ts +14 -0
  155. package/dist/dts/data-schema/index.d.ts +5 -0
  156. package/dist/dts/data-schema/merge.d.ts +10 -0
  157. package/dist/dts/data-schema/merge.test.d.ts +1 -0
  158. package/dist/dts/data-schema/types.d.ts +35 -0
  159. package/dist/dts/data-schema/utils.d.ts +47 -0
  160. package/dist/dts/data-schema/utils.test.d.ts +1 -0
  161. package/dist/dts/data-sources/accessors.d.ts +64 -0
  162. package/dist/dts/data-sources/api.d.ts +90 -0
  163. package/dist/dts/data-sources/constants.d.ts +4 -0
  164. package/dist/dts/data-sources/index.d.ts +4 -0
  165. package/dist/dts/data-sources/types.d.ts +63 -0
  166. package/dist/dts/date-time/index.d.ts +1 -0
  167. package/dist/dts/date-time/parse.d.ts +1 -0
  168. package/dist/dts/date-time/parse.test.d.ts +1 -0
  169. package/dist/dts/datetime.d.ts +1 -0
  170. package/dist/dts/entity-repository.d.ts +24 -0
  171. package/dist/dts/errors/error-doc-enum.d.ts +7 -0
  172. package/dist/dts/errors/index.d.ts +105 -0
  173. package/dist/dts/external-events/accessors.d.ts +19 -0
  174. package/dist/dts/external-events/api.d.ts +22 -0
  175. package/dist/dts/external-events/index.d.ts +8 -0
  176. package/dist/dts/external-events/types.d.ts +157 -0
  177. package/dist/dts/field-mappings/accessors.d.ts +54 -0
  178. package/dist/dts/field-mappings/api.d.ts +58 -0
  179. package/dist/dts/field-mappings/index.d.ts +66 -0
  180. package/dist/dts/field-mappings/merge/is-object.test.d.ts +1 -0
  181. package/dist/dts/field-mappings/merge/merge-with-formulas.d.ts +2 -0
  182. package/dist/dts/field-mappings/merge/merge-with-formulas.test.d.ts +1 -0
  183. package/dist/dts/field-mappings/types.d.ts +12 -0
  184. package/dist/dts/flow-runs/accessors.d.ts +33 -0
  185. package/dist/dts/flow-runs/flow-node-runs.d.ts +42 -0
  186. package/dist/dts/flow-runs/index.d.ts +78 -0
  187. package/dist/dts/flows/accessors.d.ts +75 -0
  188. package/dist/dts/flows/api.d.ts +54 -0
  189. package/dist/dts/flows/index.d.ts +6 -0
  190. package/dist/dts/flows/nodes/api-request-to-external-app.d.ts +3 -0
  191. package/dist/dts/flows/nodes/api-request-to-your-app.d.ts +3 -0
  192. package/dist/dts/flows/nodes/api-trigger.d.ts +3 -0
  193. package/dist/dts/flows/nodes/app-event-trigger.d.ts +3 -0
  194. package/dist/dts/flows/nodes/base.d.ts +17 -0
  195. package/dist/dts/flows/nodes/connector-event-trigger.d.ts +3 -0
  196. package/dist/dts/flows/nodes/create-data-link.d.ts +3 -0
  197. package/dist/dts/flows/nodes/create-data-record.d.ts +3 -0
  198. package/dist/dts/flows/nodes/custom-http-request.d.ts +3 -0
  199. package/dist/dts/flows/nodes/data-record-created-trigger.d.ts +3 -0
  200. package/dist/dts/flows/nodes/data-record-deleted-trigger.d.ts +3 -0
  201. package/dist/dts/flows/nodes/data-record-updated-trigger.d.ts +3 -0
  202. package/dist/dts/flows/nodes/delete-data-link.d.ts +3 -0
  203. package/dist/dts/flows/nodes/delete-data-record.d.ts +3 -0
  204. package/dist/dts/flows/nodes/filter.d.ts +3 -0
  205. package/dist/dts/flows/nodes/find-data-link.d.ts +3 -0
  206. package/dist/dts/flows/nodes/find-data-record-by-id.d.ts +3 -0
  207. package/dist/dts/flows/nodes/find-data-records.d.ts +3 -0
  208. package/dist/dts/flows/nodes/find-or-create-data-record.d.ts +3 -0
  209. package/dist/dts/flows/nodes/for-each-v2.d.ts +3 -0
  210. package/dist/dts/flows/nodes/for-each.d.ts +3 -0
  211. package/dist/dts/flows/nodes/index.d.ts +37 -0
  212. package/dist/dts/flows/nodes/integration-specific-operation.d.ts +3 -0
  213. package/dist/dts/flows/nodes/list-data-records.d.ts +3 -0
  214. package/dist/dts/flows/nodes/lookup-data-record.d.ts +3 -0
  215. package/dist/dts/flows/nodes/run-action.d.ts +3 -0
  216. package/dist/dts/flows/nodes/run-javascript.d.ts +3 -0
  217. package/dist/dts/flows/nodes/schedule-trigger.d.ts +3 -0
  218. package/dist/dts/flows/nodes/search-data-records.d.ts +3 -0
  219. package/dist/dts/flows/nodes/transform-data.d.ts +3 -0
  220. package/dist/dts/flows/nodes/update-data-record.d.ts +3 -0
  221. package/dist/dts/flows/schemas.d.ts +240 -0
  222. package/dist/dts/flows/types.d.ts +77 -0
  223. package/dist/dts/flows/utils.d.ts +16 -0
  224. package/dist/dts/flows/utils.test.d.ts +1 -0
  225. package/dist/dts/http-requests.d.ts +37 -0
  226. package/dist/dts/iframe.d.ts +11 -0
  227. package/dist/dts/index.d.ts +41 -0
  228. package/dist/dts/index.umd.d.ts +2 -0
  229. package/dist/dts/integration-elements/common.d.ts +3 -0
  230. package/dist/dts/integration-elements/connection-level-element.accessor.d.ts +29 -0
  231. package/dist/dts/integration-elements/index.d.ts +74 -0
  232. package/dist/dts/integration-elements/integration-level-element.accessor.d.ts +25 -0
  233. package/dist/dts/integrations/accessors.d.ts +58 -0
  234. package/dist/dts/integrations/api.d.ts +23 -0
  235. package/dist/dts/integrations/index.d.ts +3 -0
  236. package/dist/dts/integrations/types.d.ts +38 -0
  237. package/dist/dts/jwt.d.ts +1 -0
  238. package/dist/dts/jwt.test.d.ts +1 -0
  239. package/dist/dts/logging/index.d.ts +8 -0
  240. package/dist/dts/logging/index.test.d.ts +1 -0
  241. package/dist/dts/logging/types.d.ts +13 -0
  242. package/dist/dts/orgs/index.d.ts +1 -0
  243. package/dist/dts/orgs/types.d.ts +59 -0
  244. package/dist/dts/scenarios/accessors.d.ts +9 -0
  245. package/dist/dts/scenarios/index.d.ts +2 -0
  246. package/dist/dts/scenarios/types.d.ts +145 -0
  247. package/dist/dts/screens/accessors.d.ts +9 -0
  248. package/dist/dts/screens/index.d.ts +2 -0
  249. package/dist/dts/screens/types.d.ts +37 -0
  250. package/dist/dts/udm/activities.d.ts +143 -0
  251. package/dist/dts/udm/activities.test.d.ts +1 -0
  252. package/dist/dts/udm/base.d.ts +62 -0
  253. package/dist/dts/udm/bills.d.ts +3 -0
  254. package/dist/dts/udm/campaign-members.d.ts +3 -0
  255. package/dist/dts/udm/campaigns.d.ts +3 -0
  256. package/dist/dts/udm/companies.d.ts +3 -0
  257. package/dist/dts/udm/contact-lists.d.ts +3 -0
  258. package/dist/dts/udm/contacts.d.ts +3 -0
  259. package/dist/dts/udm/credit-notes.d.ts +3 -0
  260. package/dist/dts/udm/customers.d.ts +3 -0
  261. package/dist/dts/udm/deal-products.d.ts +3 -0
  262. package/dist/dts/udm/deal-stages.d.ts +3 -0
  263. package/dist/dts/udm/deals.d.ts +3 -0
  264. package/dist/dts/udm/documents.d.ts +59 -0
  265. package/dist/dts/udm/drive-items.d.ts +78 -0
  266. package/dist/dts/udm/drives.d.ts +46 -0
  267. package/dist/dts/udm/eeocs.d.ts +3 -0
  268. package/dist/dts/udm/emails.d.ts +115 -0
  269. package/dist/dts/udm/employees.d.ts +3 -0
  270. package/dist/dts/udm/files.d.ts +73 -0
  271. package/dist/dts/udm/folders.d.ts +66 -0
  272. package/dist/dts/udm/index.d.ts +53 -0
  273. package/dist/dts/udm/invoices.d.ts +3 -0
  274. package/dist/dts/udm/job-applications.d.ts +3 -0
  275. package/dist/dts/udm/job-candidates.d.ts +3 -0
  276. package/dist/dts/udm/job-interviews.d.ts +3 -0
  277. package/dist/dts/udm/job-offers.d.ts +3 -0
  278. package/dist/dts/udm/jobs.d.ts +3 -0
  279. package/dist/dts/udm/journal-entries.d.ts +3 -0
  280. package/dist/dts/udm/leads.d.ts +3 -0
  281. package/dist/dts/udm/ledger-accounts.d.ts +3 -0
  282. package/dist/dts/udm/meetings.d.ts +98 -0
  283. package/dist/dts/udm/messages.d.ts +51 -0
  284. package/dist/dts/udm/notes.d.ts +61 -0
  285. package/dist/dts/udm/orders.d.ts +3 -0
  286. package/dist/dts/udm/payments.d.ts +3 -0
  287. package/dist/dts/udm/payrolls.d.ts +3 -0
  288. package/dist/dts/udm/products.d.ts +3 -0
  289. package/dist/dts/udm/projects.d.ts +3 -0
  290. package/dist/dts/udm/suppliers.d.ts +3 -0
  291. package/dist/dts/udm/tasks.d.ts +104 -0
  292. package/dist/dts/udm/tax-rates.d.ts +3 -0
  293. package/dist/dts/udm/timeoff-balances.d.ts +3 -0
  294. package/dist/dts/udm/timeoff-requests.d.ts +3 -0
  295. package/dist/dts/udm/users.d.ts +3 -0
  296. package/dist/dts/usage/index.d.ts +1 -0
  297. package/dist/dts/usage/types.d.ts +33 -0
  298. package/dist/dts/users/accessors.d.ts +10 -0
  299. package/dist/dts/users/api.d.ts +23 -0
  300. package/dist/dts/users/index.d.ts +13 -0
  301. package/dist/dts/variables.d.ts +27 -0
  302. package/dist/dts/webhooks/index.d.ts +1 -0
  303. package/dist/dts/webhooks/types.d.ts +11 -0
  304. package/dist/dts/workspace-elements/index.d.ts +1 -0
  305. package/dist/dts/workspace-elements/types.d.ts +77 -0
  306. package/dist/dts/workspace-elements-catalog/index.d.ts +27 -0
  307. package/dist/dts/workspace-updates/index.d.ts +1 -0
  308. package/dist/dts/workspace-updates/types.d.ts +6 -0
  309. package/dist/dts/workspaces/api.d.ts +5 -0
  310. package/dist/dts/workspaces/constants.d.ts +4 -0
  311. package/dist/dts/workspaces/index.d.ts +3 -0
  312. package/dist/dts/workspaces/types.d.ts +175 -0
  313. package/dist/index.d.ts +5022 -0
  314. package/dist/index.js +11815 -0
  315. package/dist/index.js.map +1 -0
  316. package/dist/index.module.d.mts +5022 -0
  317. package/dist/index.module.mjs +11551 -0
  318. package/dist/index.module.mjs.map +1 -0
  319. package/package.json +96 -0
@@ -0,0 +1,88 @@
1
+ import { CreateConnectionRequest, FindConnectionsQuery, UpdateConnectionRequest } from './api';
2
+ import { ElementInstanceListAccessor } from '../accessors';
3
+ import { ConnectionLevelActionAccessor, ConnectionLevelActionsAccessor } from '../actions';
4
+ import { IntegrationAppApiClient } from '../api-client';
5
+ import { DataCollectionCreateRequest, DataCollectionCreateResponse, DataCollectionDeleteRequest, DataCollectionDeleteResponse, DataCollectionFindByIdRequest, DataCollectionFindByIdResponse, DataCollectionListRequest, DataCollectionListResponse, DataCollectionMatchRequest, DataCollectionMatchResponse, DataCollectionSearchRequest, DataCollectionSearchResponse, DataCollectionSpec, DataCollectionUpdateRequest, DataCollectionUpdateResponse, DataDirectoryListRequest, DataDirectoryListResponse } from '../connectors';
6
+ import { OperationRunRequest, OperationRunResponse, OperationSpec } from '../connectors/operations/types';
7
+ import { ConnectionLevelDataSourceAccessor, ConnectionLevelDataSourcesAccessor } from '../data-sources';
8
+ import { ConnectionLevelFieldMappingAccessor, ConnectionLevelFieldMappingsAccessor } from '../field-mappings';
9
+ import { ConnectionLevelFlowAccessor, ConnectionLevelFlowsAccessor } from '../flows';
10
+ import { OpenConfigurationOptions } from '../iframe';
11
+ import { InstanceKeyQuery } from '../integration-elements/common';
12
+ import { Connection } from '.';
13
+ export declare class ConnectionsAccessor extends ElementInstanceListAccessor<Connection, FindConnectionsQuery> {
14
+ constructor(client: IntegrationAppApiClient);
15
+ create(data: CreateConnectionRequest): Promise<Connection>;
16
+ }
17
+ export declare class ConnectionAccessor {
18
+ client: IntegrationAppApiClient;
19
+ connectionSelector: string;
20
+ constructor(client: IntegrationAppApiClient, connectionSelector: string);
21
+ get actions(): ConnectionLevelActionsAccessor;
22
+ action(actionSelector: string, query?: InstanceKeyQuery): ConnectionLevelActionAccessor;
23
+ get flows(): ConnectionLevelFlowsAccessor;
24
+ flow(flowSelector: string, query?: InstanceKeyQuery): ConnectionLevelFlowAccessor;
25
+ get dataSources(): ConnectionLevelDataSourcesAccessor;
26
+ dataSource(dataSourceSelector: string, query?: InstanceKeyQuery): ConnectionLevelDataSourceAccessor;
27
+ get fieldMappings(): ConnectionLevelFieldMappingsAccessor;
28
+ fieldMapping(fieldMappingSelector: string, query?: InstanceKeyQuery): ConnectionLevelFieldMappingAccessor;
29
+ get(query?: {
30
+ includeSecrets?: boolean;
31
+ }): Promise<Connection>;
32
+ patch(data: UpdateConnectionRequest): Promise<Connection>;
33
+ put(data: UpdateConnectionRequest): Promise<Connection>;
34
+ archive(): Promise<void>;
35
+ request(path: string, data?: any): Promise<any>;
36
+ get proxy(): ConnectionProxy;
37
+ operation(key: string): ConnectionOperationAccessor;
38
+ dataCollection(key: string, parameters?: Record<string, any>): ConnectionDataCollectionAccessor;
39
+ dataDirectory(key: string, parameters?: Record<string, any>): ConnectionDataDirectoryAccessor;
40
+ reconnect({ parameters, authOptionKey, }?: {
41
+ parameters?: any;
42
+ authOptionKey?: string;
43
+ }): Promise<Connection | undefined>;
44
+ openReconnectUI({}?: OpenConfigurationOptions): Promise<void>;
45
+ refreshCredentials(): Promise<void>;
46
+ getPath(subpath?: string, query?: Record<string, any>): string;
47
+ }
48
+ export declare class ConnectionOperationAccessor {
49
+ client: IntegrationAppApiClient;
50
+ connectionAccessor: ConnectionAccessor;
51
+ key: string;
52
+ constructor(client: IntegrationAppApiClient, connectionAccessor: ConnectionAccessor, key: string);
53
+ get(): Promise<OperationSpec>;
54
+ run(request?: OperationRunRequest): Promise<OperationRunResponse>;
55
+ }
56
+ export declare class ConnectionDataDirectoryAccessor {
57
+ client: IntegrationAppApiClient;
58
+ connectionAccessor: ConnectionAccessor;
59
+ key: string;
60
+ parameters: Record<string, any>;
61
+ constructor(client: IntegrationAppApiClient, connectionAccessor: ConnectionAccessor, key: string, parameters: Record<string, any>);
62
+ list(request?: DataDirectoryListRequest): Promise<DataDirectoryListResponse>;
63
+ }
64
+ export declare class ConnectionDataCollectionAccessor {
65
+ client: IntegrationAppApiClient;
66
+ connectionAccessor: ConnectionAccessor;
67
+ key: string;
68
+ parameters: Record<string, any>;
69
+ constructor(client: IntegrationAppApiClient, connectionAccessor: ConnectionAccessor, key: string, parameters: Record<string, any>);
70
+ get(): Promise<DataCollectionSpec>;
71
+ findById(request?: DataCollectionFindByIdRequest): Promise<DataCollectionFindByIdResponse>;
72
+ list(request?: DataCollectionListRequest): Promise<DataCollectionListResponse>;
73
+ search(request?: DataCollectionSearchRequest): Promise<DataCollectionSearchResponse>;
74
+ match(request?: DataCollectionMatchRequest): Promise<DataCollectionMatchResponse>;
75
+ create(request?: DataCollectionCreateRequest): Promise<DataCollectionCreateResponse>;
76
+ update(request?: DataCollectionUpdateRequest): Promise<DataCollectionUpdateResponse>;
77
+ delete(request?: DataCollectionDeleteRequest): Promise<DataCollectionDeleteResponse>;
78
+ }
79
+ export declare class ConnectionProxy {
80
+ private connection;
81
+ constructor(connection: ConnectionAccessor);
82
+ get(path: string): Promise<any>;
83
+ post(path: string, data?: any): Promise<any>;
84
+ put(path: string, data?: any): Promise<any>;
85
+ patch(path: string, data?: any): Promise<any>;
86
+ delete(path: string): Promise<any>;
87
+ private getProxyPath;
88
+ }
@@ -0,0 +1,27 @@
1
+ import { PaginationQuery, PaginationResponse } from '../entity-repository';
2
+ import { Connection } from '.';
3
+ export interface FindConnectionsQuery extends PaginationQuery {
4
+ userId?: string;
5
+ isTest?: boolean;
6
+ integrationKey?: string;
7
+ integrationId?: string;
8
+ includeArchived?: boolean;
9
+ }
10
+ export declare class CreateConnectionRequest {
11
+ name: string;
12
+ integrationId: string;
13
+ credentials?: string;
14
+ }
15
+ export declare class UpdateConnectionRequest {
16
+ name?: string;
17
+ credentials?: string;
18
+ accessToken?: string;
19
+ }
20
+ export declare class FindConnectionsResponse extends PaginationResponse<Connection> {
21
+ }
22
+ export interface ConnectionSelector {
23
+ id?: string;
24
+ integrationKey?: string;
25
+ integrationId?: string;
26
+ connectionId?: string;
27
+ }
@@ -0,0 +1,14 @@
1
+ import { ConnectorSpec } from '../connectors';
2
+ import { Connection } from './types';
3
+ export declare function createOrUpdateConnection(options?: {
4
+ authOptionKey?: string;
5
+ name?: string;
6
+ parameters?: any;
7
+ integrationId?: string;
8
+ connectionId?: string;
9
+ connectorSpec?: ConnectorSpec;
10
+ allowMultipleConnections?: boolean;
11
+ token: string;
12
+ apiUri: string;
13
+ redirectUri?: string;
14
+ }): Promise<Connection | undefined>;
@@ -0,0 +1,3 @@
1
+ export * from './accessors';
2
+ export * from './api';
3
+ export * from './types';
@@ -0,0 +1,52 @@
1
+ import { ConnectorUiSpec, ConnectorDataUdmSpec, ConnectorDataSpec, ConnectorSpec } from '../connectors/types';
2
+ import { ErrorData } from '../errors';
3
+ import { Integration } from '../integrations/types';
4
+ import { User } from '../users';
5
+ export interface ConnectionRequest {
6
+ path: any;
7
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
8
+ pathParameters?: Record<string, string>;
9
+ headers?: Record<string, string>;
10
+ query?: Record<string, string>;
11
+ data?: any;
12
+ }
13
+ export declare class Connection {
14
+ id: string;
15
+ name: string;
16
+ userId: string;
17
+ user?: User;
18
+ disconnected?: boolean;
19
+ error?: ErrorData;
20
+ integrationId: string;
21
+ integration?: Integration;
22
+ credentials?: unknown;
23
+ parameters?: unknown;
24
+ connectorParameters?: unknown;
25
+ accessToken?: string;
26
+ refreshToken?: string;
27
+ createdAt: string;
28
+ updatedAt: string;
29
+ archivedAt?: string;
30
+ }
31
+ export interface ConnectionSpec extends ConnectorSpec {
32
+ }
33
+ export type ConnectionUiSpec = ConnectorUiSpec;
34
+ export type ConnectionUdmSpec = ConnectorDataUdmSpec;
35
+ export type ConnectionDataSpec = ConnectorDataSpec;
36
+ export declare class ConnectionSpec {
37
+ constructor(opts: ConnectionSpec);
38
+ }
39
+ export type ConnectionMessagePayload = {
40
+ source: string;
41
+ requestId: string;
42
+ } & ({
43
+ type: 'newConnectionCreated';
44
+ connection: Connection;
45
+ error?: never;
46
+ errorData?: never;
47
+ } | {
48
+ type: 'newConnectionFailure';
49
+ connection?: never;
50
+ error: string;
51
+ errorData?: ErrorData;
52
+ });
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1,160 @@
1
+ import { ErrorData } from '../errors';
2
+ export declare enum ConnectorCopilotSuggestionType {
3
+ AuthType = "auth-type",
4
+ AuthImplementation = "auth-implementation",
5
+ AuthConnectionParameters = "auth-connection-parameters",
6
+ AuthApiClient = "auth-api-client",
7
+ DataCollection = "data-collection",
8
+ DataCollectionOperationApiRequests = "data-location-operation-api-requests",
9
+ DataCollectionOperationApiRequestMapping = "data-location-operation-api-request-mapping",
10
+ DataCollectionFieldsSchema = "data-location-fields-schema",
11
+ UdmList = "udm-list",
12
+ UdmFieldsMapping = "udm-fields-mapping",
13
+ UdmFieldsMappingToCollection = "udm-fields-mapping-to-collection",
14
+ UdmFieldsMappingFromCollection = "udm-fields-mapping-from-collection"
15
+ }
16
+ export interface ConnectorCopilotSuggestion {
17
+ id?: string;
18
+ type: ConnectorCopilotSuggestionType;
19
+ dataCollectionKey?: string;
20
+ title?: string;
21
+ description?: string;
22
+ parameters?: Record<string, any>;
23
+ hash?: string;
24
+ action?: ConnectorCopilotSuggestionAction;
25
+ actions?: ConnectorCopilotSuggestionAction[];
26
+ }
27
+ type ConnectorCopilotSuggestionActionType = 'patch' | 'put' | 'patch-data-schema' | 'patch-field-mapping';
28
+ export interface ConnectorCopilotSuggestionAction {
29
+ type: ConnectorCopilotSuggestionActionType;
30
+ path: string;
31
+ locator?: string;
32
+ data: any;
33
+ format?: 'value' | 'fields' | 'schema';
34
+ schema?: any;
35
+ variablesSchema?: any;
36
+ parameters?: any;
37
+ }
38
+ export declare enum ConnectorCopilotFileChunkTopicKey {
39
+ AuthType = "auth-type",
40
+ AuthImplementation = "auth-implementation",
41
+ AuthConnectionParameters = "auth-connection-parameters",
42
+ AuthApiClient = "auth-api-client"
43
+ }
44
+ export declare enum CopilotTaskType {
45
+ GenerateAuthType = "generate-auth-type",
46
+ GenerateOAuthConfiguration = "generate-oauth-configuration",
47
+ GenerateAuthConnectionParameters = "generate-auth-connection-parameters",
48
+ GenerateAuthApiClient = "generate-auth-api-client",
49
+ GenerateDataCollections = "generate-data-collections",
50
+ GenerateDataCollectionRecordFromFields = "generate-data-collection-record-from-fields",
51
+ GenerateDataCollectionOperationApiRequests = "generate-data-collection-operation-api-requests",
52
+ GenerateDataCollectionOperationApiRequestMapping = "generate-data-collection-operation-api-request-mapping",
53
+ GenerateDataCollectionFieldsSchema = "generate-data-collection-fields-schema",
54
+ GenerateUdmList = "generate-udm-list",
55
+ GenerateUdmFieldsMapping = "generate-udm-fields-mapping"
56
+ }
57
+ export declare enum CopilotTaskStatus {
58
+ Pending = "pending",
59
+ Running = "running",
60
+ Completed = "completed",
61
+ Failed = "failed"
62
+ }
63
+ export interface CopilotTask<ParameterClass = unknown> {
64
+ id: string;
65
+ name: string;
66
+ type: CopilotTaskType;
67
+ parameters: ParameterClass;
68
+ status: CopilotTaskStatus;
69
+ startedTimestamp: number;
70
+ endedTimestamp: number;
71
+ error: ErrorData;
72
+ }
73
+ export declare enum CopilotActionType {
74
+ PatchConnectorFile = "patch",
75
+ PutConnectorFile = "put",
76
+ PatchConnectorDataSchema = "patch-data-schema",
77
+ PatchConnectorFieldMapping = "patch-field-mapping",
78
+ SetConnectorAuthType = "set-connector-auth-type"
79
+ }
80
+ export declare enum CopilotActionStatus {
81
+ Suggested = "suggested",
82
+ Executed = "executed",
83
+ Rejected = "rejected"
84
+ }
85
+ export interface CopilotAction {
86
+ id: string;
87
+ copilotTaskId: string;
88
+ type: CopilotActionType;
89
+ status: CopilotActionStatus;
90
+ name: string;
91
+ description?: string;
92
+ parameters?: unknown;
93
+ hash?: string;
94
+ references?: CopilotActionReference[];
95
+ }
96
+ export declare enum CopilotActivityType {
97
+ Task = "task"
98
+ }
99
+ export interface CopilotActivityDataTask {
100
+ taskId: string;
101
+ }
102
+ export interface CopilotActivity<DataClass = unknown> {
103
+ type: CopilotActivityType;
104
+ text: string;
105
+ data: DataClass;
106
+ scopes: string[];
107
+ timestamp: number;
108
+ }
109
+ export interface CopilotActionReference {
110
+ id: string;
111
+ snippet: string;
112
+ quotes?: string[];
113
+ file: {
114
+ name: string;
115
+ sourceUri?: string;
116
+ };
117
+ }
118
+ export declare const CopilotActivityScope: {
119
+ connector: (connectorId: string) => CopilotActivityScopeConnector;
120
+ };
121
+ declare class CopilotActivityScopeConnector {
122
+ private connectorId;
123
+ constructor(connectorId: string);
124
+ auth: () => CopilotActivityScopeConnectorAuth;
125
+ data: (key?: string) => CopilotActivityScopeConnectorData;
126
+ udm: (key?: string) => CopilotActivityScopeConnectorUdm;
127
+ toString(): string;
128
+ }
129
+ declare class CopilotActivityScopeConnectorAuth {
130
+ private connectorScope;
131
+ constructor(connectorScope: CopilotActivityScopeConnector);
132
+ toString(): string;
133
+ }
134
+ declare class CopilotActivityScopeConnectorData {
135
+ private connectorScope;
136
+ private dataCollectionKey;
137
+ constructor(connectorScope: CopilotActivityScopeConnector, dataCollectionKey: string | undefined);
138
+ method: (key: string) => CopilotActivityScopeConnectorDataMethod;
139
+ toString(): string;
140
+ }
141
+ declare class CopilotActivityScopeConnectorDataMethod {
142
+ private collectionScope;
143
+ private methodKey;
144
+ constructor(collectionScope: CopilotActivityScopeConnectorData, methodKey: string);
145
+ toString(): string;
146
+ }
147
+ declare class CopilotActivityScopeConnectorUdm {
148
+ private connectorScope;
149
+ private key?;
150
+ constructor(connectorScope: CopilotActivityScopeConnector, key?: string | undefined);
151
+ collection: (key: string) => CopilotActivityScopeConnectorUdmCollection;
152
+ toString(): string;
153
+ }
154
+ declare class CopilotActivityScopeConnectorUdmCollection {
155
+ private udmScope;
156
+ private key;
157
+ constructor(udmScope: CopilotActivityScopeConnectorUdm, key: string);
158
+ toString(): string;
159
+ }
160
+ export {};
@@ -0,0 +1,171 @@
1
+ import { ConnectorSpec } from './types';
2
+ import { DataSchema } from '../data-schema';
3
+ import { ConnectorMethodImplementation, ConnectorMethodImplementationBase, ConnectorMethodImplementationType } from './methods';
4
+ export declare const CONNECTOR_AUTH_TYPES: readonly ["integration-app-token", "oauth2", "oauth1", "client-credentials", "proxy"];
5
+ export type ConnectorAuthType = (typeof CONNECTOR_AUTH_TYPES)[number];
6
+ export type ConnectorAuthSpec = {
7
+ title?: string;
8
+ description?: string;
9
+ type: ConnectorAuthType;
10
+ ui?: {
11
+ schema?: DataSchema;
12
+ helpUri?: string;
13
+ };
14
+ };
15
+ export interface ConnectorAuthHandlerBase extends ConnectorAuthSpec {
16
+ title?: string;
17
+ type: ConnectorAuthType;
18
+ credentialsSchema?: DataSchema;
19
+ customCredentialsSchema?: DataSchema;
20
+ makeApiClient?: ConnectorMethodImplementationBase;
21
+ refreshCredentials?: ConnectorMethodImplementationBase;
22
+ test?: ConnectorMethodImplementationBase;
23
+ enabled?: any;
24
+ }
25
+ interface ConnectorAuthMethodArgs {
26
+ connectorSpec?: ConnectorSpec;
27
+ authOptionKey?: string;
28
+ }
29
+ interface ConnectorAuthMethodType {
30
+ authTypes?: ConnectorAuthType[];
31
+ fileKeys?: string[];
32
+ getInputSchema?: (args: ConnectorAuthMethodArgs) => DataSchema | undefined;
33
+ getOutputSchema?: (args: ConnectorAuthMethodArgs) => DataSchema | undefined;
34
+ supportedImplementationTypes: ConnectorMethodImplementationType[];
35
+ isRequired: boolean;
36
+ }
37
+ export declare const ConnectorAuthMethodTypes: Record<string, ConnectorAuthMethodType>;
38
+ export interface ConnectorAuthOAuth2 extends ConnectorAuthHandlerBase {
39
+ type: 'oauth2';
40
+ getOAuthConfig?: ConnectorMethodImplementation;
41
+ getTokenData?: ConnectorMethodImplementation;
42
+ getCredentialsFromAccessTokenResponse?: ConnectorMethodImplementation;
43
+ getCredentialsFromRefreshTokenResponse?: ConnectorMethodImplementation;
44
+ oAuthConfig?: ConnectorMethodImplementation;
45
+ }
46
+ export interface ConnectorAuthOAuth1 extends ConnectorAuthHandlerBase {
47
+ type: 'oauth1';
48
+ getOAuthConfig?: ConnectorMethodImplementation;
49
+ }
50
+ export interface ConnectorAuthClientCredentials extends ConnectorAuthHandlerBase {
51
+ type: 'client-credentials';
52
+ getCredentialsFromConnectionParameters?: ConnectorMethodImplementationBase;
53
+ }
54
+ export interface ConnectorAuthProxy extends ConnectorAuthHandlerBase {
55
+ type: 'proxy';
56
+ proxyKey: string;
57
+ }
58
+ export interface ConnectorAuthIntegrationAppToken extends ConnectorAuthHandlerBase {
59
+ type: 'integration-app-token';
60
+ }
61
+ export type ConnectorAuth = (ConnectorAuthOAuth2 | ConnectorAuthOAuth1 | ConnectorAuthClientCredentials | ConnectorAuthIntegrationAppToken | ConnectorAuthProxy) & {
62
+ options?: {
63
+ [key: string]: ConnectorAuthOAuth2 | ConnectorAuthOAuth1 | ConnectorAuthClientCredentials | ConnectorAuthIntegrationAppToken | ConnectorAuthProxy;
64
+ };
65
+ };
66
+ export interface ConnectorAuthOAuth2Config {
67
+ clientId: any;
68
+ clientSecret: any;
69
+ authorizeUri: any;
70
+ tokenUri: any;
71
+ scopes?: any;
72
+ clientAuthLocation?: 'body' | 'headers';
73
+ noRefreshToken?: boolean;
74
+ skipPkce?: boolean;
75
+ skipClientAuthInBody?: boolean;
76
+ skipClientAuthInHeaders?: boolean;
77
+ extra?: Record<string, any>;
78
+ }
79
+ export type ConnectorAuthOAuthConfig = ConnectorAuthOAuth2Config;
80
+ export interface ConnectorAuthOAuth1Config {
81
+ consumerKey: any;
82
+ consumerSecret: any;
83
+ requestTokenUri: any;
84
+ authorizeUri: any;
85
+ tokenUri: any;
86
+ extra?: Record<string, any>;
87
+ }
88
+ export declare const OAUTH_CONFIG_SCHEMA: {
89
+ type: string;
90
+ properties: {
91
+ clientId: {
92
+ type: string;
93
+ };
94
+ clientSecret: {
95
+ type: string;
96
+ };
97
+ authorizeUri: {
98
+ type: string;
99
+ description: string;
100
+ };
101
+ tokenUri: {
102
+ type: string;
103
+ description: string;
104
+ };
105
+ scopes: {
106
+ type: string;
107
+ items: {
108
+ type: string;
109
+ };
110
+ };
111
+ clientAuthLocation: {
112
+ type: string;
113
+ enum: string[];
114
+ default: string;
115
+ description: string;
116
+ };
117
+ noRefreshToken: {
118
+ type: string;
119
+ description: string;
120
+ };
121
+ skipPkce: {
122
+ type: string;
123
+ description: string;
124
+ };
125
+ extra: {
126
+ type: string;
127
+ additionalProperties: boolean;
128
+ description: string;
129
+ };
130
+ skipClientAuthInBody: {
131
+ type: string;
132
+ description: string;
133
+ };
134
+ skipClientAuthInHeader: {
135
+ type: string;
136
+ description: string;
137
+ };
138
+ };
139
+ };
140
+ export declare const OAUTH1_CONFIG_SCHEMA: {
141
+ type: string;
142
+ properties: {
143
+ consumerKey: {
144
+ type: string;
145
+ };
146
+ consumerSecret: {
147
+ type: string;
148
+ };
149
+ requestTokenUri: {
150
+ type: string;
151
+ };
152
+ authorizeUri: {
153
+ type: string;
154
+ };
155
+ tokenUri: {
156
+ type: string;
157
+ };
158
+ scopes: {
159
+ type: string;
160
+ items: {
161
+ type: string;
162
+ };
163
+ };
164
+ extra: {
165
+ type: string;
166
+ additionalProperties: boolean;
167
+ description: string;
168
+ };
169
+ };
170
+ };
171
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare const CONNECTOR_DATA_DIR = "data";
2
+ export declare const CONNECTOR_OPERATIONS_DIR = "operations";
3
+ export declare const CONNECTOR_DOCS_DIR = "docs";
4
+ export declare const CONNECTOR_GLOBAL_WEBHOOKS_DIR = "global-webhooks";
5
+ export declare const CONNECTOR_EVENTS_DIR = "events";
@@ -0,0 +1,10 @@
1
+ import { DataLocationMixin } from './types';
2
+ import { DataSchema } from '../../data-schema';
3
+ export interface ConnectorDataLocationBase {
4
+ type: 'collection' | 'directory';
5
+ key: string;
6
+ name: string;
7
+ parametersSchema?: DataSchema;
8
+ extends?: DataLocationMixin[];
9
+ relatedOperationKeys?: string[];
10
+ }
@@ -0,0 +1,14 @@
1
+ import { DataSchema } from '../../../../../data-schema';
2
+ import { ConnectorDataLocationMethod } from '../../../methods';
3
+ import { ConnectorDataCollectionEventMethodType } from '../methods';
4
+ export interface ConnectorEventImplementationFields {
5
+ implementationType: 'connector-event';
6
+ stateSchema?: DataSchema;
7
+ methods: Record<keyof typeof ConnectorEventImplementationType.methods, ConnectorDataLocationMethod>;
8
+ }
9
+ export declare const ConnectorEventImplementationType: {
10
+ methods: {
11
+ getEventConfig: ConnectorDataCollectionEventMethodType<ConnectorEventImplementationFields>;
12
+ extractEvents: ConnectorDataCollectionEventMethodType<ConnectorEventImplementationFields>;
13
+ };
14
+ };
@@ -0,0 +1,14 @@
1
+ import { DataSchema } from '../../../../../data-schema';
2
+ import { ConnectorDataLocationMethod } from '../../../methods';
3
+ import { ConnectorDataCollectionEventMethodType } from '../methods';
4
+ export interface CustomPullEventImplementationFields {
5
+ implementationType: 'custom-pull';
6
+ stateSchema?: DataSchema;
7
+ methods: Record<keyof typeof CustomPullEventImplementationType.methods, ConnectorDataLocationMethod>;
8
+ }
9
+ export declare const CustomPullEventImplementationType: {
10
+ methods: {
11
+ subscribe: ConnectorDataCollectionEventMethodType<CustomPullEventImplementationFields>;
12
+ collectEvents: ConnectorDataCollectionEventMethodType<CustomPullEventImplementationFields>;
13
+ };
14
+ };
@@ -0,0 +1,7 @@
1
+ export interface FullScanEventImplementationFields {
2
+ implementationType: 'full-scan';
3
+ ignoredFields?: string[];
4
+ }
5
+ export declare const FullScanEventImplementationType: {
6
+ methods: {};
7
+ };
@@ -0,0 +1,17 @@
1
+ import { DataRecord } from '../../../../../data-collections';
2
+ import { ConnectorDataLocationMethod } from '../../../methods';
3
+ import { ConnectorDataCollectionEventMethodType } from '../methods';
4
+ export interface PullLatestRecordsEventImplementationFields {
5
+ implementationType: 'pull-latest-records';
6
+ methods: Record<keyof typeof PullLatestRecordsEventImplementationType.methods, ConnectorDataLocationMethod>;
7
+ }
8
+ export interface PullLatestRecordsEventOutput {
9
+ records: DataRecord[];
10
+ cursor?: string;
11
+ logs?: any[];
12
+ }
13
+ export declare const PullLatestRecordsEventImplementationType: {
14
+ methods: {
15
+ pullLatestRecords: ConnectorDataCollectionEventMethodType<PullLatestRecordsEventImplementationFields>;
16
+ };
17
+ };
@@ -0,0 +1,18 @@
1
+ import { DataSchema } from '../../../../../data-schema';
2
+ import { ConnectorDataLocationMethod } from '../../../methods';
3
+ import { ConnectorDataCollectionEventMethodType } from '../methods';
4
+ export interface WebhookEventImplementationFields {
5
+ implementationType: 'webhook';
6
+ querySchema?: DataSchema;
7
+ dataSchema?: DataSchema;
8
+ stateSchema?: DataSchema;
9
+ methods: Record<keyof typeof WebhookEventImplementationType.methods, ConnectorDataLocationMethod>;
10
+ }
11
+ export declare const WebhookEventImplementationType: {
12
+ methods: {
13
+ subscribe: ConnectorDataCollectionEventMethodType<WebhookEventImplementationFields>;
14
+ unsubscribe: ConnectorDataCollectionEventMethodType<WebhookEventImplementationFields>;
15
+ handle: ConnectorDataCollectionEventMethodType<WebhookEventImplementationFields>;
16
+ refresh: ConnectorDataCollectionEventMethodType<WebhookEventImplementationFields>;
17
+ };
18
+ };
@@ -0,0 +1,50 @@
1
+ import { CustomPullEventImplementationFields } from './implementation-types/custom-pull';
2
+ import { FullScanEventImplementationFields } from './implementation-types/full-scan';
3
+ import { PullLatestRecordsEventImplementationFields } from './implementation-types/pull-latest-records';
4
+ import { WebhookEventImplementationFields } from './implementation-types/webhook';
5
+ export { PullLatestRecordsEventOutput } from './implementation-types/pull-latest-records';
6
+ interface BaseConnectorDataCollectionEventImplementationFields {
7
+ implementationType: keyof typeof ConnectorDataCollectionEventImplementationType;
8
+ }
9
+ export type ConnectorDataCollectionEvent<ImplementationFields = BaseConnectorDataCollectionEventImplementationFields> = {
10
+ inheritedFromPath?: string[];
11
+ isIdOnly?: boolean;
12
+ } & ImplementationFields;
13
+ export type ConnectorDataCollectionEventWebhook = ConnectorDataCollectionEvent<WebhookEventImplementationFields>;
14
+ export type ConnectorDataCollectionEventPullLatestRecords = ConnectorDataCollectionEvent<PullLatestRecordsEventImplementationFields>;
15
+ export type ConnectorDataCollectionEventCustomPull = ConnectorDataCollectionEvent<CustomPullEventImplementationFields>;
16
+ export type ConnectorDataCollectionEventFullScan = ConnectorDataCollectionEvent<FullScanEventImplementationFields>;
17
+ export declare const ConnectorDataCollectionEventImplementationType: {
18
+ webhook: {
19
+ methods: {
20
+ subscribe: import("./methods").ConnectorDataCollectionEventMethodType<WebhookEventImplementationFields>;
21
+ unsubscribe: import("./methods").ConnectorDataCollectionEventMethodType<WebhookEventImplementationFields>;
22
+ handle: import("./methods").ConnectorDataCollectionEventMethodType<WebhookEventImplementationFields>;
23
+ refresh: import("./methods").ConnectorDataCollectionEventMethodType<WebhookEventImplementationFields>;
24
+ };
25
+ };
26
+ 'pull-latest-records': {
27
+ methods: {
28
+ pullLatestRecords: import("./methods").ConnectorDataCollectionEventMethodType<PullLatestRecordsEventImplementationFields>;
29
+ };
30
+ };
31
+ 'custom-pull': {
32
+ methods: {
33
+ subscribe: import("./methods").ConnectorDataCollectionEventMethodType<CustomPullEventImplementationFields>;
34
+ collectEvents: import("./methods").ConnectorDataCollectionEventMethodType<CustomPullEventImplementationFields>;
35
+ };
36
+ };
37
+ 'connector-event': {
38
+ methods: {
39
+ getEventConfig: import("./methods").ConnectorDataCollectionEventMethodType<import("./implementation-types/connector-event").ConnectorEventImplementationFields>;
40
+ extractEvents: import("./methods").ConnectorDataCollectionEventMethodType<import("./implementation-types/connector-event").ConnectorEventImplementationFields>;
41
+ };
42
+ };
43
+ 'full-scan': {
44
+ methods: {};
45
+ };
46
+ };
47
+ export type ConnectorDataCollectionEventType = 'created' | 'updated' | 'deleted';
48
+ export type ConnectorDataCollectionEventImplementationTypeKey = keyof typeof ConnectorDataCollectionEventImplementationType;
49
+ export declare function getEventMethodFileKey(eventType: ConnectorDataCollectionEventType, eventImplementationType: ConnectorDataCollectionEventImplementationTypeKey, methodKey: string): string | undefined;
50
+ export declare function getAllEventMethodFilePaths(eventType: ConnectorDataCollectionEventType | 'all', eventImplementationType: ConnectorDataCollectionEventImplementationTypeKey, methodKey: string): (string | null | undefined)[];