diff --git a/src/fragments/webhooks.ts b/src/fragments/webhooks.ts index d004644b1..12f879315 100644 --- a/src/fragments/webhooks.ts +++ b/src/fragments/webhooks.ts @@ -1,6 +1,6 @@ import { gql } from "@apollo/client"; -export const webhooksFragment = gql` +export const webhookFragment = gql` fragment Webhook on Webhook { id name @@ -12,8 +12,16 @@ export const webhooksFragment = gql` } `; -export const webhooksDetailsFragment = gql` - fragment WebhooksDetails on Webhook { +export const webhookDetailsFragment = gql` + fragment WebhookDetails on Webhook { ...Webhook + syncEvents { + eventType + } + asyncEvents { + eventType + } + secretKey + targetUrl } `; diff --git a/src/graphql/hooks.generated.ts b/src/graphql/hooks.generated.ts index 2f0d1d0e4..6c326b03c 100644 --- a/src/graphql/hooks.generated.ts +++ b/src/graphql/hooks.generated.ts @@ -2784,9 +2784,17 @@ export const WarehouseDetailsFragmentDoc = gql` } ${WarehouseWithShippingFragmentDoc} ${AddressFragmentDoc}`; -export const WebhooksDetailsFragmentDoc = gql` - fragment WebhooksDetails on Webhook { +export const WebhookDetailsFragmentDoc = gql` + fragment WebhookDetails on Webhook { ...Webhook + syncEvents { + eventType + } + asyncEvents { + eventType + } + secretKey + targetUrl } ${WebhookFragmentDoc}`; export const AppCreateDocument = gql` @@ -16970,12 +16978,12 @@ export const WebhookCreateDocument = gql` ...WebhookError } webhook { - ...WebhooksDetails + ...WebhookDetails } } } ${WebhookErrorFragmentDoc} -${WebhooksDetailsFragmentDoc}`; +${WebhookDetailsFragmentDoc}`; export type WebhookCreateMutationFn = Apollo.MutationFunction; /** @@ -17009,12 +17017,12 @@ export const WebhookUpdateDocument = gql` ...WebhookError } webhook { - ...WebhooksDetails + ...WebhookDetails } } } ${WebhookErrorFragmentDoc} -${WebhooksDetailsFragmentDoc}`; +${WebhookDetailsFragmentDoc}`; export type WebhookUpdateMutationFn = Apollo.MutationFunction; /** @@ -17080,18 +17088,10 @@ export type WebhookDeleteMutationOptions = Apollo.BaseMutationOptions, asyncEvents: Array<{ __typename: 'WebhookEventAsync', eventType: WebhookEventTypeAsyncEnum }>, app: { __typename: 'App', id: string, name: string | null } }; export type WeightFragment = { __typename: 'Weight', unit: WeightUnitsEnum, value: number }; @@ -9410,7 +9410,7 @@ export type WebhookCreateMutationVariables = Exact<{ }>; -export type WebhookCreateMutation = { __typename: 'Mutation', webhookCreate: { __typename: 'WebhookCreate', errors: Array<{ __typename: 'WebhookError', code: WebhookErrorCode, field: string | null, message: string | null }>, webhook: { __typename: 'Webhook', id: string, name: string, isActive: boolean, app: { __typename: 'App', id: string, name: string | null } } | null } | null }; +export type WebhookCreateMutation = { __typename: 'Mutation', webhookCreate: { __typename: 'WebhookCreate', errors: Array<{ __typename: 'WebhookError', code: WebhookErrorCode, field: string | null, message: string | null }>, webhook: { __typename: 'Webhook', secretKey: string | null, targetUrl: string, id: string, name: string, isActive: boolean, syncEvents: Array<{ __typename: 'WebhookEventSync', eventType: WebhookEventTypeSyncEnum }>, asyncEvents: Array<{ __typename: 'WebhookEventAsync', eventType: WebhookEventTypeAsyncEnum }>, app: { __typename: 'App', id: string, name: string | null } } | null } | null }; export type WebhookUpdateMutationVariables = Exact<{ id: Scalars['ID']; @@ -9418,7 +9418,7 @@ export type WebhookUpdateMutationVariables = Exact<{ }>; -export type WebhookUpdateMutation = { __typename: 'Mutation', webhookUpdate: { __typename: 'WebhookUpdate', errors: Array<{ __typename: 'WebhookError', code: WebhookErrorCode, field: string | null, message: string | null }>, webhook: { __typename: 'Webhook', id: string, name: string, isActive: boolean, app: { __typename: 'App', id: string, name: string | null } } | null } | null }; +export type WebhookUpdateMutation = { __typename: 'Mutation', webhookUpdate: { __typename: 'WebhookUpdate', errors: Array<{ __typename: 'WebhookError', code: WebhookErrorCode, field: string | null, message: string | null }>, webhook: { __typename: 'Webhook', secretKey: string | null, targetUrl: string, id: string, name: string, isActive: boolean, syncEvents: Array<{ __typename: 'WebhookEventSync', eventType: WebhookEventTypeSyncEnum }>, asyncEvents: Array<{ __typename: 'WebhookEventAsync', eventType: WebhookEventTypeAsyncEnum }>, app: { __typename: 'App', id: string, name: string | null } } | null } | null }; export type WebhookDeleteMutationVariables = Exact<{ id: Scalars['ID']; diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 66c1d7a00..60236631a 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -3550,7 +3550,7 @@ exports[`Storyshots Generics / AddressEdit default 1`] = `