@timardex/cluemart-shared 1.2.16 → 1.2.18
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/graphql/index.cjs +152 -31
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +37 -9
- package/dist/graphql/index.d.ts +37 -9
- package/dist/graphql/index.mjs +146 -29
- 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 +152 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +46 -18
- package/dist/index.d.ts +46 -18
- package/dist/index.mjs +146 -29
- package/dist/index.mjs.map +1 -1
- package/dist/{resourceViews-B-u5nH1M.d.mts → resourceActivities-Cs8a9DgE.d.mts} +6 -6
- package/dist/{resourceViews-BZZt3kvl.d.ts → resourceActivities-eZ2Rycy_.d.ts} +6 -6
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/{ad-D6-mYEzV.d.ts → ad-0fMmeab1.d.ts} +6 -6
- package/dist/{ad-Dj1GOSzC.d.mts → ad-BozU03cK.d.mts} +6 -6
package/dist/graphql/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _apollo_client from '@apollo/client';
|
|
2
|
-
import { C as ChatType, N as NotificationType, a as NotificationCount, R as
|
|
2
|
+
import { C as ChatType, N as NotificationType, a as NotificationCount, R as ResourceActivityType } from '../resourceActivities-eZ2Rycy_.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;
|
|
@@ -420,8 +440,16 @@ declare const useGetUserActivities: () => {
|
|
|
420
440
|
loading: boolean;
|
|
421
441
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
422
442
|
userActivities: {
|
|
423
|
-
|
|
424
|
-
|
|
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
|
|
|
@@ -466,17 +494,17 @@ declare const useGetAdsByRegion: (region: string, status?: EnumAdStatus) => {
|
|
|
466
494
|
}>>;
|
|
467
495
|
};
|
|
468
496
|
|
|
469
|
-
declare const
|
|
470
|
-
|
|
497
|
+
declare const useCreateResourceActivity: () => {
|
|
498
|
+
createResourceActivity: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
471
499
|
error: _apollo_client.ApolloError | undefined;
|
|
472
500
|
loading: boolean;
|
|
473
501
|
};
|
|
474
502
|
|
|
475
|
-
declare const
|
|
503
|
+
declare const useGetResourceActivities: (resourceId: string, resourceType: EnumResourceType) => {
|
|
476
504
|
error: _apollo_client.ApolloError | undefined;
|
|
477
505
|
loading: boolean;
|
|
478
506
|
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
|
|
479
|
-
|
|
507
|
+
resourceActivities: ResourceActivityType[];
|
|
480
508
|
};
|
|
481
509
|
|
|
482
|
-
export { useAddParticipantToChat, useAddUserFavouriteResource, useAdminUpdateResourceType, useContactUs, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation,
|
|
510
|
+
export { useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAdminUpdateResourceType, useContactUs, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceActivity, 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, useGetResourceActivities, useGetResourceConnections, 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
|
@@ -2099,6 +2099,70 @@ var SELECT_PACKAGE_MUTATION = gql22`
|
|
|
2099
2099
|
}
|
|
2100
2100
|
}
|
|
2101
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
|
+
`;
|
|
2102
2166
|
|
|
2103
2167
|
// src/graphql/hooks/user/hooksMutation.ts
|
|
2104
2168
|
var useCreateUser = () => {
|
|
@@ -2158,6 +2222,46 @@ var useSelectPackage = () => {
|
|
|
2158
2222
|
);
|
|
2159
2223
|
return { error, loading, selectPackage };
|
|
2160
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
|
+
};
|
|
2161
2265
|
|
|
2162
2266
|
// src/graphql/hooks/user/hooksQuery.ts
|
|
2163
2267
|
import { useQuery as useQuery7 } from "@apollo/client";
|
|
@@ -2193,11 +2297,17 @@ var useGetUserActivities = () => {
|
|
|
2193
2297
|
const { loading, error, data, refetch } = useQuery7(GET_USER_ACTIVITIES, {
|
|
2194
2298
|
fetchPolicy: "network-only"
|
|
2195
2299
|
});
|
|
2196
|
-
const events = data?.userActivities.events;
|
|
2197
|
-
const vendors = data?.userActivities.vendors;
|
|
2198
2300
|
const userActivities = {
|
|
2199
|
-
|
|
2200
|
-
|
|
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
|
+
}
|
|
2201
2311
|
};
|
|
2202
2312
|
return { error, loading, refetch, userActivities };
|
|
2203
2313
|
};
|
|
@@ -2364,32 +2474,32 @@ var useGetAdsByRegion = (region, status) => {
|
|
|
2364
2474
|
};
|
|
2365
2475
|
};
|
|
2366
2476
|
|
|
2367
|
-
// src/graphql/hooks/
|
|
2477
|
+
// src/graphql/hooks/resourceActivities/hooksMutation.ts
|
|
2368
2478
|
import { useMutation as useMutation14 } from "@apollo/client";
|
|
2369
2479
|
|
|
2370
|
-
// src/graphql/mutations/
|
|
2480
|
+
// src/graphql/mutations/resourceActivities.ts
|
|
2371
2481
|
import { gql as gql25 } from "@apollo/client";
|
|
2372
|
-
var
|
|
2373
|
-
mutation
|
|
2374
|
-
|
|
2482
|
+
var CREATE_RESOURCE_ACTIVITY_MUTATION = gql25`
|
|
2483
|
+
mutation createResourceActivity($input: ResourceActivityInputType!) {
|
|
2484
|
+
createResourceActivity(input: $input)
|
|
2375
2485
|
}
|
|
2376
2486
|
`;
|
|
2377
2487
|
|
|
2378
|
-
// src/graphql/hooks/
|
|
2379
|
-
var
|
|
2380
|
-
const [
|
|
2381
|
-
|
|
2488
|
+
// src/graphql/hooks/resourceActivities/hooksMutation.ts
|
|
2489
|
+
var useCreateResourceActivity = () => {
|
|
2490
|
+
const [createResourceActivity, { loading, error }] = useMutation14(
|
|
2491
|
+
CREATE_RESOURCE_ACTIVITY_MUTATION
|
|
2382
2492
|
);
|
|
2383
|
-
return {
|
|
2493
|
+
return { createResourceActivity, error, loading };
|
|
2384
2494
|
};
|
|
2385
2495
|
|
|
2386
|
-
// src/graphql/hooks/
|
|
2496
|
+
// src/graphql/hooks/resourceActivities/hooksQuery.ts
|
|
2387
2497
|
import { useQuery as useQuery9 } from "@apollo/client";
|
|
2388
2498
|
|
|
2389
|
-
// src/graphql/queries/
|
|
2499
|
+
// src/graphql/queries/resourceActivities.ts
|
|
2390
2500
|
import { gql as gql26 } from "@apollo/client";
|
|
2391
|
-
var
|
|
2392
|
-
fragment
|
|
2501
|
+
var RESOURCE_ACTIVITIES_FIELDS_FRAGMENT = gql26`
|
|
2502
|
+
fragment ResourceActivitiesFields on ResourceActivitiesType {
|
|
2393
2503
|
resourceId
|
|
2394
2504
|
resourceType
|
|
2395
2505
|
views {
|
|
@@ -2402,18 +2512,21 @@ var RESOURCE_VIEWS_FIELDS_FRAGMENT = gql26`
|
|
|
2402
2512
|
}
|
|
2403
2513
|
}
|
|
2404
2514
|
`;
|
|
2405
|
-
var
|
|
2406
|
-
query
|
|
2407
|
-
|
|
2408
|
-
|
|
2515
|
+
var GET_RESOURCE_ACTIVITIES = gql26`
|
|
2516
|
+
query getResourceActivities(
|
|
2517
|
+
$resourceType: ResourceTypeEnum!
|
|
2518
|
+
$resourceId: ID!
|
|
2519
|
+
) {
|
|
2520
|
+
resourceActivities(resourceType: $resourceType, resourceId: $resourceId) {
|
|
2521
|
+
...ResourceActivitiesFields
|
|
2409
2522
|
}
|
|
2410
2523
|
}
|
|
2411
|
-
${
|
|
2524
|
+
${RESOURCE_ACTIVITIES_FIELDS_FRAGMENT}
|
|
2412
2525
|
`;
|
|
2413
2526
|
|
|
2414
|
-
// src/graphql/hooks/
|
|
2415
|
-
var
|
|
2416
|
-
const { data, loading, error, refetch } = useQuery9(
|
|
2527
|
+
// src/graphql/hooks/resourceActivities/hooksQuery.ts
|
|
2528
|
+
var useGetResourceActivities = (resourceId, resourceType) => {
|
|
2529
|
+
const { data, loading, error, refetch } = useQuery9(GET_RESOURCE_ACTIVITIES, {
|
|
2417
2530
|
fetchPolicy: "network-only",
|
|
2418
2531
|
variables: { resourceId, resourceType }
|
|
2419
2532
|
});
|
|
@@ -2421,12 +2534,14 @@ var useGetResourceViews = (resourceId, resourceType) => {
|
|
|
2421
2534
|
error,
|
|
2422
2535
|
loading,
|
|
2423
2536
|
refetch,
|
|
2424
|
-
|
|
2537
|
+
resourceActivities: data?.resourceActivities
|
|
2425
2538
|
};
|
|
2426
2539
|
};
|
|
2427
2540
|
export {
|
|
2428
2541
|
useAddParticipantToChat,
|
|
2429
2542
|
useAddUserFavouriteResource,
|
|
2543
|
+
useAddUserGoingResource,
|
|
2544
|
+
useAddUserInterestResource,
|
|
2430
2545
|
useAdminUpdateResourceType,
|
|
2431
2546
|
useContactUs,
|
|
2432
2547
|
useCreateAd,
|
|
@@ -2436,7 +2551,7 @@ export {
|
|
|
2436
2551
|
useCreatePoster,
|
|
2437
2552
|
useCreatePushToken,
|
|
2438
2553
|
useCreateRelation,
|
|
2439
|
-
|
|
2554
|
+
useCreateResourceActivity,
|
|
2440
2555
|
useCreateTester,
|
|
2441
2556
|
useCreateUser,
|
|
2442
2557
|
useCreateVendor,
|
|
@@ -2465,8 +2580,8 @@ export {
|
|
|
2465
2580
|
useGetNotificationCountSubscription,
|
|
2466
2581
|
useGetRelation,
|
|
2467
2582
|
useGetRelationByEventAndVendor,
|
|
2583
|
+
useGetResourceActivities,
|
|
2468
2584
|
useGetResourceConnections,
|
|
2469
|
-
useGetResourceViews,
|
|
2470
2585
|
useGetTester,
|
|
2471
2586
|
useGetTesters,
|
|
2472
2587
|
useGetUser,
|
|
@@ -2490,6 +2605,8 @@ export {
|
|
|
2490
2605
|
useRegister,
|
|
2491
2606
|
useRemoveParticipantFromChat,
|
|
2492
2607
|
useRemoveUserFavouriteResource,
|
|
2608
|
+
useRemoveUserGoingResource,
|
|
2609
|
+
useRemoveUserInterestResource,
|
|
2493
2610
|
useRequestPasswordReset,
|
|
2494
2611
|
useResetPassword,
|
|
2495
2612
|
useSearchEvents,
|