diff --git a/img/bonus/siciliaVola/emptyVoucherList.svg b/img/bonus/siciliaVola/emptyVoucherList.svg
deleted file mode 100644
index 07def6e41a8..00000000000
--- a/img/bonus/siciliaVola/emptyVoucherList.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
diff --git a/img/bonus/siciliaVola/generateVoucherTimeout.svg b/img/bonus/siciliaVola/generateVoucherTimeout.svg
deleted file mode 100755
index 0247086b882..00000000000
--- a/img/bonus/siciliaVola/generateVoucherTimeout.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
\ No newline at end of file
diff --git a/locales/de/index.yml b/locales/de/index.yml
index 7002712991e..15ec89626fc 100644
--- a/locales/de/index.yml
+++ b/locales/de/index.yml
@@ -691,7 +691,6 @@ authentication:
error_1001: "Zugang verweigert: Du hast nicht das Mindestalter für die Nutzung von IO"
expiredSessionBanner:
title: "Sicherheitshinweis"
- message: "Um deine privaten Daten zu schützen, melde dich bitte erneut mit deinen SPID-Anmeldedaten an, danke!"
unlock:
title: "Zugang entsperren"
subtitlel2: "Um die App nutzen zu können, müsst du zunächst den Zugang zu IO entsperren."
@@ -2436,16 +2435,6 @@ fastLogin:
whatsNew:
title: "Wir haben den Zugang zu IO verbessert!"
subtitle: "Du musst dich jetzt nur noch einmal im Jahr mit deinem SPID oder deiner CIE authentifizieren. Danach brauchst du dich nur noch mit deinem Entsperrcode oder biometrischen Merkmalen anmelden."
- changes:
- first:
- title: "Einfacher"
- description: "Zugang nur durch Eingabe des Entsperrcodes der App oder mit biometrischen Merkmalen."
- second:
- title: "Schneller"
- description: "Wir werden dich nur einmal im Jahr oder wenn du dich aus der App ausloggst auffordern, dich mit SPID oder CIE zu authentifizieren."
- third:
- title: "Sicherer"
- description: "Jedes Mal, wenn du dich erneut mit SPID oder CIE anmeldest, senden wir dir eine E-Mail."
whatsNew:
title: "Was ändert sich?"
bonusCard:
diff --git a/locales/en/index.yml b/locales/en/index.yml
index 0becb7c5eb9..feca83dc088 100644
--- a/locales/en/index.yml
+++ b/locales/en/index.yml
@@ -728,7 +728,6 @@ authentication:
error_1001: "Access Denied: You are not of the minimum age required to use IO"
expiredSessionBanner:
title: Security notice
- message: To keep your private information safe, please login again with your SPID credentials, thanks!
unlock:
title: Unlock access
subtitlel2: In order to use the app, you must first unlock access to IO.
@@ -2571,174 +2570,6 @@ bonus:
other: "{{seconds}} seconds"
sv:
headerTitle: "Sicilia Vola"
- voucherGeneration:
- acceptTos:
- alert:
- title: "Attention"
- message: "We inform you that the information you enter constitutes in effect a self-certification. Any false declarations will be punishable under the d.P.R. 445/2000"
- buttons:
- ok: "Continue"
- ko: "Abort"
- buttons:
- requestBonus: "Request a discount code"
- checkResidence:
- title: "Residency's region"
- items:
- inSicily: "I reside in Sicily"
- notInSicily: "I reside in a different region"
- info: "Please remember that the discount is available only to residents of Sicily"
- selectBeneficiaryCategory:
- title: "I declare to be"
- categories:
- student: "Off-site student"
- disabled: "Severely disabled"
- worker: "Employee with a workplace outside Sicily"
- sick: "Patient in need of treatment outside the Sicily region"
- other: "None of the above"
- student:
- selectDestination:
- title: "StudentSelectDestinationScreen"
- disabled:
- additionalInfo:
- title: "Additional informations"
- disclaimer:
- normal: "I declare that I meet the requirements referred to in "
- link: "Article 3, paragraph 3, of the law of February 5, 1992, no. 104"
- worker:
- selectDestination:
- title: "WorkerSelectDestinationScreen"
- sick:
- selectDestination:
- title: "SickSelectDestinationScreen"
- checkIncome:
- title: "I also declare"
- threshold:
- under: "to have a gross annual income of less than or equal to {{amount}}"
- over: "to have a gross annual income exceeding {{amount}}"
- selectFlightsDate:
- title: "Flight date"
- subtitle: "Please indicate the type of flight and the date (s) you will travel on"
- flights_choice:
- departure: "One way flight"
- return: "Round trip"
- labels:
- departure: "Departure date"
- return: "Return date"
- summary:
- title: "Summary"
- subtitle1:
- normal1: "By continuing, you declare under your responsibility and aware of the penal sanctions in case of untruthful declarations and false acts ("
- link: "art.76 of the Presidential Decree of 28 December 2000, n.445"
- normal2: ") that you meet the following requirements:"
- subtitle2: "And to request a discount code for a flight with the following characteristics:"
- fields:
- residence:
- label: "Residence:"
- value: "Sicily"
- category:
- label: "Category:"
- value:
- disabled: "Severely disabled pursuant to article 3, paragraph 3, of law no. 104"
- student: "Off-site student"
- worker: "Employee with a workplace outside Sicily"
- sick: "Patient in need of treatment outside the Sicily region"
- flightDate:
- label: "Flight date:"
- disabled: "All"
- availableDestination: "Possible destinations:"
- voucherGenerated:
- title: "Here is your discount code"
- subtitle: "Enter it on the portal or communicate it at the ticket office of the company when purchasing the ticket. We remind you that the code is nominative and cannot be used by others."
- ko:
- checkIncome:
- title: "You do not have the features to access the discounts."
- body: "Sicilia Vola discounts are dedicated only to those with a gross personal income of less than € 25,000."
- selectBeneficiaryCategory:
- title: "You do not have the features to access the discounts."
- body: "Sicilia Vola discounts are dedicated only to the categories presented in the previous screen."
- checkResidence:
- title: "You do not have the features to access the discounts."
- body: "Sicilia Vola discounts are dedicated only to residents of Sicily."
- timeout:
- title: "Your Sicilia Vola discount code is being generated."
- body: "You will receive a message in the IO app when it is ready."
- voucherList:
- title: "Your discount codes available"
- loading: "Loading"
- filter:
- title: "Filter vouchers"
- searchValuePlaceholder: "Search coupon code"
- stateSection:
- title: "State"
- dateSection:
- title: "Date"
- departure: "Departure date"
- return: "Return date"
- cta:
- removeFilter: "Remove"
- applyFilter:
- zero: "Apply filters"
- other: "Apply filters ({{count}})"
- emptyList:
- title: "There are no discount codes available"
- subtitle: "Search to see your used or expired codes or request a new code"
- cta: "Generate a new code"
- error: "We are unable to recover your vouchers, please try again."
- details:
- title: "Your discount code"
- fields:
- uniqueCode: "Unique code"
- beneficiary: "Beneficiary"
- residence:
- label: "Residence"
- value: "Sicily"
- category: "Category"
- flightDate: "Flight date"
- possibleDestination: "Possible destinations"
- cta:
- voucherRevocation: "Voucher revocation"
- openQr: "Open QR code"
- voucherRevocation:
- alert:
- title: "Attention"
- message: "Are you sure you want to proceed? The discount code will be deleted."
- cta:
- ok: "Continue"
- ko: "Cancel the request"
- toast:
- ok: "Voucher successfully deleted"
- ko: "Error while deleting the voucher. Try again"
- components:
- voucherVisualDetails:
- uniqueCode: "Unique code"
- qrCode: "QR Code"
- barCode: "Bar Code"
- destinationLabels:
- universityName: "University name"
- companyName: "Company name"
- hospitalName: "Hospital or professional name"
- municipality: "Municipality"
- voucherBottomsheet:
- title: "Sicilia Vola discount code"
- cta:
- exit: "Exit"
- voucherRevocation: "Voucher revocation"
- destinationSelector:
- state:
- title: "Select a state"
- label: "State"
- placeholder: "Select a state"
- municipality:
- title: "Select a municipality"
- label: "Municipality"
- placeholder: "Select a municipality"
- ko:
- label1: "Error loading municipalities. "
- label2: "Try again"
- pdfVoucher:
- toast:
- ok: "Voucher saved successfully"
- ko: "Problems saving the voucher"
cdc:
title: "Carta della cultura"
serviceCta:
@@ -3582,16 +3413,6 @@ fastLogin:
whatsNew:
title: Logging into IO just got easier!
subtitle: From now on, to log into the app you'll have to use your SPID or CIE only once a year. After that you can just use your unlock code, fingerprint or face.
- changes:
- first:
- title: Easier
- description: log in with just your unlock code, fingerprint or face.
- second:
- title: Faster
- description: use your SPID or CIE only once a year or in case you log out.
- third:
- title: Safer
- description: every time a login with SPID or CIE is performed, we'll send you an e-mail to let you know.
whatsNew:
title: What's changed?
bonusCard:
diff --git a/locales/it/index.yml b/locales/it/index.yml
index 61e0f26a76a..d55a2f36ae3 100644
--- a/locales/it/index.yml
+++ b/locales/it/index.yml
@@ -728,7 +728,6 @@ authentication:
error_1001: "Accesso negato: non hai l'età minima richiesta per usare IO"
expiredSessionBanner:
title: Avviso di sicurezza
- message: Per mantenere al sicuro i tuoi dati privati, accedi nuovamente con le tue credenziali SPID, grazie!
unlock:
title: Sblocca l’accesso
subtitlel2: Per poter usare l'app, devi prima sbloccare l'accesso a IO.
@@ -2571,174 +2570,6 @@ bonus:
other: "{{seconds}} secondi"
sv:
headerTitle: "Sicilia Vola"
- voucherGeneration:
- acceptTos:
- alert:
- title: "Attenzione"
- message: "Ti informiamo che le informazioni che inserirai costituiscono a tutti gli effetti una autocertificazione. Eventuali dichiarazioni mendaci saranno perseguibili ai sensi del d.P.R. n.445/2000"
- buttons:
- ok: "Continua"
- ko: "Annulla richiesta"
- buttons:
- requestBonus: "Richiedi un codice sconto"
- checkResidence:
- title: "Regione di residenza"
- items:
- inSicily: "Risiedo in Sicilia"
- notInSicily: "Risiedo in un'altra regione"
- info: "Ricorda che gli sconti sono diponibili solo per i cittadini residenti in Sicilia."
- selectBeneficiaryCategory:
- title: "Dichiaro di essere"
- categories:
- student: "Studente fuori sede"
- disabled: "Disabile grave"
- worker: "Lavoratore dipendente con sede lavorativa al di fuori della Sicilia"
- sick: "Paziente con necessità di cure al di fuori della Sicilia"
- other: "Nessuno dei precedenti"
- student:
- selectDestination:
- title: "StudentSelectDestinationScreen"
- disabled:
- additionalInfo:
- title: "Informazioni aggiuntive"
- disclaimer:
- normal: "Dichiaro di possedere i requisiti di cui all’"
- link: "articolo 3, comma 3, della legge 5 febbraio 1992, n. 104"
- worker:
- selectDestination:
- title: "WorkerSelectDestinationScreen"
- sick:
- selectDestination:
- title: "SickSelectDestinationScreen"
- checkIncome:
- title: "Dichiaro inoltre"
- threshold:
- under: "di avere un reddito lordo annuo inferiore o uguale a {{amount}}"
- over: "di avere un reddito lordo annuo superiore a {{amount}}"
- selectFlightsDate:
- title: "Data del volo"
- subtitle: "Indica il tipo di volo e la/le data/e in cui viaggerai"
- flights_choice:
- departure: "Volo di sola andata"
- return: "Andata e ritorno"
- labels:
- departure: "Data di partenza"
- return: "Data di ritorno"
- summary:
- title: "Riepilogo"
- subtitle1:
- normal1: "Proseguendo dichiari sotto la tua responsabilità e consapevole delle sanzioni penali in caso di dichiarazioni non veritiere e di falsità negli atti ("
- link: "art. 76 del d.P.R. 28 Dicembre 2000, n.445"
- normal2: ") di possedere i seguenti requisiti"
- subtitle2: "E di richiedere un codice sconto per un volo con le seguenti caratteristiche:"
- fields:
- residence:
- label: "Residenza:"
- value: "Sicilia"
- category:
- label: "Categoria:"
- value:
- disabled: "Disabile grave ai sensi dell’articolo 3, comma 3, della legge 5 febbraio 1992, n. 104"
- student: "Studente fuori sede"
- worker: "Lavoratore dipendente con sede lavorativa al di fuori della Sicilia"
- sick: "Paziente con necessità di cure al di fuori della regione Sicilia"
- flightDate:
- label: "Data del volo:"
- disabled: "Tutte"
- availableDestination: "Possibili destinazioni:"
- voucherGenerated:
- title: "Ecco il tuo codice sconto"
- subtitle: "Inseriscilo sul portale o comunicalo alla biglietteria della compagnia in fase di acquisto del biglietto. Ti ricordiamo che il codice è nominativo e non può essere usato da altri."
- ko:
- checkIncome:
- title: "Siamo spiacenti.\nNon hai le caratteristiche per accedere agli sconti."
- body: "Gli sconti Sicilia Vola sono dedicati solo a chi ha un reddito personale lordo inferiore a 25.000€."
- selectBeneficiaryCategory:
- title: "Siamo spiacenti.\nNon hai le caratteristiche per accedere agli sconti."
- body: "Gli sconti Sicilia Vola sono dedicati solo alle categorie presentate nella schermata precedente."
- checkResidence:
- title: "Siamo spiacenti.\nNon hai le caratteristiche per accedere agli sconti."
- body: "Gli sconti Sicilia Vola sono dedicati solo ai residenti in Sicilia."
- timeout:
- title: "Il tuo codice sconto Sicilia Vola è in fase di generazione."
- body: "Riceverai un messaggio in app IO quando sarà pronto."
- voucherList:
- title: "I tuoi codici sconto disponibili"
- loading: "Caricamento in corso"
- filter:
- title: "Filtra voucher"
- searchValuePlaceholder: "Cerca codice buono"
- stateSection:
- title: "Stato"
- dateSection:
- title: "Data"
- departure: "Data di partenza"
- return: "Data di ritorno"
- cta:
- removeFilter: "Rimuovi"
- applyFilter:
- zero: "Applica filtri"
- other: "Applica filtri ({{count}})"
- emptyList:
- title: "Non ci sono codici sconto disponibili"
- subtitle: "Fai una ricerca per vedere i tuoi codici utilizzati o scaduti oppure richiedi un nuovo codice"
- cta: "Genera un nuovo codice"
- error: "Non riusciamo a recuperare i tuoi voucher, riprova per piacere."
- details:
- title: "Il tuo codice sconto"
- fields:
- uniqueCode: "Codice univoco"
- beneficiary: "Beneficiario"
- residence:
- label: "Residenza"
- value: "Sicilia"
- category: "Categoria"
- flightDate: "Data del volo"
- possibleDestination: "Possibili destinazioni"
- cta:
- voucherRevocation: "Revoca voucher"
- openQr: "Apri QR code"
- voucherRevocation:
- alert:
- title: "Attenzione"
- message: "Sei sicuro di voler procedere? Il codice sconto sarà eliminato."
- cta:
- ok: "Continua"
- ko: "Annulla la richiesta"
- toast:
- ok: "Voucher eliminato correttamente"
- ko: "Errore durante l'eliminazione del voucher. Riprova"
- components:
- voucherVisualDetails:
- uniqueCode: "Codice univoco"
- qrCode: "QR Code"
- barCode: "Bar Code"
- destinationLabels:
- universityName: "Nome ateneo"
- companyName: "Ragione sociale azienda"
- hospitalName: "Nome struttura o professionista"
- municipality: "Comune"
- voucherBottomsheet:
- title: "Codice sconto Sicilia Vola"
- cta:
- exit: "Esci"
- voucherRevocation: "Revoca voucher"
- destinationSelector:
- state:
- title: "Seleziona uno stato"
- label: "Stato"
- placeholder: "Seleziona uno stato"
- municipality:
- title: "Seleziona un comune"
- label: "Comune"
- placeholder: "Seleziona un comune"
- ko:
- label1: "Errore durante il caricamento dei comuni. "
- label2: "Riprova"
- pdfVoucher:
- toast:
- ok: "Voucher salvato con successo"
- ko: "Problemi durante il salvataggio del voucher"
cdc:
title: "Carta della cultura"
serviceCta:
@@ -3582,16 +3413,6 @@ fastLogin:
whatsNew:
title: Abbiamo migliorato l’accesso a IO!
subtitle: Ora puoi accedere all'app utilizzando il tuo SPID o la tua CIE solo una volta all'anno. Ti basterà poi utilizzare il tuo codice di sblocco o il biometrico per entrare.
- changes:
- first:
- title: Più semplice
- description: accedi inserendo solo il codice di sblocco dell’app o con il biometrico.
- second:
- title: Più veloce
- description: ti chiederemo di autenticarti con SPID o CIE solo una volta all’anno o se ti disconnetti dall’app.
- third:
- title: Più sicura
- description: a ogni nuovo accesso con SPID o CIE, ti invieremo un’email.
whatsNew:
title: Cosa cambia?
bonusCard:
diff --git a/package.json b/package.json
index 6e117536a82..666edefe7ba 100644
--- a/package.json
+++ b/package.json
@@ -8,10 +8,8 @@
"io_cgn_merchants_specs": "https://raw.githubusercontent.com/pagopa/io-backend/v13.29.2-RELEASE/api_cgn_operator_search.yaml",
"api_fci": "https://raw.githubusercontent.com/pagopa/io-backend/v13.25.1-RELEASE/api_io_sign.yaml",
"io_eu_covid_cert": "https://raw.githubusercontent.com/pagopa/io-backend/v13.25.1-RELEASE/api_eucovidcert.yaml",
- "io_sicilia_vola_token": "https://raw.githubusercontent.com/pagopa/io-backend/v13.25.1-RELEASE/api_mit_voucher.yaml",
"io_pn_specs": "https://raw.githubusercontent.com/pagopa/io-backend/v13.25.1-RELEASE/api_pn.yaml",
"io_consumed_pn_specs": "https://raw.githubusercontent.com/pagopa/io-backend/v13.25.1-RELEASE/openapi/consumed/api-piattaforma-notifiche.yaml",
- "api_sicilia_vola": "assets/SiciliaVola.yml",
"api_cdc": "assets/CdcSwagger.yml",
"pagopa_api": "assets/paymentManager/spec.json",
"pagopa_api_walletv2": "https://raw.githubusercontent.com/pagopa/io-services-metadata/1.0.30/bonus/specs/bpd/pm/walletv2.json",
@@ -61,8 +59,6 @@
"generate:cgn-definitions": "rimraf definitions/cgn && mkdir -p definitions/cgn && gen-api-models --api-spec $npm_package_io_cgn_specs --out-dir ./definitions/cgn --no-strict --request-types --response-decoders",
"generate:cgn-merchants-definitions": "rimraf definitions/cgn/merchants && mkdir -p definitions/cgn/merchants && gen-api-models --api-spec $npm_package_io_cgn_merchants_specs --out-dir ./definitions/cgn/merchants --no-strict --request-types --response-decoders",
"generate:eu-covid-cert": "rimraf definitions/eu_covid_cert && mkdir -p definitions/eu_covid_cert && gen-api-models --api-spec $npm_package_io_eu_covid_cert --out-dir ./definitions/eu_covid_cert --no-strict --request-types --response-decoders",
- "generate:io_sicilia_vola_token": "rimraf definitions/io_sicilia_vola_token && mkdir -p definitions/io_sicilia_vola_token && gen-api-models --api-spec $npm_package_io_sicilia_vola_token --out-dir ./definitions/io_sicilia_vola_token --no-strict --request-types --response-decoders",
- "generate:sicilia_vola_api": "rimraf definitions/api_sicilia_vola && mkdir -p definitions/api_sicilia_vola && gen-api-models --api-spec $npm_package_api_sicilia_vola --out-dir ./definitions/api_sicilia_vola --no-strict --request-types --response-decoders",
"generate:pn-definitions": "rimraf definitions/pn && mkdir -p definitions/pn && gen-api-models --api-spec $npm_package_io_consumed_pn_specs --out-dir ./definitions/pn && gen-api-models --api-spec $npm_package_io_pn_specs --out-dir ./definitions/pn --no-strict --request-types --response-decoders",
"generate:pagopa-api-walletv2": "rimraf definitions/pagopa/walletv2 && mkdir -p definitions/pagopa/walletv2 && gen-api-models --api-spec $npm_package_pagopa_api_walletv2 --out-dir ./definitions/pagopa/walletv2 --no-strict --request-types --response-decoders",
"generate:pagopa-cobadge-configuration": "rimraf definitions/pagopa/cobadge/configuration && mkdir -p definitions/pagopa/cobadge/configuration && gen-api-models --api-spec $npm_package_pagopa_cobadge_configuration --out-dir ./definitions/pagopa/cobadge/configuration",
@@ -72,7 +68,6 @@
"bundle:android-release": "node node_modules/react-native/local-cli/cli.js bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/",
"generate:locales": "ts-node --skip-project -O '{\"lib\":[\"es2015\"]}' scripts/make-locales.ts",
"generate:cgn": "npm-run-all generate:cgn-definitions generate:cgn-merchants-definitions",
- "generate:sicilia_vola": "npm-run-all generate:io_sicilia_vola_token generate:sicilia_vola_api",
"generate:cdc": "npm-run-all generate:cdc-api",
"generate:pn": "npm-run-all generate:pn-definitions",
"generate:fci": "npm-run-all generate:fci-api",
diff --git a/ts/features/bonus/common/store/actions/index.ts b/ts/features/bonus/common/store/actions/index.ts
index 645de11800f..f5869b862ce 100644
--- a/ts/features/bonus/common/store/actions/index.ts
+++ b/ts/features/bonus/common/store/actions/index.ts
@@ -1,10 +1,5 @@
import { CdcActions } from "../../../cdc/store/actions";
import { CgnActions } from "../../../cgn/store/actions";
-import { SvActions } from "../../../siciliaVola/store/actions";
import { AvailableBonusesActions } from "./availableBonusesTypes";
-export type BonusActions =
- | AvailableBonusesActions
- | CgnActions
- | SvActions
- | CdcActions;
+export type BonusActions = AvailableBonusesActions | CgnActions | CdcActions;
diff --git a/ts/features/bonus/common/store/reducers/index.ts b/ts/features/bonus/common/store/reducers/index.ts
index 31659451b06..192e7801417 100644
--- a/ts/features/bonus/common/store/reducers/index.ts
+++ b/ts/features/bonus/common/store/reducers/index.ts
@@ -2,7 +2,6 @@ import { combineReducers } from "redux";
import { Action } from "../../../../../store/actions/types";
import cdcReducer, { CdcState } from "../../../cdc/store/reducers";
import cgnReducer, { CgnState } from "../../../cgn/store/reducers";
-import svReducer, { SvState } from "../../../siciliaVola/store/reducers";
import availableBonusesReducer, {
AvailableBonusTypesState
} from "./availableBonusesTypes";
@@ -10,14 +9,12 @@ import availableBonusesReducer, {
export type BonusState = Readonly<{
availableBonusTypes: AvailableBonusTypesState;
cgn: CgnState;
- sv: SvState;
cdc: CdcState;
}>;
const bonusReducer = combineReducers({
availableBonusTypes: availableBonusesReducer,
cgn: cgnReducer,
- sv: svReducer,
cdc: cdcReducer
});
diff --git a/ts/features/bonus/siciliaVola/analytics/placeholder b/ts/features/bonus/siciliaVola/analytics/placeholder
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/ts/features/bonus/siciliaVola/api/backendSiciliaVola.ts b/ts/features/bonus/siciliaVola/api/backendSiciliaVola.ts
deleted file mode 100644
index aa53c80f90b..00000000000
--- a/ts/features/bonus/siciliaVola/api/backendSiciliaVola.ts
+++ /dev/null
@@ -1,234 +0,0 @@
-import {
- ApiHeaderJson,
- composeHeaderProducers,
- createFetchRequestForApi
-} from "@pagopa/ts-commons/lib/requests";
-import { Omit } from "@pagopa/ts-commons/lib/types";
-import { pipe } from "fp-ts/lib/function";
-import { AeroportiAmmessiInputBean } from "../../../../../definitions/api_sicilia_vola/AeroportiAmmessiInputBean";
-import {
- annullaVoucherDefaultDecoder,
- AnnullaVoucherT,
- getAeroportiAmmessiDefaultDecoder,
- GetAeroportiAmmessiT,
- getListaComuniBySiglaProvinciaDefaultDecoder,
- GetListaComuniBySiglaProvinciaT,
- getListaProvinceByIdRegioneDefaultDecoder,
- GetListaProvinceByIdRegioneT,
- getListaRegioniDefaultDecoder,
- GetListaRegioniT,
- getPdfDefaultDecoder,
- GetPdfT,
- getStatiUEDefaultDecoder,
- GetStatiUET,
- getStatiVoucherDefaultDecoder,
- GetStatiVoucherT,
- getVoucherBeneficiarioDefaultDecoder,
- GetVoucherBeneficiarioT
-} from "../../../../../definitions/api_sicilia_vola/requestTypes";
-import { VoucherBeneficiarioInputBean } from "../../../../../definitions/api_sicilia_vola/VoucherBeneficiarioInputBean";
-import { VoucherCodeInputBean } from "../../../../../definitions/api_sicilia_vola/VoucherCodeInputBean";
-import { MitVoucherToken } from "../../../../../definitions/io_sicilia_vola_token/MitVoucherToken";
-import {
- getMitVoucherTokenDefaultDecoder,
- GetMitVoucherTokenT
-} from "../../../../../definitions/io_sicilia_vola_token/requestTypes";
-import { SessionToken } from "../../../../types/SessionToken";
-import {
- tokenHeaderProducer,
- withBearerToken as withToken
-} from "../../../../utils/api";
-import { defaultRetryingFetch } from "../../../../utils/fetch";
-
-/**
- * Get the Sicilia Vola session token
- */
-const GetMitVoucherToken: GetMitVoucherTokenT = {
- method: "get",
- url: () => "/api/v1/mitvoucher/auth/token",
- query: _ => ({}),
- headers: composeHeaderProducers(tokenHeaderProducer, ApiHeaderJson),
- response_decoder: getMitVoucherTokenDefaultDecoder()
-};
-
-/**
- * Get the list of states selectable by the user
- */
-const GetStatiUE: GetStatiUET = {
- method: "get",
- url: () => "/api/v1/mitvoucher/data/rest/unsecured/statiUE",
- query: _ => ({}),
- headers: _ => ({}),
- response_decoder: getStatiUEDefaultDecoder()
-};
-
-/**
- * Get the list of regions selectable by the user
- */
-const GetListaRegioni: GetListaRegioniT = {
- method: "get",
- url: () => "/api/v1/mitvoucher/data/rest/unsecured/regioni",
- query: _ => ({}),
- headers: _ => ({}),
- response_decoder: getListaRegioniDefaultDecoder()
-};
-
-/**
- * Get the list of province selectable by the user given a regionID
- */
-const GetListaProvinceByIdRegione: GetListaProvinceByIdRegioneT = {
- method: "get",
- url: params =>
- `/api/v1/mitvoucher/data/rest/unsecured/province/${params.idRegione}`,
- query: _ => ({}),
- headers: _ => ({}),
- response_decoder: getListaProvinceByIdRegioneDefaultDecoder()
-};
-
-/**
- * Get the list of municipalities selectable by the user given a province abbreviation
- */
-const GetListaComuniBySiglaProvincia: GetListaComuniBySiglaProvinciaT = {
- method: "get",
- url: params =>
- `/api/v1/mitvoucher/data/rest/unsecured/comuni/${params.siglaProvincia}`,
- query: _ => ({}),
- headers: _ => ({}),
- response_decoder: getListaComuniBySiglaProvinciaDefaultDecoder()
-};
-
-/**
- * Get the list of the airports available for the voucher given a stateId, a longitude and a latitude
- */
-const GetAeroportiAmmessi: GetAeroportiAmmessiT = {
- method: "post",
- url: _ =>
- `/api/v1/mitvoucher/data/rest/secured/beneficiario/aeroportiAmmessi`,
- query: _ => ({}),
- body: ({ body }) => JSON.stringify({ body }),
- headers: composeHeaderProducers(tokenHeaderProducer, ApiHeaderJson),
- response_decoder: getAeroportiAmmessiDefaultDecoder()
-};
-
-/**
-/**
- * Revoke a voucher identified by id
- */
-const PostAnnullaVoucher: AnnullaVoucherT = {
- method: "post",
- url: _ => `/api/v1/mitvoucher/data/rest/secured/beneficiario/annullaVoucher`,
- query: _ => ({}),
- body: ({ body }) => JSON.stringify(body),
- headers: composeHeaderProducers(tokenHeaderProducer, ApiHeaderJson),
- response_decoder: annullaVoucherDefaultDecoder()
-};
-
-/**
- * Get the list of user's vouchers
- *
- * TODO: modify post in get and add auth header when the swagger will be fixed
- */
-const GetVoucherBeneficiario: GetVoucherBeneficiarioT = {
- method: "post",
- url: _ => `/api/v1/mitvoucher/data/rest/secured/beneficiario/ricercaVoucher`,
- query: _ => ({}),
- body: voucherListRequest => JSON.stringify(voucherListRequest),
- headers: ApiHeaderJson,
- response_decoder: getVoucherBeneficiarioDefaultDecoder()
-};
-
-/**
- * Get the possible voucher state
- *
- * TODO: modify post in get and add auth header when the swagger will be fixed
- */
-const GetStatiVoucher: GetStatiVoucherT = {
- method: "get",
- url: _ => `/api/v1/mitvoucher/data/rest/secured/beneficiario/statiVoucher`,
- query: _ => ({}),
- headers: ApiHeaderJson,
- response_decoder: getStatiVoucherDefaultDecoder()
-};
-
-/**
- * Get the pdf voucher
- *
- */
-const GetStampaVoucher: GetPdfT = {
- method: "post",
- url: _ => `/api/v1/mitvoucher/data/rest/secured/beneficiario/stampaVoucher`,
- query: _ => ({}),
- body: ({ body }) => JSON.stringify(body),
- headers: composeHeaderProducers(tokenHeaderProducer, ApiHeaderJson),
- response_decoder: getPdfDefaultDecoder()
-};
-
-const withSiciliaVolaToken =
-