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..cf8df41c 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": "x", "@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..cc751d54 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@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== + 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"