Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions public/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ window.pagopa_env = {
WELL_KNOWN_URLS: 'https://dev.interop.pagopa.it/.well-known/jwks.json',
PRODUCER_ALLOWED_ORIGINS: 'IPA',
API_SIGNAL_HUB_PUSH_INTERFACE_URL:
'https://raw.githubusercontent.com/pagopa/interop-signalhub-core/refs/heads/develop/docs/openAPI/push-signals.yaml',
'https://developer.pagopa.it/pdnd-interoperabilita/api/signal-hub-push-v1',
API_SIGNAL_HUB_PULL_INTERFACE_URL:
'https://raw.githubusercontent.com/pagopa/interop-signalhub-core/refs/heads/develop/docs/openAPI/pull-signals.yaml',
'http://developer.pagopa.it/pdnd-interoperabilita/api/signal-hub-pull-v1#/',
FEATURE_FLAG_SIGNALHUB_WHITELIST: 'true',
FEATURE_FLAG_ADMIN_CLIENT: 'true',
FEATURE_FLAG_AGREEMENT_APPROVAL_POLICY_UPDATE: 'true',
Expand All @@ -26,7 +26,8 @@ window.pagopa_env = {
API_GATEWAY_V1_INTERFACE_URL:
'https://selfcare.dev.interop.pagopa.it/m2m/v1-interface-specification.yaml',
API_GATEWAY_V2_INTERFACE_URL:
'https://selfcare.dev.interop.pagopa.it/m2m/v2-interface-specification.yaml',
'https://developer.pagopa.it/pdnd-interoperabilita/api/pdnd-core-v2',
SIGNALHUB_PERSONAL_DATA_PROCESS_URL: 'http://localhost',
ERROR_DATA_DURATION_TIME: '90000',
API_TRACING_INTERFACE_URL: 'https://developer.pagopa.it/pdnd-interoperabilita/api/tracing-v1',
}
7 changes: 4 additions & 3 deletions setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export const testConfigs = {
WELL_KNOWN_URLS: 'https://dev.interop.pagopa.it/.well-known/jwks.json',
PRODUCER_ALLOWED_ORIGINS: 'IPA',
API_SIGNAL_HUB_PUSH_INTERFACE_URL:
'https://raw.githubusercontent.com/pagopa/interop-signalhub-core/refs/heads/develop/docs/openAPI/push-signals.yaml',
'https://developer.pagopa.it/pdnd-interoperabilita/api/signal-hub-push-v1',
API_SIGNAL_HUB_PULL_INTERFACE_URL:
'https://raw.githubusercontent.com/pagopa/interop-signalhub-core/refs/heads/develop/docs/openAPI/pull-signals.yaml',
'http://developer.pagopa.it/pdnd-interoperabilita/api/signal-hub-pull-v1#/',
FEATURE_FLAG_SIGNALHUB_WHITELIST: 'true',
SIGNALHUB_WHITELIST_CONSUMER:
'69e2865e-65ab-4e48-a638-2037a9ee2ee7,e79a24cd-8edc-441e-ae8d-e87c3aea0059',
Expand All @@ -32,8 +32,9 @@ export const testConfigs = {
API_GATEWAY_V1_INTERFACE_URL:
'https://selfcare.dev.interop.pagopa.it/m2m/v1-interface-specification.yaml',
API_GATEWAY_V2_INTERFACE_URL:
'https://selfcare.dev.interop.pagopa.it/m2m/v2-interface-specification.yaml',
'https://developer.pagopa.it/pdnd-interoperabilita/api/pdnd-core-v2',
SIGNALHUB_PERSONAL_DATA_PROCESS_URL: 'http://localhost',
API_TRACING_INTERFACE_URL: 'https://developer.pagopa.it/pdnd-interoperabilita/api/tracing-v1',
}

// runs a cleanup after each test case (e.g. clearing jsdom)
Expand Down
2 changes: 2 additions & 0 deletions src/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const GeneralConfigs = z.object({
API_GATEWAY_V1_INTERFACE_URL: z.url(),
API_GATEWAY_V2_INTERFACE_URL: z.url(),
ERROR_DATA_DURATION_TIME: z.string().default('60000'),
API_TRACING_INTERFACE_URL: z.url(),
})

const FeatureFlagConfigs = z.object({
Expand Down Expand Up @@ -113,6 +114,7 @@ export const {
API_GATEWAY_V1_INTERFACE_URL,
API_GATEWAY_V2_INTERFACE_URL,
ERROR_DATA_DURATION_TIME,
API_TRACING_INTERFACE_URL,
} = parseConfigs()

export const APP_MODE = parseAppMode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ import {
API_GATEWAY_V2_INTERFACE_URL,
API_SIGNAL_HUB_PULL_INTERFACE_URL,
API_SIGNAL_HUB_PUSH_INTERFACE_URL,
API_TRACING_INTERFACE_URL,
} from '@/config/env'
import { useQuery } from '@tanstack/react-query'
import DownloadIcon from '@mui/icons-material/Download'
import { Link } from '@/router'
import { AuthHooks } from '@/api/auth'
import { isSignalHubFeatureFlagEnabled } from '@/utils/feature-flags.utils'
import LaunchIcon from '@mui/icons-material/Launch'

export const VoucherInstructionsStep4: React.FC = () => {
const { t } = useTranslation('voucher')
Expand Down Expand Up @@ -111,10 +113,10 @@ export const VoucherInstructionsStep4: React.FC = () => {
}}
disableRipple
href={API_GATEWAY_V2_INTERFACE_URL}
download
target="_blank"
>
<DownloadIcon fontSize="small" />
{t(`step4.${clientKind}.actionLabel`)}
<LaunchIcon fontSize="small" />
{t(`step4.consultLabel`)}
</Button>
</Stack>
</>
Expand All @@ -140,10 +142,10 @@ export const VoucherInstructionsStep4: React.FC = () => {
}}
disableRipple
href={API_SIGNAL_HUB_PUSH_INTERFACE_URL}
download
target="_blank"
>
<DownloadIcon fontSize="small" />
{t(`step4.actionLabel`)}
<LaunchIcon fontSize="small" />
{t(`step4.consultLabel`)}
</Button>
</Stack>
<Typography variant="body2" fontWeight={600}>
Expand All @@ -159,10 +161,35 @@ export const VoucherInstructionsStep4: React.FC = () => {
}}
disableRipple
href={API_SIGNAL_HUB_PULL_INTERFACE_URL}
download
target="_blank"
>
<DownloadIcon fontSize="small" />
{t(`step4.actionLabel`)}
<LaunchIcon fontSize="small" />
{t(`step4.consultLabel`)}
</Button>
</Stack>
</Stack>
</SectionContainer>
)}
{clientKind === 'API' && (
<SectionContainer>
<Stack spacing={2}>
<Typography variant="h6" component="h2">
{t(`step4.API.tracing.title`)}
</Typography>
<Stack direction="row" spacing={1} alignItems="center" justifyContent="space-between">
<Typography variant="body2">{t(`step4.API.tracing.description`)}</Typography>
<Button
sx={{
'&:hover': {
backgroundColor: 'white',
},
}}
disableRipple
href={API_TRACING_INTERFACE_URL}
target="_blank"
>
<LaunchIcon fontSize="small" />
{t(`step4.consultLabel`)}
</Button>
</Stack>
</Stack>
Expand Down
7 changes: 6 additions & 1 deletion src/static/locales/en/voucher.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
"consumerStepperLabel": "E-service access",
"apiStepperLabel": "API Interop access",
"actionLabel": "Download",
"consultLabel": "Consult",
"CONSUMER": {
"title": "Congratulations!",
"description": "You can access the eservice <strong>{{ eserviceName }}</strong> provided by <strong>{{ producerName }}</strong>",
Expand Down Expand Up @@ -197,7 +198,11 @@
},
"pullApiSH": {
"title": "Signals retrieval (Pull API)",
"description": "The API that allow consumers to retrieve the signal of data change"
"description": "The API that allows consumers to retrieve the signal of data change"
},
"tracing": {
"title": "Tracing",
"description": "The API that allows uploading and managing information on the exchange volumes between the provider and the user."
}
}
},
Expand Down
5 changes: 5 additions & 0 deletions src/static/locales/it/voucher.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
"consumerStepperLabel": "Accesso e-service",
"apiStepperLabel": "Accesso API Interop",
"actionLabel": "Scarica",
"consultLabel": "Consulta",
"CONSUMER": {
"title": "Congratulazioni!",
"description": "Ora puoi accedere all’API dell’e-service <strong>{{ eserviceName }}</strong> erogato da <strong>{{ producerName }}</strong> ",
Expand Down Expand Up @@ -198,6 +199,10 @@
"pullApiSH": {
"title": "Recupero segnali (Pull API)",
"description": "L’API che permette ai fruitori di recuperare i segnali di variazione sui dati"
},
"tracing": {
"title": "Tracing",
"description": "L'API che permette di caricare e gestire le informazioni sui volumi di scambio tra erogatore e fruitore"
}
}
},
Expand Down
1 change: 1 addition & 0 deletions src/types/common.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export type PagoPAEnvVars = {
SIGNALHUB_WHITELIST_CONSUMER: string
FEATURE_FLAG_AGREEMENT_APPROVAL_POLICY_UPDATE: string
SIGNALHUB_PERSONAL_DATA_PROCESS_URL: string
API_TRACING_INTERFACE_URL: string
}

export type ExtendedWindow = Window & {
Expand Down
Loading