@membranehq/sdk 0.2.1 → 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 (358) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +5 -8
  3. package/dist/bundle.d.ts +2734 -1678
  4. package/dist/bundle.js +9242 -18948
  5. package/dist/bundle.js.map +1 -1
  6. package/dist/dts/accessors/action-instances-accessors.d.ts +30 -0
  7. package/dist/dts/accessors/actions-accessors.d.ts +23 -0
  8. package/dist/dts/accessors/app-data-schema-instances-accessors.d.ts +12 -0
  9. package/dist/dts/accessors/app-data-schemas-accessors.d.ts +10 -0
  10. package/dist/dts/accessors/app-event-subscriptions-accessors.d.ts +11 -0
  11. package/dist/dts/accessors/app-event-types-accessors.d.ts +10 -0
  12. package/dist/dts/{accessors.d.ts → accessors/base-accessors.d.ts} +3 -3
  13. package/dist/dts/{connections/accessors.d.ts → accessors/connections-accessors.d.ts} +22 -18
  14. package/dist/dts/accessors/customers-accessors.d.ts +15 -0
  15. package/dist/dts/accessors/data-link-table-instances-accessors.d.ts +14 -0
  16. package/dist/dts/accessors/data-link-tables-accessors.d.ts +10 -0
  17. package/dist/dts/{data-sources/accessors.d.ts → accessors/data-sources-accessors.d.ts} +4 -4
  18. package/dist/dts/{external-events/accessors.d.ts → accessors/external-event-subscriptions-accessors.d.ts} +3 -3
  19. package/dist/dts/accessors/field-mapping-instances-accessors.d.ts +31 -0
  20. package/dist/dts/accessors/field-mappings-accessors.d.ts +25 -0
  21. package/dist/dts/{flows/accessors.d.ts → accessors/flow-instances-accessors.d.ts} +5 -26
  22. package/dist/dts/{flow-runs/accessors.d.ts → accessors/flow-runs-accessors.d.ts} +1 -1
  23. package/dist/dts/accessors/flows-accessors.d.ts +23 -0
  24. package/dist/dts/accessors/index.d.ts +21 -0
  25. package/dist/dts/{integrations/accessors.d.ts → accessors/integrations-accessors.d.ts} +12 -14
  26. package/dist/dts/{scenarios/accessors.d.ts → accessors/scenarios-accessors.d.ts} +2 -2
  27. package/dist/dts/{screens/accessors.d.ts → accessors/screens-accessors.d.ts} +2 -2
  28. package/dist/dts/api-client.d.ts +5 -5
  29. package/dist/dts/apps/types.d.ts +2 -0
  30. package/dist/dts/auth/accessors.d.ts +1 -1
  31. package/dist/dts/auth/index.d.ts +1 -1
  32. package/dist/dts/client.d.ts +2 -16
  33. package/dist/dts/data-builder/index.d.ts +19 -9
  34. package/dist/dts/data-filter/index.d.ts +1 -1
  35. package/dist/dts/data-schema/index.d.ts +1 -2
  36. package/dist/dts/data-schema/schemas.d.ts +4 -0
  37. package/dist/dts/data-schema/types.d.ts +1 -1
  38. package/dist/dts/{data-schema/utils.d.ts → data-schema-utils/index.d.ts} +3 -6
  39. package/dist/dts/error-tools/index.d.ts +3 -0
  40. package/dist/dts/errors/index.d.ts +6 -20
  41. package/dist/dts/{data-builder/formulas → formulas}/base.d.ts +2 -2
  42. package/dist/dts/{data-builder/formulas → formulas}/dataSchemaRef.d.ts +3 -3
  43. package/dist/dts/{data-builder/formulas → formulas}/eval.d.ts +1 -1
  44. package/dist/dts/{data-builder/formulas → formulas}/findAppRecordId.d.ts +1 -1
  45. package/dist/dts/{data-builder/formulas → formulas}/findExternalRecordId.d.ts +1 -1
  46. package/dist/dts/formulas/index.d.ts +91 -0
  47. package/dist/dts/{data-builder/formulas → formulas}/record.d.ts +1 -1
  48. package/dist/dts/{data-builder/formulas → formulas}/types.d.ts +1 -0
  49. package/dist/dts/index.d.ts +5 -18
  50. package/dist/dts/integration-elements/index.d.ts +3 -3
  51. package/dist/dts/{data-builder/locators.d.ts → locators/index.d.ts} +3 -3
  52. package/dist/dts/variables.d.ts +1 -1
  53. package/dist/dts/workspace-elements/api/action-instances-api.d.ts +8 -0
  54. package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +10 -0
  55. package/dist/dts/{actions/types.d.ts → workspace-elements/api/actions-api.d.ts} +12 -40
  56. package/dist/dts/{app-data-schemas/api.d.ts → workspace-elements/api/app-data-schema-instances-api.d.ts} +13 -20
  57. package/dist/dts/workspace-elements/api/app-data-schemas-api.d.ts +19 -0
  58. package/dist/dts/workspace-elements/api/app-event-subscriptions-api.d.ts +30 -0
  59. package/dist/dts/workspace-elements/api/app-event-types-api.d.ts +30 -0
  60. package/dist/dts/workspace-elements/api/app-events-api.d.ts +17 -0
  61. package/dist/dts/workspace-elements/api/connections-api.d.ts +49 -0
  62. package/dist/dts/{users/api.d.ts → workspace-elements/api/customers-api.d.ts} +5 -1
  63. package/dist/dts/{data-links/api.d.ts → workspace-elements/api/data-link-table-instances-api.d.ts} +15 -8
  64. package/dist/dts/workspace-elements/api/data-link-tables-api.d.ts +8 -0
  65. package/dist/dts/workspace-elements/api/data-source-instances-api.d.ts +12 -0
  66. package/dist/dts/{data-sources/api.d.ts → workspace-elements/api/data-sources-api.d.ts} +14 -5
  67. package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +19 -0
  68. package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +19 -0
  69. package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +10 -0
  70. package/dist/dts/workspace-elements/api/external-events-api.d.ts +73 -0
  71. package/dist/dts/workspace-elements/api/field-mapping-instances-api.d.ts +41 -0
  72. package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +39 -0
  73. package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +50 -0
  74. package/dist/dts/{flows/api.d.ts → workspace-elements/api/flows-api.d.ts} +21 -5
  75. package/dist/dts/workspace-elements/api/index.d.ts +25 -0
  76. package/dist/dts/{integrations/api.d.ts → workspace-elements/api/integrations-api.d.ts} +10 -3
  77. package/dist/dts/{scenarios/types.d.ts → workspace-elements/api/scenarios-api.d.ts} +24 -46
  78. package/dist/dts/{screens/types.d.ts → workspace-elements/api/screens-api.d.ts} +4 -6
  79. package/dist/dts/workspace-elements/base/action-instances/types.d.ts +30 -0
  80. package/dist/dts/workspace-elements/base/action-run-log-records/types.d.ts +19 -0
  81. package/dist/dts/{actions → workspace-elements/base/actions}/index.d.ts +0 -1
  82. package/dist/dts/workspace-elements/base/actions/types.d.ts +25 -0
  83. package/dist/dts/workspace-elements/base/app-data-schema-instances/types.d.ts +12 -0
  84. package/dist/dts/workspace-elements/base/app-data-schemas/index.d.ts +1 -0
  85. package/dist/dts/workspace-elements/base/app-data-schemas/types.d.ts +7 -0
  86. package/dist/dts/workspace-elements/base/app-event-subscriptions/index.d.ts +1 -0
  87. package/dist/dts/workspace-elements/base/app-event-subscriptions/types.d.ts +15 -0
  88. package/dist/dts/workspace-elements/base/app-event-types/index.d.ts +1 -0
  89. package/dist/dts/workspace-elements/base/app-event-types/types.d.ts +12 -0
  90. package/dist/dts/workspace-elements/base/connections/index.d.ts +1 -0
  91. package/dist/dts/{connections → workspace-elements/base/connections}/types.d.ts +8 -24
  92. package/dist/dts/{connectors → workspace-elements/base/connectors}/auth.d.ts +8 -5
  93. package/dist/dts/workspace-elements/base/connectors/events/index.d.ts +1 -0
  94. package/dist/dts/{connectors → workspace-elements/base/connectors}/events/types.d.ts +1 -1
  95. package/dist/dts/workspace-elements/base/connectors/global-webhooks/index.d.ts +1 -0
  96. package/dist/dts/{connectors → workspace-elements/base/connectors}/graphql-api.d.ts +1 -1
  97. package/dist/dts/{connectors → workspace-elements/base/connectors}/index.d.ts +0 -2
  98. package/dist/dts/{connectors → workspace-elements/base/connectors}/methods.d.ts +1 -1
  99. package/dist/dts/{connectors → workspace-elements/base/connectors}/rest-api.d.ts +1 -1
  100. package/dist/dts/{connectors → workspace-elements/base/connectors}/types.d.ts +3 -14
  101. package/dist/dts/{connectors → workspace-elements/base/connectors}/udm.d.ts +1 -1
  102. package/dist/dts/{users → workspace-elements/base/customers}/index.d.ts +1 -4
  103. package/dist/dts/workspace-elements/base/data-collections/data-locations/base.d.ts +10 -0
  104. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/implementation-types/connector-event.d.ts +3 -3
  105. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/implementation-types/custom-pull.d.ts +3 -3
  106. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/implementation-types/pull-latest-records.d.ts +3 -3
  107. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/implementation-types/webhook.d.ts +3 -3
  108. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/methods.d.ts +2 -2
  109. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/index.d.ts +25 -25
  110. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/base.d.ts +6 -6
  111. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/index.d.ts +0 -3
  112. package/dist/dts/workspace-elements/base/data-collections/data-locations/methods.d.ts +6 -0
  113. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-records.d.ts +1 -1
  114. package/dist/dts/workspace-elements/base/data-collections/index.d.ts +6 -0
  115. package/dist/dts/workspace-elements/base/data-collections/schemas.d.ts +1829 -0
  116. package/dist/dts/workspace-elements/base/data-collections/types.d.ts +54 -0
  117. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/base.d.ts +2 -2
  118. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/index.d.ts +2 -2
  119. package/dist/dts/{connectors/data-locations → workspace-elements/base/data-collections}/utils.d.ts +6 -3
  120. package/dist/dts/workspace-elements/base/data-link-table-instances/index.d.ts +1 -0
  121. package/dist/dts/workspace-elements/base/data-link-table-instances/types.d.ts +20 -0
  122. package/dist/dts/workspace-elements/base/data-link-tables/index.d.ts +1 -0
  123. package/dist/dts/workspace-elements/base/data-link-tables/types.d.ts +9 -0
  124. package/dist/dts/workspace-elements/base/data-source-instances/index.d.ts +1 -0
  125. package/dist/dts/workspace-elements/base/data-source-instances/types.d.ts +25 -0
  126. package/dist/dts/{data-sources → workspace-elements/base/data-sources}/index.d.ts +0 -2
  127. package/dist/dts/workspace-elements/base/data-sources/types.d.ts +27 -0
  128. package/dist/dts/workspace-elements/base/external-event-log-records/index.d.ts +1 -0
  129. package/dist/dts/workspace-elements/base/external-event-log-records/types.d.ts +18 -0
  130. package/dist/dts/workspace-elements/base/external-event-pulls/index.d.ts +1 -0
  131. package/dist/dts/workspace-elements/base/external-event-pulls/types.d.ts +21 -0
  132. package/dist/dts/workspace-elements/base/external-event-subscriptions/index.d.ts +1 -0
  133. package/dist/dts/workspace-elements/base/external-event-subscriptions/types.d.ts +42 -0
  134. package/dist/dts/{external-events → workspace-elements/base/external-events}/api.d.ts +2 -2
  135. package/dist/dts/{external-events → workspace-elements/base/external-events}/index.d.ts +1 -4
  136. package/dist/dts/workspace-elements/base/external-events/types.d.ts +17 -0
  137. package/dist/dts/workspace-elements/base/field-mapping-instances/index.d.ts +1 -0
  138. package/dist/dts/workspace-elements/base/field-mapping-instances/types.d.ts +27 -0
  139. package/dist/dts/workspace-elements/base/field-mappings/index.d.ts +2 -0
  140. package/dist/dts/workspace-elements/base/field-mappings/types.d.ts +38 -0
  141. package/dist/dts/workspace-elements/base/flow-instances/index.d.ts +2 -0
  142. package/dist/dts/workspace-elements/base/flow-instances/types.d.ts +37 -0
  143. package/dist/dts/workspace-elements/base/flow-runs/flow-node-runs.d.ts +374 -0
  144. package/dist/dts/workspace-elements/base/flow-runs/index.d.ts +2 -0
  145. package/dist/dts/workspace-elements/base/flow-runs/types.d.ts +31 -0
  146. package/dist/dts/workspace-elements/base/flows/index.d.ts +2 -0
  147. package/dist/dts/workspace-elements/base/flows/types.d.ts +33 -0
  148. package/dist/dts/workspace-elements/base/index.d.ts +27 -0
  149. package/dist/dts/workspace-elements/base/integrations/index.d.ts +1 -0
  150. package/dist/dts/{integrations → workspace-elements/base/integrations}/types.d.ts +5 -11
  151. package/dist/dts/workspace-elements/base/scenarios/index.d.ts +1 -0
  152. package/dist/dts/workspace-elements/base/scenarios/types.d.ts +27 -0
  153. package/dist/dts/workspace-elements/base/screens/index.d.ts +1 -0
  154. package/dist/dts/workspace-elements/base/screens/types.d.ts +7 -0
  155. package/dist/dts/workspace-elements/errors.d.ts +5 -0
  156. package/dist/dts/workspace-elements/index.d.ts +4 -0
  157. package/dist/dts/workspace-elements/types.d.ts +30 -4
  158. package/dist/dts/{flows/utils.d.ts → workspace-elements/utils/flow-utils.d.ts} +3 -3
  159. package/dist/dts/workspace-elements/utils/index.d.ts +1 -0
  160. package/dist/dts/workspace-elements-catalog/index.d.ts +3 -8
  161. package/dist/dts/workspaces/types.d.ts +6 -42
  162. package/dist/index.d.ts +5215 -3171
  163. package/dist/index.js +10471 -10327
  164. package/dist/index.js.map +1 -1
  165. package/dist/index.module.d.mts +5215 -3171
  166. package/dist/index.module.mjs +10418 -10316
  167. package/dist/index.module.mjs.map +1 -1
  168. package/package.json +9 -4
  169. package/dist/dts/actions/accessors.d.ts +0 -49
  170. package/dist/dts/app-data-schemas/accessors.d.ts +0 -18
  171. package/dist/dts/app-data-schemas/index.d.ts +0 -23
  172. package/dist/dts/app-events/accessors.d.ts +0 -20
  173. package/dist/dts/app-events/api.d.ts +0 -44
  174. package/dist/dts/app-events/index.d.ts +0 -42
  175. package/dist/dts/connections/api.d.ts +0 -27
  176. package/dist/dts/connections/create-or-update-connection.d.ts +0 -15
  177. package/dist/dts/connections/index.d.ts +0 -3
  178. package/dist/dts/connectors/data-locations/base.d.ts +0 -10
  179. package/dist/dts/connectors/data-locations/directories/index.d.ts +0 -17
  180. package/dist/dts/connectors/data-locations/directories/methods/base.d.ts +0 -18
  181. package/dist/dts/connectors/data-locations/directories/methods/list.d.ts +0 -2
  182. package/dist/dts/connectors/data-locations/methods.d.ts +0 -6
  183. package/dist/dts/connectors/data-locations/types.d.ts +0 -258
  184. package/dist/dts/data-builder/formula-processors.d.ts +0 -13
  185. package/dist/dts/data-builder/formula-types.d.ts +0 -4
  186. package/dist/dts/data-builder/formulas/index.d.ts +0 -26
  187. package/dist/dts/data-collections/types.d.ts +0 -24
  188. package/dist/dts/data-links/accessors.d.ts +0 -20
  189. package/dist/dts/data-links/index.d.ts +0 -36
  190. package/dist/dts/data-schema/data-field.d.ts +0 -14
  191. package/dist/dts/data-sources/types.d.ts +0 -63
  192. package/dist/dts/errors/error-doc-enum.d.ts +0 -7
  193. package/dist/dts/external-events/types.d.ts +0 -157
  194. package/dist/dts/field-mappings/accessors.d.ts +0 -54
  195. package/dist/dts/field-mappings/api.d.ts +0 -58
  196. package/dist/dts/field-mappings/index.d.ts +0 -66
  197. package/dist/dts/field-mappings/types.d.ts +0 -12
  198. package/dist/dts/flow-runs/flow-node-runs.d.ts +0 -42
  199. package/dist/dts/flow-runs/index.d.ts +0 -78
  200. package/dist/dts/flows/index.d.ts +0 -6
  201. package/dist/dts/flows/types.d.ts +0 -76
  202. package/dist/dts/integrations/index.d.ts +0 -3
  203. package/dist/dts/scenarios/index.d.ts +0 -2
  204. package/dist/dts/screens/index.d.ts +0 -2
  205. package/dist/dts/users/accessors.d.ts +0 -10
  206. package/dist/dts/{accessors.test.d.ts → accessors/base-accessors.test.d.ts} +0 -0
  207. package/dist/dts/{connectors/data-locations/utils.test.d.ts → data-builder/data-builder.test.d.ts} +0 -0
  208. package/dist/dts/{data-builder/formulas → data-schema-utils}/index.test.d.ts +0 -0
  209. package/dist/dts/{data-builder/formulas → formulas}/and.d.ts +0 -0
  210. package/dist/dts/{data-builder/formulas → formulas}/and.test.d.ts +0 -0
  211. package/dist/dts/{data-builder/formulas → formulas}/case.d.ts +0 -0
  212. package/dist/dts/{data-builder/formulas → formulas}/case.test.d.ts +0 -0
  213. package/dist/dts/{data-builder/formulas → formulas}/concat.d.ts +0 -0
  214. package/dist/dts/{data-builder/formulas → formulas}/concat.test.d.ts +0 -0
  215. package/dist/dts/{data-builder/formulas → formulas}/copy.d.ts +0 -0
  216. package/dist/dts/{data-builder/formulas → formulas}/copy.test.d.ts +0 -0
  217. package/dist/dts/{data-builder/formulas → formulas}/dataSchemaRef.test.d.ts +0 -0
  218. package/dist/dts/{data-builder/formulas → formulas}/domainFromEmail.d.ts +0 -0
  219. package/dist/dts/{data-builder/formulas → formulas}/domainFromEmail.test.d.ts +0 -0
  220. package/dist/dts/{data-builder/formulas → formulas}/eval.test.d.ts +0 -0
  221. package/dist/dts/{data-builder/formulas → formulas}/extractDate.d.ts +0 -0
  222. package/dist/dts/{data-builder/formulas → formulas}/extractDate.test.d.ts +0 -0
  223. package/dist/dts/{data-builder/formulas → formulas}/extractTime.d.ts +0 -0
  224. package/dist/dts/{data-builder/formulas → formulas}/extractTime.test.d.ts +0 -0
  225. package/dist/dts/{data-builder/formulas → formulas}/findAppRecordId.test.d.ts +0 -0
  226. package/dist/dts/{data-builder/formulas → formulas}/findExternalRecordId.test.d.ts +0 -0
  227. package/dist/dts/{data-builder/formulas → formulas}/first-name.d.ts +0 -0
  228. package/dist/dts/{data-builder/formulas → formulas}/first-name.test.d.ts +0 -0
  229. package/dist/dts/{data-builder/formulas → formulas}/firstNotEmpty.d.ts +0 -0
  230. package/dist/dts/{data-builder/formulas → formulas}/firstNotEmpty.test.d.ts +0 -0
  231. package/dist/dts/{data-builder/formulas → formulas}/formula.d.ts +0 -0
  232. package/dist/dts/{data-builder/formulas → formulas}/formula.test.d.ts +0 -0
  233. package/dist/dts/{data-builder → formulas}/index.test.d.ts +0 -0
  234. package/dist/dts/{data-builder/formulas → formulas}/iterate.d.ts +0 -0
  235. package/dist/dts/{data-builder/formulas → formulas}/iterate.test.d.ts +0 -0
  236. package/dist/dts/{data-builder/formulas → formulas}/jsonata.d.ts +0 -0
  237. package/dist/dts/{data-builder/formulas → formulas}/jsonata.test.d.ts +0 -0
  238. package/dist/dts/{data-builder/formulas → formulas}/last-name.d.ts +0 -0
  239. package/dist/dts/{data-builder/formulas → formulas}/last-name.test.d.ts +0 -0
  240. package/dist/dts/{data-builder/formulas → formulas}/lookup.d.ts +0 -0
  241. package/dist/dts/{data-builder/formulas → formulas}/lookup.test.d.ts +0 -0
  242. package/dist/dts/{data-builder/formulas → formulas}/map.d.ts +0 -0
  243. package/dist/dts/{data-builder/formulas → formulas}/map.test.d.ts +0 -0
  244. package/dist/dts/{data-builder/formulas → formulas}/mergeObjects.d.ts +0 -0
  245. package/dist/dts/{data-builder/formulas → formulas}/mergeObjects.test.d.ts +0 -0
  246. package/dist/dts/{data-builder/formulas → formulas}/or.d.ts +0 -0
  247. package/dist/dts/{data-builder/formulas → formulas}/or.test.d.ts +0 -0
  248. package/dist/dts/{data-builder/formulas → formulas}/plain.d.ts +0 -0
  249. package/dist/dts/{data-builder/formulas → formulas}/plain.test.d.ts +0 -0
  250. package/dist/dts/{data-builder/formulas → formulas}/record.test.d.ts +0 -0
  251. package/dist/dts/{data-builder/formulas → formulas}/tpl.d.ts +0 -0
  252. package/dist/dts/{data-builder/formulas → formulas}/tpl.test.d.ts +0 -0
  253. package/dist/dts/{data-builder/formulas → formulas}/var.d.ts +0 -0
  254. package/dist/dts/{data-builder/formulas → formulas}/var.test.d.ts +0 -0
  255. package/dist/dts/{data-builder → locators}/locators.test.d.ts +0 -0
  256. package/dist/dts/{data-builder/formula-processors.test.d.ts → setupTests.d.ts} +0 -0
  257. package/dist/dts/{connectors/events → workspace-elements/base/action-instances}/index.d.ts +0 -0
  258. package/dist/dts/{connectors/global-webhooks → workspace-elements/base/action-run-log-records}/index.d.ts +0 -0
  259. package/dist/dts/{actions → workspace-elements/base/actions}/action-types.d.ts +0 -0
  260. package/dist/dts/{data-collections → workspace-elements/base/app-data-schema-instances}/index.d.ts +0 -0
  261. package/dist/dts/{connectors → workspace-elements/base/connectors}/constants.d.ts +0 -0
  262. package/dist/dts/{connectors → workspace-elements/base/connectors}/global-webhooks/types.d.ts +0 -0
  263. package/dist/dts/{connectors → workspace-elements/base/connectors}/openapi.d.ts +0 -0
  264. package/dist/dts/{connectors → workspace-elements/base/connectors}/operations/handlers.d.ts +0 -0
  265. package/dist/dts/{connectors → workspace-elements/base/connectors}/operations/index.d.ts +0 -0
  266. package/dist/dts/{connectors → workspace-elements/base/connectors}/operations/types.d.ts +0 -0
  267. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/implementation-types/full-scan.d.ts +0 -0
  268. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/events/index.d.ts +0 -0
  269. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/create.d.ts +0 -0
  270. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/delete.d.ts +0 -0
  271. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/find-by-id.d.ts +0 -0
  272. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/find.d.ts +0 -0
  273. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/list.d.ts +0 -0
  274. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/match.d.ts +0 -0
  275. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/search.d.ts +0 -0
  276. package/dist/dts/{connectors → workspace-elements/base/data-collections}/data-locations/collections/methods/update.d.ts +0 -0
  277. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/activities.d.ts +0 -0
  278. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/activities.test.d.ts +0 -0
  279. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/bills.d.ts +0 -0
  280. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/campaign-members.d.ts +0 -0
  281. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/campaigns.d.ts +0 -0
  282. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/companies.d.ts +0 -0
  283. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/contact-lists.d.ts +0 -0
  284. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/contacts.d.ts +0 -0
  285. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/credit-notes.d.ts +0 -0
  286. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/customers.d.ts +0 -0
  287. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/deal-products.d.ts +0 -0
  288. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/deal-stages.d.ts +0 -0
  289. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/deals.d.ts +0 -0
  290. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/documents.d.ts +0 -0
  291. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/drive-items.d.ts +0 -0
  292. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/drives.d.ts +0 -0
  293. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/eeocs.d.ts +0 -0
  294. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/emails.d.ts +0 -0
  295. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/employees.d.ts +0 -0
  296. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/files.d.ts +0 -0
  297. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/folders.d.ts +0 -0
  298. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/invoices.d.ts +0 -0
  299. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/job-applications.d.ts +0 -0
  300. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/job-candidates.d.ts +0 -0
  301. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/job-interviews.d.ts +0 -0
  302. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/job-offers.d.ts +0 -0
  303. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/jobs.d.ts +0 -0
  304. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/journal-entries.d.ts +0 -0
  305. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/leads.d.ts +0 -0
  306. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/ledger-accounts.d.ts +0 -0
  307. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/meetings.d.ts +0 -0
  308. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/messages.d.ts +0 -0
  309. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/notes.d.ts +0 -0
  310. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/orders.d.ts +0 -0
  311. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/payments.d.ts +0 -0
  312. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/payrolls.d.ts +0 -0
  313. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/products.d.ts +0 -0
  314. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/projects.d.ts +0 -0
  315. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/suppliers.d.ts +0 -0
  316. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/tasks.d.ts +0 -0
  317. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/tax-rates.d.ts +0 -0
  318. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/timeoff-balances.d.ts +0 -0
  319. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/timeoff-requests.d.ts +0 -0
  320. package/dist/dts/{udm → workspace-elements/base/data-collections/udm}/users.d.ts +0 -0
  321. package/dist/dts/{data-schema → workspace-elements/base/data-collections}/utils.test.d.ts +0 -0
  322. package/dist/dts/{data-sources → workspace-elements/base/data-sources}/constants.d.ts +0 -0
  323. package/dist/dts/{field-mappings → workspace-elements/base/field-mappings}/merge/is-object.test.d.ts +0 -0
  324. package/dist/dts/{field-mappings → workspace-elements/base/field-mappings}/merge/merge-with-formulas.d.ts +0 -0
  325. package/dist/dts/{field-mappings → workspace-elements/base/field-mappings}/merge/merge-with-formulas.test.d.ts +0 -0
  326. package/dist/dts/{flows → workspace-elements/base/flow-instances}/schemas.d.ts +18 -18
  327. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/api-request-to-external-app.d.ts +0 -0
  328. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/api-request-to-your-app.d.ts +0 -0
  329. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/api-trigger.d.ts +0 -0
  330. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/app-event-trigger.d.ts +0 -0
  331. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/base.d.ts +0 -0
  332. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/connector-event-trigger.d.ts +0 -0
  333. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/create-data-link.d.ts +0 -0
  334. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/create-data-record.d.ts +0 -0
  335. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/custom-http-request.d.ts +0 -0
  336. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/data-record-created-trigger.d.ts +0 -0
  337. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/data-record-deleted-trigger.d.ts +0 -0
  338. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/data-record-updated-trigger.d.ts +0 -0
  339. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/delete-data-link.d.ts +0 -0
  340. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/delete-data-record.d.ts +0 -0
  341. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/filter.d.ts +0 -0
  342. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/find-data-link.d.ts +0 -0
  343. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/find-data-record-by-id.d.ts +0 -0
  344. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/find-data-records.d.ts +0 -0
  345. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/find-or-create-data-record.d.ts +0 -0
  346. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/for-each-v2.d.ts +0 -0
  347. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/for-each.d.ts +0 -0
  348. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/index.d.ts +0 -0
  349. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/integration-specific-operation.d.ts +0 -0
  350. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/list-data-records.d.ts +0 -0
  351. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/lookup-data-record.d.ts +0 -0
  352. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/run-action.d.ts +0 -0
  353. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/run-javascript.d.ts +0 -0
  354. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/schedule-trigger.d.ts +0 -0
  355. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/search-data-records.d.ts +0 -0
  356. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/transform-data.d.ts +0 -0
  357. /package/dist/dts/{flows → workspace-elements/base/flows}/nodes/update-data-record.d.ts +0 -0
  358. /package/dist/dts/{flows/utils.test.d.ts → workspace-elements/utils/flow-utils.test.d.ts} +0 -0
package/dist/bundle.d.ts CHANGED
@@ -18,11 +18,11 @@ declare class IntegrationAppApiClient {
18
18
  constructor({ uiUri, apiUri, accessToken, token, fetchToken, fetchCredentials, credentials, }?: IntegrationAppClientOptions);
19
19
  setCredentials(credentials: any): Promise<any>;
20
20
  getToken(): Promise<string>;
21
- get(uri: string, queryParams?: Record<string, any>, options?: AxiosRequestConfig): Promise<any>;
22
- post(uri: string, data?: any, options?: AxiosRequestConfig): Promise<any>;
23
- put(uri: string, data?: any, options?: AxiosRequestConfig): Promise<any>;
24
- patch(uri: string, data?: any, options?: AxiosRequestConfig): Promise<any>;
25
- delete(uri: string, data?: any, options?: AxiosRequestConfig): Promise<any>;
21
+ get<T = any>(uri: string, queryParams?: Record<string, any>, options?: AxiosRequestConfig): Promise<T>;
22
+ post<T = any>(uri: string, data?: any, options?: AxiosRequestConfig): Promise<T>;
23
+ put<T = any>(uri: string, data?: any, options?: AxiosRequestConfig): Promise<T>;
24
+ patch<T = any>(uri: string, data?: any, options?: AxiosRequestConfig): Promise<T>;
25
+ delete<T = any>(uri: string, data?: any, options?: AxiosRequestConfig): Promise<T>;
26
26
  getEmbedUri(page: string, pageParams?: Record<string, any>, options?: {
27
27
  embedMode: 'isolated-embed' | 'popup-embed';
28
28
  }): Promise<string>;
@@ -55,37 +55,8 @@ declare class PaginationResponse<T> {
55
55
  cursor?: string;
56
56
  }
57
57
 
58
- declare enum ErrorDoc {
59
- AuthenticationTokenErrors = "authentication-token-errors",
60
- DataSourceNoCollectionSelected = "data-source-no-collection-selected",
61
- FlowInstanceSetupFailed = "flow-instance-setup-failed",
62
- FlowInstanceSetupTimeout = "flow-instance-setup-timeout",
63
- WebhookCannotFindUser = "webhook-cannot-find-user"
64
- }
65
-
66
- declare enum ErrorType {
67
- BAD_REQUEST = "bad_request",
68
- CONNECTION = "connection",
69
- CONFIGURATION = "configuration",
70
- DEPENDENCY_ERROR = "dependency_error",
71
- FLOW_RUN = "flow_run",
72
- FLOW_INSTANCE_SETUP = "flow_instance_setup",
73
- CONCURRENCY = "concurrency",
74
- INTERNAL = "internal",
75
- ACTION_RUN = "action_run",
76
- ACTION_INSTANCE_SETUP = "action_instance_setup",
77
- UNIT_RUN = "unit_run",
78
- CUSTOM_CODE = "custom_code"
79
- }
80
- interface ErrorDataFields {
81
- type?: ErrorType;
82
- key?: string;
83
- message: string;
84
- data?: any;
85
- doc?: ErrorDoc;
86
- stack?: any;
87
- causedByError?: ErrorData;
88
- logs?: any[];
58
+ declare const ErrorDataSchema: any;
59
+ interface ErrorDataFields extends z.infer<typeof ErrorDataSchema> {
89
60
  }
90
61
  type ErrorConstructorArg = string | ErrorDataFields | Error;
91
62
  declare class ErrorData implements ErrorDataFields {
@@ -131,13 +102,38 @@ declare enum WorkspaceElementDependencyType {
131
102
  Configuration = "CONFIGURATION",
132
103
  Parent = "PARENT"
133
104
  }
134
- interface WorkspaceElement {
105
+ declare const BaseWorkspaceElement: z.ZodObject<{
106
+ id: z.ZodString;
107
+ name: z.ZodString;
108
+ }, "strip", z.ZodTypeAny, {
135
109
  id: string;
136
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, {
137
124
  key: string;
138
- state?: WorkspaceElementState;
139
- errors?: ErrorData[];
140
- }
125
+ id: string;
126
+ name: string;
127
+ state?: WorkspaceElementState | undefined;
128
+ errors?: any[] | undefined;
129
+ }, {
130
+ key: string;
131
+ id: string;
132
+ name: string;
133
+ state?: WorkspaceElementState | undefined;
134
+ errors?: any[] | undefined;
135
+ }>;
136
+ type BaseMembraneInterface = z.infer<typeof BaseMembraneInterface>;
141
137
  interface WorkspaceElementReference {
142
138
  type: WorkspaceElementType;
143
139
  id: string;
@@ -229,85 +225,28 @@ declare class ElementInstanceAccessor<ElementInstance extends BaseElementInstanc
229
225
  private getSelector;
230
226
  }
231
227
 
232
- interface FindConnectionsQuery extends PaginationQuery {
233
- userId?: string;
234
- isTest?: boolean;
235
- integrationKey?: string;
236
- integrationId?: string;
237
- includeArchived?: boolean;
238
- }
239
- declare class CreateConnectionRequest {
240
- name: string;
241
- integrationId: string;
242
- credentials?: string;
243
- }
244
- declare class UpdateConnectionRequest {
245
- name?: string;
246
- credentials?: string;
247
- accessToken?: string;
248
- }
249
- interface ConnectionSelector {
250
- id?: string;
251
- integrationKey?: string;
252
- integrationId?: string;
253
- connectionId?: string;
254
- }
255
-
256
- interface DataRecord {
257
- id: string;
258
- name?: string;
259
- uri?: string;
260
- iconUri?: string;
261
- fields?: Record<string, any>;
262
- udm?: string;
263
- unifiedFields?: Record<string, any>;
264
- rawFields?: Record<string, any>;
265
- createdTime?: string;
266
- updatedTime?: string;
267
- deletedTime?: string;
268
- createdById?: string;
269
- updatedById?: string;
270
- }
271
- declare enum DataCollectionEventType {
272
- CREATED = "created",
273
- UPDATED = "updated",
274
- DELETED = "deleted"
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>;
275
241
  }
276
-
277
- interface DataSchema {
278
- title?: string;
279
- description?: string;
280
- type?: string | string[];
281
- format?: string;
282
- properties?: {
283
- [key: string]: DataSchema;
284
- };
285
- items?: DataSchema;
286
- additionalProperties?: boolean | DataSchema;
287
- enum?: string[];
288
- referenceRecords?: DataRecord[];
289
- referenceCollection?: {
290
- key: any;
291
- parameters?: Record<string, any>;
292
- };
293
- referenceUdm?: string;
294
- default?: any;
295
- allowCustom?: boolean;
296
- $ref?: string;
297
- required?: string[];
298
- minLength?: number;
299
- maxLength?: number;
300
- minimum?: number;
301
- maximum?: number;
302
- maxItems?: number;
303
- readOnly?: boolean;
304
- writeOnly?: boolean;
305
- examples?: any[];
306
- anyOf?: DataSchema[];
307
- isImplied?: boolean;
308
- isSensitive?: boolean;
309
- referenceCollectionPath?: string;
310
- 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>;
311
250
  }
312
251
 
313
252
  declare enum HttpRequestMethod {
@@ -382,680 +321,1520 @@ interface RestApiMapping {
382
321
  responseMapping?: any;
383
322
  }
384
323
 
385
- declare enum ConnectorMethodImplementationType {
386
- mapping = "mapping",
387
- operationMapping = "operation-mapping",
388
- restApiMapping = "rest-api-mapping",
389
- graphqlApiMapping = "graphql-api-mapping",
390
- javascript = "javascript",
391
- notSupported = "not-supported"
392
- }
393
- type ConnectorMethodImplementation = ConnectorMethodImplementationBase | ConnectorMethodImplementationMapping | ConnectorMethodImplementationOperationMapping | ConnectorMethodImplementationRestApiMapping | ConnectorMethodImplementationGraphqlApiMapping | ConnectorMethodImplementationJavascript | ConnectorMethodImplementationNotSupported;
394
- interface ConnectorMethodImplementationBase {
395
- implementationType?: ConnectorMethodImplementationType;
396
- filePath?: string;
397
- inheritedFromPath?: string[];
398
- isIncomplete?: boolean;
399
- parametersSchema?: DataSchema;
400
- }
401
- interface ConnectorMethodImplementationMapping extends ConnectorMethodImplementationBase {
402
- implementationType: ConnectorMethodImplementationType.mapping;
403
- mapping: any;
404
- }
405
- interface ConnectorMethodImplementationOperationMapping extends ConnectorMethodImplementationBase {
406
- implementationType: ConnectorMethodImplementationType.operationMapping;
407
- mapping: OperationMapping;
408
- }
409
- interface ConnectorMethodImplementationRestApiMapping extends ConnectorMethodImplementationBase {
410
- implementationType: ConnectorMethodImplementationType.restApiMapping;
411
- mapping: RestApiMapping;
412
- }
413
- interface ConnectorMethodImplementationGraphqlApiMapping extends ConnectorMethodImplementationBase {
414
- implementationType: ConnectorMethodImplementationType.graphqlApiMapping;
415
- mapping: GraphQLApiMapping;
416
- }
417
- interface ConnectorMethodImplementationJavascript extends ConnectorMethodImplementationBase {
418
- implementationType: ConnectorMethodImplementationType.javascript;
419
- code: string;
420
- }
421
- interface ConnectorMethodImplementationNotSupported extends ConnectorMethodImplementationBase {
422
- implementationType: ConnectorMethodImplementationType.notSupported;
423
- }
424
-
425
- type DataLocationSpec = DataCollectionSpec | DataDirectorySpec;
426
- declare enum DataLocationType {
427
- directory = "directory",
428
- collection = "collection"
429
- }
430
- interface DataLocationListItem {
431
- key: string;
432
- name: string;
433
- type: DataLocationType;
434
- isHidden?: boolean;
435
- }
436
- interface DataLocationPointer {
437
- key: string;
438
- parameters?: Record<string, any>;
439
- type?: DataLocationType;
440
- }
441
- interface DataLocation {
442
- key?: string;
443
- parameters?: any;
444
- path?: string;
445
- name?: string;
446
- type?: DataLocationType;
447
- isDefault?: boolean;
448
- read?: boolean;
449
- write?: boolean;
450
- }
451
- interface DataLocationSpecBase {
452
- type: DataLocationType;
453
- key?: string;
454
- name: string;
455
- parametersSchema?: DataSchema;
456
- }
457
- interface DataCollectionSpec extends DataLocationSpecBase {
458
- fieldsSchema?: DataSchema;
459
- list?: DataCollectionListSpec;
460
- search?: DataCollectionSearchSpec;
461
- match?: DataCollectionMatchSpec;
462
- findById?: DataCollectionFindByIdSpec;
463
- create?: DataCollectionCreateSpec;
464
- update?: DataCollectionUpdateSpec;
465
- delete?: DataCollectionDeleteSpec;
466
- events?: DataCollectionEventsSpec;
467
- customFields?: boolean;
468
- udm?: DataCollectionUdmsSpec;
469
- find?: DataCollectionFindSpec;
470
- }
471
- interface ApiRequestSpec {
472
- path: any;
473
- method: any;
474
- }
475
- interface DataDirectorySpec extends DataLocationSpecBase {
476
- locations?: DataLocation[];
477
- }
478
- interface DataCollectionMethodSpec {
479
- apiRequests?: ApiRequestSpec[];
480
- }
481
- interface DataCollectionFindSpec extends DataCollectionMethodSpec {
482
- queryFields?: string[];
483
- }
484
- interface DataCollectionMatchSpec extends DataCollectionMethodSpec {
485
- fields?: string[];
486
- }
487
- interface DataCollectionListSpec extends DataCollectionMethodSpec {
488
- filterFields?: string[];
489
- }
490
- interface DataCollectionSearchSpec extends DataCollectionMethodSpec {
491
- }
492
- interface DataCollectionFindByIdSpec extends DataCollectionMethodSpec {
493
- }
494
- interface DataCollectionCreateSpec extends DataCollectionMethodSpec {
495
- fields?: string[];
496
- requiredFields?: string[];
497
- excludedFields?: string[];
498
- }
499
- interface DataCollectionUpdateSpec extends DataCollectionMethodSpec {
500
- fields?: string[];
501
- excludedFields?: string[];
502
- }
503
- interface DataCollectionDeleteSpec extends DataCollectionMethodSpec {
504
- }
505
- type DataCollectionUdmSpec = {
506
- fields?: string[];
507
- extract?: Record<string, any>;
508
- parse?: Record<string, any>;
509
- };
510
- type DataCollectionUdmsSpec = Record<string, DataCollectionUdmSpec>;
511
- type DataCollectionEventTypeSpec = {
512
- type: 'push' | 'pull';
513
- isFullScan?: boolean;
514
- isIdOnly?: boolean;
515
- };
516
- type DataCollectionEventsSpec = {
517
- [value in DataCollectionEventType]: DataCollectionEventTypeSpec;
518
- } & {
519
- all?: DataCollectionEventTypeSpec;
520
- };
521
- interface DataCollectionMethodRequest {
522
- parameters?: Record<string, any>;
523
- }
524
- interface DataCollectionFindRequest {
525
- query?: any;
526
- cursor?: string;
527
- }
528
- interface DataCollectionFindResponse {
529
- records: DataRecord[];
530
- cursor?: string;
531
- }
532
- interface DataCollectionListRequest extends DataCollectionMethodRequest {
533
- filter?: any;
534
- unifiedFilter?: any;
535
- cursor?: string;
536
- }
537
- interface DataCollectionListResponseDrilldown {
538
- parameters?: Record<string, any>;
539
- filter?: Record<string, any>;
540
- }
541
- interface DataCollectionListResponse {
542
- records: DataRecord[];
543
- drilldowns?: Array<DataCollectionListResponseDrilldown>;
544
- cursor?: string;
545
- }
546
- interface DataCollectionSearchRequest extends DataCollectionMethodRequest {
547
- query: string;
548
- cursor?: string;
549
- }
550
- interface DataCollectionSearchResponse {
551
- records: DataRecord[];
552
- cursor?: string;
553
- }
554
- interface DataCollectionFindByIdRequest extends DataCollectionMethodRequest {
555
- id: string;
556
- udm?: string;
557
- }
558
- interface DataCollectionFindByIdResponse {
559
- record: DataRecord;
560
- }
561
- interface DataCollectionMatchRequest extends DataCollectionMethodRequest {
562
- query: Record<string, any>;
563
- }
564
- interface DataCollectionMatchResponse {
565
- record?: DataRecord;
566
- }
567
- interface DataCollectionCreateRequest extends DataCollectionMethodRequest {
568
- fields: Record<string, any>;
569
- }
570
- interface DataCollectionCreateResponse {
571
- id: string;
572
- }
573
- interface DataCollectionUpdateRequest extends DataCollectionMethodRequest {
574
- id: string;
575
- fields: Record<string, any>;
576
- }
577
- interface DataCollectionUpdateResponse {
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, {
578
339
  id: string;
579
- }
580
- interface DataCollectionDeleteRequest extends DataCollectionMethodRequest {
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
+ }, {
581
353
  id: string;
582
- }
583
- interface DataCollectionDeleteResponse {
584
- }
585
- interface DataDirectoryListRequest {
586
- cursor?: string;
587
- }
588
- interface DataDirectoryListResponse {
589
- locations: DataLocation[];
590
- cursor?: string;
591
- }
592
-
593
- declare enum UDM {
594
- ACTIVITIES = "activities",
595
- BILLS = "bills",
596
- CAMPAIGN_MEMBERS = "campaign-members",
597
- CAMPAIGNS = "campaigns",
598
- COMPANIES = "companies",
599
- CONTACTS = "contacts",
600
- CONTACT_LISTS = "contact-lists",
601
- CREDIT_NOTES = "credit-notes",
602
- CUSTOMERS = "customers",
603
- DEAL_PRODUCTS = "deal-products",
604
- DEALS = "deals",
605
- DEAL_STAGES = "deal-stages",
606
- DOCUMENTS = "documents",
607
- DRIVES = "drives",
608
- DRIVE_ITEMS = "drive-items",
609
- EEOCS = "eeocs",
610
- EMAILS = "emails",
611
- EMPLOYEES = "employees",
612
- FILES = "files",
613
- FOLDERS = "folders",
614
- INVOICES = "invoices",
615
- JOB_APPLICATIONS = "job-applications",
616
- JOB_CANDIDATES = "job-candidates",
617
- JOB_INTERVIEWS = "job-interviews",
618
- JOB_OFFERS = "job-offers",
619
- JOBS = "jobs",
620
- JOURNAL_ENTRIES = "journal-entries",
621
- LEADS = "leads",
622
- LEDGER_ACCOUNTS = "ledger-accounts",
623
- MEETINGS = "meetings",
624
- MESSAGES = "messages",
625
- NOTES = "notes",
626
- ORDERS = "orders",
627
- PAYMENTS = "payments",
628
- PAYROLLS = "payrolls",
629
- PRODUCTS = "products",
630
- PROJECTS = "projects",
631
- SUPPLIERS = "suppliers",
632
- TASKS = "tasks",
633
- TAX_RATES = "tax-rates",
634
- USERS = "users",
635
- TIMEOFF_BALANCES = "timeoff-balances",
636
- TIMEOFF_REQUESTS = "timeoff-requests"
637
- }
638
-
639
- interface ConnectorUdmSpec {
640
- defaultCollection?: DataLocationPointer;
641
- rootDirectory?: DataLocationPointer;
642
- collectionMappings: ConnectorUdmCollectionMapping[];
643
- }
644
- interface ConnectorUdmCollectionMapping extends DataLocationPointer {
645
- fieldsToCollection?: any;
646
- fieldsFromCollection?: any;
647
- }
648
-
649
- interface ConnectorUiSpec {
650
- schema?: DataSchema;
651
- description?: string;
652
- helpUri?: string;
653
- test?: boolean;
654
- }
655
- type ConnectorDataUdmSpec = {
656
- rootLocation: DataLocation;
657
- };
658
- type ConnectorDataSpec = {
659
- rootLocation?: DataLocation;
660
- locations?: DataLocationSpec[];
661
- udm?: Partial<Record<UDM, ConnectorDataUdmSpec>>;
662
- root?: DataLocation;
663
- } & Partial<Record<UDM, DataLocation>>;
664
- type ConnectorApiType = 'openapi' | 'graphql';
665
- interface ConnectorSpec {
666
- key?: string;
667
- name?: string;
668
- appUri?: string;
669
- logoUri?: string;
670
- apiDocsUri?: string;
671
- api?: {
672
- type: ConnectorApiType;
673
- };
674
- ui?: ConnectorUiSpec;
675
- auth?: ConnectorAuth;
676
- parametersSchema?: DataSchema;
677
- data?: ConnectorDataSpec;
678
- udms?: string[];
679
- udm?: Record<string, ConnectorUdmSpec>;
680
- operations?: ConnectorOperationHandler[];
681
- test?: ConnectorMethodImplementation;
682
- hasReadme?: boolean;
683
- appUuid?: string;
684
- knowledgeBaseUuid?: string;
685
- workspaceId?: string;
686
- }
687
- type MinimalConnector = {
688
- id: string;
689
- key: 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>;
368
+
369
+ declare const DataCollectionSpecSchema: z.ZodObject<{
370
+ type: z.ZodLiteral<"collection">;
371
+ key: z.ZodOptional<z.ZodString>;
372
+ name: z.ZodString;
373
+ parametersSchema: z.ZodOptional<z.ZodLazy<any>>;
374
+ fieldsSchema: z.ZodOptional<z.ZodLazy<any>>;
375
+ list: z.ZodOptional<z.ZodObject<{
376
+ apiRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
377
+ path: z.ZodUnknown;
378
+ method: z.ZodUnknown;
379
+ }, "strip", z.ZodTypeAny, {
380
+ method?: unknown;
381
+ path?: unknown;
382
+ }, {
383
+ method?: unknown;
384
+ path?: unknown;
385
+ }>, "many">>;
386
+ } & {
387
+ filterFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
388
+ }, "strip", z.ZodTypeAny, {
389
+ apiRequests?: {
390
+ method?: unknown;
391
+ path?: unknown;
392
+ }[] | undefined;
393
+ filterFields?: string[] | undefined;
394
+ }, {
395
+ apiRequests?: {
396
+ method?: unknown;
397
+ path?: unknown;
398
+ }[] | undefined;
399
+ filterFields?: string[] | undefined;
400
+ }>>;
401
+ search: z.ZodOptional<z.ZodObject<{
402
+ apiRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
403
+ path: z.ZodUnknown;
404
+ method: z.ZodUnknown;
405
+ }, "strip", z.ZodTypeAny, {
406
+ method?: unknown;
407
+ path?: unknown;
408
+ }, {
409
+ method?: unknown;
410
+ path?: unknown;
411
+ }>, "many">>;
412
+ }, "strip", z.ZodTypeAny, {
413
+ apiRequests?: {
414
+ method?: unknown;
415
+ path?: unknown;
416
+ }[] | undefined;
417
+ }, {
418
+ apiRequests?: {
419
+ method?: unknown;
420
+ path?: unknown;
421
+ }[] | undefined;
422
+ }>>;
423
+ match: z.ZodOptional<z.ZodObject<{
424
+ apiRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
425
+ path: z.ZodUnknown;
426
+ method: z.ZodUnknown;
427
+ }, "strip", z.ZodTypeAny, {
428
+ method?: unknown;
429
+ path?: unknown;
430
+ }, {
431
+ method?: unknown;
432
+ path?: unknown;
433
+ }>, "many">>;
434
+ } & {
435
+ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
436
+ }, "strip", z.ZodTypeAny, {
437
+ fields?: string[] | undefined;
438
+ apiRequests?: {
439
+ method?: unknown;
440
+ path?: unknown;
441
+ }[] | undefined;
442
+ }, {
443
+ fields?: string[] | undefined;
444
+ apiRequests?: {
445
+ method?: unknown;
446
+ path?: unknown;
447
+ }[] | undefined;
448
+ }>>;
449
+ findById: z.ZodOptional<z.ZodObject<{
450
+ apiRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
451
+ path: z.ZodUnknown;
452
+ method: z.ZodUnknown;
453
+ }, "strip", z.ZodTypeAny, {
454
+ method?: unknown;
455
+ path?: unknown;
456
+ }, {
457
+ method?: unknown;
458
+ path?: unknown;
459
+ }>, "many">>;
460
+ }, "strip", z.ZodTypeAny, {
461
+ apiRequests?: {
462
+ method?: unknown;
463
+ path?: unknown;
464
+ }[] | undefined;
465
+ }, {
466
+ apiRequests?: {
467
+ method?: unknown;
468
+ path?: unknown;
469
+ }[] | undefined;
470
+ }>>;
471
+ create: z.ZodOptional<z.ZodObject<{
472
+ apiRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
473
+ path: z.ZodUnknown;
474
+ method: z.ZodUnknown;
475
+ }, "strip", z.ZodTypeAny, {
476
+ method?: unknown;
477
+ path?: unknown;
478
+ }, {
479
+ method?: unknown;
480
+ path?: unknown;
481
+ }>, "many">>;
482
+ } & {
483
+ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
484
+ requiredFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
485
+ excludedFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
486
+ }, "strip", z.ZodTypeAny, {
487
+ fields?: string[] | undefined;
488
+ apiRequests?: {
489
+ method?: unknown;
490
+ path?: unknown;
491
+ }[] | undefined;
492
+ requiredFields?: string[] | undefined;
493
+ excludedFields?: string[] | undefined;
494
+ }, {
495
+ fields?: string[] | undefined;
496
+ apiRequests?: {
497
+ method?: unknown;
498
+ path?: unknown;
499
+ }[] | undefined;
500
+ requiredFields?: string[] | undefined;
501
+ excludedFields?: string[] | undefined;
502
+ }>>;
503
+ update: z.ZodOptional<z.ZodObject<{
504
+ apiRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
505
+ path: z.ZodUnknown;
506
+ method: z.ZodUnknown;
507
+ }, "strip", z.ZodTypeAny, {
508
+ method?: unknown;
509
+ path?: unknown;
510
+ }, {
511
+ method?: unknown;
512
+ path?: unknown;
513
+ }>, "many">>;
514
+ } & {
515
+ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
516
+ excludedFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
517
+ }, "strip", z.ZodTypeAny, {
518
+ fields?: string[] | undefined;
519
+ apiRequests?: {
520
+ method?: unknown;
521
+ path?: unknown;
522
+ }[] | undefined;
523
+ excludedFields?: string[] | undefined;
524
+ }, {
525
+ fields?: string[] | undefined;
526
+ apiRequests?: {
527
+ method?: unknown;
528
+ path?: unknown;
529
+ }[] | undefined;
530
+ excludedFields?: string[] | undefined;
531
+ }>>;
532
+ delete: z.ZodOptional<z.ZodObject<{
533
+ apiRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
534
+ path: z.ZodUnknown;
535
+ method: z.ZodUnknown;
536
+ }, "strip", z.ZodTypeAny, {
537
+ method?: unknown;
538
+ path?: unknown;
539
+ }, {
540
+ method?: unknown;
541
+ path?: unknown;
542
+ }>, "many">>;
543
+ }, "strip", z.ZodTypeAny, {
544
+ apiRequests?: {
545
+ method?: unknown;
546
+ path?: unknown;
547
+ }[] | undefined;
548
+ }, {
549
+ apiRequests?: {
550
+ method?: unknown;
551
+ path?: unknown;
552
+ }[] | undefined;
553
+ }>>;
554
+ events: z.ZodOptional<z.ZodObject<{
555
+ created: z.ZodOptional<z.ZodObject<{
556
+ type: z.ZodEnum<["push", "pull"]>;
557
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
558
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
559
+ }, "strip", z.ZodTypeAny, {
560
+ type: "push" | "pull";
561
+ isFullScan?: boolean | undefined;
562
+ isIdOnly?: boolean | undefined;
563
+ }, {
564
+ type: "push" | "pull";
565
+ isFullScan?: boolean | undefined;
566
+ isIdOnly?: boolean | undefined;
567
+ }>>;
568
+ updated: z.ZodOptional<z.ZodObject<{
569
+ type: z.ZodEnum<["push", "pull"]>;
570
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
571
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
572
+ }, "strip", z.ZodTypeAny, {
573
+ type: "push" | "pull";
574
+ isFullScan?: boolean | undefined;
575
+ isIdOnly?: boolean | undefined;
576
+ }, {
577
+ type: "push" | "pull";
578
+ isFullScan?: boolean | undefined;
579
+ isIdOnly?: boolean | undefined;
580
+ }>>;
581
+ deleted: z.ZodOptional<z.ZodObject<{
582
+ type: z.ZodEnum<["push", "pull"]>;
583
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
584
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
585
+ }, "strip", z.ZodTypeAny, {
586
+ type: "push" | "pull";
587
+ isFullScan?: boolean | undefined;
588
+ isIdOnly?: boolean | undefined;
589
+ }, {
590
+ type: "push" | "pull";
591
+ isFullScan?: boolean | undefined;
592
+ isIdOnly?: boolean | undefined;
593
+ }>>;
594
+ all: z.ZodOptional<z.ZodObject<{
595
+ type: z.ZodEnum<["push", "pull"]>;
596
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
597
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
598
+ }, "strip", z.ZodTypeAny, {
599
+ type: "push" | "pull";
600
+ isFullScan?: boolean | undefined;
601
+ isIdOnly?: boolean | undefined;
602
+ }, {
603
+ type: "push" | "pull";
604
+ isFullScan?: boolean | undefined;
605
+ isIdOnly?: boolean | undefined;
606
+ }>>;
607
+ }, "strip", z.ZodObject<{
608
+ type: z.ZodEnum<["push", "pull"]>;
609
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
610
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
611
+ }, "strip", z.ZodTypeAny, {
612
+ type: "push" | "pull";
613
+ isFullScan?: boolean | undefined;
614
+ isIdOnly?: boolean | undefined;
615
+ }, {
616
+ type: "push" | "pull";
617
+ isFullScan?: boolean | undefined;
618
+ isIdOnly?: boolean | undefined;
619
+ }>, z.objectOutputType<{
620
+ created: z.ZodOptional<z.ZodObject<{
621
+ type: z.ZodEnum<["push", "pull"]>;
622
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
623
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
624
+ }, "strip", z.ZodTypeAny, {
625
+ type: "push" | "pull";
626
+ isFullScan?: boolean | undefined;
627
+ isIdOnly?: boolean | undefined;
628
+ }, {
629
+ type: "push" | "pull";
630
+ isFullScan?: boolean | undefined;
631
+ isIdOnly?: boolean | undefined;
632
+ }>>;
633
+ updated: z.ZodOptional<z.ZodObject<{
634
+ type: z.ZodEnum<["push", "pull"]>;
635
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
636
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
637
+ }, "strip", z.ZodTypeAny, {
638
+ type: "push" | "pull";
639
+ isFullScan?: boolean | undefined;
640
+ isIdOnly?: boolean | undefined;
641
+ }, {
642
+ type: "push" | "pull";
643
+ isFullScan?: boolean | undefined;
644
+ isIdOnly?: boolean | undefined;
645
+ }>>;
646
+ deleted: z.ZodOptional<z.ZodObject<{
647
+ type: z.ZodEnum<["push", "pull"]>;
648
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
649
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
650
+ }, "strip", z.ZodTypeAny, {
651
+ type: "push" | "pull";
652
+ isFullScan?: boolean | undefined;
653
+ isIdOnly?: boolean | undefined;
654
+ }, {
655
+ type: "push" | "pull";
656
+ isFullScan?: boolean | undefined;
657
+ isIdOnly?: boolean | undefined;
658
+ }>>;
659
+ all: z.ZodOptional<z.ZodObject<{
660
+ type: z.ZodEnum<["push", "pull"]>;
661
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
662
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
663
+ }, "strip", z.ZodTypeAny, {
664
+ type: "push" | "pull";
665
+ isFullScan?: boolean | undefined;
666
+ isIdOnly?: boolean | undefined;
667
+ }, {
668
+ type: "push" | "pull";
669
+ isFullScan?: boolean | undefined;
670
+ isIdOnly?: boolean | undefined;
671
+ }>>;
672
+ }, z.ZodObject<{
673
+ type: z.ZodEnum<["push", "pull"]>;
674
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
675
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
676
+ }, "strip", z.ZodTypeAny, {
677
+ type: "push" | "pull";
678
+ isFullScan?: boolean | undefined;
679
+ isIdOnly?: boolean | undefined;
680
+ }, {
681
+ type: "push" | "pull";
682
+ isFullScan?: boolean | undefined;
683
+ isIdOnly?: boolean | undefined;
684
+ }>, "strip">, z.objectInputType<{
685
+ created: z.ZodOptional<z.ZodObject<{
686
+ type: z.ZodEnum<["push", "pull"]>;
687
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
688
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
689
+ }, "strip", z.ZodTypeAny, {
690
+ type: "push" | "pull";
691
+ isFullScan?: boolean | undefined;
692
+ isIdOnly?: boolean | undefined;
693
+ }, {
694
+ type: "push" | "pull";
695
+ isFullScan?: boolean | undefined;
696
+ isIdOnly?: boolean | undefined;
697
+ }>>;
698
+ updated: z.ZodOptional<z.ZodObject<{
699
+ type: z.ZodEnum<["push", "pull"]>;
700
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
701
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
702
+ }, "strip", z.ZodTypeAny, {
703
+ type: "push" | "pull";
704
+ isFullScan?: boolean | undefined;
705
+ isIdOnly?: boolean | undefined;
706
+ }, {
707
+ type: "push" | "pull";
708
+ isFullScan?: boolean | undefined;
709
+ isIdOnly?: boolean | undefined;
710
+ }>>;
711
+ deleted: z.ZodOptional<z.ZodObject<{
712
+ type: z.ZodEnum<["push", "pull"]>;
713
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
714
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
715
+ }, "strip", z.ZodTypeAny, {
716
+ type: "push" | "pull";
717
+ isFullScan?: boolean | undefined;
718
+ isIdOnly?: boolean | undefined;
719
+ }, {
720
+ type: "push" | "pull";
721
+ isFullScan?: boolean | undefined;
722
+ isIdOnly?: boolean | undefined;
723
+ }>>;
724
+ all: z.ZodOptional<z.ZodObject<{
725
+ type: z.ZodEnum<["push", "pull"]>;
726
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
727
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
728
+ }, "strip", z.ZodTypeAny, {
729
+ type: "push" | "pull";
730
+ isFullScan?: boolean | undefined;
731
+ isIdOnly?: boolean | undefined;
732
+ }, {
733
+ type: "push" | "pull";
734
+ isFullScan?: boolean | undefined;
735
+ isIdOnly?: boolean | undefined;
736
+ }>>;
737
+ }, z.ZodObject<{
738
+ type: z.ZodEnum<["push", "pull"]>;
739
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
740
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
741
+ }, "strip", z.ZodTypeAny, {
742
+ type: "push" | "pull";
743
+ isFullScan?: boolean | undefined;
744
+ isIdOnly?: boolean | undefined;
745
+ }, {
746
+ type: "push" | "pull";
747
+ isFullScan?: boolean | undefined;
748
+ isIdOnly?: boolean | undefined;
749
+ }>, "strip">>>;
750
+ customFields: z.ZodOptional<z.ZodBoolean>;
751
+ udm: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
752
+ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
753
+ extract: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
754
+ parse: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
755
+ }, "strip", z.ZodTypeAny, {
756
+ fields?: string[] | undefined;
757
+ extract?: Record<string, any> | undefined;
758
+ parse?: Record<string, any> | undefined;
759
+ }, {
760
+ fields?: string[] | undefined;
761
+ extract?: Record<string, any> | undefined;
762
+ parse?: Record<string, any> | undefined;
763
+ }>>>;
764
+ find: z.ZodOptional<z.ZodObject<{
765
+ apiRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
766
+ path: z.ZodUnknown;
767
+ method: z.ZodUnknown;
768
+ }, "strip", z.ZodTypeAny, {
769
+ method?: unknown;
770
+ path?: unknown;
771
+ }, {
772
+ method?: unknown;
773
+ path?: unknown;
774
+ }>, "many">>;
775
+ } & {
776
+ queryFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
777
+ }, "strip", z.ZodTypeAny, {
778
+ apiRequests?: {
779
+ method?: unknown;
780
+ path?: unknown;
781
+ }[] | undefined;
782
+ queryFields?: string[] | undefined;
783
+ }, {
784
+ apiRequests?: {
785
+ method?: unknown;
786
+ path?: unknown;
787
+ }[] | undefined;
788
+ queryFields?: string[] | undefined;
789
+ }>>;
790
+ }, "strip", z.ZodTypeAny, {
791
+ type: "collection";
690
792
  name: string;
691
- logoUri: string;
692
- };
693
-
694
- declare const CONNECTOR_AUTH_TYPES: readonly ["integration-app-token", "oauth2", "oauth1", "client-credentials", "proxy"];
695
- type ConnectorAuthType = (typeof CONNECTOR_AUTH_TYPES)[number];
696
- type ConnectorAuthSpec = {
697
- title?: string;
698
- description?: string;
699
- type: ConnectorAuthType;
700
- ui?: {
701
- schema?: DataSchema;
702
- helpUri?: string;
703
- };
704
- };
705
- interface ConnectorAuthHandlerBase extends ConnectorAuthSpec {
706
- title?: string;
707
- type: ConnectorAuthType;
708
- credentialsSchema?: DataSchema;
709
- customCredentialsSchema?: DataSchema;
710
- makeApiClient?: ConnectorMethodImplementationBase;
711
- refreshCredentials?: ConnectorMethodImplementationBase;
712
- test?: ConnectorMethodImplementationBase;
713
- enabled?: any;
714
- }
715
- interface ConnectorAuthOAuth2 extends ConnectorAuthHandlerBase {
716
- type: 'oauth2';
717
- getOAuthConfig?: ConnectorMethodImplementation;
718
- getTokenData?: ConnectorMethodImplementation;
719
- getCredentialsFromAccessTokenResponse?: ConnectorMethodImplementation;
720
- getCredentialsFromRefreshTokenResponse?: ConnectorMethodImplementation;
721
- oAuthConfig?: ConnectorMethodImplementation;
722
- }
723
- interface ConnectorAuthOAuth1 extends ConnectorAuthHandlerBase {
724
- type: 'oauth1';
725
- getOAuthConfig?: ConnectorMethodImplementation;
726
- }
727
- interface ConnectorAuthClientCredentials extends ConnectorAuthHandlerBase {
728
- type: 'client-credentials';
729
- getCredentialsFromConnectionParameters?: ConnectorMethodImplementationBase;
730
- }
731
- interface ConnectorAuthProxy extends ConnectorAuthHandlerBase {
732
- type: 'proxy';
733
- proxyKey: string;
734
- }
735
- interface ConnectorAuthIntegrationAppToken extends ConnectorAuthHandlerBase {
736
- type: 'integration-app-token';
737
- }
738
- type ConnectorAuth = (ConnectorAuthOAuth2 | ConnectorAuthOAuth1 | ConnectorAuthClientCredentials | ConnectorAuthIntegrationAppToken | ConnectorAuthProxy) & {
739
- options?: {
740
- [key: string]: ConnectorAuthOAuth2 | ConnectorAuthOAuth1 | ConnectorAuthClientCredentials | ConnectorAuthIntegrationAppToken | ConnectorAuthProxy;
741
- };
742
- };
743
-
744
- interface OpenConfigurationOptions {
745
- onClose?: () => void;
746
- showPoweredBy?: boolean;
747
- }
748
-
749
- interface Integration extends WorkspaceElement {
750
- state?: WorkspaceElementState;
751
- errors?: ErrorData[];
752
- logoUri: string;
753
- connectorId?: string;
754
- connectorVersion?: string;
755
- authOptions?: IntegrationAuthOption[];
756
- oAuthCallbackUri?: string;
757
- parametersSchema?: DataSchema;
758
- parameters?: any;
759
- baseUri: string;
760
- connection?: Connection;
761
- archivedAt?: string;
762
- spec?: ConnectorSpec;
763
- hasMissingParameters?: boolean;
764
- hasDocumentation?: boolean;
765
- hasOperations?: boolean;
766
- hasData?: boolean;
767
- hasEvents?: boolean;
768
- hasGlobalWebhooks?: boolean;
769
- hasUdm?: boolean;
770
- isTest?: boolean;
771
- appUuid?: string;
772
- isDeactivated?: boolean;
773
- authType?: ConnectorAuthType;
774
- }
775
- type IntegrationAuthOption = ConnectorAuthSpec & {
776
- key: string;
777
- };
778
- type AppliedToIntegrations<Element> = {
779
- element: Element;
780
- integration: Integration;
781
- }[];
782
-
783
- interface CreateIntegrationRequest {
784
- name?: string;
785
- key: string;
786
- baseUri: string;
787
- logoUri: string;
788
- }
789
- interface UpdateIntegrationRequest {
790
- name?: string;
791
- key?: string;
792
- baseUri?: string;
793
- logoUri?: string;
794
- }
795
- interface FindIntegrationsQuery extends PaginationQuery, SearchQuery {
796
- }
797
- interface OpenNewConnectionOptions extends OpenConfigurationOptions {
798
- allowMultipleConnections?: boolean;
799
- name?: string;
800
- connectorParameters?: any;
801
- }
802
-
803
- type CreateCustomerRequest = {
804
- name?: string;
805
- internalId: string;
806
- fields?: any;
807
- credentials?: any;
808
- };
809
- type UpdateCustomerRequest = {
810
- name?: string;
811
- internalId?: string;
812
- fields?: any;
813
- credentials?: any;
814
- };
815
- type FindCustomersQuery = PaginationQuery & SearchQuery & {
816
- isTest?: boolean;
817
- };
818
- type CustomerSelector = {
819
- id: string;
820
- };
821
-
822
- declare class CustomersAccessor extends ElementListAccessor<Customer, FindCustomersQuery, CreateCustomerRequest> {
823
- constructor(client: IntegrationAppApiClient);
824
- }
825
- declare class CustomerAccessor extends ElementAccessor<Customer, UpdateCustomerRequest, CustomerSelector> {
826
- constructor(client: IntegrationAppApiClient, selector: CustomerSelector | string);
827
- }
828
-
829
- type Customer = {
830
- id: string;
793
+ key?: string | undefined;
794
+ match?: {
795
+ fields?: string[] | undefined;
796
+ apiRequests?: {
797
+ method?: unknown;
798
+ path?: unknown;
799
+ }[] | undefined;
800
+ } | undefined;
801
+ search?: {
802
+ apiRequests?: {
803
+ method?: unknown;
804
+ path?: unknown;
805
+ }[] | undefined;
806
+ } | undefined;
807
+ find?: {
808
+ apiRequests?: {
809
+ method?: unknown;
810
+ path?: unknown;
811
+ }[] | undefined;
812
+ queryFields?: string[] | undefined;
813
+ } | undefined;
814
+ delete?: {
815
+ apiRequests?: {
816
+ method?: unknown;
817
+ path?: unknown;
818
+ }[] | undefined;
819
+ } | undefined;
820
+ list?: {
821
+ apiRequests?: {
822
+ method?: unknown;
823
+ path?: unknown;
824
+ }[] | undefined;
825
+ filterFields?: string[] | undefined;
826
+ } | undefined;
827
+ udm?: Record<string, {
828
+ fields?: string[] | undefined;
829
+ extract?: Record<string, any> | undefined;
830
+ parse?: Record<string, any> | undefined;
831
+ }> | undefined;
832
+ events?: z.objectOutputType<{
833
+ created: z.ZodOptional<z.ZodObject<{
834
+ type: z.ZodEnum<["push", "pull"]>;
835
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
836
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
837
+ }, "strip", z.ZodTypeAny, {
838
+ type: "push" | "pull";
839
+ isFullScan?: boolean | undefined;
840
+ isIdOnly?: boolean | undefined;
841
+ }, {
842
+ type: "push" | "pull";
843
+ isFullScan?: boolean | undefined;
844
+ isIdOnly?: boolean | undefined;
845
+ }>>;
846
+ updated: z.ZodOptional<z.ZodObject<{
847
+ type: z.ZodEnum<["push", "pull"]>;
848
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
849
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
850
+ }, "strip", z.ZodTypeAny, {
851
+ type: "push" | "pull";
852
+ isFullScan?: boolean | undefined;
853
+ isIdOnly?: boolean | undefined;
854
+ }, {
855
+ type: "push" | "pull";
856
+ isFullScan?: boolean | undefined;
857
+ isIdOnly?: boolean | undefined;
858
+ }>>;
859
+ deleted: z.ZodOptional<z.ZodObject<{
860
+ type: z.ZodEnum<["push", "pull"]>;
861
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
862
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
863
+ }, "strip", z.ZodTypeAny, {
864
+ type: "push" | "pull";
865
+ isFullScan?: boolean | undefined;
866
+ isIdOnly?: boolean | undefined;
867
+ }, {
868
+ type: "push" | "pull";
869
+ isFullScan?: boolean | undefined;
870
+ isIdOnly?: boolean | undefined;
871
+ }>>;
872
+ all: z.ZodOptional<z.ZodObject<{
873
+ type: z.ZodEnum<["push", "pull"]>;
874
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
875
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
876
+ }, "strip", z.ZodTypeAny, {
877
+ type: "push" | "pull";
878
+ isFullScan?: boolean | undefined;
879
+ isIdOnly?: boolean | undefined;
880
+ }, {
881
+ type: "push" | "pull";
882
+ isFullScan?: boolean | undefined;
883
+ isIdOnly?: boolean | undefined;
884
+ }>>;
885
+ }, z.ZodObject<{
886
+ type: z.ZodEnum<["push", "pull"]>;
887
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
888
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
889
+ }, "strip", z.ZodTypeAny, {
890
+ type: "push" | "pull";
891
+ isFullScan?: boolean | undefined;
892
+ isIdOnly?: boolean | undefined;
893
+ }, {
894
+ type: "push" | "pull";
895
+ isFullScan?: boolean | undefined;
896
+ isIdOnly?: boolean | undefined;
897
+ }>, "strip"> | undefined;
898
+ parametersSchema?: any;
899
+ fieldsSchema?: any;
900
+ findById?: {
901
+ apiRequests?: {
902
+ method?: unknown;
903
+ path?: unknown;
904
+ }[] | undefined;
905
+ } | undefined;
906
+ create?: {
907
+ fields?: string[] | undefined;
908
+ apiRequests?: {
909
+ method?: unknown;
910
+ path?: unknown;
911
+ }[] | undefined;
912
+ requiredFields?: string[] | undefined;
913
+ excludedFields?: string[] | undefined;
914
+ } | undefined;
915
+ update?: {
916
+ fields?: string[] | undefined;
917
+ apiRequests?: {
918
+ method?: unknown;
919
+ path?: unknown;
920
+ }[] | undefined;
921
+ excludedFields?: string[] | undefined;
922
+ } | undefined;
923
+ customFields?: boolean | undefined;
924
+ }, {
925
+ type: "collection";
831
926
  name: string;
832
- internalId: string;
833
- fields?: Record<string, any>;
834
- credentials?: any;
835
- lastActiveAt?: string;
836
- isTest?: boolean;
837
- isBillable?: boolean;
838
- };
839
- type User = Customer;
840
-
841
- interface ListFlowsForIntegrationQuery extends CommonListElementsQuery {
842
- universalFlowId?: string | 'null';
843
- }
844
- interface FindFlowsQuery extends ListFlowsForIntegrationQuery {
845
- integrationId?: string | 'null';
846
- }
847
- interface CreateFlowNodeRequest {
848
- type: string;
849
- config?: any;
850
- ui?: any;
851
- links?: FlowNodeLink[];
927
+ key?: string | undefined;
928
+ match?: {
929
+ fields?: string[] | undefined;
930
+ apiRequests?: {
931
+ method?: unknown;
932
+ path?: unknown;
933
+ }[] | undefined;
934
+ } | undefined;
935
+ search?: {
936
+ apiRequests?: {
937
+ method?: unknown;
938
+ path?: unknown;
939
+ }[] | undefined;
940
+ } | undefined;
941
+ find?: {
942
+ apiRequests?: {
943
+ method?: unknown;
944
+ path?: unknown;
945
+ }[] | undefined;
946
+ queryFields?: string[] | undefined;
947
+ } | undefined;
948
+ delete?: {
949
+ apiRequests?: {
950
+ method?: unknown;
951
+ path?: unknown;
952
+ }[] | undefined;
953
+ } | undefined;
954
+ list?: {
955
+ apiRequests?: {
956
+ method?: unknown;
957
+ path?: unknown;
958
+ }[] | undefined;
959
+ filterFields?: string[] | undefined;
960
+ } | undefined;
961
+ udm?: Record<string, {
962
+ fields?: string[] | undefined;
963
+ extract?: Record<string, any> | undefined;
964
+ parse?: Record<string, any> | undefined;
965
+ }> | undefined;
966
+ events?: z.objectInputType<{
967
+ created: z.ZodOptional<z.ZodObject<{
968
+ type: z.ZodEnum<["push", "pull"]>;
969
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
970
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
971
+ }, "strip", z.ZodTypeAny, {
972
+ type: "push" | "pull";
973
+ isFullScan?: boolean | undefined;
974
+ isIdOnly?: boolean | undefined;
975
+ }, {
976
+ type: "push" | "pull";
977
+ isFullScan?: boolean | undefined;
978
+ isIdOnly?: boolean | undefined;
979
+ }>>;
980
+ updated: z.ZodOptional<z.ZodObject<{
981
+ type: z.ZodEnum<["push", "pull"]>;
982
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
983
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
984
+ }, "strip", z.ZodTypeAny, {
985
+ type: "push" | "pull";
986
+ isFullScan?: boolean | undefined;
987
+ isIdOnly?: boolean | undefined;
988
+ }, {
989
+ type: "push" | "pull";
990
+ isFullScan?: boolean | undefined;
991
+ isIdOnly?: boolean | undefined;
992
+ }>>;
993
+ deleted: z.ZodOptional<z.ZodObject<{
994
+ type: z.ZodEnum<["push", "pull"]>;
995
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
996
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
997
+ }, "strip", z.ZodTypeAny, {
998
+ type: "push" | "pull";
999
+ isFullScan?: boolean | undefined;
1000
+ isIdOnly?: boolean | undefined;
1001
+ }, {
1002
+ type: "push" | "pull";
1003
+ isFullScan?: boolean | undefined;
1004
+ isIdOnly?: boolean | undefined;
1005
+ }>>;
1006
+ all: z.ZodOptional<z.ZodObject<{
1007
+ type: z.ZodEnum<["push", "pull"]>;
1008
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
1009
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
1010
+ }, "strip", z.ZodTypeAny, {
1011
+ type: "push" | "pull";
1012
+ isFullScan?: boolean | undefined;
1013
+ isIdOnly?: boolean | undefined;
1014
+ }, {
1015
+ type: "push" | "pull";
1016
+ isFullScan?: boolean | undefined;
1017
+ isIdOnly?: boolean | undefined;
1018
+ }>>;
1019
+ }, z.ZodObject<{
1020
+ type: z.ZodEnum<["push", "pull"]>;
1021
+ isFullScan: z.ZodOptional<z.ZodBoolean>;
1022
+ isIdOnly: z.ZodOptional<z.ZodBoolean>;
1023
+ }, "strip", z.ZodTypeAny, {
1024
+ type: "push" | "pull";
1025
+ isFullScan?: boolean | undefined;
1026
+ isIdOnly?: boolean | undefined;
1027
+ }, {
1028
+ type: "push" | "pull";
1029
+ isFullScan?: boolean | undefined;
1030
+ isIdOnly?: boolean | undefined;
1031
+ }>, "strip"> | undefined;
1032
+ parametersSchema?: any;
1033
+ fieldsSchema?: any;
1034
+ findById?: {
1035
+ apiRequests?: {
1036
+ method?: unknown;
1037
+ path?: unknown;
1038
+ }[] | undefined;
1039
+ } | undefined;
1040
+ create?: {
1041
+ fields?: string[] | 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;
1058
+ }>;
1059
+ type DataCollectionSpec = z.infer<typeof DataCollectionSpecSchema>;
1060
+ interface DataLocationPointer {
1061
+ key: string;
1062
+ parameters?: Record<string, any>;
852
1063
  }
853
- interface CreateFlowRequest {
1064
+ interface DataCollectionListItem {
854
1065
  key: string;
855
1066
  name: string;
856
- integrationId?: string;
857
- nodes?: Record<string, CreateFlowNodeRequest>;
858
- parametersSchema?: DataSchema;
859
- autoCreateInstances?: boolean;
860
- }
861
- interface UpdateFlowRequest extends CreateFlowRequest {
862
- archivedAt?: string;
863
- }
864
- interface FlowSelector extends IntegrationSpecificElementSelector {
865
- autoCreate?: boolean;
1067
+ type: 'collection';
1068
+ isHidden?: boolean;
866
1069
  }
867
- type ListFlowInstancesForConnectionQuery = CommonInstancesListQuery & {
868
- flowId?: string;
869
- flowKey?: string;
870
- enabled?: boolean;
871
- };
872
- type FindFlowInstancesQuery = ListFlowInstancesForConnectionQuery & CommonIntegrationOrConnectionQuery;
873
- interface FlowInstanceSelector extends ConnectionSelector, ElementInstanceSelector {
874
- flowId?: string;
875
- flowKey?: string;
876
- instanceKey?: string;
877
- autoUpdate?: boolean;
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;
1075
+ query?: any;
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, {
1167
+ filter?: any;
1168
+ cursor?: string | undefined;
1169
+ parameters?: Record<string, any> | undefined;
1170
+ unifiedFilter?: any;
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, {
1281
+ query: string;
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, {
1375
+ id: string;
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, {
1465
+ query: Record<string, any>;
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, {
1553
+ fields: Record<string, any>;
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, {
1562
+ id: string;
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, {
1572
+ id: string;
1573
+ fields: Record<string, any>;
1574
+ parameters?: Record<string, any> | undefined;
1575
+ }, {
1576
+ id: string;
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, {
1583
+ id: string;
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>;
1615
+
1616
+ interface ConnectorUdmSpec {
1617
+ defaultCollection?: DataLocationPointer;
1618
+ rootDirectory?: DataLocationPointer;
1619
+ collectionMappings: ConnectorUdmCollectionMapping[];
878
1620
  }
879
- interface ResetFlowInstanceOptions {
880
- name?: boolean;
881
- nodes?: Record<string, boolean>;
882
- allNodes?: boolean;
1621
+ interface ConnectorUdmCollectionMapping extends DataLocationPointer {
1622
+ fieldsToCollection?: any;
1623
+ fieldsFromCollection?: any;
883
1624
  }
884
- interface RunFlowOptions {
885
- nodeKey?: string;
886
- input?: any;
887
- returnImmediately?: boolean;
888
- onUpdate?: (...args: any) => void;
1625
+
1626
+ interface DataSchema {
1627
+ title?: string;
1628
+ description?: string;
1629
+ type?: string | string[];
1630
+ format?: string;
1631
+ properties?: {
1632
+ [key: string]: DataSchema;
1633
+ };
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;
889
1660
  }
890
1661
 
891
- interface ListFieldMappingsForIntegrationQuery extends CommonListElementsQuery {
892
- universalFieldMappingId?: string | 'null';
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"
893
1669
  }
894
- interface FindFieldMappingsQuery extends ListFieldMappingsForIntegrationQuery {
895
- integrationId?: string | 'null';
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;
1676
+ parametersSchema?: DataSchema;
896
1677
  }
897
- type ListFieldMappingInstancesForConnectionQuery = CommonInstancesListQuery & {
898
- fieldMappingId?: string;
899
- universalFieldMappingId?: string;
900
- dataSourceInstanceId?: string;
901
- };
902
- type FindFieldMappingInstancesQuery = ListFieldMappingInstancesForConnectionQuery & CommonIntegrationOrConnectionQuery;
903
- interface UpdateFieldMappingRequest {
904
- key?: string;
905
- name?: string;
906
- dataSourceKey?: string;
907
- dataSourceId?: string;
908
- appSchema?: DataSchema;
909
- direction?: FieldMappingDirection;
910
- defaultImportValue?: any;
911
- exportValue?: any;
912
- importValue?: any;
913
- defaultExportValue?: any;
914
- frozenImportFields?: any;
915
- frozenExportFields?: any;
916
- frozenUnifiedExportFields?: any;
917
- archivedAt?: string;
1678
+ interface ConnectorMethodImplementationMapping extends ConnectorMethodImplementationBase {
1679
+ implementationType: ConnectorMethodImplementationType.mapping;
1680
+ mapping: any;
918
1681
  }
919
- interface CreateFieldMappingRequest extends UpdateFieldMappingRequest {
920
- key: string;
921
- name: string;
922
- integrationId?: string;
1682
+ interface ConnectorMethodImplementationOperationMapping extends ConnectorMethodImplementationBase {
1683
+ implementationType: ConnectorMethodImplementationType.operationMapping;
1684
+ mapping: OperationMapping;
923
1685
  }
924
- interface CreateFieldMappingInstanceRequest {
925
- connectionId: string;
926
- fieldMappingId?: string;
927
- instanceKey?: string;
928
- importValue?: any;
929
- exportValue?: any;
1686
+ interface ConnectorMethodImplementationRestApiMapping extends ConnectorMethodImplementationBase {
1687
+ implementationType: ConnectorMethodImplementationType.restApiMapping;
1688
+ mapping: RestApiMapping;
930
1689
  }
931
- interface UpdateFieldMappingInstanceRequest {
932
- importValue?: any;
933
- exportValue?: any;
1690
+ interface ConnectorMethodImplementationGraphqlApiMapping extends ConnectorMethodImplementationBase {
1691
+ implementationType: ConnectorMethodImplementationType.graphqlApiMapping;
1692
+ mapping: GraphQLApiMapping;
934
1693
  }
935
- interface FieldMappingInstanceSelector extends ConnectionSelector, FlowInstanceSelector, ElementInstanceSelector {
936
- fieldMappingKey?: string;
937
- fieldMappingId?: string;
938
- instanceKey?: string;
939
- nodeKey?: string;
1694
+ interface ConnectorMethodImplementationJavascript extends ConnectorMethodImplementationBase {
1695
+ implementationType: ConnectorMethodImplementationType.javascript;
1696
+ code: string;
940
1697
  }
941
- interface FieldMappingSelector extends IntegrationSpecificElementSelector {
1698
+ interface ConnectorMethodImplementationNotSupported extends ConnectorMethodImplementationBase {
1699
+ implementationType: ConnectorMethodImplementationType.notSupported;
942
1700
  }
943
1701
 
944
- type InstanceKeyQuery = {
945
- instanceKey?: string;
1702
+ declare const CONNECTOR_AUTH_TYPES: readonly ["integration-app-token", "membrane-token", "oauth2", "oauth1", "client-credentials", "proxy"];
1703
+ type ConnectorAuthType = (typeof CONNECTOR_AUTH_TYPES)[number];
1704
+ type ConnectorAuthSpec = {
1705
+ title?: string;
1706
+ description?: string;
1707
+ type: ConnectorAuthType;
1708
+ ui?: {
1709
+ schema?: DataSchema;
1710
+ helpUri?: string;
1711
+ };
946
1712
  };
947
-
948
- declare class ConnectionLevelElementAccessor<Element, UpdateElement> {
949
- protected client: IntegrationAppApiClient;
950
- protected connectionSelector: string;
951
- protected selector: string;
952
- protected elementKey: string;
953
- protected query: Record<string, any>;
954
- protected endpoint: string;
955
- constructor(client: IntegrationAppApiClient, connectionSelector: string, selector: string, elementKey: string, query: Record<string, any>);
956
- protected uri(path?: string, query?: {}): string;
957
- getUniqueIdentifier(): string;
958
- get(query?: {
959
- autoCreate?: boolean;
960
- }): Promise<Element>;
961
- create(): Promise<Element>;
962
- patch(data: Partial<UpdateElement>): Promise<Element>;
963
- put(data: UpdateElement): Promise<Element>;
964
- archive(): Promise<void>;
965
- reset(): Promise<Element>;
966
- setup(): Promise<Element>;
967
- }
968
- declare class ConnectionLevelElementsListAccessor<Element, Query> {
969
- protected client: IntegrationAppApiClient;
970
- protected connectionSelector: string;
971
- protected elementKey: string;
972
- constructor(client: IntegrationAppApiClient, connectionSelector: string, elementKey: string);
973
- list(query?: Query): Promise<PaginationResponse<Element[]>>;
974
- }
975
-
976
- declare class IntegrationLevelElementAccessor<Element, UpdateElementData> {
977
- protected client: IntegrationAppApiClient;
978
- protected integrationSelector: string;
979
- protected elementSelector: string;
980
- protected elementKey: string;
981
- protected endpoint: string;
982
- constructor(client: IntegrationAppApiClient, integrationSelector: string, elementSelector: string, elementKey: string);
983
- getUniqueIdentifier(): string;
984
- get(): Promise<Element>;
985
- patch(data: Partial<UpdateElementData>): Promise<Element>;
986
- put(data: UpdateElementData): Promise<Element>;
987
- archive(): Promise<void>;
988
- reset(): Promise<Element>;
1713
+ interface ConnectorAuthHandlerBase extends ConnectorAuthSpec {
1714
+ title?: string;
1715
+ type: ConnectorAuthType;
1716
+ credentialsSchema?: DataSchema;
1717
+ customCredentialsSchema?: DataSchema;
1718
+ makeApiClient?: ConnectorMethodImplementationBase;
1719
+ refreshCredentials?: ConnectorMethodImplementationBase;
1720
+ test?: ConnectorMethodImplementationBase;
1721
+ enabled?: any;
989
1722
  }
990
- declare class IntegrationLevelElementsListAccessor<Element, Query, CreateElementData> {
991
- protected client: IntegrationAppApiClient;
992
- protected integrationSelector: string;
993
- protected elementKey: string;
994
- protected endpoint: string;
995
- constructor(client: IntegrationAppApiClient, integrationSelector: string, elementKey: string);
996
- list(query?: Query): Promise<PaginationResponse<Element>>;
997
- create(data: CreateElementData): Promise<Element>;
1723
+ interface ConnectorAuthOAuth2 extends ConnectorAuthHandlerBase {
1724
+ type: 'oauth2';
1725
+ getOAuthConfig?: ConnectorMethodImplementation;
1726
+ getTokenData?: ConnectorMethodImplementation;
1727
+ getCredentialsFromAccessTokenResponse?: ConnectorMethodImplementation;
1728
+ getCredentialsFromRefreshTokenResponse?: ConnectorMethodImplementation;
1729
+ oAuthConfig?: ConnectorMethodImplementation;
998
1730
  }
999
-
1000
- interface OpenFieldMappingInstanceConfigurationOptions extends OpenConfigurationOptions {
1731
+ interface ConnectorAuthOAuth1 extends ConnectorAuthHandlerBase {
1732
+ type: 'oauth1';
1733
+ getOAuthConfig?: ConnectorMethodImplementation;
1001
1734
  }
1002
- declare class FieldMappingsAccessor extends ElementListAccessor<FieldMapping, FindFieldMappingsQuery, CreateFieldMappingRequest> {
1003
- constructor(client: IntegrationAppApiClient);
1735
+ interface ConnectorAuthClientCredentials extends ConnectorAuthHandlerBase {
1736
+ type: 'client-credentials';
1737
+ getCredentialsFromConnectionParameters?: ConnectorMethodImplementationBase;
1004
1738
  }
1005
- declare class FieldMappingAccessor extends ElementAccessor<FieldMapping, UpdateFieldMappingRequest, FieldMappingSelector> {
1006
- constructor(client: IntegrationAppApiClient, selector: string | FieldMappingSelector);
1007
- getAppSchema(): Promise<any>;
1008
- apply(integrationKeys: string[]): Promise<FieldMapping[]>;
1009
- setup(): Promise<any>;
1010
- reset(): Promise<any>;
1739
+ interface ConnectorAuthProxy extends ConnectorAuthHandlerBase {
1740
+ type: 'proxy';
1741
+ proxyKey: string;
1011
1742
  }
1012
- declare class FieldMappingInstancesAccessor extends ElementInstanceListAccessor<FieldMappingInstance, FindFieldMappingInstancesQuery> {
1013
- constructor(client: IntegrationAppApiClient);
1743
+ interface ConnectorAuthIntegrationAppToken extends ConnectorAuthHandlerBase {
1744
+ type: 'integration-app-token';
1014
1745
  }
1015
- declare class FieldMappingInstanceAccessor extends ElementInstanceAccessor<FieldMappingInstance, FieldMappingInstanceSelector, CreateFieldMappingInstanceRequest, UpdateFieldMappingInstanceRequest> {
1016
- private client;
1017
- constructor(client: IntegrationAppApiClient, selector: string | FieldMappingInstanceSelector);
1018
- setup(): Promise<void>;
1019
- reset(): Promise<void>;
1020
- openConfiguration({ onClose }?: OpenFieldMappingInstanceConfigurationOptions): Promise<void>;
1746
+ interface ConnectorAuthMembraneToken extends ConnectorAuthHandlerBase {
1747
+ type: 'membrane-token';
1021
1748
  }
1022
- declare class IntegrationLevelFieldMappingAccessor extends IntegrationLevelElementAccessor<FieldMapping, UpdateFieldMappingRequest> {
1023
- client: IntegrationAppApiClient;
1024
- integrationSelector: string;
1025
- fieldMappingSelector: string;
1026
- constructor(client: IntegrationAppApiClient, integrationSelector: string, fieldMappingSelector: string);
1749
+ type ConnectorAuth = (ConnectorAuthOAuth2 | ConnectorAuthOAuth1 | ConnectorAuthClientCredentials | ConnectorAuthIntegrationAppToken | ConnectorAuthMembraneToken | ConnectorAuthProxy) & {
1750
+ options?: {
1751
+ [key: string]: ConnectorAuthOAuth2 | ConnectorAuthOAuth1 | ConnectorAuthClientCredentials | ConnectorAuthIntegrationAppToken | ConnectorAuthMembraneToken | ConnectorAuthProxy;
1752
+ };
1753
+ };
1754
+
1755
+ interface ConnectorUiSpec {
1756
+ schema?: DataSchema;
1757
+ description?: string;
1758
+ helpUri?: string;
1759
+ test?: boolean;
1027
1760
  }
1028
- declare class IntegrationLevelFieldMappingsListAccessor extends IntegrationLevelElementsListAccessor<FieldMapping, ListFieldMappingsForIntegrationQuery, Omit<CreateFieldMappingRequest, 'integrationId'>> {
1029
- client: IntegrationAppApiClient;
1030
- integrationSelector: string;
1031
- constructor(client: IntegrationAppApiClient, integrationSelector: 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;
1773
+ parametersSchema?: DataSchema;
1774
+ udms?: string[];
1775
+ udm?: Record<string, ConnectorUdmSpec>;
1776
+ operations?: ConnectorOperationHandler[];
1777
+ test?: ConnectorMethodImplementation;
1778
+ hasReadme?: boolean;
1779
+ appUuid?: string;
1780
+ knowledgeBaseUuid?: string;
1781
+ workspaceId?: string;
1782
+ data?: any;
1032
1783
  }
1033
- declare class ConnectionLevelFieldMappingAccessor extends ConnectionLevelElementAccessor<FieldMappingInstance, UpdateFieldMappingInstanceRequest> {
1034
- client: IntegrationAppApiClient;
1035
- connectionSelector: string;
1036
- fieldMappingSelector: string;
1037
- query: InstanceKeyQuery;
1038
- constructor(client: IntegrationAppApiClient, connectionSelector: string, fieldMappingSelector: string, query: InstanceKeyQuery);
1039
- openConfiguration({ onClose }?: OpenFieldMappingInstanceConfigurationOptions): Promise<void>;
1784
+ type MinimalConnector = {
1785
+ id: string;
1786
+ key: string;
1787
+ name: string;
1788
+ logoUri: string;
1789
+ };
1790
+
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[];
1040
1809
  }
1041
- declare class ConnectionLevelFieldMappingsAccessor extends ConnectionLevelElementsListAccessor<FieldMapping, ListFieldMappingInstancesForConnectionQuery> {
1042
- client: IntegrationAppApiClient;
1043
- connectionSelector: string;
1044
- constructor(client: IntegrationAppApiClient, connectionSelector: string);
1810
+ interface ConnectionSpec extends ConnectorSpec {
1811
+ }
1812
+ declare class ConnectionSpec {
1813
+ constructor(opts: ConnectionSpec);
1045
1814
  }
1046
1815
 
1816
+ type BaseCustomer = {
1817
+ id: string;
1818
+ name: string;
1819
+ internalId: string;
1820
+ fields?: Record<string, any>;
1821
+ credentials?: any;
1822
+ lastActiveAt?: string;
1823
+ isTest?: boolean;
1824
+ isBillable?: boolean;
1825
+ };
1826
+
1047
1827
  declare enum FieldMappingDirection {
1048
1828
  IMPORT = "import",
1049
1829
  EXPORT = "export",
1050
1830
  BOTH = "both"
1051
1831
  }
1052
- interface FieldMapping extends WorkspaceElement {
1832
+ interface BaseFieldMapping extends BaseMembraneInterface {
1053
1833
  revision: string;
1054
1834
  publishedRevision?: string;
1055
1835
  universalFieldMappingId?: string;
1056
1836
  universalFieldMappingRevision?: string;
1057
1837
  integrationId?: string;
1058
- integration?: Integration;
1059
1838
  dataSourceId: string;
1060
1839
  dataSourceKey: string;
1061
1840
  appSchema: DataSchema;
@@ -1069,185 +1848,228 @@ interface FieldMapping extends WorkspaceElement {
1069
1848
  frozenUnifiedExportFields?: any;
1070
1849
  archivedAt?: string;
1071
1850
  customized?: boolean;
1072
- appliedToIntegrations?: AppliedToIntegrations<FieldMapping>;
1073
1851
  }
1074
- interface FieldMappingInstance extends WorkspaceElement {
1852
+
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"
1868
+ }
1869
+
1870
+ interface BaseAction {
1871
+ id: string;
1872
+ key: string;
1873
+ name: string;
1874
+ revision: string;
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[];
1891
+ }
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;
1901
+ }
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;
1918
+ }
1919
+
1920
+ interface BaseDataSourceInstance extends BaseMembraneInterface {
1075
1921
  userId: string;
1076
1922
  revision: string;
1077
- user?: User;
1923
+ dataSourceRevision?: string;
1924
+ dataSourceId?: string;
1925
+ universalDataSourceId?: string;
1926
+ udm?: string;
1078
1927
  connectionId: string;
1079
- connection?: Connection;
1080
1928
  integrationId: string;
1081
- integration?: Integration;
1082
- fieldMappingRevision?: string;
1083
- fieldMappingId?: string;
1084
- fieldMapping?: FieldMapping;
1085
1929
  instanceKey?: string;
1086
- dataSourceInstanceId?: string;
1087
- dataSourceInstance?: DataSourceInstance;
1088
- dataSourceSchema?: DataSchema;
1089
- direction?: FieldMappingDirection;
1090
- appSchema?: DataSchema;
1091
- importValue?: any;
1092
- exportValue?: any;
1930
+ collectionKey?: string;
1931
+ collectionParameters?: any;
1932
+ defaultCollectionKey?: string;
1933
+ defaultCollectionParameters?: any;
1934
+ collectionSpec?: DataCollectionSpec;
1093
1935
  isCustomized?: boolean;
1094
- unifiedExportValue?: any;
1095
- unifiedImportValue?: any;
1096
- frozenImportFields?: string[];
1097
- frozenExportFields?: string[];
1098
- state?: WorkspaceElementState;
1099
- error?: ErrorData;
1100
- externalSchema?: any;
1936
+ errors?: ErrorData[];
1937
+ pullUpdatesIntervalSeconds?: number;
1938
+ fullSyncIntervalSeconds?: number;
1939
+ path?: string;
1940
+ defaultPath?: string;
1101
1941
  }
1102
1942
 
1103
- interface OpenIntegrationUIIntegrationConfigurationOptions extends OpenConfigurationOptions {
1104
- }
1105
- declare class IntegrationsAccessor extends ElementListAccessor<Integration, FindIntegrationsQuery, CreateIntegrationRequest> {
1106
- constructor(client: IntegrationAppApiClient);
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;
1954
+ };
1955
+ type FindCustomersQuery = PaginationQuery & SearchQuery & {
1956
+ isTest?: boolean;
1957
+ };
1958
+ type CustomerSelector = {
1959
+ id: string;
1960
+ };
1961
+ type Customer = BaseCustomer;
1962
+
1963
+ interface OpenConfigurationOptions {
1964
+ onClose?: () => void;
1965
+ showPoweredBy?: boolean;
1107
1966
  }
1108
- declare class IntegrationAccessor extends ElementAccessor<Integration, UpdateIntegrationRequest> {
1109
- private client;
1110
- private integrationSelector;
1967
+
1968
+ interface CreateIntegrationRequest {
1969
+ name?: string;
1970
+ key: string;
1111
1971
  baseUri: string;
1112
- constructor(client: IntegrationAppApiClient, integrationSelector: string);
1113
- get actions(): IntegrationLevelActionsListAccessor;
1114
- action(actionSelector: string): IntegrationLevelActionAccessor;
1115
- get flows(): IntegrationLevelFlowsListAccessor;
1116
- flow(flowSelector: string): IntegrationLevelFlowAccessor;
1117
- get dataSources(): IntegrationLevelDataSourcesListAccessor;
1118
- dataSource(dataSourceSelector: string): IntegrationLevelDataSourceAccessor;
1119
- get fieldMappings(): IntegrationLevelFieldMappingsListAccessor;
1120
- fieldMapping(fieldMappingSelector: string): IntegrationLevelFieldMappingAccessor;
1121
- setup(): Promise<Integration>;
1122
- getConnectorSpec(): Promise<ConnectionSpec>;
1123
- open({ onClose }?: OpenIntegrationUIIntegrationConfigurationOptions): Promise<void>;
1124
- openNewConnection({ allowMultipleConnections, name, connectorParameters, }?: OpenNewConnectionOptions): Promise<Connection>;
1125
- connect({ name, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, }?: {
1126
- name?: string;
1127
- parameters?: any;
1128
- connectorParameters?: any;
1129
- authOptionKey?: string;
1130
- allowMultipleConnections?: boolean;
1131
- } & ({
1132
- sameWindow: true;
1133
- redirectUri: string;
1134
- } | {
1135
- sameWindow?: false;
1136
- redirectUri?: never;
1137
- })): Promise<Connection | undefined>;
1138
- createConnection({ parameters, name }: {
1139
- parameters?: any;
1140
- name?: string;
1141
- }): Promise<Connection | undefined>;
1142
- disconnect(): Promise<void>;
1143
- getOperations(): Promise<OperationListItem[]>;
1144
- getOperation(key: string): Promise<OperationSpec>;
1145
- getDataCollections(): Promise<DataLocationListItem[]>;
1146
- getDataCollection(key: string): Promise<DataLocationSpec>;
1147
- getDataLocations(): Promise<DataLocationListItem[]>;
1148
- getDataLocation(key: string): Promise<DataLocationSpec>;
1972
+ logoUri: string;
1973
+ }
1974
+ interface UpdateIntegrationRequest {
1975
+ name?: string;
1976
+ key?: string;
1977
+ baseUri?: string;
1978
+ logoUri?: string;
1149
1979
  }
1150
-
1151
- interface OpenFlowRunEditorOptions extends OpenConfigurationOptions {
1980
+ interface FindIntegrationsQuery extends PaginationQuery, SearchQuery {
1152
1981
  }
1153
- declare class FlowRunsAccessor {
1154
- private readonly client;
1155
- constructor(client: IntegrationAppApiClient);
1156
- find(query: FindFlowRunsQuery): Promise<FindFlowRunsResponse>;
1157
- create(request: CreateFlowRunRequest): Promise<FlowRun>;
1982
+ interface OpenNewConnectionOptions extends OpenConfigurationOptions {
1983
+ allowMultipleConnections?: boolean;
1984
+ name?: string;
1985
+ connectorParameters?: any;
1158
1986
  }
1159
- declare class FlowRunAccessor {
1160
- private readonly client;
1161
- id: string;
1162
- private baseUri;
1163
- constructor(client: IntegrationAppApiClient, id: string);
1164
- get(): Promise<FlowRun>;
1165
- stop(): Promise<void>;
1166
- getOutput(): Promise<any>;
1167
- getNodeRuns(nodeKey: string, parameters?: {
1168
- cursor?: string;
1169
- }): Promise<any>;
1170
- getNodeRun(nodeKey: string, runId: string): Promise<any>;
1171
- getNodeOutputs(nodeKey: string, parameters?: {
1172
- cursor?: string;
1173
- }): Promise<any>;
1174
- getNodeOutput(nodeKey: string, outputId: string): Promise<any>;
1175
- repeat(): Promise<FlowRun>;
1176
- openEditor({ onClose }?: OpenFlowRunEditorOptions): Promise<void>;
1177
- embedEditor({ mountTargetSelector, onClose, }?: {
1178
- mountTargetSelector?: string;
1179
- } & OpenFlowRunEditorOptions): Promise<void>;
1987
+ interface Integration extends BaseIntegration {
1988
+ connection?: BaseConnection;
1989
+ spec?: ConnectorSpec;
1180
1990
  }
1181
1991
 
1182
- declare enum FlowRunState {
1183
- QUEUED = "queued",
1184
- RUNNING = "running",
1185
- COMPLETED = "completed",
1186
- STOPPED = "stopped",
1187
- FAILED = "failed"
1188
- }
1189
- declare enum FlowRunNodeState {
1190
- RUNNING = "running",
1191
- COMPLETED = "completed",
1192
- STOPPED = "stopped",
1193
- FAILED = "failed"
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"
1194
2003
  }
1195
- declare enum FlowRunLaunchedByTrigger {
1196
- ApiTrigger = "api-trigger",
1197
- ScheduleTrigger = "schedule-trigger",
1198
- AppEventTrigger = "app-event-trigger",
1199
- DataSourceTrigger = "data-source-trigger",
1200
- ExternalEvent = "external-event"
2004
+ interface IntegrationElementInstance {
2005
+ type: IntegrationElementType;
2006
+ instanceId?: string;
2007
+ data?: any;
1201
2008
  }
1202
- interface FlowRun {
1203
- id: string;
2009
+
2010
+ interface FlowNode {
2011
+ type?: string;
2012
+ version?: number;
1204
2013
  name?: string;
1205
- flowInstanceId: string;
1206
- flowInstance?: FlowInstance;
1207
- universalFlowId?: string;
1208
- connectionId?: string;
1209
- connection?: Connection;
1210
- integrationId?: string;
1211
- integration?: Integration;
1212
- startNodeKey: string;
1213
- userId: string;
1214
- user?: Customer;
1215
- input?: any;
1216
- state: FlowRunState;
1217
- startTime: string;
1218
- endTime?: string;
1219
- errors?: ErrorData[];
1220
- nodes?: Record<string, FlowRunNode>;
1221
- launchedBy?: FlowRunLaunchedBy;
1222
- }
1223
- interface FlowRunNode {
1224
- state: FlowRunNodeState;
1225
- runs?: number;
1226
- erroredRuns?: number;
1227
- outputs?: number;
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;
1228
2024
  }
1229
- interface FlowRunLaunchedBy {
1230
- type: FlowRunLaunchedByTrigger;
1231
- ids?: string[];
2025
+ interface BaseFlow extends BaseMembraneInterface {
2026
+ integrationId?: string;
2027
+ universalFlowId?: string;
2028
+ universalFlowRevision?: string;
2029
+ parametersSchema?: DataSchema;
2030
+ nodes?: Record<string, FlowNode>;
2031
+ autoCreateInstances?: boolean;
2032
+ archivedAt?: string;
2033
+ revision: string;
2034
+ customized?: boolean;
1232
2035
  }
1233
- interface CreateFlowRunRequest {
1234
- flowInstanceId: string;
1235
- nodeKey?: string;
1236
- input?: any;
2036
+ interface FlowNodeLink {
2037
+ key?: string;
2038
+ filter?: any;
2039
+ name?: string;
1237
2040
  }
1238
- interface FindFlowRunsQuery extends PaginationQuery {
1239
- id?: string;
1240
- flowInstanceId?: string;
1241
- startNodeKey?: string;
2041
+
2042
+ interface BaseFlowInstance extends BaseMembraneInterface {
2043
+ userId: string;
2044
+ connectionId?: string;
1242
2045
  flowId?: string;
1243
2046
  universalFlowId?: string;
1244
- userId?: string;
1245
- state?: FlowRunState;
1246
- integrationId?: string;
1247
- connectionId?: string;
1248
- startedAfter?: string;
2047
+ integrationId: string;
2048
+ instanceKey?: string;
2049
+ parameters?: any;
2050
+ parametersSchema?: DataSchema;
2051
+ nodes?: Record<string, FlowInstanceNode>;
2052
+ enabled: boolean;
2053
+ createdAt: string;
2054
+ updatedAt: string;
2055
+ state?: WorkspaceElementState;
2056
+ outdated?: boolean;
2057
+ customized?: {
2058
+ name?: boolean;
2059
+ nodes?: boolean;
2060
+ };
2061
+ dependencies?: IntegrationElementInstance[];
1249
2062
  }
1250
- interface FindFlowRunsResponse extends PaginationResponse<FlowRun> {
2063
+ declare enum FlowInstanceNodeState {
2064
+ SETUP_FAILED = "SETUP_FAILED",
2065
+ READY = "READY"
2066
+ }
2067
+ interface FlowInstanceNode extends FlowNode {
2068
+ state?: FlowInstanceNodeState;
2069
+ errors?: ErrorData[];
2070
+ userConfig?: any;
2071
+ testInput?: any;
2072
+ dependencies?: IntegrationElementInstance[];
1251
2073
  }
1252
2074
 
1253
2075
  declare const createFlowInstanceSchema: z.ZodObject<{
@@ -1272,12 +2094,12 @@ declare const createFlowInstanceSchema: z.ZodObject<{
1272
2094
  name: z.ZodOptional<z.ZodString>;
1273
2095
  }, "strip", z.ZodTypeAny, {
1274
2096
  key?: string | undefined;
1275
- name?: string | undefined;
1276
2097
  filter?: any;
2098
+ name?: string | undefined;
1277
2099
  }, {
1278
2100
  key?: string | undefined;
1279
- name?: string | undefined;
1280
2101
  filter?: any;
2102
+ name?: string | undefined;
1281
2103
  }>, "many">>;
1282
2104
  isCustomized: z.ZodOptional<z.ZodBoolean>;
1283
2105
  }, "strip", z.ZodTypeAny, {
@@ -1290,8 +2112,8 @@ declare const createFlowInstanceSchema: z.ZodObject<{
1290
2112
  ui?: any;
1291
2113
  links?: {
1292
2114
  key?: string | undefined;
1293
- name?: string | undefined;
1294
2115
  filter?: any;
2116
+ name?: string | undefined;
1295
2117
  }[] | undefined;
1296
2118
  isCustomized?: boolean | undefined;
1297
2119
  }, {
@@ -1304,8 +2126,8 @@ declare const createFlowInstanceSchema: z.ZodObject<{
1304
2126
  ui?: any;
1305
2127
  links?: {
1306
2128
  key?: string | undefined;
1307
- name?: string | undefined;
1308
2129
  filter?: any;
2130
+ name?: string | undefined;
1309
2131
  }[] | undefined;
1310
2132
  isCustomized?: boolean | undefined;
1311
2133
  }>>>;
@@ -1322,11 +2144,11 @@ declare const createFlowInstanceSchema: z.ZodObject<{
1322
2144
  }>>;
1323
2145
  }, "strip", z.ZodTypeAny, {
1324
2146
  name?: string | undefined;
1325
- userId?: string | undefined;
1326
- integrationId?: string | undefined;
1327
- connectionId?: string | undefined;
1328
2147
  parameters?: any;
2148
+ userId?: string | undefined;
1329
2149
  flowId?: string | undefined;
2150
+ connectionId?: string | undefined;
2151
+ integrationId?: string | undefined;
1330
2152
  instanceKey?: string | undefined;
1331
2153
  nodes?: Record<string, {
1332
2154
  concurrency?: number | undefined;
@@ -1338,8 +2160,8 @@ declare const createFlowInstanceSchema: z.ZodObject<{
1338
2160
  ui?: any;
1339
2161
  links?: {
1340
2162
  key?: string | undefined;
1341
- name?: string | undefined;
1342
2163
  filter?: any;
2164
+ name?: string | undefined;
1343
2165
  }[] | undefined;
1344
2166
  isCustomized?: boolean | undefined;
1345
2167
  }> | undefined;
@@ -1350,11 +2172,11 @@ declare const createFlowInstanceSchema: z.ZodObject<{
1350
2172
  } | undefined;
1351
2173
  }, {
1352
2174
  name?: string | undefined;
1353
- userId?: string | undefined;
1354
- integrationId?: string | undefined;
1355
- connectionId?: string | undefined;
1356
2175
  parameters?: any;
2176
+ userId?: string | undefined;
1357
2177
  flowId?: string | undefined;
2178
+ connectionId?: string | undefined;
2179
+ integrationId?: string | undefined;
1358
2180
  instanceKey?: string | undefined;
1359
2181
  nodes?: Record<string, {
1360
2182
  concurrency?: number | undefined;
@@ -1366,8 +2188,8 @@ declare const createFlowInstanceSchema: z.ZodObject<{
1366
2188
  ui?: any;
1367
2189
  links?: {
1368
2190
  key?: string | undefined;
1369
- name?: string | undefined;
1370
2191
  filter?: any;
2192
+ name?: string | undefined;
1371
2193
  }[] | undefined;
1372
2194
  isCustomized?: boolean | undefined;
1373
2195
  }> | undefined;
@@ -1393,12 +2215,12 @@ declare const updateFlowInstanceSchema: z.ZodObject<{
1393
2215
  name: z.ZodOptional<z.ZodString>;
1394
2216
  }, "strip", z.ZodTypeAny, {
1395
2217
  key?: string | undefined;
1396
- name?: string | undefined;
1397
2218
  filter?: any;
2219
+ name?: string | undefined;
1398
2220
  }, {
1399
2221
  key?: string | undefined;
1400
- name?: string | undefined;
1401
2222
  filter?: any;
2223
+ name?: string | undefined;
1402
2224
  }>, "many">>;
1403
2225
  concurrency: z.ZodOptional<z.ZodNumber>;
1404
2226
  isCustomized: z.ZodOptional<z.ZodBoolean>;
@@ -1411,8 +2233,8 @@ declare const updateFlowInstanceSchema: z.ZodObject<{
1411
2233
  onError?: "stop" | "continue" | undefined;
1412
2234
  links?: {
1413
2235
  key?: string | undefined;
1414
- name?: string | undefined;
1415
2236
  filter?: any;
2237
+ name?: string | undefined;
1416
2238
  }[] | undefined;
1417
2239
  isCustomized?: boolean | undefined;
1418
2240
  }, {
@@ -1424,8 +2246,8 @@ declare const updateFlowInstanceSchema: z.ZodObject<{
1424
2246
  onError?: "stop" | "continue" | undefined;
1425
2247
  links?: {
1426
2248
  key?: string | undefined;
1427
- name?: string | undefined;
1428
2249
  filter?: any;
2250
+ name?: string | undefined;
1429
2251
  }[] | undefined;
1430
2252
  isCustomized?: boolean | undefined;
1431
2253
  }>>>;
@@ -1452,8 +2274,8 @@ declare const updateFlowInstanceSchema: z.ZodObject<{
1452
2274
  onError?: "stop" | "continue" | undefined;
1453
2275
  links?: {
1454
2276
  key?: string | undefined;
1455
- name?: string | undefined;
1456
2277
  filter?: any;
2278
+ name?: string | undefined;
1457
2279
  }[] | undefined;
1458
2280
  isCustomized?: boolean | undefined;
1459
2281
  }> | undefined;
@@ -1475,8 +2297,8 @@ declare const updateFlowInstanceSchema: z.ZodObject<{
1475
2297
  onError?: "stop" | "continue" | undefined;
1476
2298
  links?: {
1477
2299
  key?: string | undefined;
1478
- name?: string | undefined;
1479
2300
  filter?: any;
2301
+ name?: string | undefined;
1480
2302
  }[] | undefined;
1481
2303
  isCustomized?: boolean | undefined;
1482
2304
  }> | undefined;
@@ -1490,33 +2312,391 @@ declare const updateFlowInstanceSchema: z.ZodObject<{
1490
2312
  type CreateFlowInstanceRequest = z.infer<typeof createFlowInstanceSchema>;
1491
2313
  type UpdateFlowInstanceRequest = z.infer<typeof updateFlowInstanceSchema>;
1492
2314
 
1493
- declare enum IntegrationElementType {
1494
- APP_DATA_SCHEMA = "app-data-schema",
1495
- APP_EVENT_TYPE = "app-event-type",
1496
- DATA_SOURCE = "data-source",
1497
- SCHEMA = "schema",
1498
- FIELD_MAPPING = "field-mapping",
1499
- FLOW = "flow",
1500
- INTEGRATION = "integration",
1501
- ACTION = "action",
1502
- DATA_LINK_TABLE = "data-link-table",
1503
- 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"
2364
+ }
2365
+ interface BaseFlowRun {
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;
1504
2394
  }
1505
- interface ElementTemplateFields {
1506
- id: string;
2395
+
2396
+ interface FindAppDataSchemasQuery extends PaginationQuery {
2397
+ }
2398
+ type CreateAppDataSchemaRequest = {
1507
2399
  key: string;
1508
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 {
1509
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;
1510
2474
  integrationId?: string;
1511
- integration?: Integration;
1512
- parentId?: string;
1513
- parentRevision?: string;
1514
- isCustomized?: boolean;
1515
- createdAt?: string;
1516
- 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[];
1517
2657
  archivedAt?: string;
1518
2658
  }
1519
- 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 {
1520
2700
  id: string;
1521
2701
  name: string;
1522
2702
  revision: string;
@@ -1524,479 +2704,306 @@ interface ElementInstanceFields {
1524
2704
  parentRevision?: string;
1525
2705
  universalParentId?: string;
1526
2706
  userId: string;
1527
- user?: Customer;
1528
2707
  instanceKey?: string;
1529
- isCustomized?: boolean;
1530
- connectionId: string;
1531
- connection?: Connection;
1532
- integrationId?: string;
1533
- integration?: Integration;
1534
- dependencies?: IntegrationElementInstance[];
1535
- errors?: ErrorData[];
1536
2708
  createdAt?: string;
1537
2709
  updatedAt?: string;
1538
2710
  archivedAt?: string;
1539
- }
1540
- interface IntegrationElementInstance {
1541
- type: IntegrationElementType;
1542
- instanceId?: string;
1543
- data?: any;
1544
- }
1545
-
1546
- interface FlowNode {
1547
- type?: string;
1548
- version?: number;
1549
- name?: string;
1550
- description?: string;
1551
- config?: any;
1552
- concurrency?: number;
1553
- onError?: 'stop' | 'continue';
1554
- ui?: any;
2711
+ type: ActionType;
1555
2712
  inputSchema?: any;
2713
+ config?: any;
1556
2714
  outputSchema?: any;
1557
- outputExample?: any;
1558
- links?: FlowNodeLink[];
1559
- isCustomized?: boolean;
1560
- }
1561
- interface Flow extends WorkspaceElement {
1562
- integrationId?: string;
1563
- integration?: Integration;
1564
- universalFlowId?: string;
1565
- universalFlowRevision?: string;
1566
- parametersSchema?: DataSchema;
1567
- nodes?: Record<string, FlowNode>;
1568
- autoCreateInstances?: boolean;
1569
- archivedAt?: string;
1570
- revision: string;
1571
- customized?: boolean;
1572
- appliedToIntegrations?: AppliedToIntegrations<Flow>;
2715
+ isOutdated?: boolean;
2716
+ state: WorkspaceElementState;
1573
2717
  }
1574
- interface FlowInstance extends WorkspaceElement {
2718
+
2719
+ interface BaseFieldMappingInstance extends BaseMembraneInterface {
1575
2720
  userId: string;
1576
- user?: User;
1577
- connectionId?: string;
1578
- connection?: Connection;
1579
- flow?: Flow;
1580
- flowId?: string;
1581
- universalFlowId?: string;
2721
+ revision: string;
2722
+ connectionId: string;
1582
2723
  integrationId: string;
1583
- integration?: Integration;
2724
+ fieldMappingRevision?: string;
2725
+ fieldMappingId?: string;
1584
2726
  instanceKey?: string;
1585
- parameters?: any;
1586
- parametersSchema?: DataSchema;
1587
- nodes?: Record<string, FlowInstanceNode>;
1588
- enabled: boolean;
1589
- createdAt: string;
1590
- 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[];
1591
2738
  state?: WorkspaceElementState;
1592
- outdated?: boolean;
1593
- customized?: {
1594
- name?: boolean;
1595
- nodes?: boolean;
1596
- };
1597
- dependencies?: IntegrationElementInstance[];
1598
- }
1599
- declare enum FlowInstanceNodeState {
1600
- SETUP_FAILED = "SETUP_FAILED",
1601
- READY = "READY"
1602
- }
1603
- interface FlowInstanceNode extends FlowNode {
1604
- state?: FlowInstanceNodeState;
1605
- errors?: ErrorData[];
1606
- userConfig?: any;
1607
- testInput?: any;
1608
- dependencies?: IntegrationElementInstance[];
1609
- }
1610
- interface FlowNodeLink {
1611
- key?: string;
1612
- filter?: any;
1613
- name?: string;
2739
+ error?: ErrorData;
2740
+ externalSchema?: any;
1614
2741
  }
1615
2742
 
1616
- interface OpenFlowInstanceConfigurationOptions extends OpenConfigurationOptions {
1617
- nodeKey?: string;
1618
- }
1619
- interface OpenFlowInstanceEditorOptions extends OpenConfigurationOptions {
1620
- }
1621
- declare class FlowsAccessor extends ElementListAccessor<Flow, FindFlowsQuery, CreateFlowRequest> {
1622
- constructor(client: IntegrationAppApiClient);
1623
- }
1624
- declare class FlowAccessor extends ElementAccessor<Flow, UpdateFlowRequest, FlowSelector> {
1625
- constructor(client: IntegrationAppApiClient, selector: FlowSelector | string);
1626
- apply(integrationKeys: string[]): Promise<Flow[]>;
1627
- reset(): Promise<Flow>;
1628
- }
1629
- declare class FlowInstancesAccessor extends ElementInstanceListAccessor<FlowInstance, FindFlowInstancesQuery> {
1630
- constructor(client: IntegrationAppApiClient);
1631
- create(data: CreateFlowInstanceRequest): Promise<FlowInstance>;
1632
- }
1633
- declare class FlowInstanceAccessor extends ElementInstanceAccessor<FlowInstance, FlowInstanceSelector, CreateFlowInstanceRequest, UpdateFlowInstanceRequest> {
1634
- protected client: IntegrationAppApiClient;
1635
- protected selector: FlowInstanceSelector | string;
1636
- constructor(client: IntegrationAppApiClient, selector: FlowInstanceSelector | string);
1637
- enable(): Promise<FlowInstance>;
1638
- disable(): Promise<FlowInstance>;
1639
- updateToLatestFlow(): Promise<FlowInstance>;
1640
- setup(): Promise<FlowInstance>;
1641
- reset(options?: ResetFlowInstanceOptions): Promise<FlowInstance>;
1642
- openConfiguration({ nodeKey, onClose }?: OpenFlowInstanceConfigurationOptions): Promise<void>;
1643
- openEditor({ onClose }?: OpenFlowInstanceEditorOptions): Promise<void>;
1644
- embedEditor({ mountTargetSelector, onClose, }?: {
1645
- mountTargetSelector?: string;
1646
- } & OpenFlowInstanceEditorOptions): Promise<void>;
1647
- startRun(options?: RunFlowOptions): Promise<FlowRun>;
1648
- run(options?: RunFlowOptions): Promise<FlowRun>;
1649
- }
1650
- declare class IntegrationLevelFlowAccessor extends IntegrationLevelElementAccessor<Flow, UpdateFlowRequest> {
1651
- client: IntegrationAppApiClient;
1652
- integrationSelector: string;
1653
- flowSelector: string;
1654
- constructor(client: IntegrationAppApiClient, integrationSelector: string, flowSelector: string);
1655
- }
1656
- declare class IntegrationLevelFlowsListAccessor extends IntegrationLevelElementsListAccessor<Flow, ListFlowsForIntegrationQuery, Omit<CreateFlowRequest, 'integrationId'>> {
1657
- client: IntegrationAppApiClient;
1658
- integrationSelector: string;
1659
- 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;
1660
2750
  }
1661
- declare class ConnectionLevelFlowAccessor extends ConnectionLevelElementAccessor<FlowInstance, UpdateFlowInstanceRequest> {
1662
- client: IntegrationAppApiClient;
1663
- connectionSelector: string;
1664
- flowSelector: string;
1665
- query: InstanceKeyQuery;
1666
- constructor(client: IntegrationAppApiClient, connectionSelector: string, flowSelector: string, query: InstanceKeyQuery);
1667
- enable(): Promise<FlowInstance>;
1668
- disable(): Promise<FlowInstance>;
1669
- run(options: {
1670
- nodeKey?: string;
1671
- input?: any;
1672
- }): Promise<FlowRun>;
1673
- openConfiguration(options?: OpenFlowInstanceConfigurationOptions): Promise<void>;
1674
- openEditor(options?: OpenFlowInstanceEditorOptions): Promise<void>;
2751
+ interface DataLink {
2752
+ id: string;
2753
+ dataLinkTableInstanceId: string;
2754
+ externalRecordId: string;
2755
+ appRecordId: string;
2756
+ direction: DataLinkDirection;
1675
2757
  }
1676
- declare class ConnectionLevelFlowsAccessor extends ConnectionLevelElementsListAccessor<Flow, ListFlowInstancesForConnectionQuery> {
1677
- client: IntegrationAppApiClient;
1678
- connectionSelector: string;
1679
- 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;
1680
2770
  }
1681
2771
 
1682
- interface ListDataSourcesForIntegrationQuery extends PaginationQuery {
1683
- 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;
1684
2781
  }
1685
- interface FindDataSourcesQuery extends ListDataSourcesForIntegrationQuery {
1686
- integrationId?: string | 'null';
2782
+
2783
+ declare enum ExternalEventSubscriptionStatus {
2784
+ Subscribed = "subscribed",
2785
+ Unsubscribed = "unsubscribed",
2786
+ Error = "error"
1687
2787
  }
1688
- type CreateDataSourceRequest = {
1689
- key: string;
1690
- name: string;
1691
- integrationId?: string;
1692
- udm?: string;
1693
- pullUpdatesIntervalSeconds?: number;
1694
- fullSyncIntervalSeconds?: number;
1695
- rootPath?: string;
1696
- defaultPath?: string;
1697
- collectionKey?: string;
1698
- collectionParameters?: any;
1699
- };
1700
- type UpdateDataSourceRequest = {
1701
- 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;
1702
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;
1703
2814
  archivedAt?: string;
1704
- udm?: string;
2815
+ stateData?: any;
2816
+ nextPullEventsTimestamp?: number;
1705
2817
  pullUpdatesIntervalSeconds?: number;
1706
2818
  fullSyncIntervalSeconds?: number;
1707
- rootPath?: string;
1708
- defaultPath?: string;
1709
- };
1710
- interface DataSourceInstanceSelector extends ConnectionSelector, FlowInstanceSelector, ElementInstanceSelector {
1711
- dataSourceKey?: string;
1712
- dataSourceId?: string;
1713
- instanceKey?: string;
1714
- nodeKey?: string;
1715
- udm?: string;
2819
+ nextRefreshTimestamp?: number;
2820
+ globalWebhookKey?: string;
2821
+ globalWebhookEventSelector?: string;
1716
2822
  }
1717
- interface FindDataSourceInstancesQuery extends PaginationQuery {
2823
+
2824
+ interface ActionInstance extends BaseActionInstance {
2825
+ user?: BaseCustomer;
2826
+ parent?: BaseAction;
2827
+ }
2828
+
2829
+ interface FindExternalEventSubscriptionsQuery extends PaginationQuery {
1718
2830
  userId?: string;
1719
- dataSourceId?: string;
1720
- universalDataSourceId?: string;
1721
2831
  connectionId?: string;
1722
- integrationKey?: string;
1723
2832
  integrationId?: string;
1724
2833
  }
1725
- interface CreateDataSourceInstanceRequest {
1726
- 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 {
1727
2842
  connectionId: string;
1728
- path?: string;
2843
+ fieldMappingId?: string;
2844
+ instanceKey?: string;
2845
+ importValue?: any;
2846
+ exportValue?: any;
1729
2847
  }
1730
- interface UpdateDataSourceInstanceRequest {
1731
- path?: string;
1732
- collectionKey?: string;
1733
- collectionParameters?: any;
1734
- pullUpdatesIntervalSeconds?: number;
1735
- fullSyncIntervalSeconds?: number;
1736
- subscribedTo?: {
1737
- created?: boolean;
1738
- updated?: boolean;
1739
- deleted?: boolean;
1740
- };
2848
+ interface UpdateFieldMappingInstanceRequest {
2849
+ importValue?: any;
2850
+ exportValue?: any;
1741
2851
  }
1742
- type ListDataSourceInstancesForConnectionQuery = PaginationQuery & {
1743
- dataSourceId?: string;
1744
- };
1745
-
1746
- interface OpenDataSourceConfigurationOptions extends OpenConfigurationOptions {
2852
+ interface FieldMappingInstanceSelector extends ConnectionSelector, FlowInstanceSelector, ElementInstanceSelector {
2853
+ fieldMappingKey?: string;
2854
+ fieldMappingId?: string;
2855
+ instanceKey?: string;
2856
+ nodeKey?: string;
1747
2857
  }
1748
- declare class DataSourcesAccessor extends ElementListAccessor<DataSource, FindDataSourcesQuery, CreateDataSourceRequest> {
1749
- constructor(client: IntegrationAppApiClient);
2858
+ interface FieldMappingInstance extends BaseFieldMappingInstance {
2859
+ user?: BaseCustomer;
2860
+ connection?: BaseConnection;
2861
+ integration?: BaseIntegration;
2862
+ fieldMapping?: BaseFieldMapping;
2863
+ dataSourceInstance?: DataSourceInstance;
1750
2864
  }
1751
- declare class DataSourceAccessor extends ElementAccessor<DataSource, UpdateDataSourceRequest, DataSourceSelector> {
1752
- constructor(client: IntegrationAppApiClient, selector: DataSourceSelector | string);
1753
- apply(integrationKeys: string[]): Promise<DataSource[]>;
1754
- setup(): Promise<void>;
1755
- reset(): Promise<any>;
2865
+
2866
+ interface FindDataLinkTableInstancesQuery extends PaginationQuery {
2867
+ connectionId?: string;
2868
+ integrationId?: string;
2869
+ dataLinkTableId?: string;
1756
2870
  }
1757
- declare class DataSourceInstancesAccessor extends ElementInstanceListAccessor<DataSourceInstance, FindDataSourceInstancesQuery> {
1758
- constructor(client: IntegrationAppApiClient);
2871
+ interface DataLinkTableInstanceSelector extends ConnectionSelector, ElementInstanceSelector {
2872
+ dataLinkTableId?: string;
2873
+ dataLinkTableKey?: string;
2874
+ instanceKey?: string;
1759
2875
  }
1760
- declare class DataSourceInstanceAccessor extends ElementInstanceAccessor<DataSourceInstance, DataSourceInstanceSelector, CreateDataSourceInstanceRequest, UpdateDataSourceInstanceRequest> {
1761
- client: IntegrationAppApiClient;
1762
- constructor(client: IntegrationAppApiClient, selector: string | DataSourceInstanceSelector);
1763
- setup(): Promise<void>;
1764
- reset(): Promise<void>;
1765
- openConfiguration({ onClose }?: OpenDataSourceConfigurationOptions): Promise<void>;
1766
- unifiedFieldsToNative(unifiedFields: any): Promise<any>;
1767
- getCollection(): Promise<DataCollectionSpec>;
1768
- listRecords(request?: DataCollectionListRequest): Promise<DataCollectionListResponse>;
1769
- matchRecord(request: DataCollectionMatchRequest): Promise<DataCollectionMatchResponse>;
1770
- searchRecords(request: DataCollectionSearchRequest): Promise<DataCollectionSearchResponse>;
1771
- findRecordById(request: string | DataCollectionFindByIdRequest): Promise<DataCollectionFindByIdResponse>;
1772
- createRecord(request: DataCollectionCreateRequest): Promise<DataCollectionCreateResponse>;
1773
- updateRecord(request: DataCollectionUpdateRequest): Promise<DataCollectionUpdateResponse>;
1774
- deleteRecord(request: string | DataCollectionFindByIdRequest): Promise<DataCollectionDeleteResponse>;
1775
- findRecords(request?: DataCollectionFindRequest): Promise<DataCollectionFindResponse>;
2876
+ interface UpdateDataLinkTableInstanceRequest {
1776
2877
  }
1777
- declare class IntegrationLevelDataSourceAccessor extends IntegrationLevelElementAccessor<DataSource, UpdateDataSourceRequest> {
1778
- client: IntegrationAppApiClient;
1779
- integrationSelector: string;
1780
- dataSourceSelector: string;
1781
- constructor(client: IntegrationAppApiClient, integrationSelector: string, dataSourceSelector: string);
2878
+ interface FindDataLinksInTableQuery extends PaginationQuery {
2879
+ direction?: DataLinkDirection;
2880
+ appRecordId?: string;
2881
+ externalRecordId?: string;
1782
2882
  }
1783
- declare class IntegrationLevelDataSourcesListAccessor extends IntegrationLevelElementsListAccessor<DataSource, ListDataSourcesForIntegrationQuery, Omit<CreateDataSourceRequest, 'integrationId'>> {
1784
- client: IntegrationAppApiClient;
1785
- integrationSelector: string;
1786
- constructor(client: IntegrationAppApiClient, integrationSelector: string);
2883
+ interface CreateDataLinkRequest {
2884
+ direction?: DataLinkDirection;
2885
+ appRecordId: string;
2886
+ externalRecordId: string;
1787
2887
  }
1788
- declare class ConnectionLevelDataSourceAccessor extends ConnectionLevelElementAccessor<DataSourceInstance, UpdateDataSourceInstanceRequest> {
1789
- client: IntegrationAppApiClient;
1790
- connectionSelector: string;
1791
- dataSourceSelector: string;
1792
- query: InstanceKeyQuery;
1793
- constructor(client: IntegrationAppApiClient, connectionSelector: string, dataSourceSelector: string, query: InstanceKeyQuery);
1794
- openConfiguration(options?: OpenDataSourceConfigurationOptions): Promise<void>;
2888
+ interface DeleteDataLinkRequest {
2889
+ direction?: DataLinkDirection;
2890
+ appRecordId: string;
2891
+ externalRecordId: string;
1795
2892
  }
1796
- declare class ConnectionLevelDataSourcesAccessor extends ConnectionLevelElementsListAccessor<DataSource, ListDataSourceInstancesForConnectionQuery> {
1797
- client: IntegrationAppApiClient;
1798
- connectionSelector: string;
1799
- 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;
1800
2900
  }
1801
2901
 
1802
- interface DataSourceUnitConfig {
1803
- key?: string;
1804
- collectionKey?: any;
1805
- collectionParameters?: any;
1806
- udm?: any;
1807
- path?: string;
1808
- pullUpdatesIntervalSeconds?: number;
1809
- fullSyncIntervalSeconds?: number;
2902
+ interface FindAppEventSubscriptionsQuery extends PaginationQuery {
2903
+ id?: string;
2904
+ userId?: string;
2905
+ instanceKey?: string;
2906
+ appEventTypeId?: string;
2907
+ isSubscribed?: boolean;
1810
2908
  }
1811
- interface DataSource extends WorkspaceElement {
1812
- revision: string;
1813
- publishedRevision?: string;
1814
- integrationId?: string;
1815
- integration?: Integration;
1816
- universalDataSourceId?: string;
1817
- universalDataSourceRevision?: string;
1818
- udm?: string;
1819
- pullUpdatesIntervalSeconds?: number;
1820
- fullSyncIntervalSeconds?: number;
1821
- collectionKey?: string;
1822
- collectionParameters?: any;
1823
- archivedAt?: string;
1824
- createdAt?: string;
1825
- updatedAt?: string;
1826
- customized?: boolean;
1827
- appliedToIntegrations?: AppliedToIntegrations<DataSource>;
1828
- defaultPath?: string;
2909
+ interface UpdateAppEventSubscriptionRequest {
1829
2910
  }
1830
- interface DataSourceInstance extends WorkspaceElement {
1831
- userId: string;
1832
- revision: string;
1833
- user?: User;
1834
- dataSourceRevision?: string;
1835
- dataSourceId?: string;
1836
- universalDataSourceId?: string;
1837
- dataSource?: DataSource;
1838
- udm?: string;
1839
- connectionId: string;
1840
- connection?: Connection;
1841
- integrationId: string;
1842
- integration?: Integration;
2911
+ interface AppEventSubscriptionSelector extends Omit<ElementInstanceSelector, 'parentKey' | 'parentId'> {
2912
+ appEventTypeKey?: string;
2913
+ appEventTypeId?: string;
1843
2914
  instanceKey?: string;
1844
- collectionKey?: string;
1845
- collectionParameters?: any;
1846
- defaultCollectionKey?: string;
1847
- defaultCollectionParameters?: any;
1848
- collectionSpec?: DataCollectionSpec;
1849
- isCustomized?: boolean;
1850
- errors?: ErrorData[];
1851
- pullUpdatesIntervalSeconds?: number;
1852
- fullSyncIntervalSeconds?: number;
1853
- path?: string;
1854
- defaultPath?: string;
1855
2915
  }
1856
- interface DataSourceSelector extends IntegrationSpecificElementSelector {
2916
+ interface AppEventSubscription extends BaseAppEventSubscription {
2917
+ appEventType?: BaseAppEventType;
2918
+ user?: BaseCustomer;
1857
2919
  }
1858
2920
 
1859
- declare class ConnectionsAccessor extends ElementInstanceListAccessor<Connection, FindConnectionsQuery> {
1860
- constructor(client: IntegrationAppApiClient);
1861
- create(data: CreateConnectionRequest): Promise<Connection>;
1862
- }
1863
- declare class ConnectionAccessor {
1864
- client: IntegrationAppApiClient;
1865
- connectionSelector: string;
1866
- constructor(client: IntegrationAppApiClient, connectionSelector: string);
1867
- get actions(): ConnectionLevelActionsAccessor;
1868
- action(actionSelector: string, query?: InstanceKeyQuery): ConnectionLevelActionAccessor;
1869
- get flows(): ConnectionLevelFlowsAccessor;
1870
- flow(flowSelector: string, query?: InstanceKeyQuery): ConnectionLevelFlowAccessor;
1871
- get dataSources(): ConnectionLevelDataSourcesAccessor;
1872
- dataSource(dataSourceSelector: string, query?: InstanceKeyQuery): ConnectionLevelDataSourceAccessor;
1873
- get fieldMappings(): ConnectionLevelFieldMappingsAccessor;
1874
- fieldMapping(fieldMappingSelector: string, query?: InstanceKeyQuery): ConnectionLevelFieldMappingAccessor;
1875
- get(query?: {
1876
- includeSecrets?: boolean;
1877
- }): Promise<Connection>;
1878
- patch(data: UpdateConnectionRequest): Promise<Connection>;
1879
- put(data: UpdateConnectionRequest): Promise<Connection>;
1880
- archive(): Promise<void>;
1881
- request(path: string, data?: any): Promise<any>;
1882
- get proxy(): ConnectionProxy;
1883
- operation(key: string): ConnectionOperationAccessor;
1884
- dataCollection(key: string, parameters?: Record<string, any>): ConnectionDataCollectionAccessor;
1885
- dataDirectory(key: string, parameters?: Record<string, any>): ConnectionDataDirectoryAccessor;
1886
- reconnect({ parameters, authOptionKey, connectorParameters, }?: {
1887
- parameters?: any;
1888
- authOptionKey?: string;
1889
- connectorParameters?: any;
1890
- }): Promise<Connection | undefined>;
1891
- openReconnectUI({}?: OpenConfigurationOptions): Promise<void>;
1892
- refreshCredentials(): Promise<void>;
1893
- getPath(subpath?: string, query?: Record<string, any>): string;
2921
+ interface FindAppDataSchemaInstancesQuery extends PaginationQuery {
2922
+ id?: string;
2923
+ userId?: string;
2924
+ appDataSchemaId?: string;
2925
+ instanceKey?: string;
1894
2926
  }
1895
- declare class ConnectionOperationAccessor {
1896
- client: IntegrationAppApiClient;
1897
- connectionAccessor: ConnectionAccessor;
1898
- key: string;
1899
- constructor(client: IntegrationAppApiClient, connectionAccessor: ConnectionAccessor, key: string);
1900
- get(): Promise<OperationSpec>;
1901
- run(request?: OperationRunRequest): Promise<OperationRunResponse>;
2927
+ interface AppDataSchemaInstanceSelector {
2928
+ id?: string;
2929
+ appDataSchemaKey?: string;
2930
+ appDataSchemaId?: string;
2931
+ instanceKey?: string;
2932
+ autoCreate?: boolean;
1902
2933
  }
1903
- declare class ConnectionDataDirectoryAccessor {
1904
- client: IntegrationAppApiClient;
1905
- connectionAccessor: ConnectionAccessor;
1906
- key: string;
1907
- parameters: Record<string, any>;
1908
- constructor(client: IntegrationAppApiClient, connectionAccessor: ConnectionAccessor, key: string, parameters: Record<string, any>);
1909
- list(request?: DataDirectoryListRequest): Promise<DataDirectoryListResponse>;
2934
+ interface UpdateAppDataSchemaInstanceRequest {
1910
2935
  }
1911
- declare class ConnectionDataCollectionAccessor {
1912
- client: IntegrationAppApiClient;
1913
- connectionAccessor: ConnectionAccessor;
1914
- key: string;
1915
- parameters: Record<string, any>;
1916
- constructor(client: IntegrationAppApiClient, connectionAccessor: ConnectionAccessor, key: string, parameters: Record<string, any>);
1917
- get(): Promise<DataCollectionSpec>;
1918
- findById(request?: DataCollectionFindByIdRequest): Promise<DataCollectionFindByIdResponse>;
1919
- list(request?: DataCollectionListRequest): Promise<DataCollectionListResponse>;
1920
- search(request?: DataCollectionSearchRequest): Promise<DataCollectionSearchResponse>;
1921
- match(request?: DataCollectionMatchRequest): Promise<DataCollectionMatchResponse>;
1922
- create(request?: DataCollectionCreateRequest): Promise<DataCollectionCreateResponse>;
1923
- update(request?: DataCollectionUpdateRequest): Promise<DataCollectionUpdateResponse>;
1924
- delete(request?: DataCollectionDeleteRequest): Promise<DataCollectionDeleteResponse>;
2936
+ interface CreateAppDataSchemaInstanceRequest {
1925
2937
  }
1926
- declare class ConnectionProxy {
1927
- private connection;
1928
- constructor(connection: ConnectionAccessor);
1929
- get(path: string): Promise<any>;
1930
- post(path: string, data?: any): Promise<any>;
1931
- put(path: string, data?: any): Promise<any>;
1932
- patch(path: string, data?: any): Promise<any>;
1933
- delete(path: string): Promise<any>;
1934
- private getProxyPath;
2938
+ interface AppDataSchemaInstance extends BaseAppDataSchemaInstance {
2939
+ user?: BaseCustomer;
2940
+ appDataSchema?: BaseAppDataSchema;
1935
2941
  }
1936
2942
 
1937
- declare class Connection {
1938
- id: string;
1939
- name: string;
1940
- userId: string;
1941
- user?: User;
1942
- disconnected?: boolean;
1943
- error?: ErrorData;
1944
- integrationId: string;
1945
- integration?: Integration;
1946
- credentials?: unknown;
1947
- parameters?: unknown;
1948
- connectorParameters?: unknown;
1949
- accessToken?: string;
1950
- refreshToken?: string;
1951
- createdAt: string;
1952
- updatedAt: string;
2943
+ interface ExternalEventSubscription extends BaseExternalEventSubscription {
2944
+ user?: BaseCustomer;
2945
+ connection?: BaseConnection;
2946
+ integration?: BaseIntegration;
2947
+ }
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;
1953
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;
1954
2970
  }
1955
- interface ConnectionSpec extends ConnectorSpec {
2971
+ type IntegrationAuthOption = ConnectorAuthSpec & {
2972
+ key: string;
2973
+ };
2974
+ type AppliedToIntegrations<Element> = {
2975
+ element: Element;
2976
+ integration: BaseIntegration;
2977
+ }[];
2978
+
2979
+ interface FindConnectionsQuery extends PaginationQuery {
2980
+ userId?: string;
2981
+ isTest?: boolean;
2982
+ integrationKey?: string;
2983
+ integrationId?: string;
2984
+ includeArchived?: boolean;
1956
2985
  }
1957
- declare class ConnectionSpec {
1958
- constructor(opts: ConnectionSpec);
2986
+ declare class CreateConnectionRequest {
2987
+ name: string;
2988
+ integrationId: string;
2989
+ credentials?: string;
1959
2990
  }
1960
-
1961
- declare enum ActionType {
1962
- ListDataRecords = "list-data-records",
1963
- FindDataRecordById = "find-data-record-by-id",
1964
- MatchDataRecord = "match-data-record",
1965
- CreateDataRecord = "create-data-record",
1966
- FindOrCreateDataRecord = "find-or-create-data-record",
1967
- UpdateDataRecord = "update-data-record",
1968
- DeleteDataRecord = "delete-data-record",
1969
- SearchDataRecords = "search-data-record",
1970
- ConnectorOperation = "connector-operation",
1971
- ApiRequestToExternalApp = "api-request-to-external-app",
1972
- ApiRequestToYourApp = "api-request-to-your-app",
1973
- HttpRequest = "http-request",
1974
- RunJavascript = "run-javascript",
1975
- ApiRequest = "api-request"
2991
+ declare class UpdateConnectionRequest {
2992
+ name?: string;
2993
+ credentials?: string;
2994
+ accessToken?: string;
1976
2995
  }
1977
-
1978
- interface Action extends ElementTemplateFields {
1979
- type: ActionType;
1980
- inputSchema?: DataSchema;
1981
- config?: any;
1982
- outputMapping?: any;
1983
- customOutputSchema?: DataSchema;
1984
- defaultOutputSchema?: DataSchema;
1985
- transformedOutputSchema?: DataSchema;
1986
- outputSchema?: DataSchema;
1987
- appliedToIntegrations?: AppliedToIntegrations<Action>;
1988
- dependencies?: WorkspaceElementDependency[];
2996
+ interface ConnectionSelector {
2997
+ id?: string;
2998
+ integrationKey?: string;
2999
+ integrationId?: string;
3000
+ connectionId?: string;
1989
3001
  }
1990
- interface ActionInstance extends ElementInstanceFields {
1991
- type: ActionType;
1992
- parent?: Action;
1993
- instanceKey?: string;
1994
- inputSchema?: any;
1995
- config?: any;
1996
- outputSchema?: any;
1997
- isOutdated?: boolean;
1998
- state: WorkspaceElementState;
3002
+ interface Connection extends BaseConnection {
3003
+ user?: BaseCustomer;
3004
+ integration?: BaseIntegration;
1999
3005
  }
3006
+
2000
3007
  interface ListActionsForIntegrationQuery extends PaginationQuery {
2001
3008
  parentId?: string | 'null';
2002
3009
  }
@@ -2047,6 +3054,10 @@ interface ActionRunResponse {
2047
3054
  output?: any;
2048
3055
  logs?: any[];
2049
3056
  }
3057
+ interface Action extends BaseAction {
3058
+ integration?: BaseIntegration;
3059
+ appliedToIntegrations?: AppliedToIntegrations<Action>;
3060
+ }
2050
3061
 
2051
3062
  declare class ActionsAccessor extends ElementListAccessor<Action, FindActionsQuery, CreateActionRequest> {
2052
3063
  constructor(client: IntegrationAppApiClient);
@@ -2056,6 +3067,50 @@ declare class ActionAccessor extends ElementAccessor<Action, UpdateActionRequest
2056
3067
  apply(integrationKeys: string[]): Promise<Action[]>;
2057
3068
  reset(): Promise<any>;
2058
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
+
2059
3114
  declare class ActionInstancesAccessor extends ElementInstanceListAccessor<ActionInstance, FindActionInstancesQuery> {
2060
3115
  constructor(client: IntegrationAppApiClient);
2061
3116
  }
@@ -2067,240 +3122,364 @@ declare class ActionInstanceAccessor extends ElementInstanceAccessor<ActionInsta
2067
3122
  run(input?: any): Promise<ActionRunResponse>;
2068
3123
  open({ onClose }?: OpenActionConfigurationOptions): Promise<void>;
2069
3124
  }
2070
- declare class IntegrationLevelActionAccessor extends IntegrationLevelElementAccessor<Action, UpdateActionRequest> {
3125
+ declare class ConnectionLevelActionAccessor extends ConnectionLevelElementAccessor<ActionInstance, UpdateActionInstanceRequest> {
2071
3126
  client: IntegrationAppApiClient;
2072
- integrationSelector: string;
3127
+ connectionSelector: string;
2073
3128
  actionSelector: string;
2074
- 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>;
2075
3132
  }
2076
- 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'>> {
2077
3177
  client: IntegrationAppApiClient;
2078
3178
  integrationSelector: string;
2079
3179
  constructor(client: IntegrationAppApiClient, integrationSelector: string);
2080
3180
  }
2081
- declare class ConnectionLevelActionAccessor extends ConnectionLevelElementAccessor<ActionInstance, UpdateActionInstanceRequest> {
3181
+ declare class ConnectionLevelDataSourceAccessor extends ConnectionLevelElementAccessor<DataSourceInstance, UpdateDataSourceInstanceRequest> {
2082
3182
  client: IntegrationAppApiClient;
2083
3183
  connectionSelector: string;
2084
- actionSelector: string;
3184
+ dataSourceSelector: string;
3185
+ query: InstanceKeyQuery;
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;
2085
3211
  query: InstanceKeyQuery;
2086
- constructor(client: IntegrationAppApiClient, connectionSelector: string, actionSelector: string, query: InstanceKeyQuery);
2087
- run(input?: any): Promise<ActionRunResponse>;
3212
+ constructor(client: IntegrationAppApiClient, connectionSelector: string, fieldMappingSelector: string, query: InstanceKeyQuery);
3213
+ openConfiguration({ onClose }?: OpenFieldMappingInstanceConfigurationOptions): Promise<void>;
2088
3214
  }
2089
- declare class ConnectionLevelActionsAccessor extends ConnectionLevelElementsListAccessor<Action, ListActionInstancesForConnectionQuery> {
3215
+ declare class ConnectionLevelFieldMappingsAccessor extends ConnectionLevelElementsListAccessor<FieldMappingInstance, ListFieldMappingInstancesForConnectionQuery> {
2090
3216
  client: IntegrationAppApiClient;
2091
3217
  connectionSelector: string;
2092
3218
  constructor(client: IntegrationAppApiClient, connectionSelector: string);
2093
3219
  }
2094
3220
 
2095
- type CreateAppDataSchemaRequest = {
2096
- key: string;
2097
- name: string;
2098
- schema?: any;
2099
- code?: string;
2100
- };
2101
- type UpdateAppDataSchemaRequest = {
2102
- key?: string;
2103
- name?: string;
2104
- schema?: any;
2105
- code?: string;
2106
- archivedAt?: string;
2107
- };
2108
- interface FindAppDataSchemasQuery extends PaginationQuery {
2109
- }
2110
- interface AppDataSchemaInstanceSelector {
2111
- id?: string;
2112
- appDataSchemaKey?: string;
2113
- appDataSchemaId?: string;
2114
- instanceKey?: string;
2115
- autoCreate?: boolean;
2116
- }
2117
- interface UpdateAppDataSchemaInstanceRequest {
2118
- }
2119
- interface CreateAppDataSchemaInstanceRequest {
3221
+ interface OpenFlowInstanceConfigurationOptions extends OpenConfigurationOptions {
3222
+ nodeKey?: string;
2120
3223
  }
2121
- interface FindAppDataSchemaInstancesQuery extends PaginationQuery {
2122
- id?: string;
2123
- userId?: string;
2124
- appDataSchemaId?: string;
2125
- instanceKey?: string;
3224
+ interface OpenFlowInstanceEditorOptions extends OpenConfigurationOptions {
2126
3225
  }
2127
-
2128
- declare class AppDataSchemasAccessor extends ElementListAccessor<AppDataSchema, FindAppDataSchemasQuery, CreateAppDataSchemaRequest> {
3226
+ declare class FlowInstancesAccessor extends ElementInstanceListAccessor<FlowInstance, FindFlowInstancesQuery> {
2129
3227
  constructor(client: IntegrationAppApiClient);
3228
+ create(data: CreateFlowInstanceRequest): Promise<FlowInstance>;
2130
3229
  }
2131
- declare class AppDataSchemaAccessor extends ElementAccessor<AppDataSchema, UpdateAppDataSchemaRequest> {
2132
- 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>;
2133
3246
  }
2134
- declare class AppDataSchemaInstancesAccessor extends ElementInstanceListAccessor<AppDataSchemaInstance, FindAppDataSchemaInstancesQuery> {
2135
- 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>;
2136
3261
  }
2137
- declare class AppDataSchemaInstanceAccessor extends ElementInstanceAccessor<AppDataSchemaInstance, AppDataSchemaInstanceSelector, UpdateAppDataSchemaInstanceRequest, CreateAppDataSchemaInstanceRequest> {
2138
- private client;
2139
- constructor(client: IntegrationAppApiClient, selector: string | AppDataSchemaInstanceSelector);
2140
- setup(): Promise<void>;
3262
+ declare class ConnectionLevelFlowsAccessor extends ConnectionLevelElementsListAccessor<FlowInstance, ListFlowInstancesForConnectionQuery> {
3263
+ client: IntegrationAppApiClient;
3264
+ connectionSelector: string;
3265
+ constructor(client: IntegrationAppApiClient, connectionSelector: string);
2141
3266
  }
2142
3267
 
2143
- interface AppDataSchema extends WorkspaceElement {
2144
- schema: any;
2145
- code?: string;
2146
- archivedAt?: string;
2147
- revision?: string;
3268
+ declare class ConnectionsAccessor extends ElementInstanceListAccessor<Connection, FindConnectionsQuery> {
3269
+ constructor(client: IntegrationAppApiClient);
3270
+ create(data: CreateConnectionRequest): Promise<Connection>;
2148
3271
  }
2149
- interface AppDataSchemaInstance extends WorkspaceElement {
2150
- appId: string;
2151
- userId: string;
2152
- user?: User;
2153
- appDataSchemaId: string;
2154
- appDataSchemaRevision: string;
2155
- appDataSchema?: AppDataSchema;
2156
- instanceKey?: string;
2157
- schema?: any;
2158
- error?: ErrorData;
2159
- 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;
2160
3302
  }
2161
-
2162
- interface UpdateAppEventTypeRequest {
2163
- key?: string;
2164
- name?: string;
2165
- subscribeRequest?: HttpRequestSpec;
2166
- example?: any;
2167
- schema?: DataSchema;
2168
- 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>;
2169
3310
  }
2170
- interface CreateAppEventTypeRequest extends UpdateAppEventTypeRequest {
3311
+ declare class ConnectionDataCollectionAccessor {
3312
+ client: IntegrationAppApiClient;
3313
+ connectionAccessor: ConnectionAccessor;
2171
3314
  key: string;
2172
- 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>;
2173
3325
  }
2174
- interface AppEventSubscriptionSelector extends Omit<ElementInstanceSelector, 'parentKey' | 'parentId'> {
2175
- appEventTypeKey?: string;
2176
- appEventTypeId?: string;
2177
- 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;
2178
3335
  }
2179
- interface AppEventSubscriptionUpdateRequest {
3336
+
3337
+ declare class FlowsAccessor extends ElementListAccessor<Flow, FindFlowsQuery, CreateFlowRequest> {
3338
+ constructor(client: IntegrationAppApiClient);
2180
3339
  }
2181
- interface FindAppEventTypesQuery extends PaginationQuery {
2182
- 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>;
2183
3344
  }
2184
- interface FindAppEventSubscriptionsQuery extends PaginationQuery {
2185
- id?: string;
2186
- userId?: string;
2187
- instanceKey?: string;
2188
- appEventTypeId?: string;
2189
- 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);
2190
3350
  }
2191
- interface FindAppEventsQuery extends PaginationQuery {
2192
- id?: string;
2193
- userId?: string;
2194
- instanceKey?: string;
2195
- appEventTypeId?: string;
2196
- appEventSubscriptionId?: string;
2197
- startDatetime?: string;
2198
- 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);
2199
3355
  }
2200
3356
 
2201
- declare class AppEventTypesAccessor extends ElementListAccessor<AppEventType, FindAppEventTypesQuery, CreateAppEventTypeRequest> {
2202
- constructor(client: IntegrationAppApiClient);
2203
- }
2204
- declare class AppEventTypeAccessor extends ElementAccessor<AppEventType, UpdateAppEventTypeRequest> {
2205
- constructor(client: IntegrationAppApiClient, idOrKey: string);
3357
+ interface OpenFlowRunEditorOptions extends OpenConfigurationOptions {
2206
3358
  }
2207
- declare class AppEventSubscriptionsAccessor extends ElementInstanceListAccessor<AppEventSubscription, FindAppEventSubscriptionsQuery> {
3359
+ declare class FlowRunsAccessor {
3360
+ private readonly client;
2208
3361
  constructor(client: IntegrationAppApiClient);
3362
+ find(query: FindFlowRunsQuery): Promise<FindFlowRunsResponse>;
3363
+ create(request: CreateFlowRunRequest): Promise<FlowRun>;
2209
3364
  }
2210
- declare class AppEventSubscriptionAccessor extends ElementInstanceAccessor<AppEventSubscription, AppEventSubscriptionSelector, AppEventSubscriptionUpdateRequest, AppEventSubscriptionUpdateRequest> {
2211
- constructor(client: IntegrationAppApiClient, selector: string | AppEventSubscriptionSelector);
2212
- 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>;
2213
3386
  }
2214
- declare class AppEventsAccessor extends ElementInstanceListAccessor<AppEvent, FindAppEventsQuery> {
3387
+
3388
+ declare class FieldMappingsAccessor extends ElementListAccessor<FieldMapping, FindFieldMappingsQuery, CreateFieldMappingRequest> {
2215
3389
  constructor(client: IntegrationAppApiClient);
2216
3390
  }
2217
-
2218
- interface AppEventType extends WorkspaceElement {
2219
- revision: string;
2220
- archivedAt?: string;
2221
- subscribeRequest?: HttpRequestSpec;
2222
- example?: any;
2223
- schema?: DataSchema;
2224
- globalWebhookUri: string;
2225
- 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>;
2226
3397
  }
2227
- interface AppEventSubscription extends WorkspaceElement {
2228
- revision: string;
2229
- appEventTypeId: string;
2230
- appEventType?: AppEventType;
2231
- userId: string;
2232
- user?: User;
2233
- instanceKey?: string;
2234
- isSubscribed: boolean;
2235
- schema?: DataSchema;
2236
- webhookUri: string;
2237
- subscriptionRequest: HttpRequestSpec;
2238
- subscriptionResponse?: any;
2239
- 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);
2240
3403
  }
2241
- interface AppEvent {
2242
- id: string;
2243
- name?: string;
2244
- userId: string;
2245
- user?: User;
2246
- appEventTypeId: string;
2247
- appEventType?: AppEventType;
2248
- appEventSubscriptionId: string;
2249
- appEventSubscription?: AppEventSubscription;
2250
- event: any;
2251
- datetime: string;
2252
- 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);
2253
3408
  }
2254
3409
 
2255
- declare class SelfAccessor {
2256
- private client;
2257
- constructor(client: IntegrationAppApiClient);
2258
- get(): Promise<Customer>;
2259
- patch(data: Partial<{
2260
- credentials: any;
2261
- }>): Promise<Customer>;
3410
+ interface OpenIntegrationUIIntegrationConfigurationOptions extends OpenConfigurationOptions {
2262
3411
  }
2263
-
2264
- type CreateDataLinkTableRequest = Omit<DataLinkTable, 'id' | 'userId'>;
2265
- type UpdateDataLinkTableRequest = CreateDataLinkTableRequest;
2266
- interface FindDataLinkTablesQuery extends PaginationQuery {
3412
+ declare class IntegrationsAccessor extends ElementListAccessor<Integration, FindIntegrationsQuery, CreateIntegrationRequest> {
3413
+ constructor(client: IntegrationAppApiClient);
2267
3414
  }
2268
- interface FindDataLinkTableInstancesQuery extends PaginationQuery {
2269
- connectionId?: string;
2270
- integrationId?: string;
2271
- 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>;
2272
3453
  }
2273
- interface DataLinkTableInstanceSelector extends ConnectionSelector, ElementInstanceSelector {
2274
- dataLinkTableId?: string;
2275
- dataLinkTableKey?: string;
2276
- instanceKey?: string;
3454
+
3455
+ declare class ScenariosAccessor extends ElementListAccessor<Scenario, FindScenariosQuery, CreateScenarioRequest> {
3456
+ constructor(client: IntegrationAppApiClient);
2277
3457
  }
2278
- interface UpdateDataLinkTableInstanceRequest {
3458
+ declare class ScenarioAccessor extends ElementAccessor<Scenario, UpdateScenarioRequest> {
3459
+ constructor(client: IntegrationAppApiClient, selector: string);
2279
3460
  }
2280
- interface FindDataLinksInTableQuery extends PaginationQuery {
2281
- direction?: DataLinkDirection;
2282
- appRecordId?: string;
2283
- externalRecordId?: string;
3461
+
3462
+ declare class ScreensAccessor extends ElementListAccessor<Screen, FindScreensQuery, CreateScreenRequest> {
3463
+ constructor(client: IntegrationAppApiClient);
2284
3464
  }
2285
- interface CreateDataLinkRequest {
2286
- direction?: DataLinkDirection;
2287
- appRecordId: string;
2288
- externalRecordId: string;
3465
+ declare class ScreenAccessor extends ElementAccessor<Screen, UpdateScreenRequest, ScreenSelector> {
3466
+ constructor(client: IntegrationAppApiClient, selector: ScreenSelector | string);
2289
3467
  }
2290
- interface DeleteDataLinkRequest {
2291
- direction?: DataLinkDirection;
2292
- appRecordId: string;
2293
- externalRecordId: string;
3468
+
3469
+ declare class CustomersAccessor extends ElementListAccessor<Customer, FindCustomersQuery, CreateCustomerRequest> {
3470
+ constructor(client: IntegrationAppApiClient);
2294
3471
  }
2295
- interface FindDataLinksResponse extends PaginationResponse<DataLink> {
3472
+ declare class CustomerAccessor extends ElementAccessor<Customer, UpdateCustomerRequest, CustomerSelector> {
3473
+ constructor(client: IntegrationAppApiClient, selector: CustomerSelector | string);
2296
3474
  }
2297
3475
 
2298
- declare class DataLinkTablesAccessor extends ElementListAccessor<DataLinkTable, FindDataLinkTablesQuery, CreateDataLinkTableRequest> {
3476
+ declare class DataLinkTablesAccessor extends ElementListAccessor<BaseDataLinkTable, FindDataLinkTablesQuery, CreateDataLinkTableRequest> {
2299
3477
  constructor(client: IntegrationAppApiClient);
2300
3478
  }
2301
- declare class DataLinkTableAccessor extends ElementAccessor<DataLinkTable, UpdateDataLinkTableRequest> {
3479
+ declare class DataLinkTableAccessor extends ElementAccessor<BaseDataLinkTable, UpdateDataLinkTableRequest> {
2302
3480
  constructor(client: IntegrationAppApiClient, idOrKey: string);
2303
3481
  }
3482
+
2304
3483
  declare class DataLinkTableInstancesAccessor extends ElementInstanceListAccessor<DataLinkTableInstance, FindDataLinkTableInstancesQuery> {
2305
3484
  constructor(client: IntegrationAppApiClient);
2306
3485
  }
@@ -2312,82 +3491,35 @@ declare class DataLinkTableInstanceAccessor extends ElementInstanceAccessor<Data
2312
3491
  deleteLink(data: DeleteDataLinkRequest): Promise<void>;
2313
3492
  }
2314
3493
 
2315
- declare enum DataLinkDirection {
2316
- IMPORT = "import",
2317
- EXPORT = "export",
2318
- BOTH = "both"
2319
- }
2320
- interface DataLinkTable extends WorkspaceElement {
2321
- archivedAt?: string;
2322
- }
2323
- interface DataLinkTableInstance extends WorkspaceElement {
2324
- dataLinkTableId?: string;
2325
- dataLinkTable?: DataLinkTable;
2326
- connectionId?: string;
2327
- connection?: Connection;
2328
- integrationId: string;
2329
- integration?: Integration;
2330
- instanceKey?: string;
2331
- userId: string;
2332
- user?: User;
2333
- archivedAt?: string;
3494
+ declare class AppEventTypesAccessor extends ElementListAccessor<BaseAppEventType, FindAppEventTypesQuery, CreateAppEventTypeRequest> {
3495
+ constructor(client: IntegrationAppApiClient);
2334
3496
  }
2335
- interface DataLink {
2336
- id: string;
2337
- dataLinkTableInstanceId: string;
2338
- externalRecordId: string;
2339
- appRecordId: string;
2340
- direction: DataLinkDirection;
3497
+ declare class AppEventTypeAccessor extends ElementAccessor<BaseAppEventType, UpdateAppEventTypeRequest> {
3498
+ constructor(client: IntegrationAppApiClient, idOrKey: string);
2341
3499
  }
2342
3500
 
2343
- declare enum ExternalEventSubscriptionStatus {
2344
- Subscribed = "subscribed",
2345
- Unsubscribed = "unsubscribed",
2346
- Error = "error"
3501
+ declare class AppEventSubscriptionsAccessor extends ElementInstanceListAccessor<AppEventSubscription, FindAppEventSubscriptionsQuery> {
3502
+ constructor(client: IntegrationAppApiClient);
2347
3503
  }
2348
- declare enum ExternalEventSubscriptionType {
2349
- DataRecordCreated = "data-record-created",
2350
- DataRecordUpdated = "data-record-updated",
2351
- DataRecordDeleted = "data-record-deleted",
2352
- ConnectorEvent = "connector-event"
3504
+ declare class AppEventSubscriptionAccessor extends ElementInstanceAccessor<AppEventSubscription, AppEventSubscriptionSelector, UpdateAppEventSubscriptionRequest, UpdateAppEventSubscriptionRequest> {
3505
+ constructor(client: IntegrationAppApiClient, selector: string | AppEventSubscriptionSelector);
3506
+ subscribe(): Promise<void>;
2353
3507
  }
2354
- interface ExternalEventSubscriptionConfig {
2355
- type: ExternalEventSubscriptionType;
2356
- dataSource?: DataSourceUnitConfig;
2357
- eventKey?: string;
2358
- eventParameters?: any;
3508
+
3509
+ declare class AppDataSchemasAccessor extends ElementListAccessor<BaseAppDataSchema, FindAppDataSchemasQuery, CreateAppDataSchemaRequest> {
3510
+ constructor(client: IntegrationAppApiClient);
2359
3511
  }
2360
- interface ExternalEventSubscription {
2361
- id: string;
2362
- name?: string;
2363
- userId: string;
2364
- user?: Customer;
2365
- connectionId: string;
2366
- connection?: Connection;
2367
- integrationId: string;
2368
- integration?: Integration;
2369
- uuid: string;
2370
- config?: ExternalEventSubscriptionConfig;
2371
- status?: ExternalEventSubscriptionStatus;
2372
- error?: ErrorData;
2373
- isRealTime?: boolean;
2374
- requiresPull?: boolean;
2375
- requiresFullSync?: boolean;
2376
- createdAt?: string;
2377
- archivedAt?: string;
2378
- stateData?: any;
2379
- nextPullEventsTimestamp?: number;
2380
- pullUpdatesIntervalSeconds?: number;
2381
- fullSyncIntervalSeconds?: number;
2382
- nextRefreshTimestamp?: number;
2383
- globalWebhookKey?: string;
2384
- globalWebhookEventSelector?: string;
3512
+ declare class AppDataSchemaAccessor extends ElementAccessor<BaseAppDataSchema, UpdateAppDataSchemaRequest> {
3513
+ constructor(client: IntegrationAppApiClient, idOrKey: string);
2385
3514
  }
2386
3515
 
2387
- interface FindExternalEventSubscriptionsQuery extends PaginationQuery {
2388
- userId?: string;
2389
- connectionId?: string;
2390
- 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>;
2391
3523
  }
2392
3524
 
2393
3525
  declare class ExternalEventSubscriptionsAccessor extends ElementInstanceListAccessor<ExternalEventSubscription, FindExternalEventSubscriptionsQuery> {
@@ -2406,88 +3538,13 @@ declare class ExternalEventSubscriptionAccessor {
2406
3538
  private getPath;
2407
3539
  }
2408
3540
 
2409
- interface Scenario extends WorkspaceElement {
2410
- appId: string;
2411
- scenarioTemplateId?: string;
2412
- elements?: ScenarioElement[];
2413
- connectors?: MinimalConnector[];
2414
- todos?: ScenarioToDo[];
2415
- appliedToIntegrations?: Integration[];
2416
- archivedAt?: string;
2417
- }
2418
- type ScenarioToDo = {
2419
- name: string;
2420
- description: string;
2421
- isComplete: boolean;
2422
- };
2423
- type ScenarioElement = {
2424
- id: string;
2425
- type: IntegrationElementType;
2426
- element?: any;
2427
- };
2428
- interface FindScenariosQuery extends SearchQuery, PaginationQuery {
2429
- }
2430
- interface CreateScenarioRequest {
2431
- name: string;
2432
- key: string;
2433
- elements?: ScenarioElement[];
2434
- todos?: ScenarioToDo[];
2435
- }
2436
- interface UpdateScenarioRequest {
2437
- name?: string;
2438
- key?: string;
2439
- elements?: ScenarioElement[];
2440
- todos?: ScenarioToDo[];
2441
- }
2442
-
2443
- declare class ScenariosAccessor extends ElementListAccessor<Scenario, FindScenariosQuery, CreateScenarioRequest> {
2444
- constructor(client: IntegrationAppApiClient);
2445
- }
2446
- declare class ScenarioAccessor extends ElementAccessor<Scenario, UpdateScenarioRequest> {
2447
- constructor(client: IntegrationAppApiClient, selector: string);
2448
- }
2449
-
2450
- declare enum ScreenType {
2451
- Integration = "integration"
2452
- }
2453
- declare enum ScreenBlockType {
2454
- Flow = "flow",
2455
- FieldMapping = "field-mapping",
2456
- DataSource = "data-source",
2457
- Action = "action"
2458
- }
2459
- interface ScreenBlock {
2460
- type: ScreenBlockType;
2461
- [key: string]: any;
2462
- }
2463
- interface ScreenSelector {
2464
- id?: string;
2465
- type?: ScreenType;
2466
- key?: string;
2467
- autoCreate?: boolean;
2468
- connectionId?: string;
2469
- }
2470
- interface UpdateScreenRequest {
2471
- blocks?: ScreenBlock[];
2472
- key?: string;
2473
- }
2474
- interface CreateScreenRequest extends UpdateScreenRequest {
2475
- type: ScreenType;
2476
- }
2477
- interface FindScreensQuery extends PaginationQuery {
2478
- type?: ScreenType;
2479
- }
2480
- interface Screen extends Omit<WorkspaceElement, 'key'> {
2481
- type: ScreenType;
2482
- key?: string;
2483
- blocks: ScreenBlock[];
2484
- }
2485
-
2486
- declare class ScreensAccessor extends ElementListAccessor<Screen, FindScreensQuery, CreateScreenRequest> {
3541
+ declare class SelfAccessor {
3542
+ private client;
2487
3543
  constructor(client: IntegrationAppApiClient);
2488
- }
2489
- declare class ScreenAccessor extends ElementAccessor<Screen, UpdateScreenRequest, ScreenSelector> {
2490
- constructor(client: IntegrationAppApiClient, selector: ScreenSelector | string);
3544
+ get(): Promise<Customer>;
3545
+ patch(data: Partial<{
3546
+ credentials: any;
3547
+ }>): Promise<Customer>;
2491
3548
  }
2492
3549
 
2493
3550
  interface OpenIntegrationAppConfigurationOptions extends OpenConfigurationOptions {
@@ -2528,7 +3585,6 @@ declare class IntegrationAppClient extends IntegrationAppApiClient {
2528
3585
  appEventType(id: string): AppEventTypeAccessor;
2529
3586
  get appEventSubscriptions(): AppEventSubscriptionsAccessor;
2530
3587
  appEventSubscription(selector: string | AppEventSubscriptionSelector): AppEventSubscriptionAccessor;
2531
- get appEvents(): AppEventsAccessor;
2532
3588
  get flowRuns(): FlowRunsAccessor;
2533
3589
  flowRun(id: string): FlowRunAccessor;
2534
3590
  get appDataSchemas(): AppDataSchemasAccessor;