@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.
- package/build/amp-react.cjs.js +2 -0
- package/build/amp-react.es.js +7854 -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
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ampersand public API
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
export declare const BASE_PATH: string;
|
|
13
|
-
export interface ConfigurationParameters {
|
|
14
|
-
basePath?: string;
|
|
15
|
-
fetchApi?: FetchAPI;
|
|
16
|
-
middleware?: Middleware[];
|
|
17
|
-
queryParamsStringify?: (params: HTTPQuery) => string;
|
|
18
|
-
username?: string;
|
|
19
|
-
password?: string;
|
|
20
|
-
apiKey?: string | ((name: string) => string);
|
|
21
|
-
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
|
|
22
|
-
headers?: HTTPHeaders;
|
|
23
|
-
credentials?: RequestCredentials;
|
|
24
|
-
}
|
|
25
|
-
export declare class Configuration {
|
|
26
|
-
private configuration;
|
|
27
|
-
constructor(configuration?: ConfigurationParameters);
|
|
28
|
-
set config(configuration: Configuration);
|
|
29
|
-
get basePath(): string;
|
|
30
|
-
get fetchApi(): FetchAPI | undefined;
|
|
31
|
-
get middleware(): Middleware[];
|
|
32
|
-
get queryParamsStringify(): (params: HTTPQuery) => string;
|
|
33
|
-
get username(): string | undefined;
|
|
34
|
-
get password(): string | undefined;
|
|
35
|
-
get apiKey(): ((name: string) => string) | undefined;
|
|
36
|
-
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
|
|
37
|
-
get headers(): HTTPHeaders | undefined;
|
|
38
|
-
get credentials(): RequestCredentials | undefined;
|
|
39
|
-
}
|
|
40
|
-
export declare const DefaultConfig: Configuration;
|
|
41
|
-
/**
|
|
42
|
-
* This is the base class for all generated API classes.
|
|
43
|
-
*/
|
|
44
|
-
export declare class BaseAPI {
|
|
45
|
-
protected configuration: Configuration;
|
|
46
|
-
private static readonly jsonRegex;
|
|
47
|
-
private middleware;
|
|
48
|
-
constructor(configuration?: Configuration);
|
|
49
|
-
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
|
|
50
|
-
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
|
|
51
|
-
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
|
|
52
|
-
/**
|
|
53
|
-
* Check if the given MIME is a JSON MIME.
|
|
54
|
-
* JSON MIME examples:
|
|
55
|
-
* application/json
|
|
56
|
-
* application/json; charset=UTF8
|
|
57
|
-
* APPLICATION/JSON
|
|
58
|
-
* application/vnd.company+json
|
|
59
|
-
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
60
|
-
* @return True if the given MIME is JSON, false otherwise.
|
|
61
|
-
*/
|
|
62
|
-
protected isJsonMime(mime: string | null | undefined): boolean;
|
|
63
|
-
protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
|
|
64
|
-
private createFetchParams;
|
|
65
|
-
private fetchApi;
|
|
66
|
-
/**
|
|
67
|
-
* Create a shallow clone of `this` by constructing a new instance
|
|
68
|
-
* and then shallow cloning data members.
|
|
69
|
-
*/
|
|
70
|
-
private clone;
|
|
71
|
-
}
|
|
72
|
-
export declare class ResponseError extends Error {
|
|
73
|
-
response: Response;
|
|
74
|
-
name: "ResponseError";
|
|
75
|
-
constructor(response: Response, msg?: string);
|
|
76
|
-
}
|
|
77
|
-
export declare class FetchError extends Error {
|
|
78
|
-
cause: Error;
|
|
79
|
-
name: "FetchError";
|
|
80
|
-
constructor(cause: Error, msg?: string);
|
|
81
|
-
}
|
|
82
|
-
export declare class RequiredError extends Error {
|
|
83
|
-
field: string;
|
|
84
|
-
name: "RequiredError";
|
|
85
|
-
constructor(field: string, msg?: string);
|
|
86
|
-
}
|
|
87
|
-
export declare const COLLECTION_FORMATS: {
|
|
88
|
-
csv: string;
|
|
89
|
-
ssv: string;
|
|
90
|
-
tsv: string;
|
|
91
|
-
pipes: string;
|
|
92
|
-
};
|
|
93
|
-
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
|
94
|
-
export type Json = any;
|
|
95
|
-
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
|
96
|
-
export type HTTPHeaders = {
|
|
97
|
-
[key: string]: string;
|
|
98
|
-
};
|
|
99
|
-
export type HTTPQuery = {
|
|
100
|
-
[key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
|
|
101
|
-
};
|
|
102
|
-
export type HTTPBody = Json | FormData | URLSearchParams;
|
|
103
|
-
export type HTTPRequestInit = {
|
|
104
|
-
headers?: HTTPHeaders;
|
|
105
|
-
method: HTTPMethod;
|
|
106
|
-
credentials?: RequestCredentials;
|
|
107
|
-
body?: HTTPBody;
|
|
108
|
-
};
|
|
109
|
-
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
|
110
|
-
export type InitOverrideFunction = (requestContext: {
|
|
111
|
-
init: HTTPRequestInit;
|
|
112
|
-
context: RequestOpts;
|
|
113
|
-
}) => Promise<RequestInit>;
|
|
114
|
-
export interface FetchParams {
|
|
115
|
-
url: string;
|
|
116
|
-
init: RequestInit;
|
|
117
|
-
}
|
|
118
|
-
export interface RequestOpts {
|
|
119
|
-
path: string;
|
|
120
|
-
method: HTTPMethod;
|
|
121
|
-
headers: HTTPHeaders;
|
|
122
|
-
query?: HTTPQuery;
|
|
123
|
-
body?: HTTPBody;
|
|
124
|
-
}
|
|
125
|
-
export declare function exists(json: any, key: string): boolean;
|
|
126
|
-
export declare function querystring(params: HTTPQuery, prefix?: string): string;
|
|
127
|
-
export declare function mapValues(data: any, fn: (item: any) => any): {};
|
|
128
|
-
export declare function canConsumeForm(consumes: Consume[]): boolean;
|
|
129
|
-
export interface Consume {
|
|
130
|
-
contentType: string;
|
|
131
|
-
}
|
|
132
|
-
export interface RequestContext {
|
|
133
|
-
fetch: FetchAPI;
|
|
134
|
-
url: string;
|
|
135
|
-
init: RequestInit;
|
|
136
|
-
}
|
|
137
|
-
export interface ResponseContext {
|
|
138
|
-
fetch: FetchAPI;
|
|
139
|
-
url: string;
|
|
140
|
-
init: RequestInit;
|
|
141
|
-
response: Response;
|
|
142
|
-
}
|
|
143
|
-
export interface ErrorContext {
|
|
144
|
-
fetch: FetchAPI;
|
|
145
|
-
url: string;
|
|
146
|
-
init: RequestInit;
|
|
147
|
-
error: unknown;
|
|
148
|
-
response?: Response;
|
|
149
|
-
}
|
|
150
|
-
export interface Middleware {
|
|
151
|
-
pre?(context: RequestContext): Promise<FetchParams | void>;
|
|
152
|
-
post?(context: ResponseContext): Promise<Response | void>;
|
|
153
|
-
onError?(context: ErrorContext): Promise<Response | void>;
|
|
154
|
-
}
|
|
155
|
-
export interface ApiResponse<T> {
|
|
156
|
-
raw: Response;
|
|
157
|
-
value(): Promise<T>;
|
|
158
|
-
}
|
|
159
|
-
export interface ResponseTransformer<T> {
|
|
160
|
-
(json: any): T;
|
|
161
|
-
}
|
|
162
|
-
export declare class JSONApiResponse<T> {
|
|
163
|
-
raw: Response;
|
|
164
|
-
private transformer;
|
|
165
|
-
constructor(raw: Response, transformer?: ResponseTransformer<T>);
|
|
166
|
-
value(): Promise<T>;
|
|
167
|
-
}
|
|
168
|
-
export declare class VoidApiResponse {
|
|
169
|
-
raw: Response;
|
|
170
|
-
constructor(raw: Response);
|
|
171
|
-
value(): Promise<void>;
|
|
172
|
-
}
|
|
173
|
-
export declare class BlobApiResponse {
|
|
174
|
-
raw: Response;
|
|
175
|
-
constructor(raw: Response);
|
|
176
|
-
value(): Promise<Blob>;
|
|
177
|
-
}
|
|
178
|
-
export declare class TextApiResponse {
|
|
179
|
-
raw: Response;
|
|
180
|
-
constructor(raw: Response);
|
|
181
|
-
value(): Promise<string>;
|
|
182
|
-
}
|
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Ampersand public API
|
|
6
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 1.0.0
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.exists = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
|
|
17
|
-
exports.BASE_PATH = "https://api.withampersand.com/v1".replace(/\/+$/, "");
|
|
18
|
-
class Configuration {
|
|
19
|
-
constructor(configuration = {}) {
|
|
20
|
-
this.configuration = configuration;
|
|
21
|
-
}
|
|
22
|
-
set config(configuration) {
|
|
23
|
-
this.configuration = configuration;
|
|
24
|
-
}
|
|
25
|
-
get basePath() {
|
|
26
|
-
return this.configuration.basePath != null ? this.configuration.basePath : exports.BASE_PATH;
|
|
27
|
-
}
|
|
28
|
-
get fetchApi() {
|
|
29
|
-
return this.configuration.fetchApi;
|
|
30
|
-
}
|
|
31
|
-
get middleware() {
|
|
32
|
-
return this.configuration.middleware || [];
|
|
33
|
-
}
|
|
34
|
-
get queryParamsStringify() {
|
|
35
|
-
return this.configuration.queryParamsStringify || querystring;
|
|
36
|
-
}
|
|
37
|
-
get username() {
|
|
38
|
-
return this.configuration.username;
|
|
39
|
-
}
|
|
40
|
-
get password() {
|
|
41
|
-
return this.configuration.password;
|
|
42
|
-
}
|
|
43
|
-
get apiKey() {
|
|
44
|
-
const apiKey = this.configuration.apiKey;
|
|
45
|
-
if (apiKey) {
|
|
46
|
-
return typeof apiKey === 'function' ? apiKey : () => apiKey;
|
|
47
|
-
}
|
|
48
|
-
return undefined;
|
|
49
|
-
}
|
|
50
|
-
get accessToken() {
|
|
51
|
-
const accessToken = this.configuration.accessToken;
|
|
52
|
-
if (accessToken) {
|
|
53
|
-
return typeof accessToken === 'function' ? accessToken : async () => accessToken;
|
|
54
|
-
}
|
|
55
|
-
return undefined;
|
|
56
|
-
}
|
|
57
|
-
get headers() {
|
|
58
|
-
return this.configuration.headers;
|
|
59
|
-
}
|
|
60
|
-
get credentials() {
|
|
61
|
-
return this.configuration.credentials;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.Configuration = Configuration;
|
|
65
|
-
exports.DefaultConfig = new Configuration();
|
|
66
|
-
/**
|
|
67
|
-
* This is the base class for all generated API classes.
|
|
68
|
-
*/
|
|
69
|
-
class BaseAPI {
|
|
70
|
-
constructor(configuration = exports.DefaultConfig) {
|
|
71
|
-
this.configuration = configuration;
|
|
72
|
-
this.fetchApi = async (url, init) => {
|
|
73
|
-
let fetchParams = { url, init };
|
|
74
|
-
for (const middleware of this.middleware) {
|
|
75
|
-
if (middleware.pre) {
|
|
76
|
-
fetchParams = await middleware.pre(Object.assign({ fetch: this.fetchApi }, fetchParams)) || fetchParams;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
let response = undefined;
|
|
80
|
-
try {
|
|
81
|
-
response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
|
82
|
-
}
|
|
83
|
-
catch (e) {
|
|
84
|
-
for (const middleware of this.middleware) {
|
|
85
|
-
if (middleware.onError) {
|
|
86
|
-
response = await middleware.onError({
|
|
87
|
-
fetch: this.fetchApi,
|
|
88
|
-
url: fetchParams.url,
|
|
89
|
-
init: fetchParams.init,
|
|
90
|
-
error: e,
|
|
91
|
-
response: response ? response.clone() : undefined,
|
|
92
|
-
}) || response;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
if (response === undefined) {
|
|
96
|
-
if (e instanceof Error) {
|
|
97
|
-
throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
throw e;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
for (const middleware of this.middleware) {
|
|
105
|
-
if (middleware.post) {
|
|
106
|
-
response = await middleware.post({
|
|
107
|
-
fetch: this.fetchApi,
|
|
108
|
-
url: fetchParams.url,
|
|
109
|
-
init: fetchParams.init,
|
|
110
|
-
response: response.clone(),
|
|
111
|
-
}) || response;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return response;
|
|
115
|
-
};
|
|
116
|
-
this.middleware = configuration.middleware;
|
|
117
|
-
}
|
|
118
|
-
withMiddleware(...middlewares) {
|
|
119
|
-
const next = this.clone();
|
|
120
|
-
next.middleware = next.middleware.concat(...middlewares);
|
|
121
|
-
return next;
|
|
122
|
-
}
|
|
123
|
-
withPreMiddleware(...preMiddlewares) {
|
|
124
|
-
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
|
125
|
-
return this.withMiddleware(...middlewares);
|
|
126
|
-
}
|
|
127
|
-
withPostMiddleware(...postMiddlewares) {
|
|
128
|
-
const middlewares = postMiddlewares.map((post) => ({ post }));
|
|
129
|
-
return this.withMiddleware(...middlewares);
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Check if the given MIME is a JSON MIME.
|
|
133
|
-
* JSON MIME examples:
|
|
134
|
-
* application/json
|
|
135
|
-
* application/json; charset=UTF8
|
|
136
|
-
* APPLICATION/JSON
|
|
137
|
-
* application/vnd.company+json
|
|
138
|
-
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
139
|
-
* @return True if the given MIME is JSON, false otherwise.
|
|
140
|
-
*/
|
|
141
|
-
isJsonMime(mime) {
|
|
142
|
-
if (!mime) {
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
return BaseAPI.jsonRegex.test(mime);
|
|
146
|
-
}
|
|
147
|
-
async request(context, initOverrides) {
|
|
148
|
-
const { url, init } = await this.createFetchParams(context, initOverrides);
|
|
149
|
-
const response = await this.fetchApi(url, init);
|
|
150
|
-
if (response && (response.status >= 200 && response.status < 300)) {
|
|
151
|
-
return response;
|
|
152
|
-
}
|
|
153
|
-
throw new ResponseError(response, 'Response returned an error code');
|
|
154
|
-
}
|
|
155
|
-
async createFetchParams(context, initOverrides) {
|
|
156
|
-
let url = this.configuration.basePath + context.path;
|
|
157
|
-
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
158
|
-
// only add the querystring to the URL if there are query parameters.
|
|
159
|
-
// this is done to avoid urls ending with a "?" character which buggy webservers
|
|
160
|
-
// do not handle correctly sometimes.
|
|
161
|
-
url += '?' + this.configuration.queryParamsStringify(context.query);
|
|
162
|
-
}
|
|
163
|
-
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
164
|
-
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
|
|
165
|
-
const initOverrideFn = typeof initOverrides === "function"
|
|
166
|
-
? initOverrides
|
|
167
|
-
: async () => initOverrides;
|
|
168
|
-
const initParams = {
|
|
169
|
-
method: context.method,
|
|
170
|
-
headers,
|
|
171
|
-
body: context.body,
|
|
172
|
-
credentials: this.configuration.credentials,
|
|
173
|
-
};
|
|
174
|
-
const overriddenInit = Object.assign(Object.assign({}, initParams), (await initOverrideFn({
|
|
175
|
-
init: initParams,
|
|
176
|
-
context,
|
|
177
|
-
})));
|
|
178
|
-
const init = Object.assign(Object.assign({}, overriddenInit), { body: isFormData(overriddenInit.body) ||
|
|
179
|
-
overriddenInit.body instanceof URLSearchParams ||
|
|
180
|
-
isBlob(overriddenInit.body)
|
|
181
|
-
? overriddenInit.body
|
|
182
|
-
: JSON.stringify(overriddenInit.body) });
|
|
183
|
-
return { url, init };
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Create a shallow clone of `this` by constructing a new instance
|
|
187
|
-
* and then shallow cloning data members.
|
|
188
|
-
*/
|
|
189
|
-
clone() {
|
|
190
|
-
const constructor = this.constructor;
|
|
191
|
-
const next = new constructor(this.configuration);
|
|
192
|
-
next.middleware = this.middleware.slice();
|
|
193
|
-
return next;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
exports.BaseAPI = BaseAPI;
|
|
197
|
-
BaseAPI.jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
|
|
198
|
-
;
|
|
199
|
-
function isBlob(value) {
|
|
200
|
-
return typeof Blob !== 'undefined' && value instanceof Blob;
|
|
201
|
-
}
|
|
202
|
-
function isFormData(value) {
|
|
203
|
-
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
204
|
-
}
|
|
205
|
-
class ResponseError extends Error {
|
|
206
|
-
constructor(response, msg) {
|
|
207
|
-
super(msg);
|
|
208
|
-
this.response = response;
|
|
209
|
-
this.name = "ResponseError";
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
exports.ResponseError = ResponseError;
|
|
213
|
-
class FetchError extends Error {
|
|
214
|
-
constructor(cause, msg) {
|
|
215
|
-
super(msg);
|
|
216
|
-
this.cause = cause;
|
|
217
|
-
this.name = "FetchError";
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
exports.FetchError = FetchError;
|
|
221
|
-
class RequiredError extends Error {
|
|
222
|
-
constructor(field, msg) {
|
|
223
|
-
super(msg);
|
|
224
|
-
this.field = field;
|
|
225
|
-
this.name = "RequiredError";
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
exports.RequiredError = RequiredError;
|
|
229
|
-
exports.COLLECTION_FORMATS = {
|
|
230
|
-
csv: ",",
|
|
231
|
-
ssv: " ",
|
|
232
|
-
tsv: "\t",
|
|
233
|
-
pipes: "|",
|
|
234
|
-
};
|
|
235
|
-
function exists(json, key) {
|
|
236
|
-
const value = json[key];
|
|
237
|
-
return value !== null && value !== undefined;
|
|
238
|
-
}
|
|
239
|
-
exports.exists = exists;
|
|
240
|
-
function querystring(params, prefix = '') {
|
|
241
|
-
return Object.keys(params)
|
|
242
|
-
.map(key => querystringSingleKey(key, params[key], prefix))
|
|
243
|
-
.filter(part => part.length > 0)
|
|
244
|
-
.join('&');
|
|
245
|
-
}
|
|
246
|
-
exports.querystring = querystring;
|
|
247
|
-
function querystringSingleKey(key, value, keyPrefix = '') {
|
|
248
|
-
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
|
|
249
|
-
if (value instanceof Array) {
|
|
250
|
-
const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
|
|
251
|
-
.join(`&${encodeURIComponent(fullKey)}=`);
|
|
252
|
-
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
|
253
|
-
}
|
|
254
|
-
if (value instanceof Set) {
|
|
255
|
-
const valueAsArray = Array.from(value);
|
|
256
|
-
return querystringSingleKey(key, valueAsArray, keyPrefix);
|
|
257
|
-
}
|
|
258
|
-
if (value instanceof Date) {
|
|
259
|
-
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
|
|
260
|
-
}
|
|
261
|
-
if (value instanceof Object) {
|
|
262
|
-
return querystring(value, fullKey);
|
|
263
|
-
}
|
|
264
|
-
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
|
265
|
-
}
|
|
266
|
-
function mapValues(data, fn) {
|
|
267
|
-
return Object.keys(data).reduce((acc, key) => (Object.assign(Object.assign({}, acc), { [key]: fn(data[key]) })), {});
|
|
268
|
-
}
|
|
269
|
-
exports.mapValues = mapValues;
|
|
270
|
-
function canConsumeForm(consumes) {
|
|
271
|
-
for (const consume of consumes) {
|
|
272
|
-
if ('multipart/form-data' === consume.contentType) {
|
|
273
|
-
return true;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
return false;
|
|
277
|
-
}
|
|
278
|
-
exports.canConsumeForm = canConsumeForm;
|
|
279
|
-
class JSONApiResponse {
|
|
280
|
-
constructor(raw, transformer = (jsonValue) => jsonValue) {
|
|
281
|
-
this.raw = raw;
|
|
282
|
-
this.transformer = transformer;
|
|
283
|
-
}
|
|
284
|
-
async value() {
|
|
285
|
-
return this.transformer(await this.raw.json());
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
exports.JSONApiResponse = JSONApiResponse;
|
|
289
|
-
class VoidApiResponse {
|
|
290
|
-
constructor(raw) {
|
|
291
|
-
this.raw = raw;
|
|
292
|
-
}
|
|
293
|
-
async value() {
|
|
294
|
-
return undefined;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
exports.VoidApiResponse = VoidApiResponse;
|
|
298
|
-
class BlobApiResponse {
|
|
299
|
-
constructor(raw) {
|
|
300
|
-
this.raw = raw;
|
|
301
|
-
}
|
|
302
|
-
async value() {
|
|
303
|
-
return await this.raw.blob();
|
|
304
|
-
}
|
|
305
|
-
;
|
|
306
|
-
}
|
|
307
|
-
exports.BlobApiResponse = BlobApiResponse;
|
|
308
|
-
class TextApiResponse {
|
|
309
|
-
constructor(raw) {
|
|
310
|
-
this.raw = raw;
|
|
311
|
-
}
|
|
312
|
-
async value() {
|
|
313
|
-
return await this.raw.text();
|
|
314
|
-
}
|
|
315
|
-
;
|
|
316
|
-
}
|
|
317
|
-
exports.TextApiResponse = TextApiResponse;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LoadingIcon = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("@chakra-ui/react");
|
|
6
|
-
function LoadingIcon({ message }) {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Box, { className: "loading-icon", height: "100%", width: "100%", display: "flex", justifyContent: "center", marginTop: "20%", marginBottom: "20%", children: (0, jsx_runtime_1.jsxs)(react_1.Stack, { alignItems: "center", children: [(0, jsx_runtime_1.jsx)(react_1.Spinner, { height: "100px", width: "100px", alignSelf: "center", thickness: "8px", speed: "1s", emptyColor: "gray.200", color: "blue.500", size: "xl", margin: "20px" }), message && (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "40px", color: "#4299e1", children: message })] }) }));
|
|
8
|
-
}
|
|
9
|
-
exports.LoadingIcon = LoadingIcon;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NavIcon = exports.CheckMarkIcon = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
exports.CheckMarkIcon = ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [(0, jsx_runtime_1.jsx)("circle", { cx: "9", cy: "9", r: "9", fill: "#BBF7D0" }), (0, jsx_runtime_1.jsx)("path", { d: "M13 7L7.5 12L5 9.72727", stroke: "#16A34A", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
10
|
-
function NavIcon(completed, pending) {
|
|
11
|
-
if (pending) {
|
|
12
|
-
return (react_1.default.createElement('svg', {
|
|
13
|
-
xmlns: 'http://www.w3.org/2000/svg', width: '18', height: '18', viewBox: '0 0 18 18', fill: 'none',
|
|
14
|
-
}, react_1.default.createElement('circle', {
|
|
15
|
-
cx: '9', cy: '9', r: '5', fill: '#FBD38D',
|
|
16
|
-
})));
|
|
17
|
-
}
|
|
18
|
-
if (completed) {
|
|
19
|
-
return exports.CheckMarkIcon;
|
|
20
|
-
}
|
|
21
|
-
// default to empty icon
|
|
22
|
-
return ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: (0, jsx_runtime_1.jsx)("circle", { cx: "9", cy: "9", r: "5", fill: "#BFDBFE" }) }));
|
|
23
|
-
}
|
|
24
|
-
exports.NavIcon = NavIcon;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function SuccessCheckmarkIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SuccessCheckmarkIcon = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
function SuccessCheckmarkIcon() {
|
|
6
|
-
return ((0, jsx_runtime_1.jsxs)("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("circle", { cx: "24", cy: "24", r: "24", fill: "#BBF7D0" }), (0, jsx_runtime_1.jsx)("path", { d: "M34.6666 18.6667L20 32.0001L13.3333 25.9395", stroke: "#16A34A", strokeWidth: "5.33333", strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
7
|
-
}
|
|
8
|
-
exports.SuccessCheckmarkIcon = SuccessCheckmarkIcon;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function TrashIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TrashIcon = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
// red.800 trash icon
|
|
6
|
-
function TrashIcon() {
|
|
7
|
-
return ((0, jsx_runtime_1.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { d: "M2.25 4.5H3.75H15.75", stroke: "#991B1B", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("path", {
|
|
8
|
-
// eslint-disable-next-line max-len
|
|
9
|
-
d: "M14.25 4.5V15C14.25 15.3978 14.092 15.7794 13.8107 16.0607C13.5294 16.342 13.1478 16.5 12.75 16.5H5.25C4.85218 16.5 4.47064 16.342 4.18934 16.0607C3.90804 15.7794 3.75 15.3978 3.75 15V4.5M6 4.5V3C6 2.60218 6.15804 2.22064 6.43934 1.93934C6.72064 1.65804 7.10218 1.5 7.5 1.5H10.5C10.8978 1.5 11.2794 1.65804 11.5607 1.93934C11.842 2.22064 12 2.60218 12 3V4.5", stroke: "#991B1B", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M7.5 8.25V12.75", stroke: "#991B1B", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), (0, jsx_runtime_1.jsx)("path", { d: "M10.5 8.25V12.75", stroke: "#991B1B", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
10
|
-
}
|
|
11
|
-
exports.TrashIcon = TrashIcon;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Config } from '../../services/api';
|
|
2
|
-
interface InstallIntegrationProps {
|
|
3
|
-
integration: string;
|
|
4
|
-
consumerRef: string;
|
|
5
|
-
consumerName?: string;
|
|
6
|
-
groupRef: string;
|
|
7
|
-
groupName?: string;
|
|
8
|
-
onInstallSuccess?: (installationId: string, config: Config) => void;
|
|
9
|
-
onUpdateSuccess?: (installationId: string, config: Config) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare function InstallIntegration({ integration, consumerRef, consumerName, groupRef, groupName, onInstallSuccess, onUpdateSuccess, }: InstallIntegrationProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InstallIntegration = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
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 ErrorTextBox_1 = require("../ErrorTextBox");
|
|
10
|
-
const InstallationContent_1 = require("./content/InstallationContent");
|
|
11
|
-
const ConditionalProxyLayout_1 = require("./layout/ConditionalProxyLayout/ConditionalProxyLayout");
|
|
12
|
-
const ProtectedConnectionLayout_1 = require("./layout/ProtectedConnectionLayout");
|
|
13
|
-
const ObjectManagementNav_1 = require("./nav/ObjectManagementNav");
|
|
14
|
-
const ConfigurationStateProvider_1 = require("./state/ConfigurationStateProvider");
|
|
15
|
-
const HydratedRevisionContext_1 = require("./state/HydratedRevisionContext");
|
|
16
|
-
function InstallIntegration({ integration, consumerRef, consumerName, groupRef, groupName, onInstallSuccess, onUpdateSuccess, }) {
|
|
17
|
-
var _a;
|
|
18
|
-
const { projectId } = (0, ProjectContextProvider_1.useProject)();
|
|
19
|
-
const { errorState } = (0, ErrorContextProvider_1.useErrorState)();
|
|
20
|
-
if ((_a = errorState[ErrorContextProvider_1.ErrorBoundary.INTEGRATION_LIST]) === null || _a === void 0 ? void 0 : _a.apiError) {
|
|
21
|
-
return (0, jsx_runtime_1.jsx)(ErrorTextBox_1.ErrorTextBox, { message: "Something went wrong, couldn't find integration information" });
|
|
22
|
-
}
|
|
23
|
-
return (
|
|
24
|
-
// install integration provider provides all props, integrationObj and installation
|
|
25
|
-
(0, jsx_runtime_1.jsx)(InstallIntegrationContextProvider_1.InstallIntegrationProvider, { integration: integration, consumerRef: consumerRef, consumerName: consumerName, groupRef: groupRef, groupName: groupName, onInstallSuccess: onInstallSuccess, onUpdateSuccess: onUpdateSuccess, children: (0, jsx_runtime_1.jsx)(ConnectionsContextProvider_1.ConnectionsProvider, { groupRef: groupRef, children: (0, jsx_runtime_1.jsx)(ProtectedConnectionLayout_1.ProtectedConnectionLayout, { consumerRef: consumerRef, consumerName: consumerName, groupRef: groupRef, groupName: groupName, children: (0, jsx_runtime_1.jsx)(HydratedRevisionContext_1.HydratedRevisionProvider, { projectId: projectId, children: (0, jsx_runtime_1.jsx)(ConditionalProxyLayout_1.ConditionalProxyLayout, { children: (0, jsx_runtime_1.jsx)(ConfigurationStateProvider_1.ConfigurationProvider, { children: (0, jsx_runtime_1.jsx)(ObjectManagementNav_1.ObjectManagementNav, { children: (0, jsx_runtime_1.jsx)(InstallationContent_1.InstallationContent, {}) }) }) }) }) }) }) }));
|
|
26
|
-
}
|
|
27
|
-
exports.InstallIntegration = InstallIntegration;
|
package/build/src/components/Configure/actions/mutateAndSetState/createInstallationAndSetState.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Config, CreateInstallationRequestConfig, Installation } from '../../../../services/api';
|
|
2
|
-
export type CreateInstallationSharedProps = {
|
|
3
|
-
projectId: string;
|
|
4
|
-
integrationId: string;
|
|
5
|
-
groupRef: string;
|
|
6
|
-
connectionId: string;
|
|
7
|
-
apiKey: string;
|
|
8
|
-
setInstallation: (installationObj: Installation) => void;
|
|
9
|
-
onInstallSuccess?: (installationId: string, config: Config) => void;
|
|
10
|
-
};
|
|
11
|
-
type CreateInstallationAndSetStateProps = CreateInstallationSharedProps & {
|
|
12
|
-
createConfig: CreateInstallationRequestConfig;
|
|
13
|
-
};
|
|
14
|
-
export declare function createInstallationAndSetState({ createConfig, projectId, integrationId, groupRef, connectionId, apiKey, setInstallation, onInstallSuccess, }: CreateInstallationAndSetStateProps): Promise<void>;
|
|
15
|
-
export {};
|
package/build/src/components/Configure/actions/mutateAndSetState/createInstallationAndSetState.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createInstallationAndSetState = void 0;
|
|
4
|
-
const api_1 = require("../../../../services/api");
|
|
5
|
-
function createInstallationAndSetState({ createConfig, projectId, integrationId, groupRef, connectionId, apiKey, setInstallation, onInstallSuccess, }) {
|
|
6
|
-
const createInstallationRequest = {
|
|
7
|
-
projectId,
|
|
8
|
-
integrationId,
|
|
9
|
-
installation: {
|
|
10
|
-
groupRef,
|
|
11
|
-
connectionId,
|
|
12
|
-
config: createConfig,
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
return (0, api_1.api)().installationApi.createInstallation(createInstallationRequest, {
|
|
16
|
-
headers: {
|
|
17
|
-
'X-Api-Key': apiKey,
|
|
18
|
-
'Content-Type': 'application/json',
|
|
19
|
-
},
|
|
20
|
-
})
|
|
21
|
-
.then((installation) => {
|
|
22
|
-
// update local installation state
|
|
23
|
-
setInstallation(installation);
|
|
24
|
-
onInstallSuccess === null || onInstallSuccess === void 0 ? void 0 : onInstallSuccess(installation.id, installation.config);
|
|
25
|
-
})
|
|
26
|
-
.catch((err) => {
|
|
27
|
-
console.error('ERROR: ', err);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
exports.createInstallationAndSetState = createInstallationAndSetState;
|