mirror of
https://github.com/unraid/api.git
synced 2026-05-08 08:00:19 -05:00
tmp: critical notifications system
This commit is contained in:
@@ -1,33 +1,35 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useQuery, useSubscription } from '@vue/apollo-composable';
|
||||
import { computed, reactive, ref, watch } from 'vue';
|
||||
import { useMutation, useQuery, useSubscription } from '@vue/apollo-composable';
|
||||
|
||||
import { AlertTriangle, Octagon } from 'lucide-vue-next';
|
||||
|
||||
import type {
|
||||
NotificationFragmentFragment,
|
||||
WarningAndAlertNotificationsQuery,
|
||||
WarningAndAlertNotificationsQueryVariables,
|
||||
} from '~/composables/gql/graphql';
|
||||
|
||||
import {
|
||||
archiveNotification,
|
||||
NOTIFICATION_FRAGMENT,
|
||||
warningsAndAlerts,
|
||||
} from '~/components/Notifications/graphql/notification.query';
|
||||
import {
|
||||
notificationAddedSubscription,
|
||||
notificationOverviewSubscription,
|
||||
warningsAndAlertsSubscription,
|
||||
} from '~/components/Notifications/graphql/notification.subscription';
|
||||
import { useFragment } from '~/composables/gql';
|
||||
import { NotificationImportance } from '~/composables/gql/graphql';
|
||||
import {
|
||||
NotificationImportance,
|
||||
type NotificationFragmentFragment,
|
||||
type WarningAndAlertNotificationsQuery,
|
||||
type WarningAndAlertNotificationsQueryVariables,
|
||||
} from '~/composables/gql/graphql';
|
||||
|
||||
const { result, loading, refetch, error } = useQuery<
|
||||
const { result, loading, error, refetch } = useQuery<
|
||||
WarningAndAlertNotificationsQuery,
|
||||
WarningAndAlertNotificationsQueryVariables
|
||||
>(warningsAndAlerts, undefined, {
|
||||
fetchPolicy: 'network-only',
|
||||
});
|
||||
|
||||
const criticalNotifications = ref<NotificationFragmentFragment[]>([]);
|
||||
|
||||
const extractNotifications = (
|
||||
notifications: NotificationFragmentFragment[] | null | undefined
|
||||
): NotificationFragmentFragment[] => {
|
||||
@@ -37,11 +39,34 @@ const extractNotifications = (
|
||||
return useFragment(NOTIFICATION_FRAGMENT, notifications) ?? [];
|
||||
};
|
||||
|
||||
const notifications = computed<NotificationFragmentFragment[]>(() => {
|
||||
const data = result.value?.notifications?.warningsAndAlerts;
|
||||
return extractNotifications(data);
|
||||
const setNotifications = (incoming: NotificationFragmentFragment[] | null | undefined) => {
|
||||
criticalNotifications.value = extractNotifications(incoming);
|
||||
};
|
||||
|
||||
watch(
|
||||
() => result.value?.notifications?.warningsAndAlerts,
|
||||
(list) => {
|
||||
if (list) {
|
||||
setNotifications(list);
|
||||
} else if (!loading.value) {
|
||||
criticalNotifications.value = [];
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const { onResult: onWarningsAndAlerts } = useSubscription(warningsAndAlertsSubscription);
|
||||
|
||||
onWarningsAndAlerts(({ data }) => {
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
setNotifications(data.notificationsWarningsAndAlerts);
|
||||
});
|
||||
|
||||
const { mutate: archiveNotificationMutate } = useMutation(archiveNotification);
|
||||
const dismissing = reactive(new Set<string>());
|
||||
|
||||
const formatTimestamp = (notification: NotificationFragmentFragment) => {
|
||||
if (notification.formattedTimestamp) {
|
||||
return notification.formattedTimestamp;
|
||||
@@ -81,13 +106,34 @@ const importanceMeta: Record<
|
||||
};
|
||||
|
||||
const enrichedNotifications = computed(() =>
|
||||
notifications.value.map((notification) => ({
|
||||
criticalNotifications.value.map((notification) => ({
|
||||
notification,
|
||||
displayTimestamp: formatTimestamp(notification),
|
||||
meta: importanceMeta[notification.importance],
|
||||
}))
|
||||
);
|
||||
|
||||
const totalCount = computed(() => criticalNotifications.value.length);
|
||||
|
||||
const dismissNotification = async (notification: NotificationFragmentFragment) => {
|
||||
if (dismissing.has(notification.id)) {
|
||||
return;
|
||||
}
|
||||
dismissing.add(notification.id);
|
||||
try {
|
||||
await archiveNotificationMutate({
|
||||
id: notification.id,
|
||||
});
|
||||
criticalNotifications.value = criticalNotifications.value.filter(
|
||||
(current) => current.id !== notification.id
|
||||
);
|
||||
} catch (dismissError) {
|
||||
console.error('[CriticalNotifications] Failed to dismiss notification', dismissError);
|
||||
} finally {
|
||||
dismissing.delete(notification.id);
|
||||
}
|
||||
};
|
||||
|
||||
useSubscription(notificationAddedSubscription, null, {
|
||||
onResult: ({ data }) => {
|
||||
if (!data) {
|
||||
@@ -101,13 +147,36 @@ useSubscription(notificationAddedSubscription, null, {
|
||||
) {
|
||||
return;
|
||||
}
|
||||
void refetch();
|
||||
},
|
||||
});
|
||||
|
||||
useSubscription(notificationOverviewSubscription, null, {
|
||||
onResult: () => {
|
||||
void refetch();
|
||||
|
||||
if (!globalThis.toast) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (notification.timestamp) {
|
||||
// Trigger the global toast in tandem with the subscription update.
|
||||
const funcMapping: Record<
|
||||
NotificationImportance,
|
||||
(typeof globalThis)['toast']['info' | 'error' | 'warning']
|
||||
> = {
|
||||
[NotificationImportance.ALERT]: globalThis.toast.error,
|
||||
[NotificationImportance.WARNING]: globalThis.toast.warning,
|
||||
[NotificationImportance.INFO]: globalThis.toast.info,
|
||||
};
|
||||
const toast = funcMapping[notification.importance];
|
||||
const createOpener = () => ({
|
||||
label: 'Open',
|
||||
onClick: () => notification.link && window.open(notification.link, '_blank', 'noopener'),
|
||||
});
|
||||
|
||||
requestAnimationFrame(() =>
|
||||
toast(notification.title, {
|
||||
description: notification.subject,
|
||||
action: notification.link ? createOpener() : undefined,
|
||||
})
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
@@ -123,12 +192,12 @@ useSubscription(notificationOverviewSubscription, null, {
|
||||
v-if="!loading"
|
||||
class="rounded-full bg-amber-100 px-2 py-0.5 text-xs font-medium text-amber-700"
|
||||
>
|
||||
{{ notifications.length }}
|
||||
{{ totalCount }}
|
||||
</span>
|
||||
</header>
|
||||
|
||||
<div v-if="error" class="rounded border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700">
|
||||
Failed to load notifications. Please try again.
|
||||
Failed to load notifications. {{ error.message ?? '' }}
|
||||
</div>
|
||||
|
||||
<div v-else-if="loading" class="flex items-center gap-2 text-sm text-gray-500">
|
||||
@@ -169,15 +238,25 @@ useSubscription(notificationOverviewSubscription, null, {
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<a
|
||||
v-if="notification.link"
|
||||
:href="notification.link"
|
||||
class="inline-flex w-fit items-center gap-1 text-sm font-medium text-amber-700 hover:text-amber-800"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
View details
|
||||
</a>
|
||||
<div class="flex flex-wrap items-center gap-2 pt-1">
|
||||
<a
|
||||
v-if="notification.link"
|
||||
:href="notification.link"
|
||||
class="inline-flex items-center gap-1 rounded-md border border-amber-500 px-3 py-1 text-sm font-medium text-amber-700 transition hover:bg-amber-50"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
View Details
|
||||
</a>
|
||||
<button
|
||||
type="button"
|
||||
class="inline-flex items-center gap-1 rounded-md border border-gray-300 px-3 py-1 text-sm font-medium text-gray-700 transition hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50"
|
||||
:disabled="dismissing.has(notification.id)"
|
||||
@click="dismissNotification(notification)"
|
||||
>
|
||||
{{ dismissing.has(notification.id) ? 'Dismissing…' : 'Dismiss' }}
|
||||
</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -124,3 +124,11 @@ export const resetOverview = graphql(/* GraphQL */ `
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
export const notifyIfUnique = graphql(/* GraphQL */ `
|
||||
mutation NotifyIfUnique($input: NotificationData!) {
|
||||
notifyIfUnique(input: $input) {
|
||||
...NotificationFragment
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
@@ -20,3 +20,11 @@ export const notificationOverviewSubscription = graphql(/* GraphQL */ `
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
export const warningsAndAlertsSubscription = graphql(/* GraphQL */ `
|
||||
subscription NotificationsWarningsAndAlertsSub {
|
||||
notificationsWarningsAndAlerts {
|
||||
...NotificationFragment
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
@@ -55,8 +55,10 @@ type Documents = {
|
||||
"\n mutation DeleteAllNotifications {\n deleteArchivedNotifications {\n archive {\n total\n }\n unread {\n total\n }\n }\n }\n": typeof types.DeleteAllNotificationsDocument,
|
||||
"\n query Overview {\n notifications {\n id\n overview {\n unread {\n info\n warning\n alert\n total\n }\n archive {\n total\n }\n }\n }\n }\n": typeof types.OverviewDocument,
|
||||
"\n mutation RecomputeOverview {\n recalculateOverview {\n archive {\n ...NotificationCountFragment\n }\n unread {\n ...NotificationCountFragment\n }\n }\n }\n": typeof types.RecomputeOverviewDocument,
|
||||
"\n mutation NotifyIfUnique($input: NotificationData!) {\n notifyIfUnique(input: $input) {\n ...NotificationFragment\n }\n }\n": typeof types.NotifyIfUniqueDocument,
|
||||
"\n subscription NotificationAddedSub {\n notificationAdded {\n ...NotificationFragment\n }\n }\n": typeof types.NotificationAddedSubDocument,
|
||||
"\n subscription NotificationOverviewSub {\n notificationsOverview {\n archive {\n ...NotificationCountFragment\n }\n unread {\n ...NotificationCountFragment\n }\n }\n }\n": typeof types.NotificationOverviewSubDocument,
|
||||
"\n subscription NotificationsWarningsAndAlertsSub {\n notificationsWarningsAndAlerts {\n ...NotificationFragment\n }\n }\n": typeof types.NotificationsWarningsAndAlertsSubDocument,
|
||||
"\n mutation CreateRCloneRemote($input: CreateRCloneRemoteInput!) {\n rclone {\n createRCloneRemote(input: $input) {\n name\n type\n parameters\n }\n }\n }\n": typeof types.CreateRCloneRemoteDocument,
|
||||
"\n mutation DeleteRCloneRemote($input: DeleteRCloneRemoteInput!) {\n rclone {\n deleteRCloneRemote(input: $input)\n }\n }\n": typeof types.DeleteRCloneRemoteDocument,
|
||||
"\n query GetRCloneConfigForm($formOptions: RCloneConfigFormInput) {\n rclone {\n configForm(formOptions: $formOptions) {\n id\n dataSchema\n uiSchema\n }\n }\n }\n": typeof types.GetRCloneConfigFormDocument,
|
||||
@@ -115,8 +117,10 @@ const documents: Documents = {
|
||||
"\n mutation DeleteAllNotifications {\n deleteArchivedNotifications {\n archive {\n total\n }\n unread {\n total\n }\n }\n }\n": types.DeleteAllNotificationsDocument,
|
||||
"\n query Overview {\n notifications {\n id\n overview {\n unread {\n info\n warning\n alert\n total\n }\n archive {\n total\n }\n }\n }\n }\n": types.OverviewDocument,
|
||||
"\n mutation RecomputeOverview {\n recalculateOverview {\n archive {\n ...NotificationCountFragment\n }\n unread {\n ...NotificationCountFragment\n }\n }\n }\n": types.RecomputeOverviewDocument,
|
||||
"\n mutation NotifyIfUnique($input: NotificationData!) {\n notifyIfUnique(input: $input) {\n ...NotificationFragment\n }\n }\n": types.NotifyIfUniqueDocument,
|
||||
"\n subscription NotificationAddedSub {\n notificationAdded {\n ...NotificationFragment\n }\n }\n": types.NotificationAddedSubDocument,
|
||||
"\n subscription NotificationOverviewSub {\n notificationsOverview {\n archive {\n ...NotificationCountFragment\n }\n unread {\n ...NotificationCountFragment\n }\n }\n }\n": types.NotificationOverviewSubDocument,
|
||||
"\n subscription NotificationsWarningsAndAlertsSub {\n notificationsWarningsAndAlerts {\n ...NotificationFragment\n }\n }\n": types.NotificationsWarningsAndAlertsSubDocument,
|
||||
"\n mutation CreateRCloneRemote($input: CreateRCloneRemoteInput!) {\n rclone {\n createRCloneRemote(input: $input) {\n name\n type\n parameters\n }\n }\n }\n": types.CreateRCloneRemoteDocument,
|
||||
"\n mutation DeleteRCloneRemote($input: DeleteRCloneRemoteInput!) {\n rclone {\n deleteRCloneRemote(input: $input)\n }\n }\n": types.DeleteRCloneRemoteDocument,
|
||||
"\n query GetRCloneConfigForm($formOptions: RCloneConfigFormInput) {\n rclone {\n configForm(formOptions: $formOptions) {\n id\n dataSchema\n uiSchema\n }\n }\n }\n": types.GetRCloneConfigFormDocument,
|
||||
@@ -312,6 +316,10 @@ export function graphql(source: "\n query Overview {\n notifications {\n
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n mutation RecomputeOverview {\n recalculateOverview {\n archive {\n ...NotificationCountFragment\n }\n unread {\n ...NotificationCountFragment\n }\n }\n }\n"): (typeof documents)["\n mutation RecomputeOverview {\n recalculateOverview {\n archive {\n ...NotificationCountFragment\n }\n unread {\n ...NotificationCountFragment\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n mutation NotifyIfUnique($input: NotificationData!) {\n notifyIfUnique(input: $input) {\n ...NotificationFragment\n }\n }\n"): (typeof documents)["\n mutation NotifyIfUnique($input: NotificationData!) {\n notifyIfUnique(input: $input) {\n ...NotificationFragment\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
@@ -320,6 +328,10 @@ export function graphql(source: "\n subscription NotificationAddedSub {\n no
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n subscription NotificationOverviewSub {\n notificationsOverview {\n archive {\n ...NotificationCountFragment\n }\n unread {\n ...NotificationCountFragment\n }\n }\n }\n"): (typeof documents)["\n subscription NotificationOverviewSub {\n notificationsOverview {\n archive {\n ...NotificationCountFragment\n }\n unread {\n ...NotificationCountFragment\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n subscription NotificationsWarningsAndAlertsSub {\n notificationsWarningsAndAlerts {\n ...NotificationFragment\n }\n }\n"): (typeof documents)["\n subscription NotificationsWarningsAndAlertsSub {\n notificationsWarningsAndAlerts {\n ...NotificationFragment\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
|
||||
@@ -1288,6 +1288,8 @@ export type Mutation = {
|
||||
initiateFlashBackup: FlashBackupStatus;
|
||||
moveDockerEntriesToFolder: ResolvedOrganizerV1;
|
||||
moveDockerItemsToPosition: ResolvedOrganizerV1;
|
||||
/** Creates a notification if an equivalent unread notification does not already exist. */
|
||||
notifyIfUnique?: Maybe<Notification>;
|
||||
parityCheck: ParityCheckMutations;
|
||||
rclone: RCloneMutations;
|
||||
/** Reads each notification to recompute & update the overview. */
|
||||
@@ -1393,6 +1395,11 @@ export type MutationMoveDockerItemsToPositionArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type MutationNotifyIfUniqueArgs = {
|
||||
input: NotificationData;
|
||||
};
|
||||
|
||||
|
||||
export type MutationRemovePluginArgs = {
|
||||
input: PluginManagementInput;
|
||||
};
|
||||
@@ -2109,6 +2116,7 @@ export type Subscription = {
|
||||
logFile: LogFileContent;
|
||||
notificationAdded: Notification;
|
||||
notificationsOverview: NotificationOverview;
|
||||
notificationsWarningsAndAlerts: Array<Notification>;
|
||||
ownerSubscription: Owner;
|
||||
parityHistorySubscription: ParityCheck;
|
||||
serversSubscription: Server;
|
||||
@@ -2917,6 +2925,16 @@ export type RecomputeOverviewMutation = { __typename?: 'Mutation', recalculateOv
|
||||
& { ' $fragmentRefs'?: { 'NotificationCountFragmentFragment': NotificationCountFragmentFragment } }
|
||||
) } };
|
||||
|
||||
export type NotifyIfUniqueMutationVariables = Exact<{
|
||||
input: NotificationData;
|
||||
}>;
|
||||
|
||||
|
||||
export type NotifyIfUniqueMutation = { __typename?: 'Mutation', notifyIfUnique?: (
|
||||
{ __typename?: 'Notification' }
|
||||
& { ' $fragmentRefs'?: { 'NotificationFragmentFragment': NotificationFragmentFragment } }
|
||||
) | null };
|
||||
|
||||
export type NotificationAddedSubSubscriptionVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@@ -2936,6 +2954,14 @@ export type NotificationOverviewSubSubscription = { __typename?: 'Subscription',
|
||||
& { ' $fragmentRefs'?: { 'NotificationCountFragmentFragment': NotificationCountFragmentFragment } }
|
||||
) } };
|
||||
|
||||
export type NotificationsWarningsAndAlertsSubSubscriptionVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type NotificationsWarningsAndAlertsSubSubscription = { __typename?: 'Subscription', notificationsWarningsAndAlerts: Array<(
|
||||
{ __typename?: 'Notification' }
|
||||
& { ' $fragmentRefs'?: { 'NotificationFragmentFragment': NotificationFragmentFragment } }
|
||||
)> };
|
||||
|
||||
export type CreateRCloneRemoteMutationVariables = Exact<{
|
||||
input: CreateRCloneRemoteInput;
|
||||
}>;
|
||||
@@ -3061,8 +3087,10 @@ export const DeleteNotificationDocument = {"kind":"Document","definitions":[{"ki
|
||||
export const DeleteAllNotificationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteAllNotifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteArchivedNotifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"archive"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"total"}}]}},{"kind":"Field","name":{"kind":"Name","value":"unread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"total"}}]}}]}}]}}]} as unknown as DocumentNode<DeleteAllNotificationsMutation, DeleteAllNotificationsMutationVariables>;
|
||||
export const OverviewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Overview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"overview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"unread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"info"}},{"kind":"Field","name":{"kind":"Name","value":"warning"}},{"kind":"Field","name":{"kind":"Name","value":"alert"}},{"kind":"Field","name":{"kind":"Name","value":"total"}}]}},{"kind":"Field","name":{"kind":"Name","value":"archive"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"total"}}]}}]}}]}}]}}]} as unknown as DocumentNode<OverviewQuery, OverviewQueryVariables>;
|
||||
export const RecomputeOverviewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RecomputeOverview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"recalculateOverview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"archive"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"NotificationCountFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"unread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"NotificationCountFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"NotificationCountFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NotificationCounts"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"total"}},{"kind":"Field","name":{"kind":"Name","value":"info"}},{"kind":"Field","name":{"kind":"Name","value":"warning"}},{"kind":"Field","name":{"kind":"Name","value":"alert"}}]}}]} as unknown as DocumentNode<RecomputeOverviewMutation, RecomputeOverviewMutationVariables>;
|
||||
export const NotifyIfUniqueDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"NotifyIfUnique"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"NotificationData"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"notifyIfUnique"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"NotificationFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"NotificationFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Notification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"importance"}},{"kind":"Field","name":{"kind":"Name","value":"link"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"formattedTimestamp"}}]}}]} as unknown as DocumentNode<NotifyIfUniqueMutation, NotifyIfUniqueMutationVariables>;
|
||||
export const NotificationAddedSubDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"NotificationAddedSub"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"notificationAdded"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"NotificationFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"NotificationFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Notification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"importance"}},{"kind":"Field","name":{"kind":"Name","value":"link"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"formattedTimestamp"}}]}}]} as unknown as DocumentNode<NotificationAddedSubSubscription, NotificationAddedSubSubscriptionVariables>;
|
||||
export const NotificationOverviewSubDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"NotificationOverviewSub"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"notificationsOverview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"archive"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"NotificationCountFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"unread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"NotificationCountFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"NotificationCountFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NotificationCounts"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"total"}},{"kind":"Field","name":{"kind":"Name","value":"info"}},{"kind":"Field","name":{"kind":"Name","value":"warning"}},{"kind":"Field","name":{"kind":"Name","value":"alert"}}]}}]} as unknown as DocumentNode<NotificationOverviewSubSubscription, NotificationOverviewSubSubscriptionVariables>;
|
||||
export const NotificationsWarningsAndAlertsSubDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"NotificationsWarningsAndAlertsSub"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"notificationsWarningsAndAlerts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"NotificationFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"NotificationFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Notification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"importance"}},{"kind":"Field","name":{"kind":"Name","value":"link"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"formattedTimestamp"}}]}}]} as unknown as DocumentNode<NotificationsWarningsAndAlertsSubSubscription, NotificationsWarningsAndAlertsSubSubscriptionVariables>;
|
||||
export const CreateRCloneRemoteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateRCloneRemote"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateRCloneRemoteInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"rclone"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createRCloneRemote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"parameters"}}]}}]}}]}}]} as unknown as DocumentNode<CreateRCloneRemoteMutation, CreateRCloneRemoteMutationVariables>;
|
||||
export const DeleteRCloneRemoteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteRCloneRemote"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DeleteRCloneRemoteInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"rclone"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteRCloneRemote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]}}]} as unknown as DocumentNode<DeleteRCloneRemoteMutation, DeleteRCloneRemoteMutationVariables>;
|
||||
export const GetRCloneConfigFormDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRCloneConfigForm"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"formOptions"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"RCloneConfigFormInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"rclone"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configForm"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"formOptions"},"value":{"kind":"Variable","name":{"kind":"Name","value":"formOptions"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSchema"}},{"kind":"Field","name":{"kind":"Name","value":"uiSchema"}}]}}]}}]}}]} as unknown as DocumentNode<GetRCloneConfigFormQuery, GetRCloneConfigFormQueryVariables>;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export * from './fragment-masking';
|
||||
export * from './gql';
|
||||
export * from "./fragment-masking";
|
||||
export * from "./gql";
|
||||
Reference in New Issue
Block a user