Skip to content
Draft
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
2 changes: 1 addition & 1 deletion scripts/generate-api-models.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ declare -a noParams=(

declare -a noStrict=(
"./generated/definitions/fci https://raw.githubusercontent.com/pagopa/io-backend/$IO_BACKEND_VERSION/api_io_sign.yaml"
"./generated/definitions/idpay https://raw.githubusercontent.com/pagopa/cstar-securehub-infra-api-spec/refs/tags/v2.47.6/src/idpay/apim/api/idpay_appio_full/openapi.appio.full.yml"
"./generated/definitions/idpay https://raw.githubusercontent.com/pagopa/cstar-securehub-infra-api-spec/refs/tags/v3.10.2/src/idpay/apim/api/idpay_appio_full/openapi.appio.full.yml"
"./generated/definitions/services https://raw.githubusercontent.com/pagopa/io-backend/$IO_BACKEND_VERSION/api_services_app_backend.yaml"
)

Expand Down
9 changes: 6 additions & 3 deletions src/payloads/features/idpay/check-prerequisites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,18 @@ const familyUnityOnlyAutomatedCriteria: ReadonlyArray<AutomatedCriteriaDTO> = [
const criterionArray: ReadonlyArray<RowDataDTO> = [
{
description: "Criterion 1",
subDescription: "Subtitle criterion 1"
subDescription: "Subtitle criterion 1",
value: "1"
},
{
description: "Criterion 2",
subDescription: "Subtitle criterion 2"
subDescription: "Subtitle criterion 2",
value: "2"
},
{
description: "Criterion 3",
subDescription: "Subtitle criterion 3"
subDescription: "Subtitle criterion 3",
value: "3"
}
];
const selfDeclarationMulti: ReadonlyArray<SelfCriteriaMultiDTO> = [
Expand Down
11 changes: 6 additions & 5 deletions src/payloads/features/idpay/get-timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ export const getTimelineResponse = (
initiativeTimeline[initiativeId],
O.fromNullable,
O.map(timeline => {
const totalElements = timeline.length;
const totalPages = Math.ceil(totalElements / pageSize);
// limits defined by TimelineDTO
const totalElements = Math.min(timeline.length, 10);
const totalPages = Math.min(Math.ceil(totalElements / pageSize), 200);

const startIndex = (pageNo - 1) * pageSize;
const startIndex = pageNo * pageSize;
const endIndex = startIndex + pageSize;
const operationList = _.slice(timeline, startIndex, endIndex);

return {
lastUpdate: faker.date.recent({ days: 0.05 }),
operationList,
pageNo,
pageSize,
pageNo: Math.min(pageNo, 200),
pageSize: Math.min(pageSize, 50),
totalElements,
totalPages
} as TimelineDTO;
Expand Down
Loading