diff --git a/packages/web/lib/networking/mutations/unsubscribeMutation.ts b/packages/web/lib/networking/mutations/unsubscribeMutation.ts index da785a842..3eba481ab 100644 --- a/packages/web/lib/networking/mutations/unsubscribeMutation.ts +++ b/packages/web/lib/networking/mutations/unsubscribeMutation.ts @@ -1,6 +1,6 @@ import { gql } from 'graphql-request' import { gqlFetcher } from '../networkHelpers' -import { Subscription } from '@omnivore/api/src/generated/graphql' +import { Subscription } from '../queries/useGetSubscriptionsQuery' type UnsubscribeResult = { unsubscribe: Unsubscribe diff --git a/packages/web/lib/networking/queries/useGetSubscriptionsQuery.tsx b/packages/web/lib/networking/queries/useGetSubscriptionsQuery.tsx index 89d0d5528..357a8b697 100644 --- a/packages/web/lib/networking/queries/useGetSubscriptionsQuery.tsx +++ b/packages/web/lib/networking/queries/useGetSubscriptionsQuery.tsx @@ -1,7 +1,21 @@ import { gql } from 'graphql-request' import useSWR from 'swr' import { publicGqlFetcher } from '../networkHelpers' -import { Subscription } from '@omnivore/api/src/generated/graphql' + +export type SubscriptionStatus = 'ACTIVE' | 'DELETED' | 'UNSUBSCRIBED' + +export type Subscription = { + id: string + name: string + newsletterEmail: string + + url?: string + description?: string + + status: SubscriptionStatus + createdAt: Date + updatedAt: Date +}; type SubscriptionsQueryResponse = { isValidating: boolean