@amp-labs/react 1.5.3 → 1.7.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 (404) hide show
  1. package/build/amp-react.cjs.js +2 -0
  2. package/build/amp-react.es.js +7854 -0
  3. package/build/index.d.ts +51 -0
  4. package/package.json +22 -9
  5. package/build/generated-sources/api/src/apis/APIKeyApi.d.ts +0 -158
  6. package/build/generated-sources/api/src/apis/APIKeyApi.js +0 -188
  7. package/build/generated-sources/api/src/apis/ConnectionApi.d.ts +0 -82
  8. package/build/generated-sources/api/src/apis/ConnectionApi.js +0 -107
  9. package/build/generated-sources/api/src/apis/ConsumerApi.d.ts +0 -52
  10. package/build/generated-sources/api/src/apis/ConsumerApi.js +0 -75
  11. package/build/generated-sources/api/src/apis/DestinationApi.d.ts +0 -156
  12. package/build/generated-sources/api/src/apis/DestinationApi.js +0 -185
  13. package/build/generated-sources/api/src/apis/GroupApi.d.ts +0 -52
  14. package/build/generated-sources/api/src/apis/GroupApi.js +0 -75
  15. package/build/generated-sources/api/src/apis/InstallationApi.d.ts +0 -196
  16. package/build/generated-sources/api/src/apis/InstallationApi.js +0 -235
  17. package/build/generated-sources/api/src/apis/IntegrationApi.d.ts +0 -128
  18. package/build/generated-sources/api/src/apis/IntegrationApi.js +0 -151
  19. package/build/generated-sources/api/src/apis/OAuthApi.d.ts +0 -76
  20. package/build/generated-sources/api/src/apis/OAuthApi.js +0 -102
  21. package/build/generated-sources/api/src/apis/OperationApi.d.ts +0 -106
  22. package/build/generated-sources/api/src/apis/OperationApi.js +0 -131
  23. package/build/generated-sources/api/src/apis/OperationEventApi.d.ts +0 -112
  24. package/build/generated-sources/api/src/apis/OperationEventApi.js +0 -140
  25. package/build/generated-sources/api/src/apis/OrgApi.d.ts +0 -226
  26. package/build/generated-sources/api/src/apis/OrgApi.js +0 -253
  27. package/build/generated-sources/api/src/apis/ProjectApi.d.ts +0 -144
  28. package/build/generated-sources/api/src/apis/ProjectApi.js +0 -170
  29. package/build/generated-sources/api/src/apis/ProviderApi.d.ts +0 -78
  30. package/build/generated-sources/api/src/apis/ProviderApi.js +0 -92
  31. package/build/generated-sources/api/src/apis/ProviderAppApi.d.ts +0 -130
  32. package/build/generated-sources/api/src/apis/ProviderAppApi.js +0 -158
  33. package/build/generated-sources/api/src/apis/RevisionApi.d.ts +0 -87
  34. package/build/generated-sources/api/src/apis/RevisionApi.js +0 -113
  35. package/build/generated-sources/api/src/apis/UploadURLApi.d.ts +0 -46
  36. package/build/generated-sources/api/src/apis/UploadURLApi.js +0 -68
  37. package/build/generated-sources/api/src/apis/UserApi.d.ts +0 -70
  38. package/build/generated-sources/api/src/apis/UserApi.js +0 -94
  39. package/build/generated-sources/api/src/apis/index.d.ts +0 -17
  40. package/build/generated-sources/api/src/apis/index.js +0 -35
  41. package/build/generated-sources/api/src/index.d.ts +0 -3
  42. package/build/generated-sources/api/src/index.js +0 -21
  43. package/build/generated-sources/api/src/models/AcceptInviteRequest.d.ts +0 -31
  44. package/build/generated-sources/api/src/models/AcceptInviteRequest.js +0 -50
  45. package/build/generated-sources/api/src/models/ApiKey.d.ts +0 -49
  46. package/build/generated-sources/api/src/models/ApiKey.js +0 -59
  47. package/build/generated-sources/api/src/models/ApiKeyOpts.d.ts +0 -63
  48. package/build/generated-sources/api/src/models/ApiKeyOpts.js +0 -66
  49. package/build/generated-sources/api/src/models/ApiKeyRequest.d.ts +0 -31
  50. package/build/generated-sources/api/src/models/ApiKeyRequest.js +0 -50
  51. package/build/generated-sources/api/src/models/ApiProblem.d.ts +0 -130
  52. package/build/generated-sources/api/src/models/ApiProblem.js +0 -82
  53. package/build/generated-sources/api/src/models/AuthType.d.ts +0 -25
  54. package/build/generated-sources/api/src/models/AuthType.js +0 -38
  55. package/build/generated-sources/api/src/models/BaseConfigContent.d.ts +0 -52
  56. package/build/generated-sources/api/src/models/BaseConfigContent.js +0 -59
  57. package/build/generated-sources/api/src/models/BaseProxyConfig.d.ts +0 -31
  58. package/build/generated-sources/api/src/models/BaseProxyConfig.js +0 -50
  59. package/build/generated-sources/api/src/models/BaseReadConfig.d.ts +0 -34
  60. package/build/generated-sources/api/src/models/BaseReadConfig.js +0 -51
  61. package/build/generated-sources/api/src/models/BaseReadConfigObject.d.ts +0 -65
  62. package/build/generated-sources/api/src/models/BaseReadConfigObject.js +0 -60
  63. package/build/generated-sources/api/src/models/BaseWriteConfig.d.ts +0 -34
  64. package/build/generated-sources/api/src/models/BaseWriteConfig.js +0 -51
  65. package/build/generated-sources/api/src/models/BaseWriteConfigObject.d.ts +0 -31
  66. package/build/generated-sources/api/src/models/BaseWriteConfigObject.js +0 -50
  67. package/build/generated-sources/api/src/models/BatchUpsertIntegrationsRequest.d.ts +0 -31
  68. package/build/generated-sources/api/src/models/BatchUpsertIntegrationsRequest.js +0 -50
  69. package/build/generated-sources/api/src/models/Builder.d.ts +0 -73
  70. package/build/generated-sources/api/src/models/Builder.js +0 -68
  71. package/build/generated-sources/api/src/models/BuilderInfo.d.ts +0 -48
  72. package/build/generated-sources/api/src/models/BuilderInfo.js +0 -59
  73. package/build/generated-sources/api/src/models/BuilderInfoOrgRole.d.ts +0 -58
  74. package/build/generated-sources/api/src/models/BuilderInfoOrgRole.js +0 -67
  75. package/build/generated-sources/api/src/models/BuilderInfoProjectRolesValue.d.ts +0 -58
  76. package/build/generated-sources/api/src/models/BuilderInfoProjectRolesValue.js +0 -67
  77. package/build/generated-sources/api/src/models/BulkWriteSupport.d.ts +0 -49
  78. package/build/generated-sources/api/src/models/BulkWriteSupport.js +0 -59
  79. package/build/generated-sources/api/src/models/Config.d.ts +0 -56
  80. package/build/generated-sources/api/src/models/Config.js +0 -63
  81. package/build/generated-sources/api/src/models/ConfigContent.d.ts +0 -50
  82. package/build/generated-sources/api/src/models/ConfigContent.js +0 -58
  83. package/build/generated-sources/api/src/models/ConfigContentAllOf.d.ts +0 -37
  84. package/build/generated-sources/api/src/models/ConfigContentAllOf.js +0 -52
  85. package/build/generated-sources/api/src/models/Connection.d.ts +0 -82
  86. package/build/generated-sources/api/src/models/Connection.js +0 -76
  87. package/build/generated-sources/api/src/models/Consumer.d.ts +0 -55
  88. package/build/generated-sources/api/src/models/Consumer.js +0 -62
  89. package/build/generated-sources/api/src/models/CreateConsumerRequest.d.ts +0 -37
  90. package/build/generated-sources/api/src/models/CreateConsumerRequest.js +0 -53
  91. package/build/generated-sources/api/src/models/CreateDestinationRequest.d.ts +0 -44
  92. package/build/generated-sources/api/src/models/CreateDestinationRequest.js +0 -57
  93. package/build/generated-sources/api/src/models/CreateDestinationRequestMetadata.d.ts +0 -39
  94. package/build/generated-sources/api/src/models/CreateDestinationRequestMetadata.js +0 -52
  95. package/build/generated-sources/api/src/models/CreateGroupRequest.d.ts +0 -37
  96. package/build/generated-sources/api/src/models/CreateGroupRequest.js +0 -53
  97. package/build/generated-sources/api/src/models/CreateInstallationRequest.d.ts +0 -44
  98. package/build/generated-sources/api/src/models/CreateInstallationRequest.js +0 -57
  99. package/build/generated-sources/api/src/models/CreateInstallationRequestConfig.d.ts +0 -44
  100. package/build/generated-sources/api/src/models/CreateInstallationRequestConfig.js +0 -56
  101. package/build/generated-sources/api/src/models/CreateIntegrationRequest.d.ts +0 -44
  102. package/build/generated-sources/api/src/models/CreateIntegrationRequest.js +0 -57
  103. package/build/generated-sources/api/src/models/CreateIntegrationRequestLatestRevision.d.ts +0 -31
  104. package/build/generated-sources/api/src/models/CreateIntegrationRequestLatestRevision.js +0 -50
  105. package/build/generated-sources/api/src/models/CreateOrgInviteRequest.d.ts +0 -31
  106. package/build/generated-sources/api/src/models/CreateOrgInviteRequest.js +0 -50
  107. package/build/generated-sources/api/src/models/CreateOrgRequest.d.ts +0 -31
  108. package/build/generated-sources/api/src/models/CreateOrgRequest.js +0 -50
  109. package/build/generated-sources/api/src/models/CreateProjectRequest.d.ts +0 -43
  110. package/build/generated-sources/api/src/models/CreateProjectRequest.js +0 -56
  111. package/build/generated-sources/api/src/models/CreateProviderAppRequest.d.ts +0 -55
  112. package/build/generated-sources/api/src/models/CreateProviderAppRequest.js +0 -61
  113. package/build/generated-sources/api/src/models/Destination.d.ts +0 -62
  114. package/build/generated-sources/api/src/models/Destination.js +0 -66
  115. package/build/generated-sources/api/src/models/Group.d.ts +0 -55
  116. package/build/generated-sources/api/src/models/Group.js +0 -62
  117. package/build/generated-sources/api/src/models/HydratedIntegration.d.ts +0 -64
  118. package/build/generated-sources/api/src/models/HydratedIntegration.js +0 -65
  119. package/build/generated-sources/api/src/models/HydratedIntegrationField.d.ts +0 -22
  120. package/build/generated-sources/api/src/models/HydratedIntegrationField.js +0 -45
  121. package/build/generated-sources/api/src/models/HydratedIntegrationFieldExistent.d.ts +0 -37
  122. package/build/generated-sources/api/src/models/HydratedIntegrationFieldExistent.js +0 -53
  123. package/build/generated-sources/api/src/models/HydratedIntegrationObject.d.ts +0 -75
  124. package/build/generated-sources/api/src/models/HydratedIntegrationObject.js +0 -70
  125. package/build/generated-sources/api/src/models/HydratedIntegrationProxy.d.ts +0 -31
  126. package/build/generated-sources/api/src/models/HydratedIntegrationProxy.js +0 -50
  127. package/build/generated-sources/api/src/models/HydratedIntegrationRead.d.ts +0 -32
  128. package/build/generated-sources/api/src/models/HydratedIntegrationRead.js +0 -51
  129. package/build/generated-sources/api/src/models/HydratedIntegrationWrite.d.ts +0 -32
  130. package/build/generated-sources/api/src/models/HydratedIntegrationWrite.js +0 -51
  131. package/build/generated-sources/api/src/models/HydratedIntegrationWriteObject.d.ts +0 -37
  132. package/build/generated-sources/api/src/models/HydratedIntegrationWriteObject.js +0 -53
  133. package/build/generated-sources/api/src/models/HydratedRevision.d.ts +0 -50
  134. package/build/generated-sources/api/src/models/HydratedRevision.js +0 -60
  135. package/build/generated-sources/api/src/models/ImportConnectionRequest.d.ts +0 -79
  136. package/build/generated-sources/api/src/models/ImportConnectionRequest.js +0 -72
  137. package/build/generated-sources/api/src/models/ImportInstallationRequest.d.ts +0 -45
  138. package/build/generated-sources/api/src/models/ImportInstallationRequest.js +0 -58
  139. package/build/generated-sources/api/src/models/ImportInstallationRequestConfig.d.ts +0 -38
  140. package/build/generated-sources/api/src/models/ImportInstallationRequestConfig.js +0 -54
  141. package/build/generated-sources/api/src/models/InputValidationIssue.d.ts +0 -89
  142. package/build/generated-sources/api/src/models/InputValidationIssue.js +0 -75
  143. package/build/generated-sources/api/src/models/InputValidationProblem.d.ts +0 -68
  144. package/build/generated-sources/api/src/models/InputValidationProblem.js +0 -63
  145. package/build/generated-sources/api/src/models/Installation.d.ts +0 -88
  146. package/build/generated-sources/api/src/models/Installation.js +0 -79
  147. package/build/generated-sources/api/src/models/Integration.d.ts +0 -68
  148. package/build/generated-sources/api/src/models/Integration.js +0 -69
  149. package/build/generated-sources/api/src/models/Integration1.d.ts +0 -64
  150. package/build/generated-sources/api/src/models/Integration1.js +0 -65
  151. package/build/generated-sources/api/src/models/IntegrationField.d.ts +0 -22
  152. package/build/generated-sources/api/src/models/IntegrationField.js +0 -45
  153. package/build/generated-sources/api/src/models/IntegrationFieldExistent.d.ts +0 -31
  154. package/build/generated-sources/api/src/models/IntegrationFieldExistent.js +0 -50
  155. package/build/generated-sources/api/src/models/IntegrationFieldMapping.d.ts +0 -49
  156. package/build/generated-sources/api/src/models/IntegrationFieldMapping.js +0 -57
  157. package/build/generated-sources/api/src/models/IntegrationObject.d.ts +0 -63
  158. package/build/generated-sources/api/src/models/IntegrationObject.js +0 -65
  159. package/build/generated-sources/api/src/models/IntegrationProxy.d.ts +0 -31
  160. package/build/generated-sources/api/src/models/IntegrationProxy.js +0 -50
  161. package/build/generated-sources/api/src/models/IntegrationRead.d.ts +0 -32
  162. package/build/generated-sources/api/src/models/IntegrationRead.js +0 -51
  163. package/build/generated-sources/api/src/models/IntegrationWrite.d.ts +0 -32
  164. package/build/generated-sources/api/src/models/IntegrationWrite.js +0 -51
  165. package/build/generated-sources/api/src/models/IntegrationWriteObject.d.ts +0 -31
  166. package/build/generated-sources/api/src/models/IntegrationWriteObject.js +0 -50
  167. package/build/generated-sources/api/src/models/Invite.d.ts +0 -84
  168. package/build/generated-sources/api/src/models/Invite.js +0 -83
  169. package/build/generated-sources/api/src/models/Log.d.ts +0 -44
  170. package/build/generated-sources/api/src/models/Log.js +0 -57
  171. package/build/generated-sources/api/src/models/LogMessage.d.ts +0 -43
  172. package/build/generated-sources/api/src/models/LogMessage.js +0 -55
  173. package/build/generated-sources/api/src/models/Oauth2Opts.d.ts +0 -77
  174. package/build/generated-sources/api/src/models/Oauth2Opts.js +0 -76
  175. package/build/generated-sources/api/src/models/OauthConnectRequest.d.ts +0 -73
  176. package/build/generated-sources/api/src/models/OauthConnectRequest.js +0 -68
  177. package/build/generated-sources/api/src/models/Operation.d.ts +0 -91
  178. package/build/generated-sources/api/src/models/Operation.js +0 -77
  179. package/build/generated-sources/api/src/models/OperationEvent.d.ts +0 -61
  180. package/build/generated-sources/api/src/models/OperationEvent.js +0 -64
  181. package/build/generated-sources/api/src/models/OptionalFieldsAutoOption.d.ts +0 -22
  182. package/build/generated-sources/api/src/models/OptionalFieldsAutoOption.js +0 -35
  183. package/build/generated-sources/api/src/models/Org.d.ts +0 -55
  184. package/build/generated-sources/api/src/models/Org.js +0 -62
  185. package/build/generated-sources/api/src/models/PatchApiKeyRequest.d.ts +0 -38
  186. package/build/generated-sources/api/src/models/PatchApiKeyRequest.js +0 -54
  187. package/build/generated-sources/api/src/models/PatchApiKeyRequestApiKey.d.ts +0 -37
  188. package/build/generated-sources/api/src/models/PatchApiKeyRequestApiKey.js +0 -52
  189. package/build/generated-sources/api/src/models/Problem.d.ts +0 -63
  190. package/build/generated-sources/api/src/models/Problem.js +0 -60
  191. package/build/generated-sources/api/src/models/Project.d.ts +0 -61
  192. package/build/generated-sources/api/src/models/Project.js +0 -64
  193. package/build/generated-sources/api/src/models/ProviderApp.d.ts +0 -73
  194. package/build/generated-sources/api/src/models/ProviderApp.js +0 -69
  195. package/build/generated-sources/api/src/models/ProviderInfo.d.ts +0 -85
  196. package/build/generated-sources/api/src/models/ProviderInfo.js +0 -75
  197. package/build/generated-sources/api/src/models/Revision.d.ts +0 -50
  198. package/build/generated-sources/api/src/models/Revision.js +0 -60
  199. package/build/generated-sources/api/src/models/SignedUrl.d.ts +0 -43
  200. package/build/generated-sources/api/src/models/SignedUrl.js +0 -56
  201. package/build/generated-sources/api/src/models/Support.d.ts +0 -56
  202. package/build/generated-sources/api/src/models/Support.js +0 -63
  203. package/build/generated-sources/api/src/models/TokenMetadataFields.d.ts +0 -43
  204. package/build/generated-sources/api/src/models/TokenMetadataFields.js +0 -54
  205. package/build/generated-sources/api/src/models/UpdateDestinationRequest.d.ts +0 -38
  206. package/build/generated-sources/api/src/models/UpdateDestinationRequest.js +0 -54
  207. package/build/generated-sources/api/src/models/UpdateDestinationRequestDestination.d.ts +0 -38
  208. package/build/generated-sources/api/src/models/UpdateDestinationRequestDestination.js +0 -53
  209. package/build/generated-sources/api/src/models/UpdateDestinationRequestDestinationMetadata.d.ts +0 -39
  210. package/build/generated-sources/api/src/models/UpdateDestinationRequestDestinationMetadata.js +0 -52
  211. package/build/generated-sources/api/src/models/UpdateInstallationConfigContent.d.ts +0 -52
  212. package/build/generated-sources/api/src/models/UpdateInstallationConfigContent.js +0 -59
  213. package/build/generated-sources/api/src/models/UpdateInstallationRequest.d.ts +0 -38
  214. package/build/generated-sources/api/src/models/UpdateInstallationRequest.js +0 -54
  215. package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallation.d.ts +0 -38
  216. package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallation.js +0 -53
  217. package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallationConfig.d.ts +0 -44
  218. package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallationConfig.js +0 -55
  219. package/build/generated-sources/api/src/models/UpdateOrgRequest.d.ts +0 -38
  220. package/build/generated-sources/api/src/models/UpdateOrgRequest.js +0 -54
  221. package/build/generated-sources/api/src/models/UpdateOrgRequestOrg.d.ts +0 -31
  222. package/build/generated-sources/api/src/models/UpdateOrgRequestOrg.js +0 -50
  223. package/build/generated-sources/api/src/models/UpdateProjectRequest.d.ts +0 -38
  224. package/build/generated-sources/api/src/models/UpdateProjectRequest.js +0 -54
  225. package/build/generated-sources/api/src/models/UpdateProjectRequestProject.d.ts +0 -37
  226. package/build/generated-sources/api/src/models/UpdateProjectRequestProject.js +0 -52
  227. package/build/generated-sources/api/src/models/UpdateProviderAppRequest.d.ts +0 -38
  228. package/build/generated-sources/api/src/models/UpdateProviderAppRequest.js +0 -54
  229. package/build/generated-sources/api/src/models/UpdateProviderAppRequestProviderApp.d.ts +0 -55
  230. package/build/generated-sources/api/src/models/UpdateProviderAppRequestProviderApp.js +0 -58
  231. package/build/generated-sources/api/src/models/index.d.ts +0 -94
  232. package/build/generated-sources/api/src/models/index.js +0 -112
  233. package/build/generated-sources/api/src/runtime.d.ts +0 -182
  234. package/build/generated-sources/api/src/runtime.js +0 -317
  235. package/build/src/assets/LoadingIcon.d.ts +0 -5
  236. package/build/src/assets/LoadingIcon.js +0 -9
  237. package/build/src/assets/NavIcon.d.ts +0 -2
  238. package/build/src/assets/NavIcon.js +0 -24
  239. package/build/src/assets/SuccessIcon.d.ts +0 -1
  240. package/build/src/assets/SuccessIcon.js +0 -8
  241. package/build/src/assets/TrashIcon.d.ts +0 -1
  242. package/build/src/assets/TrashIcon.js +0 -11
  243. package/build/src/components/Configure/InstallIntegration.d.ts +0 -12
  244. package/build/src/components/Configure/InstallIntegration.js +0 -27
  245. package/build/src/components/Configure/actions/mutateAndSetState/createInstallationAndSetState.d.ts +0 -15
  246. package/build/src/components/Configure/actions/mutateAndSetState/createInstallationAndSetState.js +0 -30
  247. package/build/src/components/Configure/actions/mutateAndSetState/updateInstallationAndSetState.d.ts +0 -15
  248. package/build/src/components/Configure/actions/mutateAndSetState/updateInstallationAndSetState.js +0 -33
  249. package/build/src/components/Configure/actions/proxy/isProxyEnabled.d.ts +0 -2
  250. package/build/src/components/Configure/actions/proxy/isProxyEnabled.js +0 -8
  251. package/build/src/components/Configure/actions/proxy/onCreateInstallationProxyOnly.d.ts +0 -8
  252. package/build/src/components/Configure/actions/proxy/onCreateInstallationProxyOnly.js +0 -44
  253. package/build/src/components/Configure/actions/read/onSaveReadCreateInstallation.d.ts +0 -3
  254. package/build/src/components/Configure/actions/read/onSaveReadCreateInstallation.js +0 -84
  255. package/build/src/components/Configure/actions/read/onSaveReadUpdateInstallation.d.ts +0 -3
  256. package/build/src/components/Configure/actions/read/onSaveReadUpdateInstallation.js +0 -71
  257. package/build/src/components/Configure/actions/write/generateConfigWriteObjects.d.ts +0 -26
  258. package/build/src/components/Configure/actions/write/generateConfigWriteObjects.js +0 -41
  259. package/build/src/components/Configure/actions/write/onSaveWriteCreateInstallation.d.ts +0 -3
  260. package/build/src/components/Configure/actions/write/onSaveWriteCreateInstallation.js +0 -79
  261. package/build/src/components/Configure/actions/write/onSaveWriteUpdateInstallation.d.ts +0 -3
  262. package/build/src/components/Configure/actions/write/onSaveWriteUpdateInstallation.js +0 -68
  263. package/build/src/components/Configure/content/ConfigureInstallationBase.d.ts +0 -9
  264. package/build/src/components/Configure/content/ConfigureInstallationBase.js +0 -36
  265. package/build/src/components/Configure/content/CreateInstallation.d.ts +0 -1
  266. package/build/src/components/Configure/content/CreateInstallation.js +0 -83
  267. package/build/src/components/Configure/content/InstallationContent.d.ts +0 -1
  268. package/build/src/components/Configure/content/InstallationContent.js +0 -20
  269. package/build/src/components/Configure/content/UninstallContent.d.ts +0 -1
  270. package/build/src/components/Configure/content/UninstallContent.js +0 -45
  271. package/build/src/components/Configure/content/UpdateInstallation.d.ts +0 -7
  272. package/build/src/components/Configure/content/UpdateInstallation.js +0 -90
  273. package/build/src/components/Configure/content/fields/FieldHeader.d.ts +0 -5
  274. package/build/src/components/Configure/content/fields/FieldHeader.js +0 -9
  275. package/build/src/components/Configure/content/fields/FieldMappings/FieldMapping.d.ts +0 -9
  276. package/build/src/components/Configure/content/fields/FieldMappings/FieldMapping.js +0 -26
  277. package/build/src/components/Configure/content/fields/FieldMappings/RequiredFieldMappings.d.ts +0 -1
  278. package/build/src/components/Configure/content/fields/FieldMappings/RequiredFieldMappings.js +0 -39
  279. package/build/src/components/Configure/content/fields/FieldMappings/index.d.ts +0 -3
  280. package/build/src/components/Configure/content/fields/FieldMappings/index.js +0 -7
  281. package/build/src/components/Configure/content/fields/FieldMappings/setFieldMapping.d.ts +0 -3
  282. package/build/src/components/Configure/content/fields/FieldMappings/setFieldMapping.js +0 -21
  283. package/build/src/components/Configure/content/fields/OptionalFields/OptionalFields.d.ts +0 -1
  284. package/build/src/components/Configure/content/fields/OptionalFields/OptionalFields.js +0 -41
  285. package/build/src/components/Configure/content/fields/OptionalFields/index.d.ts +0 -2
  286. package/build/src/components/Configure/content/fields/OptionalFields/index.js +0 -5
  287. package/build/src/components/Configure/content/fields/OptionalFields/setOptionalField.d.ts +0 -3
  288. package/build/src/components/Configure/content/fields/OptionalFields/setOptionalField.js +0 -27
  289. package/build/src/components/Configure/content/fields/ReadFields.d.ts +0 -1
  290. package/build/src/components/Configure/content/fields/ReadFields.js +0 -11
  291. package/build/src/components/Configure/content/fields/RequiredFields.d.ts +0 -1
  292. package/build/src/components/Configure/content/fields/RequiredFields.js +0 -23
  293. package/build/src/components/Configure/content/fields/WriteFields/WriteFields.d.ts +0 -1
  294. package/build/src/components/Configure/content/fields/WriteFields/WriteFields.js +0 -34
  295. package/build/src/components/Configure/content/fields/WriteFields/index.d.ts +0 -2
  296. package/build/src/components/Configure/content/fields/WriteFields/index.js +0 -5
  297. package/build/src/components/Configure/content/fields/WriteFields/setNonConfigurableWriteField.d.ts +0 -3
  298. package/build/src/components/Configure/content/fields/WriteFields/setNonConfigurableWriteField.js +0 -32
  299. package/build/src/components/Configure/content/useMutateInstallation.d.ts +0 -23
  300. package/build/src/components/Configure/content/useMutateInstallation.js +0 -47
  301. package/build/src/components/Configure/content/useSelectedConfigureState.d.ts +0 -72
  302. package/build/src/components/Configure/content/useSelectedConfigureState.js +0 -24
  303. package/build/src/components/Configure/index.d.ts +0 -1
  304. package/build/src/components/Configure/index.js +0 -5
  305. package/build/src/components/Configure/layout/ConditionalProxyLayout/ConditionalProxyLayout.d.ts +0 -11
  306. package/build/src/components/Configure/layout/ConditionalProxyLayout/ConditionalProxyLayout.js +0 -68
  307. package/build/src/components/Configure/layout/ConditionalProxyLayout/InstalledSuccessBox.d.ts +0 -5
  308. package/build/src/components/Configure/layout/ConditionalProxyLayout/InstalledSuccessBox.js +0 -11
  309. package/build/src/components/Configure/layout/ProtectedConnectionLayout.d.ts +0 -12
  310. package/build/src/components/Configure/layout/ProtectedConnectionLayout.js +0 -29
  311. package/build/src/components/Configure/nav/ObjectManagementNav/NavObjectItem.d.ts +0 -9
  312. package/build/src/components/Configure/nav/ObjectManagementNav/NavObjectItem.js +0 -14
  313. package/build/src/components/Configure/nav/ObjectManagementNav/OtherTab.d.ts +0 -7
  314. package/build/src/components/Configure/nav/ObjectManagementNav/OtherTab.js +0 -11
  315. package/build/src/components/Configure/nav/ObjectManagementNav/UninstallInstallation.d.ts +0 -7
  316. package/build/src/components/Configure/nav/ObjectManagementNav/UninstallInstallation.js +0 -15
  317. package/build/src/components/Configure/nav/ObjectManagementNav/constant.d.ts +0 -1
  318. package/build/src/components/Configure/nav/ObjectManagementNav/constant.js +0 -4
  319. package/build/src/components/Configure/nav/ObjectManagementNav/index.d.ts +0 -10
  320. package/build/src/components/Configure/nav/ObjectManagementNav/index.js +0 -61
  321. package/build/src/components/Configure/state/ConfigurationStateProvider.d.ts +0 -87
  322. package/build/src/components/Configure/state/ConfigurationStateProvider.js +0 -98
  323. package/build/src/components/Configure/state/HydratedRevisionContext.d.ts +0 -14
  324. package/build/src/components/Configure/state/HydratedRevisionContext.js +0 -81
  325. package/build/src/components/Configure/state/utils.d.ts +0 -22
  326. package/build/src/components/Configure/state/utils.js +0 -137
  327. package/build/src/components/Configure/types.d.ts +0 -44
  328. package/build/src/components/Configure/types.js +0 -2
  329. package/build/src/components/Configure/utils.d.ts +0 -34
  330. package/build/src/components/Configure/utils.js +0 -110
  331. package/build/src/components/Connect/ConnectProvider.d.ts +0 -11
  332. package/build/src/components/Connect/ConnectProvider.js +0 -12
  333. package/build/src/components/Connect/ConnectedSuccessBox.d.ts +0 -5
  334. package/build/src/components/Connect/ConnectedSuccessBox.js +0 -13
  335. package/build/src/components/Connect/useConnectionHandler.d.ts +0 -10
  336. package/build/src/components/Connect/useConnectionHandler.js +0 -24
  337. package/build/src/components/ErrorTextBox.d.ts +0 -5
  338. package/build/src/components/ErrorTextBox.js +0 -11
  339. package/build/src/components/Oauth/NoWorkspaceEntry/LandingContent.d.ts +0 -8
  340. package/build/src/components/Oauth/NoWorkspaceEntry/LandingContent.js +0 -12
  341. package/build/src/components/Oauth/NoWorkspaceEntry/NoWorkspaceOauthFlow.d.ts +0 -16
  342. package/build/src/components/Oauth/NoWorkspaceEntry/NoWorkspaceOauthFlow.js +0 -43
  343. package/build/src/components/Oauth/OAuthErrorAlert.d.ts +0 -5
  344. package/build/src/components/Oauth/OAuthErrorAlert.js +0 -12
  345. package/build/src/components/Oauth/OAuthWindow/OAuthWindow.d.ts +0 -14
  346. package/build/src/components/Oauth/OAuthWindow/OAuthWindow.js +0 -65
  347. package/build/src/components/Oauth/OAuthWindow/windowHelpers.d.ts +0 -24
  348. package/build/src/components/Oauth/OAuthWindow/windowHelpers.js +0 -77
  349. package/build/src/components/Oauth/OauthCardLayout.d.ts +0 -6
  350. package/build/src/components/Oauth/OauthCardLayout.js +0 -9
  351. package/build/src/components/Oauth/OauthFlow/OauthFlow.d.ts +0 -9
  352. package/build/src/components/Oauth/OauthFlow/OauthFlow.js +0 -33
  353. package/build/src/components/Oauth/Salesforce/SalesforceSubdomainEntry.d.ts +0 -13
  354. package/build/src/components/Oauth/Salesforce/SalesforceSubdomainEntry.js +0 -18
  355. package/build/src/components/Oauth/WorkspaceEntry/WorkspaceEntry.d.ts +0 -9
  356. package/build/src/components/Oauth/WorkspaceEntry/WorkspaceEntry.js +0 -12
  357. package/build/src/components/Oauth/WorkspaceEntry/WorkspaceOauthFlow.d.ts +0 -14
  358. package/build/src/components/Oauth/WorkspaceEntry/WorkspaceOauthFlow.js +0 -53
  359. package/build/src/components/Oauth/fetchOAuthPopupURL.d.ts +0 -1
  360. package/build/src/components/Oauth/fetchOAuthPopupURL.js +0 -29
  361. package/build/src/components/RedirectHandler/RedirectHandler.d.ts +0 -15
  362. package/build/src/components/RedirectHandler/RedirectHandler.js +0 -31
  363. package/build/src/components/RedirectHandler/index.d.ts +0 -1
  364. package/build/src/components/RedirectHandler/index.js +0 -5
  365. package/build/src/components/SuccessTextBox.d.ts +0 -5
  366. package/build/src/components/SuccessTextBox.js +0 -10
  367. package/build/src/components/ThemeProvider/Button/buttonTheme.d.ts +0 -13
  368. package/build/src/components/ThemeProvider/Button/buttonTheme.js +0 -17
  369. package/build/src/components/ThemeProvider/Button/index.d.ts +0 -2
  370. package/build/src/components/ThemeProvider/Button/index.js +0 -5
  371. package/build/src/components/ThemeProvider/index.d.ts +0 -6
  372. package/build/src/components/ThemeProvider/index.js +0 -58
  373. package/build/src/context/AmpersandContextProvider/AmpersandContextProvider.d.ts +0 -19
  374. package/build/src/context/AmpersandContextProvider/AmpersandContextProvider.js +0 -31
  375. package/build/src/context/AmpersandContextProvider/index.d.ts +0 -1
  376. package/build/src/context/AmpersandContextProvider/index.js +0 -17
  377. package/build/src/context/ApiKeyContextProvider.d.ts +0 -4
  378. package/build/src/context/ApiKeyContextProvider.js +0 -14
  379. package/build/src/context/ConnectionsContextProvider.d.ts +0 -17
  380. package/build/src/context/ConnectionsContextProvider.js +0 -66
  381. package/build/src/context/ErrorContextProvider.d.ts +0 -37
  382. package/build/src/context/ErrorContextProvider.js +0 -72
  383. package/build/src/context/InstallIntegrationContextProvider.d.ts +0 -30
  384. package/build/src/context/InstallIntegrationContextProvider.js +0 -110
  385. package/build/src/context/IntegrationListContextProvider.d.ts +0 -13
  386. package/build/src/context/IntegrationListContextProvider.js +0 -48
  387. package/build/src/context/ProjectContextProvider.d.ts +0 -15
  388. package/build/src/context/ProjectContextProvider.js +0 -50
  389. package/build/src/hooks/index.d.ts +0 -1
  390. package/build/src/hooks/index.js +0 -17
  391. package/build/src/hooks/useIsIntegrationInstalled.d.ts +0 -6
  392. package/build/src/hooks/useIsIntegrationInstalled.js +0 -48
  393. package/build/src/index.d.ts +0 -1
  394. package/build/src/index.js +0 -17
  395. package/build/src/public/index.d.ts +0 -7
  396. package/build/src/public/index.js +0 -23
  397. package/build/src/services/ApiService.d.ts +0 -25
  398. package/build/src/services/ApiService.js +0 -32
  399. package/build/src/services/api.d.ts +0 -10
  400. package/build/src/services/api.js +0 -76
  401. package/build/src/services/version.d.ts +0 -1
  402. package/build/src/services/version.js +0 -4
  403. package/build/src/utils/index.d.ts +0 -10
  404. package/build/src/utils/index.js +0 -21
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InstallationContent = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const InstallIntegrationContextProvider_1 = require("../../../context/InstallIntegrationContextProvider");
6
- const ErrorTextBox_1 = require("../../ErrorTextBox");
7
- const CreateInstallation_1 = require("./CreateInstallation");
8
- const UpdateInstallation_1 = require("./UpdateInstallation");
9
- function InstallationContent() {
10
- const { integrationObj, installation } = (0, InstallIntegrationContextProvider_1.useInstallIntegrationProps)();
11
- if (!integrationObj) {
12
- return (0, jsx_runtime_1.jsx)(ErrorTextBox_1.ErrorTextBox, { message: "We can't load the integration" });
13
- }
14
- return installation && integrationObj ? (
15
- // If installation exists, render update installation flow
16
- (0, jsx_runtime_1.jsx)(UpdateInstallation_1.UpdateInstallation, { installation: installation, integrationObj: integrationObj })) : (
17
- // No installation, render create installation flow
18
- (0, jsx_runtime_1.jsx)(CreateInstallation_1.CreateInstallation, {}));
19
- }
20
- exports.InstallationContent = InstallationContent;
@@ -1 +0,0 @@
1
- export declare function UninstallContent(): import("react/jsx-runtime").JSX.Element;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UninstallContent = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const react_2 = require("@chakra-ui/react");
7
- const ApiKeyContextProvider_1 = require("../../../context/ApiKeyContextProvider");
8
- const InstallIntegrationContextProvider_1 = require("../../../context/InstallIntegrationContextProvider");
9
- const ProjectContextProvider_1 = require("../../../context/ProjectContextProvider");
10
- const api_1 = require("../../../services/api");
11
- function UninstallContent() {
12
- const apiKey = (0, ApiKeyContextProvider_1.useApiKey)();
13
- const { projectId, appName } = (0, ProjectContextProvider_1.useProject)();
14
- const { integrationId, installation, resetInstallations } = (0, InstallIntegrationContextProvider_1.useInstallIntegrationProps)();
15
- const [loading, setLoading] = (0, react_1.useState)(false);
16
- const isDisabled = !projectId || !integrationId || !(installation === null || installation === void 0 ? void 0 : installation.id) || loading;
17
- const onDelete = async () => {
18
- if (!isDisabled) {
19
- setLoading(true);
20
- console.warn('uninstalling installation', { projectId, integrationId, installationId: installation.id });
21
- try {
22
- await (0, api_1.api)().installationApi.deleteInstallation({ projectId, integrationId, installationId: installation.id }, {
23
- headers: {
24
- 'X-Api-Key': apiKey,
25
- 'Content-Type': 'application/json',
26
- },
27
- });
28
- resetInstallations();
29
- console.warn('successfully uninstalled installation: ', installation.id);
30
- }
31
- catch (e) {
32
- console.error('error uninstalling installation', e);
33
- }
34
- finally {
35
- setLoading(false);
36
- }
37
- }
38
- };
39
- const buttonContent = loading ? 'Uninstalling...' : 'Yes, uninstall';
40
- const content = (installation === null || installation === void 0 ? void 0 : installation.id)
41
- ? `Once you uninstall this integration, all your configuration will be lost, and "${appName}" may stop working.`
42
- : "You've successfully uninstalled the integration.";
43
- return ((0, jsx_runtime_1.jsxs)(react_2.Stack, { children: [(0, jsx_runtime_1.jsx)(react_2.Text, { paddingBottom: 3, children: content }), (installation === null || installation === void 0 ? void 0 : installation.id) && ((0, jsx_runtime_1.jsx)(react_2.Button, { onClick: onDelete, variant: "warning", isDisabled: isDisabled, children: buttonContent }))] }));
44
- }
45
- exports.UninstallContent = UninstallContent;
@@ -1,7 +0,0 @@
1
- import { Installation, Integration } from '../../../services/api';
2
- interface UpdateInstallationProps {
3
- installation: Installation;
4
- integrationObj: Integration;
5
- }
6
- export declare function UpdateInstallation({ installation, integrationObj }: UpdateInstallationProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,90 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateInstallation = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const ErrorContextProvider_1 = require("../../../context/ErrorContextProvider");
7
- const onSaveReadUpdateInstallation_1 = require("../actions/read/onSaveReadUpdateInstallation");
8
- const onSaveWriteUpdateInstallation_1 = require("../actions/write/onSaveWriteUpdateInstallation");
9
- const constant_1 = require("../nav/ObjectManagementNav/constant");
10
- const utils_1 = require("../state/utils");
11
- const utils_2 = require("../utils");
12
- const ConfigureInstallationBase_1 = require("./ConfigureInstallationBase");
13
- const useMutateInstallation_1 = require("./useMutateInstallation");
14
- // Update Installation Flow
15
- function UpdateInstallation({ installation, integrationObj }) {
16
- const { setInstallation, hydratedRevision, loading, selectedObjectName, apiKey, projectId, resetBoundary, setErrors, resetConfigureState, resetPendingConfigurationState, configureState, onUpdateSuccess, } = (0, useMutateInstallation_1.useMutateInstallation)();
17
- const [isLoading, setLoadingState] = (0, react_1.useState)(false);
18
- // is other selected?
19
- const isOtherSelected = selectedObjectName === constant_1.OTHER_CONST;
20
- // when no installation or config exists, render create flow
21
- const { config } = installation;
22
- // 1. get config from installations (contains form selection state)
23
- // 2. get the hydrated revision (contains full form)
24
- // 3. generate the configuration state from the hydrated revision and config
25
- const resetState = (0, react_1.useCallback)(() => {
26
- resetBoundary(ErrorContextProvider_1.ErrorBoundary.MAPPING);
27
- // set configurationState when hydratedRevision is loaded
28
- if ((hydratedRevision === null || hydratedRevision === void 0 ? void 0 : hydratedRevision.content) && !loading && selectedObjectName) {
29
- (0, utils_1.setHydrateConfigState)(hydratedRevision, config, selectedObjectName, resetConfigureState);
30
- }
31
- }, [resetBoundary, hydratedRevision, loading, selectedObjectName, config, resetConfigureState]);
32
- (0, react_1.useEffect)(() => {
33
- if (!configureState) {
34
- resetState();
35
- }
36
- }, [configureState, resetState]);
37
- // reset state when installation (i.e. config) is reloaded.
38
- (0, react_1.useEffect)(() => {
39
- if (installation)
40
- resetState();
41
- }, [installation, resetState]);
42
- const hydratedObject = (0, react_1.useMemo)(() => {
43
- var _a, _b, _c;
44
- const hydrated = (_c = (_b = (_a = hydratedRevision === null || hydratedRevision === void 0 ? void 0 : hydratedRevision.content) === null || _a === void 0 ? void 0 : _a.read) === null || _b === void 0 ? void 0 : _b.objects) === null || _c === void 0 ? void 0 : _c.find((obj) => (obj === null || obj === void 0 ? void 0 : obj.objectName) === selectedObjectName);
45
- return hydrated;
46
- }, [hydratedRevision, selectedObjectName]);
47
- const onSaveRead = () => {
48
- // check if fields with requirements are met
49
- const { requiredMapFields, selectedFieldMappings } = (configureState === null || configureState === void 0 ? void 0 : configureState.read) || {};
50
- const { errorList } = (0, utils_2.validateFieldMappings)(requiredMapFields, selectedFieldMappings, setErrors);
51
- if (errorList.length > 0) {
52
- return;
53
- }
54
- if (hydratedRevision && installation && selectedObjectName && apiKey && projectId && hydratedObject) {
55
- setLoadingState(true);
56
- const res = (0, onSaveReadUpdateInstallation_1.onSaveReadUpdateInstallation)(projectId, integrationObj.id, installation.id, selectedObjectName, apiKey, configureState, setInstallation, hydratedObject, hydratedRevision, onUpdateSuccess);
57
- res.finally(() => {
58
- setLoadingState(false);
59
- resetPendingConfigurationState(selectedObjectName);
60
- });
61
- }
62
- else {
63
- console.error('UpdateInstallation - onSaveUpdate missing required props');
64
- }
65
- };
66
- const onSaveWrite = () => {
67
- if (installation && selectedObjectName && apiKey && projectId && hydratedRevision) {
68
- setLoadingState(true);
69
- const res = (0, onSaveWriteUpdateInstallation_1.onSaveWriteUpdateInstallation)(projectId, integrationObj.id, installation.id, apiKey, configureState, hydratedRevision, setInstallation, onUpdateSuccess);
70
- res.finally(() => {
71
- setLoadingState(false);
72
- resetPendingConfigurationState(selectedObjectName);
73
- });
74
- }
75
- else {
76
- console.error('UpdateInstallation - onSaveUpdate missing required props');
77
- }
78
- };
79
- const onSave = (e) => {
80
- e.preventDefault();
81
- if (!isOtherSelected) {
82
- onSaveRead();
83
- }
84
- else {
85
- onSaveWrite();
86
- }
87
- };
88
- return ((0, jsx_runtime_1.jsx)(ConfigureInstallationBase_1.ConfigureInstallationBase, { onSave: onSave, onReset: resetState, isLoading: isLoading }));
89
- }
90
- exports.UpdateInstallation = UpdateInstallation;
@@ -1,5 +0,0 @@
1
- interface FieldHeaderProps {
2
- string: string;
3
- }
4
- export declare function FieldHeader({ string }: FieldHeaderProps): import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FieldHeader = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("@chakra-ui/react");
6
- function FieldHeader({ string }) {
7
- return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { position: "relative", paddingTop: 8, paddingBottom: 4, children: [(0, jsx_runtime_1.jsx)(react_1.Heading, { color: "gray.500", as: "h3", fontSize: 16, fontWeight: "500", children: string }), (0, jsx_runtime_1.jsx)(react_1.Flex, { flex: "1", justifyContent: "flex-end", alignItems: "center", children: (0, jsx_runtime_1.jsx)(react_1.Divider, { marginLeft: 2 }) })] }));
8
- }
9
- exports.FieldHeader = FieldHeader;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { HydratedIntegrationFieldExistent, IntegrationFieldMapping } from '../../../../../services/api';
3
- interface FieldMappingProps {
4
- field: IntegrationFieldMapping;
5
- onSelectChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
6
- allFields: HydratedIntegrationFieldExistent[];
7
- }
8
- export declare function FieldMapping({ field, onSelectChange, allFields }: FieldMappingProps): import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FieldMapping = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const react_2 = require("@chakra-ui/react");
7
- const useSelectedConfigureState_1 = require("../../useSelectedConfigureState");
8
- const setFieldMapping_1 = require("./setFieldMapping");
9
- function FieldMapping({ field, onSelectChange, allFields }) {
10
- var _a;
11
- const { configureState, selectedObjectName, setConfigureState } = (0, useSelectedConfigureState_1.useSelectedConfigureState)();
12
- const [disabled, setDisabled] = (0, react_1.useState)(true);
13
- const selectedRequiredMapFields = (_a = configureState === null || configureState === void 0 ? void 0 : configureState.read) === null || _a === void 0 ? void 0 : _a.selectedFieldMappings;
14
- const fieldValue = selectedRequiredMapFields === null || selectedRequiredMapFields === void 0 ? void 0 : selectedRequiredMapFields[field.mapToName];
15
- (0, react_1.useEffect)(() => {
16
- /* eslint no-underscore-dangle: ["error", { "allow": ["_default"] }] */
17
- if (!!field._default && !fieldValue && selectedObjectName && !!configureState) {
18
- // set field mapping default value if no value exists
19
- (0, setFieldMapping_1.setFieldMapping)(selectedObjectName, setConfigureState, field.mapToName, field._default);
20
- }
21
- setDisabled(false);
22
- }, [field, setConfigureState, selectedObjectName, fieldValue, configureState]);
23
- const options = (0, react_1.useMemo)(() => allFields === null || allFields === void 0 ? void 0 : allFields.map((f) => (0, jsx_runtime_1.jsx)("option", { value: f.fieldName, children: f.displayName }, f.fieldName)), [allFields]);
24
- return ((0, jsx_runtime_1.jsxs)(react_2.Stack, { children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontWeight: "500", children: field.mapToDisplayName }), (0, jsx_runtime_1.jsx)(react_2.Text, { marginBottom: "5px", fontSize: 14, children: field === null || field === void 0 ? void 0 : field.prompt }), (0, jsx_runtime_1.jsx)(react_2.Select, { name: field.mapToName, variant: "flushed", value: fieldValue || undefined, onChange: onSelectChange, placeholder: !fieldValue ? 'Please select one' : undefined, disabled: disabled, children: options })] }, field.mapToName));
25
- }
26
- exports.FieldMapping = FieldMapping;
@@ -1 +0,0 @@
1
- export declare function RequiredFieldMappings(): import("react/jsx-runtime").JSX.Element | null;
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequiredFieldMappings = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const react_2 = require("@chakra-ui/react");
7
- const ErrorContextProvider_1 = require("../../../../../context/ErrorContextProvider");
8
- const utils_1 = require("../../../utils");
9
- const useSelectedConfigureState_1 = require("../../useSelectedConfigureState");
10
- const FieldHeader_1 = require("../FieldHeader");
11
- const FieldMapping_1 = require("./FieldMapping");
12
- const setFieldMapping_1 = require("./setFieldMapping");
13
- function RequiredFieldMappings() {
14
- const { selectedObjectName, configureState, setConfigureState } = (0, useSelectedConfigureState_1.useSelectedConfigureState)();
15
- const { isError, removeError } = (0, ErrorContextProvider_1.useErrorState)();
16
- const onSelectChange = (e) => {
17
- const { value, name } = e.target;
18
- if (!value) {
19
- // if place holder value is chosen, we don't change state
20
- return;
21
- }
22
- if (selectedObjectName) {
23
- (0, setFieldMapping_1.setFieldMapping)(selectedObjectName, setConfigureState, name, value);
24
- }
25
- if (isError(ErrorContextProvider_1.ErrorBoundary.MAPPING, name)) {
26
- removeError(ErrorContextProvider_1.ErrorBoundary.MAPPING, name);
27
- }
28
- };
29
- const integrationFieldMappings = (0, react_1.useMemo)(() => {
30
- var _a, _b;
31
- return ((_b = (_a = configureState === null || configureState === void 0 ? void 0 : configureState.read) === null || _a === void 0 ? void 0 : _a.requiredMapFields) === null || _b === void 0 ? void 0 : _b.filter(utils_1.isIntegrationFieldMapping)) || [];
32
- }, [configureState]);
33
- return (integrationFieldMappings.length ? ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsx)(FieldHeader_1.FieldHeader, { string: "Map the following fields (required)" }), (0, jsx_runtime_1.jsx)(react_2.Stack, { children: integrationFieldMappings.map((field) => {
34
- var _a;
35
- return ((0, jsx_runtime_1.jsxs)(react_2.FormControl, { isInvalid: isError(ErrorContextProvider_1.ErrorBoundary.MAPPING, field.mapToName), children: [(0, jsx_runtime_1.jsx)(FieldMapping_1.FieldMapping, { allFields: ((_a = configureState.read) === null || _a === void 0 ? void 0 : _a.allFields) || [], field: field, onSelectChange: onSelectChange }), (0, jsx_runtime_1.jsx)(react_2.FormErrorMessage, { children: " * required" })] }, field.mapToName));
36
- }) })] }))
37
- : null);
38
- }
39
- exports.RequiredFieldMappings = RequiredFieldMappings;
@@ -1,3 +0,0 @@
1
- import { FieldMapping } from './FieldMapping';
2
- import { RequiredFieldMappings } from './RequiredFieldMappings';
3
- export { FieldMapping, RequiredFieldMappings };
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequiredFieldMappings = exports.FieldMapping = void 0;
4
- const FieldMapping_1 = require("./FieldMapping");
5
- Object.defineProperty(exports, "FieldMapping", { enumerable: true, get: function () { return FieldMapping_1.FieldMapping; } });
6
- const RequiredFieldMappings_1 = require("./RequiredFieldMappings");
7
- Object.defineProperty(exports, "RequiredFieldMappings", { enumerable: true, get: function () { return RequiredFieldMappings_1.RequiredFieldMappings; } });
@@ -1,3 +0,0 @@
1
- import { Draft } from 'immer';
2
- import { ConfigureState } from '../../../types';
3
- export declare function setFieldMapping(selectedObjectName: string, setConfigureState: (objectName: string, producer: (draft: Draft<ConfigureState>) => void) => void, fieldKey: string, newValue: string): void;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setFieldMapping = void 0;
4
- const utils_1 = require("../../../state/utils");
5
- function setFieldMappingProducer(draft, fieldKey, newValue) {
6
- var _a;
7
- const draftRequiredMapFields = ((_a = draft === null || draft === void 0 ? void 0 : draft.read) === null || _a === void 0 ? void 0 : _a.selectedFieldMappings) || {};
8
- draftRequiredMapFields[fieldKey] = newValue;
9
- if (draft === null || draft === void 0 ? void 0 : draft.read) {
10
- const savedFields = draft.read.savedConfig.requiredMapFields;
11
- const updatedFields = draftRequiredMapFields;
12
- const isModified = !(0, utils_1.isFieldObjectEqual)(savedFields, updatedFields);
13
- // immer exception if we try to set a value
14
- // eslint-disable-next-line no-param-reassign
15
- draft.read.isRequiredMapFieldsModified = isModified;
16
- }
17
- }
18
- function setFieldMapping(selectedObjectName, setConfigureState, fieldKey, newValue) {
19
- setConfigureState(selectedObjectName, (draft) => setFieldMappingProducer(draft, fieldKey, newValue));
20
- }
21
- exports.setFieldMapping = setFieldMapping;
@@ -1 +0,0 @@
1
- export declare function OptionalFields(): false | import("react/jsx-runtime").JSX.Element;
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OptionalFields = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("@chakra-ui/react");
6
- const utils_1 = require("../../../utils");
7
- const useSelectedConfigureState_1 = require("../../useSelectedConfigureState");
8
- const FieldHeader_1 = require("../FieldHeader");
9
- const setOptionalField_1 = require("./setOptionalField");
10
- function OptionalFields() {
11
- var _a, _b;
12
- const { appName, configureState, setConfigureState, selectedObjectName, } = (0, useSelectedConfigureState_1.useSelectedConfigureState)();
13
- const selectedOptionalFields = (_a = configureState === null || configureState === void 0 ? void 0 : configureState.read) === null || _a === void 0 ? void 0 : _a.selectedOptionalFields;
14
- const onCheckboxChange = (e) => {
15
- const { name, checked } = e.target;
16
- if (selectedObjectName && configureState) {
17
- (0, setOptionalField_1.setOptionalField)(selectedObjectName, setConfigureState, name, checked);
18
- }
19
- };
20
- const readOptionalFields = (_b = configureState === null || configureState === void 0 ? void 0 : configureState.read) === null || _b === void 0 ? void 0 : _b.optionalFields;
21
- const onSelectAllCheckboxChange = (e) => {
22
- const { checked } = e.target;
23
- if (selectedObjectName && readOptionalFields) {
24
- readOptionalFields.forEach((field) => {
25
- if (!(0, utils_1.isIntegrationFieldMapping)(field)) {
26
- (0, setOptionalField_1.setOptionalField)(selectedObjectName, setConfigureState, field.fieldName, checked);
27
- }
28
- });
29
- }
30
- };
31
- const shouldRender = !!(readOptionalFields && readOptionalFields.length > 0);
32
- const isAllChecked = Object.keys(selectedOptionalFields || {}).length === (readOptionalFields === null || readOptionalFields === void 0 ? void 0 : readOptionalFields.length);
33
- const isIndeterminate = !isAllChecked && Object.keys(selectedOptionalFields || {}).length > 0;
34
- return (shouldRender && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FieldHeader_1.FieldHeader, { string: `${appName} reads the following optional fields` }), (0, jsx_runtime_1.jsxs)(react_1.Stack, { marginBottom: 10, maxHeight: 300, overflowY: "scroll", border: "2px solid #EFEFEF", borderRadius: 8, gap: 0, children: [((readOptionalFields === null || readOptionalFields === void 0 ? void 0 : readOptionalFields.length) || 0) >= 2 && ((0, jsx_runtime_1.jsx)(react_1.Box, { backgroundColor: "gray.50", paddingX: 4, paddingY: 2, children: (0, jsx_runtime_1.jsx)(react_1.Checkbox, { name: "selectAll", id: "selectAll", onChange: onSelectAllCheckboxChange, isIndeterminate: isIndeterminate, isChecked: isAllChecked, children: "Select all" }) })), readOptionalFields.map((field) => {
35
- if (!(0, utils_1.isIntegrationFieldMapping)(field)) {
36
- return ((0, jsx_runtime_1.jsx)(react_1.Box, { paddingX: 4, paddingY: 2, borderBottom: "1px", borderColor: "gray.100", children: (0, jsx_runtime_1.jsx)(react_1.Checkbox, { name: field.fieldName, id: field.fieldName, isChecked: !!(selectedOptionalFields === null || selectedOptionalFields === void 0 ? void 0 : selectedOptionalFields[field === null || field === void 0 ? void 0 : field.fieldName]), onChange: onCheckboxChange, children: field.displayName }) }, field.fieldName));
37
- }
38
- return null; // fallback for customed mapped fields
39
- })] })] })));
40
- }
41
- exports.OptionalFields = OptionalFields;
@@ -1,2 +0,0 @@
1
- import { OptionalFields } from './OptionalFields';
2
- export { OptionalFields };
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OptionalFields = void 0;
4
- const OptionalFields_1 = require("./OptionalFields");
5
- Object.defineProperty(exports, "OptionalFields", { enumerable: true, get: function () { return OptionalFields_1.OptionalFields; } });
@@ -1,3 +0,0 @@
1
- import { Draft } from 'immer';
2
- import { ConfigureState } from '../../../types';
3
- export declare function setOptionalField(selectedObjectName: string, setConfigureState: (objectName: string, producer: (draft: Draft<ConfigureState>) => void) => void, fieldKey: string, checked: boolean): void;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setOptionalField = void 0;
4
- const utils_1 = require("../../../state/utils");
5
- function setOptionalFieldProducer(draft, fieldKey, checked) {
6
- var _a, _b;
7
- const draftSelectedOptionalFields = ((_a = draft === null || draft === void 0 ? void 0 : draft.read) === null || _a === void 0 ? void 0 : _a.selectedOptionalFields) || {};
8
- draftSelectedOptionalFields[fieldKey] = checked;
9
- if (!checked) {
10
- delete draftSelectedOptionalFields[fieldKey];
11
- }
12
- if ((_b = draft.read) === null || _b === void 0 ? void 0 : _b.savedConfig.optionalFields) {
13
- const savedFields = draft.read.savedConfig.optionalFields;
14
- const updatedFields = draftSelectedOptionalFields;
15
- const isModified = !(0, utils_1.isFieldObjectEqual)(savedFields, updatedFields);
16
- // immer exception if we try to set a value
17
- // eslint-disable-next-line no-param-reassign
18
- draft.read.isOptionalFieldsModified = isModified;
19
- }
20
- else {
21
- console.warn('read.savedConfig.optionalFields is undefined');
22
- }
23
- }
24
- function setOptionalField(selectedObjectName, setConfigureState, fieldKey, checked) {
25
- setConfigureState(selectedObjectName, (draft) => setOptionalFieldProducer(draft, fieldKey, checked));
26
- }
27
- exports.setOptionalField = setOptionalField;
@@ -1 +0,0 @@
1
- export declare function ReadFields(): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReadFields = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const FieldMappings_1 = require("./FieldMappings");
6
- const OptionalFields_1 = require("./OptionalFields");
7
- const RequiredFields_1 = require("./RequiredFields");
8
- function ReadFields() {
9
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RequiredFields_1.RequiredFields, {}), (0, jsx_runtime_1.jsx)(FieldMappings_1.RequiredFieldMappings, {}), (0, jsx_runtime_1.jsx)(OptionalFields_1.OptionalFields, {})] }));
10
- }
11
- exports.ReadFields = ReadFields;
@@ -1 +0,0 @@
1
- export declare function RequiredFields(): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequiredFields = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("@chakra-ui/react");
6
- const ProjectContextProvider_1 = require("../../../../context/ProjectContextProvider");
7
- const utils_1 = require("../../utils");
8
- const useSelectedConfigureState_1 = require("../useSelectedConfigureState");
9
- const FieldHeader_1 = require("./FieldHeader");
10
- function RequiredFields() {
11
- var _a, _b, _c;
12
- const { configureState, selectedObjectName } = (0, useSelectedConfigureState_1.useSelectedConfigureState)();
13
- const { appName } = (0, ProjectContextProvider_1.useProject)();
14
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FieldHeader_1.FieldHeader, { string: `${appName} reads the following ${selectedObjectName} fields` }), (0, jsx_runtime_1.jsx)(react_1.Box, { marginBottom: "20px", display: "flex", gap: 1, children: ((_b = (_a = configureState === null || configureState === void 0 ? void 0 : configureState.read) === null || _a === void 0 ? void 0 : _a.requiredFields) === null || _b === void 0 ? void 0 : _b.length)
15
- ? ((_c = configureState.read) === null || _c === void 0 ? void 0 : _c.requiredFields.map((field) => {
16
- if (!(0, utils_1.isIntegrationFieldMapping)(field)) {
17
- return (0, jsx_runtime_1.jsx)(react_1.Tag, { children: field.displayName }, field.fieldName);
18
- }
19
- return null; // fallback for customed mapped fields
20
- }))
21
- : 'There are no required fields.' })] }));
22
- }
23
- exports.RequiredFields = RequiredFields;
@@ -1 +0,0 @@
1
- export declare function WriteFields(): false | import("react/jsx-runtime").JSX.Element;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WriteFields = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("@chakra-ui/react");
6
- const useSelectedConfigureState_1 = require("../../useSelectedConfigureState");
7
- const FieldHeader_1 = require("../FieldHeader");
8
- const setNonConfigurableWriteField_1 = require("./setNonConfigurableWriteField");
9
- function WriteFields() {
10
- var _a, _b, _c, _d;
11
- const { appName, selectedObjectName, configureState, setConfigureState, } = (0, useSelectedConfigureState_1.useSelectedConfigureState)();
12
- const selectedWriteFields = (_a = configureState === null || configureState === void 0 ? void 0 : configureState.write) === null || _a === void 0 ? void 0 : _a.selectedNonConfigurableWriteFields;
13
- const writeObjects = (_b = configureState === null || configureState === void 0 ? void 0 : configureState.write) === null || _b === void 0 ? void 0 : _b.writeObjects;
14
- const onCheckboxChange = (e) => {
15
- const { name, checked } = e.target;
16
- if (selectedObjectName && configureState) {
17
- (0, setNonConfigurableWriteField_1.setNonConfigurableWriteField)(selectedObjectName, setConfigureState, name, checked);
18
- }
19
- };
20
- const onSelectAllCheckboxChange = (e) => {
21
- var _a, _b;
22
- const { checked } = e.target;
23
- if (selectedObjectName && configureState) {
24
- (_b = (_a = configureState === null || configureState === void 0 ? void 0 : configureState.write) === null || _a === void 0 ? void 0 : _a.writeObjects) === null || _b === void 0 ? void 0 : _b.forEach((field) => {
25
- (0, setNonConfigurableWriteField_1.setNonConfigurableWriteField)(selectedObjectName, setConfigureState, field.objectName, checked);
26
- });
27
- }
28
- };
29
- const shouldRender = !!(writeObjects);
30
- const isAllChecked = Object.keys(selectedWriteFields || {}).length === ((_d = (_c = configureState === null || configureState === void 0 ? void 0 : configureState.write) === null || _c === void 0 ? void 0 : _c.writeObjects) === null || _d === void 0 ? void 0 : _d.length);
31
- const isIndeterminate = !isAllChecked && Object.keys(selectedWriteFields || {}).length > 0;
32
- return (shouldRender && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FieldHeader_1.FieldHeader, { string: `Allow ${appName} to write to these object` }), (0, jsx_runtime_1.jsxs)(react_1.Stack, { marginBottom: 10, maxHeight: 300, overflowY: "scroll", border: "2px solid #EFEFEF", borderRadius: 8, gap: 0, children: [((writeObjects === null || writeObjects === void 0 ? void 0 : writeObjects.length) || 0) >= 2 && ((0, jsx_runtime_1.jsx)(react_1.Box, { backgroundColor: "gray.50", paddingX: 4, paddingY: 2, children: (0, jsx_runtime_1.jsx)(react_1.Checkbox, { name: "selectAll", id: "selectAll", onChange: onSelectAllCheckboxChange, isIndeterminate: isIndeterminate, isChecked: isAllChecked, children: "Select all" }) })), writeObjects.map((field) => ((0, jsx_runtime_1.jsx)(react_1.Box, { display: "flex", alignItems: "center", borderBottom: "1px", borderColor: "gray.100", paddingX: 4, paddingY: 2, children: (0, jsx_runtime_1.jsx)(react_1.Checkbox, { name: field.objectName, id: field.objectName, onChange: onCheckboxChange, isChecked: !!(selectedWriteFields === null || selectedWriteFields === void 0 ? void 0 : selectedWriteFields[field.objectName]), children: field.displayName }) }, field.objectName)))] })] })));
33
- }
34
- exports.WriteFields = WriteFields;
@@ -1,2 +0,0 @@
1
- import { WriteFields } from './WriteFields';
2
- export { WriteFields };
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WriteFields = void 0;
4
- const WriteFields_1 = require("./WriteFields");
5
- Object.defineProperty(exports, "WriteFields", { enumerable: true, get: function () { return WriteFields_1.WriteFields; } });
@@ -1,3 +0,0 @@
1
- import { Draft } from 'immer';
2
- import { ConfigureState } from '../../../types';
3
- export declare function setNonConfigurableWriteField(selectedObjectName: string, setConfigureState: (objectName: string, producer: (draft: Draft<ConfigureState>) => void) => void, fieldKey: string, checked: boolean): void;
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setNonConfigurableWriteField = void 0;
4
- const utils_1 = require("../../../state/utils");
5
- function setNonConfigurableWriteFieldProducer(draft, fieldKey, checked) {
6
- var _a, _b, _c;
7
- if (((_a = draft === null || draft === void 0 ? void 0 : draft.write) === null || _a === void 0 ? void 0 : _a.selectedNonConfigurableWriteFields) === null) {
8
- // immer syntax to set a value
9
- // eslint-disable-next-line no-param-reassign
10
- draft.write.selectedNonConfigurableWriteFields = {};
11
- }
12
- if (draft === null || draft === void 0 ? void 0 : draft.write) {
13
- const draftSelectedWriteFields = draft.write.selectedNonConfigurableWriteFields;
14
- draftSelectedWriteFields[fieldKey] = checked;
15
- if (!checked) {
16
- delete draftSelectedWriteFields[fieldKey];
17
- }
18
- // check is modified
19
- if ((_c = (_b = draft === null || draft === void 0 ? void 0 : draft.write) === null || _b === void 0 ? void 0 : _b.savedConfig) === null || _c === void 0 ? void 0 : _c.selectedNonConfigurableWriteFields) {
20
- const savedFields = draft.write.savedConfig.selectedNonConfigurableWriteFields;
21
- const updatedFields = draftSelectedWriteFields;
22
- const isModified = !(0, utils_1.isFieldObjectEqual)(savedFields, updatedFields);
23
- // immer syntax to set a value
24
- // eslint-disable-next-line no-param-reassign
25
- draft.write.isWriteModified = isModified;
26
- }
27
- }
28
- }
29
- function setNonConfigurableWriteField(selectedObjectName, setConfigureState, fieldKey, checked) {
30
- setConfigureState(selectedObjectName, (draft) => { setNonConfigurableWriteFieldProducer(draft, fieldKey, checked); });
31
- }
32
- exports.setNonConfigurableWriteField = setNonConfigurableWriteField;
@@ -1,23 +0,0 @@
1
- /**
2
- * state hook for installation flows (Create/Update)
3
- * */
4
- export declare const useMutateInstallation: () => {
5
- integrationId: string;
6
- groupRef: string;
7
- consumerRef: string;
8
- setInstallation: (installationObj: import("../../../services/api").Installation) => void;
9
- hydratedRevision: import("../../../services/api").HydratedRevision | null;
10
- loading: boolean;
11
- selectedObjectName: string | undefined;
12
- selectedConnection: import("../../../services/api").Connection | null;
13
- apiKey: string;
14
- projectId: string;
15
- resetBoundary: (boundary: import("../../../context/ErrorContextProvider").ErrorBoundary) => void;
16
- setErrors: (boundary: import("../../../context/ErrorContextProvider").ErrorBoundary, keys: string[]) => void;
17
- resetConfigureState: (objectName: string, configureState: import("../types").ConfigureState) => void;
18
- objectConfigurationsState: import("../types").ObjectConfigurationsState;
19
- resetPendingConfigurationState: (objectName: string) => void;
20
- configureState: import("../types").ConfigureState;
21
- onInstallSuccess: ((installationId: string, config: import("../../../services/api").Config) => void) | undefined;
22
- onUpdateSuccess: ((installationId: string, config: import("../../../services/api").Config) => void) | undefined;
23
- };
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useMutateInstallation = void 0;
4
- const ApiKeyContextProvider_1 = require("../../../context/ApiKeyContextProvider");
5
- const ConnectionsContextProvider_1 = require("../../../context/ConnectionsContextProvider");
6
- const ErrorContextProvider_1 = require("../../../context/ErrorContextProvider");
7
- const InstallIntegrationContextProvider_1 = require("../../../context/InstallIntegrationContextProvider");
8
- const ProjectContextProvider_1 = require("../../../context/ProjectContextProvider");
9
- const ObjectManagementNav_1 = require("../nav/ObjectManagementNav");
10
- const ConfigurationStateProvider_1 = require("../state/ConfigurationStateProvider");
11
- const HydratedRevisionContext_1 = require("../state/HydratedRevisionContext");
12
- const utils_1 = require("../state/utils");
13
- /**
14
- * state hook for installation flows (Create/Update)
15
- * */
16
- const useMutateInstallation = () => {
17
- const { integrationId, groupRef, consumerRef, setInstallation, onInstallSuccess, onUpdateSuccess, } = (0, InstallIntegrationContextProvider_1.useInstallIntegrationProps)();
18
- const { hydratedRevision, loading } = (0, HydratedRevisionContext_1.useHydratedRevision)();
19
- const { selectedObjectName } = (0, ObjectManagementNav_1.useSelectedObjectName)();
20
- const { selectedConnection } = (0, ConnectionsContextProvider_1.useConnections)();
21
- const apiKey = (0, ApiKeyContextProvider_1.useApiKey)();
22
- const { projectId } = (0, ProjectContextProvider_1.useProject)();
23
- const { resetBoundary, setErrors } = (0, ErrorContextProvider_1.useErrorState)();
24
- const { resetConfigureState, objectConfigurationsState, resetPendingConfigurationState, } = (0, ConfigurationStateProvider_1.useObjectsConfigureState)();
25
- const configureState = (0, utils_1.getConfigureState)(selectedObjectName || '', objectConfigurationsState);
26
- return {
27
- integrationId,
28
- groupRef,
29
- consumerRef,
30
- setInstallation,
31
- hydratedRevision,
32
- loading,
33
- selectedObjectName,
34
- selectedConnection,
35
- apiKey,
36
- projectId,
37
- resetBoundary,
38
- setErrors,
39
- resetConfigureState,
40
- objectConfigurationsState,
41
- resetPendingConfigurationState,
42
- configureState,
43
- onInstallSuccess,
44
- onUpdateSuccess,
45
- };
46
- };
47
- exports.useMutateInstallation = useMutateInstallation;