@amp-labs/react 1.5.3 → 1.6.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.
- package/build/amp-react.cjs.js +2 -0
- package/build/amp-react.es.js +7816 -0
- package/build/index.d.ts +51 -0
- package/package.json +22 -9
- package/build/generated-sources/api/src/apis/APIKeyApi.d.ts +0 -158
- package/build/generated-sources/api/src/apis/APIKeyApi.js +0 -188
- package/build/generated-sources/api/src/apis/ConnectionApi.d.ts +0 -82
- package/build/generated-sources/api/src/apis/ConnectionApi.js +0 -107
- package/build/generated-sources/api/src/apis/ConsumerApi.d.ts +0 -52
- package/build/generated-sources/api/src/apis/ConsumerApi.js +0 -75
- package/build/generated-sources/api/src/apis/DestinationApi.d.ts +0 -156
- package/build/generated-sources/api/src/apis/DestinationApi.js +0 -185
- package/build/generated-sources/api/src/apis/GroupApi.d.ts +0 -52
- package/build/generated-sources/api/src/apis/GroupApi.js +0 -75
- package/build/generated-sources/api/src/apis/InstallationApi.d.ts +0 -196
- package/build/generated-sources/api/src/apis/InstallationApi.js +0 -235
- package/build/generated-sources/api/src/apis/IntegrationApi.d.ts +0 -128
- package/build/generated-sources/api/src/apis/IntegrationApi.js +0 -151
- package/build/generated-sources/api/src/apis/OAuthApi.d.ts +0 -76
- package/build/generated-sources/api/src/apis/OAuthApi.js +0 -102
- package/build/generated-sources/api/src/apis/OperationApi.d.ts +0 -106
- package/build/generated-sources/api/src/apis/OperationApi.js +0 -131
- package/build/generated-sources/api/src/apis/OperationEventApi.d.ts +0 -112
- package/build/generated-sources/api/src/apis/OperationEventApi.js +0 -140
- package/build/generated-sources/api/src/apis/OrgApi.d.ts +0 -226
- package/build/generated-sources/api/src/apis/OrgApi.js +0 -253
- package/build/generated-sources/api/src/apis/ProjectApi.d.ts +0 -144
- package/build/generated-sources/api/src/apis/ProjectApi.js +0 -170
- package/build/generated-sources/api/src/apis/ProviderApi.d.ts +0 -78
- package/build/generated-sources/api/src/apis/ProviderApi.js +0 -92
- package/build/generated-sources/api/src/apis/ProviderAppApi.d.ts +0 -130
- package/build/generated-sources/api/src/apis/ProviderAppApi.js +0 -158
- package/build/generated-sources/api/src/apis/RevisionApi.d.ts +0 -87
- package/build/generated-sources/api/src/apis/RevisionApi.js +0 -113
- package/build/generated-sources/api/src/apis/UploadURLApi.d.ts +0 -46
- package/build/generated-sources/api/src/apis/UploadURLApi.js +0 -68
- package/build/generated-sources/api/src/apis/UserApi.d.ts +0 -70
- package/build/generated-sources/api/src/apis/UserApi.js +0 -94
- package/build/generated-sources/api/src/apis/index.d.ts +0 -17
- package/build/generated-sources/api/src/apis/index.js +0 -35
- package/build/generated-sources/api/src/index.d.ts +0 -3
- package/build/generated-sources/api/src/index.js +0 -21
- package/build/generated-sources/api/src/models/AcceptInviteRequest.d.ts +0 -31
- package/build/generated-sources/api/src/models/AcceptInviteRequest.js +0 -50
- package/build/generated-sources/api/src/models/ApiKey.d.ts +0 -49
- package/build/generated-sources/api/src/models/ApiKey.js +0 -59
- package/build/generated-sources/api/src/models/ApiKeyOpts.d.ts +0 -63
- package/build/generated-sources/api/src/models/ApiKeyOpts.js +0 -66
- package/build/generated-sources/api/src/models/ApiKeyRequest.d.ts +0 -31
- package/build/generated-sources/api/src/models/ApiKeyRequest.js +0 -50
- package/build/generated-sources/api/src/models/ApiProblem.d.ts +0 -130
- package/build/generated-sources/api/src/models/ApiProblem.js +0 -82
- package/build/generated-sources/api/src/models/AuthType.d.ts +0 -25
- package/build/generated-sources/api/src/models/AuthType.js +0 -38
- package/build/generated-sources/api/src/models/BaseConfigContent.d.ts +0 -52
- package/build/generated-sources/api/src/models/BaseConfigContent.js +0 -59
- package/build/generated-sources/api/src/models/BaseProxyConfig.d.ts +0 -31
- package/build/generated-sources/api/src/models/BaseProxyConfig.js +0 -50
- package/build/generated-sources/api/src/models/BaseReadConfig.d.ts +0 -34
- package/build/generated-sources/api/src/models/BaseReadConfig.js +0 -51
- package/build/generated-sources/api/src/models/BaseReadConfigObject.d.ts +0 -65
- package/build/generated-sources/api/src/models/BaseReadConfigObject.js +0 -60
- package/build/generated-sources/api/src/models/BaseWriteConfig.d.ts +0 -34
- package/build/generated-sources/api/src/models/BaseWriteConfig.js +0 -51
- package/build/generated-sources/api/src/models/BaseWriteConfigObject.d.ts +0 -31
- package/build/generated-sources/api/src/models/BaseWriteConfigObject.js +0 -50
- package/build/generated-sources/api/src/models/BatchUpsertIntegrationsRequest.d.ts +0 -31
- package/build/generated-sources/api/src/models/BatchUpsertIntegrationsRequest.js +0 -50
- package/build/generated-sources/api/src/models/Builder.d.ts +0 -73
- package/build/generated-sources/api/src/models/Builder.js +0 -68
- package/build/generated-sources/api/src/models/BuilderInfo.d.ts +0 -48
- package/build/generated-sources/api/src/models/BuilderInfo.js +0 -59
- package/build/generated-sources/api/src/models/BuilderInfoOrgRole.d.ts +0 -58
- package/build/generated-sources/api/src/models/BuilderInfoOrgRole.js +0 -67
- package/build/generated-sources/api/src/models/BuilderInfoProjectRolesValue.d.ts +0 -58
- package/build/generated-sources/api/src/models/BuilderInfoProjectRolesValue.js +0 -67
- package/build/generated-sources/api/src/models/BulkWriteSupport.d.ts +0 -49
- package/build/generated-sources/api/src/models/BulkWriteSupport.js +0 -59
- package/build/generated-sources/api/src/models/Config.d.ts +0 -56
- package/build/generated-sources/api/src/models/Config.js +0 -63
- package/build/generated-sources/api/src/models/ConfigContent.d.ts +0 -50
- package/build/generated-sources/api/src/models/ConfigContent.js +0 -58
- package/build/generated-sources/api/src/models/ConfigContentAllOf.d.ts +0 -37
- package/build/generated-sources/api/src/models/ConfigContentAllOf.js +0 -52
- package/build/generated-sources/api/src/models/Connection.d.ts +0 -82
- package/build/generated-sources/api/src/models/Connection.js +0 -76
- package/build/generated-sources/api/src/models/Consumer.d.ts +0 -55
- package/build/generated-sources/api/src/models/Consumer.js +0 -62
- package/build/generated-sources/api/src/models/CreateConsumerRequest.d.ts +0 -37
- package/build/generated-sources/api/src/models/CreateConsumerRequest.js +0 -53
- package/build/generated-sources/api/src/models/CreateDestinationRequest.d.ts +0 -44
- package/build/generated-sources/api/src/models/CreateDestinationRequest.js +0 -57
- package/build/generated-sources/api/src/models/CreateDestinationRequestMetadata.d.ts +0 -39
- package/build/generated-sources/api/src/models/CreateDestinationRequestMetadata.js +0 -52
- package/build/generated-sources/api/src/models/CreateGroupRequest.d.ts +0 -37
- package/build/generated-sources/api/src/models/CreateGroupRequest.js +0 -53
- package/build/generated-sources/api/src/models/CreateInstallationRequest.d.ts +0 -44
- package/build/generated-sources/api/src/models/CreateInstallationRequest.js +0 -57
- package/build/generated-sources/api/src/models/CreateInstallationRequestConfig.d.ts +0 -44
- package/build/generated-sources/api/src/models/CreateInstallationRequestConfig.js +0 -56
- package/build/generated-sources/api/src/models/CreateIntegrationRequest.d.ts +0 -44
- package/build/generated-sources/api/src/models/CreateIntegrationRequest.js +0 -57
- package/build/generated-sources/api/src/models/CreateIntegrationRequestLatestRevision.d.ts +0 -31
- package/build/generated-sources/api/src/models/CreateIntegrationRequestLatestRevision.js +0 -50
- package/build/generated-sources/api/src/models/CreateOrgInviteRequest.d.ts +0 -31
- package/build/generated-sources/api/src/models/CreateOrgInviteRequest.js +0 -50
- package/build/generated-sources/api/src/models/CreateOrgRequest.d.ts +0 -31
- package/build/generated-sources/api/src/models/CreateOrgRequest.js +0 -50
- package/build/generated-sources/api/src/models/CreateProjectRequest.d.ts +0 -43
- package/build/generated-sources/api/src/models/CreateProjectRequest.js +0 -56
- package/build/generated-sources/api/src/models/CreateProviderAppRequest.d.ts +0 -55
- package/build/generated-sources/api/src/models/CreateProviderAppRequest.js +0 -61
- package/build/generated-sources/api/src/models/Destination.d.ts +0 -62
- package/build/generated-sources/api/src/models/Destination.js +0 -66
- package/build/generated-sources/api/src/models/Group.d.ts +0 -55
- package/build/generated-sources/api/src/models/Group.js +0 -62
- package/build/generated-sources/api/src/models/HydratedIntegration.d.ts +0 -64
- package/build/generated-sources/api/src/models/HydratedIntegration.js +0 -65
- package/build/generated-sources/api/src/models/HydratedIntegrationField.d.ts +0 -22
- package/build/generated-sources/api/src/models/HydratedIntegrationField.js +0 -45
- package/build/generated-sources/api/src/models/HydratedIntegrationFieldExistent.d.ts +0 -37
- package/build/generated-sources/api/src/models/HydratedIntegrationFieldExistent.js +0 -53
- package/build/generated-sources/api/src/models/HydratedIntegrationObject.d.ts +0 -75
- package/build/generated-sources/api/src/models/HydratedIntegrationObject.js +0 -70
- package/build/generated-sources/api/src/models/HydratedIntegrationProxy.d.ts +0 -31
- package/build/generated-sources/api/src/models/HydratedIntegrationProxy.js +0 -50
- package/build/generated-sources/api/src/models/HydratedIntegrationRead.d.ts +0 -32
- package/build/generated-sources/api/src/models/HydratedIntegrationRead.js +0 -51
- package/build/generated-sources/api/src/models/HydratedIntegrationWrite.d.ts +0 -32
- package/build/generated-sources/api/src/models/HydratedIntegrationWrite.js +0 -51
- package/build/generated-sources/api/src/models/HydratedIntegrationWriteObject.d.ts +0 -37
- package/build/generated-sources/api/src/models/HydratedIntegrationWriteObject.js +0 -53
- package/build/generated-sources/api/src/models/HydratedRevision.d.ts +0 -50
- package/build/generated-sources/api/src/models/HydratedRevision.js +0 -60
- package/build/generated-sources/api/src/models/ImportConnectionRequest.d.ts +0 -79
- package/build/generated-sources/api/src/models/ImportConnectionRequest.js +0 -72
- package/build/generated-sources/api/src/models/ImportInstallationRequest.d.ts +0 -45
- package/build/generated-sources/api/src/models/ImportInstallationRequest.js +0 -58
- package/build/generated-sources/api/src/models/ImportInstallationRequestConfig.d.ts +0 -38
- package/build/generated-sources/api/src/models/ImportInstallationRequestConfig.js +0 -54
- package/build/generated-sources/api/src/models/InputValidationIssue.d.ts +0 -89
- package/build/generated-sources/api/src/models/InputValidationIssue.js +0 -75
- package/build/generated-sources/api/src/models/InputValidationProblem.d.ts +0 -68
- package/build/generated-sources/api/src/models/InputValidationProblem.js +0 -63
- package/build/generated-sources/api/src/models/Installation.d.ts +0 -88
- package/build/generated-sources/api/src/models/Installation.js +0 -79
- package/build/generated-sources/api/src/models/Integration.d.ts +0 -68
- package/build/generated-sources/api/src/models/Integration.js +0 -69
- package/build/generated-sources/api/src/models/Integration1.d.ts +0 -64
- package/build/generated-sources/api/src/models/Integration1.js +0 -65
- package/build/generated-sources/api/src/models/IntegrationField.d.ts +0 -22
- package/build/generated-sources/api/src/models/IntegrationField.js +0 -45
- package/build/generated-sources/api/src/models/IntegrationFieldExistent.d.ts +0 -31
- package/build/generated-sources/api/src/models/IntegrationFieldExistent.js +0 -50
- package/build/generated-sources/api/src/models/IntegrationFieldMapping.d.ts +0 -49
- package/build/generated-sources/api/src/models/IntegrationFieldMapping.js +0 -57
- package/build/generated-sources/api/src/models/IntegrationObject.d.ts +0 -63
- package/build/generated-sources/api/src/models/IntegrationObject.js +0 -65
- package/build/generated-sources/api/src/models/IntegrationProxy.d.ts +0 -31
- package/build/generated-sources/api/src/models/IntegrationProxy.js +0 -50
- package/build/generated-sources/api/src/models/IntegrationRead.d.ts +0 -32
- package/build/generated-sources/api/src/models/IntegrationRead.js +0 -51
- package/build/generated-sources/api/src/models/IntegrationWrite.d.ts +0 -32
- package/build/generated-sources/api/src/models/IntegrationWrite.js +0 -51
- package/build/generated-sources/api/src/models/IntegrationWriteObject.d.ts +0 -31
- package/build/generated-sources/api/src/models/IntegrationWriteObject.js +0 -50
- package/build/generated-sources/api/src/models/Invite.d.ts +0 -84
- package/build/generated-sources/api/src/models/Invite.js +0 -83
- package/build/generated-sources/api/src/models/Log.d.ts +0 -44
- package/build/generated-sources/api/src/models/Log.js +0 -57
- package/build/generated-sources/api/src/models/LogMessage.d.ts +0 -43
- package/build/generated-sources/api/src/models/LogMessage.js +0 -55
- package/build/generated-sources/api/src/models/Oauth2Opts.d.ts +0 -77
- package/build/generated-sources/api/src/models/Oauth2Opts.js +0 -76
- package/build/generated-sources/api/src/models/OauthConnectRequest.d.ts +0 -73
- package/build/generated-sources/api/src/models/OauthConnectRequest.js +0 -68
- package/build/generated-sources/api/src/models/Operation.d.ts +0 -91
- package/build/generated-sources/api/src/models/Operation.js +0 -77
- package/build/generated-sources/api/src/models/OperationEvent.d.ts +0 -61
- package/build/generated-sources/api/src/models/OperationEvent.js +0 -64
- package/build/generated-sources/api/src/models/OptionalFieldsAutoOption.d.ts +0 -22
- package/build/generated-sources/api/src/models/OptionalFieldsAutoOption.js +0 -35
- package/build/generated-sources/api/src/models/Org.d.ts +0 -55
- package/build/generated-sources/api/src/models/Org.js +0 -62
- package/build/generated-sources/api/src/models/PatchApiKeyRequest.d.ts +0 -38
- package/build/generated-sources/api/src/models/PatchApiKeyRequest.js +0 -54
- package/build/generated-sources/api/src/models/PatchApiKeyRequestApiKey.d.ts +0 -37
- package/build/generated-sources/api/src/models/PatchApiKeyRequestApiKey.js +0 -52
- package/build/generated-sources/api/src/models/Problem.d.ts +0 -63
- package/build/generated-sources/api/src/models/Problem.js +0 -60
- package/build/generated-sources/api/src/models/Project.d.ts +0 -61
- package/build/generated-sources/api/src/models/Project.js +0 -64
- package/build/generated-sources/api/src/models/ProviderApp.d.ts +0 -73
- package/build/generated-sources/api/src/models/ProviderApp.js +0 -69
- package/build/generated-sources/api/src/models/ProviderInfo.d.ts +0 -85
- package/build/generated-sources/api/src/models/ProviderInfo.js +0 -75
- package/build/generated-sources/api/src/models/Revision.d.ts +0 -50
- package/build/generated-sources/api/src/models/Revision.js +0 -60
- package/build/generated-sources/api/src/models/SignedUrl.d.ts +0 -43
- package/build/generated-sources/api/src/models/SignedUrl.js +0 -56
- package/build/generated-sources/api/src/models/Support.d.ts +0 -56
- package/build/generated-sources/api/src/models/Support.js +0 -63
- package/build/generated-sources/api/src/models/TokenMetadataFields.d.ts +0 -43
- package/build/generated-sources/api/src/models/TokenMetadataFields.js +0 -54
- package/build/generated-sources/api/src/models/UpdateDestinationRequest.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateDestinationRequest.js +0 -54
- package/build/generated-sources/api/src/models/UpdateDestinationRequestDestination.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateDestinationRequestDestination.js +0 -53
- package/build/generated-sources/api/src/models/UpdateDestinationRequestDestinationMetadata.d.ts +0 -39
- package/build/generated-sources/api/src/models/UpdateDestinationRequestDestinationMetadata.js +0 -52
- package/build/generated-sources/api/src/models/UpdateInstallationConfigContent.d.ts +0 -52
- package/build/generated-sources/api/src/models/UpdateInstallationConfigContent.js +0 -59
- package/build/generated-sources/api/src/models/UpdateInstallationRequest.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateInstallationRequest.js +0 -54
- package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallation.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallation.js +0 -53
- package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallationConfig.d.ts +0 -44
- package/build/generated-sources/api/src/models/UpdateInstallationRequestInstallationConfig.js +0 -55
- package/build/generated-sources/api/src/models/UpdateOrgRequest.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateOrgRequest.js +0 -54
- package/build/generated-sources/api/src/models/UpdateOrgRequestOrg.d.ts +0 -31
- package/build/generated-sources/api/src/models/UpdateOrgRequestOrg.js +0 -50
- package/build/generated-sources/api/src/models/UpdateProjectRequest.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateProjectRequest.js +0 -54
- package/build/generated-sources/api/src/models/UpdateProjectRequestProject.d.ts +0 -37
- package/build/generated-sources/api/src/models/UpdateProjectRequestProject.js +0 -52
- package/build/generated-sources/api/src/models/UpdateProviderAppRequest.d.ts +0 -38
- package/build/generated-sources/api/src/models/UpdateProviderAppRequest.js +0 -54
- package/build/generated-sources/api/src/models/UpdateProviderAppRequestProviderApp.d.ts +0 -55
- package/build/generated-sources/api/src/models/UpdateProviderAppRequestProviderApp.js +0 -58
- package/build/generated-sources/api/src/models/index.d.ts +0 -94
- package/build/generated-sources/api/src/models/index.js +0 -112
- package/build/generated-sources/api/src/runtime.d.ts +0 -182
- package/build/generated-sources/api/src/runtime.js +0 -317
- package/build/src/assets/LoadingIcon.d.ts +0 -5
- package/build/src/assets/LoadingIcon.js +0 -9
- package/build/src/assets/NavIcon.d.ts +0 -2
- package/build/src/assets/NavIcon.js +0 -24
- package/build/src/assets/SuccessIcon.d.ts +0 -1
- package/build/src/assets/SuccessIcon.js +0 -8
- package/build/src/assets/TrashIcon.d.ts +0 -1
- package/build/src/assets/TrashIcon.js +0 -11
- package/build/src/components/Configure/InstallIntegration.d.ts +0 -12
- package/build/src/components/Configure/InstallIntegration.js +0 -27
- package/build/src/components/Configure/actions/mutateAndSetState/createInstallationAndSetState.d.ts +0 -15
- package/build/src/components/Configure/actions/mutateAndSetState/createInstallationAndSetState.js +0 -30
- package/build/src/components/Configure/actions/mutateAndSetState/updateInstallationAndSetState.d.ts +0 -15
- package/build/src/components/Configure/actions/mutateAndSetState/updateInstallationAndSetState.js +0 -33
- package/build/src/components/Configure/actions/proxy/isProxyEnabled.d.ts +0 -2
- package/build/src/components/Configure/actions/proxy/isProxyEnabled.js +0 -8
- package/build/src/components/Configure/actions/proxy/onCreateInstallationProxyOnly.d.ts +0 -8
- package/build/src/components/Configure/actions/proxy/onCreateInstallationProxyOnly.js +0 -44
- package/build/src/components/Configure/actions/read/onSaveReadCreateInstallation.d.ts +0 -3
- package/build/src/components/Configure/actions/read/onSaveReadCreateInstallation.js +0 -84
- package/build/src/components/Configure/actions/read/onSaveReadUpdateInstallation.d.ts +0 -3
- package/build/src/components/Configure/actions/read/onSaveReadUpdateInstallation.js +0 -71
- package/build/src/components/Configure/actions/write/generateConfigWriteObjects.d.ts +0 -26
- package/build/src/components/Configure/actions/write/generateConfigWriteObjects.js +0 -41
- package/build/src/components/Configure/actions/write/onSaveWriteCreateInstallation.d.ts +0 -3
- package/build/src/components/Configure/actions/write/onSaveWriteCreateInstallation.js +0 -79
- package/build/src/components/Configure/actions/write/onSaveWriteUpdateInstallation.d.ts +0 -3
- package/build/src/components/Configure/actions/write/onSaveWriteUpdateInstallation.js +0 -68
- package/build/src/components/Configure/content/ConfigureInstallationBase.d.ts +0 -9
- package/build/src/components/Configure/content/ConfigureInstallationBase.js +0 -36
- package/build/src/components/Configure/content/CreateInstallation.d.ts +0 -1
- package/build/src/components/Configure/content/CreateInstallation.js +0 -83
- package/build/src/components/Configure/content/InstallationContent.d.ts +0 -1
- package/build/src/components/Configure/content/InstallationContent.js +0 -20
- package/build/src/components/Configure/content/UninstallContent.d.ts +0 -1
- package/build/src/components/Configure/content/UninstallContent.js +0 -45
- package/build/src/components/Configure/content/UpdateInstallation.d.ts +0 -7
- package/build/src/components/Configure/content/UpdateInstallation.js +0 -90
- package/build/src/components/Configure/content/fields/FieldHeader.d.ts +0 -5
- package/build/src/components/Configure/content/fields/FieldHeader.js +0 -9
- package/build/src/components/Configure/content/fields/FieldMappings/FieldMapping.d.ts +0 -9
- package/build/src/components/Configure/content/fields/FieldMappings/FieldMapping.js +0 -26
- package/build/src/components/Configure/content/fields/FieldMappings/RequiredFieldMappings.d.ts +0 -1
- package/build/src/components/Configure/content/fields/FieldMappings/RequiredFieldMappings.js +0 -39
- package/build/src/components/Configure/content/fields/FieldMappings/index.d.ts +0 -3
- package/build/src/components/Configure/content/fields/FieldMappings/index.js +0 -7
- package/build/src/components/Configure/content/fields/FieldMappings/setFieldMapping.d.ts +0 -3
- package/build/src/components/Configure/content/fields/FieldMappings/setFieldMapping.js +0 -21
- package/build/src/components/Configure/content/fields/OptionalFields/OptionalFields.d.ts +0 -1
- package/build/src/components/Configure/content/fields/OptionalFields/OptionalFields.js +0 -41
- package/build/src/components/Configure/content/fields/OptionalFields/index.d.ts +0 -2
- package/build/src/components/Configure/content/fields/OptionalFields/index.js +0 -5
- package/build/src/components/Configure/content/fields/OptionalFields/setOptionalField.d.ts +0 -3
- package/build/src/components/Configure/content/fields/OptionalFields/setOptionalField.js +0 -27
- package/build/src/components/Configure/content/fields/ReadFields.d.ts +0 -1
- package/build/src/components/Configure/content/fields/ReadFields.js +0 -11
- package/build/src/components/Configure/content/fields/RequiredFields.d.ts +0 -1
- package/build/src/components/Configure/content/fields/RequiredFields.js +0 -23
- package/build/src/components/Configure/content/fields/WriteFields/WriteFields.d.ts +0 -1
- package/build/src/components/Configure/content/fields/WriteFields/WriteFields.js +0 -34
- package/build/src/components/Configure/content/fields/WriteFields/index.d.ts +0 -2
- package/build/src/components/Configure/content/fields/WriteFields/index.js +0 -5
- package/build/src/components/Configure/content/fields/WriteFields/setNonConfigurableWriteField.d.ts +0 -3
- package/build/src/components/Configure/content/fields/WriteFields/setNonConfigurableWriteField.js +0 -32
- package/build/src/components/Configure/content/useMutateInstallation.d.ts +0 -23
- package/build/src/components/Configure/content/useMutateInstallation.js +0 -47
- package/build/src/components/Configure/content/useSelectedConfigureState.d.ts +0 -72
- package/build/src/components/Configure/content/useSelectedConfigureState.js +0 -24
- package/build/src/components/Configure/index.d.ts +0 -1
- package/build/src/components/Configure/index.js +0 -5
- package/build/src/components/Configure/layout/ConditionalProxyLayout/ConditionalProxyLayout.d.ts +0 -11
- package/build/src/components/Configure/layout/ConditionalProxyLayout/ConditionalProxyLayout.js +0 -68
- package/build/src/components/Configure/layout/ConditionalProxyLayout/InstalledSuccessBox.d.ts +0 -5
- package/build/src/components/Configure/layout/ConditionalProxyLayout/InstalledSuccessBox.js +0 -11
- package/build/src/components/Configure/layout/ProtectedConnectionLayout.d.ts +0 -12
- package/build/src/components/Configure/layout/ProtectedConnectionLayout.js +0 -29
- package/build/src/components/Configure/nav/ObjectManagementNav/NavObjectItem.d.ts +0 -9
- package/build/src/components/Configure/nav/ObjectManagementNav/NavObjectItem.js +0 -14
- package/build/src/components/Configure/nav/ObjectManagementNav/OtherTab.d.ts +0 -7
- package/build/src/components/Configure/nav/ObjectManagementNav/OtherTab.js +0 -11
- package/build/src/components/Configure/nav/ObjectManagementNav/UninstallInstallation.d.ts +0 -7
- package/build/src/components/Configure/nav/ObjectManagementNav/UninstallInstallation.js +0 -15
- package/build/src/components/Configure/nav/ObjectManagementNav/constant.d.ts +0 -1
- package/build/src/components/Configure/nav/ObjectManagementNav/constant.js +0 -4
- package/build/src/components/Configure/nav/ObjectManagementNav/index.d.ts +0 -10
- package/build/src/components/Configure/nav/ObjectManagementNav/index.js +0 -61
- package/build/src/components/Configure/state/ConfigurationStateProvider.d.ts +0 -87
- package/build/src/components/Configure/state/ConfigurationStateProvider.js +0 -98
- package/build/src/components/Configure/state/HydratedRevisionContext.d.ts +0 -14
- package/build/src/components/Configure/state/HydratedRevisionContext.js +0 -81
- package/build/src/components/Configure/state/utils.d.ts +0 -22
- package/build/src/components/Configure/state/utils.js +0 -137
- package/build/src/components/Configure/types.d.ts +0 -44
- package/build/src/components/Configure/types.js +0 -2
- package/build/src/components/Configure/utils.d.ts +0 -34
- package/build/src/components/Configure/utils.js +0 -110
- package/build/src/components/Connect/ConnectProvider.d.ts +0 -11
- package/build/src/components/Connect/ConnectProvider.js +0 -12
- package/build/src/components/Connect/ConnectedSuccessBox.d.ts +0 -5
- package/build/src/components/Connect/ConnectedSuccessBox.js +0 -13
- package/build/src/components/Connect/useConnectionHandler.d.ts +0 -10
- package/build/src/components/Connect/useConnectionHandler.js +0 -24
- package/build/src/components/ErrorTextBox.d.ts +0 -5
- package/build/src/components/ErrorTextBox.js +0 -11
- package/build/src/components/Oauth/NoWorkspaceEntry/LandingContent.d.ts +0 -8
- package/build/src/components/Oauth/NoWorkspaceEntry/LandingContent.js +0 -12
- package/build/src/components/Oauth/NoWorkspaceEntry/NoWorkspaceOauthFlow.d.ts +0 -16
- package/build/src/components/Oauth/NoWorkspaceEntry/NoWorkspaceOauthFlow.js +0 -43
- package/build/src/components/Oauth/OAuthErrorAlert.d.ts +0 -5
- package/build/src/components/Oauth/OAuthErrorAlert.js +0 -12
- package/build/src/components/Oauth/OAuthWindow/OAuthWindow.d.ts +0 -14
- package/build/src/components/Oauth/OAuthWindow/OAuthWindow.js +0 -65
- package/build/src/components/Oauth/OAuthWindow/windowHelpers.d.ts +0 -24
- package/build/src/components/Oauth/OAuthWindow/windowHelpers.js +0 -77
- package/build/src/components/Oauth/OauthCardLayout.d.ts +0 -6
- package/build/src/components/Oauth/OauthCardLayout.js +0 -9
- package/build/src/components/Oauth/OauthFlow/OauthFlow.d.ts +0 -9
- package/build/src/components/Oauth/OauthFlow/OauthFlow.js +0 -33
- package/build/src/components/Oauth/Salesforce/SalesforceSubdomainEntry.d.ts +0 -13
- package/build/src/components/Oauth/Salesforce/SalesforceSubdomainEntry.js +0 -18
- package/build/src/components/Oauth/WorkspaceEntry/WorkspaceEntry.d.ts +0 -9
- package/build/src/components/Oauth/WorkspaceEntry/WorkspaceEntry.js +0 -12
- package/build/src/components/Oauth/WorkspaceEntry/WorkspaceOauthFlow.d.ts +0 -14
- package/build/src/components/Oauth/WorkspaceEntry/WorkspaceOauthFlow.js +0 -53
- package/build/src/components/Oauth/fetchOAuthPopupURL.d.ts +0 -1
- package/build/src/components/Oauth/fetchOAuthPopupURL.js +0 -29
- package/build/src/components/RedirectHandler/RedirectHandler.d.ts +0 -15
- package/build/src/components/RedirectHandler/RedirectHandler.js +0 -31
- package/build/src/components/RedirectHandler/index.d.ts +0 -1
- package/build/src/components/RedirectHandler/index.js +0 -5
- package/build/src/components/SuccessTextBox.d.ts +0 -5
- package/build/src/components/SuccessTextBox.js +0 -10
- package/build/src/components/ThemeProvider/Button/buttonTheme.d.ts +0 -13
- package/build/src/components/ThemeProvider/Button/buttonTheme.js +0 -17
- package/build/src/components/ThemeProvider/Button/index.d.ts +0 -2
- package/build/src/components/ThemeProvider/Button/index.js +0 -5
- package/build/src/components/ThemeProvider/index.d.ts +0 -6
- package/build/src/components/ThemeProvider/index.js +0 -58
- package/build/src/context/AmpersandContextProvider/AmpersandContextProvider.d.ts +0 -19
- package/build/src/context/AmpersandContextProvider/AmpersandContextProvider.js +0 -31
- package/build/src/context/AmpersandContextProvider/index.d.ts +0 -1
- package/build/src/context/AmpersandContextProvider/index.js +0 -17
- package/build/src/context/ApiKeyContextProvider.d.ts +0 -4
- package/build/src/context/ApiKeyContextProvider.js +0 -14
- package/build/src/context/ConnectionsContextProvider.d.ts +0 -17
- package/build/src/context/ConnectionsContextProvider.js +0 -66
- package/build/src/context/ErrorContextProvider.d.ts +0 -37
- package/build/src/context/ErrorContextProvider.js +0 -72
- package/build/src/context/InstallIntegrationContextProvider.d.ts +0 -30
- package/build/src/context/InstallIntegrationContextProvider.js +0 -110
- package/build/src/context/IntegrationListContextProvider.d.ts +0 -13
- package/build/src/context/IntegrationListContextProvider.js +0 -48
- package/build/src/context/ProjectContextProvider.d.ts +0 -15
- package/build/src/context/ProjectContextProvider.js +0 -50
- package/build/src/hooks/index.d.ts +0 -1
- package/build/src/hooks/index.js +0 -17
- package/build/src/hooks/useIsIntegrationInstalled.d.ts +0 -6
- package/build/src/hooks/useIsIntegrationInstalled.js +0 -48
- package/build/src/index.d.ts +0 -1
- package/build/src/index.js +0 -17
- package/build/src/public/index.d.ts +0 -7
- package/build/src/public/index.js +0 -23
- package/build/src/services/ApiService.d.ts +0 -25
- package/build/src/services/ApiService.js +0 -32
- package/build/src/services/api.d.ts +0 -10
- package/build/src/services/api.js +0 -76
- package/build/src/services/version.d.ts +0 -1
- package/build/src/services/version.js +0 -4
- package/build/src/utils/index.d.ts +0 -10
- package/build/src/utils/index.js +0 -21
package/build/src/components/Configure/actions/mutateAndSetState/updateInstallationAndSetState.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Config, Installation, UpdateInstallationRequestInstallationConfig } from '../../../../services/api';
|
|
2
|
-
type UpdateInstallationSharedProps = {
|
|
3
|
-
projectId: string;
|
|
4
|
-
integrationId: string;
|
|
5
|
-
installationId: string;
|
|
6
|
-
apiKey: string;
|
|
7
|
-
selectedObjectName: string;
|
|
8
|
-
setInstallation: (installationObj: Installation) => void;
|
|
9
|
-
onUpdateSuccess?: (installationId: string, config: Config) => void;
|
|
10
|
-
};
|
|
11
|
-
type UpdateInstallationAndSetStateProps = UpdateInstallationSharedProps & {
|
|
12
|
-
updateConfig: UpdateInstallationRequestInstallationConfig;
|
|
13
|
-
};
|
|
14
|
-
export declare function updateInstallationAndSetState({ updateConfig, projectId, integrationId, installationId, apiKey, selectedObjectName, setInstallation, onUpdateSuccess, }: UpdateInstallationAndSetStateProps): Promise<void>;
|
|
15
|
-
export {};
|
package/build/src/components/Configure/actions/mutateAndSetState/updateInstallationAndSetState.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateInstallationAndSetState = void 0;
|
|
4
|
-
const api_1 = require("../../../../services/api");
|
|
5
|
-
function updateInstallationAndSetState({ updateConfig, projectId, integrationId, installationId, apiKey, selectedObjectName, setInstallation, onUpdateSuccess, }) {
|
|
6
|
-
const updateInstallationRequest = {
|
|
7
|
-
projectId,
|
|
8
|
-
installationId,
|
|
9
|
-
integrationId,
|
|
10
|
-
installationUpdate: {
|
|
11
|
-
// update mask will recurse to the object path and replace the object at the object path
|
|
12
|
-
// this example will replace the object at the object (i.e. accounts)
|
|
13
|
-
updateMask: [`config.content.read.objects.${selectedObjectName}`],
|
|
14
|
-
installation: {
|
|
15
|
-
config: updateConfig,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
// call api.updateInstallation
|
|
20
|
-
return (0, api_1.api)().installationApi.updateInstallation(updateInstallationRequest, {
|
|
21
|
-
headers: {
|
|
22
|
-
'X-Api-Key': apiKey,
|
|
23
|
-
'Content-Type': 'application/json',
|
|
24
|
-
},
|
|
25
|
-
}).then((installation) => {
|
|
26
|
-
// update local installation state
|
|
27
|
-
setInstallation(installation);
|
|
28
|
-
onUpdateSuccess === null || onUpdateSuccess === void 0 ? void 0 : onUpdateSuccess(installation.id, installation.config);
|
|
29
|
-
}).catch((err) => {
|
|
30
|
-
console.error('ERROR: ', err);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
exports.updateInstallationAndSetState = updateInstallationAndSetState;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getIsProxyEnabled = void 0;
|
|
4
|
-
function getIsProxyEnabled(hydratedRevision) {
|
|
5
|
-
var _a;
|
|
6
|
-
return (_a = hydratedRevision.content.proxy) === null || _a === void 0 ? void 0 : _a.enabled;
|
|
7
|
-
}
|
|
8
|
-
exports.getIsProxyEnabled = getIsProxyEnabled;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HydratedRevision } from '../../../../services/api';
|
|
2
|
-
import { CreateInstallationSharedProps } from '../mutateAndSetState/createInstallationAndSetState';
|
|
3
|
-
type CreateInstallationProxyOnlyProps = CreateInstallationSharedProps & {
|
|
4
|
-
hydratedRevision: HydratedRevision;
|
|
5
|
-
consumerRef: string;
|
|
6
|
-
};
|
|
7
|
-
export declare function onCreateInstallationProxyOnly({ projectId, integrationId, groupRef, consumerRef, connectionId, apiKey, hydratedRevision, setInstallation, onInstallSuccess, }: CreateInstallationProxyOnlyProps): Promise<void> | Promise<null>;
|
|
8
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.onCreateInstallationProxyOnly = void 0;
|
|
4
|
-
const createInstallationAndSetState_1 = require("../mutateAndSetState/createInstallationAndSetState");
|
|
5
|
-
/**
|
|
6
|
-
* given a hydratedRevision and consumerRef,
|
|
7
|
-
* generate the config object that is need for create installation request with proxy only.
|
|
8
|
-
*
|
|
9
|
-
* @param hydratedRevision
|
|
10
|
-
* @param consumerRef
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
const generateProxyOnlyConfig = (hydratedRevision, consumerRef) => {
|
|
14
|
-
// create config request object
|
|
15
|
-
const createConfigObj = {
|
|
16
|
-
revisionId: hydratedRevision.id,
|
|
17
|
-
createdBy: `consumer:${consumerRef}`,
|
|
18
|
-
content: {
|
|
19
|
-
provider: hydratedRevision.content.provider,
|
|
20
|
-
proxy: {
|
|
21
|
-
enabled: true,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
return createConfigObj;
|
|
26
|
-
};
|
|
27
|
-
function onCreateInstallationProxyOnly({ projectId, integrationId, groupRef, consumerRef, connectionId, apiKey, hydratedRevision, setInstallation, onInstallSuccess, }) {
|
|
28
|
-
const createConfig = generateProxyOnlyConfig(hydratedRevision, consumerRef);
|
|
29
|
-
if (!createConfig) {
|
|
30
|
-
console.error('Error when generating createConfig from configureState');
|
|
31
|
-
return Promise.resolve(null);
|
|
32
|
-
}
|
|
33
|
-
return (0, createInstallationAndSetState_1.createInstallationAndSetState)({
|
|
34
|
-
createConfig,
|
|
35
|
-
projectId,
|
|
36
|
-
integrationId,
|
|
37
|
-
groupRef,
|
|
38
|
-
connectionId,
|
|
39
|
-
apiKey,
|
|
40
|
-
setInstallation,
|
|
41
|
-
onInstallSuccess,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
exports.onCreateInstallationProxyOnly = onCreateInstallationProxyOnly;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Config, HydratedRevision, Installation } from '../../../../services/api';
|
|
2
|
-
import { ConfigureState } from '../../types';
|
|
3
|
-
export declare const onSaveReadCreateInstallation: (projectId: string, integrationId: string, groupRef: string, consumerRef: string, connectionId: string, objectName: string, apiKey: string, hydratedRevision: HydratedRevision, configureState: ConfigureState, setInstallation: (installationObj: Installation) => void, onInstallSuccess?: ((installationId: string, config: Config) => void) | undefined) => Promise<void | null>;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.onSaveReadCreateInstallation = void 0;
|
|
4
|
-
const utils_1 = require("../../state/utils");
|
|
5
|
-
const createInstallationAndSetState_1 = require("../mutateAndSetState/createInstallationAndSetState");
|
|
6
|
-
const isProxyEnabled_1 = require("../proxy/isProxyEnabled");
|
|
7
|
-
/**
|
|
8
|
-
* gets matching object from hydratedRevision
|
|
9
|
-
* @param hydratedRevision
|
|
10
|
-
* @param objectName
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
const getObjectFromHydratedRevision = (hydratedRevision, objectName) => {
|
|
14
|
-
const readAction = hydratedRevision.content.read;
|
|
15
|
-
const objects = readAction === null || readAction === void 0 ? void 0 : readAction.objects;
|
|
16
|
-
return objects === null || objects === void 0 ? void 0 : objects.find((obj) => obj.objectName === objectName);
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* given a configureState, objectName, hyrdatedRevision, and consumerRef
|
|
20
|
-
* generate the config object that is need for update installation request.
|
|
21
|
-
*
|
|
22
|
-
* 1. get required fields from configureState
|
|
23
|
-
* 2. get optional fields from configureState
|
|
24
|
-
* 3. merge required fields and optional fields into selectedFields
|
|
25
|
-
* 4. get required custom map fields from configureState
|
|
26
|
-
* 5. generate create config object
|
|
27
|
-
* @param configureState
|
|
28
|
-
* @param objectName
|
|
29
|
-
* @param hydratedRevision
|
|
30
|
-
* @param consumerRef
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
const generateCreateReadConfigFromConfigureState = (configureState, objectName, hydratedRevision, consumerRef) => {
|
|
34
|
-
const selectedFields = (0, utils_1.generateSelectedFieldsFromConfigureState)(configureState);
|
|
35
|
-
const selectedFieldMappings = (0, utils_1.generateSelectedFieldMappingsFromConfigureState)(configureState);
|
|
36
|
-
const obj = getObjectFromHydratedRevision(hydratedRevision, objectName);
|
|
37
|
-
if (!obj) {
|
|
38
|
-
console.error(`Error when getting object from hydratedRevision for objectName: ${objectName}`);
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
// create config request object
|
|
42
|
-
const createConfigObj = {
|
|
43
|
-
revisionId: hydratedRevision.id,
|
|
44
|
-
createdBy: `consumer:${consumerRef}`,
|
|
45
|
-
content: {
|
|
46
|
-
provider: hydratedRevision.content.provider,
|
|
47
|
-
read: {
|
|
48
|
-
objects: {
|
|
49
|
-
[objectName]: {
|
|
50
|
-
objectName,
|
|
51
|
-
schedule: obj.schedule,
|
|
52
|
-
destination: obj.destination,
|
|
53
|
-
selectedFields,
|
|
54
|
-
selectedFieldMappings,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
// insert proxy into config if it is enabled
|
|
61
|
-
const isProxyEnabled = (0, isProxyEnabled_1.getIsProxyEnabled)(hydratedRevision);
|
|
62
|
-
if (isProxyEnabled) {
|
|
63
|
-
createConfigObj.content.proxy = { enabled: true };
|
|
64
|
-
}
|
|
65
|
-
return createConfigObj;
|
|
66
|
-
};
|
|
67
|
-
const onSaveReadCreateInstallation = (projectId, integrationId, groupRef, consumerRef, connectionId, objectName, apiKey, hydratedRevision, configureState, setInstallation, onInstallSuccess) => {
|
|
68
|
-
const createConfig = generateCreateReadConfigFromConfigureState(configureState, objectName, hydratedRevision, consumerRef);
|
|
69
|
-
if (!createConfig) {
|
|
70
|
-
console.error('Error when generating createConfig from configureState');
|
|
71
|
-
return Promise.resolve(null);
|
|
72
|
-
}
|
|
73
|
-
return (0, createInstallationAndSetState_1.createInstallationAndSetState)({
|
|
74
|
-
createConfig,
|
|
75
|
-
projectId,
|
|
76
|
-
integrationId,
|
|
77
|
-
groupRef,
|
|
78
|
-
connectionId,
|
|
79
|
-
apiKey,
|
|
80
|
-
setInstallation,
|
|
81
|
-
onInstallSuccess,
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
exports.onSaveReadCreateInstallation = onSaveReadCreateInstallation;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Config, HydratedIntegrationObject, HydratedRevision, Installation } from '../../../../services/api';
|
|
2
|
-
import { ConfigureState } from '../../types';
|
|
3
|
-
export declare const onSaveReadUpdateInstallation: (projectId: string, integrationId: string, installationId: string, selectedObjectName: string, apiKey: string, configureState: ConfigureState, setInstallation: (installationObj: Installation) => void, hydratedObject: HydratedIntegrationObject, hydratedRevision: HydratedRevision, onUpdateSuccess?: ((installationId: string, config: Config) => void) | undefined) => Promise<void | null>;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.onSaveReadUpdateInstallation = void 0;
|
|
4
|
-
const utils_1 = require("../../state/utils");
|
|
5
|
-
const updateInstallationAndSetState_1 = require("../mutateAndSetState/updateInstallationAndSetState");
|
|
6
|
-
const isProxyEnabled_1 = require("../proxy/isProxyEnabled");
|
|
7
|
-
/**
|
|
8
|
-
* given a configureState, config, and objectName, generate the config object that is need for
|
|
9
|
-
* update installation request.
|
|
10
|
-
*
|
|
11
|
-
* 1. get required fields from configureState
|
|
12
|
-
* 2. get optional fields from configureState
|
|
13
|
-
* 3. merge required fields and optional fields into selectedFields
|
|
14
|
-
* 4. get required custom map fields from configureState
|
|
15
|
-
* 5. generate modified config object based on update mask
|
|
16
|
-
* @param configureState
|
|
17
|
-
* @param config
|
|
18
|
-
* @param objectName
|
|
19
|
-
* @param hydratedObject
|
|
20
|
-
* @param schedule
|
|
21
|
-
* @returns
|
|
22
|
-
*/
|
|
23
|
-
const generateUpdateReadConfigFromConfigureState = (configureState, objectName, hydratedObject, schedule, hydratedRevision) => {
|
|
24
|
-
const selectedFields = (0, utils_1.generateSelectedFieldsFromConfigureState)(configureState);
|
|
25
|
-
const selectedFieldMappings = (0, utils_1.generateSelectedFieldMappingsFromConfigureState)(configureState);
|
|
26
|
-
// config request object type needs to be fixed
|
|
27
|
-
const updateConfigObject = {
|
|
28
|
-
content: {
|
|
29
|
-
read: {
|
|
30
|
-
objects: {
|
|
31
|
-
[objectName]: {
|
|
32
|
-
objectName,
|
|
33
|
-
// these two fields are copied from previous config, otherwise they will override null
|
|
34
|
-
schedule,
|
|
35
|
-
destination: (hydratedObject === null || hydratedObject === void 0 ? void 0 : hydratedObject.destination) || '',
|
|
36
|
-
selectedFields,
|
|
37
|
-
selectedFieldMappings,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
// insert proxy into config if it is enabled
|
|
44
|
-
const isProxyEnabled = (0, isProxyEnabled_1.getIsProxyEnabled)(hydratedRevision);
|
|
45
|
-
if (isProxyEnabled) {
|
|
46
|
-
if (!updateConfigObject.content)
|
|
47
|
-
updateConfigObject.content = {};
|
|
48
|
-
updateConfigObject.content.proxy = { enabled: true };
|
|
49
|
-
}
|
|
50
|
-
return updateConfigObject;
|
|
51
|
-
};
|
|
52
|
-
const onSaveReadUpdateInstallation = (projectId, integrationId, installationId, selectedObjectName, apiKey, configureState, setInstallation, hydratedObject, hydratedRevision, onUpdateSuccess) => {
|
|
53
|
-
// get configuration state
|
|
54
|
-
// transform configuration state to update shape
|
|
55
|
-
const updateConfig = generateUpdateReadConfigFromConfigureState(configureState, selectedObjectName || '', hydratedObject, hydratedObject.schedule, hydratedRevision);
|
|
56
|
-
if (!updateConfig) {
|
|
57
|
-
console.error('Error when generating updateConfig from configureState');
|
|
58
|
-
return Promise.resolve(null);
|
|
59
|
-
}
|
|
60
|
-
return (0, updateInstallationAndSetState_1.updateInstallationAndSetState)({
|
|
61
|
-
updateConfig,
|
|
62
|
-
projectId,
|
|
63
|
-
integrationId,
|
|
64
|
-
installationId,
|
|
65
|
-
apiKey,
|
|
66
|
-
selectedObjectName,
|
|
67
|
-
setInstallation,
|
|
68
|
-
onUpdateSuccess,
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
exports.onSaveReadUpdateInstallation = onSaveReadUpdateInstallation;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ConfigureState } from '../../types';
|
|
2
|
-
type WriteObject = {
|
|
3
|
-
objectName: string;
|
|
4
|
-
};
|
|
5
|
-
type WriteObjects = {
|
|
6
|
-
[objectName: string]: WriteObject;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* example type
|
|
10
|
-
* "objects":
|
|
11
|
-
* {
|
|
12
|
-
objects: {
|
|
13
|
-
account: {
|
|
14
|
-
objectName: 'account',
|
|
15
|
-
},
|
|
16
|
-
contact: {
|
|
17
|
-
objectName: 'contact',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
}
|
|
21
|
-
* @param writeObjects
|
|
22
|
-
* @param configureState
|
|
23
|
-
* @returns
|
|
24
|
-
*/
|
|
25
|
-
export declare const generateConfigWriteObjects: (configureState: ConfigureState) => WriteObjects;
|
|
26
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateConfigWriteObjects = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* example type
|
|
6
|
-
* "objects":
|
|
7
|
-
* {
|
|
8
|
-
objects: {
|
|
9
|
-
account: {
|
|
10
|
-
objectName: 'account',
|
|
11
|
-
},
|
|
12
|
-
contact: {
|
|
13
|
-
objectName: 'contact',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
}
|
|
17
|
-
* @param writeObjects
|
|
18
|
-
* @param configureState
|
|
19
|
-
* @returns
|
|
20
|
-
*/
|
|
21
|
-
const generateConfigWriteObjects = (configureState) => {
|
|
22
|
-
var _a, _b;
|
|
23
|
-
const configWriteObjects = {}; // `any` is listed type in generated SDK
|
|
24
|
-
const configStateWriteObjects = (_a = configureState.write) === null || _a === void 0 ? void 0 : _a.writeObjects;
|
|
25
|
-
const selected = (_b = configureState.write) === null || _b === void 0 ? void 0 : _b.selectedNonConfigurableWriteFields;
|
|
26
|
-
const selectedKeys = selected ? Object.keys(selected) : [];
|
|
27
|
-
if (configStateWriteObjects) {
|
|
28
|
-
configStateWriteObjects.forEach((configStateWriteObject) => {
|
|
29
|
-
const obj = configStateWriteObject.objectName;
|
|
30
|
-
// object exists in config form
|
|
31
|
-
if (selectedKeys.includes(obj)) {
|
|
32
|
-
// insert objectName into configWriteObjects
|
|
33
|
-
configWriteObjects[obj] = {
|
|
34
|
-
objectName: obj,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
return configWriteObjects;
|
|
40
|
-
};
|
|
41
|
-
exports.generateConfigWriteObjects = generateConfigWriteObjects;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Config, HydratedRevision, Installation } from '../../../../services/api';
|
|
2
|
-
import { ConfigureState } from '../../types';
|
|
3
|
-
export declare const onSaveWriteCreateInstallation: (projectId: string, integrationId: string, groupRef: string, consumerRef: string, connectionId: string, apiKey: string, hydratedRevision: HydratedRevision, configureState: ConfigureState, setInstallation: (installationObj: Installation) => void, onInstallSuccess?: ((installationId: string, config: Config) => void) | undefined) => Promise<void | null>;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.onSaveWriteCreateInstallation = void 0;
|
|
4
|
-
const createInstallationAndSetState_1 = require("../mutateAndSetState/createInstallationAndSetState");
|
|
5
|
-
const isProxyEnabled_1 = require("../proxy/isProxyEnabled");
|
|
6
|
-
const generateConfigWriteObjects_1 = require("./generateConfigWriteObjects");
|
|
7
|
-
/**
|
|
8
|
-
* gets write objects from hydratedRevision
|
|
9
|
-
* @param hydratedRevision
|
|
10
|
-
* @param objectName
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
const getWriteObjectsFromHydratedRevision = (hydratedRevision) => {
|
|
14
|
-
const writeAction = hydratedRevision.content.write;
|
|
15
|
-
return writeAction === null || writeAction === void 0 ? void 0 : writeAction.objects;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* given a configureState, objectName, hyrdatedRevision, and consumerRef
|
|
19
|
-
* generate the config object that is need for update installation request.
|
|
20
|
-
*
|
|
21
|
-
* 1. get required fields from configureState
|
|
22
|
-
* 2. get optional fields from configureState
|
|
23
|
-
* 3. merge required fields and optional fields into selectedFields
|
|
24
|
-
* 4. get required custom map fields from configureState
|
|
25
|
-
* 5. generate create config object
|
|
26
|
-
* @param configureState
|
|
27
|
-
* @param objectName
|
|
28
|
-
* @param hydratedRevision
|
|
29
|
-
* @param consumerRef
|
|
30
|
-
* @returns
|
|
31
|
-
*/
|
|
32
|
-
const generateCreateWriteConfigFromConfigureState = (configureState, hydratedRevision, consumerRef) => {
|
|
33
|
-
const writeObjects = getWriteObjectsFromHydratedRevision(hydratedRevision);
|
|
34
|
-
if (!writeObjects) {
|
|
35
|
-
console.error('Error when getting write objects from hydratedRevision');
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
const configWriteObjects = (0, generateConfigWriteObjects_1.generateConfigWriteObjects)(configureState);
|
|
39
|
-
// create config request object
|
|
40
|
-
const createConfigObj = {
|
|
41
|
-
revisionId: hydratedRevision.id,
|
|
42
|
-
createdBy: `consumer:${consumerRef}`,
|
|
43
|
-
content: {
|
|
44
|
-
provider: hydratedRevision.content.provider,
|
|
45
|
-
// hack: need empty read.objects to be initialized for update read
|
|
46
|
-
// https://linear.app/ampersand/issue/ENG-780/bug-write-createupdate-installation-without-read
|
|
47
|
-
read: {
|
|
48
|
-
objects: {},
|
|
49
|
-
},
|
|
50
|
-
write: {
|
|
51
|
-
objects: configWriteObjects,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
// insert proxy into config if it is enabled
|
|
56
|
-
const isProxyEnabled = (0, isProxyEnabled_1.getIsProxyEnabled)(hydratedRevision);
|
|
57
|
-
if (isProxyEnabled) {
|
|
58
|
-
createConfigObj.content.proxy = { enabled: true };
|
|
59
|
-
}
|
|
60
|
-
return createConfigObj;
|
|
61
|
-
};
|
|
62
|
-
const onSaveWriteCreateInstallation = (projectId, integrationId, groupRef, consumerRef, connectionId, apiKey, hydratedRevision, configureState, setInstallation, onInstallSuccess) => {
|
|
63
|
-
const createConfig = generateCreateWriteConfigFromConfigureState(configureState, hydratedRevision, consumerRef);
|
|
64
|
-
if (!createConfig) {
|
|
65
|
-
console.error('Error when generating createConfig from configureState');
|
|
66
|
-
return Promise.resolve(null);
|
|
67
|
-
}
|
|
68
|
-
return (0, createInstallationAndSetState_1.createInstallationAndSetState)({
|
|
69
|
-
createConfig,
|
|
70
|
-
projectId,
|
|
71
|
-
integrationId,
|
|
72
|
-
groupRef,
|
|
73
|
-
connectionId,
|
|
74
|
-
apiKey,
|
|
75
|
-
setInstallation,
|
|
76
|
-
onInstallSuccess,
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
exports.onSaveWriteCreateInstallation = onSaveWriteCreateInstallation;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Config, HydratedRevision, Installation } from '../../../../services/api';
|
|
2
|
-
import { ConfigureState } from '../../types';
|
|
3
|
-
export declare const onSaveWriteUpdateInstallation: (projectId: string, integrationId: string, installationId: string, apiKey: string, configureState: ConfigureState, hydratedRevision: HydratedRevision, setInstallation: (installationObj: Installation) => void, onUpdateSuccess?: ((installationId: string, config: Config) => void) | undefined) => Promise<void | null>;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.onSaveWriteUpdateInstallation = void 0;
|
|
4
|
-
const api_1 = require("../../../../services/api");
|
|
5
|
-
const isProxyEnabled_1 = require("../proxy/isProxyEnabled");
|
|
6
|
-
const generateConfigWriteObjects_1 = require("./generateConfigWriteObjects");
|
|
7
|
-
/**
|
|
8
|
-
* given a configureState generate the config object that is need for
|
|
9
|
-
* update installation request.
|
|
10
|
-
*
|
|
11
|
-
* @param configureState
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
const generateUpdateWriteConfigFromConfigureState = (configureState, hydratedRevision) => {
|
|
15
|
-
const configWriteObjects = (0, generateConfigWriteObjects_1.generateConfigWriteObjects)(configureState);
|
|
16
|
-
// config request object type needs to be fixed
|
|
17
|
-
const updateConfigObject = {
|
|
18
|
-
content: {
|
|
19
|
-
write: {
|
|
20
|
-
objects: configWriteObjects,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
// insert proxy into config if it is enabled
|
|
25
|
-
const isProxyEnabled = (0, isProxyEnabled_1.getIsProxyEnabled)(hydratedRevision);
|
|
26
|
-
if (isProxyEnabled) {
|
|
27
|
-
if (!updateConfigObject.content)
|
|
28
|
-
updateConfigObject.content = {};
|
|
29
|
-
updateConfigObject.content.proxy = { enabled: true };
|
|
30
|
-
}
|
|
31
|
-
return updateConfigObject;
|
|
32
|
-
};
|
|
33
|
-
const onSaveWriteUpdateInstallation = (projectId, integrationId, installationId, apiKey, configureState, hydratedRevision, setInstallation, onUpdateSuccess) => {
|
|
34
|
-
// get configuration state
|
|
35
|
-
// transform configuration state to update shape
|
|
36
|
-
const updateConfig = generateUpdateWriteConfigFromConfigureState(configureState, hydratedRevision);
|
|
37
|
-
if (!updateConfig) {
|
|
38
|
-
console.error('Error when generating write updateConfig from configureState');
|
|
39
|
-
return Promise.resolve(null);
|
|
40
|
-
}
|
|
41
|
-
const updateInstallationRequest = {
|
|
42
|
-
projectId,
|
|
43
|
-
installationId,
|
|
44
|
-
integrationId,
|
|
45
|
-
installationUpdate: {
|
|
46
|
-
// update mask will recurse to the object path and replace the object at the object path
|
|
47
|
-
// this example will replace the object at the object (i.e. accounts)
|
|
48
|
-
updateMask: ['config.content.write.objects'],
|
|
49
|
-
installation: {
|
|
50
|
-
config: updateConfig,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
// call api.updateInstallation
|
|
55
|
-
return (0, api_1.api)().installationApi.updateInstallation(updateInstallationRequest, {
|
|
56
|
-
headers: {
|
|
57
|
-
'X-Api-Key': apiKey,
|
|
58
|
-
'Content-Type': 'application/json',
|
|
59
|
-
},
|
|
60
|
-
}).then((installation) => {
|
|
61
|
-
// update local installation state
|
|
62
|
-
setInstallation(installation);
|
|
63
|
-
onUpdateSuccess === null || onUpdateSuccess === void 0 ? void 0 : onUpdateSuccess(installation.id, installation.config);
|
|
64
|
-
}).catch((err) => {
|
|
65
|
-
console.error('ERROR: ', err);
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
exports.onSaveWriteUpdateInstallation = onSaveWriteUpdateInstallation;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FormEventHandler } from 'react';
|
|
2
|
-
interface ConfigureInstallationBaseProps {
|
|
3
|
-
isCreateMode?: boolean;
|
|
4
|
-
onSave: FormEventHandler;
|
|
5
|
-
onReset: () => void;
|
|
6
|
-
isLoading: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function ConfigureInstallationBase({ onSave, onReset, isLoading, isCreateMode, }: ConfigureInstallationBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConfigureInstallationBase = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("@chakra-ui/react");
|
|
6
|
-
const LoadingIcon_1 = require("../../../assets/LoadingIcon");
|
|
7
|
-
const constant_1 = require("../nav/ObjectManagementNav/constant");
|
|
8
|
-
const UninstallInstallation_1 = require("../nav/ObjectManagementNav/UninstallInstallation");
|
|
9
|
-
const HydratedRevisionContext_1 = require("../state/HydratedRevisionContext");
|
|
10
|
-
const ReadFields_1 = require("./fields/ReadFields");
|
|
11
|
-
const WriteFields_1 = require("./fields/WriteFields");
|
|
12
|
-
const UninstallContent_1 = require("./UninstallContent");
|
|
13
|
-
const useSelectedConfigureState_1 = require("./useSelectedConfigureState");
|
|
14
|
-
// Installation UI Base
|
|
15
|
-
function ConfigureInstallationBase({ onSave, onReset, isLoading, isCreateMode = false, }) {
|
|
16
|
-
var _a, _b, _c;
|
|
17
|
-
const { hydratedRevision, loading } = (0, HydratedRevisionContext_1.useHydratedRevision)();
|
|
18
|
-
const { configureState, selectedObjectName } = (0, useSelectedConfigureState_1.useSelectedConfigureState)();
|
|
19
|
-
// has the form been modified?
|
|
20
|
-
const isReadModified = ((_a = configureState === null || configureState === void 0 ? void 0 : configureState.read) === null || _a === void 0 ? void 0 : _a.isOptionalFieldsModified)
|
|
21
|
-
|| ((_b = configureState === null || configureState === void 0 ? void 0 : configureState.read) === null || _b === void 0 ? void 0 : _b.isRequiredMapFieldsModified);
|
|
22
|
-
const isWriteModified = (_c = configureState === null || configureState === void 0 ? void 0 : configureState.write) === null || _c === void 0 ? void 0 : _c.isWriteModified;
|
|
23
|
-
const isModified = isReadModified || isWriteModified;
|
|
24
|
-
// is this a new state (modified or creating a new state)
|
|
25
|
-
const isStateNew = isModified || isCreateMode;
|
|
26
|
-
// should the save button be disabled?
|
|
27
|
-
const isDisabled = loading || isLoading || !configureState || !selectedObjectName
|
|
28
|
-
|| !isStateNew;
|
|
29
|
-
// is other selected?
|
|
30
|
-
const isNonConfigurableWrite = selectedObjectName === constant_1.OTHER_CONST;
|
|
31
|
-
// is the form in the uninstall case?
|
|
32
|
-
const isUninstall = selectedObjectName === UninstallInstallation_1.UNINSTALL_INSTALLATION_CONST;
|
|
33
|
-
return (isLoading ? (0, jsx_runtime_1.jsx)(LoadingIcon_1.LoadingIcon, {})
|
|
34
|
-
: ((0, jsx_runtime_1.jsxs)("form", { style: { width: '100%', maxWidth: '50rem' }, onSubmit: onSave, children: [(0, jsx_runtime_1.jsxs)(react_1.Stack, { direction: "row", spacing: 4, marginBottom: "20px", flexDir: "row-reverse", children: [(0, jsx_runtime_1.jsx)(react_1.Button, { backgroundColor: "gray.800", _hover: { backgroundColor: 'gray.600' }, type: "submit", isDisabled: isDisabled, children: isCreateMode ? 'Install' : 'Save' }), (0, jsx_runtime_1.jsx)(react_1.Button, { backgroundColor: "gray.200", color: "blackAlpha.700", _hover: { backgroundColor: 'gray.300' }, isDisabled: isDisabled, onClick: onReset, children: "Reset" })] }), (0, jsx_runtime_1.jsxs)(react_1.Box, { p: 8, width: "100%", border: "1px solid #EFEFEF", borderRadius: 8, boxShadow: "md", textAlign: ['left'], margin: "auto", bgColor: "white", maxHeight: "100%", overflowY: "scroll", minHeight: 300, children: [loading && (0, jsx_runtime_1.jsx)(LoadingIcon_1.LoadingIcon, {}), hydratedRevision && !isUninstall && !isNonConfigurableWrite && (0, jsx_runtime_1.jsx)(ReadFields_1.ReadFields, {}), hydratedRevision && !isUninstall && isNonConfigurableWrite && (0, jsx_runtime_1.jsx)(WriteFields_1.WriteFields, {}), !loading && isUninstall && (0, jsx_runtime_1.jsx)(UninstallContent_1.UninstallContent, {})] })] })));
|
|
35
|
-
}
|
|
36
|
-
exports.ConfigureInstallationBase = ConfigureInstallationBase;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function CreateInstallation(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateInstallation = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
/**
|
|
6
|
-
* this page is wip: untested
|
|
7
|
-
*/
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const ErrorContextProvider_1 = require("../../../context/ErrorContextProvider");
|
|
10
|
-
const onSaveReadCreateInstallation_1 = require("../actions/read/onSaveReadCreateInstallation");
|
|
11
|
-
const onSaveWriteCreateInstallation_1 = require("../actions/write/onSaveWriteCreateInstallation");
|
|
12
|
-
const constant_1 = require("../nav/ObjectManagementNav/constant");
|
|
13
|
-
const utils_1 = require("../state/utils");
|
|
14
|
-
const utils_2 = require("../utils");
|
|
15
|
-
const ConfigureInstallationBase_1 = require("./ConfigureInstallationBase");
|
|
16
|
-
const useMutateInstallation_1 = require("./useMutateInstallation");
|
|
17
|
-
// the config should be undefined for create flow
|
|
18
|
-
const UNDEFINED_CONFIG = undefined;
|
|
19
|
-
// Create Installation Flow
|
|
20
|
-
function CreateInstallation() {
|
|
21
|
-
const { integrationId, groupRef, consumerRef, setInstallation, hydratedRevision, loading, selectedObjectName, selectedConnection, apiKey, projectId, resetBoundary, setErrors, resetConfigureState, objectConfigurationsState, resetPendingConfigurationState, configureState, onInstallSuccess, } = (0, useMutateInstallation_1.useMutateInstallation)();
|
|
22
|
-
const [isLoading, setLoadingState] = (0, react_1.useState)(false);
|
|
23
|
-
// is other selected?
|
|
24
|
-
const isOtherSelected = selectedObjectName === constant_1.OTHER_CONST;
|
|
25
|
-
const resetState = (0, react_1.useCallback)(() => {
|
|
26
|
-
resetBoundary(ErrorContextProvider_1.ErrorBoundary.MAPPING);
|
|
27
|
-
if ((hydratedRevision === null || hydratedRevision === void 0 ? void 0 : hydratedRevision.content) && !loading && selectedObjectName) {
|
|
28
|
-
(0, utils_1.setHydrateConfigState)(hydratedRevision, UNDEFINED_CONFIG, selectedObjectName, resetConfigureState);
|
|
29
|
-
}
|
|
30
|
-
}, [resetBoundary, hydratedRevision, loading, selectedObjectName, resetConfigureState]);
|
|
31
|
-
(0, react_1.useEffect)(() => {
|
|
32
|
-
// set configurationState when hydratedRevision is loaded
|
|
33
|
-
if (!configureState && (hydratedRevision === null || hydratedRevision === void 0 ? void 0 : hydratedRevision.content) && !loading) {
|
|
34
|
-
resetState();
|
|
35
|
-
}
|
|
36
|
-
}, [configureState, objectConfigurationsState, hydratedRevision, loading, resetState]);
|
|
37
|
-
const onSaveRead = () => {
|
|
38
|
-
// check if fields with requirements are met
|
|
39
|
-
const { requiredMapFields, selectedFieldMappings } = (configureState === null || configureState === void 0 ? void 0 : configureState.read) || {};
|
|
40
|
-
const { errorList } = (0, utils_2.validateFieldMappings)(requiredMapFields, selectedFieldMappings, setErrors);
|
|
41
|
-
if (errorList.length > 0) {
|
|
42
|
-
return;
|
|
43
|
-
} // skip if there are errors
|
|
44
|
-
if (selectedObjectName && (selectedConnection === null || selectedConnection === void 0 ? void 0 : selectedConnection.id) && apiKey && projectId
|
|
45
|
-
&& integrationId && groupRef && consumerRef && hydratedRevision) {
|
|
46
|
-
setLoadingState(true);
|
|
47
|
-
const res = (0, onSaveReadCreateInstallation_1.onSaveReadCreateInstallation)(projectId, integrationId, groupRef, consumerRef, selectedConnection.id, selectedObjectName, apiKey, hydratedRevision, configureState, setInstallation, onInstallSuccess);
|
|
48
|
-
res.finally(() => {
|
|
49
|
-
setLoadingState(false);
|
|
50
|
-
resetPendingConfigurationState(selectedObjectName);
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
console.error('CreateInstallallation - onSaveReadCreate: missing required props');
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
const onSaveWrite = () => {
|
|
58
|
-
// check if fields with requirements are met
|
|
59
|
-
if (selectedObjectName && (selectedConnection === null || selectedConnection === void 0 ? void 0 : selectedConnection.id) && apiKey && projectId
|
|
60
|
-
&& integrationId && groupRef && consumerRef && hydratedRevision) {
|
|
61
|
-
setLoadingState(true);
|
|
62
|
-
const res = (0, onSaveWriteCreateInstallation_1.onSaveWriteCreateInstallation)(projectId, integrationId, groupRef, consumerRef, selectedConnection.id, apiKey, hydratedRevision, configureState, setInstallation, onInstallSuccess);
|
|
63
|
-
res.finally(() => {
|
|
64
|
-
setLoadingState(false);
|
|
65
|
-
resetPendingConfigurationState(selectedObjectName); // reset write pending/isModified state
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
console.error('CreateInstallallation - onSaveWriteCreate: missing required props');
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
const onSave = (e) => {
|
|
73
|
-
e.preventDefault();
|
|
74
|
-
if (!isOtherSelected) {
|
|
75
|
-
onSaveRead();
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
onSaveWrite();
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
return ((0, jsx_runtime_1.jsx)(ConfigureInstallationBase_1.ConfigureInstallationBase, { isCreateMode: true, isLoading: isLoading, onSave: onSave, onReset: resetState }));
|
|
82
|
-
}
|
|
83
|
-
exports.CreateInstallation = CreateInstallation;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function InstallationContent(): import("react/jsx-runtime").JSX.Element;
|