Build notification template registry from backend code
This commit is contained in:
@@ -444,6 +444,23 @@ export type NotificationHistoryItem = {
|
||||
title: Scalars['String']['output'];
|
||||
};
|
||||
|
||||
export type NotificationTemplate = {
|
||||
__typename?: 'NotificationTemplate';
|
||||
channels: Array<NotificationTemplateChannel>;
|
||||
id: Scalars['ID']['output'];
|
||||
title: Scalars['String']['output'];
|
||||
};
|
||||
|
||||
export type NotificationTemplateChannel = {
|
||||
__typename?: 'NotificationTemplateChannel';
|
||||
body: Array<Scalars['String']['output']>;
|
||||
buttonText?: Maybe<Scalars['String']['output']>;
|
||||
buttonUrl?: Maybe<Scalars['String']['output']>;
|
||||
channel: LoginChannel;
|
||||
implemented: Scalars['Boolean']['output'];
|
||||
subject?: Maybe<Scalars['String']['output']>;
|
||||
};
|
||||
|
||||
export type Order = {
|
||||
__typename?: 'Order';
|
||||
blockReason?: Maybe<Scalars['String']['output']>;
|
||||
@@ -549,6 +566,7 @@ export type Query = {
|
||||
myMessengerConnections: Array<MessengerConnection>;
|
||||
myNotificationHistory: Array<NotificationHistoryItem>;
|
||||
myOrders: Array<Order>;
|
||||
notificationTemplates: Array<NotificationTemplate>;
|
||||
order?: Maybe<Order>;
|
||||
referralStats: ReferralStats;
|
||||
registrationRequests: Array<RegistrationRequest>;
|
||||
@@ -959,6 +977,11 @@ export type MyNotificationHistoryQueryVariables = Exact<{
|
||||
|
||||
export type MyNotificationHistoryQuery = { __typename?: 'Query', myNotificationHistory: Array<{ __typename?: 'NotificationHistoryItem', id: string, channel: MessengerType, title: string, message: string, createdAt: any, orderId?: string | null }> };
|
||||
|
||||
export type NotificationTemplatesQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type NotificationTemplatesQuery = { __typename?: 'Query', notificationTemplates: Array<{ __typename?: 'NotificationTemplate', id: string, title: string, channels: Array<{ __typename?: 'NotificationTemplateChannel', channel: LoginChannel, implemented: boolean, subject?: string | null, body: Array<string>, buttonText?: string | null, buttonUrl?: string | null }> }> };
|
||||
|
||||
export type SendTestMessengerMessageMutationVariables = Exact<{
|
||||
type: MessengerType;
|
||||
channelId?: InputMaybe<Scalars['String']['input']>;
|
||||
@@ -2273,6 +2296,42 @@ export function useMyNotificationHistoryLazyQuery(variables?: MyNotificationHist
|
||||
return VueApolloComposable.useLazyQuery<MyNotificationHistoryQuery, MyNotificationHistoryQueryVariables>(MyNotificationHistoryDocument, variables, options);
|
||||
}
|
||||
export type MyNotificationHistoryQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<MyNotificationHistoryQuery, MyNotificationHistoryQueryVariables>;
|
||||
export const NotificationTemplatesDocument = gql`
|
||||
query NotificationTemplates {
|
||||
notificationTemplates {
|
||||
id
|
||||
title
|
||||
channels {
|
||||
channel
|
||||
implemented
|
||||
subject
|
||||
body
|
||||
buttonText
|
||||
buttonUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useNotificationTemplatesQuery__
|
||||
*
|
||||
* To run a query within a Vue component, call `useNotificationTemplatesQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useNotificationTemplatesQuery` 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 } = useNotificationTemplatesQuery();
|
||||
*/
|
||||
export function useNotificationTemplatesQuery(options: VueApolloComposable.UseQueryOptions<NotificationTemplatesQuery, NotificationTemplatesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<NotificationTemplatesQuery, NotificationTemplatesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<NotificationTemplatesQuery, NotificationTemplatesQueryVariables>> = {}) {
|
||||
return VueApolloComposable.useQuery<NotificationTemplatesQuery, NotificationTemplatesQueryVariables>(NotificationTemplatesDocument, {}, options);
|
||||
}
|
||||
export function useNotificationTemplatesLazyQuery(options: VueApolloComposable.UseQueryOptions<NotificationTemplatesQuery, NotificationTemplatesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<NotificationTemplatesQuery, NotificationTemplatesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<NotificationTemplatesQuery, NotificationTemplatesQueryVariables>> = {}) {
|
||||
return VueApolloComposable.useLazyQuery<NotificationTemplatesQuery, NotificationTemplatesQueryVariables>(NotificationTemplatesDocument, {}, options);
|
||||
}
|
||||
export type NotificationTemplatesQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<NotificationTemplatesQuery, NotificationTemplatesQueryVariables>;
|
||||
export const SendTestMessengerMessageDocument = gql`
|
||||
mutation SendTestMessengerMessage($type: MessengerType!, $channelId: String, $message: String) {
|
||||
sendTestMessengerMessage(type: $type, channelId: $channelId, message: $message) {
|
||||
|
||||
Reference in New Issue
Block a user