Skip to content

Commit

Permalink
use reference to package SDK (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanoDoc authored Jan 9, 2023
1 parent 42baeff commit 96cfd26
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
6 changes: 3 additions & 3 deletions WebhookNotification/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
} from "@pagopa/ts-commons/lib/requests";
import * as r from "@pagopa/ts-commons/lib/requests";
import { ProblemJson } from "@pagopa/ts-commons/lib/responses";
import { Notification } from "../generated/notifications/Notification";
import { notifyDefaultDecoder } from "../generated/notifications/requestTypes";
import { SuccessResponse } from "../generated/notifications/SuccessResponse";
import { Notification } from "@pagopa/io-backend-notifications-sdk/Notification";
import { notifyDefaultDecoder } from "@pagopa/io-backend-notifications-sdk/requestTypes";
import { SuccessResponse } from "@pagopa/io-backend-notifications-sdk/SuccessResponse";

export type WebhookNotifyT = r.IPostApiRequestType<
{ readonly notification: Notification; readonly webhookEndpoint: HttpsUrl },
Expand Down
2 changes: 1 addition & 1 deletion WebhookNotification/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { flow, pipe } from "fp-ts/lib/function";
import { TaskEither } from "fp-ts/lib/TaskEither";
import { Profile } from "@pagopa/io-functions-commons/dist/src/models/profile";
import { PushNotificationsContentTypeEnum } from "@pagopa/io-functions-commons/dist/generated/definitions/PushNotificationsContentType";
import { Notification } from "../generated/notifications/Notification";
import { Notification } from "@pagopa/io-backend-notifications-sdk/Notification";
import { withJsonInput } from "../utils/with-json-input";
import { withDecodedInput } from "../utils/with-decoded-input";
import {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"pregenerate": "npm run openapi:bundle",
"generate": "npm-run-all generate:*",
"generate:definitions": "rimraf ./generated/definitions && shx mkdir -p ./generated/definitions && gen-api-models --api-spec ./openapi/index.yaml --no-strict --out-dir ./generated/definitions",
"generate:api-notifications": "rimraf ./generated/notifications && shx mkdir -p ./generated/notifications && gen-api-models --api-spec https://raw.githubusercontent.com/pagopa/io-backend/master/api_notifications.yaml --out-dir ./generated/notifications --response-decoders --request-types",
"generate:payment-updater": "rimraf generated/payment-updater && shx mkdir -p generated/payment-updater && gen-api-models --api-spec ./openapi/payment-updater.yaml --no-strict --out-dir ./generated/payment-updater --request-types --response-decoders --client",
"openapi:bundle": "bundle-api-spec -i openapi/index.yaml.template -o openapi/index.yaml -V $npm_package_version",
"openapi:validate": "oval validate -p openapi/index.yaml",
Expand Down Expand Up @@ -62,8 +61,9 @@
"dependencies": {
"@azure/cosmos": "^3.17.1",
"@pagopa/express-azure-functions": "^2.0.0",
"@pagopa/io-backend-notifications-sdk": "x",
"@pagopa/io-functions-admin-sdk": "x",
"@pagopa/io-functions-commons": "^26.3.0",
"@pagopa/io-functions-admin-sdk": "^0.32.1",
"@pagopa/ts-commons": "^10.10.0",
"applicationinsights": "^1.7.4",
"azure-storage": "^2.10.4",
Expand Down
17 changes: 13 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -760,10 +760,19 @@
resolved "https://registry.yarnpkg.com/@pagopa/express-azure-functions/-/express-azure-functions-2.0.0.tgz#eb52a0b997d931c1509372e2a9bea22a8ca85c17"
integrity sha512-IFZqtk0e2sfkMZIxYqPORzxcKRkbIrVJesR6eMLNwzh1rA4bl2uh9ZHk1m55LNq4ZmaxREDu+1JcGlIaZQgKNQ==

"@pagopa/io-functions-admin-sdk@^0.32.1":
version "0.32.1"
resolved "https://registry.yarnpkg.com/@pagopa/io-functions-admin-sdk/-/io-functions-admin-sdk-0.32.1.tgz#f1877f65c3a48f1296f973456d10fbf7431a4237"
integrity sha512-aAdl6kigkHkU693qoCgVSgetSeqWIAbX3Rv3kzO3gSDK0EzuIcUuqWcR7EvGtrc3Cc+ULBnGDVdlIFY7ReCQ0g==
"@pagopa/io-backend-notifications-sdk@x":
version "9.7.0"
resolved "https://registry.yarnpkg.com/@pagopa/io-backend-notifications-sdk/-/io-backend-notifications-sdk-9.7.0.tgz#887069f3c717a01e22ccc4a1323ba3b6a4fc0560"
integrity sha512-qIepFBWeoadgvQcSjgRt5SNw1xgqOjdZyUpm62keEz9W04Q+Qn6oxMCXcm1IfgWYXWn7ajMRVlfPWa4upSfdkA==
dependencies:
"@pagopa/ts-commons" "^10.0.0"
fp-ts "^2.10.5"
io-ts "^2.2.16"

"@pagopa/io-functions-admin-sdk@x":
version "0.32.4"
resolved "https://registry.yarnpkg.com/@pagopa/io-functions-admin-sdk/-/io-functions-admin-sdk-0.32.4.tgz#c009e534247bf785d7a22d40c2c4e996420d4062"
integrity sha512-txkOlcdGZ7puJlxbRMg3XYNTyuN+wJfL+t1Xaw2HkbvM0xGaFvK6wjDyfJr6x5THytfZz4SQlUMD5accPnjxnw==
dependencies:
"@pagopa/ts-commons" "^10.0.0"
fp-ts "^2.10.5"
Expand Down

0 comments on commit 96cfd26

Please sign in to comment.