@timardex/cluemart-shared 1.2.15 → 1.2.17
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/dist/{ad-CG4AaK6P.d.ts → ad-0fMmeab1.d.ts} +23 -8
- package/dist/{ad-BY7DQZFI.d.mts → ad-BozU03cK.d.mts} +23 -8
- package/dist/graphql/index.cjs +173 -23
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +34 -6
- package/dist/graphql/index.d.ts +34 -6
- package/dist/graphql/index.mjs +168 -22
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/index.cjs +173 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +55 -12
- package/dist/index.d.ts +55 -12
- package/dist/index.mjs +168 -22
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/graphql/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _apollo_client from '@apollo/client';
|
|
|
2
2
|
import { C as ChatType, N as NotificationType, a as NotificationCount, R as ResourceViewsType } from '../resourceViews-BZZt3kvl.js';
|
|
3
3
|
import { E as EventType, b as EventInfoType, c as RelationType, d as ResourceConnectionsType, V as VendorType, e as VendorInfoType } from '../global-BA84KF8J.js';
|
|
4
4
|
import { EnumResourceType } from '../enums/index.js';
|
|
5
|
-
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-
|
|
5
|
+
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-0fMmeab1.js';
|
|
6
6
|
import 'react-hook-form';
|
|
7
7
|
|
|
8
8
|
declare const useAdminUpdateResourceType: () => {
|
|
@@ -390,6 +390,26 @@ declare const useSelectPackage: () => {
|
|
|
390
390
|
loading: boolean;
|
|
391
391
|
selectPackage: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
392
392
|
};
|
|
393
|
+
declare const useAddUserInterestResource: () => {
|
|
394
|
+
addUserInterestResource: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
395
|
+
error: _apollo_client.ApolloError | undefined;
|
|
396
|
+
loading: boolean;
|
|
397
|
+
};
|
|
398
|
+
declare const useRemoveUserInterestResource: () => {
|
|
399
|
+
error: _apollo_client.ApolloError | undefined;
|
|
400
|
+
loading: boolean;
|
|
401
|
+
removeUserInterestResource: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
402
|
+
};
|
|
403
|
+
declare const useAddUserGoingResource: () => {
|
|
404
|
+
addUserGoingResource: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
405
|
+
error: _apollo_client.ApolloError | undefined;
|
|
406
|
+
loading: boolean;
|
|
407
|
+
};
|
|
408
|
+
declare const useRemoveUserGoingResource: () => {
|
|
409
|
+
error: _apollo_client.ApolloError | undefined;
|
|
410
|
+
loading: boolean;
|
|
411
|
+
removeUserGoingResource: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
412
|
+
};
|
|
393
413
|
|
|
394
414
|
declare const useGetUsers: () => {
|
|
395
415
|
error: _apollo_client.ApolloError | undefined;
|
|
@@ -415,13 +435,21 @@ declare const useGetUserVendors: () => {
|
|
|
415
435
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
416
436
|
userVendors: VendorType[];
|
|
417
437
|
};
|
|
418
|
-
declare const
|
|
438
|
+
declare const useGetUserActivities: () => {
|
|
419
439
|
error: _apollo_client.ApolloError | undefined;
|
|
420
440
|
loading: boolean;
|
|
421
441
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
442
|
+
userActivities: {
|
|
443
|
+
favourites: {
|
|
444
|
+
events: EventType[];
|
|
445
|
+
vendors: VendorType[];
|
|
446
|
+
};
|
|
447
|
+
going: {
|
|
448
|
+
events: EventType[];
|
|
449
|
+
};
|
|
450
|
+
interests: {
|
|
451
|
+
events: EventType[];
|
|
452
|
+
};
|
|
425
453
|
};
|
|
426
454
|
};
|
|
427
455
|
|
|
@@ -479,4 +507,4 @@ declare const useGetResourceViews: (resourceId: string, resourceType: EnumResour
|
|
|
479
507
|
resourceViews: ResourceViewsType[];
|
|
480
508
|
};
|
|
481
509
|
|
|
482
|
-
export { useAddParticipantToChat, useAddUserFavouriteResource, useAdminUpdateResourceType, useContactUs, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceViews, useCreateTester, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeleteRelation, useDeleteTester, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetNotificationCount, useGetNotificationCountSubscription, useGetRelation, useGetRelationByEventAndVendor, useGetResourceConnections, useGetResourceViews, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserEvents,
|
|
510
|
+
export { useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAdminUpdateResourceType, useContactUs, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceViews, useCreateTester, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeleteRelation, useDeleteTester, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetNotificationCount, useGetNotificationCountSubscription, useGetRelation, useGetRelationByEventAndVendor, useGetResourceConnections, useGetResourceViews, useGetTester, useGetTesters, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLogin, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchVendors, useSelectPackage, useSendChatMessage, useUpdateAd, useUpdateEvent, useUpdateEventInfo, useUpdateRelation, useUpdateTester, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken };
|
package/dist/graphql/index.mjs
CHANGED
|
@@ -82,6 +82,26 @@ var TERMS_AGREEMENT_FIELDS_FRAGMENT = gql2`
|
|
|
82
82
|
timestamp
|
|
83
83
|
}
|
|
84
84
|
`;
|
|
85
|
+
var USER_ACTIVITY_FIELDS_FRAGMENT = gql2`
|
|
86
|
+
fragment UserActivityFields on UserActivityType {
|
|
87
|
+
favourites {
|
|
88
|
+
events
|
|
89
|
+
vendors
|
|
90
|
+
}
|
|
91
|
+
interests {
|
|
92
|
+
events {
|
|
93
|
+
resourceId
|
|
94
|
+
startDate
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
going {
|
|
98
|
+
events {
|
|
99
|
+
resourceId
|
|
100
|
+
startDate
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
`;
|
|
85
105
|
var USER_FIELDS_FRAGMENT = gql2`
|
|
86
106
|
fragment UserFields on UserType {
|
|
87
107
|
_id
|
|
@@ -93,10 +113,6 @@ var USER_FIELDS_FRAGMENT = gql2`
|
|
|
93
113
|
deletedAt
|
|
94
114
|
email
|
|
95
115
|
isTester
|
|
96
|
-
favourites {
|
|
97
|
-
events
|
|
98
|
-
vendors
|
|
99
|
-
}
|
|
100
116
|
firstName
|
|
101
117
|
lastName
|
|
102
118
|
licences
|
|
@@ -111,12 +127,16 @@ var USER_FIELDS_FRAGMENT = gql2`
|
|
|
111
127
|
termsAgreement {
|
|
112
128
|
...TermsAgreementFields
|
|
113
129
|
}
|
|
130
|
+
userActivity {
|
|
131
|
+
...UserActivityFields
|
|
132
|
+
}
|
|
114
133
|
vendor
|
|
115
134
|
updatedAt
|
|
116
135
|
}
|
|
117
136
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
118
137
|
${PARTNER_FIELDS_FRAGMENT}
|
|
119
138
|
${TERMS_AGREEMENT_FIELDS_FRAGMENT}
|
|
139
|
+
${USER_ACTIVITY_FIELDS_FRAGMENT}
|
|
120
140
|
`;
|
|
121
141
|
var STALL_TYPE_FIELDS_FRAGMENT = gql2`
|
|
122
142
|
fragment StallTypeFields on StallTypeType {
|
|
@@ -957,14 +977,26 @@ var GET_USER_VENDORS = gql11`
|
|
|
957
977
|
}
|
|
958
978
|
${VENDOR}
|
|
959
979
|
`;
|
|
960
|
-
var
|
|
961
|
-
query
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
980
|
+
var GET_USER_ACTIVITIES = gql11`
|
|
981
|
+
query getUserActivities {
|
|
982
|
+
userActivities {
|
|
983
|
+
favourites {
|
|
984
|
+
events {
|
|
985
|
+
...EventFields
|
|
986
|
+
}
|
|
987
|
+
vendors {
|
|
988
|
+
...VendorFields
|
|
989
|
+
}
|
|
965
990
|
}
|
|
966
|
-
|
|
967
|
-
|
|
991
|
+
interests {
|
|
992
|
+
events {
|
|
993
|
+
...EventFields
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
going {
|
|
997
|
+
events {
|
|
998
|
+
...EventFields
|
|
999
|
+
}
|
|
968
1000
|
}
|
|
969
1001
|
}
|
|
970
1002
|
}
|
|
@@ -2067,6 +2099,70 @@ var SELECT_PACKAGE_MUTATION = gql22`
|
|
|
2067
2099
|
}
|
|
2068
2100
|
}
|
|
2069
2101
|
`;
|
|
2102
|
+
var ADD_USER_INTEREST_RESOURCE_MUTATION = gql22`
|
|
2103
|
+
mutation addUserInterestResource(
|
|
2104
|
+
$resourceId: ID!
|
|
2105
|
+
$startDate: String!
|
|
2106
|
+
$userId: ID!
|
|
2107
|
+
) {
|
|
2108
|
+
addUserInterestResource(
|
|
2109
|
+
resourceId: $resourceId
|
|
2110
|
+
startDate: $startDate
|
|
2111
|
+
userId: $userId
|
|
2112
|
+
) {
|
|
2113
|
+
...UserFields
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
${USER_FIELDS_FRAGMENT}
|
|
2117
|
+
`;
|
|
2118
|
+
var REMOVE_USER_INTEREST_RESOURCE_MUTATION = gql22`
|
|
2119
|
+
mutation removeUserInterestResource(
|
|
2120
|
+
$resourceId: ID!
|
|
2121
|
+
$startDate: String!
|
|
2122
|
+
$userId: ID!
|
|
2123
|
+
) {
|
|
2124
|
+
removeUserInterestResource(
|
|
2125
|
+
resourceId: $resourceId
|
|
2126
|
+
startDate: $startDate
|
|
2127
|
+
userId: $userId
|
|
2128
|
+
) {
|
|
2129
|
+
...UserFields
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
${USER_FIELDS_FRAGMENT}
|
|
2133
|
+
`;
|
|
2134
|
+
var ADD_USER_GOING_RESOURCE_MUTATION = gql22`
|
|
2135
|
+
mutation addUserGoingResource(
|
|
2136
|
+
$resourceId: ID!
|
|
2137
|
+
$startDate: String!
|
|
2138
|
+
$userId: ID!
|
|
2139
|
+
) {
|
|
2140
|
+
addUserGoingResource(
|
|
2141
|
+
resourceId: $resourceId
|
|
2142
|
+
startDate: $startDate
|
|
2143
|
+
userId: $userId
|
|
2144
|
+
) {
|
|
2145
|
+
...UserFields
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
${USER_FIELDS_FRAGMENT}
|
|
2149
|
+
`;
|
|
2150
|
+
var REMOVE_USER_GOING_RESOURCE_MUTATION = gql22`
|
|
2151
|
+
mutation removeUserGoingResource(
|
|
2152
|
+
$resourceId: ID!
|
|
2153
|
+
$startDate: String!
|
|
2154
|
+
$userId: ID!
|
|
2155
|
+
) {
|
|
2156
|
+
removeUserGoingResource(
|
|
2157
|
+
resourceId: $resourceId
|
|
2158
|
+
startDate: $startDate
|
|
2159
|
+
userId: $userId
|
|
2160
|
+
) {
|
|
2161
|
+
...UserFields
|
|
2162
|
+
}
|
|
2163
|
+
}
|
|
2164
|
+
${USER_FIELDS_FRAGMENT}
|
|
2165
|
+
`;
|
|
2070
2166
|
|
|
2071
2167
|
// src/graphql/hooks/user/hooksMutation.ts
|
|
2072
2168
|
var useCreateUser = () => {
|
|
@@ -2093,7 +2189,7 @@ var useAddUserFavouriteResource = () => {
|
|
|
2093
2189
|
ADD_USER_FAVOURITE_RESOURCE_MUTATION,
|
|
2094
2190
|
{
|
|
2095
2191
|
awaitRefetchQueries: true,
|
|
2096
|
-
refetchQueries: [{ query:
|
|
2192
|
+
refetchQueries: [{ query: GET_USER_ACTIVITIES }]
|
|
2097
2193
|
}
|
|
2098
2194
|
);
|
|
2099
2195
|
return { addUserFavouriteResource, error, loading };
|
|
@@ -2103,7 +2199,7 @@ var useRemoveUserFavouriteResource = () => {
|
|
|
2103
2199
|
REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
|
|
2104
2200
|
{
|
|
2105
2201
|
awaitRefetchQueries: true,
|
|
2106
|
-
refetchQueries: [{ query:
|
|
2202
|
+
refetchQueries: [{ query: GET_USER_ACTIVITIES }]
|
|
2107
2203
|
}
|
|
2108
2204
|
);
|
|
2109
2205
|
return { error, loading, removeUserFavouriteResource };
|
|
@@ -2126,6 +2222,46 @@ var useSelectPackage = () => {
|
|
|
2126
2222
|
);
|
|
2127
2223
|
return { error, loading, selectPackage };
|
|
2128
2224
|
};
|
|
2225
|
+
var useAddUserInterestResource = () => {
|
|
2226
|
+
const [addUserInterestResource, { loading, error }] = useMutation12(
|
|
2227
|
+
ADD_USER_INTEREST_RESOURCE_MUTATION,
|
|
2228
|
+
{
|
|
2229
|
+
awaitRefetchQueries: true,
|
|
2230
|
+
refetchQueries: [{ query: GET_USER_ACTIVITIES }]
|
|
2231
|
+
}
|
|
2232
|
+
);
|
|
2233
|
+
return { addUserInterestResource, error, loading };
|
|
2234
|
+
};
|
|
2235
|
+
var useRemoveUserInterestResource = () => {
|
|
2236
|
+
const [removeUserInterestResource, { loading, error }] = useMutation12(
|
|
2237
|
+
REMOVE_USER_INTEREST_RESOURCE_MUTATION,
|
|
2238
|
+
{
|
|
2239
|
+
awaitRefetchQueries: true,
|
|
2240
|
+
refetchQueries: [{ query: GET_USER_ACTIVITIES }]
|
|
2241
|
+
}
|
|
2242
|
+
);
|
|
2243
|
+
return { error, loading, removeUserInterestResource };
|
|
2244
|
+
};
|
|
2245
|
+
var useAddUserGoingResource = () => {
|
|
2246
|
+
const [addUserGoingResource, { loading, error }] = useMutation12(
|
|
2247
|
+
ADD_USER_GOING_RESOURCE_MUTATION,
|
|
2248
|
+
{
|
|
2249
|
+
awaitRefetchQueries: true,
|
|
2250
|
+
refetchQueries: [{ query: GET_USER_ACTIVITIES }]
|
|
2251
|
+
}
|
|
2252
|
+
);
|
|
2253
|
+
return { addUserGoingResource, error, loading };
|
|
2254
|
+
};
|
|
2255
|
+
var useRemoveUserGoingResource = () => {
|
|
2256
|
+
const [removeUserGoingResource, { loading, error }] = useMutation12(
|
|
2257
|
+
REMOVE_USER_GOING_RESOURCE_MUTATION,
|
|
2258
|
+
{
|
|
2259
|
+
awaitRefetchQueries: true,
|
|
2260
|
+
refetchQueries: [{ query: GET_USER_ACTIVITIES }]
|
|
2261
|
+
}
|
|
2262
|
+
);
|
|
2263
|
+
return { error, loading, removeUserGoingResource };
|
|
2264
|
+
};
|
|
2129
2265
|
|
|
2130
2266
|
// src/graphql/hooks/user/hooksQuery.ts
|
|
2131
2267
|
import { useQuery as useQuery7 } from "@apollo/client";
|
|
@@ -2157,17 +2293,23 @@ var useGetUserVendors = () => {
|
|
|
2157
2293
|
const userVendors = data?.userVendors;
|
|
2158
2294
|
return { error, loading, refetch, userVendors };
|
|
2159
2295
|
};
|
|
2160
|
-
var
|
|
2161
|
-
const { loading, error, data, refetch } = useQuery7(
|
|
2296
|
+
var useGetUserActivities = () => {
|
|
2297
|
+
const { loading, error, data, refetch } = useQuery7(GET_USER_ACTIVITIES, {
|
|
2162
2298
|
fetchPolicy: "network-only"
|
|
2163
2299
|
});
|
|
2164
|
-
const
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2300
|
+
const userActivities = {
|
|
2301
|
+
favourites: {
|
|
2302
|
+
events: data?.userActivities.favourites.events,
|
|
2303
|
+
vendors: data?.userActivities.favourites.vendors
|
|
2304
|
+
},
|
|
2305
|
+
going: {
|
|
2306
|
+
events: data?.userActivities.going.events
|
|
2307
|
+
},
|
|
2308
|
+
interests: {
|
|
2309
|
+
events: data?.userActivities.interests.events
|
|
2310
|
+
}
|
|
2169
2311
|
};
|
|
2170
|
-
return { error, loading, refetch,
|
|
2312
|
+
return { error, loading, refetch, userActivities };
|
|
2171
2313
|
};
|
|
2172
2314
|
|
|
2173
2315
|
// src/graphql/hooks/ad/hooksMutation.ts
|
|
@@ -2395,6 +2537,8 @@ var useGetResourceViews = (resourceId, resourceType) => {
|
|
|
2395
2537
|
export {
|
|
2396
2538
|
useAddParticipantToChat,
|
|
2397
2539
|
useAddUserFavouriteResource,
|
|
2540
|
+
useAddUserGoingResource,
|
|
2541
|
+
useAddUserInterestResource,
|
|
2398
2542
|
useAdminUpdateResourceType,
|
|
2399
2543
|
useContactUs,
|
|
2400
2544
|
useCreateAd,
|
|
@@ -2438,9 +2582,9 @@ export {
|
|
|
2438
2582
|
useGetTester,
|
|
2439
2583
|
useGetTesters,
|
|
2440
2584
|
useGetUser,
|
|
2585
|
+
useGetUserActivities,
|
|
2441
2586
|
useGetUserChats,
|
|
2442
2587
|
useGetUserEvents,
|
|
2443
|
-
useGetUserFavourites,
|
|
2444
2588
|
useGetUserNotifications,
|
|
2445
2589
|
useGetUserNotificationsSubscription,
|
|
2446
2590
|
useGetUserVendors,
|
|
@@ -2458,6 +2602,8 @@ export {
|
|
|
2458
2602
|
useRegister,
|
|
2459
2603
|
useRemoveParticipantFromChat,
|
|
2460
2604
|
useRemoveUserFavouriteResource,
|
|
2605
|
+
useRemoveUserGoingResource,
|
|
2606
|
+
useRemoveUserInterestResource,
|
|
2461
2607
|
useRequestPasswordReset,
|
|
2462
2608
|
useResetPassword,
|
|
2463
2609
|
useSearchEvents,
|