From 79100d05f805cf2a76505b573ef9680f98d47f73 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Thu, 2 Apr 2026 15:58:09 +0700 Subject: [PATCH] feat(notifications): switch messenger connect flow to bot links --- app/composables/graphql/generated.ts | 33 ++++++ app/pages/notifications.vue | 109 +++++++++++++++--- graphql/operations/auth/me.graphql | 6 + .../my-messenger-connections.graphql | 8 ++ .../my-notification-history.graphql | 10 ++ .../send-test-messenger-message.graphql | 9 ++ 6 files changed, 159 insertions(+), 16 deletions(-) create mode 100644 graphql/operations/auth/me.graphql create mode 100644 graphql/operations/notifications/my-messenger-connections.graphql create mode 100644 graphql/operations/notifications/my-notification-history.graphql create mode 100644 graphql/operations/notifications/send-test-messenger-message.graphql diff --git a/app/composables/graphql/generated.ts b/app/composables/graphql/generated.ts index 5624428..f1a9ca2 100644 --- a/app/composables/graphql/generated.ts +++ b/app/composables/graphql/generated.ts @@ -523,6 +523,11 @@ export type ConsumeLoginTokenMutationVariables = Exact<{ export type ConsumeLoginTokenMutation = { __typename?: 'Mutation', consumeLoginToken: { __typename?: 'AuthSession', accessToken: string, expiresAt: any, user: { __typename?: 'User', id: string, email: string, fullName: string, role: UserRole, company?: { __typename?: 'Company', id: string } | null } } }; +export type MeQueryVariables = Exact<{ [key: string]: never; }>; + + +export type MeQuery = { __typename?: 'Query', me?: { __typename?: 'User', id: string, email: string } | null }; + export type RegisterSelfMutationVariables = Exact<{ input: RegisterSelfInput; }>; @@ -650,6 +655,34 @@ export function useConsumeLoginTokenMutation(options: VueApolloComposable.UseMut return VueApolloComposable.useMutation(ConsumeLoginTokenDocument, options); } export type ConsumeLoginTokenMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn; +export const MeDocument = gql` + query Me { + me { + id + email + } +} + `; + +/** + * __useMeQuery__ + * + * To run a query within a Vue component, call `useMeQuery` and pass it any options that fit your needs. + * When your component renders, `useMeQuery` returns an object from Apollo Client that contains result, loading and error properties + * you can use to render your UI. + * + * @param options that will be passed into the query, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/query.html#options; + * + * @example + * const { result, loading, error } = useMeQuery(); + */ +export function useMeQuery(options: VueApolloComposable.UseQueryOptions | VueCompositionApi.Ref> | ReactiveFunction> = {}) { + return VueApolloComposable.useQuery(MeDocument, {}, options); +} +export function useMeLazyQuery(options: VueApolloComposable.UseQueryOptions | VueCompositionApi.Ref> | ReactiveFunction> = {}) { + return VueApolloComposable.useLazyQuery(MeDocument, {}, options); +} +export type MeQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn; export const RegisterSelfDocument = gql` mutation RegisterSelf($input: RegisterSelfInput!) { registerSelf(input: $input) { diff --git a/app/pages/notifications.vue b/app/pages/notifications.vue index 9ff4767..559f479 100644 --- a/app/pages/notifications.vue +++ b/app/pages/notifications.vue @@ -1,16 +1,18 @@