Skip to content

Commit

Permalink
Update app-sdk, replace imports
Browse files Browse the repository at this point in the history
  • Loading branch information
witoszekdev committed Jan 27, 2025
1 parent 1064c5b commit 273251d
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"pnpm": ">=9.0.0 <10.0.0"
},
"dependencies": {
"@saleor/app-sdk": "0.0.0-pr-20250109150409",
"@saleor/app-sdk": "0.0.0-pr-20250127113254",
"@saleor/macaw-ui": "1.1.10",
"@urql/exchange-auth": "^1.0.0",
"@vitejs/plugin-react": "4.2.1",
Expand Down
32 changes: 19 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app/api-v2/manifest/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createManifestHandler } from "@saleor/app-sdk/handlers/fetch-api";
import { createManifestHandler } from "@saleor/app-sdk/handlers/next-app-router";
import { AppManifest } from "@saleor/app-sdk/types";
import packageJson from "../../../../package.json";
import { orderCreatedWebhook } from "../webhooks/order-created/webhook";
Expand Down
2 changes: 1 addition & 1 deletion src/app/api-v2/register/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createAppRegisterHandler } from "@saleor/app-sdk/handlers/fetch-api";
import { createAppRegisterHandler } from "@saleor/app-sdk/handlers/next-app-router";
import { saleorApp } from "../../../saleor-app";

export const runtime = "nodejs"; // FileAPL requires node environment to save files on disk using fs
Expand Down
2 changes: 1 addition & 1 deletion src/app/api-v2/webhooks/order-created/webhook.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { gql } from "urql";
import { OrderCreatedWebhookPayloadFragment } from "../../../../../generated/graphql";
import { saleorApp } from "../../../../saleor-app";
import { SaleorAsyncWebhook } from "@saleor/app-sdk/handlers/fetch-api";
import { SaleorAsyncWebhook } from "@saleor/app-sdk/handlers/next-app-router";

/**
* Example payload of the webhook. It will be transformed with graphql-codegen to Typescript type: OrderCreatedWebhookPayloadFragment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { gql } from "urql";
import { SaleorSyncWebhook } from "@saleor/app-sdk/handlers/fetch-api";
import { SaleorSyncWebhook } from "@saleor/app-sdk/handlers/next-app-router";
import { OrderFilterShippingMethodsPayloadFragment } from "../../../../../generated/graphql";
import { saleorApp } from "../../../../saleor-app";

Expand Down

0 comments on commit 273251d

Please sign in to comment.