
* Extract semver compatibility logic to shared package and implement it in taxes * Move semver checking package to packages/shared * Update lock * Apply suggestions from code review Co-authored-by: Adrian Pilarczyk <admin@peelar.dev> * Improve error message * Fix lockfile --------- Co-authored-by: Adrian Pilarczyk <admin@peelar.dev>
36 lines
1.5 KiB
TypeScript
36 lines
1.5 KiB
TypeScript
import { createManifestHandler } from "@saleor/app-sdk/handlers/next";
|
|
import { AppManifest } from "@saleor/app-sdk/types";
|
|
|
|
import packageJson from "../../../package.json";
|
|
import { checkoutCalculateTaxesSyncWebhook } from "./webhooks/checkout-calculate-taxes";
|
|
import { orderCalculateTaxesSyncWebhook } from "./webhooks/order-calculate-taxes";
|
|
import { orderCreatedAsyncWebhook } from "./webhooks/order-created";
|
|
import { orderFulfilledAsyncWebhook } from "./webhooks/order-fulfilled";
|
|
import { REQUIRED_SALEOR_VERSION } from "../../../saleor-app";
|
|
|
|
export default createManifestHandler({
|
|
async manifestFactory(context) {
|
|
const manifest: AppManifest = {
|
|
name: "Taxes",
|
|
tokenTargetUrl: `${context.appBaseUrl}/api/register`,
|
|
appUrl: context.appBaseUrl,
|
|
permissions: ["HANDLE_TAXES", "MANAGE_ORDERS"],
|
|
id: "saleor.app.taxes",
|
|
version: packageJson.version,
|
|
webhooks: [
|
|
orderCalculateTaxesSyncWebhook.getWebhookManifest(context.appBaseUrl),
|
|
checkoutCalculateTaxesSyncWebhook.getWebhookManifest(context.appBaseUrl),
|
|
orderCreatedAsyncWebhook.getWebhookManifest(context.appBaseUrl),
|
|
orderFulfilledAsyncWebhook.getWebhookManifest(context.appBaseUrl),
|
|
],
|
|
extensions: [],
|
|
homepageUrl: "https://github.com/saleor/apps",
|
|
supportUrl: "https://github.com/saleor/apps/discussions",
|
|
author: "Saleor Commerce",
|
|
dataPrivacyUrl: "https://saleor.io/legal/privacy/",
|
|
requiredSaleorVersion: REQUIRED_SALEOR_VERSION,
|
|
};
|
|
|
|
return manifest;
|
|
},
|
|
});
|