Skip to content

Commit

Permalink
Merge branch 'master' into IOBP-804-add-feedback-banner-mock
Browse files Browse the repository at this point in the history
  • Loading branch information
Hantex9 authored Oct 9, 2024
2 parents 8d988f2 + e1c3fe6 commit 0bcb271
Show file tree
Hide file tree
Showing 33 changed files with 1,991 additions and 115 deletions.
11 changes: 11 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,14 @@ In order to test the uniqueness of email validation flow, the `config/config.jso
```
and to validate/invalidate the email or make the email already taken you have to navigate from the browser to `http://localhost:3000/`
## Cie ID
To enable this feature, you must set the FeatureFlag to a minimum version higher than `0.0.0` in `src/payloads/backend.ts`
```ts
cie_id: {
min_app_version: {
ios: "1.0.0",
android: "1.0.0"
}
}
```
12 changes: 6 additions & 6 deletions assets/bonus_available/bonus_available_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"it": {
"name": "Carta Giovani Nazionale",
"description": "Carta Giovani Nazionale (CGN) è l’incentivo per i giovani che favorisce la partecipazione ad attività culturali, sportive e ricreative, su tutto il territorio nazionale",
"subtitle": "Carta Giovani Nazionale (CGN) è l’incentivo per i giovani che favorisce la partecipazione ad attività culturali, sportive e ricreative, su tutto il territorio nazionale",
"title": "Attiva la Carta Giovani Nazionale",
"content": "#### Chi può attivarla?\nI giovani italiani ed europei che risiedono in Italia e che hanno tra i 18 e i 35 anni di età.\n\n#### Quanto valgono le agevolazioni?\nIl tipo di agevolazioni e sconti è variabile e dipende dall’operatore che aderisce all’iniziativa.\n\n#### Dove e come posso utilizzarla?\nConsulta la lista dei partner aderenti su IO. Se ti rechi presso un operatore fisico, accedi a IO e mostra la CGN dal tuo smartphone. Online, utilizza il codice sconto relativo all'agevolazione in fase di acquisto.\n\n**Se risiedi nel [Lazio](https://www.regione.lazio.it/youthcard) o in [Sardegna](https://sardegna.cartagiovani.eu/), puoi aderire anche alle iniziative di scontistica per i giovani della tua regione, scaricando la carta regionale.**\n\n#### Cos'è il circuito EYCA?\nSe hai tra i 18 e i 30 anni, la tua CGN aderisce al circuito delle carte giovani europee e ti permette di accedere ad agevolazioni anche nei paesi europei aderenti. \n\n#### Come funziona il processo di richiesta?\nL’app IO è l’unico canale per ottenere la CGN. \nSe hai tra i 18 e i 35 anni, effettua questi passaggi:\n- Leggi la [Guida](https://io.italia.it/carta-giovani-nazionale/guida-beneficiari) e l’[Informativa privacy](https://io.italia.it/carta-giovani-nazionale/informativa-beneficiari).\n- Premi il pulsante “Richiedi la Carta”.\n- L'app IO verificherà se hai i requisiti e genererà la tua CGN.\n- Una volta attiva, la tua CGN sarà visibile nella sezione Portafoglio.",
"subtitle": "Carta Giovani Nazionale (CGN) è la **carta virtuale** rivolta ai giovani, nata per favorire la partecipazione a tante opportunità, come ad esempio attività culturali, sportive, ricreative e formative, grazie alle proposte di diversi partner, valide su tutto il territorio nazionale.\n\nL’attivazione della Carta è **gratuita** e senza **limiti di utilizzo**!",
"title": "Carta Giovani Nazionale: cos’è e come funziona",
"content": "#### Chi può attivarla?\nTutti i giovani italiani ed europei che risiedono in Italia e che hanno tra i **18 e i 35 anni di età**.\n\nSe hai dai 18 ai 30 anni, la tua Carta Giovani Nazionale aderisce anche al **circuito EYCA** (European Youth Card Association).\n\n[Cos’è il circuito EYCA?](https://eyca.org/card/card-italy)\n\n#### Facile da attivare\nTi basterà premere su “Attiva Carta Giovani Nazionale” e in un paio di passaggi la carta sarà attiva. **Non è necessario fornire documenti o dettagli** durante l’attivazione, sarà l’app IO a verificare se hai i requisiti.\n\nUna volta attiva, la tua CGN sarà visibile nella sezione Portafoglio.\n\n#### Come si usa\n**Su app IO**, apri il dettaglio della proposta di tuo interesse e segui le indicazioni.\n\n**Presso i negozi o gli sportelli fisici** dei partner, accedi a IO e mostra Carta Giovani Nazionale dal tuo dispositivo. Non devi fornire nessun codice, solo mostrare la carta e, se richiesto, un tuo documento.\n\n**Se sei residente nel Lazio o in Sardegna, puoi usufruire delle opportunità per i giovani, scaricando anche la carta regionale.**",
"tos_url": "https://io.italia.it/carta-giovani-nazionale/informativa-beneficiari",
"urls": [
{
Expand All @@ -18,9 +18,9 @@
"en": {
"name": "Carta Giovani Nazionale",
"description": "Carta Giovani Nazionale (CGN) is an incentive for young people to participate in cultural, sporting and recreational activities throughout the country",
"subtitle": "Carta Giovani Nazionale (CGN) is an incentive for young people to participate in cultural, sporting and recreational activities throughout the country",
"title": "Activate the Carta Giovani Nazionale",
"content": "#### Who can activate it?\nYoung Italians and Europeans who reside in Italy and are between 18 and 35 years of age.\n\n#### How much are the benefits worth?\nThe type of benefits and discounts is variable and depends on the operator participating in the initiative.\n\n#### Where and how can I use it?\nConsult the list of participating partners on IO. If you go to a physical operator, access IO and show CGN from your smartphone. Online, use the discount code related to the benefit in the purchase phase.\n\n**If you live in [Lazio](https://www.regione.lazio.it/youthcard) or in [Sardegna](https://sardegna.cartagiovani.eu/), you can also join the discount initiatives for young people in your region, by downloading the regional card.**\n\n#### What is the EYCA circuit?\nIf you are between 18 and 30 years old, your CGN joins the circuit of the European youth cards and allows you to have access to benefits also in the adhering European countries.\n\n#### How does the application process work?\nThe IO app is the only channel to get your CGN. \nIf you are between 18 and 35 years old, please follow these steps:\n- Read the [Guide](https://io.italia.it/carta-giovani-nazionale/guida-beneficiari) and the [Privacy Policy](https://io.italia.it/carta-giovani-nazionale/informativa-beneficiari).\n- Press the “Apply for Card“, button.\n- The IO app will check if you are eligible and will generate your CGN.\n- Once activated, your CGN will be visible in the Wallet section.",
"subtitle": "Carta Giovani Nazionale (CGN)is the **virtual card** addressed to young people, created to promote participation in many opportunities, such as cultural, sports, recreational and educational activities, thanks to the proposals of several partners, valid throughout the country.\n\n The activation of the Card is **free** and without **limits to use**!",
"title": "Carta Giovani Nazionale: what it is and how it works.",
"content": "#### Who can activate it?\nAll Italian and European young people who reside in Italy and are between **18 and 35 years of age**.\n If you are 18 to 30 years old, your Carta Giovani Nazionale also joins the **EYCA** (European Youth Card Association) circuit. \n\n[What is the EYCA circuit?](https://eyca.org/card/card-italy)\n\n#### Easy to activate\nYou just press “Activate National Youth Card” and in a couple of steps your card will be activated. **You don't need to provide any documents or details** during activation, the IO app will check if you are eligible.\nOnce activated, your CGN will be visible in the Wallet section.\n#### How to use it\n**On the IO app**, open the detail of the proposal you are interested in and follow the directions.\n**At the stores or physical counters** of the partners, log in to IO and show National Youth Card from your device. You don't have to provide any code, just show the card and, if requested, your ID.\n\n**If you are a resident of Lazio or Sardinia, you can take advantage of youth opportunities by downloading the regional card as well.**",
"tos_url": "https://io.italia.it/carta-giovani-nazionale/informativa-beneficiari",
"urls": [
{
Expand Down
38 changes: 23 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@
"description": "A mock server to help io-app development https://io.italia.it/",
"version": "1.0.0",
"main": "app.js",
"api_backend_specs": "https://raw.githubusercontent.com/pagopa/io-backend/v13.39.1-RELEASE/api_backend.yaml",
"api_public_specs": "https://raw.githubusercontent.com/pagopa/io-backend/v13.39.1-RELEASE/api_public.yaml",
"api_cgn": "https://raw.githubusercontent.com/pagopa/io-backend/v13.39.1-RELEASE/api_cgn.yaml",
"api_cgn_merchants": "https://raw.githubusercontent.com/pagopa/io-backend/v13.39.1-RELEASE/api_cgn_operator_search.yaml",
"api_backend_specs": "https://raw.githubusercontent.com/pagopa/io-backend/v14.3.0-RELEASE/api_backend.yaml",
"io_session_manager_api": "https://raw.githubusercontent.com/pagopa/io-auth-n-identity-domain/[email protected]/apps/io-session-manager/api/internal.yaml",
"io_session_manager_public_api": "https://raw.githubusercontent.com/pagopa/io-auth-n-identity-domain/[email protected]/apps/io-session-manager/api/public.yaml",
"api_public_specs": "https://raw.githubusercontent.com/pagopa/io-backend/v14.3.0-RELEASE/api_public.yaml",
"api_cgn": "https://raw.githubusercontent.com/pagopa/io-backend/v14.3.0-RELEASE/api_cgn.yaml",
"api_cgn_merchants": "https://raw.githubusercontent.com/pagopa/io-backend/v14.3.0-RELEASE/api_cgn_operator_search.yaml",
"api_cgn_geo": "https://raw.githubusercontent.com/pagopa/io-backend/here_geoapi_integration/api_geo.yaml",
"content_specs": "https://raw.githubusercontent.com/pagopa/io-services-metadata/2e55656fd79d1f600f9cb27f273779bb634579cc/definitions.yml",
"api_pagopa_walletv2": "https://raw.githubusercontent.com/pagopa/io-services-metadata/1.0.36/bonus/specs/bpd/pm/walletv2.json",
"api_pagopa_walletv2": "https://raw.githubusercontent.com/pagopa/io-services-metadata/1.0.42/bonus/specs/bpd/pm/walletv2.json",
"api_pagopa": "https://raw.githubusercontent.com/pagopa/io-app/master/assets/paymentManager/spec.json",
"pagopa_cobadge_configuration": "https://raw.githubusercontent.com/pagopa/io-services-metadata/1.0.36/pagopa/cobadge/abi_definitions.yml",
"pagopa_privative_configuration": "https://raw.githubusercontent.com/pagopa/io-services-metadata/1.0.36/pagopa/privative/definitions.yml",
"api_eu_covid_cert": "https://raw.githubusercontent.com/pagopa/io-backend/v13.39.1-RELEASE/api_eucovidcert.yaml",
"pagopa_cobadge_configuration": "https://raw.githubusercontent.com/pagopa/io-services-metadata/1.0.42/pagopa/cobadge/abi_definitions.yml",
"pagopa_privative_configuration": "https://raw.githubusercontent.com/pagopa/io-services-metadata/1.0.42/pagopa/privative/definitions.yml",
"api_eu_covid_cert": "https://raw.githubusercontent.com/pagopa/io-backend/v14.3.0-RELEASE/api_eucovidcert.yaml",
"api_cdc": "https://raw.githubusercontent.com/pagopa/io-app/master/assets/CdcSwagger.yml",
"api_fci": "https://raw.githubusercontent.com/pagopa/io-backend/v13.39.1-RELEASE/api_io_sign.yaml",
"api_pn": "https://raw.githubusercontent.com/pagopa/io-backend/v13.39.1-RELEASE/api_pn.yaml",
"api_idpay": "https://raw.githubusercontent.com/pagopa/cstar-infrastructure/v6.5.0/src/domains/idpay-app/api/idpay_appio_full/openapi.appio.full.yml",
"api_fast_login": "https://raw.githubusercontent.com/pagopa/io-backend/v13.39.1-RELEASE/openapi/generated/api_fast_login.yaml",
"api_trial_system": "https://raw.githubusercontent.com/pagopa/io-backend/v13.39.1-RELEASE/api_trial_system.yaml",
"api_fci": "https://raw.githubusercontent.com/pagopa/io-backend/v14.3.0-RELEASE/api_io_sign.yaml",
"api_pn": "https://raw.githubusercontent.com/pagopa/io-backend/v14.3.0-RELEASE/api_pn.yaml",
"api_idpay": "https://raw.githubusercontent.com/pagopa/cstar-infrastructure/v8.25.1/src/domains/idpay-app/api/idpay_appio_full/openapi.appio.full.yml",
"api_fast_login": "https://raw.githubusercontent.com/pagopa/io-auth-n-identity-domain/[email protected]/apps/io-session-manager/api/fast-login.yaml",
"api_trial_system": "https://raw.githubusercontent.com/pagopa/io-backend/v14.3.0-RELEASE/api_trial_system.yaml",
"api_pagopa_walletv3": "https://raw.githubusercontent.com/pagopa/pagopa-infra/v1.64.0/src/domains/pay-wallet-app/api/io-payment-wallet/v1/_openapi.json.tpl",
"api_pagopa_ecommerce": "https://raw.githubusercontent.com/pagopa/pagopa-infra/v1.64.0/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl",
"api_pagopa_biz_events": "https://raw.githubusercontent.com/pagopa/pagopa-biz-events-service/0.1.37/openapi/openapi_io_patch.json",
Expand All @@ -42,6 +44,7 @@
"prettier:check": "prettier --check \"src/**/*.(ts|tsx)\"",
"tsc:noemit": "tsc --noEmit",
"generate:models": "rimraf generated && rimraf generated/definitions/backend && mkdir -p generated/definitions/backend && gen-api-models --api-spec $npm_package_api_public_specs --out-dir generated/definitions/backend && gen-api-models --api-spec $npm_package_api_backend_specs --out-dir ./generated/definitions/backend --no-strict",
"generate:api-session_manager_api-definitions": "rimraf generated/definitions/session_manager && mkdir -p generated/definitions/session_manager && gen-api-models --api-spec $npm_package_io_session_manager_public_api --out-dir generated/definitions/session_manager && gen-api-models --api-spec $npm_package_io_session_manager_api --out-dir generated/definitions/session_manager --no-strict",
"generate:content-definitions": "rimraf generated/definitions/content && mkdir -p generated/definitions/content && gen-api-models --api-spec $npm_package_content_specs --out-dir ./generated/definitions/content",
"generate:pagopa-cobadge-configuration-definitions": "rimraf generated/definitions/pagopa/cobadge/configuration && mkdir -p generated/definitions/pagopa/cobadge/configuration && gen-api-models --api-spec $npm_package_pagopa_cobadge_configuration --out-dir ./generated/definitions/pagopa/cobadge/configuration",
"generate:pagopa-privative-configuration-definitions": "rimraf generated/definitions/pagopa/privative/configuration && mkdir -p generated/definitions/pagopa/privative/configuration && gen-api-models --api-spec $npm_package_pagopa_privative_configuration --out-dir ./generated/definitions/pagopa/privative/configuration",
Expand Down Expand Up @@ -76,20 +79,23 @@
"chalk": "^4.1.1",
"cli-ux": "^5.6.3",
"compare-versions": "^6.0.0-rc.1",
"cookie-parser": "^1.4.6",
"crypto": "^1.0.1",
"date-fns": "^2.27.0",
"express": "^4.17.3",
"express": "4.20.0",
"figlet": "^1.5.2",
"fp-ts": "^2.16.0",
"io-ts": "^2.2.20",
"jose": "^4.15.5",
"jsontokens": "^4.0.1",
"lodash": "^4.17.21",
"morgan": "^1.10.0",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.2",
"sha256": "^0.2.0",
"ts-pattern": "^3.3.4",
"ulid": "^2.3.0",
"uuid": "^9.0.1",
"xml2js": "^0.5.0"
},
"resolutions": {
Expand All @@ -99,15 +105,17 @@
"@faker-js/faker": "^7.6.0",
"@pagopa/openapi-codegen-ts": "^12.0.2",
"@types/body-parser": "^1.19.2",
"@types/cookie-parser": "^1.4.7",
"@types/date-fns": "^2.6.0",
"@types/express": "^4.17.13",
"@types/express": "^4.17.21",
"@types/figlet": "^1.5.4",
"@types/jest": "^27.4.0",
"@types/lodash": "^4.14.178",
"@types/morgan": "^1.9.3",
"@types/node": "^16.11.17",
"@types/sha256": "^0.2.0",
"@types/supertest": "^2.0.8",
"@types/uuid": "^9.0.8",
"@types/xml2js": "^0.4.11",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
Expand Down
46 changes: 44 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
WalletMethodConfig
} from "./types/config";
import { readFileAsJSON } from "./utils/file";
import { serverUrl } from "./utils/server";

export const staticContentRootPath = "/static_contents";
const root = path.resolve(".");
Expand All @@ -29,7 +30,7 @@ const defaultProfileAttrs: ProfileAttrs = {
mobile: "5555555555" as NonEmptyString,
fiscal_code: "TAMMRA80A41H501I" as FiscalCode,
email: "[email protected]" as EmailAddress,
accepted_tos_version: 4.8 as NonNegativeNumber,
accepted_tos_version: 4.91 as NonNegativeNumber,
preferred_languages: [PreferredLanguageEnum.it_IT],
reminder_status: ReminderStatusEnum.ENABLED,
push_notifications_content_type: PushNotificationsContentTypeEnum.FULL
Expand Down Expand Up @@ -182,7 +183,8 @@ const defaultConfig: IoDevServerConfig = {
cgn: {
isCgnEligible: true,
isEycaEligible: true,
allowRandomValues: true
allowRandomValues: true,
hangOnActivation: false
}
},
idpay: {
Expand All @@ -207,6 +209,46 @@ const defaultConfig: IoDevServerConfig = {
trials: {
["01J2GN4TA8FB6DPTAX3T3YD6M1" as TrialId]: SubscriptionStateEnum.ACTIVE // IT Wallet trial
},
fims: {
history: {
count: 52,
consentsEndpointFailureStatusCode: undefined,
exportEndpointFailureStatusCode: undefined,
exportProcessingTimeMilliseconds: 15000,
pageSize: 12
},
provider: {
federationCookieName: "_io_fims_token",
idTokenRawPrivateKey:
"278a5de700e29faae8e40e366ec5012b5ec63d36ec77e8a2417154cc1d25383f",
idTokenRawPublicKey:
"03fdd57adec3d438ea237fe46b33ee1e016eda6b585c3e27ea66686c2ea5358479",
idTokenSigningAlgorithm: "ES256K",
idTokenTTLMilliseconds: 15 * 60 * 1000,
ignoreFederationCookiePresence: false,
ignoreFederationCookieValue: true,
implicitCodeFlow: false,
interactionCookieKey: "_interaction",
interactionResumeCookieKey: "_interaction_resume",
interactionResumeSignatureCookieKey: "_interaction_resume.sig",
interactionSignatureCookieKey: "_interaction.sig",
interactionTTLMilliseconds: 5 * 60 * 1000,
sessionCookieKey: "_session",
sessionLegacyCookieKey: "_session.legacy",
sessionLegacySignatureCookieKey: "_session.legacy.sig",
sessionSignatureCookieKey: "_session.sig",
sessionTTLMilliseconds: 1 * 60 * 1000,
useLaxInsteadOfNoneForSameSiteOnSessionCookies: true
},
relyingParties: [
{
id: "1",
redirectUri: [`${serverUrl}/fims/relyingParty/1/redirectUri`],
registrationName: "Example Relying Party 1",
scopes: ["openid", "profile"]
}
]
},
allowRandomValues: true
}
};
Expand Down
Loading

0 comments on commit 0bcb271

Please sign in to comment.