@phygitallabs/tapquest-core 2.9.0 → 2.9.1

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/index.d.cts DELETED
@@ -1,684 +0,0 @@
1
- import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { QueryClient } from '@tanstack/react-query';
3
- import * as _phygitallabs_achievement from '@phygitallabs/achievement';
4
- import { GetManyUserOrDeviceAchievementProgressParams, Achievement, UserAchievementProgress } from '@phygitallabs/achievement';
5
- export { Achievement, AchievementRuleActionType, AchievementServiceProvider, GetAchievementProgressResponse, UserAchievementProgress, useAchievementProgress, useManyAchievements, useManyAchievementsRewardModels, useManyChildrenAchievements, useOneAchievement, useUserAchievementAction } from '@phygitallabs/achievement';
6
- import { EntityRewardModel, UserReward } from '@phygitallabs/reward';
7
- export { CmentityRewardType, CmentityStatus, CmentityUserReward, EntityRewardModel, UserReward, useClaimUserReward, useClearUserRewardCache, useCreateModelGroupReward, useCreateRewardModel, useDeleteRewardModel, useGetRewardModel, useGetUserRewards, useListRewardModels, useManyUserRewards, useUpdateRewardModel, useV1ListRewards } from '@phygitallabs/reward';
8
- import { PaginationRequest, GetManyResponse } from '@phygitallabs/api-core/src/types/pagination';
9
- import { LPResponse } from '@phygitallabs/notification-api';
10
- export * from '@phygitallabs/notification-api';
11
- import React$1 from 'react';
12
- import { ProjectModel, LocationModel } from '@phygitallabs/api-core';
13
- export { AIBotConfig, AdvertisingConfig, CampaignModel, CampaignState, ChipScanModel, CommonModel, CoreLocationModel, CreateCampaignRequest, CreateCampaignResponse, DateTimeNumber, DeviceMedia, EntityStatus, GeoPosition, GetManyCampaignRequest, GetManyCampaignResponse, GetManyUserActionLocationResponse, GetOneCampaignRequest, LocationAddress, LocationModel, LocationTranslations, Media, MediaType, MemoryModel, Mission, MissionProgress, MissionWithProgress, ProjectModel, SocialMedia, TaskProgress, TaskWithProgress, UpdateCampaignRequest, UpdateCampaignResponse, UserActionLocation, UserCampaignMission, UserCampaignModel, UserSourceType, locationQueryKeys, memoriesKey, resetMemoriesQuery, useOneCampaign as useCampaignDetail, useCancelUserRewardsRequest, useChipScanStory, useCreateMemory, useInfiniteMemories, useOneLocation as useLocationDetail, useUserCampaignsCompletedLocation as useLocationProgress, useManyLocations as useLocationsList, useManyMemory, useManyUserActionLocations, useMyProfile, useOneMemory, useOneUserCampaign, usePGLCoreService, useSendEmail, useSyncCheckin, useUpdateMyProfile, useUploadMedia, useUserCampaignAction } from '@phygitallabs/api-core';
14
- import * as react_jsx_runtime from 'react/jsx-runtime';
15
- export { CommonModel as GenerateCertificateCommonModel, DateTimeNumber as GenerateCertificateDateTimeNumber, EntityStatus as GenerateCertificateEntityStatus, Media as GenerateCertificateMedia, MediaType as GenerateCertificateMediaType, useCreateCertificate, useCreateCertificateAnonymous, useCreateCertificateWithMask, useGenerateFansipanCertificate, useGenerateTemplateCertificate, useGenerateThaocamvienCertificate, wrapTextWithFont } from '@phygitallabs/generate-certificate';
16
- export { cn, fileToBase64, parse } from '@phygitallabs/helpers';
17
-
18
- declare const useManyAchievementProgress: (params: GetManyUserOrDeviceAchievementProgressParams, options?: any) => _tanstack_react_query.QueryObserverRefetchErrorResult<_phygitallabs_achievement.UserAchievementProgress[], Error> | _tanstack_react_query.QueryObserverSuccessResult<_phygitallabs_achievement.UserAchievementProgress[], Error> | _tanstack_react_query.QueryObserverLoadingErrorResult<_phygitallabs_achievement.UserAchievementProgress[], Error> | _tanstack_react_query.QueryObserverPendingResult<_phygitallabs_achievement.UserAchievementProgress[], Error> | _tanstack_react_query.QueryObserverPlaceholderResult<_phygitallabs_achievement.UserAchievementProgress[], Error>;
19
-
20
- interface AchievementWithProgress {
21
- achievement: Achievement;
22
- progress: UserAchievementProgress | null;
23
- hasProgressError?: boolean;
24
- hasAchievementError?: boolean;
25
- }
26
- interface UseManyAchievementWithProgressParams {
27
- userId?: string;
28
- deviceUid?: string;
29
- applicationId?: string;
30
- achievementIds?: string[];
31
- }
32
- interface UseManyAchievementWithProgressReturn {
33
- data: AchievementWithProgress[];
34
- isLoading: boolean;
35
- isSuccess: boolean;
36
- achievementsError: Error | null;
37
- progressError: Error | null;
38
- refetchAchievements: () => void;
39
- refetchProgress: () => void;
40
- refetchAll: () => void;
41
- }
42
- declare enum AchievementType {
43
- DEFAULT = "default",
44
- MULTIPLE_CHECK_INS = "multiple_check_ins",
45
- RANDOM_CHECK_INS = "random_check_ins",
46
- GROUP_MISSION = "group_mission"
47
- }
48
-
49
- declare const getLocationIdsFromAchievementRule: (achievement: Achievement) => string[];
50
- declare const getActionsFromAchievementRule: (achievement: Achievement) => string[];
51
- declare const isAchievementCompleted: (achievement: UserAchievementProgress) => boolean;
52
- type SnakeToCamelCase<S extends string> = S extends `${infer T}_${infer U}` ? `${T}${Capitalize<SnakeToCamelCase<U>>}` : S;
53
- type ConvertSnakeToCamel<T> = T extends (infer U)[] ? ConvertSnakeToCamel<U>[] : T extends Record<string, unknown> ? {
54
- [K in keyof T as K extends string ? SnakeToCamelCase<K> : K]: ConvertSnakeToCamel<T[K]>;
55
- } : T;
56
- /**
57
- * Converts snake_case keys to camelCase keys in an object or array of objects
58
- */
59
- declare function convertSnakeToCamel<T>(obj: T): ConvertSnakeToCamel<T>;
60
-
61
- declare enum RewardClaimStatus {
62
- NOT_CLAIMED = "not_claimed",
63
- CLAIMED = "claimed",
64
- IN_PROGRESS = "in_progress",
65
- FAILED = "failed"
66
- }
67
-
68
- interface RewardRule {
69
- id: string;
70
- name: string;
71
- description?: string;
72
- type: string;
73
- conditions: Record<string, any>;
74
- is_active: boolean;
75
- priority?: number;
76
- created_at: string;
77
- updated_at: string;
78
- }
79
- interface RewardGroup {
80
- id: string;
81
- name: string;
82
- description?: string;
83
- is_active: boolean;
84
- reward_ids: string[];
85
- rewards?: EntityRewardModel[];
86
- project_id?: string;
87
- campaign_id?: string;
88
- achievement_id?: string;
89
- labels?: Record<string, any>;
90
- custom_info?: Record<string, any>;
91
- metadata?: Record<string, any>;
92
- created_at: string;
93
- updated_at: string;
94
- }
95
- interface RewardNotifyTheme {
96
- backgroundImage: string;
97
- giftImage: string;
98
- }
99
- interface RewardFilter {
100
- user_id?: string;
101
- device_uid?: string;
102
- reward_model_id?: string;
103
- group_reward_id?: string;
104
- project_id?: string;
105
- campaign_id?: string;
106
- achievement_id?: string;
107
- status?: string;
108
- claim_status?: string;
109
- is_claimable?: boolean;
110
- is_expired?: boolean;
111
- type?: string;
112
- labels?: Record<string, any>;
113
- created_from?: string;
114
- created_to?: string;
115
- claimed_from?: string;
116
- claimed_to?: string;
117
- }
118
- interface RewardModelFilter {
119
- name?: string;
120
- type?: string;
121
- is_active?: boolean;
122
- is_claimable?: boolean;
123
- project_id?: string;
124
- campaign_id?: string;
125
- achievement_id?: string;
126
- group_reward_id?: string;
127
- labels?: Record<string, any>;
128
- created_from?: string;
129
- created_to?: string;
130
- valid_from?: string;
131
- valid_until?: string;
132
- }
133
- interface ClaimUserRewardPayload {
134
- certificate?: {
135
- thumbnail_url?: string;
136
- type?: string;
137
- url?: string;
138
- };
139
- user_info: Record<string, any>;
140
- }
141
-
142
- interface GetManyUserRewardsRequest extends PaginationRequest {
143
- user_id?: string;
144
- device_uid?: string;
145
- group_reward_id?: string;
146
- project_id?: string;
147
- campaign_id?: string;
148
- achievement_id?: string;
149
- status?: string;
150
- claim_status?: string;
151
- is_claimable?: boolean;
152
- is_expired?: boolean;
153
- type?: string;
154
- labels?: string;
155
- created_from?: string;
156
- created_to?: string;
157
- claimed_from?: string;
158
- claimed_to?: string;
159
- }
160
- interface GetOneUserRewardRequest {
161
- id: string;
162
- include_reward_model?: boolean;
163
- include_certificate?: boolean;
164
- }
165
- interface CreateUserRewardRequest {
166
- user_id: string;
167
- device_uid?: string;
168
- reward_model_id: string;
169
- group_reward_id?: string;
170
- project_id?: string;
171
- campaign_id?: string;
172
- achievement_id?: string;
173
- custom_info?: Record<string, any>;
174
- labels?: Record<string, any>;
175
- metadata?: Record<string, any>;
176
- claim_data?: Record<string, any>;
177
- }
178
- interface UpdateUserRewardRequest {
179
- status?: string;
180
- claim_status?: string;
181
- claimed_at?: string;
182
- claimed_by?: string;
183
- claim_data?: Record<string, any>;
184
- certificate?: {
185
- thumbnail_url?: string;
186
- image_url?: string;
187
- title?: string;
188
- subtitle?: string;
189
- user_name?: string;
190
- user_email?: string;
191
- user_phone?: string;
192
- issued_at?: string;
193
- issued_by?: string;
194
- };
195
- custom_info?: Record<string, any>;
196
- labels?: Record<string, any>;
197
- metadata?: Record<string, any>;
198
- }
199
- interface ClaimUserRewardRequest {
200
- id: string;
201
- data: {
202
- certificate?: {
203
- thumbnail_url?: string;
204
- image_url?: string;
205
- title?: string;
206
- subtitle?: string;
207
- user_name?: string;
208
- user_email?: string;
209
- user_phone?: string;
210
- issued_at?: string;
211
- issued_by?: string;
212
- };
213
- custom_info?: Record<string, any>;
214
- labels?: Record<string, any>;
215
- metadata?: Record<string, any>;
216
- claim_data?: Record<string, any>;
217
- };
218
- }
219
- interface GetManyRewardModelsRequest extends PaginationRequest {
220
- name?: string;
221
- type?: string;
222
- is_active?: boolean;
223
- is_claimable?: boolean;
224
- project_id?: string;
225
- campaign_id?: string;
226
- achievement_id?: string;
227
- group_reward_id?: string;
228
- labels?: string;
229
- created_from?: string;
230
- created_to?: string;
231
- valid_from?: string;
232
- valid_until?: string;
233
- }
234
- interface GetOneRewardModelRequest {
235
- id: string;
236
- include_rules?: boolean;
237
- include_media?: boolean;
238
- }
239
- interface CreateRewardModelRequest {
240
- name: string;
241
- description?: string;
242
- type: string;
243
- image_url?: string;
244
- thumbnail_url?: string;
245
- value?: number;
246
- currency?: string;
247
- is_active?: boolean;
248
- is_claimable?: boolean;
249
- claim_limit?: number;
250
- valid_from?: string;
251
- valid_until?: string;
252
- labels?: Record<string, any>;
253
- custom_info?: Record<string, any>;
254
- group_reward_id?: string;
255
- project_id?: string;
256
- campaign_id?: string;
257
- achievement_id?: string;
258
- media?: {
259
- type: string;
260
- url: string;
261
- thumbnail_url?: string;
262
- };
263
- rules?: Array<{
264
- name: string;
265
- description?: string;
266
- type: string;
267
- conditions: Record<string, any>;
268
- is_active?: boolean;
269
- priority?: number;
270
- }>;
271
- metadata?: Record<string, any>;
272
- }
273
- interface UpdateRewardModelRequest {
274
- name?: string;
275
- description?: string;
276
- type?: string;
277
- image_url?: string;
278
- thumbnail_url?: string;
279
- value?: number;
280
- currency?: string;
281
- is_active?: boolean;
282
- is_claimable?: boolean;
283
- claim_limit?: number;
284
- valid_from?: string;
285
- valid_until?: string;
286
- labels?: Record<string, any>;
287
- custom_info?: Record<string, any>;
288
- group_reward_id?: string;
289
- project_id?: string;
290
- campaign_id?: string;
291
- achievement_id?: string;
292
- media?: {
293
- type: string;
294
- url: string;
295
- thumbnail_url?: string;
296
- };
297
- rules?: Array<{
298
- id?: string;
299
- name: string;
300
- description?: string;
301
- type: string;
302
- conditions: Record<string, any>;
303
- is_active?: boolean;
304
- priority?: number;
305
- }>;
306
- metadata?: Record<string, any>;
307
- }
308
- interface GetManyRewardGroupsRequest extends PaginationRequest {
309
- name?: string;
310
- is_active?: boolean;
311
- project_id?: string;
312
- campaign_id?: string;
313
- achievement_id?: string;
314
- labels?: string;
315
- created_from?: string;
316
- created_to?: string;
317
- }
318
- interface GetOneRewardGroupRequest {
319
- id: string;
320
- include_rewards?: boolean;
321
- }
322
- interface CreateRewardGroupRequest {
323
- name: string;
324
- description?: string;
325
- is_active?: boolean;
326
- reward_ids: string[];
327
- project_id?: string;
328
- campaign_id?: string;
329
- achievement_id?: string;
330
- labels?: Record<string, any>;
331
- custom_info?: Record<string, any>;
332
- metadata?: Record<string, any>;
333
- }
334
- interface UpdateRewardGroupRequest {
335
- name?: string;
336
- description?: string;
337
- is_active?: boolean;
338
- reward_ids?: string[];
339
- project_id?: string;
340
- campaign_id?: string;
341
- achievement_id?: string;
342
- labels?: Record<string, any>;
343
- custom_info?: Record<string, any>;
344
- metadata?: Record<string, any>;
345
- }
346
- interface CreateModelGroupRewardRequest {
347
- group_reward_ids: string[];
348
- }
349
- interface GetManyUserRewardsResponse extends GetManyResponse<UserReward> {
350
- }
351
- interface GetOneUserRewardResponse {
352
- data: UserReward;
353
- }
354
- interface GetManyRewardModelsResponse extends GetManyResponse<EntityRewardModel> {
355
- }
356
- interface GetOneRewardModelResponse {
357
- data: EntityRewardModel;
358
- }
359
- interface CreateUserRewardResponse {
360
- data: UserReward;
361
- }
362
- interface UpdateUserRewardResponse {
363
- data: UserReward;
364
- }
365
- interface ClaimUserRewardResponse {
366
- data: UserReward;
367
- }
368
- interface CreateRewardModelResponse {
369
- data: EntityRewardModel;
370
- }
371
- interface UpdateRewardModelResponse {
372
- data: EntityRewardModel;
373
- }
374
- interface CreateRewardGroupResponse {
375
- data: {
376
- id: string;
377
- name: string;
378
- description?: string;
379
- is_active: boolean;
380
- reward_ids: string[];
381
- project_id?: string;
382
- campaign_id?: string;
383
- achievement_id?: string;
384
- labels?: Record<string, any>;
385
- custom_info?: Record<string, any>;
386
- metadata?: Record<string, any>;
387
- created_at: string;
388
- updated_at: string;
389
- };
390
- }
391
- interface CreateModelGroupRewardResponse {
392
- data: EntityRewardModel[];
393
- }
394
-
395
- type EnvironmentType = "dev" | "staging" | "production";
396
-
397
- interface NotificationCallbacks {
398
- onWebSocketOpen?: (metadata: Record<string, any>) => void;
399
- onWebSocketClose?: (metadata: Record<string, any>) => void;
400
- onWebSocketMessage?: (data: LPResponse) => void;
401
- }
402
- interface NotificationProviderProps extends NotificationCallbacks {
403
- children: React$1.ReactNode;
404
- autoConnect?: boolean;
405
- user: {
406
- id?: string;
407
- accessToken?: string;
408
- };
409
- environment?: EnvironmentType;
410
- }
411
- declare const NotificationProvider: React$1.FC<NotificationProviderProps>;
412
-
413
- type SignInProvider = "password" | "google.com";
414
- declare enum UserRole {
415
- NULL = "NULL",
416
- SUPERADMIN = "SUPER_ADMIN",
417
- ORGADMIN = "ORG_ADMIN"
418
- }
419
- type UserData = {
420
- uid: string;
421
- id: string;
422
- userName: string;
423
- displayName?: string;
424
- avatar: string;
425
- exp: number;
426
- email: string;
427
- emailVerified: boolean;
428
- accessToken: string;
429
- refreshToken: string;
430
- signInProvider?: SignInProvider;
431
- role?: UserRole;
432
- scanStatus?: boolean;
433
- };
434
- interface AuthResponse {
435
- errorCode: string;
436
- data: UserData | null;
437
- }
438
- interface AuthService {
439
- signInWithEmailAndPassword(email: string, password: string): Promise<AuthResponse>;
440
- signInWithGoogle(): Promise<AuthResponse>;
441
- signUp(email: string, password: string): Promise<AuthResponse>;
442
- signOut(): Promise<void>;
443
- sendPasswordResetEmail(email: string): Promise<void>;
444
- sendEmailVerification(): Promise<void>;
445
- changePassword(newPassword: string): Promise<void>;
446
- onAuthStateChanged(callback: (user: UserData | null) => void): () => void;
447
- getCurrentUser(): UserData | null;
448
- }
449
- interface AuthCallbacks {
450
- onUserIdentify?: (userInfo: {
451
- email: string;
452
- name?: string;
453
- avatar?: string;
454
- uid?: string;
455
- }) => void;
456
- onTrackingReset?: () => void;
457
- onSignInSuccess?: (userData: UserData) => void;
458
- onSignInError?: (error: string) => void;
459
- onSignOutSuccess?: () => void;
460
- onSignUpSuccess?: (userData: UserData) => void;
461
- onSignUpError?: (error: string) => void;
462
- }
463
- interface UseAuthReturn {
464
- user: UserData;
465
- isSignedIn: boolean;
466
- isLoading: boolean;
467
- signIn: (email: string, password: string) => Promise<AuthResponse>;
468
- signInWithGoogle: () => Promise<AuthResponse>;
469
- signUp: (email: string, password: string) => Promise<AuthResponse>;
470
- signOut: () => Promise<void>;
471
- forgotPassword: (email: string) => Promise<void>;
472
- sendEmailVerification: () => Promise<void>;
473
- changePassword: (newPassword: string) => Promise<void>;
474
- updateScanStatus: (status: boolean) => void;
475
- refreshUser: (userData: UserData) => void;
476
- }
477
- interface AuthProviderProps$1 {
478
- children: React.ReactNode;
479
- authService: AuthService;
480
- authCallbacks?: AuthCallbacks;
481
- }
482
- interface FirebaseConfig {
483
- apiKey: string;
484
- authDomain: string;
485
- projectId: string;
486
- storageBucket: string;
487
- messagingSenderId: string;
488
- appId: string;
489
- measurementId: string;
490
- }
491
-
492
- interface AuthProviderProps {
493
- children: React.ReactNode;
494
- baseURL: string;
495
- queryClient: QueryClient;
496
- }
497
- declare const AuthProvider: ({ children, baseURL, queryClient, }: AuthProviderProps) => react_jsx_runtime.JSX.Element;
498
-
499
- declare const useAuth: () => any;
500
-
501
- interface UseGoogleLoginOptions {
502
- onSuccess?: () => void;
503
- onError?: (error: string) => void;
504
- onPopupBlocked?: () => void;
505
- onPopupClosed?: () => void;
506
- }
507
- interface UseGoogleLoginReturn {
508
- signIn: () => Promise<void>;
509
- isLoading: boolean;
510
- error: string | null;
511
- }
512
- declare function useGoogleLogin(options?: UseGoogleLoginOptions): UseGoogleLoginReturn;
513
-
514
- declare const userInfoKey = "phygital-user-info";
515
- declare const accessTokenKey = "accessToken";
516
- declare const refreshTokenKey = "refreshToken";
517
- declare const httpMaxRetries = 3;
518
- declare const retryAttemptsRefreshToken = "retryAttemptsRefreshToken";
519
- declare const deviceUIDKey = "Device-UID";
520
- declare const chipAuthTokenKey = "chip-auth-token";
521
- declare const CALLBACK_URL = "https://s3-sgn10.fptcloud.com/nomion-assets/platform/callback.html";
522
- declare const ALLOWED_ORIGINS: string[];
523
-
524
- declare const generateDeviceId: () => Promise<string>;
525
- declare const getDeviceUid: () => string | null;
526
- declare const setDeviceUid: (deviceId: string) => void;
527
- declare const removeDeviceUid: () => void;
528
- declare const checkDeviceUid: () => Promise<string>;
529
- declare const getChipAuthToken: () => string | null;
530
- declare const setChipAuthToken: (value: string) => void;
531
- declare const removeChipAuthToken: () => void;
532
- declare const getRetryAttemptsRefreshToken: () => string | null;
533
- declare const setRetryAttemptsRefreshToken: (value: string) => void;
534
- declare const getAccessToken: () => string | null;
535
- declare const setAccessToken: (value: string) => void;
536
- declare const removeAccessToken: () => void;
537
- declare const getRefreshToken: () => string | null;
538
- declare const setRefreshToken: (value: string) => void;
539
- declare const removeRefreshToken: () => void;
540
- declare const getUserInfo: () => any;
541
- declare const setUserInfo: (userData: any) => void;
542
- declare const removeUserInfo: () => void;
543
-
544
- type ScanChipData = {
545
- externalUrl?: string;
546
- campaignDetail?: ProjectModel;
547
- locationDetail?: LocationModel;
548
- scanCounter?: number;
549
- campaignId?: string;
550
- chipModelId?: string;
551
- organizationId?: string;
552
- projectId?: string;
553
- locationId?: string;
554
- chipUid?: string;
555
- };
556
- interface ScanChipResponse {
557
- data: ScanChipData | null;
558
- isLoading: boolean;
559
- isError: boolean;
560
- isSuccess: boolean;
561
- }
562
-
563
- interface UseScanChipProps {
564
- token?: string;
565
- id?: string;
566
- onScanChipError?: () => void;
567
- }
568
-
569
- declare function useScanChip({ token, id, onScanChipError }: UseScanChipProps): ScanChipResponse;
570
-
571
- declare enum TaskType {
572
- CHECK_IN = "check_in",
573
- CREATE_MEMORY = "create_memory",
574
- FILL_FORM = "fill_form",
575
- SHARE = "share"
576
- }
577
- interface CampaignByProjectIdModel {
578
- id: string;
579
- certificate_index?: number;
580
- completed_checkin_rule?: number;
581
- completed_device_uids?: string[];
582
- completed_location_ids?: string[];
583
- completed_user_ids?: string[];
584
- description?: string;
585
- image_url?: string;
586
- is_custom_checkin_rule?: boolean;
587
- location_ids?: string[];
588
- name: string;
589
- total_completed?: number;
590
- user_campaign?: any;
591
- custom_info: Record<string, any>;
592
- mission: Record<string, any>;
593
- achievement_id: string;
594
- start_date: string;
595
- end_date: string;
596
- certificate: {
597
- image: any;
598
- title: string;
599
- };
600
- project_id?: string;
601
- status: string;
602
- created_at: number;
603
- updated_at: number;
604
- created_by?: string;
605
- updated_by?: string;
606
- }
607
-
608
- interface UserCheckinLocationRanking {
609
- user_id: string;
610
- email: string;
611
- full_name: string;
612
- picture: string;
613
- completed_location_count: number;
614
- }
615
- interface CampaignLocationSummaryQueryOptions {
616
- page?: number;
617
- limit?: number;
618
- orderBy?: string;
619
- orderDirection?: 'asc' | 'desc';
620
- [key: string]: any;
621
- }
622
- interface CampaignLocationSummary {
623
- address: {
624
- custom_map_position: {
625
- x: number;
626
- y: number;
627
- };
628
- province: string;
629
- region: string;
630
- };
631
- id: string;
632
- name?: string;
633
- position: {
634
- latitude: number;
635
- longitude: number;
636
- };
637
- visit_count?: number;
638
- }
639
-
640
- declare const sortLocationsByIndex: <T extends {
641
- index?: number;
642
- }>(locations: T[]) => T[];
643
- declare const filterLocationsByProperty: <T extends Record<string, any>>(locations: T[], propertyName: keyof T, value: boolean) => T[];
644
-
645
- declare global {
646
- interface Window {
647
- dataLayer: Record<string, any>[];
648
- }
649
- }
650
- declare function useDataTracking(): {
651
- trackEvent: (eventName: string, eventData: Record<string, any>, useTools?: ("gtm" | "ga" | "posthog")[]) => void;
652
- trackUserIdentify: (userInfo: Record<string, any>) => void;
653
- trackLogoutEvent: () => void;
654
- };
655
-
656
- interface APIConfig {
657
- environment: EnvironmentType;
658
- version: APIVersionType;
659
- }
660
-
661
- interface TapquestCoreProviderProps {
662
- children: React$1.ReactNode;
663
- queryClient: QueryClient;
664
- apiConfig: APIConfig;
665
- }
666
- declare const TapquestCoreProvider: React$1.FC<TapquestCoreProviderProps>;
667
-
668
- interface UseAchivementPlusRewardModelParams {
669
- campaignId: string;
670
- }
671
- declare const useAchivementPlusRewardModel: ({ campaignId }: UseAchivementPlusRewardModelParams) => {
672
- mappedAchievements: {
673
- id: string;
674
- name: string;
675
- reward_model: EntityRewardModel;
676
- subAchievements: {
677
- id: string;
678
- reward_model: EntityRewardModel;
679
- }[];
680
- }[];
681
- isLoading: boolean;
682
- };
683
-
684
- export { ALLOWED_ORIGINS, AchievementType, type AchievementWithProgress, type AuthCallbacks, AuthProvider, type AuthProviderProps$1 as AuthProviderProps, type AuthResponse, type AuthService, CALLBACK_URL, type CampaignByProjectIdModel, type CampaignLocationSummary, type CampaignLocationSummaryQueryOptions, type ClaimUserRewardPayload, type ClaimUserRewardRequest, type ClaimUserRewardResponse, type CreateModelGroupRewardRequest, type CreateModelGroupRewardResponse, type CreateRewardGroupRequest, type CreateRewardGroupResponse, type CreateRewardModelRequest, type CreateRewardModelResponse, type CreateUserRewardRequest, type CreateUserRewardResponse, type FirebaseConfig, type GetManyRewardGroupsRequest, type GetManyRewardModelsRequest, type GetManyRewardModelsResponse, type GetManyUserRewardsRequest, type GetManyUserRewardsResponse, type GetOneRewardGroupRequest, type GetOneRewardModelRequest, type GetOneRewardModelResponse, type GetOneUserRewardRequest, type GetOneUserRewardResponse, NotificationProvider, RewardClaimStatus, type RewardFilter, type RewardGroup, type RewardModelFilter, type RewardNotifyTheme, type RewardRule, type ScanChipData, type ScanChipResponse, type SignInProvider, TapquestCoreProvider, TaskType, type UpdateRewardGroupRequest, type UpdateRewardModelRequest, type UpdateRewardModelResponse, type UpdateUserRewardRequest, type UpdateUserRewardResponse, type UseAuthReturn, type UseGoogleLoginOptions, type UseGoogleLoginReturn, type UseManyAchievementWithProgressParams, type UseManyAchievementWithProgressReturn, type UserCheckinLocationRanking, type UserData, UserRole, accessTokenKey, checkDeviceUid, chipAuthTokenKey, convertSnakeToCamel, deviceUIDKey, filterLocationsByProperty, generateDeviceId, getAccessToken, getActionsFromAchievementRule, getChipAuthToken, getDeviceUid, getLocationIdsFromAchievementRule, getRefreshToken, getRetryAttemptsRefreshToken, getUserInfo, httpMaxRetries, isAchievementCompleted, refreshTokenKey, removeAccessToken, removeChipAuthToken, removeDeviceUid, removeRefreshToken, removeUserInfo, retryAttemptsRefreshToken, setAccessToken, setChipAuthToken, setDeviceUid, setRefreshToken, setRetryAttemptsRefreshToken, setUserInfo, sortLocationsByIndex, useAchivementPlusRewardModel, useAuth, useDataTracking, useGoogleLogin, useManyAchievementProgress, useScanChip, userInfoKey };