Fix types for the webhooks
This commit is contained in:
parent
09d3ab7ad5
commit
5e4836fbd2
4 changed files with 8 additions and 8 deletions
|
@ -2,8 +2,8 @@ import { NextWebhookApiHandler, SaleorAsyncWebhook } from "@saleor/app-sdk/handl
|
|||
import { gql } from "urql";
|
||||
|
||||
import {
|
||||
CustomerCreatedDocument,
|
||||
CustomerCreatedWebhookPayloadFragment,
|
||||
UntypedCustomerCreatedDocument,
|
||||
} from "../../../../generated/graphql";
|
||||
import { Klaviyo } from "../../../lib/klaviyo";
|
||||
import { createSettingsManager } from "../../../lib/metadata";
|
||||
|
@ -55,7 +55,7 @@ export const customerCreatedWebhook = new SaleorAsyncWebhook<CustomerCreatedWebh
|
|||
webhookPath: "api/webhooks/customer-created",
|
||||
event: "CUSTOMER_CREATED",
|
||||
apl: saleorApp.apl,
|
||||
query: UntypedCustomerCreatedDocument,
|
||||
query: CustomerCreatedDocument,
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { gql } from "urql";
|
|||
|
||||
import {
|
||||
FulfillmentCreatedWebhookPayloadFragment,
|
||||
UntypedFulfillmentCreatedDocument,
|
||||
FulfillmentCreatedDocument,
|
||||
} from "../../../../generated/graphql";
|
||||
import { Klaviyo } from "../../../lib/klaviyo";
|
||||
import { createSettingsManager } from "../../../lib/metadata";
|
||||
|
@ -62,7 +62,7 @@ export const fulfillmentCreatedWebhook =
|
|||
webhookPath: "api/webhooks/fulfillment-created",
|
||||
event: "FULFILLMENT_CREATED",
|
||||
apl: saleorApp.apl,
|
||||
query: UntypedFulfillmentCreatedDocument,
|
||||
query: FulfillmentCreatedDocument,
|
||||
});
|
||||
|
||||
const handler: NextWebhookApiHandler<FulfillmentCreatedWebhookPayloadFragment> = async (
|
||||
|
|
|
@ -3,7 +3,7 @@ import { gql } from "urql";
|
|||
|
||||
import {
|
||||
OrderCreatedWebhookPayloadFragment,
|
||||
UntypedOrderCreatedDocument,
|
||||
OrderCreatedDocument,
|
||||
} from "../../../../generated/graphql";
|
||||
import { Klaviyo } from "../../../lib/klaviyo";
|
||||
import { createSettingsManager } from "../../../lib/metadata";
|
||||
|
@ -32,7 +32,7 @@ export const orderCreatedWebhook = new SaleorAsyncWebhook<OrderCreatedWebhookPay
|
|||
webhookPath: "api/webhooks/order-created",
|
||||
event: "ORDER_CREATED",
|
||||
apl: saleorApp.apl,
|
||||
query: UntypedOrderCreatedDocument,
|
||||
query: OrderCreatedDocument,
|
||||
});
|
||||
|
||||
const handler: NextWebhookApiHandler<OrderCreatedWebhookPayloadFragment> = async (
|
||||
|
|
|
@ -3,7 +3,7 @@ import { gql } from "urql";
|
|||
|
||||
import {
|
||||
OrderFullyPaidWebhookPayloadFragment,
|
||||
UntypedOrderFullyPaidDocument,
|
||||
OrderFullyPaidDocument,
|
||||
} from "../../../../generated/graphql";
|
||||
import { Klaviyo } from "../../../lib/klaviyo";
|
||||
import { createSettingsManager } from "../../../lib/metadata";
|
||||
|
@ -32,7 +32,7 @@ export const orderFullyPaidWebhook = new SaleorAsyncWebhook<OrderFullyPaidWebhoo
|
|||
webhookPath: "api/webhooks/order-fully-paid",
|
||||
event: "ORDER_FULLY_PAID",
|
||||
apl: saleorApp.apl,
|
||||
query: UntypedOrderFullyPaidDocument,
|
||||
query: OrderFullyPaidDocument,
|
||||
});
|
||||
|
||||
const handler: NextWebhookApiHandler<OrderFullyPaidWebhookPayloadFragment> = async (
|
||||
|
|
Loading…
Reference in a new issue