@ludo.ninja/api 2.8.75 → 2.8.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/graphql_tools/__generated__/notificationsHost/schema.d.ts +162 -0
- package/build/graphql_tools/__generated__/notificationsHost/schema.js +60 -0
- package/build/hosts/index.d.ts +2 -0
- package/build/hosts/index.js +3 -1
- package/package.json +1 -1
- package/src/graphql_tools/__generated__/notificationsHost/schema.ts +223 -0
- package/src/hosts/index.ts +3 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
|
|
2
|
+
import * as Apollo from '@apollo/client';
|
|
3
|
+
export type Maybe<T> = T | null;
|
|
4
|
+
export type Exact<T extends {
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}> = {
|
|
7
|
+
[K in keyof T]: T[K];
|
|
8
|
+
};
|
|
9
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
10
|
+
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
11
|
+
};
|
|
12
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
13
|
+
[SubKey in K]: Maybe<T[SubKey]>;
|
|
14
|
+
};
|
|
15
|
+
export type RequireFields<T, K extends keyof T> = Omit<T, K> & {
|
|
16
|
+
[P in K]-?: NonNullable<T[P]>;
|
|
17
|
+
};
|
|
18
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
19
|
+
export type Scalars = {
|
|
20
|
+
ID: string;
|
|
21
|
+
String: string;
|
|
22
|
+
Boolean: boolean;
|
|
23
|
+
Int: number;
|
|
24
|
+
Float: number;
|
|
25
|
+
/** A 64-bit signed integer */
|
|
26
|
+
Long: any;
|
|
27
|
+
};
|
|
28
|
+
export type IMutation = {
|
|
29
|
+
setDummy: Scalars['String'];
|
|
30
|
+
};
|
|
31
|
+
export type INotification = {
|
|
32
|
+
notificationType?: Maybe<Scalars['String']>;
|
|
33
|
+
createdAt?: Maybe<Scalars['Long']>;
|
|
34
|
+
name?: Maybe<Scalars['String']>;
|
|
35
|
+
description?: Maybe<Scalars['String']>;
|
|
36
|
+
media?: Maybe<Scalars['String']>;
|
|
37
|
+
link?: Maybe<Scalars['String']>;
|
|
38
|
+
};
|
|
39
|
+
export type IQuery = {
|
|
40
|
+
getDummy: Scalars['String'];
|
|
41
|
+
};
|
|
42
|
+
export type ISubscription = {
|
|
43
|
+
onDummy: Scalars['String'];
|
|
44
|
+
onNotification: INotification;
|
|
45
|
+
};
|
|
46
|
+
export type ISubscriptionOnNotificationArgs = {
|
|
47
|
+
authToken: Scalars['String'];
|
|
48
|
+
};
|
|
49
|
+
export type ResolverTypeWrapper<T> = Promise<T> | T;
|
|
50
|
+
export type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
|
|
51
|
+
resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
|
|
52
|
+
};
|
|
53
|
+
export type Resolver<TResult, TParent = {}, TContext = {}, TArgs = {}> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>;
|
|
54
|
+
export type ResolverFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => Promise<TResult> | TResult;
|
|
55
|
+
export type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;
|
|
56
|
+
export type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
|
|
57
|
+
export interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
|
|
58
|
+
subscribe: SubscriptionSubscribeFn<{
|
|
59
|
+
[key in TKey]: TResult;
|
|
60
|
+
}, TParent, TContext, TArgs>;
|
|
61
|
+
resolve?: SubscriptionResolveFn<TResult, {
|
|
62
|
+
[key in TKey]: TResult;
|
|
63
|
+
}, TContext, TArgs>;
|
|
64
|
+
}
|
|
65
|
+
export interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> {
|
|
66
|
+
subscribe: SubscriptionSubscribeFn<any, TParent, TContext, TArgs>;
|
|
67
|
+
resolve: SubscriptionResolveFn<TResult, any, TContext, TArgs>;
|
|
68
|
+
}
|
|
69
|
+
export type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> = SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs> | SubscriptionResolverObject<TResult, TParent, TContext, TArgs>;
|
|
70
|
+
export type SubscriptionResolver<TResult, TKey extends string, TParent = {}, TContext = {}, TArgs = {}> = ((...args: any[]) => SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>) | SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>;
|
|
71
|
+
export type TypeResolveFn<TTypes, TParent = {}, TContext = {}> = (parent: TParent, context: TContext, info: GraphQLResolveInfo) => Maybe<TTypes> | Promise<Maybe<TTypes>>;
|
|
72
|
+
export type IsTypeOfResolverFn<T = {}, TContext = {}> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>;
|
|
73
|
+
export type NextResolverFn<T> = () => Promise<T>;
|
|
74
|
+
export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs = {}> = (next: NextResolverFn<TResult>, parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
|
|
75
|
+
/** Mapping between all available schema types and the resolvers types */
|
|
76
|
+
export type IResolversTypes = {
|
|
77
|
+
Long: ResolverTypeWrapper<Scalars['Long']>;
|
|
78
|
+
Mutation: ResolverTypeWrapper<{}>;
|
|
79
|
+
String: ResolverTypeWrapper<Scalars['String']>;
|
|
80
|
+
Notification: ResolverTypeWrapper<INotification>;
|
|
81
|
+
Query: ResolverTypeWrapper<{}>;
|
|
82
|
+
Subscription: ResolverTypeWrapper<{}>;
|
|
83
|
+
Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
|
|
84
|
+
};
|
|
85
|
+
/** Mapping between all available schema types and the resolvers parents */
|
|
86
|
+
export type IResolversParentTypes = {
|
|
87
|
+
Long: Scalars['Long'];
|
|
88
|
+
Mutation: {};
|
|
89
|
+
String: Scalars['String'];
|
|
90
|
+
Notification: INotification;
|
|
91
|
+
Query: {};
|
|
92
|
+
Subscription: {};
|
|
93
|
+
Boolean: Scalars['Boolean'];
|
|
94
|
+
};
|
|
95
|
+
export type IOneOfDirectiveArgs = {};
|
|
96
|
+
export type IOneOfDirectiveResolver<Result, Parent, ContextType = any, Args = IOneOfDirectiveArgs> = DirectiveResolverFn<Result, Parent, ContextType, Args>;
|
|
97
|
+
export interface ILongScalarConfig extends GraphQLScalarTypeConfig<IResolversTypes['Long'], any> {
|
|
98
|
+
name: 'Long';
|
|
99
|
+
}
|
|
100
|
+
export type IMutationResolvers<ContextType = any, ParentType extends IResolversParentTypes['Mutation'] = IResolversParentTypes['Mutation']> = {
|
|
101
|
+
setDummy?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
|
|
102
|
+
};
|
|
103
|
+
export type INotificationResolvers<ContextType = any, ParentType extends IResolversParentTypes['Notification'] = IResolversParentTypes['Notification']> = {
|
|
104
|
+
notificationType?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
|
|
105
|
+
createdAt?: Resolver<Maybe<IResolversTypes['Long']>, ParentType, ContextType>;
|
|
106
|
+
name?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
|
|
107
|
+
description?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
|
|
108
|
+
media?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
|
|
109
|
+
link?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
|
|
110
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
111
|
+
};
|
|
112
|
+
export type IQueryResolvers<ContextType = any, ParentType extends IResolversParentTypes['Query'] = IResolversParentTypes['Query']> = {
|
|
113
|
+
getDummy?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
|
|
114
|
+
};
|
|
115
|
+
export type ISubscriptionResolvers<ContextType = any, ParentType extends IResolversParentTypes['Subscription'] = IResolversParentTypes['Subscription']> = {
|
|
116
|
+
onDummy?: SubscriptionResolver<IResolversTypes['String'], "onDummy", ParentType, ContextType>;
|
|
117
|
+
onNotification?: SubscriptionResolver<IResolversTypes['Notification'], "onNotification", ParentType, ContextType, RequireFields<ISubscriptionOnNotificationArgs, 'authToken'>>;
|
|
118
|
+
};
|
|
119
|
+
export type IResolvers<ContextType = any> = {
|
|
120
|
+
Long?: GraphQLScalarType;
|
|
121
|
+
Mutation?: IMutationResolvers<ContextType>;
|
|
122
|
+
Notification?: INotificationResolvers<ContextType>;
|
|
123
|
+
Query?: IQueryResolvers<ContextType>;
|
|
124
|
+
Subscription?: ISubscriptionResolvers<ContextType>;
|
|
125
|
+
};
|
|
126
|
+
export type IDirectiveResolvers<ContextType = any> = {
|
|
127
|
+
oneOf?: IOneOfDirectiveResolver<any, any, ContextType>;
|
|
128
|
+
};
|
|
129
|
+
export type IOnNotificationSubscriptionVariables = Exact<{
|
|
130
|
+
authToken: Scalars['String'];
|
|
131
|
+
}>;
|
|
132
|
+
export type IOnNotificationSubscription = {
|
|
133
|
+
onNotification: Pick<INotification, 'notificationType' | 'createdAt' | 'name' | 'description' | 'media' | 'link'>;
|
|
134
|
+
};
|
|
135
|
+
export declare const OnNotificationDocument: Apollo.DocumentNode;
|
|
136
|
+
/**
|
|
137
|
+
* __useOnNotificationSubscription__
|
|
138
|
+
*
|
|
139
|
+
* To run a query within a React component, call `useOnNotificationSubscription` and pass it any options that fit your needs.
|
|
140
|
+
* When your component renders, `useOnNotificationSubscription` returns an object from Apollo Client that contains loading, error, and data properties
|
|
141
|
+
* you can use to render your UI.
|
|
142
|
+
*
|
|
143
|
+
* @param baseOptions options that will be passed into the subscription, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* const { data, loading, error } = useOnNotificationSubscription({
|
|
147
|
+
* variables: {
|
|
148
|
+
* authToken: // value for 'authToken'
|
|
149
|
+
* },
|
|
150
|
+
* });
|
|
151
|
+
*/
|
|
152
|
+
export declare function useOnNotificationSubscription(baseOptions: Apollo.SubscriptionHookOptions<IOnNotificationSubscription, IOnNotificationSubscriptionVariables>): {
|
|
153
|
+
restart(): void;
|
|
154
|
+
loading: boolean;
|
|
155
|
+
data?: IOnNotificationSubscription | undefined;
|
|
156
|
+
error?: Apollo.ApolloError | undefined;
|
|
157
|
+
variables?: Exact<{
|
|
158
|
+
authToken: string;
|
|
159
|
+
}> | undefined;
|
|
160
|
+
};
|
|
161
|
+
export type OnNotificationSubscriptionHookResult = ReturnType<typeof useOnNotificationSubscription>;
|
|
162
|
+
export type OnNotificationSubscriptionResult = Apollo.SubscriptionResult<IOnNotificationSubscription>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.useOnNotificationSubscription = exports.OnNotificationDocument = void 0;
|
|
27
|
+
const client_1 = require("@apollo/client");
|
|
28
|
+
const Apollo = __importStar(require("@apollo/client"));
|
|
29
|
+
exports.OnNotificationDocument = (0, client_1.gql) `
|
|
30
|
+
subscription OnNotification($authToken: String!) {
|
|
31
|
+
onNotification(authToken: $authToken) {
|
|
32
|
+
notificationType
|
|
33
|
+
createdAt
|
|
34
|
+
name
|
|
35
|
+
description
|
|
36
|
+
media
|
|
37
|
+
link
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
/**
|
|
42
|
+
* __useOnNotificationSubscription__
|
|
43
|
+
*
|
|
44
|
+
* To run a query within a React component, call `useOnNotificationSubscription` and pass it any options that fit your needs.
|
|
45
|
+
* When your component renders, `useOnNotificationSubscription` returns an object from Apollo Client that contains loading, error, and data properties
|
|
46
|
+
* you can use to render your UI.
|
|
47
|
+
*
|
|
48
|
+
* @param baseOptions options that will be passed into the subscription, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* const { data, loading, error } = useOnNotificationSubscription({
|
|
52
|
+
* variables: {
|
|
53
|
+
* authToken: // value for 'authToken'
|
|
54
|
+
* },
|
|
55
|
+
* });
|
|
56
|
+
*/
|
|
57
|
+
function useOnNotificationSubscription(baseOptions) {
|
|
58
|
+
return Apollo.useSubscription(exports.OnNotificationDocument, baseOptions);
|
|
59
|
+
}
|
|
60
|
+
exports.useOnNotificationSubscription = useOnNotificationSubscription;
|
package/build/hosts/index.d.ts
CHANGED
|
@@ -18,7 +18,9 @@ export declare const preferencesHostSSR = "https://ssr-preferences.ludo.ninja:80
|
|
|
18
18
|
export declare const searchHostSSR = "https://ssr-search.ludo.ninja:8091/graphql";
|
|
19
19
|
export declare const serverPreferencesHost = "http://server-preferences.istio.svc.k8s.local:8090/graphql";
|
|
20
20
|
export declare const eventsHost = "wss://events.ludo.ninja:8090/subscriptions";
|
|
21
|
+
export declare const experiencesSubscriptionHost = "wss://experiences.ludo.ninja:8090/subscriptions";
|
|
21
22
|
export declare const notificationsSubscriptionHost = "wss://notifications.ludo.ninja:8090/subscriptions";
|
|
23
|
+
export declare const notificationsHost = "'https://notifications.ludo.ninja:8090/graphql'";
|
|
22
24
|
export declare const opportunitiesHost = "https://opportunities.ludo.ninja:8090/graphql";
|
|
23
25
|
export declare const extensionHost = "https://chrome.ludo.ninja:8092/graphql";
|
|
24
26
|
export declare const experiencesHost = "https://experiences.ludo.ninja:8090/graphql";
|
package/build/hosts/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tapHost = exports.formsHost = exports.serverExperiencesHost = exports.experiencesHost = exports.extensionHost = exports.opportunitiesHost = exports.notificationsSubscriptionHost = exports.eventsHost = exports.serverPreferencesHost = exports.searchHostSSR = exports.preferencesHostSSR = exports.preferencesHost = exports.serverSearchHost = exports.serverShowCaseHost = exports.searchHost = exports.serverImagesHost = exports.mediasHost = exports.serverGalleriesHost = exports.galleriesHost = exports.serverIdentityHost = exports.serverCollectionsHost = exports.serverAssetsHost = exports.adminHost = exports.collectionsHost = exports.assetsHost = exports.identityHost = exports.authHost = void 0;
|
|
3
|
+
exports.tapHost = exports.formsHost = exports.serverExperiencesHost = exports.experiencesHost = exports.extensionHost = exports.opportunitiesHost = exports.notificationsHost = exports.notificationsSubscriptionHost = exports.experiencesSubscriptionHost = exports.eventsHost = exports.serverPreferencesHost = exports.searchHostSSR = exports.preferencesHostSSR = exports.preferencesHost = exports.serverSearchHost = exports.serverShowCaseHost = exports.searchHost = exports.serverImagesHost = exports.mediasHost = exports.serverGalleriesHost = exports.galleriesHost = exports.serverIdentityHost = exports.serverCollectionsHost = exports.serverAssetsHost = exports.adminHost = exports.collectionsHost = exports.assetsHost = exports.identityHost = exports.authHost = void 0;
|
|
4
4
|
exports.authHost = "https://auth.ludo.ninja:8080/graphql";
|
|
5
5
|
exports.identityHost = "https://identities.ludo.ninja:8090/graphql";
|
|
6
6
|
exports.assetsHost = "https://assets.ludo.ninja:8090/graphql";
|
|
@@ -21,7 +21,9 @@ exports.preferencesHostSSR = "https://ssr-preferences.ludo.ninja:8091/graphql";
|
|
|
21
21
|
exports.searchHostSSR = "https://ssr-search.ludo.ninja:8091/graphql";
|
|
22
22
|
exports.serverPreferencesHost = "http://server-preferences.istio.svc.k8s.local:8090/graphql";
|
|
23
23
|
exports.eventsHost = `wss://events.ludo.ninja:8090/subscriptions`;
|
|
24
|
+
exports.experiencesSubscriptionHost = "wss://experiences.ludo.ninja:8090/subscriptions";
|
|
24
25
|
exports.notificationsSubscriptionHost = "wss://notifications.ludo.ninja:8090/subscriptions";
|
|
26
|
+
exports.notificationsHost = "'https://notifications.ludo.ninja:8090/graphql'";
|
|
25
27
|
exports.opportunitiesHost = "https://opportunities.ludo.ninja:8090/graphql";
|
|
26
28
|
exports.extensionHost = "https://chrome.ludo.ninja:8092/graphql";
|
|
27
29
|
exports.experiencesHost = "https://experiences.ludo.ninja:8090/graphql";
|
package/package.json
CHANGED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
|
|
3
|
+
import { gql } from '@apollo/client';
|
|
4
|
+
import * as Apollo from '@apollo/client';
|
|
5
|
+
export type Maybe<T> = T | null;
|
|
6
|
+
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
|
|
7
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
|
|
8
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
|
|
9
|
+
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
|
|
10
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
11
|
+
export type Scalars = {
|
|
12
|
+
ID: string;
|
|
13
|
+
String: string;
|
|
14
|
+
Boolean: boolean;
|
|
15
|
+
Int: number;
|
|
16
|
+
Float: number;
|
|
17
|
+
/** A 64-bit signed integer */
|
|
18
|
+
Long: any;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
export type IMutation = {
|
|
24
|
+
setDummy: Scalars['String'];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type INotification = {
|
|
28
|
+
notificationType?: Maybe<Scalars['String']>;
|
|
29
|
+
createdAt?: Maybe<Scalars['Long']>;
|
|
30
|
+
name?: Maybe<Scalars['String']>;
|
|
31
|
+
description?: Maybe<Scalars['String']>;
|
|
32
|
+
media?: Maybe<Scalars['String']>;
|
|
33
|
+
link?: Maybe<Scalars['String']>;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type IQuery = {
|
|
37
|
+
getDummy: Scalars['String'];
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type ISubscription = {
|
|
41
|
+
onDummy: Scalars['String'];
|
|
42
|
+
onNotification: INotification;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
export type ISubscriptionOnNotificationArgs = {
|
|
47
|
+
authToken: Scalars['String'];
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
export type ResolverTypeWrapper<T> = Promise<T> | T;
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
export type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
|
|
56
|
+
resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
|
|
57
|
+
};
|
|
58
|
+
export type Resolver<TResult, TParent = {}, TContext = {}, TArgs = {}> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>;
|
|
59
|
+
|
|
60
|
+
export type ResolverFn<TResult, TParent, TContext, TArgs> = (
|
|
61
|
+
parent: TParent,
|
|
62
|
+
args: TArgs,
|
|
63
|
+
context: TContext,
|
|
64
|
+
info: GraphQLResolveInfo
|
|
65
|
+
) => Promise<TResult> | TResult;
|
|
66
|
+
|
|
67
|
+
export type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (
|
|
68
|
+
parent: TParent,
|
|
69
|
+
args: TArgs,
|
|
70
|
+
context: TContext,
|
|
71
|
+
info: GraphQLResolveInfo
|
|
72
|
+
) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;
|
|
73
|
+
|
|
74
|
+
export type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (
|
|
75
|
+
parent: TParent,
|
|
76
|
+
args: TArgs,
|
|
77
|
+
context: TContext,
|
|
78
|
+
info: GraphQLResolveInfo
|
|
79
|
+
) => TResult | Promise<TResult>;
|
|
80
|
+
|
|
81
|
+
export interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
|
|
82
|
+
subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>;
|
|
83
|
+
resolve?: SubscriptionResolveFn<TResult, { [key in TKey]: TResult }, TContext, TArgs>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> {
|
|
87
|
+
subscribe: SubscriptionSubscribeFn<any, TParent, TContext, TArgs>;
|
|
88
|
+
resolve: SubscriptionResolveFn<TResult, any, TContext, TArgs>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> =
|
|
92
|
+
| SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs>
|
|
93
|
+
| SubscriptionResolverObject<TResult, TParent, TContext, TArgs>;
|
|
94
|
+
|
|
95
|
+
export type SubscriptionResolver<TResult, TKey extends string, TParent = {}, TContext = {}, TArgs = {}> =
|
|
96
|
+
| ((...args: any[]) => SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>)
|
|
97
|
+
| SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>;
|
|
98
|
+
|
|
99
|
+
export type TypeResolveFn<TTypes, TParent = {}, TContext = {}> = (
|
|
100
|
+
parent: TParent,
|
|
101
|
+
context: TContext,
|
|
102
|
+
info: GraphQLResolveInfo
|
|
103
|
+
) => Maybe<TTypes> | Promise<Maybe<TTypes>>;
|
|
104
|
+
|
|
105
|
+
export type IsTypeOfResolverFn<T = {}, TContext = {}> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>;
|
|
106
|
+
|
|
107
|
+
export type NextResolverFn<T> = () => Promise<T>;
|
|
108
|
+
|
|
109
|
+
export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs = {}> = (
|
|
110
|
+
next: NextResolverFn<TResult>,
|
|
111
|
+
parent: TParent,
|
|
112
|
+
args: TArgs,
|
|
113
|
+
context: TContext,
|
|
114
|
+
info: GraphQLResolveInfo
|
|
115
|
+
) => TResult | Promise<TResult>;
|
|
116
|
+
|
|
117
|
+
/** Mapping between all available schema types and the resolvers types */
|
|
118
|
+
export type IResolversTypes = {
|
|
119
|
+
Long: ResolverTypeWrapper<Scalars['Long']>;
|
|
120
|
+
Mutation: ResolverTypeWrapper<{}>;
|
|
121
|
+
String: ResolverTypeWrapper<Scalars['String']>;
|
|
122
|
+
Notification: ResolverTypeWrapper<INotification>;
|
|
123
|
+
Query: ResolverTypeWrapper<{}>;
|
|
124
|
+
Subscription: ResolverTypeWrapper<{}>;
|
|
125
|
+
Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/** Mapping between all available schema types and the resolvers parents */
|
|
129
|
+
export type IResolversParentTypes = {
|
|
130
|
+
Long: Scalars['Long'];
|
|
131
|
+
Mutation: {};
|
|
132
|
+
String: Scalars['String'];
|
|
133
|
+
Notification: INotification;
|
|
134
|
+
Query: {};
|
|
135
|
+
Subscription: {};
|
|
136
|
+
Boolean: Scalars['Boolean'];
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export type IOneOfDirectiveArgs = { };
|
|
140
|
+
|
|
141
|
+
export type IOneOfDirectiveResolver<Result, Parent, ContextType = any, Args = IOneOfDirectiveArgs> = DirectiveResolverFn<Result, Parent, ContextType, Args>;
|
|
142
|
+
|
|
143
|
+
export interface ILongScalarConfig extends GraphQLScalarTypeConfig<IResolversTypes['Long'], any> {
|
|
144
|
+
name: 'Long';
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type IMutationResolvers<ContextType = any, ParentType extends IResolversParentTypes['Mutation'] = IResolversParentTypes['Mutation']> = {
|
|
148
|
+
setDummy?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export type INotificationResolvers<ContextType = any, ParentType extends IResolversParentTypes['Notification'] = IResolversParentTypes['Notification']> = {
|
|
152
|
+
notificationType?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
|
|
153
|
+
createdAt?: Resolver<Maybe<IResolversTypes['Long']>, ParentType, ContextType>;
|
|
154
|
+
name?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
|
|
155
|
+
description?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
|
|
156
|
+
media?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
|
|
157
|
+
link?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
|
|
158
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export type IQueryResolvers<ContextType = any, ParentType extends IResolversParentTypes['Query'] = IResolversParentTypes['Query']> = {
|
|
162
|
+
getDummy?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export type ISubscriptionResolvers<ContextType = any, ParentType extends IResolversParentTypes['Subscription'] = IResolversParentTypes['Subscription']> = {
|
|
166
|
+
onDummy?: SubscriptionResolver<IResolversTypes['String'], "onDummy", ParentType, ContextType>;
|
|
167
|
+
onNotification?: SubscriptionResolver<IResolversTypes['Notification'], "onNotification", ParentType, ContextType, RequireFields<ISubscriptionOnNotificationArgs, 'authToken'>>;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
export type IResolvers<ContextType = any> = {
|
|
171
|
+
Long?: GraphQLScalarType;
|
|
172
|
+
Mutation?: IMutationResolvers<ContextType>;
|
|
173
|
+
Notification?: INotificationResolvers<ContextType>;
|
|
174
|
+
Query?: IQueryResolvers<ContextType>;
|
|
175
|
+
Subscription?: ISubscriptionResolvers<ContextType>;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export type IDirectiveResolvers<ContextType = any> = {
|
|
179
|
+
oneOf?: IOneOfDirectiveResolver<any, any, ContextType>;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export type IOnNotificationSubscriptionVariables = Exact<{
|
|
183
|
+
authToken: Scalars['String'];
|
|
184
|
+
}>;
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
export type IOnNotificationSubscription = { onNotification: Pick<INotification, 'notificationType' | 'createdAt' | 'name' | 'description' | 'media' | 'link'> };
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
export const OnNotificationDocument = gql`
|
|
191
|
+
subscription OnNotification($authToken: String!) {
|
|
192
|
+
onNotification(authToken: $authToken) {
|
|
193
|
+
notificationType
|
|
194
|
+
createdAt
|
|
195
|
+
name
|
|
196
|
+
description
|
|
197
|
+
media
|
|
198
|
+
link
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
`;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* __useOnNotificationSubscription__
|
|
205
|
+
*
|
|
206
|
+
* To run a query within a React component, call `useOnNotificationSubscription` and pass it any options that fit your needs.
|
|
207
|
+
* When your component renders, `useOnNotificationSubscription` returns an object from Apollo Client that contains loading, error, and data properties
|
|
208
|
+
* you can use to render your UI.
|
|
209
|
+
*
|
|
210
|
+
* @param baseOptions options that will be passed into the subscription, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* const { data, loading, error } = useOnNotificationSubscription({
|
|
214
|
+
* variables: {
|
|
215
|
+
* authToken: // value for 'authToken'
|
|
216
|
+
* },
|
|
217
|
+
* });
|
|
218
|
+
*/
|
|
219
|
+
export function useOnNotificationSubscription(baseOptions: Apollo.SubscriptionHookOptions<IOnNotificationSubscription, IOnNotificationSubscriptionVariables>) {
|
|
220
|
+
return Apollo.useSubscription<IOnNotificationSubscription, IOnNotificationSubscriptionVariables>(OnNotificationDocument, baseOptions);
|
|
221
|
+
}
|
|
222
|
+
export type OnNotificationSubscriptionHookResult = ReturnType<typeof useOnNotificationSubscription>;
|
|
223
|
+
export type OnNotificationSubscriptionResult = Apollo.SubscriptionResult<IOnNotificationSubscription>;
|
package/src/hosts/index.ts
CHANGED
|
@@ -38,7 +38,10 @@ export const serverPreferencesHost = "http://server-preferences.istio.svc.k8s.lo
|
|
|
38
38
|
|
|
39
39
|
export const eventsHost = `wss://events.ludo.ninja:8090/subscriptions`;
|
|
40
40
|
|
|
41
|
+
export const experiencesSubscriptionHost = "wss://experiences.ludo.ninja:8090/subscriptions";
|
|
42
|
+
|
|
41
43
|
export const notificationsSubscriptionHost = "wss://notifications.ludo.ninja:8090/subscriptions";
|
|
44
|
+
export const notificationsHost = "'https://notifications.ludo.ninja:8090/graphql'";
|
|
42
45
|
|
|
43
46
|
export const opportunitiesHost = "https://opportunities.ludo.ninja:8090/graphql";
|
|
44
47
|
|