saleor-apps-redis_apl/apps/taxes/src/pages/api/manifest.ts
Lukasz Ostrowski 1dead1e54f
Add logo to apps (#552)
* Add logo to manifest

* dirty fix build

fix image

update image to high res

Update sdk

Add logos to manifests

Update sdk

update sdk

* fix package in cms

* fix lock

* remove sdk from macaw binding package

* update sdk
2023-06-14 16:05:36 +02:00

41 lines
1.6 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,
brand: {
logo: {
default: `${context.appBaseUrl}/logo.png`,
},
},
};
return manifest;
},
});