@membranehq/sdk 0.3.0 → 0.4.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 (348) hide show
  1. package/README.md +2 -0
  2. package/dist/bundle.d.ts +2067 -1512
  3. package/dist/bundle.js +9400 -19225
  4. package/dist/bundle.js.map +1 -1
  5. package/dist/dts/accessors/action-instances-accessors.d.ts +30 -0
  6. package/dist/dts/accessors/actions-accessors.d.ts +23 -0
  7. package/dist/dts/accessors/app-data-schema-instances-accessors.d.ts +12 -0
  8. package/dist/dts/accessors/app-data-schemas-accessors.d.ts +10 -0
  9. package/dist/dts/accessors/app-event-subscriptions-accessors.d.ts +11 -0
  10. package/dist/dts/accessors/app-event-types-accessors.d.ts +10 -0
  11. package/dist/dts/{accessors.d.ts → accessors/base-accessors.d.ts} +3 -3
  12. package/dist/dts/{connections/accessors.d.ts → accessors/connections-accessors.d.ts} +22 -9
  13. package/dist/dts/accessors/customers-accessors.d.ts +15 -0
  14. package/dist/dts/accessors/data-link-table-instances-accessors.d.ts +14 -0
  15. package/dist/dts/accessors/data-link-tables-accessors.d.ts +10 -0
  16. package/dist/dts/{data-sources/accessors.d.ts → accessors/data-sources-accessors.d.ts} +4 -4
  17. package/dist/dts/{external-events/accessors.d.ts → accessors/external-event-subscriptions-accessors.d.ts} +3 -3
  18. package/dist/dts/accessors/field-mapping-instances-accessors.d.ts +31 -0
  19. package/dist/dts/accessors/field-mappings-accessors.d.ts +25 -0
  20. package/dist/dts/{flows/accessors.d.ts → accessors/flow-instances-accessors.d.ts} +5 -26
  21. package/dist/dts/{flow-runs/accessors.d.ts → accessors/flow-runs-accessors.d.ts} +1 -1
  22. package/dist/dts/accessors/flows-accessors.d.ts +23 -0
  23. package/dist/dts/accessors/index.d.ts +21 -0
  24. package/dist/dts/{integrations/accessors.d.ts → accessors/integrations-accessors.d.ts} +10 -10
  25. package/dist/dts/{scenarios/accessors.d.ts → accessors/scenarios-accessors.d.ts} +2 -2
  26. package/dist/dts/{screens/accessors.d.ts → accessors/screens-accessors.d.ts} +2 -2
  27. package/dist/dts/apps/types.d.ts +2 -0
  28. package/dist/dts/auth/accessors.d.ts +1 -1
  29. package/dist/dts/auth/index.d.ts +1 -1
  30. package/dist/dts/client.d.ts +2 -16
  31. package/dist/dts/data-builder/index.d.ts +19 -9
  32. package/dist/dts/data-filter/index.d.ts +1 -1
  33. package/dist/dts/data-schema/index.d.ts +0 -2
  34. package/dist/dts/data-schema/types.d.ts +1 -1
  35. package/dist/dts/{data-schema/utils.d.ts → data-schema-utils/index.d.ts} +3 -6
  36. package/dist/dts/error-tools/index.d.ts +3 -0
  37. package/dist/dts/errors/index.d.ts +2 -9
  38. package/dist/dts/{data-builder/formulas → formulas}/base.d.ts +2 -2
  39. package/dist/dts/{data-builder/formulas → formulas}/dataSchemaRef.d.ts +1 -1
  40. package/dist/dts/{data-builder/formulas → formulas}/eval.d.ts +1 -1
  41. package/dist/dts/{data-builder/formulas → formulas}/findAppRecordId.d.ts +1 -1
  42. package/dist/dts/{data-builder/formulas → formulas}/findExternalRecordId.d.ts +1 -1
  43. package/dist/dts/formulas/index.d.ts +91 -0
  44. package/dist/dts/{data-builder/formulas → formulas}/record.d.ts +1 -1
  45. package/dist/dts/{data-builder/formulas → formulas}/types.d.ts +1 -0
  46. package/dist/dts/index.d.ts +5 -18
  47. package/dist/dts/integration-elements/index.d.ts +3 -3
  48. package/dist/dts/{data-builder/locators.d.ts → locators/index.d.ts} +3 -3
  49. package/dist/dts/variables.d.ts +1 -1
  50. package/dist/dts/workspace-elements/api/action-instances-api.d.ts +8 -0
  51. package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +10 -0
  52. package/dist/dts/{actions/types.d.ts → workspace-elements/api/actions-api.d.ts} +12 -40
  53. package/dist/dts/{app-data-schemas/api.d.ts → workspace-elements/api/app-data-schema-instances-api.d.ts} +13 -20
  54. package/dist/dts/workspace-elements/api/app-data-schemas-api.d.ts +19 -0
  55. package/dist/dts/workspace-elements/api/app-event-subscriptions-api.d.ts +30 -0
  56. package/dist/dts/workspace-elements/api/app-event-types-api.d.ts +30 -0
  57. package/dist/dts/workspace-elements/api/app-events-api.d.ts +17 -0
  58. package/dist/dts/workspace-elements/api/connections-api.d.ts +49 -0
  59. package/dist/dts/{users/api.d.ts → workspace-elements/api/customers-api.d.ts} +5 -1
  60. package/dist/dts/{data-links/api.d.ts → workspace-elements/api/data-link-table-instances-api.d.ts} +15 -8
  61. package/dist/dts/workspace-elements/api/data-link-tables-api.d.ts +8 -0
  62. package/dist/dts/workspace-elements/api/data-source-instances-api.d.ts +12 -0
  63. package/dist/dts/{data-sources/api.d.ts → workspace-elements/api/data-sources-api.d.ts} +14 -5
  64. package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +19 -0
  65. package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +19 -0
  66. package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +10 -0
  67. package/dist/dts/workspace-elements/api/external-events-api.d.ts +73 -0
  68. package/dist/dts/workspace-elements/api/field-mapping-instances-api.d.ts +41 -0
  69. package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +39 -0
  70. package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +50 -0
  71. package/dist/dts/{flows/api.d.ts → workspace-elements/api/flows-api.d.ts} +21 -5
  72. package/dist/dts/workspace-elements/api/index.d.ts +25 -0
  73. package/dist/dts/{integrations/api.d.ts → workspace-elements/api/integrations-api.d.ts} +10 -3
  74. package/dist/dts/{scenarios/types.d.ts → workspace-elements/api/scenarios-api.d.ts} +24 -46
  75. package/dist/dts/{screens/types.d.ts → workspace-elements/api/screens-api.d.ts} +4 -6
  76. package/dist/dts/workspace-elements/base/action-instances/types.d.ts +30 -0
  77. package/dist/dts/workspace-elements/base/action-run-log-records/types.d.ts +19 -0
  78. package/dist/dts/{actions → workspace-elements/base/actions}/index.d.ts +0 -1
  79. package/dist/dts/workspace-elements/base/actions/types.d.ts +25 -0
  80. package/dist/dts/workspace-elements/base/app-data-schema-instances/types.d.ts +12 -0
  81. package/dist/dts/workspace-elements/base/app-data-schemas/index.d.ts +1 -0
  82. package/dist/dts/workspace-elements/base/app-data-schemas/types.d.ts +7 -0
  83. package/dist/dts/workspace-elements/base/app-event-subscriptions/index.d.ts +1 -0
  84. package/dist/dts/workspace-elements/base/app-event-subscriptions/types.d.ts +15 -0
  85. package/dist/dts/workspace-elements/base/app-event-types/index.d.ts +1 -0
  86. package/dist/dts/workspace-elements/base/app-event-types/types.d.ts +12 -0
  87. package/dist/dts/workspace-elements/base/connections/index.d.ts +1 -0
  88. package/dist/dts/{connections → workspace-elements/base/connections}/types.d.ts +7 -21
  89. package/dist/dts/{connectors → workspace-elements/base/connectors}/auth.d.ts +2 -2
  90. package/dist/dts/workspace-elements/base/connectors/events/index.d.ts +1 -0
  91. package/dist/dts/{connectors → workspace-elements/base/connectors}/events/types.d.ts +1 -1
  92. package/dist/dts/workspace-elements/base/connectors/global-webhooks/index.d.ts +1 -0
  93. package/dist/dts/{connectors → workspace-elements/base/connectors}/graphql-api.d.ts +1 -1
  94. package/dist/dts/{connectors → workspace-elements/base/connectors}/index.d.ts +0 -2
  95. package/dist/dts/{connectors → workspace-elements/base/connectors}/methods.d.ts +1 -1
  96. package/dist/dts/{connectors → workspace-elements/base/connectors}/rest-api.d.ts +1 -1
  97. package/dist/dts/{connectors → workspace-elements/base/connectors}/types.d.ts +2 -2
  98. package/dist/dts/{connectors → workspace-elements/base/connectors}/udm.d.ts +1 -1
  99. package/dist/dts/{users → workspace-elements/base/customers}/index.d.ts +1 -4
  100. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/base.d.ts +2 -2
  101. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/implementation-types/connector-event.d.ts +1 -1
  102. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/implementation-types/custom-pull.d.ts +1 -1
  103. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/implementation-types/pull-latest-records.d.ts +1 -1
  104. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/implementation-types/webhook.d.ts +1 -1
  105. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/methods.d.ts +2 -2
  106. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/index.d.ts +1 -1
  107. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/base.d.ts +4 -4
  108. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/index.d.ts +0 -2
  109. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/methods.d.ts +2 -2
  110. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-records.d.ts +1 -1
  111. package/dist/dts/workspace-elements/base/data-collections/index.d.ts +6 -0
  112. package/dist/dts/{connectors/data-locations → workspace-elements/base/data-collections}/schemas.d.ts +729 -229
  113. package/dist/dts/workspace-elements/base/data-collections/types.d.ts +54 -0
  114. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/base.d.ts +2 -2
  115. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/index.d.ts +2 -2
  116. package/dist/dts/{connectors/data-locations → workspace-elements/base/data-collections}/utils.d.ts +5 -2
  117. package/dist/dts/workspace-elements/base/data-link-table-instances/index.d.ts +1 -0
  118. package/dist/dts/workspace-elements/base/data-link-table-instances/types.d.ts +20 -0
  119. package/dist/dts/workspace-elements/base/data-link-tables/index.d.ts +1 -0
  120. package/dist/dts/workspace-elements/base/data-link-tables/types.d.ts +9 -0
  121. package/dist/dts/workspace-elements/base/data-source-instances/index.d.ts +1 -0
  122. package/dist/dts/workspace-elements/base/data-source-instances/types.d.ts +25 -0
  123. package/dist/dts/{data-sources → workspace-elements/base/data-sources}/index.d.ts +0 -2
  124. package/dist/dts/workspace-elements/base/data-sources/types.d.ts +27 -0
  125. package/dist/dts/workspace-elements/base/external-event-log-records/index.d.ts +1 -0
  126. package/dist/dts/workspace-elements/base/external-event-log-records/types.d.ts +18 -0
  127. package/dist/dts/workspace-elements/base/external-event-pulls/index.d.ts +1 -0
  128. package/dist/dts/workspace-elements/base/external-event-pulls/types.d.ts +21 -0
  129. package/dist/dts/workspace-elements/base/external-event-subscriptions/index.d.ts +1 -0
  130. package/dist/dts/workspace-elements/base/external-event-subscriptions/types.d.ts +42 -0
  131. package/dist/dts/{external-events → workspace-elements/base/external-events}/api.d.ts +2 -2
  132. package/dist/dts/{external-events → workspace-elements/base/external-events}/index.d.ts +1 -4
  133. package/dist/dts/workspace-elements/base/external-events/types.d.ts +17 -0
  134. package/dist/dts/workspace-elements/base/field-mapping-instances/index.d.ts +1 -0
  135. package/dist/dts/workspace-elements/base/field-mapping-instances/types.d.ts +27 -0
  136. package/dist/dts/workspace-elements/base/field-mappings/index.d.ts +2 -0
  137. package/dist/dts/workspace-elements/base/field-mappings/types.d.ts +38 -0
  138. package/dist/dts/workspace-elements/base/flow-instances/index.d.ts +2 -0
  139. package/dist/dts/workspace-elements/base/flow-instances/types.d.ts +37 -0
  140. package/dist/dts/{flow-runs → workspace-elements/base/flow-runs}/flow-node-runs.d.ts +7 -7
  141. package/dist/dts/workspace-elements/base/flow-runs/index.d.ts +2 -0
  142. package/dist/dts/workspace-elements/base/flow-runs/types.d.ts +31 -0
  143. package/dist/dts/workspace-elements/base/flows/index.d.ts +2 -0
  144. package/dist/dts/workspace-elements/base/flows/types.d.ts +33 -0
  145. package/dist/dts/workspace-elements/base/index.d.ts +27 -0
  146. package/dist/dts/workspace-elements/base/integrations/index.d.ts +1 -0
  147. package/dist/dts/{integrations → workspace-elements/base/integrations}/types.d.ts +5 -11
  148. package/dist/dts/workspace-elements/base/scenarios/index.d.ts +1 -0
  149. package/dist/dts/workspace-elements/base/scenarios/types.d.ts +27 -0
  150. package/dist/dts/workspace-elements/base/screens/index.d.ts +1 -0
  151. package/dist/dts/workspace-elements/base/screens/types.d.ts +7 -0
  152. package/dist/dts/workspace-elements/errors.d.ts +5 -0
  153. package/dist/dts/workspace-elements/index.d.ts +4 -0
  154. package/dist/dts/workspace-elements/types.d.ts +30 -4
  155. package/dist/dts/{flows/utils.d.ts → workspace-elements/utils/flow-utils.d.ts} +3 -3
  156. package/dist/dts/workspace-elements/utils/index.d.ts +1 -0
  157. package/dist/dts/workspace-elements-catalog/index.d.ts +3 -8
  158. package/dist/dts/workspaces/types.d.ts +6 -42
  159. package/dist/index.d.ts +4020 -3330
  160. package/dist/index.js +9318 -9278
  161. package/dist/index.js.map +1 -1
  162. package/dist/index.module.d.mts +4020 -3330
  163. package/dist/index.module.mjs +9291 -9270
  164. package/dist/index.module.mjs.map +1 -1
  165. package/package.json +7 -2
  166. package/dist/dts/actions/accessors.d.ts +0 -49
  167. package/dist/dts/app-data-schemas/accessors.d.ts +0 -18
  168. package/dist/dts/app-data-schemas/index.d.ts +0 -23
  169. package/dist/dts/app-events/accessors.d.ts +0 -20
  170. package/dist/dts/app-events/api.d.ts +0 -44
  171. package/dist/dts/app-events/index.d.ts +0 -42
  172. package/dist/dts/connections/api.d.ts +0 -27
  173. package/dist/dts/connections/create-or-update-connection.d.ts +0 -15
  174. package/dist/dts/connections/index.d.ts +0 -3
  175. package/dist/dts/data-builder/formula-processors.d.ts +0 -13
  176. package/dist/dts/data-builder/formula-types.d.ts +0 -4
  177. package/dist/dts/data-builder/formulas/index.d.ts +0 -26
  178. package/dist/dts/data-collections/types.d.ts +0 -24
  179. package/dist/dts/data-links/accessors.d.ts +0 -20
  180. package/dist/dts/data-links/index.d.ts +0 -36
  181. package/dist/dts/data-schema/data-field.d.ts +0 -14
  182. package/dist/dts/data-sources/types.d.ts +0 -63
  183. package/dist/dts/errors/error-doc-enum.d.ts +0 -7
  184. package/dist/dts/external-events/types.d.ts +0 -157
  185. package/dist/dts/field-mappings/accessors.d.ts +0 -54
  186. package/dist/dts/field-mappings/api.d.ts +0 -58
  187. package/dist/dts/field-mappings/index.d.ts +0 -66
  188. package/dist/dts/field-mappings/types.d.ts +0 -12
  189. package/dist/dts/flow-runs/index.d.ts +0 -78
  190. package/dist/dts/flows/index.d.ts +0 -6
  191. package/dist/dts/flows/types.d.ts +0 -76
  192. package/dist/dts/integrations/index.d.ts +0 -3
  193. package/dist/dts/scenarios/index.d.ts +0 -2
  194. package/dist/dts/screens/index.d.ts +0 -2
  195. package/dist/dts/users/accessors.d.ts +0 -10
  196. package/dist/dts/{accessors.test.d.ts → accessors/base-accessors.test.d.ts} +0 -0
  197. package/dist/dts/{connectors/data-locations/utils.test.d.ts → data-builder/data-builder.test.d.ts} +0 -0
  198. package/dist/dts/{data-builder/formulas → data-schema-utils}/index.test.d.ts +0 -0
  199. package/dist/dts/{data-builder/formulas → formulas}/and.d.ts +0 -0
  200. package/dist/dts/{data-builder/formulas → formulas}/and.test.d.ts +0 -0
  201. package/dist/dts/{data-builder/formulas → formulas}/case.d.ts +0 -0
  202. package/dist/dts/{data-builder/formulas → formulas}/case.test.d.ts +0 -0
  203. package/dist/dts/{data-builder/formulas → formulas}/concat.d.ts +0 -0
  204. package/dist/dts/{data-builder/formulas → formulas}/concat.test.d.ts +0 -0
  205. package/dist/dts/{data-builder/formulas → formulas}/copy.d.ts +0 -0
  206. package/dist/dts/{data-builder/formulas → formulas}/copy.test.d.ts +0 -0
  207. package/dist/dts/{data-builder/formulas → formulas}/dataSchemaRef.test.d.ts +0 -0
  208. package/dist/dts/{data-builder/formulas → formulas}/domainFromEmail.d.ts +0 -0
  209. package/dist/dts/{data-builder/formulas → formulas}/domainFromEmail.test.d.ts +0 -0
  210. package/dist/dts/{data-builder/formulas → formulas}/eval.test.d.ts +0 -0
  211. package/dist/dts/{data-builder/formulas → formulas}/extractDate.d.ts +0 -0
  212. package/dist/dts/{data-builder/formulas → formulas}/extractDate.test.d.ts +0 -0
  213. package/dist/dts/{data-builder/formulas → formulas}/extractTime.d.ts +0 -0
  214. package/dist/dts/{data-builder/formulas → formulas}/extractTime.test.d.ts +0 -0
  215. package/dist/dts/{data-builder/formulas → formulas}/findAppRecordId.test.d.ts +0 -0
  216. package/dist/dts/{data-builder/formulas → formulas}/findExternalRecordId.test.d.ts +0 -0
  217. package/dist/dts/{data-builder/formulas → formulas}/first-name.d.ts +0 -0
  218. package/dist/dts/{data-builder/formulas → formulas}/first-name.test.d.ts +0 -0
  219. package/dist/dts/{data-builder/formulas → formulas}/firstNotEmpty.d.ts +0 -0
  220. package/dist/dts/{data-builder/formulas → formulas}/firstNotEmpty.test.d.ts +0 -0
  221. package/dist/dts/{data-builder/formulas → formulas}/formula.d.ts +0 -0
  222. package/dist/dts/{data-builder/formulas → formulas}/formula.test.d.ts +0 -0
  223. package/dist/dts/{data-builder → formulas}/index.test.d.ts +0 -0
  224. package/dist/dts/{data-builder/formulas → formulas}/iterate.d.ts +0 -0
  225. package/dist/dts/{data-builder/formulas → formulas}/iterate.test.d.ts +0 -0
  226. package/dist/dts/{data-builder/formulas → formulas}/jsonata.d.ts +0 -0
  227. package/dist/dts/{data-builder/formulas → formulas}/jsonata.test.d.ts +0 -0
  228. package/dist/dts/{data-builder/formulas → formulas}/last-name.d.ts +0 -0
  229. package/dist/dts/{data-builder/formulas → formulas}/last-name.test.d.ts +0 -0
  230. package/dist/dts/{data-builder/formulas → formulas}/lookup.d.ts +0 -0
  231. package/dist/dts/{data-builder/formulas → formulas}/lookup.test.d.ts +0 -0
  232. package/dist/dts/{data-builder/formulas → formulas}/map.d.ts +0 -0
  233. package/dist/dts/{data-builder/formulas → formulas}/map.test.d.ts +0 -0
  234. package/dist/dts/{data-builder/formulas → formulas}/mergeObjects.d.ts +0 -0
  235. package/dist/dts/{data-builder/formulas → formulas}/mergeObjects.test.d.ts +0 -0
  236. package/dist/dts/{data-builder/formulas → formulas}/or.d.ts +0 -0
  237. package/dist/dts/{data-builder/formulas → formulas}/or.test.d.ts +0 -0
  238. package/dist/dts/{data-builder/formulas → formulas}/plain.d.ts +0 -0
  239. package/dist/dts/{data-builder/formulas → formulas}/plain.test.d.ts +0 -0
  240. package/dist/dts/{data-builder/formulas → formulas}/record.test.d.ts +0 -0
  241. package/dist/dts/{data-builder/formulas → formulas}/tpl.d.ts +0 -0
  242. package/dist/dts/{data-builder/formulas → formulas}/tpl.test.d.ts +0 -0
  243. package/dist/dts/{data-builder/formulas → formulas}/var.d.ts +0 -0
  244. package/dist/dts/{data-builder/formulas → formulas}/var.test.d.ts +0 -0
  245. package/dist/dts/{data-builder → locators}/locators.test.d.ts +0 -0
  246. package/dist/dts/{data-builder/formula-processors.test.d.ts → setupTests.d.ts} +0 -0
  247. package/dist/dts/{connectors/events → workspace-elements/base/action-instances}/index.d.ts +0 -0
  248. package/dist/dts/{connectors/global-webhooks → workspace-elements/base/action-run-log-records}/index.d.ts +0 -0
  249. package/dist/dts/{actions → workspace-elements/base/actions}/action-types.d.ts +0 -0
  250. package/dist/dts/{data-collections → workspace-elements/base/app-data-schema-instances}/index.d.ts +0 -0
  251. package/dist/dts/{connectors → workspace-elements/base/connectors}/constants.d.ts +0 -0
  252. package/dist/dts/{connectors → workspace-elements/base/connectors}/global-webhooks/types.d.ts +0 -0
  253. package/dist/dts/{connectors → workspace-elements/base/connectors}/openapi.d.ts +0 -0
  254. package/dist/dts/{connectors → workspace-elements/base/connectors}/operations/handlers.d.ts +0 -0
  255. package/dist/dts/{connectors → workspace-elements/base/connectors}/operations/index.d.ts +0 -0
  256. package/dist/dts/{connectors → workspace-elements/base/connectors}/operations/types.d.ts +0 -0
  257. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/implementation-types/full-scan.d.ts +0 -0
  258. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/index.d.ts +0 -0
  259. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/create.d.ts +0 -0
  260. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/delete.d.ts +0 -0
  261. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/find-by-id.d.ts +0 -0
  262. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/find.d.ts +0 -0
  263. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/list.d.ts +0 -0
  264. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/match.d.ts +0 -0
  265. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/search.d.ts +0 -0
  266. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/update.d.ts +0 -0
  267. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/activities.d.ts +0 -0
  268. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/activities.test.d.ts +0 -0
  269. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/bills.d.ts +0 -0
  270. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/campaign-members.d.ts +0 -0
  271. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/campaigns.d.ts +0 -0
  272. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/companies.d.ts +0 -0
  273. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/contact-lists.d.ts +0 -0
  274. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/contacts.d.ts +0 -0
  275. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/credit-notes.d.ts +0 -0
  276. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/customers.d.ts +0 -0
  277. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/deal-products.d.ts +0 -0
  278. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/deal-stages.d.ts +0 -0
  279. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/deals.d.ts +0 -0
  280. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/documents.d.ts +0 -0
  281. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/drive-items.d.ts +0 -0
  282. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/drives.d.ts +0 -0
  283. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/eeocs.d.ts +0 -0
  284. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/emails.d.ts +0 -0
  285. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/employees.d.ts +0 -0
  286. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/files.d.ts +0 -0
  287. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/folders.d.ts +0 -0
  288. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/invoices.d.ts +0 -0
  289. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/job-applications.d.ts +0 -0
  290. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/job-candidates.d.ts +0 -0
  291. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/job-interviews.d.ts +0 -0
  292. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/job-offers.d.ts +0 -0
  293. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/jobs.d.ts +0 -0
  294. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/journal-entries.d.ts +0 -0
  295. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/leads.d.ts +0 -0
  296. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/ledger-accounts.d.ts +0 -0
  297. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/meetings.d.ts +0 -0
  298. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/messages.d.ts +0 -0
  299. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/notes.d.ts +0 -0
  300. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/orders.d.ts +0 -0
  301. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/payments.d.ts +0 -0
  302. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/payrolls.d.ts +0 -0
  303. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/products.d.ts +0 -0
  304. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/projects.d.ts +0 -0
  305. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/suppliers.d.ts +0 -0
  306. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/tasks.d.ts +0 -0
  307. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/tax-rates.d.ts +0 -0
  308. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/timeoff-balances.d.ts +0 -0
  309. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/timeoff-requests.d.ts +0 -0
  310. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/users.d.ts +0 -0
  311. package/dist/dts/{data-schema → workspace-elements/base/data-collections}/utils.test.d.ts +0 -0
  312. package/dist/dts/{data-sources → workspace-elements/base/data-sources}/constants.d.ts +0 -0
  313. package/dist/dts/{field-mappings → workspace-elements/base/field-mappings}/merge/is-object.test.d.ts +0 -0
  314. package/dist/dts/{field-mappings → workspace-elements/base/field-mappings}/merge/merge-with-formulas.d.ts +0 -0
  315. package/dist/dts/{field-mappings → workspace-elements/base/field-mappings}/merge/merge-with-formulas.test.d.ts +0 -0
  316. package/dist/dts/{flows → workspace-elements/base/flow-instances}/schemas.d.ts +6 -6
  317. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/api-request-to-external-app.d.ts +0 -0
  318. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/api-request-to-your-app.d.ts +0 -0
  319. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/api-trigger.d.ts +0 -0
  320. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/app-event-trigger.d.ts +0 -0
  321. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/base.d.ts +0 -0
  322. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/connector-event-trigger.d.ts +0 -0
  323. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/create-data-link.d.ts +0 -0
  324. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/create-data-record.d.ts +0 -0
  325. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/custom-http-request.d.ts +0 -0
  326. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/data-record-created-trigger.d.ts +0 -0
  327. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/data-record-deleted-trigger.d.ts +0 -0
  328. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/data-record-updated-trigger.d.ts +0 -0
  329. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/delete-data-link.d.ts +0 -0
  330. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/delete-data-record.d.ts +0 -0
  331. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/filter.d.ts +0 -0
  332. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/find-data-link.d.ts +0 -0
  333. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/find-data-record-by-id.d.ts +0 -0
  334. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/find-data-records.d.ts +0 -0
  335. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/find-or-create-data-record.d.ts +0 -0
  336. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/for-each-v2.d.ts +0 -0
  337. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/for-each.d.ts +0 -0
  338. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/index.d.ts +0 -0
  339. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/integration-specific-operation.d.ts +0 -0
  340. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/list-data-records.d.ts +0 -0
  341. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/lookup-data-record.d.ts +0 -0
  342. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/run-action.d.ts +0 -0
  343. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/run-javascript.d.ts +0 -0
  344. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/schedule-trigger.d.ts +0 -0
  345. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/search-data-records.d.ts +0 -0
  346. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/transform-data.d.ts +0 -0
  347. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/update-data-record.d.ts +0 -0
  348. /package/dist/dts/{flows/utils.test.d.ts → workspace-elements/utils/flow-utils.test.d.ts} +0 -0
package/dist/bundle.d.ts CHANGED
@@ -102,13 +102,38 @@ declare enum WorkspaceElementDependencyType {
102
102
  Configuration = "CONFIGURATION",
103
103
  Parent = "PARENT"
104
104
  }
105
- interface WorkspaceElement {
105
+ declare const BaseWorkspaceElement: z.ZodObject<{
106
+ id: z.ZodString;
107
+ name: z.ZodString;
108
+ }, "strip", z.ZodTypeAny, {
109
+ id: string;
110
+ name: string;
111
+ }, {
112
+ id: string;
113
+ name: string;
114
+ }>;
115
+ type BaseWorkspaceElement = z.infer<typeof BaseWorkspaceElement>;
116
+ declare const BaseMembraneInterface: z.ZodObject<{
117
+ id: z.ZodString;
118
+ name: z.ZodString;
119
+ } & {
120
+ key: z.ZodString;
121
+ state: z.ZodOptional<z.ZodNativeEnum<typeof WorkspaceElementState>>;
122
+ errors: z.ZodOptional<z.ZodArray<any, "many">>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ key: string;
106
125
  id: string;
107
126
  name: string;
127
+ state?: WorkspaceElementState | undefined;
128
+ errors?: any[] | undefined;
129
+ }, {
108
130
  key: string;
109
- state?: WorkspaceElementState;
110
- errors?: ErrorData[];
111
- }
131
+ id: string;
132
+ name: string;
133
+ state?: WorkspaceElementState | undefined;
134
+ errors?: any[] | undefined;
135
+ }>;
136
+ type BaseMembraneInterface = z.infer<typeof BaseMembraneInterface>;
112
137
  interface WorkspaceElementReference {
113
138
  type: WorkspaceElementType;
114
139
  id: string;
@@ -200,80 +225,28 @@ declare class ElementInstanceAccessor<ElementInstance extends BaseElementInstanc
200
225
  private getSelector;
201
226
  }
202
227
 
203
- interface FindConnectionsQuery extends PaginationQuery {
204
- userId?: string;
205
- isTest?: boolean;
206
- integrationKey?: string;
207
- integrationId?: string;
208
- includeArchived?: boolean;
209
- }
210
- declare class CreateConnectionRequest {
211
- name: string;
212
- integrationId: string;
213
- credentials?: string;
214
- }
215
- declare class UpdateConnectionRequest {
216
- name?: string;
217
- credentials?: string;
218
- accessToken?: string;
219
- }
220
- interface ConnectionSelector {
221
- id?: string;
222
- integrationKey?: string;
223
- integrationId?: string;
224
- connectionId?: string;
225
- }
226
-
227
- interface DataRecord {
228
- id: string;
229
- name?: string;
230
- uri?: string;
231
- iconUri?: string;
232
- fields?: Record<string, any>;
233
- udm?: string;
234
- unifiedFields?: Record<string, any>;
235
- rawFields?: Record<string, any>;
236
- createdTime?: string;
237
- updatedTime?: string;
238
- deletedTime?: string;
239
- createdById?: string;
240
- updatedById?: string;
228
+ declare class IntegrationLevelElementAccessor<Element, UpdateElementData> {
229
+ protected client: IntegrationAppApiClient;
230
+ protected integrationSelector: string;
231
+ protected elementSelector: string;
232
+ protected elementKey: string;
233
+ protected endpoint: string;
234
+ constructor(client: IntegrationAppApiClient, integrationSelector: string, elementSelector: string, elementKey: string);
235
+ getUniqueIdentifier(): string;
236
+ get(): Promise<Element>;
237
+ patch(data: Partial<UpdateElementData>): Promise<Element>;
238
+ put(data: UpdateElementData): Promise<Element>;
239
+ archive(): Promise<void>;
240
+ reset(): Promise<Element>;
241
241
  }
242
-
243
- interface DataSchema {
244
- title?: string;
245
- description?: string;
246
- type?: string | string[];
247
- format?: string;
248
- properties?: {
249
- [key: string]: DataSchema;
250
- };
251
- items?: DataSchema;
252
- additionalProperties?: boolean | DataSchema;
253
- enum?: string[];
254
- referenceRecords?: DataRecord[];
255
- referenceCollection?: {
256
- key: any;
257
- parameters?: Record<string, any>;
258
- };
259
- referenceUdm?: string;
260
- default?: any;
261
- allowCustom?: boolean;
262
- $ref?: string;
263
- required?: string[];
264
- minLength?: number;
265
- maxLength?: number;
266
- minimum?: number;
267
- maximum?: number;
268
- maxItems?: number;
269
- readOnly?: boolean;
270
- writeOnly?: boolean;
271
- examples?: any[];
272
- anyOf?: DataSchema[];
273
- isImplied?: boolean;
274
- isSensitive?: boolean;
275
- referenceCollectionPath?: string;
276
- referenceCollectionUri?: string;
242
+ declare class IntegrationLevelElementsListAccessor<Element, Query, CreateElementData> {
243
+ protected client: IntegrationAppApiClient;
244
+ protected integrationSelector: string;
245
+ protected elementKey: string;
246
+ protected endpoint: string;
247
+ constructor(client: IntegrationAppApiClient, integrationSelector: string, elementKey: string);
248
+ list(query?: Query): Promise<PaginationResponse<Element>>;
249
+ create(data: CreateElementData): Promise<Element>;
277
250
  }
278
251
 
279
252
  declare enum HttpRequestMethod {
@@ -348,45 +321,50 @@ interface RestApiMapping {
348
321
  responseMapping?: any;
349
322
  }
350
323
 
351
- declare enum ConnectorMethodImplementationType {
352
- mapping = "mapping",
353
- operationMapping = "operation-mapping",
354
- restApiMapping = "rest-api-mapping",
355
- graphqlApiMapping = "graphql-api-mapping",
356
- javascript = "javascript",
357
- notSupported = "not-supported"
358
- }
359
- type ConnectorMethodImplementation = ConnectorMethodImplementationBase | ConnectorMethodImplementationMapping | ConnectorMethodImplementationOperationMapping | ConnectorMethodImplementationRestApiMapping | ConnectorMethodImplementationGraphqlApiMapping | ConnectorMethodImplementationJavascript | ConnectorMethodImplementationNotSupported;
360
- interface ConnectorMethodImplementationBase {
361
- implementationType?: ConnectorMethodImplementationType;
362
- filePath?: string;
363
- inheritedFromPath?: string[];
364
- isIncomplete?: boolean;
365
- parametersSchema?: DataSchema;
366
- }
367
- interface ConnectorMethodImplementationMapping extends ConnectorMethodImplementationBase {
368
- implementationType: ConnectorMethodImplementationType.mapping;
369
- mapping: any;
370
- }
371
- interface ConnectorMethodImplementationOperationMapping extends ConnectorMethodImplementationBase {
372
- implementationType: ConnectorMethodImplementationType.operationMapping;
373
- mapping: OperationMapping;
374
- }
375
- interface ConnectorMethodImplementationRestApiMapping extends ConnectorMethodImplementationBase {
376
- implementationType: ConnectorMethodImplementationType.restApiMapping;
377
- mapping: RestApiMapping;
378
- }
379
- interface ConnectorMethodImplementationGraphqlApiMapping extends ConnectorMethodImplementationBase {
380
- implementationType: ConnectorMethodImplementationType.graphqlApiMapping;
381
- mapping: GraphQLApiMapping;
382
- }
383
- interface ConnectorMethodImplementationJavascript extends ConnectorMethodImplementationBase {
384
- implementationType: ConnectorMethodImplementationType.javascript;
385
- code: string;
386
- }
387
- interface ConnectorMethodImplementationNotSupported extends ConnectorMethodImplementationBase {
388
- implementationType: ConnectorMethodImplementationType.notSupported;
389
- }
324
+ declare const DataRecordSchema: z.ZodObject<{
325
+ id: z.ZodString;
326
+ name: z.ZodOptional<z.ZodString>;
327
+ uri: z.ZodOptional<z.ZodString>;
328
+ iconUri: z.ZodOptional<z.ZodString>;
329
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
330
+ udm: z.ZodOptional<z.ZodString>;
331
+ unifiedFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
332
+ rawFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
333
+ createdTime: z.ZodOptional<z.ZodString>;
334
+ updatedTime: z.ZodOptional<z.ZodString>;
335
+ deletedTime: z.ZodOptional<z.ZodString>;
336
+ createdById: z.ZodOptional<z.ZodString>;
337
+ updatedById: z.ZodOptional<z.ZodString>;
338
+ }, "strip", z.ZodTypeAny, {
339
+ id: string;
340
+ name?: string | undefined;
341
+ uri?: string | undefined;
342
+ iconUri?: string | undefined;
343
+ fields?: Record<string, any> | undefined;
344
+ udm?: string | undefined;
345
+ unifiedFields?: Record<string, any> | undefined;
346
+ rawFields?: Record<string, any> | undefined;
347
+ createdTime?: string | undefined;
348
+ updatedTime?: string | undefined;
349
+ deletedTime?: string | undefined;
350
+ createdById?: string | undefined;
351
+ updatedById?: string | undefined;
352
+ }, {
353
+ id: string;
354
+ name?: string | undefined;
355
+ uri?: string | undefined;
356
+ iconUri?: string | undefined;
357
+ fields?: Record<string, any> | undefined;
358
+ udm?: string | undefined;
359
+ unifiedFields?: Record<string, any> | undefined;
360
+ rawFields?: Record<string, any> | undefined;
361
+ createdTime?: string | undefined;
362
+ updatedTime?: string | undefined;
363
+ deletedTime?: string | undefined;
364
+ createdById?: string | undefined;
365
+ updatedById?: string | undefined;
366
+ }>;
367
+ type DataRecord = z.infer<typeof DataRecordSchema>;
390
368
 
391
369
  declare const DataCollectionSpecSchema: z.ZodObject<{
392
370
  type: z.ZodLiteral<"collection">;
@@ -399,24 +377,24 @@ declare const DataCollectionSpecSchema: z.ZodObject<{
399
377
  path: z.ZodUnknown;
400
378
  method: z.ZodUnknown;
401
379
  }, "strip", z.ZodTypeAny, {
402
- path?: unknown;
403
380
  method?: unknown;
404
- }, {
405
381
  path?: unknown;
382
+ }, {
406
383
  method?: unknown;
384
+ path?: unknown;
407
385
  }>, "many">>;
408
386
  } & {
409
387
  filterFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
410
388
  }, "strip", z.ZodTypeAny, {
411
389
  apiRequests?: {
412
- path?: unknown;
413
390
  method?: unknown;
391
+ path?: unknown;
414
392
  }[] | undefined;
415
393
  filterFields?: string[] | undefined;
416
394
  }, {
417
395
  apiRequests?: {
418
- path?: unknown;
419
396
  method?: unknown;
397
+ path?: unknown;
420
398
  }[] | undefined;
421
399
  filterFields?: string[] | undefined;
422
400
  }>>;
@@ -425,21 +403,21 @@ declare const DataCollectionSpecSchema: z.ZodObject<{
425
403
  path: z.ZodUnknown;
426
404
  method: z.ZodUnknown;
427
405
  }, "strip", z.ZodTypeAny, {
428
- path?: unknown;
429
406
  method?: unknown;
430
- }, {
431
407
  path?: unknown;
408
+ }, {
432
409
  method?: unknown;
410
+ path?: unknown;
433
411
  }>, "many">>;
434
412
  }, "strip", z.ZodTypeAny, {
435
413
  apiRequests?: {
436
- path?: unknown;
437
414
  method?: unknown;
415
+ path?: unknown;
438
416
  }[] | undefined;
439
417
  }, {
440
418
  apiRequests?: {
441
- path?: unknown;
442
419
  method?: unknown;
420
+ path?: unknown;
443
421
  }[] | undefined;
444
422
  }>>;
445
423
  match: z.ZodOptional<z.ZodObject<{
@@ -447,47 +425,47 @@ declare const DataCollectionSpecSchema: z.ZodObject<{
447
425
  path: z.ZodUnknown;
448
426
  method: z.ZodUnknown;
449
427
  }, "strip", z.ZodTypeAny, {
450
- path?: unknown;
451
428
  method?: unknown;
452
- }, {
453
429
  path?: unknown;
430
+ }, {
454
431
  method?: unknown;
432
+ path?: unknown;
455
433
  }>, "many">>;
456
434
  } & {
457
435
  fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
458
436
  }, "strip", z.ZodTypeAny, {
437
+ fields?: string[] | undefined;
459
438
  apiRequests?: {
460
- path?: unknown;
461
439
  method?: unknown;
440
+ path?: unknown;
462
441
  }[] | undefined;
463
- fields?: string[] | undefined;
464
442
  }, {
443
+ fields?: string[] | undefined;
465
444
  apiRequests?: {
466
- path?: unknown;
467
445
  method?: unknown;
446
+ path?: unknown;
468
447
  }[] | undefined;
469
- fields?: string[] | undefined;
470
448
  }>>;
471
449
  findById: z.ZodOptional<z.ZodObject<{
472
450
  apiRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
473
451
  path: z.ZodUnknown;
474
452
  method: z.ZodUnknown;
475
453
  }, "strip", z.ZodTypeAny, {
476
- path?: unknown;
477
454
  method?: unknown;
478
- }, {
479
455
  path?: unknown;
456
+ }, {
480
457
  method?: unknown;
458
+ path?: unknown;
481
459
  }>, "many">>;
482
460
  }, "strip", z.ZodTypeAny, {
483
461
  apiRequests?: {
484
- path?: unknown;
485
462
  method?: unknown;
463
+ path?: unknown;
486
464
  }[] | undefined;
487
465
  }, {
488
466
  apiRequests?: {
489
- path?: unknown;
490
467
  method?: unknown;
468
+ path?: unknown;
491
469
  }[] | undefined;
492
470
  }>>;
493
471
  create: z.ZodOptional<z.ZodObject<{
@@ -495,30 +473,30 @@ declare const DataCollectionSpecSchema: z.ZodObject<{
495
473
  path: z.ZodUnknown;
496
474
  method: z.ZodUnknown;
497
475
  }, "strip", z.ZodTypeAny, {
498
- path?: unknown;
499
476
  method?: unknown;
500
- }, {
501
477
  path?: unknown;
478
+ }, {
502
479
  method?: unknown;
480
+ path?: unknown;
503
481
  }>, "many">>;
504
482
  } & {
505
483
  fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
506
484
  requiredFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
507
485
  excludedFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
508
486
  }, "strip", z.ZodTypeAny, {
487
+ fields?: string[] | undefined;
509
488
  apiRequests?: {
510
- path?: unknown;
511
489
  method?: unknown;
490
+ path?: unknown;
512
491
  }[] | undefined;
513
- fields?: string[] | undefined;
514
492
  requiredFields?: string[] | undefined;
515
493
  excludedFields?: string[] | undefined;
516
494
  }, {
495
+ fields?: string[] | undefined;
517
496
  apiRequests?: {
518
- path?: unknown;
519
497
  method?: unknown;
498
+ path?: unknown;
520
499
  }[] | undefined;
521
- fields?: string[] | undefined;
522
500
  requiredFields?: string[] | undefined;
523
501
  excludedFields?: string[] | undefined;
524
502
  }>>;
@@ -527,28 +505,28 @@ declare const DataCollectionSpecSchema: z.ZodObject<{
527
505
  path: z.ZodUnknown;
528
506
  method: z.ZodUnknown;
529
507
  }, "strip", z.ZodTypeAny, {
530
- path?: unknown;
531
508
  method?: unknown;
532
- }, {
533
509
  path?: unknown;
510
+ }, {
534
511
  method?: unknown;
512
+ path?: unknown;
535
513
  }>, "many">>;
536
514
  } & {
537
515
  fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
538
516
  excludedFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
539
517
  }, "strip", z.ZodTypeAny, {
518
+ fields?: string[] | undefined;
540
519
  apiRequests?: {
541
- path?: unknown;
542
520
  method?: unknown;
521
+ path?: unknown;
543
522
  }[] | undefined;
544
- fields?: string[] | undefined;
545
523
  excludedFields?: string[] | undefined;
546
524
  }, {
525
+ fields?: string[] | undefined;
547
526
  apiRequests?: {
548
- path?: unknown;
549
527
  method?: unknown;
528
+ path?: unknown;
550
529
  }[] | undefined;
551
- fields?: string[] | undefined;
552
530
  excludedFields?: string[] | undefined;
553
531
  }>>;
554
532
  delete: z.ZodOptional<z.ZodObject<{
@@ -556,21 +534,21 @@ declare const DataCollectionSpecSchema: z.ZodObject<{
556
534
  path: z.ZodUnknown;
557
535
  method: z.ZodUnknown;
558
536
  }, "strip", z.ZodTypeAny, {
559
- path?: unknown;
560
537
  method?: unknown;
561
- }, {
562
538
  path?: unknown;
539
+ }, {
563
540
  method?: unknown;
541
+ path?: unknown;
564
542
  }>, "many">>;
565
543
  }, "strip", z.ZodTypeAny, {
566
544
  apiRequests?: {
567
- path?: unknown;
568
545
  method?: unknown;
546
+ path?: unknown;
569
547
  }[] | undefined;
570
548
  }, {
571
549
  apiRequests?: {
572
- path?: unknown;
573
550
  method?: unknown;
551
+ path?: unknown;
574
552
  }[] | undefined;
575
553
  }>>;
576
554
  events: z.ZodOptional<z.ZodObject<{
@@ -788,24 +766,24 @@ declare const DataCollectionSpecSchema: z.ZodObject<{
788
766
  path: z.ZodUnknown;
789
767
  method: z.ZodUnknown;
790
768
  }, "strip", z.ZodTypeAny, {
791
- path?: unknown;
792
769
  method?: unknown;
793
- }, {
794
770
  path?: unknown;
771
+ }, {
795
772
  method?: unknown;
773
+ path?: unknown;
796
774
  }>, "many">>;
797
775
  } & {
798
776
  queryFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
799
777
  }, "strip", z.ZodTypeAny, {
800
778
  apiRequests?: {
801
- path?: unknown;
802
779
  method?: unknown;
780
+ path?: unknown;
803
781
  }[] | undefined;
804
782
  queryFields?: string[] | undefined;
805
783
  }, {
806
784
  apiRequests?: {
807
- path?: unknown;
808
785
  method?: unknown;
786
+ path?: unknown;
809
787
  }[] | undefined;
810
788
  queryFields?: string[] | undefined;
811
789
  }>>;
@@ -813,64 +791,44 @@ declare const DataCollectionSpecSchema: z.ZodObject<{
813
791
  type: "collection";
814
792
  name: string;
815
793
  key?: string | undefined;
816
- find?: {
794
+ match?: {
795
+ fields?: string[] | undefined;
817
796
  apiRequests?: {
818
- path?: unknown;
819
797
  method?: unknown;
798
+ path?: unknown;
820
799
  }[] | undefined;
821
- queryFields?: string[] | undefined;
822
800
  } | undefined;
823
- match?: {
801
+ search?: {
824
802
  apiRequests?: {
825
- path?: unknown;
826
803
  method?: unknown;
804
+ path?: unknown;
827
805
  }[] | undefined;
828
- fields?: string[] | undefined;
829
806
  } | undefined;
830
- search?: {
807
+ find?: {
831
808
  apiRequests?: {
832
- path?: unknown;
833
809
  method?: unknown;
810
+ path?: unknown;
834
811
  }[] | undefined;
812
+ queryFields?: string[] | undefined;
835
813
  } | undefined;
836
814
  delete?: {
837
815
  apiRequests?: {
838
- path?: unknown;
839
816
  method?: unknown;
817
+ path?: unknown;
840
818
  }[] | undefined;
841
819
  } | undefined;
842
- parametersSchema?: any;
843
- fieldsSchema?: any;
844
820
  list?: {
845
821
  apiRequests?: {
846
- path?: unknown;
847
822
  method?: unknown;
848
- }[] | undefined;
849
- filterFields?: string[] | undefined;
850
- } | undefined;
851
- findById?: {
852
- apiRequests?: {
853
823
  path?: unknown;
854
- method?: unknown;
855
824
  }[] | undefined;
825
+ filterFields?: string[] | undefined;
856
826
  } | undefined;
857
- create?: {
858
- apiRequests?: {
859
- path?: unknown;
860
- method?: unknown;
861
- }[] | undefined;
862
- fields?: string[] | undefined;
863
- requiredFields?: string[] | undefined;
864
- excludedFields?: string[] | undefined;
865
- } | undefined;
866
- update?: {
867
- apiRequests?: {
868
- path?: unknown;
869
- method?: unknown;
870
- }[] | undefined;
827
+ udm?: Record<string, {
871
828
  fields?: string[] | undefined;
872
- excludedFields?: string[] | undefined;
873
- } | undefined;
829
+ extract?: Record<string, any> | undefined;
830
+ parse?: Record<string, any> | undefined;
831
+ }> | undefined;
874
832
  events?: z.objectOutputType<{
875
833
  created: z.ZodOptional<z.ZodObject<{
876
834
  type: z.ZodEnum<["push", "pull"]>;
@@ -937,74 +895,74 @@ declare const DataCollectionSpecSchema: z.ZodObject<{
937
895
  isFullScan?: boolean | undefined;
938
896
  isIdOnly?: boolean | undefined;
939
897
  }>, "strip"> | undefined;
940
- customFields?: boolean | undefined;
941
- udm?: Record<string, {
942
- fields?: string[] | undefined;
943
- extract?: Record<string, any> | undefined;
944
- parse?: Record<string, any> | undefined;
945
- }> | undefined;
946
- }, {
947
- type: "collection";
948
- name: string;
949
- key?: string | undefined;
950
- find?: {
898
+ parametersSchema?: any;
899
+ fieldsSchema?: any;
900
+ findById?: {
951
901
  apiRequests?: {
952
- path?: unknown;
953
902
  method?: unknown;
903
+ path?: unknown;
954
904
  }[] | undefined;
955
- queryFields?: string[] | undefined;
956
905
  } | undefined;
957
- match?: {
906
+ create?: {
907
+ fields?: string[] | undefined;
958
908
  apiRequests?: {
959
- path?: unknown;
960
909
  method?: unknown;
910
+ path?: unknown;
961
911
  }[] | undefined;
962
- fields?: string[] | undefined;
912
+ requiredFields?: string[] | undefined;
913
+ excludedFields?: string[] | undefined;
963
914
  } | undefined;
964
- search?: {
915
+ update?: {
916
+ fields?: string[] | undefined;
965
917
  apiRequests?: {
966
- path?: unknown;
967
918
  method?: unknown;
919
+ path?: unknown;
968
920
  }[] | undefined;
921
+ excludedFields?: string[] | undefined;
969
922
  } | undefined;
970
- delete?: {
923
+ customFields?: boolean | undefined;
924
+ }, {
925
+ type: "collection";
926
+ name: string;
927
+ key?: string | undefined;
928
+ match?: {
929
+ fields?: string[] | undefined;
971
930
  apiRequests?: {
972
- path?: unknown;
973
931
  method?: unknown;
932
+ path?: unknown;
974
933
  }[] | undefined;
975
934
  } | undefined;
976
- parametersSchema?: any;
977
- fieldsSchema?: any;
978
- list?: {
935
+ search?: {
979
936
  apiRequests?: {
980
- path?: unknown;
981
937
  method?: unknown;
938
+ path?: unknown;
982
939
  }[] | undefined;
983
- filterFields?: string[] | undefined;
984
940
  } | undefined;
985
- findById?: {
941
+ find?: {
986
942
  apiRequests?: {
987
- path?: unknown;
988
943
  method?: unknown;
944
+ path?: unknown;
989
945
  }[] | undefined;
946
+ queryFields?: string[] | undefined;
990
947
  } | undefined;
991
- create?: {
948
+ delete?: {
992
949
  apiRequests?: {
993
- path?: unknown;
994
950
  method?: unknown;
951
+ path?: unknown;
995
952
  }[] | undefined;
996
- fields?: string[] | undefined;
997
- requiredFields?: string[] | undefined;
998
- excludedFields?: string[] | undefined;
999
953
  } | undefined;
1000
- update?: {
954
+ list?: {
1001
955
  apiRequests?: {
1002
- path?: unknown;
1003
956
  method?: unknown;
957
+ path?: unknown;
1004
958
  }[] | undefined;
1005
- fields?: string[] | undefined;
1006
- excludedFields?: string[] | undefined;
959
+ filterFields?: string[] | undefined;
1007
960
  } | undefined;
961
+ udm?: Record<string, {
962
+ fields?: string[] | undefined;
963
+ extract?: Record<string, any> | undefined;
964
+ parse?: Record<string, any> | undefined;
965
+ }> | undefined;
1008
966
  events?: z.objectInputType<{
1009
967
  created: z.ZodOptional<z.ZodObject<{
1010
968
  type: z.ZodEnum<["push", "pull"]>;
@@ -1071,12 +1029,32 @@ declare const DataCollectionSpecSchema: z.ZodObject<{
1071
1029
  isFullScan?: boolean | undefined;
1072
1030
  isIdOnly?: boolean | undefined;
1073
1031
  }>, "strip"> | undefined;
1074
- customFields?: boolean | undefined;
1075
- udm?: Record<string, {
1032
+ parametersSchema?: any;
1033
+ fieldsSchema?: any;
1034
+ findById?: {
1035
+ apiRequests?: {
1036
+ method?: unknown;
1037
+ path?: unknown;
1038
+ }[] | undefined;
1039
+ } | undefined;
1040
+ create?: {
1076
1041
  fields?: string[] | undefined;
1077
- extract?: Record<string, any> | undefined;
1078
- parse?: Record<string, any> | undefined;
1079
- }> | undefined;
1042
+ apiRequests?: {
1043
+ method?: unknown;
1044
+ path?: unknown;
1045
+ }[] | undefined;
1046
+ requiredFields?: string[] | undefined;
1047
+ excludedFields?: string[] | undefined;
1048
+ } | undefined;
1049
+ update?: {
1050
+ fields?: string[] | undefined;
1051
+ apiRequests?: {
1052
+ method?: unknown;
1053
+ path?: unknown;
1054
+ }[] | undefined;
1055
+ excludedFields?: string[] | undefined;
1056
+ } | undefined;
1057
+ customFields?: boolean | undefined;
1080
1058
  }>;
1081
1059
  type DataCollectionSpec = z.infer<typeof DataCollectionSpecSchema>;
1082
1060
  interface DataLocationPointer {
@@ -1089,70 +1067,551 @@ interface DataCollectionListItem {
1089
1067
  type: 'collection';
1090
1068
  isHidden?: boolean;
1091
1069
  }
1092
- interface DataCollectionMethodRequest {
1093
- parameters?: Record<string, any>;
1094
- }
1095
- interface DataCollectionFindRequest {
1070
+ declare const DataCollectionFindRequestSchema: z.ZodObject<{
1071
+ query: z.ZodOptional<z.ZodAny>;
1072
+ cursor: z.ZodOptional<z.ZodString>;
1073
+ }, "strip", z.ZodTypeAny, {
1074
+ cursor?: string | undefined;
1096
1075
  query?: any;
1097
- cursor?: string;
1098
- }
1099
- interface DataCollectionFindResponse {
1100
- records: DataRecord[];
1101
- cursor?: string;
1102
- }
1103
- interface DataCollectionListRequest extends DataCollectionMethodRequest {
1076
+ }, {
1077
+ cursor?: string | undefined;
1078
+ query?: any;
1079
+ }>;
1080
+ declare const DataCollectionFindResponseSchema: z.ZodObject<{
1081
+ records: z.ZodArray<z.ZodObject<{
1082
+ id: z.ZodString;
1083
+ name: z.ZodOptional<z.ZodString>;
1084
+ uri: z.ZodOptional<z.ZodString>;
1085
+ iconUri: z.ZodOptional<z.ZodString>;
1086
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1087
+ udm: z.ZodOptional<z.ZodString>;
1088
+ unifiedFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1089
+ rawFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1090
+ createdTime: z.ZodOptional<z.ZodString>;
1091
+ updatedTime: z.ZodOptional<z.ZodString>;
1092
+ deletedTime: z.ZodOptional<z.ZodString>;
1093
+ createdById: z.ZodOptional<z.ZodString>;
1094
+ updatedById: z.ZodOptional<z.ZodString>;
1095
+ }, "strip", z.ZodTypeAny, {
1096
+ id: string;
1097
+ name?: string | undefined;
1098
+ uri?: string | undefined;
1099
+ iconUri?: string | undefined;
1100
+ fields?: Record<string, any> | undefined;
1101
+ udm?: string | undefined;
1102
+ unifiedFields?: Record<string, any> | undefined;
1103
+ rawFields?: Record<string, any> | undefined;
1104
+ createdTime?: string | undefined;
1105
+ updatedTime?: string | undefined;
1106
+ deletedTime?: string | undefined;
1107
+ createdById?: string | undefined;
1108
+ updatedById?: string | undefined;
1109
+ }, {
1110
+ id: string;
1111
+ name?: string | undefined;
1112
+ uri?: string | undefined;
1113
+ iconUri?: string | undefined;
1114
+ fields?: Record<string, any> | undefined;
1115
+ udm?: string | undefined;
1116
+ unifiedFields?: Record<string, any> | undefined;
1117
+ rawFields?: Record<string, any> | undefined;
1118
+ createdTime?: string | undefined;
1119
+ updatedTime?: string | undefined;
1120
+ deletedTime?: string | undefined;
1121
+ createdById?: string | undefined;
1122
+ updatedById?: string | undefined;
1123
+ }>, "many">;
1124
+ cursor: z.ZodOptional<z.ZodString>;
1125
+ }, "strip", z.ZodTypeAny, {
1126
+ records: {
1127
+ id: string;
1128
+ name?: string | undefined;
1129
+ uri?: string | undefined;
1130
+ iconUri?: string | undefined;
1131
+ fields?: Record<string, any> | undefined;
1132
+ udm?: string | undefined;
1133
+ unifiedFields?: Record<string, any> | undefined;
1134
+ rawFields?: Record<string, any> | undefined;
1135
+ createdTime?: string | undefined;
1136
+ updatedTime?: string | undefined;
1137
+ deletedTime?: string | undefined;
1138
+ createdById?: string | undefined;
1139
+ updatedById?: string | undefined;
1140
+ }[];
1141
+ cursor?: string | undefined;
1142
+ }, {
1143
+ records: {
1144
+ id: string;
1145
+ name?: string | undefined;
1146
+ uri?: string | undefined;
1147
+ iconUri?: string | undefined;
1148
+ fields?: Record<string, any> | undefined;
1149
+ udm?: string | undefined;
1150
+ unifiedFields?: Record<string, any> | undefined;
1151
+ rawFields?: Record<string, any> | undefined;
1152
+ createdTime?: string | undefined;
1153
+ updatedTime?: string | undefined;
1154
+ deletedTime?: string | undefined;
1155
+ createdById?: string | undefined;
1156
+ updatedById?: string | undefined;
1157
+ }[];
1158
+ cursor?: string | undefined;
1159
+ }>;
1160
+ declare const DataCollectionListRequestSchema: z.ZodObject<{
1161
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1162
+ } & {
1163
+ filter: z.ZodOptional<z.ZodAny>;
1164
+ unifiedFilter: z.ZodOptional<z.ZodAny>;
1165
+ cursor: z.ZodOptional<z.ZodString>;
1166
+ }, "strip", z.ZodTypeAny, {
1104
1167
  filter?: any;
1168
+ cursor?: string | undefined;
1169
+ parameters?: Record<string, any> | undefined;
1105
1170
  unifiedFilter?: any;
1106
- cursor?: string;
1107
- }
1108
- interface DataCollectionListResponseDrilldown {
1109
- parameters?: Record<string, any>;
1110
- filter?: Record<string, any>;
1111
- }
1112
- interface DataCollectionListResponse {
1113
- records: DataRecord[];
1114
- drilldowns?: Array<DataCollectionListResponseDrilldown>;
1115
- cursor?: string;
1116
- }
1117
- interface DataCollectionSearchRequest extends DataCollectionMethodRequest {
1171
+ }, {
1172
+ filter?: any;
1173
+ cursor?: string | undefined;
1174
+ parameters?: Record<string, any> | undefined;
1175
+ unifiedFilter?: any;
1176
+ }>;
1177
+ declare const DataCollectionListResponseSchema: z.ZodObject<{
1178
+ records: z.ZodArray<z.ZodObject<{
1179
+ id: z.ZodString;
1180
+ name: z.ZodOptional<z.ZodString>;
1181
+ uri: z.ZodOptional<z.ZodString>;
1182
+ iconUri: z.ZodOptional<z.ZodString>;
1183
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1184
+ udm: z.ZodOptional<z.ZodString>;
1185
+ unifiedFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1186
+ rawFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1187
+ createdTime: z.ZodOptional<z.ZodString>;
1188
+ updatedTime: z.ZodOptional<z.ZodString>;
1189
+ deletedTime: z.ZodOptional<z.ZodString>;
1190
+ createdById: z.ZodOptional<z.ZodString>;
1191
+ updatedById: z.ZodOptional<z.ZodString>;
1192
+ }, "strip", z.ZodTypeAny, {
1193
+ id: string;
1194
+ name?: string | undefined;
1195
+ uri?: string | undefined;
1196
+ iconUri?: string | undefined;
1197
+ fields?: Record<string, any> | undefined;
1198
+ udm?: string | undefined;
1199
+ unifiedFields?: Record<string, any> | undefined;
1200
+ rawFields?: Record<string, any> | undefined;
1201
+ createdTime?: string | undefined;
1202
+ updatedTime?: string | undefined;
1203
+ deletedTime?: string | undefined;
1204
+ createdById?: string | undefined;
1205
+ updatedById?: string | undefined;
1206
+ }, {
1207
+ id: string;
1208
+ name?: string | undefined;
1209
+ uri?: string | undefined;
1210
+ iconUri?: string | undefined;
1211
+ fields?: Record<string, any> | undefined;
1212
+ udm?: string | undefined;
1213
+ unifiedFields?: Record<string, any> | undefined;
1214
+ rawFields?: Record<string, any> | undefined;
1215
+ createdTime?: string | undefined;
1216
+ updatedTime?: string | undefined;
1217
+ deletedTime?: string | undefined;
1218
+ createdById?: string | undefined;
1219
+ updatedById?: string | undefined;
1220
+ }>, "many">;
1221
+ drilldowns: z.ZodOptional<z.ZodArray<z.ZodObject<{
1222
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1223
+ filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1224
+ }, "strip", z.ZodTypeAny, {
1225
+ filter?: Record<string, any> | undefined;
1226
+ parameters?: Record<string, any> | undefined;
1227
+ }, {
1228
+ filter?: Record<string, any> | undefined;
1229
+ parameters?: Record<string, any> | undefined;
1230
+ }>, "many">>;
1231
+ cursor: z.ZodOptional<z.ZodString>;
1232
+ }, "strip", z.ZodTypeAny, {
1233
+ records: {
1234
+ id: string;
1235
+ name?: string | undefined;
1236
+ uri?: string | undefined;
1237
+ iconUri?: string | undefined;
1238
+ fields?: Record<string, any> | undefined;
1239
+ udm?: string | undefined;
1240
+ unifiedFields?: Record<string, any> | undefined;
1241
+ rawFields?: Record<string, any> | undefined;
1242
+ createdTime?: string | undefined;
1243
+ updatedTime?: string | undefined;
1244
+ deletedTime?: string | undefined;
1245
+ createdById?: string | undefined;
1246
+ updatedById?: string | undefined;
1247
+ }[];
1248
+ cursor?: string | undefined;
1249
+ drilldowns?: {
1250
+ filter?: Record<string, any> | undefined;
1251
+ parameters?: Record<string, any> | undefined;
1252
+ }[] | undefined;
1253
+ }, {
1254
+ records: {
1255
+ id: string;
1256
+ name?: string | undefined;
1257
+ uri?: string | undefined;
1258
+ iconUri?: string | undefined;
1259
+ fields?: Record<string, any> | undefined;
1260
+ udm?: string | undefined;
1261
+ unifiedFields?: Record<string, any> | undefined;
1262
+ rawFields?: Record<string, any> | undefined;
1263
+ createdTime?: string | undefined;
1264
+ updatedTime?: string | undefined;
1265
+ deletedTime?: string | undefined;
1266
+ createdById?: string | undefined;
1267
+ updatedById?: string | undefined;
1268
+ }[];
1269
+ cursor?: string | undefined;
1270
+ drilldowns?: {
1271
+ filter?: Record<string, any> | undefined;
1272
+ parameters?: Record<string, any> | undefined;
1273
+ }[] | undefined;
1274
+ }>;
1275
+ declare const DataCollectionSearchRequestSchema: z.ZodObject<{
1276
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1277
+ } & {
1278
+ query: z.ZodString;
1279
+ cursor: z.ZodOptional<z.ZodString>;
1280
+ }, "strip", z.ZodTypeAny, {
1118
1281
  query: string;
1119
- cursor?: string;
1120
- }
1121
- interface DataCollectionSearchResponse {
1122
- records: DataRecord[];
1123
- cursor?: string;
1124
- }
1125
- interface DataCollectionFindByIdRequest extends DataCollectionMethodRequest {
1282
+ cursor?: string | undefined;
1283
+ parameters?: Record<string, any> | undefined;
1284
+ }, {
1285
+ query: string;
1286
+ cursor?: string | undefined;
1287
+ parameters?: Record<string, any> | undefined;
1288
+ }>;
1289
+ declare const DataCollectionSearchResponseSchema: z.ZodObject<{
1290
+ records: z.ZodArray<z.ZodObject<{
1291
+ id: z.ZodString;
1292
+ name: z.ZodOptional<z.ZodString>;
1293
+ uri: z.ZodOptional<z.ZodString>;
1294
+ iconUri: z.ZodOptional<z.ZodString>;
1295
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1296
+ udm: z.ZodOptional<z.ZodString>;
1297
+ unifiedFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1298
+ rawFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1299
+ createdTime: z.ZodOptional<z.ZodString>;
1300
+ updatedTime: z.ZodOptional<z.ZodString>;
1301
+ deletedTime: z.ZodOptional<z.ZodString>;
1302
+ createdById: z.ZodOptional<z.ZodString>;
1303
+ updatedById: z.ZodOptional<z.ZodString>;
1304
+ }, "strip", z.ZodTypeAny, {
1305
+ id: string;
1306
+ name?: string | undefined;
1307
+ uri?: string | undefined;
1308
+ iconUri?: string | undefined;
1309
+ fields?: Record<string, any> | undefined;
1310
+ udm?: string | undefined;
1311
+ unifiedFields?: Record<string, any> | undefined;
1312
+ rawFields?: Record<string, any> | undefined;
1313
+ createdTime?: string | undefined;
1314
+ updatedTime?: string | undefined;
1315
+ deletedTime?: string | undefined;
1316
+ createdById?: string | undefined;
1317
+ updatedById?: string | undefined;
1318
+ }, {
1319
+ id: string;
1320
+ name?: string | undefined;
1321
+ uri?: string | undefined;
1322
+ iconUri?: string | undefined;
1323
+ fields?: Record<string, any> | undefined;
1324
+ udm?: string | undefined;
1325
+ unifiedFields?: Record<string, any> | undefined;
1326
+ rawFields?: Record<string, any> | undefined;
1327
+ createdTime?: string | undefined;
1328
+ updatedTime?: string | undefined;
1329
+ deletedTime?: string | undefined;
1330
+ createdById?: string | undefined;
1331
+ updatedById?: string | undefined;
1332
+ }>, "many">;
1333
+ cursor: z.ZodOptional<z.ZodString>;
1334
+ }, "strip", z.ZodTypeAny, {
1335
+ records: {
1336
+ id: string;
1337
+ name?: string | undefined;
1338
+ uri?: string | undefined;
1339
+ iconUri?: string | undefined;
1340
+ fields?: Record<string, any> | undefined;
1341
+ udm?: string | undefined;
1342
+ unifiedFields?: Record<string, any> | undefined;
1343
+ rawFields?: Record<string, any> | undefined;
1344
+ createdTime?: string | undefined;
1345
+ updatedTime?: string | undefined;
1346
+ deletedTime?: string | undefined;
1347
+ createdById?: string | undefined;
1348
+ updatedById?: string | undefined;
1349
+ }[];
1350
+ cursor?: string | undefined;
1351
+ }, {
1352
+ records: {
1353
+ id: string;
1354
+ name?: string | undefined;
1355
+ uri?: string | undefined;
1356
+ iconUri?: string | undefined;
1357
+ fields?: Record<string, any> | undefined;
1358
+ udm?: string | undefined;
1359
+ unifiedFields?: Record<string, any> | undefined;
1360
+ rawFields?: Record<string, any> | undefined;
1361
+ createdTime?: string | undefined;
1362
+ updatedTime?: string | undefined;
1363
+ deletedTime?: string | undefined;
1364
+ createdById?: string | undefined;
1365
+ updatedById?: string | undefined;
1366
+ }[];
1367
+ cursor?: string | undefined;
1368
+ }>;
1369
+ declare const DataCollectionFindByIdRequestSchema: z.ZodObject<{
1370
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1371
+ } & {
1372
+ id: z.ZodString;
1373
+ udm: z.ZodOptional<z.ZodString>;
1374
+ }, "strip", z.ZodTypeAny, {
1126
1375
  id: string;
1127
- udm?: string;
1128
- }
1129
- interface DataCollectionFindByIdResponse {
1130
- record: DataRecord;
1131
- }
1132
- interface DataCollectionMatchRequest extends DataCollectionMethodRequest {
1376
+ udm?: string | undefined;
1377
+ parameters?: Record<string, any> | undefined;
1378
+ }, {
1379
+ id: string;
1380
+ udm?: string | undefined;
1381
+ parameters?: Record<string, any> | undefined;
1382
+ }>;
1383
+ declare const DataCollectionFindByIdResponseSchema: z.ZodObject<{
1384
+ record: z.ZodObject<{
1385
+ id: z.ZodString;
1386
+ name: z.ZodOptional<z.ZodString>;
1387
+ uri: z.ZodOptional<z.ZodString>;
1388
+ iconUri: z.ZodOptional<z.ZodString>;
1389
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1390
+ udm: z.ZodOptional<z.ZodString>;
1391
+ unifiedFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1392
+ rawFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1393
+ createdTime: z.ZodOptional<z.ZodString>;
1394
+ updatedTime: z.ZodOptional<z.ZodString>;
1395
+ deletedTime: z.ZodOptional<z.ZodString>;
1396
+ createdById: z.ZodOptional<z.ZodString>;
1397
+ updatedById: z.ZodOptional<z.ZodString>;
1398
+ }, "strip", z.ZodTypeAny, {
1399
+ id: string;
1400
+ name?: string | undefined;
1401
+ uri?: string | undefined;
1402
+ iconUri?: string | undefined;
1403
+ fields?: Record<string, any> | undefined;
1404
+ udm?: string | undefined;
1405
+ unifiedFields?: Record<string, any> | undefined;
1406
+ rawFields?: Record<string, any> | undefined;
1407
+ createdTime?: string | undefined;
1408
+ updatedTime?: string | undefined;
1409
+ deletedTime?: string | undefined;
1410
+ createdById?: string | undefined;
1411
+ updatedById?: string | undefined;
1412
+ }, {
1413
+ id: string;
1414
+ name?: string | undefined;
1415
+ uri?: string | undefined;
1416
+ iconUri?: string | undefined;
1417
+ fields?: Record<string, any> | undefined;
1418
+ udm?: string | undefined;
1419
+ unifiedFields?: Record<string, any> | undefined;
1420
+ rawFields?: Record<string, any> | undefined;
1421
+ createdTime?: string | undefined;
1422
+ updatedTime?: string | undefined;
1423
+ deletedTime?: string | undefined;
1424
+ createdById?: string | undefined;
1425
+ updatedById?: string | undefined;
1426
+ }>;
1427
+ }, "strip", z.ZodTypeAny, {
1428
+ record: {
1429
+ id: string;
1430
+ name?: string | undefined;
1431
+ uri?: string | undefined;
1432
+ iconUri?: string | undefined;
1433
+ fields?: Record<string, any> | undefined;
1434
+ udm?: string | undefined;
1435
+ unifiedFields?: Record<string, any> | undefined;
1436
+ rawFields?: Record<string, any> | undefined;
1437
+ createdTime?: string | undefined;
1438
+ updatedTime?: string | undefined;
1439
+ deletedTime?: string | undefined;
1440
+ createdById?: string | undefined;
1441
+ updatedById?: string | undefined;
1442
+ };
1443
+ }, {
1444
+ record: {
1445
+ id: string;
1446
+ name?: string | undefined;
1447
+ uri?: string | undefined;
1448
+ iconUri?: string | undefined;
1449
+ fields?: Record<string, any> | undefined;
1450
+ udm?: string | undefined;
1451
+ unifiedFields?: Record<string, any> | undefined;
1452
+ rawFields?: Record<string, any> | undefined;
1453
+ createdTime?: string | undefined;
1454
+ updatedTime?: string | undefined;
1455
+ deletedTime?: string | undefined;
1456
+ createdById?: string | undefined;
1457
+ updatedById?: string | undefined;
1458
+ };
1459
+ }>;
1460
+ declare const DataCollectionMatchRequestSchema: z.ZodObject<{
1461
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1462
+ } & {
1463
+ query: z.ZodRecord<z.ZodString, z.ZodAny>;
1464
+ }, "strip", z.ZodTypeAny, {
1133
1465
  query: Record<string, any>;
1134
- }
1135
- interface DataCollectionMatchResponse {
1136
- record?: DataRecord;
1137
- }
1138
- interface DataCollectionCreateRequest extends DataCollectionMethodRequest {
1466
+ parameters?: Record<string, any> | undefined;
1467
+ }, {
1468
+ query: Record<string, any>;
1469
+ parameters?: Record<string, any> | undefined;
1470
+ }>;
1471
+ declare const DataCollectionMatchResponseSchema: z.ZodObject<{
1472
+ record: z.ZodOptional<z.ZodObject<{
1473
+ id: z.ZodString;
1474
+ name: z.ZodOptional<z.ZodString>;
1475
+ uri: z.ZodOptional<z.ZodString>;
1476
+ iconUri: z.ZodOptional<z.ZodString>;
1477
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1478
+ udm: z.ZodOptional<z.ZodString>;
1479
+ unifiedFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1480
+ rawFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1481
+ createdTime: z.ZodOptional<z.ZodString>;
1482
+ updatedTime: z.ZodOptional<z.ZodString>;
1483
+ deletedTime: z.ZodOptional<z.ZodString>;
1484
+ createdById: z.ZodOptional<z.ZodString>;
1485
+ updatedById: z.ZodOptional<z.ZodString>;
1486
+ }, "strip", z.ZodTypeAny, {
1487
+ id: string;
1488
+ name?: string | undefined;
1489
+ uri?: string | undefined;
1490
+ iconUri?: string | undefined;
1491
+ fields?: Record<string, any> | undefined;
1492
+ udm?: string | undefined;
1493
+ unifiedFields?: Record<string, any> | undefined;
1494
+ rawFields?: Record<string, any> | undefined;
1495
+ createdTime?: string | undefined;
1496
+ updatedTime?: string | undefined;
1497
+ deletedTime?: string | undefined;
1498
+ createdById?: string | undefined;
1499
+ updatedById?: string | undefined;
1500
+ }, {
1501
+ id: string;
1502
+ name?: string | undefined;
1503
+ uri?: string | undefined;
1504
+ iconUri?: string | undefined;
1505
+ fields?: Record<string, any> | undefined;
1506
+ udm?: string | undefined;
1507
+ unifiedFields?: Record<string, any> | undefined;
1508
+ rawFields?: Record<string, any> | undefined;
1509
+ createdTime?: string | undefined;
1510
+ updatedTime?: string | undefined;
1511
+ deletedTime?: string | undefined;
1512
+ createdById?: string | undefined;
1513
+ updatedById?: string | undefined;
1514
+ }>>;
1515
+ }, "strip", z.ZodTypeAny, {
1516
+ record?: {
1517
+ id: string;
1518
+ name?: string | undefined;
1519
+ uri?: string | undefined;
1520
+ iconUri?: string | undefined;
1521
+ fields?: Record<string, any> | undefined;
1522
+ udm?: string | undefined;
1523
+ unifiedFields?: Record<string, any> | undefined;
1524
+ rawFields?: Record<string, any> | undefined;
1525
+ createdTime?: string | undefined;
1526
+ updatedTime?: string | undefined;
1527
+ deletedTime?: string | undefined;
1528
+ createdById?: string | undefined;
1529
+ updatedById?: string | undefined;
1530
+ } | undefined;
1531
+ }, {
1532
+ record?: {
1533
+ id: string;
1534
+ name?: string | undefined;
1535
+ uri?: string | undefined;
1536
+ iconUri?: string | undefined;
1537
+ fields?: Record<string, any> | undefined;
1538
+ udm?: string | undefined;
1539
+ unifiedFields?: Record<string, any> | undefined;
1540
+ rawFields?: Record<string, any> | undefined;
1541
+ createdTime?: string | undefined;
1542
+ updatedTime?: string | undefined;
1543
+ deletedTime?: string | undefined;
1544
+ createdById?: string | undefined;
1545
+ updatedById?: string | undefined;
1546
+ } | undefined;
1547
+ }>;
1548
+ declare const DataCollectionCreateRequestSchema: z.ZodObject<{
1549
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1550
+ } & {
1551
+ fields: z.ZodRecord<z.ZodString, z.ZodAny>;
1552
+ }, "strip", z.ZodTypeAny, {
1139
1553
  fields: Record<string, any>;
1140
- }
1141
- interface DataCollectionCreateResponse {
1554
+ parameters?: Record<string, any> | undefined;
1555
+ }, {
1556
+ fields: Record<string, any>;
1557
+ parameters?: Record<string, any> | undefined;
1558
+ }>;
1559
+ declare const DataCollectionCreateResponseSchema: z.ZodObject<{
1560
+ id: z.ZodString;
1561
+ }, "strip", z.ZodTypeAny, {
1142
1562
  id: string;
1143
- }
1144
- interface DataCollectionUpdateRequest extends DataCollectionMethodRequest {
1563
+ }, {
1564
+ id: string;
1565
+ }>;
1566
+ declare const DataCollectionUpdateRequestSchema: z.ZodObject<{
1567
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1568
+ } & {
1569
+ id: z.ZodString;
1570
+ fields: z.ZodRecord<z.ZodString, z.ZodAny>;
1571
+ }, "strip", z.ZodTypeAny, {
1145
1572
  id: string;
1146
1573
  fields: Record<string, any>;
1147
- }
1148
- interface DataCollectionUpdateResponse {
1574
+ parameters?: Record<string, any> | undefined;
1575
+ }, {
1149
1576
  id: string;
1150
- }
1151
- interface DataCollectionDeleteRequest extends DataCollectionMethodRequest {
1577
+ fields: Record<string, any>;
1578
+ parameters?: Record<string, any> | undefined;
1579
+ }>;
1580
+ declare const DataCollectionUpdateResponseSchema: z.ZodObject<{
1581
+ id: z.ZodString;
1582
+ }, "strip", z.ZodTypeAny, {
1152
1583
  id: string;
1153
- }
1154
- interface DataCollectionDeleteResponse {
1155
- }
1584
+ }, {
1585
+ id: string;
1586
+ }>;
1587
+ declare const DataCollectionDeleteRequestSchema: z.ZodObject<{
1588
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1589
+ } & {
1590
+ id: z.ZodString;
1591
+ }, "strip", z.ZodTypeAny, {
1592
+ id: string;
1593
+ parameters?: Record<string, any> | undefined;
1594
+ }, {
1595
+ id: string;
1596
+ parameters?: Record<string, any> | undefined;
1597
+ }>;
1598
+ declare const DataCollectionDeleteResponseSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
1599
+ type DataCollectionFindRequest = z.infer<typeof DataCollectionFindRequestSchema>;
1600
+ type DataCollectionFindResponse = z.infer<typeof DataCollectionFindResponseSchema>;
1601
+ type DataCollectionListRequest = z.infer<typeof DataCollectionListRequestSchema>;
1602
+ type DataCollectionListResponse = z.infer<typeof DataCollectionListResponseSchema>;
1603
+ type DataCollectionSearchRequest = z.infer<typeof DataCollectionSearchRequestSchema>;
1604
+ type DataCollectionSearchResponse = z.infer<typeof DataCollectionSearchResponseSchema>;
1605
+ type DataCollectionFindByIdRequest = z.infer<typeof DataCollectionFindByIdRequestSchema>;
1606
+ type DataCollectionFindByIdResponse = z.infer<typeof DataCollectionFindByIdResponseSchema>;
1607
+ type DataCollectionMatchRequest = z.infer<typeof DataCollectionMatchRequestSchema>;
1608
+ type DataCollectionMatchResponse = z.infer<typeof DataCollectionMatchResponseSchema>;
1609
+ type DataCollectionCreateRequest = z.infer<typeof DataCollectionCreateRequestSchema>;
1610
+ type DataCollectionCreateResponse = z.infer<typeof DataCollectionCreateResponseSchema>;
1611
+ type DataCollectionUpdateRequest = z.infer<typeof DataCollectionUpdateRequestSchema>;
1612
+ type DataCollectionUpdateResponse = z.infer<typeof DataCollectionUpdateResponseSchema>;
1613
+ type DataCollectionDeleteRequest = z.infer<typeof DataCollectionDeleteRequestSchema>;
1614
+ type DataCollectionDeleteResponse = z.infer<typeof DataCollectionDeleteResponseSchema>;
1156
1615
 
1157
1616
  interface ConnectorUdmSpec {
1158
1617
  defaultCollection?: DataLocationPointer;
@@ -1164,41 +1623,81 @@ interface ConnectorUdmCollectionMapping extends DataLocationPointer {
1164
1623
  fieldsFromCollection?: any;
1165
1624
  }
1166
1625
 
1167
- interface ConnectorUiSpec {
1168
- schema?: DataSchema;
1626
+ interface DataSchema {
1627
+ title?: string;
1169
1628
  description?: string;
1170
- helpUri?: string;
1171
- test?: boolean;
1172
- }
1173
- type ConnectorApiType = 'openapi' | 'graphql';
1174
- interface ConnectorSpec {
1175
- key?: string;
1176
- name?: string;
1177
- appUri?: string;
1178
- logoUri?: string;
1179
- apiDocsUri?: string;
1180
- api?: {
1181
- type: ConnectorApiType;
1629
+ type?: string | string[];
1630
+ format?: string;
1631
+ properties?: {
1632
+ [key: string]: DataSchema;
1182
1633
  };
1183
- ui?: ConnectorUiSpec;
1184
- auth?: ConnectorAuth;
1634
+ items?: DataSchema;
1635
+ additionalProperties?: boolean | DataSchema;
1636
+ enum?: string[];
1637
+ referenceRecords?: DataRecord[];
1638
+ referenceCollection?: {
1639
+ key: any;
1640
+ parameters?: Record<string, any>;
1641
+ };
1642
+ referenceUdm?: string;
1643
+ default?: any;
1644
+ allowCustom?: boolean;
1645
+ $ref?: string;
1646
+ required?: string[];
1647
+ minLength?: number;
1648
+ maxLength?: number;
1649
+ minimum?: number;
1650
+ maximum?: number;
1651
+ maxItems?: number;
1652
+ readOnly?: boolean;
1653
+ writeOnly?: boolean;
1654
+ examples?: any[];
1655
+ anyOf?: DataSchema[];
1656
+ isImplied?: boolean;
1657
+ isSensitive?: boolean;
1658
+ referenceCollectionPath?: string;
1659
+ referenceCollectionUri?: string;
1660
+ }
1661
+
1662
+ declare enum ConnectorMethodImplementationType {
1663
+ mapping = "mapping",
1664
+ operationMapping = "operation-mapping",
1665
+ restApiMapping = "rest-api-mapping",
1666
+ graphqlApiMapping = "graphql-api-mapping",
1667
+ javascript = "javascript",
1668
+ notSupported = "not-supported"
1669
+ }
1670
+ type ConnectorMethodImplementation = ConnectorMethodImplementationBase | ConnectorMethodImplementationMapping | ConnectorMethodImplementationOperationMapping | ConnectorMethodImplementationRestApiMapping | ConnectorMethodImplementationGraphqlApiMapping | ConnectorMethodImplementationJavascript | ConnectorMethodImplementationNotSupported;
1671
+ interface ConnectorMethodImplementationBase {
1672
+ implementationType?: ConnectorMethodImplementationType;
1673
+ filePath?: string;
1674
+ inheritedFromPath?: string[];
1675
+ isIncomplete?: boolean;
1185
1676
  parametersSchema?: DataSchema;
1186
- udms?: string[];
1187
- udm?: Record<string, ConnectorUdmSpec>;
1188
- operations?: ConnectorOperationHandler[];
1189
- test?: ConnectorMethodImplementation;
1190
- hasReadme?: boolean;
1191
- appUuid?: string;
1192
- knowledgeBaseUuid?: string;
1193
- workspaceId?: string;
1194
- data?: any;
1195
1677
  }
1196
- type MinimalConnector = {
1197
- id: string;
1198
- key: string;
1199
- name: string;
1200
- logoUri: string;
1201
- };
1678
+ interface ConnectorMethodImplementationMapping extends ConnectorMethodImplementationBase {
1679
+ implementationType: ConnectorMethodImplementationType.mapping;
1680
+ mapping: any;
1681
+ }
1682
+ interface ConnectorMethodImplementationOperationMapping extends ConnectorMethodImplementationBase {
1683
+ implementationType: ConnectorMethodImplementationType.operationMapping;
1684
+ mapping: OperationMapping;
1685
+ }
1686
+ interface ConnectorMethodImplementationRestApiMapping extends ConnectorMethodImplementationBase {
1687
+ implementationType: ConnectorMethodImplementationType.restApiMapping;
1688
+ mapping: RestApiMapping;
1689
+ }
1690
+ interface ConnectorMethodImplementationGraphqlApiMapping extends ConnectorMethodImplementationBase {
1691
+ implementationType: ConnectorMethodImplementationType.graphqlApiMapping;
1692
+ mapping: GraphQLApiMapping;
1693
+ }
1694
+ interface ConnectorMethodImplementationJavascript extends ConnectorMethodImplementationBase {
1695
+ implementationType: ConnectorMethodImplementationType.javascript;
1696
+ code: string;
1697
+ }
1698
+ interface ConnectorMethodImplementationNotSupported extends ConnectorMethodImplementationBase {
1699
+ implementationType: ConnectorMethodImplementationType.notSupported;
1700
+ }
1202
1701
 
1203
1702
  declare const CONNECTOR_AUTH_TYPES: readonly ["integration-app-token", "membrane-token", "oauth2", "oauth1", "client-credentials", "proxy"];
1204
1703
  type ConnectorAuthType = (typeof CONNECTOR_AUTH_TYPES)[number];
@@ -1253,92 +1752,68 @@ type ConnectorAuth = (ConnectorAuthOAuth2 | ConnectorAuthOAuth1 | ConnectorAuthC
1253
1752
  };
1254
1753
  };
1255
1754
 
1256
- interface OpenConfigurationOptions {
1257
- onClose?: () => void;
1258
- showPoweredBy?: boolean;
1755
+ interface ConnectorUiSpec {
1756
+ schema?: DataSchema;
1757
+ description?: string;
1758
+ helpUri?: string;
1759
+ test?: boolean;
1259
1760
  }
1260
-
1261
- interface Integration extends WorkspaceElement {
1262
- state?: WorkspaceElementState;
1263
- errors?: ErrorData[];
1264
- logoUri: string;
1265
- connectorId?: string;
1266
- connectorVersion?: string;
1267
- authOptions?: IntegrationAuthOption[];
1268
- oAuthCallbackUri?: string;
1761
+ type ConnectorApiType = 'openapi' | 'graphql';
1762
+ interface ConnectorSpec {
1763
+ key?: string;
1764
+ name?: string;
1765
+ appUri?: string;
1766
+ logoUri?: string;
1767
+ apiDocsUri?: string;
1768
+ api?: {
1769
+ type: ConnectorApiType;
1770
+ };
1771
+ ui?: ConnectorUiSpec;
1772
+ auth?: ConnectorAuth;
1269
1773
  parametersSchema?: DataSchema;
1270
- parameters?: any;
1271
- baseUri: string;
1272
- connection?: Connection;
1273
- archivedAt?: string;
1274
- spec?: ConnectorSpec;
1275
- hasMissingParameters?: boolean;
1276
- hasDocumentation?: boolean;
1277
- hasOperations?: boolean;
1278
- hasData?: boolean;
1279
- hasEvents?: boolean;
1280
- hasGlobalWebhooks?: boolean;
1281
- hasUdm?: boolean;
1282
- isTest?: boolean;
1774
+ udms?: string[];
1775
+ udm?: Record<string, ConnectorUdmSpec>;
1776
+ operations?: ConnectorOperationHandler[];
1777
+ test?: ConnectorMethodImplementation;
1778
+ hasReadme?: boolean;
1283
1779
  appUuid?: string;
1284
- isDeactivated?: boolean;
1285
- authType?: ConnectorAuthType;
1780
+ knowledgeBaseUuid?: string;
1781
+ workspaceId?: string;
1782
+ data?: any;
1286
1783
  }
1287
- type IntegrationAuthOption = ConnectorAuthSpec & {
1288
- key: string;
1289
- };
1290
- type AppliedToIntegrations<Element> = {
1291
- element: Element;
1292
- integration: Integration;
1293
- }[];
1294
-
1295
- interface CreateIntegrationRequest {
1296
- name?: string;
1784
+ type MinimalConnector = {
1785
+ id: string;
1297
1786
  key: string;
1298
- baseUri: string;
1787
+ name: string;
1299
1788
  logoUri: string;
1300
- }
1301
- interface UpdateIntegrationRequest {
1302
- name?: string;
1303
- key?: string;
1304
- baseUri?: string;
1305
- logoUri?: string;
1306
- }
1307
- interface FindIntegrationsQuery extends PaginationQuery, SearchQuery {
1308
- }
1309
- interface OpenNewConnectionOptions extends OpenConfigurationOptions {
1310
- allowMultipleConnections?: boolean;
1311
- name?: string;
1312
- connectorParameters?: any;
1313
- }
1314
-
1315
- type CreateCustomerRequest = {
1316
- name?: string;
1317
- internalId: string;
1318
- fields?: any;
1319
- credentials?: any;
1320
- };
1321
- type UpdateCustomerRequest = {
1322
- name?: string;
1323
- internalId?: string;
1324
- fields?: any;
1325
- credentials?: any;
1326
- };
1327
- type FindCustomersQuery = PaginationQuery & SearchQuery & {
1328
- isTest?: boolean;
1329
- };
1330
- type CustomerSelector = {
1331
- id: string;
1332
1789
  };
1333
1790
 
1334
- declare class CustomersAccessor extends ElementListAccessor<Customer, FindCustomersQuery, CreateCustomerRequest> {
1335
- constructor(client: IntegrationAppApiClient);
1791
+ interface BaseConnection extends BaseWorkspaceElement {
1792
+ name: string;
1793
+ userId: string;
1794
+ disconnected?: boolean;
1795
+ error?: ErrorData;
1796
+ integrationId: string;
1797
+ credentials?: unknown;
1798
+ parameters?: unknown;
1799
+ connectorParameters?: unknown;
1800
+ accessToken?: string;
1801
+ refreshToken?: string;
1802
+ createdAt: string;
1803
+ updatedAt: string;
1804
+ lastActiveAt?: string;
1805
+ nextCredentialsRefreshAt?: string;
1806
+ archivedAt?: string;
1807
+ state?: WorkspaceElementState;
1808
+ errors?: ErrorData[];
1336
1809
  }
1337
- declare class CustomerAccessor extends ElementAccessor<Customer, UpdateCustomerRequest, CustomerSelector> {
1338
- constructor(client: IntegrationAppApiClient, selector: CustomerSelector | string);
1810
+ interface ConnectionSpec extends ConnectorSpec {
1811
+ }
1812
+ declare class ConnectionSpec {
1813
+ constructor(opts: ConnectionSpec);
1339
1814
  }
1340
1815
 
1341
- type Customer = {
1816
+ type BaseCustomer = {
1342
1817
  id: string;
1343
1818
  name: string;
1344
1819
  internalId: string;
@@ -1348,416 +1823,253 @@ type Customer = {
1348
1823
  isTest?: boolean;
1349
1824
  isBillable?: boolean;
1350
1825
  };
1351
- type User = Customer;
1352
1826
 
1353
- interface ListFlowsForIntegrationQuery extends CommonListElementsQuery {
1354
- universalFlowId?: string | 'null';
1355
- }
1356
- interface FindFlowsQuery extends ListFlowsForIntegrationQuery {
1357
- integrationId?: string | 'null';
1358
- }
1359
- interface CreateFlowNodeRequest {
1360
- type: string;
1361
- config?: any;
1362
- ui?: any;
1363
- links?: FlowNodeLink[];
1827
+ declare enum FieldMappingDirection {
1828
+ IMPORT = "import",
1829
+ EXPORT = "export",
1830
+ BOTH = "both"
1364
1831
  }
1365
- interface CreateFlowRequest {
1366
- key: string;
1367
- name: string;
1832
+ interface BaseFieldMapping extends BaseMembraneInterface {
1833
+ revision: string;
1834
+ publishedRevision?: string;
1835
+ universalFieldMappingId?: string;
1836
+ universalFieldMappingRevision?: string;
1368
1837
  integrationId?: string;
1369
- nodes?: Record<string, CreateFlowNodeRequest>;
1370
- parametersSchema?: DataSchema;
1371
- autoCreateInstances?: boolean;
1372
- }
1373
- interface UpdateFlowRequest extends CreateFlowRequest {
1838
+ dataSourceId: string;
1839
+ dataSourceKey: string;
1840
+ appSchema: DataSchema;
1841
+ direction: FieldMappingDirection;
1842
+ defaultImportValue?: any;
1843
+ defaultExportValue?: any;
1844
+ importValue?: any;
1845
+ exportValue?: any;
1846
+ frozenImportFields?: any;
1847
+ frozenExportFields?: any;
1848
+ frozenUnifiedExportFields?: any;
1374
1849
  archivedAt?: string;
1375
- }
1376
- interface FlowSelector extends IntegrationSpecificElementSelector {
1377
- autoCreate?: boolean;
1378
- }
1379
- type ListFlowInstancesForConnectionQuery = CommonInstancesListQuery & {
1380
- flowId?: string;
1381
- flowKey?: string;
1382
- enabled?: boolean;
1383
- };
1384
- type FindFlowInstancesQuery = ListFlowInstancesForConnectionQuery & CommonIntegrationOrConnectionQuery;
1385
- interface FlowInstanceSelector extends ConnectionSelector, ElementInstanceSelector {
1386
- flowId?: string;
1387
- flowKey?: string;
1388
- instanceKey?: string;
1389
- autoUpdate?: boolean;
1390
- }
1391
- interface ResetFlowInstanceOptions {
1392
- name?: boolean;
1393
- nodes?: Record<string, boolean>;
1394
- allNodes?: boolean;
1395
- }
1396
- interface RunFlowOptions {
1397
- nodeKey?: string;
1398
- input?: any;
1399
- returnImmediately?: boolean;
1400
- onUpdate?: (...args: any) => void;
1850
+ customized?: boolean;
1401
1851
  }
1402
1852
 
1403
- interface ListFieldMappingsForIntegrationQuery extends CommonListElementsQuery {
1404
- universalFieldMappingId?: string | 'null';
1405
- }
1406
- interface FindFieldMappingsQuery extends ListFieldMappingsForIntegrationQuery {
1407
- integrationId?: string | 'null';
1408
- }
1409
- type ListFieldMappingInstancesForConnectionQuery = CommonInstancesListQuery & {
1410
- fieldMappingId?: string;
1411
- universalFieldMappingId?: string;
1412
- dataSourceInstanceId?: string;
1413
- };
1414
- type FindFieldMappingInstancesQuery = ListFieldMappingInstancesForConnectionQuery & CommonIntegrationOrConnectionQuery;
1415
- interface UpdateFieldMappingRequest {
1416
- key?: string;
1417
- name?: string;
1418
- dataSourceKey?: string;
1419
- dataSourceId?: string;
1420
- appSchema?: DataSchema;
1421
- direction?: FieldMappingDirection;
1422
- defaultImportValue?: any;
1423
- exportValue?: any;
1424
- importValue?: any;
1425
- defaultExportValue?: any;
1426
- frozenImportFields?: any;
1427
- frozenExportFields?: any;
1428
- frozenUnifiedExportFields?: any;
1429
- archivedAt?: string;
1853
+ declare enum ActionType {
1854
+ ListDataRecords = "list-data-records",
1855
+ FindDataRecordById = "find-data-record-by-id",
1856
+ MatchDataRecord = "match-data-record",
1857
+ CreateDataRecord = "create-data-record",
1858
+ FindOrCreateDataRecord = "find-or-create-data-record",
1859
+ UpdateDataRecord = "update-data-record",
1860
+ DeleteDataRecord = "delete-data-record",
1861
+ SearchDataRecords = "search-data-record",
1862
+ ConnectorOperation = "connector-operation",
1863
+ ApiRequestToExternalApp = "api-request-to-external-app",
1864
+ ApiRequestToYourApp = "api-request-to-your-app",
1865
+ HttpRequest = "http-request",
1866
+ RunJavascript = "run-javascript",
1867
+ ApiRequest = "api-request"
1430
1868
  }
1431
- interface CreateFieldMappingRequest extends UpdateFieldMappingRequest {
1869
+
1870
+ interface BaseAction {
1871
+ id: string;
1432
1872
  key: string;
1433
1873
  name: string;
1874
+ revision: string;
1434
1875
  integrationId?: string;
1876
+ parentId?: string;
1877
+ parentRevision?: string;
1878
+ isCustomized?: boolean;
1879
+ createdAt?: string;
1880
+ updatedAt?: string;
1881
+ archivedAt?: string;
1882
+ type: ActionType;
1883
+ inputSchema?: DataSchema;
1884
+ config?: any;
1885
+ outputMapping?: any;
1886
+ customOutputSchema?: DataSchema;
1887
+ defaultOutputSchema?: DataSchema;
1888
+ transformedOutputSchema?: DataSchema;
1889
+ outputSchema?: DataSchema;
1890
+ dependencies?: WorkspaceElementDependency[];
1435
1891
  }
1436
- interface CreateFieldMappingInstanceRequest {
1437
- connectionId: string;
1438
- fieldMappingId?: string;
1439
- instanceKey?: string;
1440
- importValue?: any;
1441
- exportValue?: any;
1892
+
1893
+ interface DataSourceUnitConfig {
1894
+ key?: string;
1895
+ collectionKey?: any;
1896
+ collectionParameters?: any;
1897
+ udm?: any;
1898
+ path?: string;
1899
+ pullUpdatesIntervalSeconds?: number;
1900
+ fullSyncIntervalSeconds?: number;
1442
1901
  }
1443
- interface UpdateFieldMappingInstanceRequest {
1444
- importValue?: any;
1445
- exportValue?: any;
1902
+ interface BaseDataSource extends BaseMembraneInterface {
1903
+ revision: string;
1904
+ publishedRevision?: string;
1905
+ integrationId?: string;
1906
+ universalDataSourceId?: string;
1907
+ universalDataSourceRevision?: string;
1908
+ udm?: string;
1909
+ pullUpdatesIntervalSeconds?: number;
1910
+ fullSyncIntervalSeconds?: number;
1911
+ collectionKey?: string;
1912
+ collectionParameters?: any;
1913
+ archivedAt?: string;
1914
+ createdAt?: string;
1915
+ updatedAt?: string;
1916
+ customized?: boolean;
1917
+ defaultPath?: string;
1446
1918
  }
1447
- interface FieldMappingInstanceSelector extends ConnectionSelector, FlowInstanceSelector, ElementInstanceSelector {
1448
- fieldMappingKey?: string;
1449
- fieldMappingId?: string;
1919
+
1920
+ interface BaseDataSourceInstance extends BaseMembraneInterface {
1921
+ userId: string;
1922
+ revision: string;
1923
+ dataSourceRevision?: string;
1924
+ dataSourceId?: string;
1925
+ universalDataSourceId?: string;
1926
+ udm?: string;
1927
+ connectionId: string;
1928
+ integrationId: string;
1450
1929
  instanceKey?: string;
1451
- nodeKey?: string;
1452
- }
1453
- interface FieldMappingSelector extends IntegrationSpecificElementSelector {
1930
+ collectionKey?: string;
1931
+ collectionParameters?: any;
1932
+ defaultCollectionKey?: string;
1933
+ defaultCollectionParameters?: any;
1934
+ collectionSpec?: DataCollectionSpec;
1935
+ isCustomized?: boolean;
1936
+ errors?: ErrorData[];
1937
+ pullUpdatesIntervalSeconds?: number;
1938
+ fullSyncIntervalSeconds?: number;
1939
+ path?: string;
1940
+ defaultPath?: string;
1454
1941
  }
1455
1942
 
1456
- type InstanceKeyQuery = {
1457
- instanceKey?: string;
1943
+ type CreateCustomerRequest = {
1944
+ name?: string;
1945
+ internalId: string;
1946
+ fields?: any;
1947
+ credentials?: any;
1948
+ };
1949
+ type UpdateCustomerRequest = {
1950
+ name?: string;
1951
+ internalId?: string;
1952
+ fields?: any;
1953
+ credentials?: any;
1458
1954
  };
1955
+ type FindCustomersQuery = PaginationQuery & SearchQuery & {
1956
+ isTest?: boolean;
1957
+ };
1958
+ type CustomerSelector = {
1959
+ id: string;
1960
+ };
1961
+ type Customer = BaseCustomer;
1459
1962
 
1460
- declare class ConnectionLevelElementAccessor<Element, UpdateElement> {
1461
- protected client: IntegrationAppApiClient;
1462
- protected connectionSelector: string;
1463
- protected selector: string;
1464
- protected elementKey: string;
1465
- protected query: Record<string, any>;
1466
- protected endpoint: string;
1467
- constructor(client: IntegrationAppApiClient, connectionSelector: string, selector: string, elementKey: string, query: Record<string, any>);
1468
- protected uri(path?: string, query?: {}): string;
1469
- getUniqueIdentifier(): string;
1470
- get(query?: {
1471
- autoCreate?: boolean;
1472
- }): Promise<Element>;
1473
- create(): Promise<Element>;
1474
- patch(data: Partial<UpdateElement>): Promise<Element>;
1475
- put(data: UpdateElement): Promise<Element>;
1476
- archive(): Promise<void>;
1477
- reset(): Promise<Element>;
1478
- setup(): Promise<Element>;
1479
- }
1480
- declare class ConnectionLevelElementsListAccessor<Element, Query> {
1481
- protected client: IntegrationAppApiClient;
1482
- protected connectionSelector: string;
1483
- protected elementKey: string;
1484
- constructor(client: IntegrationAppApiClient, connectionSelector: string, elementKey: string);
1485
- list(query?: Query): Promise<PaginationResponse<Element[]>>;
1963
+ interface OpenConfigurationOptions {
1964
+ onClose?: () => void;
1965
+ showPoweredBy?: boolean;
1486
1966
  }
1487
1967
 
1488
- declare class IntegrationLevelElementAccessor<Element, UpdateElementData> {
1489
- protected client: IntegrationAppApiClient;
1490
- protected integrationSelector: string;
1491
- protected elementSelector: string;
1492
- protected elementKey: string;
1493
- protected endpoint: string;
1494
- constructor(client: IntegrationAppApiClient, integrationSelector: string, elementSelector: string, elementKey: string);
1495
- getUniqueIdentifier(): string;
1496
- get(): Promise<Element>;
1497
- patch(data: Partial<UpdateElementData>): Promise<Element>;
1498
- put(data: UpdateElementData): Promise<Element>;
1499
- archive(): Promise<void>;
1500
- reset(): Promise<Element>;
1501
- }
1502
- declare class IntegrationLevelElementsListAccessor<Element, Query, CreateElementData> {
1503
- protected client: IntegrationAppApiClient;
1504
- protected integrationSelector: string;
1505
- protected elementKey: string;
1506
- protected endpoint: string;
1507
- constructor(client: IntegrationAppApiClient, integrationSelector: string, elementKey: string);
1508
- list(query?: Query): Promise<PaginationResponse<Element>>;
1509
- create(data: CreateElementData): Promise<Element>;
1968
+ interface CreateIntegrationRequest {
1969
+ name?: string;
1970
+ key: string;
1971
+ baseUri: string;
1972
+ logoUri: string;
1510
1973
  }
1511
-
1512
- interface OpenFieldMappingInstanceConfigurationOptions extends OpenConfigurationOptions {
1974
+ interface UpdateIntegrationRequest {
1975
+ name?: string;
1976
+ key?: string;
1977
+ baseUri?: string;
1978
+ logoUri?: string;
1513
1979
  }
1514
- declare class FieldMappingsAccessor extends ElementListAccessor<FieldMapping, FindFieldMappingsQuery, CreateFieldMappingRequest> {
1515
- constructor(client: IntegrationAppApiClient);
1980
+ interface FindIntegrationsQuery extends PaginationQuery, SearchQuery {
1516
1981
  }
1517
- declare class FieldMappingAccessor extends ElementAccessor<FieldMapping, UpdateFieldMappingRequest, FieldMappingSelector> {
1518
- constructor(client: IntegrationAppApiClient, selector: string | FieldMappingSelector);
1519
- getAppSchema(): Promise<any>;
1520
- apply(integrationKeys: string[]): Promise<FieldMapping[]>;
1521
- setup(): Promise<any>;
1522
- reset(): Promise<any>;
1982
+ interface OpenNewConnectionOptions extends OpenConfigurationOptions {
1983
+ allowMultipleConnections?: boolean;
1984
+ name?: string;
1985
+ connectorParameters?: any;
1523
1986
  }
1524
- declare class FieldMappingInstancesAccessor extends ElementInstanceListAccessor<FieldMappingInstance, FindFieldMappingInstancesQuery> {
1525
- constructor(client: IntegrationAppApiClient);
1987
+ interface Integration extends BaseIntegration {
1988
+ connection?: BaseConnection;
1989
+ spec?: ConnectorSpec;
1526
1990
  }
1527
- declare class FieldMappingInstanceAccessor extends ElementInstanceAccessor<FieldMappingInstance, FieldMappingInstanceSelector, CreateFieldMappingInstanceRequest, UpdateFieldMappingInstanceRequest> {
1528
- private client;
1529
- constructor(client: IntegrationAppApiClient, selector: string | FieldMappingInstanceSelector);
1530
- setup(): Promise<void>;
1531
- reset(): Promise<void>;
1532
- openConfiguration({ onClose }?: OpenFieldMappingInstanceConfigurationOptions): Promise<void>;
1991
+
1992
+ declare enum IntegrationElementType {
1993
+ APP_DATA_SCHEMA = "app-data-schema",
1994
+ APP_EVENT_TYPE = "app-event-type",
1995
+ DATA_SOURCE = "data-source",
1996
+ SCHEMA = "schema",
1997
+ FIELD_MAPPING = "field-mapping",
1998
+ FLOW = "flow",
1999
+ INTEGRATION = "integration",
2000
+ ACTION = "action",
2001
+ DATA_LINK_TABLE = "data-link-table",
2002
+ EXTERNAL_EVENT = "external-event"
1533
2003
  }
1534
- declare class IntegrationLevelFieldMappingAccessor extends IntegrationLevelElementAccessor<FieldMapping, UpdateFieldMappingRequest> {
1535
- client: IntegrationAppApiClient;
1536
- integrationSelector: string;
1537
- fieldMappingSelector: string;
1538
- constructor(client: IntegrationAppApiClient, integrationSelector: string, fieldMappingSelector: string);
1539
- }
1540
- declare class IntegrationLevelFieldMappingsListAccessor extends IntegrationLevelElementsListAccessor<FieldMapping, ListFieldMappingsForIntegrationQuery, Omit<CreateFieldMappingRequest, 'integrationId'>> {
1541
- client: IntegrationAppApiClient;
1542
- integrationSelector: string;
1543
- constructor(client: IntegrationAppApiClient, integrationSelector: string);
1544
- }
1545
- declare class ConnectionLevelFieldMappingAccessor extends ConnectionLevelElementAccessor<FieldMappingInstance, UpdateFieldMappingInstanceRequest> {
1546
- client: IntegrationAppApiClient;
1547
- connectionSelector: string;
1548
- fieldMappingSelector: string;
1549
- query: InstanceKeyQuery;
1550
- constructor(client: IntegrationAppApiClient, connectionSelector: string, fieldMappingSelector: string, query: InstanceKeyQuery);
1551
- openConfiguration({ onClose }?: OpenFieldMappingInstanceConfigurationOptions): Promise<void>;
1552
- }
1553
- declare class ConnectionLevelFieldMappingsAccessor extends ConnectionLevelElementsListAccessor<FieldMapping, ListFieldMappingInstancesForConnectionQuery> {
1554
- client: IntegrationAppApiClient;
1555
- connectionSelector: string;
1556
- constructor(client: IntegrationAppApiClient, connectionSelector: string);
2004
+ interface IntegrationElementInstance {
2005
+ type: IntegrationElementType;
2006
+ instanceId?: string;
2007
+ data?: any;
1557
2008
  }
1558
2009
 
1559
- declare enum FieldMappingDirection {
1560
- IMPORT = "import",
1561
- EXPORT = "export",
1562
- BOTH = "both"
2010
+ interface FlowNode {
2011
+ type?: string;
2012
+ version?: number;
2013
+ name?: string;
2014
+ description?: string;
2015
+ config?: any;
2016
+ concurrency?: number;
2017
+ onError?: 'stop' | 'continue';
2018
+ ui?: any;
2019
+ inputSchema?: any;
2020
+ outputSchema?: any;
2021
+ outputExample?: any;
2022
+ links?: FlowNodeLink[];
2023
+ isCustomized?: boolean;
1563
2024
  }
1564
- interface FieldMapping extends WorkspaceElement {
1565
- revision: string;
1566
- publishedRevision?: string;
1567
- universalFieldMappingId?: string;
1568
- universalFieldMappingRevision?: string;
2025
+ interface BaseFlow extends BaseMembraneInterface {
1569
2026
  integrationId?: string;
1570
- integration?: Integration;
1571
- dataSourceId: string;
1572
- dataSourceKey: string;
1573
- appSchema: DataSchema;
1574
- direction: FieldMappingDirection;
1575
- defaultImportValue?: any;
1576
- defaultExportValue?: any;
1577
- importValue?: any;
1578
- exportValue?: any;
1579
- frozenImportFields?: any;
1580
- frozenExportFields?: any;
1581
- frozenUnifiedExportFields?: any;
2027
+ universalFlowId?: string;
2028
+ universalFlowRevision?: string;
2029
+ parametersSchema?: DataSchema;
2030
+ nodes?: Record<string, FlowNode>;
2031
+ autoCreateInstances?: boolean;
1582
2032
  archivedAt?: string;
2033
+ revision: string;
1583
2034
  customized?: boolean;
1584
- appliedToIntegrations?: AppliedToIntegrations<FieldMapping>;
1585
2035
  }
1586
- interface FieldMappingInstance extends WorkspaceElement {
2036
+ interface FlowNodeLink {
2037
+ key?: string;
2038
+ filter?: any;
2039
+ name?: string;
2040
+ }
2041
+
2042
+ interface BaseFlowInstance extends BaseMembraneInterface {
1587
2043
  userId: string;
1588
- revision: string;
1589
- user?: User;
1590
- connectionId: string;
1591
- connection?: Connection;
2044
+ connectionId?: string;
2045
+ flowId?: string;
2046
+ universalFlowId?: string;
1592
2047
  integrationId: string;
1593
- integration?: Integration;
1594
- fieldMappingRevision?: string;
1595
- fieldMappingId?: string;
1596
- fieldMapping?: FieldMapping;
1597
2048
  instanceKey?: string;
1598
- dataSourceInstanceId?: string;
1599
- dataSourceInstance?: DataSourceInstance;
1600
- dataSourceSchema?: DataSchema;
1601
- direction?: FieldMappingDirection;
1602
- appSchema?: DataSchema;
1603
- importValue?: any;
1604
- exportValue?: any;
1605
- isCustomized?: boolean;
1606
- unifiedExportValue?: any;
1607
- unifiedImportValue?: any;
1608
- frozenImportFields?: string[];
1609
- frozenExportFields?: string[];
2049
+ parameters?: any;
2050
+ parametersSchema?: DataSchema;
2051
+ nodes?: Record<string, FlowInstanceNode>;
2052
+ enabled: boolean;
2053
+ createdAt: string;
2054
+ updatedAt: string;
1610
2055
  state?: WorkspaceElementState;
1611
- error?: ErrorData;
1612
- externalSchema?: any;
1613
- }
1614
-
1615
- interface OpenIntegrationUIIntegrationConfigurationOptions extends OpenConfigurationOptions {
1616
- }
1617
- declare class IntegrationsAccessor extends ElementListAccessor<Integration, FindIntegrationsQuery, CreateIntegrationRequest> {
1618
- constructor(client: IntegrationAppApiClient);
1619
- }
1620
- declare class IntegrationAccessor extends ElementAccessor<Integration, UpdateIntegrationRequest> {
1621
- private client;
1622
- private integrationSelector;
1623
- baseUri: string;
1624
- constructor(client: IntegrationAppApiClient, integrationSelector: string);
1625
- get actions(): IntegrationLevelActionsListAccessor;
1626
- action(actionSelector: string): IntegrationLevelActionAccessor;
1627
- get flows(): IntegrationLevelFlowsListAccessor;
1628
- flow(flowSelector: string): IntegrationLevelFlowAccessor;
1629
- get dataSources(): IntegrationLevelDataSourcesListAccessor;
1630
- dataSource(dataSourceSelector: string): IntegrationLevelDataSourceAccessor;
1631
- get fieldMappings(): IntegrationLevelFieldMappingsListAccessor;
1632
- fieldMapping(fieldMappingSelector: string): IntegrationLevelFieldMappingAccessor;
1633
- setup(): Promise<Integration>;
1634
- getConnectorSpec(): Promise<ConnectionSpec>;
1635
- open({ onClose }?: OpenIntegrationUIIntegrationConfigurationOptions): Promise<void>;
1636
- openNewConnection({ allowMultipleConnections, name, connectorParameters, }?: OpenNewConnectionOptions): Promise<Connection>;
1637
- connect({ name, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, }?: {
1638
- name?: string;
1639
- parameters?: any;
1640
- connectorParameters?: any;
1641
- authOptionKey?: string;
1642
- allowMultipleConnections?: boolean;
1643
- } & ({
1644
- sameWindow: true;
1645
- redirectUri: string;
1646
- } | {
1647
- sameWindow?: false;
1648
- redirectUri?: never;
1649
- })): Promise<Connection | undefined>;
1650
- createConnection({ parameters, name }: {
1651
- parameters?: any;
1652
- name?: string;
1653
- }): Promise<Connection | undefined>;
1654
- disconnect(): Promise<void>;
1655
- getOperations(): Promise<OperationListItem[]>;
1656
- getOperation(key: string): Promise<OperationSpec>;
1657
- getDataCollections(): Promise<DataCollectionListItem[]>;
1658
- getDataCollection(key: string): Promise<DataCollectionSpec>;
1659
- }
1660
-
1661
- interface OpenFlowRunEditorOptions extends OpenConfigurationOptions {
1662
- }
1663
- declare class FlowRunsAccessor {
1664
- private readonly client;
1665
- constructor(client: IntegrationAppApiClient);
1666
- find(query: FindFlowRunsQuery): Promise<FindFlowRunsResponse>;
1667
- create(request: CreateFlowRunRequest): Promise<FlowRun>;
1668
- }
1669
- declare class FlowRunAccessor {
1670
- private readonly client;
1671
- id: string;
1672
- private baseUri;
1673
- constructor(client: IntegrationAppApiClient, id: string);
1674
- get(): Promise<FlowRun>;
1675
- stop(): Promise<void>;
1676
- getOutput(): Promise<any>;
1677
- getNodeRuns(nodeKey: string, parameters?: {
1678
- cursor?: string;
1679
- }): Promise<any>;
1680
- getNodeRun(nodeKey: string, runId: string): Promise<any>;
1681
- getNodeOutputs(nodeKey: string, parameters?: {
1682
- cursor?: string;
1683
- }): Promise<any>;
1684
- getNodeOutput(nodeKey: string, outputId: string): Promise<any>;
1685
- repeat(): Promise<FlowRun>;
1686
- openEditor({ onClose }?: OpenFlowRunEditorOptions): Promise<void>;
1687
- embedEditor({ mountTargetSelector, onClose, }?: {
1688
- mountTargetSelector?: string;
1689
- } & OpenFlowRunEditorOptions): Promise<void>;
1690
- }
1691
-
1692
- declare enum FlowRunState {
1693
- QUEUED = "queued",
1694
- RUNNING = "running",
1695
- COMPLETED = "completed",
1696
- STOPPED = "stopped",
1697
- FAILED = "failed"
1698
- }
1699
- declare enum FlowRunNodeState {
1700
- RUNNING = "running",
1701
- COMPLETED = "completed",
1702
- STOPPED = "stopped",
1703
- FAILED = "failed"
2056
+ outdated?: boolean;
2057
+ customized?: {
2058
+ name?: boolean;
2059
+ nodes?: boolean;
2060
+ };
2061
+ dependencies?: IntegrationElementInstance[];
1704
2062
  }
1705
- declare enum FlowRunLaunchedByTrigger {
1706
- ApiTrigger = "api-trigger",
1707
- ScheduleTrigger = "schedule-trigger",
1708
- AppEventTrigger = "app-event-trigger",
1709
- DataSourceTrigger = "data-source-trigger",
1710
- ExternalEvent = "external-event"
2063
+ declare enum FlowInstanceNodeState {
2064
+ SETUP_FAILED = "SETUP_FAILED",
2065
+ READY = "READY"
1711
2066
  }
1712
- interface FlowRun {
1713
- id: string;
1714
- name?: string;
1715
- flowInstanceId: string;
1716
- flowInstance?: FlowInstance;
1717
- universalFlowId?: string;
1718
- connectionId?: string;
1719
- connection?: Connection;
1720
- integrationId?: string;
1721
- integration?: Integration;
1722
- startNodeKey: string;
1723
- userId: string;
1724
- user?: Customer;
1725
- input?: any;
1726
- state: FlowRunState;
1727
- startTime: string;
1728
- endTime?: string;
2067
+ interface FlowInstanceNode extends FlowNode {
2068
+ state?: FlowInstanceNodeState;
1729
2069
  errors?: ErrorData[];
1730
- nodes?: Record<string, FlowRunNode>;
1731
- launchedBy?: FlowRunLaunchedBy;
1732
- }
1733
- interface FlowRunNode {
1734
- state: FlowRunNodeState;
1735
- runs?: number;
1736
- erroredRuns?: number;
1737
- outputs?: number;
1738
- }
1739
- interface FlowRunLaunchedBy {
1740
- type: FlowRunLaunchedByTrigger;
1741
- ids?: string[];
1742
- }
1743
- interface CreateFlowRunRequest {
1744
- flowInstanceId: string;
1745
- nodeKey?: string;
1746
- input?: any;
1747
- }
1748
- interface FindFlowRunsQuery extends PaginationQuery {
1749
- id?: string;
1750
- flowInstanceId?: string;
1751
- startNodeKey?: string;
1752
- flowId?: string;
1753
- universalFlowId?: string;
1754
- userId?: string;
1755
- state?: FlowRunState;
1756
- integrationId?: string;
1757
- connectionId?: string;
1758
- startedAfter?: string;
1759
- }
1760
- interface FindFlowRunsResponse extends PaginationResponse<FlowRun> {
2070
+ userConfig?: any;
2071
+ testInput?: any;
2072
+ dependencies?: IntegrationElementInstance[];
1761
2073
  }
1762
2074
 
1763
2075
  declare const createFlowInstanceSchema: z.ZodObject<{
@@ -1832,12 +2144,12 @@ declare const createFlowInstanceSchema: z.ZodObject<{
1832
2144
  }>>;
1833
2145
  }, "strip", z.ZodTypeAny, {
1834
2146
  name?: string | undefined;
1835
- userId?: string | undefined;
1836
- integrationId?: string | undefined;
1837
2147
  parameters?: any;
1838
- connectionId?: string | undefined;
2148
+ userId?: string | undefined;
1839
2149
  flowId?: string | undefined;
1840
- instanceKey?: string | undefined;
2150
+ connectionId?: string | undefined;
2151
+ integrationId?: string | undefined;
2152
+ instanceKey?: string | undefined;
1841
2153
  nodes?: Record<string, {
1842
2154
  concurrency?: number | undefined;
1843
2155
  type?: string | undefined;
@@ -1860,11 +2172,11 @@ declare const createFlowInstanceSchema: z.ZodObject<{
1860
2172
  } | undefined;
1861
2173
  }, {
1862
2174
  name?: string | undefined;
1863
- userId?: string | undefined;
1864
- integrationId?: string | undefined;
1865
2175
  parameters?: any;
1866
- connectionId?: string | undefined;
2176
+ userId?: string | undefined;
1867
2177
  flowId?: string | undefined;
2178
+ connectionId?: string | undefined;
2179
+ integrationId?: string | undefined;
1868
2180
  instanceKey?: string | undefined;
1869
2181
  nodes?: Record<string, {
1870
2182
  concurrency?: number | undefined;
@@ -2000,33 +2312,391 @@ declare const updateFlowInstanceSchema: z.ZodObject<{
2000
2312
  type CreateFlowInstanceRequest = z.infer<typeof createFlowInstanceSchema>;
2001
2313
  type UpdateFlowInstanceRequest = z.infer<typeof updateFlowInstanceSchema>;
2002
2314
 
2003
- declare enum IntegrationElementType {
2004
- APP_DATA_SCHEMA = "app-data-schema",
2005
- APP_EVENT_TYPE = "app-event-type",
2006
- DATA_SOURCE = "data-source",
2007
- SCHEMA = "schema",
2008
- FIELD_MAPPING = "field-mapping",
2009
- FLOW = "flow",
2010
- INTEGRATION = "integration",
2011
- ACTION = "action",
2012
- DATA_LINK_TABLE = "data-link-table",
2013
- EXTERNAL_EVENT = "external-event"
2315
+ declare enum FlowRunState {
2316
+ QUEUED = "queued",
2317
+ RUNNING = "running",
2318
+ COMPLETED = "completed",
2319
+ STOPPED = "stopped",
2320
+ FAILED = "failed"
2321
+ }
2322
+ declare enum FlowRunLaunchedByTrigger {
2323
+ ApiTrigger = "api-trigger",
2324
+ ScheduleTrigger = "schedule-trigger",
2325
+ AppEventTrigger = "app-event-trigger",
2326
+ DataSourceTrigger = "data-source-trigger",
2327
+ ExternalEvent = "external-event"
2328
+ }
2329
+ interface CreateFlowRunRequest {
2330
+ flowInstanceId: string;
2331
+ nodeKey?: string;
2332
+ input?: any;
2333
+ }
2334
+ interface FindFlowRunsQuery extends PaginationQuery {
2335
+ id?: string;
2336
+ flowInstanceId?: string;
2337
+ startNodeKey?: string;
2338
+ flowId?: string;
2339
+ universalFlowId?: string;
2340
+ userId?: string;
2341
+ state?: FlowRunState;
2342
+ integrationId?: string;
2343
+ connectionId?: string;
2344
+ startedAfter?: string;
2345
+ }
2346
+ interface FlowRunLaunchedBy {
2347
+ type: FlowRunLaunchedByTrigger;
2348
+ ids?: string[];
2349
+ }
2350
+ interface FindFlowRunsResponse extends PaginationResponse<FlowRun> {
2351
+ }
2352
+ interface FlowRun extends BaseFlowRun {
2353
+ flowInstance?: BaseFlowInstance;
2354
+ connection?: BaseConnection;
2355
+ integration?: BaseIntegration;
2356
+ user?: BaseCustomer;
2357
+ }
2358
+
2359
+ declare enum FlowRunNodeState {
2360
+ RUNNING = "running",
2361
+ COMPLETED = "completed",
2362
+ STOPPED = "stopped",
2363
+ FAILED = "failed"
2014
2364
  }
2015
- interface ElementTemplateFields {
2365
+ interface BaseFlowRun {
2016
2366
  id: string;
2367
+ name?: string;
2368
+ flowInstanceId: string;
2369
+ universalFlowId?: string;
2370
+ connectionId?: string;
2371
+ integrationId?: string;
2372
+ startNodeKey: string;
2373
+ userId: string;
2374
+ input?: any;
2375
+ state: FlowRunState;
2376
+ startTime: string;
2377
+ endTime?: string;
2378
+ errors?: ErrorData[];
2379
+ nodes?: Record<string, FlowRunNode>;
2380
+ launchedBy?: FlowRunLaunchedBy;
2381
+ }
2382
+ interface FlowRunNode {
2383
+ state: FlowRunNodeState;
2384
+ runs?: number;
2385
+ erroredRuns?: number;
2386
+ outputs?: number;
2387
+ }
2388
+
2389
+ interface BaseAppDataSchema extends BaseMembraneInterface {
2390
+ schema: any;
2391
+ code?: string;
2392
+ archivedAt?: string;
2393
+ revision?: string;
2394
+ }
2395
+
2396
+ interface FindAppDataSchemasQuery extends PaginationQuery {
2397
+ }
2398
+ type CreateAppDataSchemaRequest = {
2017
2399
  key: string;
2018
2400
  name: string;
2401
+ schema?: any;
2402
+ code?: string;
2403
+ };
2404
+ type UpdateAppDataSchemaRequest = {
2405
+ key?: string;
2406
+ name?: string;
2407
+ schema?: any;
2408
+ code?: string;
2409
+ archivedAt?: string;
2410
+ };
2411
+
2412
+ interface BaseAppEventType extends BaseMembraneInterface {
2019
2413
  revision: string;
2414
+ archivedAt?: string;
2415
+ subscribeRequest?: HttpRequestSpec;
2416
+ example?: any;
2417
+ schema?: DataSchema;
2418
+ globalWebhookUri: string;
2419
+ userIdFormula?: any;
2420
+ }
2421
+
2422
+ interface UpdateAppEventTypeRequest {
2423
+ key?: string;
2424
+ name?: string;
2425
+ subscribeRequest?: HttpRequestSpec;
2426
+ example?: any;
2427
+ schema?: DataSchema;
2428
+ userIdFormula?: any;
2429
+ }
2430
+ interface CreateAppEventTypeRequest extends UpdateAppEventTypeRequest {
2431
+ key: string;
2432
+ name: string;
2433
+ }
2434
+ interface FindAppEventTypesQuery extends PaginationQuery {
2435
+ includeArchived?: boolean;
2436
+ }
2437
+
2438
+ declare enum DataLinkDirection {
2439
+ IMPORT = "import",
2440
+ EXPORT = "export",
2441
+ BOTH = "both"
2442
+ }
2443
+ interface BaseDataLinkTable extends BaseMembraneInterface {
2444
+ archivedAt?: string;
2445
+ }
2446
+
2447
+ interface FindDataLinkTablesQuery extends PaginationQuery {
2448
+ }
2449
+ type CreateDataLinkTableRequest = Omit<BaseDataLinkTable, 'id' | 'userId'>;
2450
+ type UpdateDataLinkTableRequest = CreateDataLinkTableRequest;
2451
+
2452
+ interface DataSourceInstance extends BaseDataSourceInstance {
2453
+ user?: BaseCustomer;
2454
+ dataSource?: BaseDataSource;
2455
+ connection?: BaseConnection;
2456
+ integration?: BaseIntegration;
2457
+ }
2458
+
2459
+ interface ListFlowsForIntegrationQuery extends CommonListElementsQuery {
2460
+ universalFlowId?: string | 'null';
2461
+ }
2462
+ interface FindFlowsQuery extends ListFlowsForIntegrationQuery {
2463
+ integrationId?: string | 'null';
2464
+ }
2465
+ interface CreateFlowNodeRequest {
2466
+ type: string;
2467
+ config?: any;
2468
+ ui?: any;
2469
+ links?: FlowNodeLink[];
2470
+ }
2471
+ interface CreateFlowRequest {
2472
+ key: string;
2473
+ name: string;
2020
2474
  integrationId?: string;
2021
- integration?: Integration;
2022
- parentId?: string;
2023
- parentRevision?: string;
2024
- isCustomized?: boolean;
2025
- createdAt?: string;
2026
- updatedAt?: string;
2475
+ nodes?: Record<string, CreateFlowNodeRequest>;
2476
+ parametersSchema?: DataSchema;
2477
+ autoCreateInstances?: boolean;
2478
+ }
2479
+ interface UpdateFlowRequest extends CreateFlowRequest {
2480
+ archivedAt?: string;
2481
+ }
2482
+ interface FlowSelector extends IntegrationSpecificElementSelector {
2483
+ autoCreate?: boolean;
2484
+ }
2485
+ type ListFlowInstancesForConnectionQuery = CommonInstancesListQuery & {
2486
+ flowId?: string;
2487
+ flowKey?: string;
2488
+ enabled?: boolean;
2489
+ };
2490
+ type FindFlowInstancesQuery = ListFlowInstancesForConnectionQuery & CommonIntegrationOrConnectionQuery;
2491
+ interface FlowInstanceSelector extends ConnectionSelector, ElementInstanceSelector {
2492
+ flowId?: string;
2493
+ flowKey?: string;
2494
+ instanceKey?: string;
2495
+ autoUpdate?: boolean;
2496
+ }
2497
+ interface ResetFlowInstanceOptions {
2498
+ name?: boolean;
2499
+ nodes?: Record<string, boolean>;
2500
+ allNodes?: boolean;
2501
+ }
2502
+ interface RunFlowOptions {
2503
+ nodeKey?: string;
2504
+ input?: any;
2505
+ returnImmediately?: boolean;
2506
+ onUpdate?: (...args: any) => void;
2507
+ }
2508
+ interface Flow extends BaseFlow {
2509
+ integration?: BaseIntegration;
2510
+ appliedToIntegrations?: AppliedToIntegrations<Flow>;
2511
+ }
2512
+ interface FlowInstance extends BaseFlowInstance {
2513
+ user?: BaseCustomer;
2514
+ connection?: BaseConnection;
2515
+ flow?: Flow;
2516
+ integration?: BaseIntegration;
2517
+ }
2518
+
2519
+ interface ListDataSourcesForIntegrationQuery extends PaginationQuery {
2520
+ universalDataSourceId?: string | 'null';
2521
+ }
2522
+ interface FindDataSourcesQuery extends ListDataSourcesForIntegrationQuery {
2523
+ integrationId?: string | 'null';
2524
+ }
2525
+ type CreateDataSourceRequest = {
2526
+ key: string;
2527
+ name: string;
2528
+ integrationId?: string;
2529
+ udm?: string;
2530
+ pullUpdatesIntervalSeconds?: number;
2531
+ fullSyncIntervalSeconds?: number;
2532
+ rootPath?: string;
2533
+ defaultPath?: string;
2534
+ collectionKey?: string;
2535
+ collectionParameters?: any;
2536
+ };
2537
+ type UpdateDataSourceRequest = {
2538
+ key?: string;
2539
+ name?: string;
2540
+ archivedAt?: string;
2541
+ udm?: string;
2542
+ pullUpdatesIntervalSeconds?: number;
2543
+ fullSyncIntervalSeconds?: number;
2544
+ rootPath?: string;
2545
+ defaultPath?: string;
2546
+ };
2547
+ interface DataSourceSelector extends IntegrationSpecificElementSelector {
2548
+ }
2549
+ interface DataSourceInstanceSelector extends ConnectionSelector, FlowInstanceSelector, ElementInstanceSelector {
2550
+ dataSourceKey?: string;
2551
+ dataSourceId?: string;
2552
+ instanceKey?: string;
2553
+ nodeKey?: string;
2554
+ udm?: string;
2555
+ }
2556
+ interface FindDataSourceInstancesQuery extends PaginationQuery {
2557
+ userId?: string;
2558
+ dataSourceId?: string;
2559
+ universalDataSourceId?: string;
2560
+ connectionId?: string;
2561
+ integrationKey?: string;
2562
+ integrationId?: string;
2563
+ }
2564
+ interface CreateDataSourceInstanceRequest {
2565
+ dataSourceId: string;
2566
+ connectionId: string;
2567
+ path?: string;
2568
+ }
2569
+ interface UpdateDataSourceInstanceRequest {
2570
+ path?: string;
2571
+ collectionKey?: string;
2572
+ collectionParameters?: any;
2573
+ pullUpdatesIntervalSeconds?: number;
2574
+ fullSyncIntervalSeconds?: number;
2575
+ subscribedTo?: {
2576
+ created?: boolean;
2577
+ updated?: boolean;
2578
+ deleted?: boolean;
2579
+ };
2580
+ }
2581
+ type ListDataSourceInstancesForConnectionQuery = PaginationQuery & {
2582
+ dataSourceId?: string;
2583
+ };
2584
+ interface DataSource extends BaseDataSource {
2585
+ integration?: BaseIntegration;
2586
+ appliedToIntegrations?: AppliedToIntegrations<DataSource>;
2587
+ }
2588
+
2589
+ interface ListFieldMappingsForIntegrationQuery extends CommonListElementsQuery {
2590
+ universalFieldMappingId?: string | 'null';
2591
+ }
2592
+ interface FindFieldMappingsQuery extends ListFieldMappingsForIntegrationQuery {
2593
+ integrationId?: string | 'null';
2594
+ }
2595
+ interface UpdateFieldMappingRequest {
2596
+ key?: string;
2597
+ name?: string;
2598
+ dataSourceKey?: string;
2599
+ dataSourceId?: string;
2600
+ appSchema?: DataSchema;
2601
+ direction?: FieldMappingDirection;
2602
+ defaultImportValue?: any;
2603
+ exportValue?: any;
2604
+ importValue?: any;
2605
+ defaultExportValue?: any;
2606
+ frozenImportFields?: any;
2607
+ frozenExportFields?: any;
2608
+ frozenUnifiedExportFields?: any;
2609
+ archivedAt?: string;
2610
+ }
2611
+ interface CreateFieldMappingRequest extends UpdateFieldMappingRequest {
2612
+ key: string;
2613
+ name: string;
2614
+ integrationId?: string;
2615
+ }
2616
+ interface FieldMappingSelector extends IntegrationSpecificElementSelector {
2617
+ }
2618
+ interface FieldMapping extends BaseFieldMapping {
2619
+ integration?: BaseIntegration;
2620
+ appliedToIntegrations?: AppliedToIntegrations<FieldMapping>;
2621
+ }
2622
+
2623
+ type ScenarioToDo = {
2624
+ name: string;
2625
+ description: string;
2626
+ isComplete: boolean;
2627
+ };
2628
+ type ScenarioElement = {
2629
+ id: string;
2630
+ type: IntegrationElementType;
2631
+ element?: any;
2632
+ };
2633
+ interface FindScenariosQuery extends SearchQuery, PaginationQuery {
2634
+ }
2635
+ interface CreateScenarioRequest {
2636
+ name: string;
2637
+ key: string;
2638
+ elements?: ScenarioElement[];
2639
+ todos?: ScenarioToDo[];
2640
+ }
2641
+ interface UpdateScenarioRequest {
2642
+ name?: string;
2643
+ key?: string;
2644
+ elements?: ScenarioElement[];
2645
+ todos?: ScenarioToDo[];
2646
+ }
2647
+ interface Scenario extends BaseScenario {
2648
+ appliedToIntegrations?: BaseIntegration[];
2649
+ }
2650
+
2651
+ interface BaseScenario extends BaseMembraneInterface {
2652
+ appId: string;
2653
+ scenarioTemplateId?: string;
2654
+ elements?: ScenarioElement[];
2655
+ connectors?: MinimalConnector[];
2656
+ todos?: ScenarioToDo[];
2027
2657
  archivedAt?: string;
2028
2658
  }
2029
- interface ElementInstanceFields {
2659
+
2660
+ declare enum ScreenType {
2661
+ Integration = "integration"
2662
+ }
2663
+ declare enum ScreenBlockType {
2664
+ Flow = "flow",
2665
+ FieldMapping = "field-mapping",
2666
+ DataSource = "data-source",
2667
+ Action = "action"
2668
+ }
2669
+ interface ScreenBlock {
2670
+ type: ScreenBlockType;
2671
+ [key: string]: any;
2672
+ }
2673
+ interface ScreenSelector {
2674
+ id?: string;
2675
+ type?: ScreenType;
2676
+ key?: string;
2677
+ autoCreate?: boolean;
2678
+ connectionId?: string;
2679
+ }
2680
+ interface UpdateScreenRequest {
2681
+ blocks?: ScreenBlock[];
2682
+ key?: string;
2683
+ }
2684
+ interface CreateScreenRequest extends UpdateScreenRequest {
2685
+ type: ScreenType;
2686
+ }
2687
+ interface FindScreensQuery extends PaginationQuery {
2688
+ type?: ScreenType;
2689
+ }
2690
+ interface Screen extends BaseScreen {
2691
+ }
2692
+
2693
+ interface BaseScreen extends BaseWorkspaceElement {
2694
+ type: ScreenType;
2695
+ key?: string;
2696
+ blocks: ScreenBlock[];
2697
+ }
2698
+
2699
+ interface BaseActionInstance {
2030
2700
  id: string;
2031
2701
  name: string;
2032
2702
  revision: string;
@@ -2034,470 +2704,306 @@ interface ElementInstanceFields {
2034
2704
  parentRevision?: string;
2035
2705
  universalParentId?: string;
2036
2706
  userId: string;
2037
- user?: Customer;
2038
2707
  instanceKey?: string;
2039
- isCustomized?: boolean;
2040
- connectionId: string;
2041
- connection?: Connection;
2042
- integrationId?: string;
2043
- integration?: Integration;
2044
- dependencies?: IntegrationElementInstance[];
2045
- errors?: ErrorData[];
2046
2708
  createdAt?: string;
2047
2709
  updatedAt?: string;
2048
2710
  archivedAt?: string;
2049
- }
2050
- interface IntegrationElementInstance {
2051
- type: IntegrationElementType;
2052
- instanceId?: string;
2053
- data?: any;
2054
- }
2055
-
2056
- interface FlowNode {
2057
- type?: string;
2058
- version?: number;
2059
- name?: string;
2060
- description?: string;
2061
- config?: any;
2062
- concurrency?: number;
2063
- onError?: 'stop' | 'continue';
2064
- ui?: any;
2711
+ type: ActionType;
2065
2712
  inputSchema?: any;
2713
+ config?: any;
2066
2714
  outputSchema?: any;
2067
- outputExample?: any;
2068
- links?: FlowNodeLink[];
2069
- isCustomized?: boolean;
2070
- }
2071
- interface Flow extends WorkspaceElement {
2072
- integrationId?: string;
2073
- integration?: Integration;
2074
- universalFlowId?: string;
2075
- universalFlowRevision?: string;
2076
- parametersSchema?: DataSchema;
2077
- nodes?: Record<string, FlowNode>;
2078
- autoCreateInstances?: boolean;
2079
- archivedAt?: string;
2080
- revision: string;
2081
- customized?: boolean;
2082
- appliedToIntegrations?: AppliedToIntegrations<Flow>;
2715
+ isOutdated?: boolean;
2716
+ state: WorkspaceElementState;
2083
2717
  }
2084
- interface FlowInstance extends WorkspaceElement {
2718
+
2719
+ interface BaseFieldMappingInstance extends BaseMembraneInterface {
2085
2720
  userId: string;
2086
- user?: User;
2087
- connectionId?: string;
2088
- connection?: Connection;
2089
- flow?: Flow;
2090
- flowId?: string;
2091
- universalFlowId?: string;
2721
+ revision: string;
2722
+ connectionId: string;
2092
2723
  integrationId: string;
2093
- integration?: Integration;
2724
+ fieldMappingRevision?: string;
2725
+ fieldMappingId?: string;
2094
2726
  instanceKey?: string;
2095
- parameters?: any;
2096
- parametersSchema?: DataSchema;
2097
- nodes?: Record<string, FlowInstanceNode>;
2098
- enabled: boolean;
2099
- createdAt: string;
2100
- updatedAt: string;
2727
+ dataSourceInstanceId?: string;
2728
+ dataSourceSchema?: DataSchema;
2729
+ direction?: FieldMappingDirection;
2730
+ appSchema?: DataSchema;
2731
+ importValue?: any;
2732
+ exportValue?: any;
2733
+ isCustomized?: boolean;
2734
+ unifiedExportValue?: any;
2735
+ unifiedImportValue?: any;
2736
+ frozenImportFields?: string[];
2737
+ frozenExportFields?: string[];
2101
2738
  state?: WorkspaceElementState;
2102
- outdated?: boolean;
2103
- customized?: {
2104
- name?: boolean;
2105
- nodes?: boolean;
2106
- };
2107
- dependencies?: IntegrationElementInstance[];
2108
- }
2109
- declare enum FlowInstanceNodeState {
2110
- SETUP_FAILED = "SETUP_FAILED",
2111
- READY = "READY"
2112
- }
2113
- interface FlowInstanceNode extends FlowNode {
2114
- state?: FlowInstanceNodeState;
2115
- errors?: ErrorData[];
2116
- userConfig?: any;
2117
- testInput?: any;
2118
- dependencies?: IntegrationElementInstance[];
2119
- }
2120
- interface FlowNodeLink {
2121
- key?: string;
2122
- filter?: any;
2123
- name?: string;
2739
+ error?: ErrorData;
2740
+ externalSchema?: any;
2124
2741
  }
2125
2742
 
2126
- interface OpenFlowInstanceConfigurationOptions extends OpenConfigurationOptions {
2127
- nodeKey?: string;
2128
- }
2129
- interface OpenFlowInstanceEditorOptions extends OpenConfigurationOptions {
2130
- }
2131
- declare class FlowsAccessor extends ElementListAccessor<Flow, FindFlowsQuery, CreateFlowRequest> {
2132
- constructor(client: IntegrationAppApiClient);
2133
- }
2134
- declare class FlowAccessor extends ElementAccessor<Flow, UpdateFlowRequest, FlowSelector> {
2135
- constructor(client: IntegrationAppApiClient, selector: FlowSelector | string);
2136
- apply(integrationKeys: string[]): Promise<Flow[]>;
2137
- reset(): Promise<Flow>;
2138
- }
2139
- declare class FlowInstancesAccessor extends ElementInstanceListAccessor<FlowInstance, FindFlowInstancesQuery> {
2140
- constructor(client: IntegrationAppApiClient);
2141
- create(data: CreateFlowInstanceRequest): Promise<FlowInstance>;
2142
- }
2143
- declare class FlowInstanceAccessor extends ElementInstanceAccessor<FlowInstance, FlowInstanceSelector, CreateFlowInstanceRequest, UpdateFlowInstanceRequest> {
2144
- protected client: IntegrationAppApiClient;
2145
- protected selector: FlowInstanceSelector | string;
2146
- constructor(client: IntegrationAppApiClient, selector: FlowInstanceSelector | string);
2147
- enable(): Promise<FlowInstance>;
2148
- disable(): Promise<FlowInstance>;
2149
- updateToLatestFlow(): Promise<FlowInstance>;
2150
- setup(): Promise<FlowInstance>;
2151
- reset(options?: ResetFlowInstanceOptions): Promise<FlowInstance>;
2152
- openConfiguration({ nodeKey, onClose }?: OpenFlowInstanceConfigurationOptions): Promise<void>;
2153
- openEditor({ onClose }?: OpenFlowInstanceEditorOptions): Promise<void>;
2154
- embedEditor({ mountTargetSelector, onClose, }?: {
2155
- mountTargetSelector?: string;
2156
- } & OpenFlowInstanceEditorOptions): Promise<void>;
2157
- startRun(options?: RunFlowOptions): Promise<FlowRun>;
2158
- run(options?: RunFlowOptions): Promise<FlowRun>;
2159
- }
2160
- declare class IntegrationLevelFlowAccessor extends IntegrationLevelElementAccessor<Flow, UpdateFlowRequest> {
2161
- client: IntegrationAppApiClient;
2162
- integrationSelector: string;
2163
- flowSelector: string;
2164
- constructor(client: IntegrationAppApiClient, integrationSelector: string, flowSelector: string);
2165
- }
2166
- declare class IntegrationLevelFlowsListAccessor extends IntegrationLevelElementsListAccessor<Flow, ListFlowsForIntegrationQuery, Omit<CreateFlowRequest, 'integrationId'>> {
2167
- client: IntegrationAppApiClient;
2168
- integrationSelector: string;
2169
- constructor(client: IntegrationAppApiClient, integrationSelector: string);
2743
+ interface BaseDataLinkTableInstance extends BaseMembraneInterface {
2744
+ dataLinkTableId?: string;
2745
+ connectionId?: string;
2746
+ integrationId: string;
2747
+ instanceKey?: string;
2748
+ userId: string;
2749
+ archivedAt?: string;
2170
2750
  }
2171
- declare class ConnectionLevelFlowAccessor extends ConnectionLevelElementAccessor<FlowInstance, UpdateFlowInstanceRequest> {
2172
- client: IntegrationAppApiClient;
2173
- connectionSelector: string;
2174
- flowSelector: string;
2175
- query: InstanceKeyQuery;
2176
- constructor(client: IntegrationAppApiClient, connectionSelector: string, flowSelector: string, query: InstanceKeyQuery);
2177
- enable(): Promise<FlowInstance>;
2178
- disable(): Promise<FlowInstance>;
2179
- run(options: {
2180
- nodeKey?: string;
2181
- input?: any;
2182
- }): Promise<FlowRun>;
2183
- openConfiguration(options?: OpenFlowInstanceConfigurationOptions): Promise<void>;
2184
- openEditor(options?: OpenFlowInstanceEditorOptions): Promise<void>;
2751
+ interface DataLink {
2752
+ id: string;
2753
+ dataLinkTableInstanceId: string;
2754
+ externalRecordId: string;
2755
+ appRecordId: string;
2756
+ direction: DataLinkDirection;
2185
2757
  }
2186
- declare class ConnectionLevelFlowsAccessor extends ConnectionLevelElementsListAccessor<Flow, ListFlowInstancesForConnectionQuery> {
2187
- client: IntegrationAppApiClient;
2188
- connectionSelector: string;
2189
- constructor(client: IntegrationAppApiClient, connectionSelector: string);
2758
+
2759
+ interface BaseAppEventSubscription extends BaseMembraneInterface {
2760
+ revision: string;
2761
+ appEventTypeId: string;
2762
+ userId: string;
2763
+ instanceKey?: string;
2764
+ isSubscribed: boolean;
2765
+ schema?: DataSchema;
2766
+ webhookUri: string;
2767
+ subscriptionRequest: HttpRequestSpec;
2768
+ subscriptionResponse?: any;
2769
+ archivedAt?: string;
2190
2770
  }
2191
2771
 
2192
- interface ListDataSourcesForIntegrationQuery extends PaginationQuery {
2193
- universalDataSourceId?: string | 'null';
2772
+ interface BaseAppDataSchemaInstance extends BaseMembraneInterface {
2773
+ appId: string;
2774
+ userId: string;
2775
+ appDataSchemaId: string;
2776
+ appDataSchemaRevision: string;
2777
+ instanceKey?: string;
2778
+ schema?: any;
2779
+ error?: ErrorData;
2780
+ archivedAt?: string;
2194
2781
  }
2195
- interface FindDataSourcesQuery extends ListDataSourcesForIntegrationQuery {
2196
- integrationId?: string | 'null';
2782
+
2783
+ declare enum ExternalEventSubscriptionStatus {
2784
+ Subscribed = "subscribed",
2785
+ Unsubscribed = "unsubscribed",
2786
+ Error = "error"
2197
2787
  }
2198
- type CreateDataSourceRequest = {
2199
- key: string;
2200
- name: string;
2201
- integrationId?: string;
2202
- udm?: string;
2203
- pullUpdatesIntervalSeconds?: number;
2204
- fullSyncIntervalSeconds?: number;
2205
- rootPath?: string;
2206
- defaultPath?: string;
2207
- collectionKey?: string;
2208
- collectionParameters?: any;
2209
- };
2210
- type UpdateDataSourceRequest = {
2211
- key?: string;
2788
+ declare enum ExternalEventSubscriptionType {
2789
+ DataRecordCreated = "data-record-created",
2790
+ DataRecordUpdated = "data-record-updated",
2791
+ DataRecordDeleted = "data-record-deleted",
2792
+ ConnectorEvent = "connector-event"
2793
+ }
2794
+ interface ExternalEventSubscriptionConfig {
2795
+ type: ExternalEventSubscriptionType;
2796
+ dataSource?: DataSourceUnitConfig;
2797
+ eventKey?: string;
2798
+ eventParameters?: any;
2799
+ }
2800
+ interface BaseExternalEventSubscription {
2801
+ id: string;
2212
2802
  name?: string;
2803
+ userId: string;
2804
+ connectionId: string;
2805
+ integrationId: string;
2806
+ uuid: string;
2807
+ config?: ExternalEventSubscriptionConfig;
2808
+ status?: ExternalEventSubscriptionStatus;
2809
+ error?: ErrorData;
2810
+ isRealTime?: boolean;
2811
+ requiresPull?: boolean;
2812
+ requiresFullSync?: boolean;
2813
+ createdAt?: string;
2213
2814
  archivedAt?: string;
2214
- udm?: string;
2815
+ stateData?: any;
2816
+ nextPullEventsTimestamp?: number;
2215
2817
  pullUpdatesIntervalSeconds?: number;
2216
2818
  fullSyncIntervalSeconds?: number;
2217
- rootPath?: string;
2218
- defaultPath?: string;
2219
- };
2220
- interface DataSourceInstanceSelector extends ConnectionSelector, FlowInstanceSelector, ElementInstanceSelector {
2221
- dataSourceKey?: string;
2222
- dataSourceId?: string;
2223
- instanceKey?: string;
2224
- nodeKey?: string;
2225
- udm?: string;
2819
+ nextRefreshTimestamp?: number;
2820
+ globalWebhookKey?: string;
2821
+ globalWebhookEventSelector?: string;
2226
2822
  }
2227
- interface FindDataSourceInstancesQuery extends PaginationQuery {
2823
+
2824
+ interface ActionInstance extends BaseActionInstance {
2825
+ user?: BaseCustomer;
2826
+ parent?: BaseAction;
2827
+ }
2828
+
2829
+ interface FindExternalEventSubscriptionsQuery extends PaginationQuery {
2228
2830
  userId?: string;
2229
- dataSourceId?: string;
2230
- universalDataSourceId?: string;
2231
2831
  connectionId?: string;
2232
- integrationKey?: string;
2233
2832
  integrationId?: string;
2234
2833
  }
2235
- interface CreateDataSourceInstanceRequest {
2236
- dataSourceId: string;
2834
+
2835
+ type ListFieldMappingInstancesForConnectionQuery = CommonInstancesListQuery & {
2836
+ fieldMappingId?: string;
2837
+ universalFieldMappingId?: string;
2838
+ dataSourceInstanceId?: string;
2839
+ };
2840
+ type FindFieldMappingInstancesQuery = ListFieldMappingInstancesForConnectionQuery & CommonIntegrationOrConnectionQuery;
2841
+ interface CreateFieldMappingInstanceRequest {
2237
2842
  connectionId: string;
2238
- path?: string;
2843
+ fieldMappingId?: string;
2844
+ instanceKey?: string;
2845
+ importValue?: any;
2846
+ exportValue?: any;
2239
2847
  }
2240
- interface UpdateDataSourceInstanceRequest {
2241
- path?: string;
2242
- collectionKey?: string;
2243
- collectionParameters?: any;
2244
- pullUpdatesIntervalSeconds?: number;
2245
- fullSyncIntervalSeconds?: number;
2246
- subscribedTo?: {
2247
- created?: boolean;
2248
- updated?: boolean;
2249
- deleted?: boolean;
2250
- };
2848
+ interface UpdateFieldMappingInstanceRequest {
2849
+ importValue?: any;
2850
+ exportValue?: any;
2251
2851
  }
2252
- type ListDataSourceInstancesForConnectionQuery = PaginationQuery & {
2253
- dataSourceId?: string;
2254
- };
2255
-
2256
- interface OpenDataSourceConfigurationOptions extends OpenConfigurationOptions {
2852
+ interface FieldMappingInstanceSelector extends ConnectionSelector, FlowInstanceSelector, ElementInstanceSelector {
2853
+ fieldMappingKey?: string;
2854
+ fieldMappingId?: string;
2855
+ instanceKey?: string;
2856
+ nodeKey?: string;
2257
2857
  }
2258
- declare class DataSourcesAccessor extends ElementListAccessor<DataSource, FindDataSourcesQuery, CreateDataSourceRequest> {
2259
- constructor(client: IntegrationAppApiClient);
2858
+ interface FieldMappingInstance extends BaseFieldMappingInstance {
2859
+ user?: BaseCustomer;
2860
+ connection?: BaseConnection;
2861
+ integration?: BaseIntegration;
2862
+ fieldMapping?: BaseFieldMapping;
2863
+ dataSourceInstance?: DataSourceInstance;
2260
2864
  }
2261
- declare class DataSourceAccessor extends ElementAccessor<DataSource, UpdateDataSourceRequest, DataSourceSelector> {
2262
- constructor(client: IntegrationAppApiClient, selector: DataSourceSelector | string);
2263
- apply(integrationKeys: string[]): Promise<DataSource[]>;
2264
- setup(): Promise<void>;
2265
- reset(): Promise<any>;
2865
+
2866
+ interface FindDataLinkTableInstancesQuery extends PaginationQuery {
2867
+ connectionId?: string;
2868
+ integrationId?: string;
2869
+ dataLinkTableId?: string;
2266
2870
  }
2267
- declare class DataSourceInstancesAccessor extends ElementInstanceListAccessor<DataSourceInstance, FindDataSourceInstancesQuery> {
2268
- constructor(client: IntegrationAppApiClient);
2871
+ interface DataLinkTableInstanceSelector extends ConnectionSelector, ElementInstanceSelector {
2872
+ dataLinkTableId?: string;
2873
+ dataLinkTableKey?: string;
2874
+ instanceKey?: string;
2269
2875
  }
2270
- declare class DataSourceInstanceAccessor extends ElementInstanceAccessor<DataSourceInstance, DataSourceInstanceSelector, CreateDataSourceInstanceRequest, UpdateDataSourceInstanceRequest> {
2271
- client: IntegrationAppApiClient;
2272
- constructor(client: IntegrationAppApiClient, selector: string | DataSourceInstanceSelector);
2273
- setup(): Promise<void>;
2274
- reset(): Promise<void>;
2275
- openConfiguration({ onClose }?: OpenDataSourceConfigurationOptions): Promise<void>;
2276
- unifiedFieldsToNative(unifiedFields: any): Promise<any>;
2277
- getCollection(): Promise<DataCollectionSpec>;
2278
- listRecords(request?: DataCollectionListRequest): Promise<DataCollectionListResponse>;
2279
- matchRecord(request: DataCollectionMatchRequest): Promise<DataCollectionMatchResponse>;
2280
- searchRecords(request: DataCollectionSearchRequest): Promise<DataCollectionSearchResponse>;
2281
- findRecordById(request: string | DataCollectionFindByIdRequest): Promise<DataCollectionFindByIdResponse>;
2282
- createRecord(request: DataCollectionCreateRequest): Promise<DataCollectionCreateResponse>;
2283
- updateRecord(request: DataCollectionUpdateRequest): Promise<DataCollectionUpdateResponse>;
2284
- deleteRecord(request: string | DataCollectionFindByIdRequest): Promise<DataCollectionDeleteResponse>;
2285
- findRecords(request?: DataCollectionFindRequest): Promise<DataCollectionFindResponse>;
2876
+ interface UpdateDataLinkTableInstanceRequest {
2286
2877
  }
2287
- declare class IntegrationLevelDataSourceAccessor extends IntegrationLevelElementAccessor<DataSource, UpdateDataSourceRequest> {
2288
- client: IntegrationAppApiClient;
2289
- integrationSelector: string;
2290
- dataSourceSelector: string;
2291
- constructor(client: IntegrationAppApiClient, integrationSelector: string, dataSourceSelector: string);
2878
+ interface FindDataLinksInTableQuery extends PaginationQuery {
2879
+ direction?: DataLinkDirection;
2880
+ appRecordId?: string;
2881
+ externalRecordId?: string;
2292
2882
  }
2293
- declare class IntegrationLevelDataSourcesListAccessor extends IntegrationLevelElementsListAccessor<DataSource, ListDataSourcesForIntegrationQuery, Omit<CreateDataSourceRequest, 'integrationId'>> {
2294
- client: IntegrationAppApiClient;
2295
- integrationSelector: string;
2296
- constructor(client: IntegrationAppApiClient, integrationSelector: string);
2883
+ interface CreateDataLinkRequest {
2884
+ direction?: DataLinkDirection;
2885
+ appRecordId: string;
2886
+ externalRecordId: string;
2297
2887
  }
2298
- declare class ConnectionLevelDataSourceAccessor extends ConnectionLevelElementAccessor<DataSourceInstance, UpdateDataSourceInstanceRequest> {
2299
- client: IntegrationAppApiClient;
2300
- connectionSelector: string;
2301
- dataSourceSelector: string;
2302
- query: InstanceKeyQuery;
2303
- constructor(client: IntegrationAppApiClient, connectionSelector: string, dataSourceSelector: string, query: InstanceKeyQuery);
2304
- openConfiguration(options?: OpenDataSourceConfigurationOptions): Promise<void>;
2888
+ interface DeleteDataLinkRequest {
2889
+ direction?: DataLinkDirection;
2890
+ appRecordId: string;
2891
+ externalRecordId: string;
2305
2892
  }
2306
- declare class ConnectionLevelDataSourcesAccessor extends ConnectionLevelElementsListAccessor<DataSource, ListDataSourceInstancesForConnectionQuery> {
2307
- client: IntegrationAppApiClient;
2308
- connectionSelector: string;
2309
- constructor(client: IntegrationAppApiClient, connectionSelector: string);
2893
+ interface FindDataLinksResponse extends PaginationResponse<DataLink> {
2894
+ }
2895
+ interface DataLinkTableInstance extends BaseDataLinkTableInstance {
2896
+ dataLinkTable?: BaseDataLinkTable;
2897
+ connection?: BaseConnection;
2898
+ integration?: BaseIntegration;
2899
+ user?: BaseCustomer;
2310
2900
  }
2311
2901
 
2312
- interface DataSourceUnitConfig {
2313
- key?: string;
2314
- collectionKey?: any;
2315
- collectionParameters?: any;
2316
- udm?: any;
2317
- path?: string;
2318
- pullUpdatesIntervalSeconds?: number;
2319
- fullSyncIntervalSeconds?: number;
2902
+ interface FindAppEventSubscriptionsQuery extends PaginationQuery {
2903
+ id?: string;
2904
+ userId?: string;
2905
+ instanceKey?: string;
2906
+ appEventTypeId?: string;
2907
+ isSubscribed?: boolean;
2320
2908
  }
2321
- interface DataSource extends WorkspaceElement {
2322
- revision: string;
2323
- publishedRevision?: string;
2324
- integrationId?: string;
2325
- integration?: Integration;
2326
- universalDataSourceId?: string;
2327
- universalDataSourceRevision?: string;
2328
- udm?: string;
2329
- pullUpdatesIntervalSeconds?: number;
2330
- fullSyncIntervalSeconds?: number;
2331
- collectionKey?: string;
2332
- collectionParameters?: any;
2333
- archivedAt?: string;
2334
- createdAt?: string;
2335
- updatedAt?: string;
2336
- customized?: boolean;
2337
- appliedToIntegrations?: AppliedToIntegrations<DataSource>;
2338
- defaultPath?: string;
2909
+ interface UpdateAppEventSubscriptionRequest {
2339
2910
  }
2340
- interface DataSourceInstance extends WorkspaceElement {
2341
- userId: string;
2342
- revision: string;
2343
- user?: User;
2344
- dataSourceRevision?: string;
2345
- dataSourceId?: string;
2346
- universalDataSourceId?: string;
2347
- dataSource?: DataSource;
2348
- udm?: string;
2349
- connectionId: string;
2350
- connection?: Connection;
2351
- integrationId: string;
2352
- integration?: Integration;
2911
+ interface AppEventSubscriptionSelector extends Omit<ElementInstanceSelector, 'parentKey' | 'parentId'> {
2912
+ appEventTypeKey?: string;
2913
+ appEventTypeId?: string;
2353
2914
  instanceKey?: string;
2354
- collectionKey?: string;
2355
- collectionParameters?: any;
2356
- defaultCollectionKey?: string;
2357
- defaultCollectionParameters?: any;
2358
- collectionSpec?: DataCollectionSpec;
2359
- isCustomized?: boolean;
2360
- errors?: ErrorData[];
2361
- pullUpdatesIntervalSeconds?: number;
2362
- fullSyncIntervalSeconds?: number;
2363
- path?: string;
2364
- defaultPath?: string;
2365
2915
  }
2366
- interface DataSourceSelector extends IntegrationSpecificElementSelector {
2916
+ interface AppEventSubscription extends BaseAppEventSubscription {
2917
+ appEventType?: BaseAppEventType;
2918
+ user?: BaseCustomer;
2367
2919
  }
2368
2920
 
2369
- declare class ConnectionsAccessor extends ElementInstanceListAccessor<Connection, FindConnectionsQuery> {
2370
- constructor(client: IntegrationAppApiClient);
2371
- create(data: CreateConnectionRequest): Promise<Connection>;
2921
+ interface FindAppDataSchemaInstancesQuery extends PaginationQuery {
2922
+ id?: string;
2923
+ userId?: string;
2924
+ appDataSchemaId?: string;
2925
+ instanceKey?: string;
2372
2926
  }
2373
- declare class ConnectionAccessor {
2374
- client: IntegrationAppApiClient;
2375
- connectionSelector: string;
2376
- constructor(client: IntegrationAppApiClient, connectionSelector: string);
2377
- get actions(): ConnectionLevelActionsAccessor;
2378
- action(actionSelector: string, query?: InstanceKeyQuery): ConnectionLevelActionAccessor;
2379
- get flows(): ConnectionLevelFlowsAccessor;
2380
- flow(flowSelector: string, query?: InstanceKeyQuery): ConnectionLevelFlowAccessor;
2381
- get dataSources(): ConnectionLevelDataSourcesAccessor;
2382
- dataSource(dataSourceSelector: string, query?: InstanceKeyQuery): ConnectionLevelDataSourceAccessor;
2383
- get fieldMappings(): ConnectionLevelFieldMappingsAccessor;
2384
- fieldMapping(fieldMappingSelector: string, query?: InstanceKeyQuery): ConnectionLevelFieldMappingAccessor;
2385
- get(query?: {
2386
- includeSecrets?: boolean;
2387
- }): Promise<Connection>;
2388
- patch(data: UpdateConnectionRequest): Promise<Connection>;
2389
- put(data: UpdateConnectionRequest): Promise<Connection>;
2390
- archive(): Promise<void>;
2391
- request(path: string, data?: any): Promise<any>;
2392
- get proxy(): ConnectionProxy;
2393
- operation(key: string): ConnectionOperationAccessor;
2394
- dataCollection(key: string, parameters?: Record<string, any>): ConnectionDataCollectionAccessor;
2395
- reconnect({ parameters, authOptionKey, connectorParameters, }?: {
2396
- parameters?: any;
2397
- authOptionKey?: string;
2398
- connectorParameters?: any;
2399
- }): Promise<Connection | undefined>;
2400
- openReconnectUI({}?: OpenConfigurationOptions): Promise<void>;
2401
- refreshCredentials(): Promise<void>;
2402
- getPath(subpath?: string, query?: Record<string, any>): string;
2927
+ interface AppDataSchemaInstanceSelector {
2928
+ id?: string;
2929
+ appDataSchemaKey?: string;
2930
+ appDataSchemaId?: string;
2931
+ instanceKey?: string;
2932
+ autoCreate?: boolean;
2933
+ }
2934
+ interface UpdateAppDataSchemaInstanceRequest {
2935
+ }
2936
+ interface CreateAppDataSchemaInstanceRequest {
2403
2937
  }
2404
- declare class ConnectionOperationAccessor {
2405
- client: IntegrationAppApiClient;
2406
- connectionAccessor: ConnectionAccessor;
2407
- key: string;
2408
- constructor(client: IntegrationAppApiClient, connectionAccessor: ConnectionAccessor, key: string);
2409
- get(): Promise<OperationSpec>;
2410
- run(request?: OperationRunRequest): Promise<OperationRunResponse>;
2938
+ interface AppDataSchemaInstance extends BaseAppDataSchemaInstance {
2939
+ user?: BaseCustomer;
2940
+ appDataSchema?: BaseAppDataSchema;
2411
2941
  }
2412
- declare class ConnectionDataCollectionAccessor {
2413
- client: IntegrationAppApiClient;
2414
- connectionAccessor: ConnectionAccessor;
2415
- key: string;
2416
- parameters: Record<string, any>;
2417
- constructor(client: IntegrationAppApiClient, connectionAccessor: ConnectionAccessor, key: string, parameters: Record<string, any>);
2418
- get(): Promise<DataCollectionSpec>;
2419
- findById(request?: DataCollectionFindByIdRequest): Promise<DataCollectionFindByIdResponse>;
2420
- list(request?: DataCollectionListRequest): Promise<DataCollectionListResponse>;
2421
- search(request?: DataCollectionSearchRequest): Promise<DataCollectionSearchResponse>;
2422
- match(request?: DataCollectionMatchRequest): Promise<DataCollectionMatchResponse>;
2423
- create(request?: DataCollectionCreateRequest): Promise<DataCollectionCreateResponse>;
2424
- update(request?: DataCollectionUpdateRequest): Promise<DataCollectionUpdateResponse>;
2425
- delete(request?: DataCollectionDeleteRequest): Promise<DataCollectionDeleteResponse>;
2942
+
2943
+ interface ExternalEventSubscription extends BaseExternalEventSubscription {
2944
+ user?: BaseCustomer;
2945
+ connection?: BaseConnection;
2946
+ integration?: BaseIntegration;
2426
2947
  }
2427
- declare class ConnectionProxy {
2428
- private connection;
2429
- constructor(connection: ConnectionAccessor);
2430
- get(path: string): Promise<any>;
2431
- post(path: string, data?: any): Promise<any>;
2432
- put(path: string, data?: any): Promise<any>;
2433
- patch(path: string, data?: any): Promise<any>;
2434
- delete(path: string): Promise<any>;
2435
- private getProxyPath;
2948
+
2949
+ interface BaseIntegration extends BaseMembraneInterface {
2950
+ logoUri: string;
2951
+ connectorId?: string;
2952
+ connectorVersion?: string;
2953
+ authOptions?: IntegrationAuthOption[];
2954
+ oAuthCallbackUri?: string;
2955
+ parametersSchema?: DataSchema;
2956
+ parameters?: any;
2957
+ baseUri: string;
2958
+ archivedAt?: string;
2959
+ hasMissingParameters?: boolean;
2960
+ hasDocumentation?: boolean;
2961
+ hasOperations?: boolean;
2962
+ hasData?: boolean;
2963
+ hasEvents?: boolean;
2964
+ hasGlobalWebhooks?: boolean;
2965
+ hasUdm?: boolean;
2966
+ isTest?: boolean;
2967
+ appUuid?: string;
2968
+ isDeactivated?: boolean;
2969
+ authType?: ConnectorAuthType;
2436
2970
  }
2971
+ type IntegrationAuthOption = ConnectorAuthSpec & {
2972
+ key: string;
2973
+ };
2974
+ type AppliedToIntegrations<Element> = {
2975
+ element: Element;
2976
+ integration: BaseIntegration;
2977
+ }[];
2437
2978
 
2438
- declare class Connection {
2439
- id: string;
2979
+ interface FindConnectionsQuery extends PaginationQuery {
2980
+ userId?: string;
2981
+ isTest?: boolean;
2982
+ integrationKey?: string;
2983
+ integrationId?: string;
2984
+ includeArchived?: boolean;
2985
+ }
2986
+ declare class CreateConnectionRequest {
2440
2987
  name: string;
2441
- userId: string;
2442
- user?: User;
2443
- disconnected?: boolean;
2444
- error?: ErrorData;
2445
2988
  integrationId: string;
2446
- integration?: Integration;
2447
- credentials?: unknown;
2448
- parameters?: unknown;
2449
- connectorParameters?: unknown;
2450
- accessToken?: string;
2451
- refreshToken?: string;
2452
- createdAt: string;
2453
- updatedAt: string;
2454
- archivedAt?: string;
2989
+ credentials?: string;
2455
2990
  }
2456
- interface ConnectionSpec extends ConnectorSpec {
2991
+ declare class UpdateConnectionRequest {
2992
+ name?: string;
2993
+ credentials?: string;
2994
+ accessToken?: string;
2457
2995
  }
2458
- declare class ConnectionSpec {
2459
- constructor(opts: ConnectionSpec);
2996
+ interface ConnectionSelector {
2997
+ id?: string;
2998
+ integrationKey?: string;
2999
+ integrationId?: string;
3000
+ connectionId?: string;
2460
3001
  }
2461
-
2462
- declare enum ActionType {
2463
- ListDataRecords = "list-data-records",
2464
- FindDataRecordById = "find-data-record-by-id",
2465
- MatchDataRecord = "match-data-record",
2466
- CreateDataRecord = "create-data-record",
2467
- FindOrCreateDataRecord = "find-or-create-data-record",
2468
- UpdateDataRecord = "update-data-record",
2469
- DeleteDataRecord = "delete-data-record",
2470
- SearchDataRecords = "search-data-record",
2471
- ConnectorOperation = "connector-operation",
2472
- ApiRequestToExternalApp = "api-request-to-external-app",
2473
- ApiRequestToYourApp = "api-request-to-your-app",
2474
- HttpRequest = "http-request",
2475
- RunJavascript = "run-javascript",
2476
- ApiRequest = "api-request"
3002
+ interface Connection extends BaseConnection {
3003
+ user?: BaseCustomer;
3004
+ integration?: BaseIntegration;
2477
3005
  }
2478
3006
 
2479
- interface Action extends ElementTemplateFields {
2480
- type: ActionType;
2481
- inputSchema?: DataSchema;
2482
- config?: any;
2483
- outputMapping?: any;
2484
- customOutputSchema?: DataSchema;
2485
- defaultOutputSchema?: DataSchema;
2486
- transformedOutputSchema?: DataSchema;
2487
- outputSchema?: DataSchema;
2488
- appliedToIntegrations?: AppliedToIntegrations<Action>;
2489
- dependencies?: WorkspaceElementDependency[];
2490
- }
2491
- interface ActionInstance extends ElementInstanceFields {
2492
- type: ActionType;
2493
- parent?: Action;
2494
- instanceKey?: string;
2495
- inputSchema?: any;
2496
- config?: any;
2497
- outputSchema?: any;
2498
- isOutdated?: boolean;
2499
- state: WorkspaceElementState;
2500
- }
2501
3007
  interface ListActionsForIntegrationQuery extends PaginationQuery {
2502
3008
  parentId?: string | 'null';
2503
3009
  }
@@ -2548,6 +3054,10 @@ interface ActionRunResponse {
2548
3054
  output?: any;
2549
3055
  logs?: any[];
2550
3056
  }
3057
+ interface Action extends BaseAction {
3058
+ integration?: BaseIntegration;
3059
+ appliedToIntegrations?: AppliedToIntegrations<Action>;
3060
+ }
2551
3061
 
2552
3062
  declare class ActionsAccessor extends ElementListAccessor<Action, FindActionsQuery, CreateActionRequest> {
2553
3063
  constructor(client: IntegrationAppApiClient);
@@ -2557,6 +3067,50 @@ declare class ActionAccessor extends ElementAccessor<Action, UpdateActionRequest
2557
3067
  apply(integrationKeys: string[]): Promise<Action[]>;
2558
3068
  reset(): Promise<any>;
2559
3069
  }
3070
+ declare class IntegrationLevelActionAccessor extends IntegrationLevelElementAccessor<Action, UpdateActionRequest> {
3071
+ client: IntegrationAppApiClient;
3072
+ integrationSelector: string;
3073
+ actionSelector: string;
3074
+ constructor(client: IntegrationAppApiClient, integrationSelector: string, actionSelector: string);
3075
+ }
3076
+ declare class IntegrationLevelActionsListAccessor extends IntegrationLevelElementsListAccessor<Action, ListActionsForIntegrationQuery, Omit<CreateActionRequest, 'integrationId'>> {
3077
+ client: IntegrationAppApiClient;
3078
+ integrationSelector: string;
3079
+ constructor(client: IntegrationAppApiClient, integrationSelector: string);
3080
+ }
3081
+
3082
+ type InstanceKeyQuery = {
3083
+ instanceKey?: string;
3084
+ };
3085
+
3086
+ declare class ConnectionLevelElementAccessor<Element, UpdateElement> {
3087
+ protected client: IntegrationAppApiClient;
3088
+ protected connectionSelector: string;
3089
+ protected selector: string;
3090
+ protected elementKey: string;
3091
+ protected query: Record<string, any>;
3092
+ protected endpoint: string;
3093
+ constructor(client: IntegrationAppApiClient, connectionSelector: string, selector: string, elementKey: string, query: Record<string, any>);
3094
+ protected uri(path?: string, query?: {}): string;
3095
+ getUniqueIdentifier(): string;
3096
+ get(query?: {
3097
+ autoCreate?: boolean;
3098
+ }): Promise<Element>;
3099
+ create(): Promise<Element>;
3100
+ patch(data: Partial<UpdateElement>): Promise<Element>;
3101
+ put(data: UpdateElement): Promise<Element>;
3102
+ archive(): Promise<void>;
3103
+ reset(): Promise<Element>;
3104
+ setup(): Promise<Element>;
3105
+ }
3106
+ declare class ConnectionLevelElementsListAccessor<Element, Query> {
3107
+ protected client: IntegrationAppApiClient;
3108
+ protected connectionSelector: string;
3109
+ protected elementKey: string;
3110
+ constructor(client: IntegrationAppApiClient, connectionSelector: string, elementKey: string);
3111
+ list(query?: Query): Promise<PaginationResponse<Element[]>>;
3112
+ }
3113
+
2560
3114
  declare class ActionInstancesAccessor extends ElementInstanceListAccessor<ActionInstance, FindActionInstancesQuery> {
2561
3115
  constructor(client: IntegrationAppApiClient);
2562
3116
  }
@@ -2568,240 +3122,364 @@ declare class ActionInstanceAccessor extends ElementInstanceAccessor<ActionInsta
2568
3122
  run(input?: any): Promise<ActionRunResponse>;
2569
3123
  open({ onClose }?: OpenActionConfigurationOptions): Promise<void>;
2570
3124
  }
2571
- declare class IntegrationLevelActionAccessor extends IntegrationLevelElementAccessor<Action, UpdateActionRequest> {
3125
+ declare class ConnectionLevelActionAccessor extends ConnectionLevelElementAccessor<ActionInstance, UpdateActionInstanceRequest> {
2572
3126
  client: IntegrationAppApiClient;
2573
- integrationSelector: string;
3127
+ connectionSelector: string;
2574
3128
  actionSelector: string;
2575
- constructor(client: IntegrationAppApiClient, integrationSelector: string, actionSelector: string);
3129
+ query: InstanceKeyQuery;
3130
+ constructor(client: IntegrationAppApiClient, connectionSelector: string, actionSelector: string, query: InstanceKeyQuery);
3131
+ run(input?: any): Promise<ActionRunResponse>;
2576
3132
  }
2577
- declare class IntegrationLevelActionsListAccessor extends IntegrationLevelElementsListAccessor<Action, ListActionsForIntegrationQuery, Omit<CreateActionRequest, 'integrationId'>> {
3133
+ declare class ConnectionLevelActionsAccessor extends ConnectionLevelElementsListAccessor<ActionInstance, ListActionInstancesForConnectionQuery> {
3134
+ client: IntegrationAppApiClient;
3135
+ connectionSelector: string;
3136
+ constructor(client: IntegrationAppApiClient, connectionSelector: string);
3137
+ }
3138
+
3139
+ interface OpenDataSourceConfigurationOptions extends OpenConfigurationOptions {
3140
+ }
3141
+ declare class DataSourcesAccessor extends ElementListAccessor<DataSource, FindDataSourcesQuery, CreateDataSourceRequest> {
3142
+ constructor(client: IntegrationAppApiClient);
3143
+ }
3144
+ declare class DataSourceAccessor extends ElementAccessor<DataSource, UpdateDataSourceRequest, DataSourceSelector> {
3145
+ constructor(client: IntegrationAppApiClient, selector: DataSourceSelector | string);
3146
+ apply(integrationKeys: string[]): Promise<DataSource[]>;
3147
+ setup(): Promise<void>;
3148
+ reset(): Promise<any>;
3149
+ }
3150
+ declare class DataSourceInstancesAccessor extends ElementInstanceListAccessor<DataSourceInstance, FindDataSourceInstancesQuery> {
3151
+ constructor(client: IntegrationAppApiClient);
3152
+ }
3153
+ declare class DataSourceInstanceAccessor extends ElementInstanceAccessor<DataSourceInstance, DataSourceInstanceSelector, CreateDataSourceInstanceRequest, UpdateDataSourceInstanceRequest> {
3154
+ client: IntegrationAppApiClient;
3155
+ constructor(client: IntegrationAppApiClient, selector: string | DataSourceInstanceSelector);
3156
+ setup(): Promise<void>;
3157
+ reset(): Promise<void>;
3158
+ openConfiguration({ onClose }?: OpenDataSourceConfigurationOptions): Promise<void>;
3159
+ unifiedFieldsToNative(unifiedFields: any): Promise<any>;
3160
+ getCollection(): Promise<DataCollectionSpec>;
3161
+ listRecords(request?: DataCollectionListRequest): Promise<DataCollectionListResponse>;
3162
+ matchRecord(request: DataCollectionMatchRequest): Promise<DataCollectionMatchResponse>;
3163
+ searchRecords(request: DataCollectionSearchRequest): Promise<DataCollectionSearchResponse>;
3164
+ findRecordById(request: string | DataCollectionFindByIdRequest): Promise<DataCollectionFindByIdResponse>;
3165
+ createRecord(request: DataCollectionCreateRequest): Promise<DataCollectionCreateResponse>;
3166
+ updateRecord(request: DataCollectionUpdateRequest): Promise<DataCollectionUpdateResponse>;
3167
+ deleteRecord(request: string | DataCollectionFindByIdRequest): Promise<DataCollectionDeleteResponse>;
3168
+ findRecords(request?: DataCollectionFindRequest): Promise<DataCollectionFindResponse>;
3169
+ }
3170
+ declare class IntegrationLevelDataSourceAccessor extends IntegrationLevelElementAccessor<DataSource, UpdateDataSourceRequest> {
3171
+ client: IntegrationAppApiClient;
3172
+ integrationSelector: string;
3173
+ dataSourceSelector: string;
3174
+ constructor(client: IntegrationAppApiClient, integrationSelector: string, dataSourceSelector: string);
3175
+ }
3176
+ declare class IntegrationLevelDataSourcesListAccessor extends IntegrationLevelElementsListAccessor<DataSource, ListDataSourcesForIntegrationQuery, Omit<CreateDataSourceRequest, 'integrationId'>> {
2578
3177
  client: IntegrationAppApiClient;
2579
3178
  integrationSelector: string;
2580
3179
  constructor(client: IntegrationAppApiClient, integrationSelector: string);
2581
3180
  }
2582
- declare class ConnectionLevelActionAccessor extends ConnectionLevelElementAccessor<ActionInstance, UpdateActionInstanceRequest> {
3181
+ declare class ConnectionLevelDataSourceAccessor extends ConnectionLevelElementAccessor<DataSourceInstance, UpdateDataSourceInstanceRequest> {
2583
3182
  client: IntegrationAppApiClient;
2584
3183
  connectionSelector: string;
2585
- actionSelector: string;
3184
+ dataSourceSelector: string;
2586
3185
  query: InstanceKeyQuery;
2587
- constructor(client: IntegrationAppApiClient, connectionSelector: string, actionSelector: string, query: InstanceKeyQuery);
2588
- run(input?: any): Promise<ActionRunResponse>;
3186
+ constructor(client: IntegrationAppApiClient, connectionSelector: string, dataSourceSelector: string, query: InstanceKeyQuery);
3187
+ openConfiguration(options?: OpenDataSourceConfigurationOptions): Promise<void>;
3188
+ }
3189
+ declare class ConnectionLevelDataSourcesAccessor extends ConnectionLevelElementsListAccessor<DataSource, ListDataSourceInstancesForConnectionQuery> {
3190
+ client: IntegrationAppApiClient;
3191
+ connectionSelector: string;
3192
+ constructor(client: IntegrationAppApiClient, connectionSelector: string);
3193
+ }
3194
+
3195
+ interface OpenFieldMappingInstanceConfigurationOptions extends OpenConfigurationOptions {
3196
+ }
3197
+ declare class FieldMappingInstancesAccessor extends ElementInstanceListAccessor<FieldMappingInstance, FindFieldMappingInstancesQuery> {
3198
+ constructor(client: IntegrationAppApiClient);
3199
+ }
3200
+ declare class FieldMappingInstanceAccessor extends ElementInstanceAccessor<FieldMappingInstance, FieldMappingInstanceSelector, CreateFieldMappingInstanceRequest, UpdateFieldMappingInstanceRequest> {
3201
+ private client;
3202
+ constructor(client: IntegrationAppApiClient, selector: string | FieldMappingInstanceSelector);
3203
+ setup(): Promise<void>;
3204
+ reset(): Promise<void>;
3205
+ openConfiguration({ onClose }?: OpenFieldMappingInstanceConfigurationOptions): Promise<void>;
3206
+ }
3207
+ declare class ConnectionLevelFieldMappingAccessor extends ConnectionLevelElementAccessor<FieldMappingInstance, UpdateFieldMappingInstanceRequest> {
3208
+ client: IntegrationAppApiClient;
3209
+ connectionSelector: string;
3210
+ fieldMappingSelector: string;
3211
+ query: InstanceKeyQuery;
3212
+ constructor(client: IntegrationAppApiClient, connectionSelector: string, fieldMappingSelector: string, query: InstanceKeyQuery);
3213
+ openConfiguration({ onClose }?: OpenFieldMappingInstanceConfigurationOptions): Promise<void>;
2589
3214
  }
2590
- declare class ConnectionLevelActionsAccessor extends ConnectionLevelElementsListAccessor<Action, ListActionInstancesForConnectionQuery> {
3215
+ declare class ConnectionLevelFieldMappingsAccessor extends ConnectionLevelElementsListAccessor<FieldMappingInstance, ListFieldMappingInstancesForConnectionQuery> {
2591
3216
  client: IntegrationAppApiClient;
2592
3217
  connectionSelector: string;
2593
3218
  constructor(client: IntegrationAppApiClient, connectionSelector: string);
2594
3219
  }
2595
3220
 
2596
- type CreateAppDataSchemaRequest = {
2597
- key: string;
2598
- name: string;
2599
- schema?: any;
2600
- code?: string;
2601
- };
2602
- type UpdateAppDataSchemaRequest = {
2603
- key?: string;
2604
- name?: string;
2605
- schema?: any;
2606
- code?: string;
2607
- archivedAt?: string;
2608
- };
2609
- interface FindAppDataSchemasQuery extends PaginationQuery {
2610
- }
2611
- interface AppDataSchemaInstanceSelector {
2612
- id?: string;
2613
- appDataSchemaKey?: string;
2614
- appDataSchemaId?: string;
2615
- instanceKey?: string;
2616
- autoCreate?: boolean;
2617
- }
2618
- interface UpdateAppDataSchemaInstanceRequest {
2619
- }
2620
- interface CreateAppDataSchemaInstanceRequest {
3221
+ interface OpenFlowInstanceConfigurationOptions extends OpenConfigurationOptions {
3222
+ nodeKey?: string;
2621
3223
  }
2622
- interface FindAppDataSchemaInstancesQuery extends PaginationQuery {
2623
- id?: string;
2624
- userId?: string;
2625
- appDataSchemaId?: string;
2626
- instanceKey?: string;
3224
+ interface OpenFlowInstanceEditorOptions extends OpenConfigurationOptions {
2627
3225
  }
2628
-
2629
- declare class AppDataSchemasAccessor extends ElementListAccessor<AppDataSchema, FindAppDataSchemasQuery, CreateAppDataSchemaRequest> {
3226
+ declare class FlowInstancesAccessor extends ElementInstanceListAccessor<FlowInstance, FindFlowInstancesQuery> {
2630
3227
  constructor(client: IntegrationAppApiClient);
3228
+ create(data: CreateFlowInstanceRequest): Promise<FlowInstance>;
2631
3229
  }
2632
- declare class AppDataSchemaAccessor extends ElementAccessor<AppDataSchema, UpdateAppDataSchemaRequest> {
2633
- constructor(client: IntegrationAppApiClient, idOrKey: string);
3230
+ declare class FlowInstanceAccessor extends ElementInstanceAccessor<FlowInstance, FlowInstanceSelector, CreateFlowInstanceRequest, UpdateFlowInstanceRequest> {
3231
+ protected client: IntegrationAppApiClient;
3232
+ protected selector: FlowInstanceSelector | string;
3233
+ constructor(client: IntegrationAppApiClient, selector: FlowInstanceSelector | string);
3234
+ enable(): Promise<FlowInstance>;
3235
+ disable(): Promise<FlowInstance>;
3236
+ updateToLatestFlow(): Promise<FlowInstance>;
3237
+ setup(): Promise<FlowInstance>;
3238
+ reset(options?: ResetFlowInstanceOptions): Promise<FlowInstance>;
3239
+ openConfiguration({ nodeKey, onClose }?: OpenFlowInstanceConfigurationOptions): Promise<void>;
3240
+ openEditor({ onClose }?: OpenFlowInstanceEditorOptions): Promise<void>;
3241
+ embedEditor({ mountTargetSelector, onClose, }?: {
3242
+ mountTargetSelector?: string;
3243
+ } & OpenFlowInstanceEditorOptions): Promise<void>;
3244
+ startRun(options?: RunFlowOptions): Promise<FlowRun>;
3245
+ run(options?: RunFlowOptions): Promise<FlowRun>;
2634
3246
  }
2635
- declare class AppDataSchemaInstancesAccessor extends ElementInstanceListAccessor<AppDataSchemaInstance, FindAppDataSchemaInstancesQuery> {
2636
- constructor(client: IntegrationAppApiClient);
3247
+ declare class ConnectionLevelFlowAccessor extends ConnectionLevelElementAccessor<FlowInstance, UpdateFlowInstanceRequest> {
3248
+ client: IntegrationAppApiClient;
3249
+ connectionSelector: string;
3250
+ flowSelector: string;
3251
+ query: InstanceKeyQuery;
3252
+ constructor(client: IntegrationAppApiClient, connectionSelector: string, flowSelector: string, query: InstanceKeyQuery);
3253
+ enable(): Promise<FlowInstance>;
3254
+ disable(): Promise<FlowInstance>;
3255
+ run(options: {
3256
+ nodeKey?: string;
3257
+ input?: any;
3258
+ }): Promise<FlowRun>;
3259
+ openConfiguration(options?: OpenFlowInstanceConfigurationOptions): Promise<void>;
3260
+ openEditor(options?: OpenFlowInstanceEditorOptions): Promise<void>;
2637
3261
  }
2638
- declare class AppDataSchemaInstanceAccessor extends ElementInstanceAccessor<AppDataSchemaInstance, AppDataSchemaInstanceSelector, UpdateAppDataSchemaInstanceRequest, CreateAppDataSchemaInstanceRequest> {
2639
- private client;
2640
- constructor(client: IntegrationAppApiClient, selector: string | AppDataSchemaInstanceSelector);
2641
- setup(): Promise<void>;
3262
+ declare class ConnectionLevelFlowsAccessor extends ConnectionLevelElementsListAccessor<FlowInstance, ListFlowInstancesForConnectionQuery> {
3263
+ client: IntegrationAppApiClient;
3264
+ connectionSelector: string;
3265
+ constructor(client: IntegrationAppApiClient, connectionSelector: string);
2642
3266
  }
2643
3267
 
2644
- interface AppDataSchema extends WorkspaceElement {
2645
- schema: any;
2646
- code?: string;
2647
- archivedAt?: string;
2648
- revision?: string;
3268
+ declare class ConnectionsAccessor extends ElementInstanceListAccessor<Connection, FindConnectionsQuery> {
3269
+ constructor(client: IntegrationAppApiClient);
3270
+ create(data: CreateConnectionRequest): Promise<Connection>;
2649
3271
  }
2650
- interface AppDataSchemaInstance extends WorkspaceElement {
2651
- appId: string;
2652
- userId: string;
2653
- user?: User;
2654
- appDataSchemaId: string;
2655
- appDataSchemaRevision: string;
2656
- appDataSchema?: AppDataSchema;
2657
- instanceKey?: string;
2658
- schema?: any;
2659
- error?: ErrorData;
2660
- archivedAt?: string;
3272
+ declare class ConnectionAccessor {
3273
+ client: IntegrationAppApiClient;
3274
+ connectionSelector: string;
3275
+ constructor(client: IntegrationAppApiClient, connectionSelector: string);
3276
+ get actions(): ConnectionLevelActionsAccessor;
3277
+ action(actionSelector: string, query?: InstanceKeyQuery): ConnectionLevelActionAccessor;
3278
+ get flows(): ConnectionLevelFlowsAccessor;
3279
+ flow(flowSelector: string, query?: InstanceKeyQuery): ConnectionLevelFlowAccessor;
3280
+ get dataSources(): ConnectionLevelDataSourcesAccessor;
3281
+ dataSource(dataSourceSelector: string, query?: InstanceKeyQuery): ConnectionLevelDataSourceAccessor;
3282
+ get fieldMappings(): ConnectionLevelFieldMappingsAccessor;
3283
+ fieldMapping(fieldMappingSelector: string, query?: InstanceKeyQuery): ConnectionLevelFieldMappingAccessor;
3284
+ get(query?: {
3285
+ includeSecrets?: boolean;
3286
+ }): Promise<Connection>;
3287
+ patch(data: UpdateConnectionRequest): Promise<Connection>;
3288
+ put(data: UpdateConnectionRequest): Promise<Connection>;
3289
+ archive(): Promise<void>;
3290
+ request(path: string, data?: any): Promise<any>;
3291
+ get proxy(): ConnectionProxy;
3292
+ operation(key: string): ConnectionOperationAccessor;
3293
+ dataCollection(key: string, parameters?: Record<string, any>): ConnectionDataCollectionAccessor;
3294
+ reconnect({ parameters, authOptionKey, connectorParameters, }?: {
3295
+ parameters?: any;
3296
+ authOptionKey?: string;
3297
+ connectorParameters?: any;
3298
+ }): Promise<Connection | undefined>;
3299
+ openReconnectUI({}?: OpenConfigurationOptions): Promise<void>;
3300
+ refreshCredentials(): Promise<void>;
3301
+ getPath(subpath?: string, query?: Record<string, any>): string;
2661
3302
  }
2662
-
2663
- interface UpdateAppEventTypeRequest {
2664
- key?: string;
2665
- name?: string;
2666
- subscribeRequest?: HttpRequestSpec;
2667
- example?: any;
2668
- schema?: DataSchema;
2669
- userIdFormula?: any;
3303
+ declare class ConnectionOperationAccessor {
3304
+ client: IntegrationAppApiClient;
3305
+ connectionAccessor: ConnectionAccessor;
3306
+ key: string;
3307
+ constructor(client: IntegrationAppApiClient, connectionAccessor: ConnectionAccessor, key: string);
3308
+ get(): Promise<OperationSpec>;
3309
+ run(request?: OperationRunRequest): Promise<OperationRunResponse>;
2670
3310
  }
2671
- interface CreateAppEventTypeRequest extends UpdateAppEventTypeRequest {
3311
+ declare class ConnectionDataCollectionAccessor {
3312
+ client: IntegrationAppApiClient;
3313
+ connectionAccessor: ConnectionAccessor;
2672
3314
  key: string;
2673
- name: string;
3315
+ parameters: Record<string, any>;
3316
+ constructor(client: IntegrationAppApiClient, connectionAccessor: ConnectionAccessor, key: string, parameters: Record<string, any>);
3317
+ get(): Promise<DataCollectionSpec>;
3318
+ findById(request?: DataCollectionFindByIdRequest): Promise<DataCollectionFindByIdResponse>;
3319
+ list(request?: DataCollectionListRequest): Promise<DataCollectionListResponse>;
3320
+ search(request?: DataCollectionSearchRequest): Promise<DataCollectionSearchResponse>;
3321
+ match(request?: DataCollectionMatchRequest): Promise<DataCollectionMatchResponse>;
3322
+ create(request?: DataCollectionCreateRequest): Promise<DataCollectionCreateResponse>;
3323
+ update(request?: DataCollectionUpdateRequest): Promise<DataCollectionUpdateResponse>;
3324
+ delete(request?: DataCollectionDeleteRequest): Promise<DataCollectionDeleteResponse>;
2674
3325
  }
2675
- interface AppEventSubscriptionSelector extends Omit<ElementInstanceSelector, 'parentKey' | 'parentId'> {
2676
- appEventTypeKey?: string;
2677
- appEventTypeId?: string;
2678
- instanceKey?: string;
3326
+ declare class ConnectionProxy {
3327
+ private connection;
3328
+ constructor(connection: ConnectionAccessor);
3329
+ get(path: string): Promise<any>;
3330
+ post(path: string, data?: any): Promise<any>;
3331
+ put(path: string, data?: any): Promise<any>;
3332
+ patch(path: string, data?: any): Promise<any>;
3333
+ delete(path: string): Promise<any>;
3334
+ private getProxyPath;
2679
3335
  }
2680
- interface AppEventSubscriptionUpdateRequest {
3336
+
3337
+ declare class FlowsAccessor extends ElementListAccessor<Flow, FindFlowsQuery, CreateFlowRequest> {
3338
+ constructor(client: IntegrationAppApiClient);
2681
3339
  }
2682
- interface FindAppEventTypesQuery extends PaginationQuery {
2683
- includeArchived?: boolean;
3340
+ declare class FlowAccessor extends ElementAccessor<Flow, UpdateFlowRequest, FlowSelector> {
3341
+ constructor(client: IntegrationAppApiClient, selector: FlowSelector | string);
3342
+ apply(integrationKeys: string[]): Promise<Flow[]>;
3343
+ reset(): Promise<Flow>;
2684
3344
  }
2685
- interface FindAppEventSubscriptionsQuery extends PaginationQuery {
2686
- id?: string;
2687
- userId?: string;
2688
- instanceKey?: string;
2689
- appEventTypeId?: string;
2690
- isSubscribed?: boolean;
3345
+ declare class IntegrationLevelFlowAccessor extends IntegrationLevelElementAccessor<Flow, UpdateFlowRequest> {
3346
+ client: IntegrationAppApiClient;
3347
+ integrationSelector: string;
3348
+ flowSelector: string;
3349
+ constructor(client: IntegrationAppApiClient, integrationSelector: string, flowSelector: string);
2691
3350
  }
2692
- interface FindAppEventsQuery extends PaginationQuery {
2693
- id?: string;
2694
- userId?: string;
2695
- instanceKey?: string;
2696
- appEventTypeId?: string;
2697
- appEventSubscriptionId?: string;
2698
- startDatetime?: string;
2699
- endDatetime?: string;
3351
+ declare class IntegrationLevelFlowsListAccessor extends IntegrationLevelElementsListAccessor<Flow, ListFlowsForIntegrationQuery, Omit<CreateFlowRequest, 'integrationId'>> {
3352
+ client: IntegrationAppApiClient;
3353
+ integrationSelector: string;
3354
+ constructor(client: IntegrationAppApiClient, integrationSelector: string);
2700
3355
  }
2701
3356
 
2702
- declare class AppEventTypesAccessor extends ElementListAccessor<AppEventType, FindAppEventTypesQuery, CreateAppEventTypeRequest> {
2703
- constructor(client: IntegrationAppApiClient);
2704
- }
2705
- declare class AppEventTypeAccessor extends ElementAccessor<AppEventType, UpdateAppEventTypeRequest> {
2706
- constructor(client: IntegrationAppApiClient, idOrKey: string);
3357
+ interface OpenFlowRunEditorOptions extends OpenConfigurationOptions {
2707
3358
  }
2708
- declare class AppEventSubscriptionsAccessor extends ElementInstanceListAccessor<AppEventSubscription, FindAppEventSubscriptionsQuery> {
3359
+ declare class FlowRunsAccessor {
3360
+ private readonly client;
2709
3361
  constructor(client: IntegrationAppApiClient);
3362
+ find(query: FindFlowRunsQuery): Promise<FindFlowRunsResponse>;
3363
+ create(request: CreateFlowRunRequest): Promise<FlowRun>;
2710
3364
  }
2711
- declare class AppEventSubscriptionAccessor extends ElementInstanceAccessor<AppEventSubscription, AppEventSubscriptionSelector, AppEventSubscriptionUpdateRequest, AppEventSubscriptionUpdateRequest> {
2712
- constructor(client: IntegrationAppApiClient, selector: string | AppEventSubscriptionSelector);
2713
- subscribe(): Promise<void>;
3365
+ declare class FlowRunAccessor {
3366
+ private readonly client;
3367
+ id: string;
3368
+ private baseUri;
3369
+ constructor(client: IntegrationAppApiClient, id: string);
3370
+ get(): Promise<FlowRun>;
3371
+ stop(): Promise<void>;
3372
+ getOutput(): Promise<any>;
3373
+ getNodeRuns(nodeKey: string, parameters?: {
3374
+ cursor?: string;
3375
+ }): Promise<any>;
3376
+ getNodeRun(nodeKey: string, runId: string): Promise<any>;
3377
+ getNodeOutputs(nodeKey: string, parameters?: {
3378
+ cursor?: string;
3379
+ }): Promise<any>;
3380
+ getNodeOutput(nodeKey: string, outputId: string): Promise<any>;
3381
+ repeat(): Promise<FlowRun>;
3382
+ openEditor({ onClose }?: OpenFlowRunEditorOptions): Promise<void>;
3383
+ embedEditor({ mountTargetSelector, onClose, }?: {
3384
+ mountTargetSelector?: string;
3385
+ } & OpenFlowRunEditorOptions): Promise<void>;
2714
3386
  }
2715
- declare class AppEventsAccessor extends ElementInstanceListAccessor<AppEvent, FindAppEventsQuery> {
3387
+
3388
+ declare class FieldMappingsAccessor extends ElementListAccessor<FieldMapping, FindFieldMappingsQuery, CreateFieldMappingRequest> {
2716
3389
  constructor(client: IntegrationAppApiClient);
2717
3390
  }
2718
-
2719
- interface AppEventType extends WorkspaceElement {
2720
- revision: string;
2721
- archivedAt?: string;
2722
- subscribeRequest?: HttpRequestSpec;
2723
- example?: any;
2724
- schema?: DataSchema;
2725
- globalWebhookUri: string;
2726
- userIdFormula?: any;
3391
+ declare class FieldMappingAccessor extends ElementAccessor<FieldMapping, UpdateFieldMappingRequest, FieldMappingSelector> {
3392
+ constructor(client: IntegrationAppApiClient, selector: string | FieldMappingSelector);
3393
+ getAppSchema(): Promise<any>;
3394
+ apply(integrationKeys: string[]): Promise<FieldMapping[]>;
3395
+ setup(): Promise<any>;
3396
+ reset(): Promise<any>;
2727
3397
  }
2728
- interface AppEventSubscription extends WorkspaceElement {
2729
- revision: string;
2730
- appEventTypeId: string;
2731
- appEventType?: AppEventType;
2732
- userId: string;
2733
- user?: User;
2734
- instanceKey?: string;
2735
- isSubscribed: boolean;
2736
- schema?: DataSchema;
2737
- webhookUri: string;
2738
- subscriptionRequest: HttpRequestSpec;
2739
- subscriptionResponse?: any;
2740
- archivedAt?: string;
3398
+ declare class IntegrationLevelFieldMappingAccessor extends IntegrationLevelElementAccessor<FieldMapping, UpdateFieldMappingRequest> {
3399
+ client: IntegrationAppApiClient;
3400
+ integrationSelector: string;
3401
+ fieldMappingSelector: string;
3402
+ constructor(client: IntegrationAppApiClient, integrationSelector: string, fieldMappingSelector: string);
2741
3403
  }
2742
- interface AppEvent {
2743
- id: string;
2744
- name?: string;
2745
- userId: string;
2746
- user?: User;
2747
- appEventTypeId: string;
2748
- appEventType?: AppEventType;
2749
- appEventSubscriptionId: string;
2750
- appEventSubscription?: AppEventSubscription;
2751
- event: any;
2752
- datetime: string;
2753
- launchedFlowRunIds: string[];
3404
+ declare class IntegrationLevelFieldMappingsListAccessor extends IntegrationLevelElementsListAccessor<FieldMapping, ListFieldMappingsForIntegrationQuery, Omit<CreateFieldMappingRequest, 'integrationId'>> {
3405
+ client: IntegrationAppApiClient;
3406
+ integrationSelector: string;
3407
+ constructor(client: IntegrationAppApiClient, integrationSelector: string);
2754
3408
  }
2755
3409
 
2756
- declare class SelfAccessor {
2757
- private client;
2758
- constructor(client: IntegrationAppApiClient);
2759
- get(): Promise<Customer>;
2760
- patch(data: Partial<{
2761
- credentials: any;
2762
- }>): Promise<Customer>;
3410
+ interface OpenIntegrationUIIntegrationConfigurationOptions extends OpenConfigurationOptions {
2763
3411
  }
2764
-
2765
- type CreateDataLinkTableRequest = Omit<DataLinkTable, 'id' | 'userId'>;
2766
- type UpdateDataLinkTableRequest = CreateDataLinkTableRequest;
2767
- interface FindDataLinkTablesQuery extends PaginationQuery {
3412
+ declare class IntegrationsAccessor extends ElementListAccessor<Integration, FindIntegrationsQuery, CreateIntegrationRequest> {
3413
+ constructor(client: IntegrationAppApiClient);
2768
3414
  }
2769
- interface FindDataLinkTableInstancesQuery extends PaginationQuery {
2770
- connectionId?: string;
2771
- integrationId?: string;
2772
- dataLinkTableId?: string;
3415
+ declare class IntegrationAccessor extends ElementAccessor<Integration, UpdateIntegrationRequest> {
3416
+ private client;
3417
+ private integrationSelector;
3418
+ baseUri: string;
3419
+ constructor(client: IntegrationAppApiClient, integrationSelector: string);
3420
+ get actions(): IntegrationLevelActionsListAccessor;
3421
+ action(actionSelector: string): IntegrationLevelActionAccessor;
3422
+ get flows(): IntegrationLevelFlowsListAccessor;
3423
+ flow(flowSelector: string): IntegrationLevelFlowAccessor;
3424
+ get dataSources(): IntegrationLevelDataSourcesListAccessor;
3425
+ dataSource(dataSourceSelector: string): IntegrationLevelDataSourceAccessor;
3426
+ get fieldMappings(): IntegrationLevelFieldMappingsListAccessor;
3427
+ fieldMapping(fieldMappingSelector: string): IntegrationLevelFieldMappingAccessor;
3428
+ setup(): Promise<Integration>;
3429
+ getConnectorSpec(): Promise<ConnectionSpec>;
3430
+ open({ onClose }?: OpenIntegrationUIIntegrationConfigurationOptions): Promise<void>;
3431
+ openNewConnection({ allowMultipleConnections, name, connectorParameters, }?: OpenNewConnectionOptions): Promise<Connection>;
3432
+ connect({ name, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, }?: {
3433
+ name?: string;
3434
+ parameters?: any;
3435
+ connectorParameters?: any;
3436
+ authOptionKey?: string;
3437
+ allowMultipleConnections?: boolean;
3438
+ } & ({
3439
+ sameWindow: true;
3440
+ redirectUri: string;
3441
+ } | {
3442
+ sameWindow?: false;
3443
+ redirectUri?: never;
3444
+ })): Promise<Connection | undefined>;
3445
+ createConnection({ parameters, name }: {
3446
+ parameters?: any;
3447
+ name?: string;
3448
+ }): Promise<Connection | undefined>;
3449
+ getOperations(): Promise<OperationListItem[]>;
3450
+ getOperation(key: string): Promise<OperationSpec>;
3451
+ getDataCollections(): Promise<DataCollectionListItem[]>;
3452
+ getDataCollection(key: string): Promise<DataCollectionSpec>;
2773
3453
  }
2774
- interface DataLinkTableInstanceSelector extends ConnectionSelector, ElementInstanceSelector {
2775
- dataLinkTableId?: string;
2776
- dataLinkTableKey?: string;
2777
- instanceKey?: string;
3454
+
3455
+ declare class ScenariosAccessor extends ElementListAccessor<Scenario, FindScenariosQuery, CreateScenarioRequest> {
3456
+ constructor(client: IntegrationAppApiClient);
2778
3457
  }
2779
- interface UpdateDataLinkTableInstanceRequest {
3458
+ declare class ScenarioAccessor extends ElementAccessor<Scenario, UpdateScenarioRequest> {
3459
+ constructor(client: IntegrationAppApiClient, selector: string);
2780
3460
  }
2781
- interface FindDataLinksInTableQuery extends PaginationQuery {
2782
- direction?: DataLinkDirection;
2783
- appRecordId?: string;
2784
- externalRecordId?: string;
3461
+
3462
+ declare class ScreensAccessor extends ElementListAccessor<Screen, FindScreensQuery, CreateScreenRequest> {
3463
+ constructor(client: IntegrationAppApiClient);
2785
3464
  }
2786
- interface CreateDataLinkRequest {
2787
- direction?: DataLinkDirection;
2788
- appRecordId: string;
2789
- externalRecordId: string;
3465
+ declare class ScreenAccessor extends ElementAccessor<Screen, UpdateScreenRequest, ScreenSelector> {
3466
+ constructor(client: IntegrationAppApiClient, selector: ScreenSelector | string);
2790
3467
  }
2791
- interface DeleteDataLinkRequest {
2792
- direction?: DataLinkDirection;
2793
- appRecordId: string;
2794
- externalRecordId: string;
3468
+
3469
+ declare class CustomersAccessor extends ElementListAccessor<Customer, FindCustomersQuery, CreateCustomerRequest> {
3470
+ constructor(client: IntegrationAppApiClient);
2795
3471
  }
2796
- interface FindDataLinksResponse extends PaginationResponse<DataLink> {
3472
+ declare class CustomerAccessor extends ElementAccessor<Customer, UpdateCustomerRequest, CustomerSelector> {
3473
+ constructor(client: IntegrationAppApiClient, selector: CustomerSelector | string);
2797
3474
  }
2798
3475
 
2799
- declare class DataLinkTablesAccessor extends ElementListAccessor<DataLinkTable, FindDataLinkTablesQuery, CreateDataLinkTableRequest> {
3476
+ declare class DataLinkTablesAccessor extends ElementListAccessor<BaseDataLinkTable, FindDataLinkTablesQuery, CreateDataLinkTableRequest> {
2800
3477
  constructor(client: IntegrationAppApiClient);
2801
3478
  }
2802
- declare class DataLinkTableAccessor extends ElementAccessor<DataLinkTable, UpdateDataLinkTableRequest> {
3479
+ declare class DataLinkTableAccessor extends ElementAccessor<BaseDataLinkTable, UpdateDataLinkTableRequest> {
2803
3480
  constructor(client: IntegrationAppApiClient, idOrKey: string);
2804
3481
  }
3482
+
2805
3483
  declare class DataLinkTableInstancesAccessor extends ElementInstanceListAccessor<DataLinkTableInstance, FindDataLinkTableInstancesQuery> {
2806
3484
  constructor(client: IntegrationAppApiClient);
2807
3485
  }
@@ -2813,82 +3491,35 @@ declare class DataLinkTableInstanceAccessor extends ElementInstanceAccessor<Data
2813
3491
  deleteLink(data: DeleteDataLinkRequest): Promise<void>;
2814
3492
  }
2815
3493
 
2816
- declare enum DataLinkDirection {
2817
- IMPORT = "import",
2818
- EXPORT = "export",
2819
- BOTH = "both"
2820
- }
2821
- interface DataLinkTable extends WorkspaceElement {
2822
- archivedAt?: string;
2823
- }
2824
- interface DataLinkTableInstance extends WorkspaceElement {
2825
- dataLinkTableId?: string;
2826
- dataLinkTable?: DataLinkTable;
2827
- connectionId?: string;
2828
- connection?: Connection;
2829
- integrationId: string;
2830
- integration?: Integration;
2831
- instanceKey?: string;
2832
- userId: string;
2833
- user?: User;
2834
- archivedAt?: string;
3494
+ declare class AppEventTypesAccessor extends ElementListAccessor<BaseAppEventType, FindAppEventTypesQuery, CreateAppEventTypeRequest> {
3495
+ constructor(client: IntegrationAppApiClient);
2835
3496
  }
2836
- interface DataLink {
2837
- id: string;
2838
- dataLinkTableInstanceId: string;
2839
- externalRecordId: string;
2840
- appRecordId: string;
2841
- direction: DataLinkDirection;
3497
+ declare class AppEventTypeAccessor extends ElementAccessor<BaseAppEventType, UpdateAppEventTypeRequest> {
3498
+ constructor(client: IntegrationAppApiClient, idOrKey: string);
2842
3499
  }
2843
3500
 
2844
- declare enum ExternalEventSubscriptionStatus {
2845
- Subscribed = "subscribed",
2846
- Unsubscribed = "unsubscribed",
2847
- Error = "error"
3501
+ declare class AppEventSubscriptionsAccessor extends ElementInstanceListAccessor<AppEventSubscription, FindAppEventSubscriptionsQuery> {
3502
+ constructor(client: IntegrationAppApiClient);
2848
3503
  }
2849
- declare enum ExternalEventSubscriptionType {
2850
- DataRecordCreated = "data-record-created",
2851
- DataRecordUpdated = "data-record-updated",
2852
- DataRecordDeleted = "data-record-deleted",
2853
- ConnectorEvent = "connector-event"
3504
+ declare class AppEventSubscriptionAccessor extends ElementInstanceAccessor<AppEventSubscription, AppEventSubscriptionSelector, UpdateAppEventSubscriptionRequest, UpdateAppEventSubscriptionRequest> {
3505
+ constructor(client: IntegrationAppApiClient, selector: string | AppEventSubscriptionSelector);
3506
+ subscribe(): Promise<void>;
2854
3507
  }
2855
- interface ExternalEventSubscriptionConfig {
2856
- type: ExternalEventSubscriptionType;
2857
- dataSource?: DataSourceUnitConfig;
2858
- eventKey?: string;
2859
- eventParameters?: any;
3508
+
3509
+ declare class AppDataSchemasAccessor extends ElementListAccessor<BaseAppDataSchema, FindAppDataSchemasQuery, CreateAppDataSchemaRequest> {
3510
+ constructor(client: IntegrationAppApiClient);
2860
3511
  }
2861
- interface ExternalEventSubscription {
2862
- id: string;
2863
- name?: string;
2864
- userId: string;
2865
- user?: Customer;
2866
- connectionId: string;
2867
- connection?: Connection;
2868
- integrationId: string;
2869
- integration?: Integration;
2870
- uuid: string;
2871
- config?: ExternalEventSubscriptionConfig;
2872
- status?: ExternalEventSubscriptionStatus;
2873
- error?: ErrorData;
2874
- isRealTime?: boolean;
2875
- requiresPull?: boolean;
2876
- requiresFullSync?: boolean;
2877
- createdAt?: string;
2878
- archivedAt?: string;
2879
- stateData?: any;
2880
- nextPullEventsTimestamp?: number;
2881
- pullUpdatesIntervalSeconds?: number;
2882
- fullSyncIntervalSeconds?: number;
2883
- nextRefreshTimestamp?: number;
2884
- globalWebhookKey?: string;
2885
- globalWebhookEventSelector?: string;
3512
+ declare class AppDataSchemaAccessor extends ElementAccessor<BaseAppDataSchema, UpdateAppDataSchemaRequest> {
3513
+ constructor(client: IntegrationAppApiClient, idOrKey: string);
2886
3514
  }
2887
3515
 
2888
- interface FindExternalEventSubscriptionsQuery extends PaginationQuery {
2889
- userId?: string;
2890
- connectionId?: string;
2891
- integrationId?: string;
3516
+ declare class AppDataSchemaInstancesAccessor extends ElementInstanceListAccessor<AppDataSchemaInstance, FindAppDataSchemaInstancesQuery> {
3517
+ constructor(client: IntegrationAppApiClient);
3518
+ }
3519
+ declare class AppDataSchemaInstanceAccessor extends ElementInstanceAccessor<AppDataSchemaInstance, AppDataSchemaInstanceSelector, UpdateAppDataSchemaInstanceRequest, CreateAppDataSchemaInstanceRequest> {
3520
+ private client;
3521
+ constructor(client: IntegrationAppApiClient, selector: string | AppDataSchemaInstanceSelector);
3522
+ setup(): Promise<void>;
2892
3523
  }
2893
3524
 
2894
3525
  declare class ExternalEventSubscriptionsAccessor extends ElementInstanceListAccessor<ExternalEventSubscription, FindExternalEventSubscriptionsQuery> {
@@ -2907,88 +3538,13 @@ declare class ExternalEventSubscriptionAccessor {
2907
3538
  private getPath;
2908
3539
  }
2909
3540
 
2910
- interface Scenario extends WorkspaceElement {
2911
- appId: string;
2912
- scenarioTemplateId?: string;
2913
- elements?: ScenarioElement[];
2914
- connectors?: MinimalConnector[];
2915
- todos?: ScenarioToDo[];
2916
- appliedToIntegrations?: Integration[];
2917
- archivedAt?: string;
2918
- }
2919
- type ScenarioToDo = {
2920
- name: string;
2921
- description: string;
2922
- isComplete: boolean;
2923
- };
2924
- type ScenarioElement = {
2925
- id: string;
2926
- type: IntegrationElementType;
2927
- element?: any;
2928
- };
2929
- interface FindScenariosQuery extends SearchQuery, PaginationQuery {
2930
- }
2931
- interface CreateScenarioRequest {
2932
- name: string;
2933
- key: string;
2934
- elements?: ScenarioElement[];
2935
- todos?: ScenarioToDo[];
2936
- }
2937
- interface UpdateScenarioRequest {
2938
- name?: string;
2939
- key?: string;
2940
- elements?: ScenarioElement[];
2941
- todos?: ScenarioToDo[];
2942
- }
2943
-
2944
- declare class ScenariosAccessor extends ElementListAccessor<Scenario, FindScenariosQuery, CreateScenarioRequest> {
2945
- constructor(client: IntegrationAppApiClient);
2946
- }
2947
- declare class ScenarioAccessor extends ElementAccessor<Scenario, UpdateScenarioRequest> {
2948
- constructor(client: IntegrationAppApiClient, selector: string);
2949
- }
2950
-
2951
- declare enum ScreenType {
2952
- Integration = "integration"
2953
- }
2954
- declare enum ScreenBlockType {
2955
- Flow = "flow",
2956
- FieldMapping = "field-mapping",
2957
- DataSource = "data-source",
2958
- Action = "action"
2959
- }
2960
- interface ScreenBlock {
2961
- type: ScreenBlockType;
2962
- [key: string]: any;
2963
- }
2964
- interface ScreenSelector {
2965
- id?: string;
2966
- type?: ScreenType;
2967
- key?: string;
2968
- autoCreate?: boolean;
2969
- connectionId?: string;
2970
- }
2971
- interface UpdateScreenRequest {
2972
- blocks?: ScreenBlock[];
2973
- key?: string;
2974
- }
2975
- interface CreateScreenRequest extends UpdateScreenRequest {
2976
- type: ScreenType;
2977
- }
2978
- interface FindScreensQuery extends PaginationQuery {
2979
- type?: ScreenType;
2980
- }
2981
- interface Screen extends Omit<WorkspaceElement, 'key'> {
2982
- type: ScreenType;
2983
- key?: string;
2984
- blocks: ScreenBlock[];
2985
- }
2986
-
2987
- declare class ScreensAccessor extends ElementListAccessor<Screen, FindScreensQuery, CreateScreenRequest> {
3541
+ declare class SelfAccessor {
3542
+ private client;
2988
3543
  constructor(client: IntegrationAppApiClient);
2989
- }
2990
- declare class ScreenAccessor extends ElementAccessor<Screen, UpdateScreenRequest, ScreenSelector> {
2991
- constructor(client: IntegrationAppApiClient, selector: ScreenSelector | string);
3544
+ get(): Promise<Customer>;
3545
+ patch(data: Partial<{
3546
+ credentials: any;
3547
+ }>): Promise<Customer>;
2992
3548
  }
2993
3549
 
2994
3550
  interface OpenIntegrationAppConfigurationOptions extends OpenConfigurationOptions {
@@ -3029,7 +3585,6 @@ declare class IntegrationAppClient extends IntegrationAppApiClient {
3029
3585
  appEventType(id: string): AppEventTypeAccessor;
3030
3586
  get appEventSubscriptions(): AppEventSubscriptionsAccessor;
3031
3587
  appEventSubscription(selector: string | AppEventSubscriptionSelector): AppEventSubscriptionAccessor;
3032
- get appEvents(): AppEventsAccessor;
3033
3588
  get flowRuns(): FlowRunsAccessor;
3034
3589
  flowRun(id: string): FlowRunAccessor;
3035
3590
  get appDataSchemas(): AppDataSchemasAccessor;