From 6ce4a03f32794f49730ab92eec5183536ea59d88 Mon Sep 17 00:00:00 2001 From: "Stefano.D'aversa" Date: Tue, 3 Jan 2023 13:19:35 +0100 Subject: [PATCH 1/2] add reference to package io-backend --- SetUserSessionLockActivity/__tests__/handler.test.ts | 2 +- SetUserSessionLockActivity/handler.ts | 2 +- package.json | 2 +- utils/__tests__/sessionApiClient.test.ts | 4 ++-- utils/sessionApiClient.ts | 2 +- yarn.lock | 9 +++++++++ 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/SetUserSessionLockActivity/__tests__/handler.test.ts b/SetUserSessionLockActivity/__tests__/handler.test.ts index 74170775..cd82eb30 100644 --- a/SetUserSessionLockActivity/__tests__/handler.test.ts +++ b/SetUserSessionLockActivity/__tests__/handler.test.ts @@ -5,7 +5,7 @@ import * as t from "io-ts"; import { readableReport } from "@pagopa/ts-commons/lib/reporters"; import { context } from "../../__mocks__/durable-functions"; import { aFiscalCode } from "../../__mocks__/mocks"; -import { SuccessResponse } from "../../generated/session-api/SuccessResponse"; +import { SuccessResponse } from "@pagopa/io-backend-session-sdk/SuccessResponse"; import { Client } from "../../utils/sessionApiClient"; import { ActivityInput, diff --git a/SetUserSessionLockActivity/handler.ts b/SetUserSessionLockActivity/handler.ts index 371d294c..63741700 100644 --- a/SetUserSessionLockActivity/handler.ts +++ b/SetUserSessionLockActivity/handler.ts @@ -9,7 +9,7 @@ import * as t from "io-ts"; import { readableReport } from "@pagopa/ts-commons/lib/reporters"; import { FiscalCode } from "@pagopa/ts-commons/lib/strings"; import { flow, pipe } from "fp-ts/lib/function"; -import { SuccessResponse } from "../generated/session-api/SuccessResponse"; +import { SuccessResponse } from "@pagopa/io-backend-session-sdk/SuccessResponse"; import { Client } from "../utils/sessionApiClient"; // eslint-disable-next-line prefer-arrow/prefer-arrow-functions diff --git a/package.json b/package.json index 72b10f2c..c3692e90 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "dist:zip": "zip -r dist.zip . --exclude @.funcignore --exclude .funcignore", "predeploy": "npm-run-all generate build dist:modules", "generate:definitions": "rimraf ./generated/definitions && shx mkdir -p ./generated/definitions && gen-api-models --api-spec ./openapi/index.yaml --out-dir ./generated/definitions", - "generate:session-api": "rimraf ./generated/session-api && gen-api-models --api-spec https://raw.githubusercontent.com/pagopa/io-backend/v7.19.3/api_session.yaml --out-dir ./generated/session-api --request-types --response-decoders", "generate": "npm-run-all generate:*", "preversion": "auto-changelog --config .auto-changelog.json --unreleased --commit-limit false --stdout --template preview.hbs", "version": "auto-changelog -p --config .auto-changelog.json --unreleased && git add CHANGELOG.md" @@ -62,6 +61,7 @@ "@azure/ms-rest-js": "^2.6.4", "@azure/ms-rest-nodeauth": "^2.0.6", "@pagopa/express-azure-functions": "^2.0.0", + "@pagopa/io-backend-session-sdk": "^9.7.0", "@pagopa/io-functions-commons": "^25.5.2", "@pagopa/ts-commons": "^10.9.0", "@types/archiver": "^3.1.1", diff --git a/utils/__tests__/sessionApiClient.test.ts b/utils/__tests__/sessionApiClient.test.ts index 18bc1c9e..dbe12ea6 100644 --- a/utils/__tests__/sessionApiClient.test.ts +++ b/utils/__tests__/sessionApiClient.test.ts @@ -3,8 +3,8 @@ import { readableReport } from "@pagopa/ts-commons/lib/reporters"; import { aFiscalCode } from "../../__mocks__/mocks"; import { createMockFetch } from "../../__mocks__/node-fetch"; -import { ProblemJson } from "../../generated/session-api/ProblemJson"; -import { SuccessResponse } from "../../generated/session-api/SuccessResponse"; +import { ProblemJson } from "@pagopa/io-backend-session-sdk/ProblemJson"; +import { SuccessResponse } from "@pagopa/io-backend-session-sdk/SuccessResponse"; import { createClient, WithDefaultsT } from "../sessionApiClient"; import * as E from "fp-ts/lib/Either"; import { pipe } from "fp-ts/lib/function"; diff --git a/utils/sessionApiClient.ts b/utils/sessionApiClient.ts index 17801162..8714f11d 100644 --- a/utils/sessionApiClient.ts +++ b/utils/sessionApiClient.ts @@ -18,7 +18,7 @@ import { lockUserSessionDefaultDecoder, UnlockUserSessionT, unlockUserSessionDefaultDecoder -} from "../generated/session-api/requestTypes"; +} from "@pagopa/io-backend-session-sdk/requestTypes"; import { identity } from "fp-ts/lib/function"; export type ApiOperation = TypeofApiCall & diff --git a/yarn.lock b/yarn.lock index e62ed65c..a7ab41a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -984,6 +984,15 @@ resolved "https://registry.yarnpkg.com/@pagopa/express-azure-functions/-/express-azure-functions-2.0.0.tgz#eb52a0b997d931c1509372e2a9bea22a8ca85c17" integrity sha512-IFZqtk0e2sfkMZIxYqPORzxcKRkbIrVJesR6eMLNwzh1rA4bl2uh9ZHk1m55LNq4ZmaxREDu+1JcGlIaZQgKNQ== +"@pagopa/io-backend-session-sdk@^9.7.0": + version "9.7.0" + resolved "https://registry.yarnpkg.com/@pagopa/io-backend-session-sdk/-/io-backend-session-sdk-9.7.0.tgz#e32d3f1dcde5feb47ebedae992971485b98f2be6" + integrity sha512-xiRkZQrQN3LzcZ1cwV2ZTMASImHrjUoOTwvzKinQd5DvuyUYxTUBH4KrLQdFIhozjG0s9fzX9Becon9TJUjdKQ== + dependencies: + "@pagopa/ts-commons" "^10.0.0" + fp-ts "^2.10.5" + io-ts "^2.2.16" + "@pagopa/io-functions-commons@^25.5.2": version "25.5.2" resolved "https://registry.yarnpkg.com/@pagopa/io-functions-commons/-/io-functions-commons-25.5.2.tgz#5bb04ded9551100ba2477ee6207735e82362368e" From 2da48926f2b1a9671d3d9a46e22d202c594ac8df Mon Sep 17 00:00:00 2001 From: "Stefano.D'aversa" Date: Tue, 3 Jan 2023 13:42:15 +0100 Subject: [PATCH 2/2] set all version --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c3692e90..cf8df41c 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@azure/ms-rest-js": "^2.6.4", "@azure/ms-rest-nodeauth": "^2.0.6", "@pagopa/express-azure-functions": "^2.0.0", - "@pagopa/io-backend-session-sdk": "^9.7.0", + "@pagopa/io-backend-session-sdk": "x", "@pagopa/io-functions-commons": "^25.5.2", "@pagopa/ts-commons": "^10.9.0", "@types/archiver": "^3.1.1", diff --git a/yarn.lock b/yarn.lock index a7ab41a9..cc751d54 100644 --- a/yarn.lock +++ b/yarn.lock @@ -984,7 +984,7 @@ resolved "https://registry.yarnpkg.com/@pagopa/express-azure-functions/-/express-azure-functions-2.0.0.tgz#eb52a0b997d931c1509372e2a9bea22a8ca85c17" integrity sha512-IFZqtk0e2sfkMZIxYqPORzxcKRkbIrVJesR6eMLNwzh1rA4bl2uh9ZHk1m55LNq4ZmaxREDu+1JcGlIaZQgKNQ== -"@pagopa/io-backend-session-sdk@^9.7.0": +"@pagopa/io-backend-session-sdk@x": version "9.7.0" resolved "https://registry.yarnpkg.com/@pagopa/io-backend-session-sdk/-/io-backend-session-sdk-9.7.0.tgz#e32d3f1dcde5feb47ebedae992971485b98f2be6" integrity sha512-xiRkZQrQN3LzcZ1cwV2ZTMASImHrjUoOTwvzKinQd5DvuyUYxTUBH4KrLQdFIhozjG0s9fzX9Becon9TJUjdKQ==