@bzbs/react-api-client 0.0.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.
@@ -0,0 +1,1092 @@
1
+ import { AxiosResponse, AxiosInstance } from 'axios';
2
+
3
+ interface BzbsErrorResponse {
4
+ requestId?: string;
5
+ error?: {
6
+ id?: number;
7
+ message?: string;
8
+ code?: number;
9
+ type?: string;
10
+ };
11
+ }
12
+
13
+ type ServiceResponse<T> = {
14
+ model: T | undefined;
15
+ response: AxiosResponse | undefined;
16
+ error: any | undefined | BzbsErrorResponse;
17
+ };
18
+ type RequestOptions = {
19
+ headers?: {
20
+ [key: string]: string;
21
+ };
22
+ params?: {
23
+ [key: string]: string;
24
+ };
25
+ data?: {
26
+ [key: string]: string;
27
+ } | any;
28
+ baseUrl?: string;
29
+ };
30
+ declare class BaseService {
31
+ client: AxiosInstance;
32
+ baseUrl: string;
33
+ constructor(client: AxiosInstance, baseUrl: string);
34
+ get<T>(path: string, params?: any, requestOptions?: RequestOptions): Promise<ServiceResponse<T>>;
35
+ post<T>(path: string, data: any, requestOptions?: RequestOptions): Promise<ServiceResponse<T>>;
36
+ put<T>(path: string, data: any, requestOptions?: RequestOptions): Promise<ServiceResponse<T>>;
37
+ delete<T>(path: string, requestOptions?: RequestOptions): Promise<ServiceResponse<T>>;
38
+ patch<T>(path: string, data: any, requestOptions?: RequestOptions): Promise<ServiceResponse<T>>;
39
+ joinUrl(baseUrl: string, path: string): string;
40
+ }
41
+
42
+ interface LoginResponse {
43
+ token: string;
44
+ userId: string;
45
+ appId: string;
46
+ isFbUser: boolean;
47
+ locale: number;
48
+ userLevel: number;
49
+ userLevelDetail: string;
50
+ userFlags: any[];
51
+ sponsorId: number;
52
+ canRedeem: boolean;
53
+ uuid: string;
54
+ joinDate: number;
55
+ usercode: string;
56
+ detail: Detail;
57
+ cart_count: number;
58
+ platform?: any;
59
+ topics: string[];
60
+ channel: string;
61
+ TermAndCondition: number;
62
+ DataPrivacy: number;
63
+ MarketingOption: number;
64
+ ConsentAge?: any;
65
+ EmailMarketing: number;
66
+ SMSMarketing: number;
67
+ NotificationMarketing: number;
68
+ LineMarketing: number;
69
+ jwt: string;
70
+ AnalyticsBuzzebeesCookies: number;
71
+ AnalyticsFirebaseCookies: number;
72
+ AnalyticsGoogleCookies: number;
73
+ AnalyticsMetaCookies: number;
74
+ AnalyticsOtherCookies: number;
75
+ FunctionalCookies: number;
76
+ MarketingCookies: number;
77
+ NecessaryCookies: number;
78
+ ewallet_token: string;
79
+ authenticated: boolean;
80
+ sponsor_pages?: any;
81
+ updated_points: UpdatedPoints;
82
+ }
83
+ interface UpdatedPoints {
84
+ points: number;
85
+ time: number;
86
+ }
87
+ interface Detail {
88
+ ewallet_token: string;
89
+ }
90
+
91
+ declare class AuthenticateApi extends BaseService {
92
+ constructor(client: AxiosInstance, baseUrl: string);
93
+ deviceLogin(appId: string, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
94
+ usernamePasswordLogin(username: string, password: string, appId: string, requestOptions?: RequestOptions): Promise<ServiceResponse<LoginResponse>>;
95
+ }
96
+
97
+ interface Badge {
98
+ name?: string;
99
+ description?: string;
100
+ fbDescription?: string;
101
+ points?: number;
102
+ active?: boolean;
103
+ maxLevels?: number;
104
+ startDate?: any;
105
+ endDate?: any;
106
+ period?: string;
107
+ isSpecific?: boolean;
108
+ isSkipNoti?: boolean;
109
+ grouping?: string;
110
+ autoRedeemCampaignId?: any;
111
+ autoRedeemBadgeLevel?: any;
112
+ autoRedeemContinueEveryLevel?: boolean;
113
+ agencyId?: any;
114
+ appId?: any;
115
+ dependencyBadge?: any;
116
+ dependencyBadgeType?: any;
117
+ userLevel?: number;
118
+ userLevelExpireDate?: any;
119
+ userLevelExpireIn?: any;
120
+ userLevelExpirePeriod?: any;
121
+ userLevelExpireInRounding?: boolean;
122
+ customInfo?: any;
123
+ sequence?: number;
124
+ nextNotificationDate?: any;
125
+ nextNotificationPeriod?: any;
126
+ nextNotification?: any;
127
+ nextNotificationRounding?: boolean;
128
+ reset?: boolean;
129
+ redeemMedia?: any;
130
+ isSkipNotiWhenNotEarnPoints?: boolean;
131
+ level?: number;
132
+ isSkipNotiAutoRedeem?: boolean;
133
+ pushNotiMessage?: any;
134
+ lineMessageSetting?: any;
135
+ pushCampaignId?: any;
136
+ pushCampaignMessage?: any;
137
+ deleted?: boolean;
138
+ refreshFromTraceProfile?: boolean;
139
+ missions?: Mission[];
140
+ partitionKey?: string;
141
+ rowKey?: string;
142
+ timestamp?: number;
143
+ eTag?: string;
144
+ isObtain?: boolean;
145
+ obtainOn?: any;
146
+ percentage?: number;
147
+ id?: string;
148
+ unlocked_by_others?: boolean;
149
+ auto_redeem?: any;
150
+ fb_description?: string;
151
+ IsSkipNoti?: boolean;
152
+ CustomInfo?: any;
153
+ UserLevel?: number;
154
+ IsSkipNextNoti?: boolean;
155
+ error?: any;
156
+ LineMessageSetting?: any;
157
+ }
158
+ interface Mission {
159
+ tracePlanId?: string;
160
+ value?: number;
161
+ current?: number;
162
+ isComplete?: boolean;
163
+ }
164
+
165
+ declare class BadgeApi extends BaseService {
166
+ constructor(client: AxiosInstance, baseUrl: string);
167
+ getBadge(params: {
168
+ badgeId?: string;
169
+ option?: {
170
+ [key: string]: any;
171
+ };
172
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<Badge[]>>;
173
+ }
174
+
175
+ interface Campaign {
176
+ ID?: number;
177
+ ReferenceCode?: string;
178
+ Name?: string;
179
+ AgencyId?: number;
180
+ AgencyName?: string;
181
+ StartDate?: number;
182
+ IsConditionPass?: boolean;
183
+ DayProceed?: number;
184
+ DayRemain?: number;
185
+ Qty?: number;
186
+ RedeemMostPerPerson?: number;
187
+ RedeemCount?: number;
188
+ CurrentDate?: number;
189
+ NextRedeemDate?: number;
190
+ TracesJson?: any;
191
+ Rating?: any;
192
+ UserLevel?: number;
193
+ UserVisibility?: number;
194
+ PointPerUnit?: number;
195
+ PricePerUnit?: number;
196
+ FeePerUnit?: number;
197
+ Discount?: number;
198
+ ModifyDate?: number;
199
+ Type?: number;
200
+ Caption?: string;
201
+ RedeemMedia?: number;
202
+ IsSponsor?: boolean;
203
+ FullImageUrl?: string;
204
+ ExpireDate?: number;
205
+ Extra?: string;
206
+ EriginalPrice?: number;
207
+ IsCheckUserCampaignPermission?: boolean;
208
+ PointType?: string;
209
+ CrossAppCampaignId?: number;
210
+ HasCrossApp?: boolean;
211
+ CategoryId?: number;
212
+ CategoryName?: string;
213
+ CategorySequence?: number;
214
+ ParentCategoryId?: number;
215
+ MasterCampaignId?: number;
216
+ RankVote?: any;
217
+ Vote?: number;
218
+ Like?: number;
219
+ OtherPointPerUnit?: number;
220
+ Website?: string;
221
+ ItemCountSold?: number;
222
+ RedeemMostPerCard?: number;
223
+ RedeemCountPerCard?: any;
224
+ NextRedeemDatePerCard?: number;
225
+ PriceSold?: number;
226
+ LocationAgencyId?: number;
227
+ SubscriptionPeriod?: number;
228
+ SubscriptionTime?: number;
229
+ PartialPoints?: any;
230
+ SubCampaigns?: any;
231
+ MinSubCampaignPricePerUnit?: any;
232
+ MaxSubCampaignPricePerUnit?: any;
233
+ CustomFacebookMessage?: string;
234
+ }
235
+
236
+ interface CampaignDetail {
237
+ AgencyName?: string;
238
+ ID?: number;
239
+ AgencyID?: number;
240
+ Name?: string;
241
+ NameEN?: string;
242
+ Detail?: string;
243
+ DetailEN?: string;
244
+ Condition?: string;
245
+ ConditionEn?: string;
246
+ ConditionAlert?: string;
247
+ ReferenceCode?: string;
248
+ CategoryID?: number;
249
+ CategoryName?: string;
250
+ StartDate?: number;
251
+ ExpireDate?: number;
252
+ Location?: string;
253
+ Website?: string;
254
+ Discount?: number;
255
+ OriginalPrice?: number;
256
+ PricePerUnit: number;
257
+ PointPerUnit: number;
258
+ Quantity?: number;
259
+ RedeemMostPerPerson?: number;
260
+ PeopleLike?: number;
261
+ PeopleDislike?: number;
262
+ ItemCountSold?: number;
263
+ Under18?: boolean;
264
+ Delivered?: boolean;
265
+ StatusID?: number;
266
+ TermsAndConditions?: string;
267
+ CreateDate?: number;
268
+ CreateBy?: string;
269
+ ModifyDate?: number;
270
+ ModifyBy?: string;
271
+ Buzz?: number;
272
+ Score?: number;
273
+ Type?: number;
274
+ AgencyAddress?: string;
275
+ AgencyCity?: string;
276
+ AgencyCountry?: string;
277
+ AgencyZipCode?: string;
278
+ AgencyTel?: string;
279
+ AgencyWebsite?: string;
280
+ IsSponsor?: boolean;
281
+ DayRemain?: number;
282
+ DayProceed?: number;
283
+ SoldOutDate?: number;
284
+ CurrentDate?: number;
285
+ ParentCampaignID?: number;
286
+ UserLevel?: number;
287
+ Caption?: string;
288
+ DaysValidAfterExpire?: number;
289
+ VoucherExpireDate?: number;
290
+ RedeemCount?: number;
291
+ UseCount?: number;
292
+ NextRedeemDate?: number;
293
+ LocationAgencyID?: number;
294
+ IsLike?: boolean;
295
+ IsSpecificPrintVoucher?: boolean;
296
+ IsSpecificLocation?: boolean;
297
+ MinutesValidAfterUsed?: number;
298
+ HasWinner?: boolean;
299
+ RedeemMedia?: number;
300
+ EmsDeliveryCostPerUnit?: number;
301
+ RegularDeliveryCostPerUnit?: number;
302
+ Barcode?: string;
303
+ CustomInput?: string;
304
+ SendNotifications?: boolean;
305
+ Keyword?: string;
306
+ CustomCaption?: string;
307
+ CustomFacebookMessage?: string;
308
+ Extra?: any;
309
+ InterfaceDisplay?: string;
310
+ PointType?: string;
311
+ AgencyEmail?: string;
312
+ DefaultPrivilegeMessage?: string;
313
+ IsNotAutoUse?: boolean;
314
+ Pictures?: Picture[];
315
+ IsConditionPass?: boolean;
316
+ ConditionAlertID?: number;
317
+ Qty?: number;
318
+ FullImageUrl?: string;
319
+ SubCampaignStyles?: SubCampaignStyle;
320
+ Related?: any[];
321
+ AgencyLogoUrl?: string;
322
+ IsFavourite?: boolean;
323
+ SubCampaigns?: SubCampaign[];
324
+ }
325
+ interface SubCampaign {
326
+ CampaignId?: number;
327
+ Type?: any;
328
+ Size?: any;
329
+ Quantity?: number;
330
+ RedeemMostPerPerson?: number;
331
+ ItemCountSold?: number;
332
+ imageUrl?: string;
333
+ }
334
+ interface SubCampaignStyle {
335
+ styles?: Style[];
336
+ masterCampaignId?: number;
337
+ hasStyle?: boolean;
338
+ }
339
+ interface Style {
340
+ value?: string;
341
+ points?: number;
342
+ type?: string;
343
+ subitems?: Style[];
344
+ price?: number;
345
+ campaignId?: string;
346
+ name?: string;
347
+ nameEn?: string;
348
+ quantity?: number;
349
+ itemCountSold?: number;
350
+ }
351
+ interface Picture {
352
+ ID?: number;
353
+ CampaignID?: number;
354
+ Type?: string;
355
+ Sequence?: number;
356
+ Caption?: string;
357
+ ImageUrl?: string;
358
+ FullImageUrl?: string;
359
+ PartitionKey?: string;
360
+ RowKey?: string;
361
+ Timestamp?: number;
362
+ ETag?: string;
363
+ }
364
+
365
+ interface FavoriteResponse {
366
+ PeopleFavourite?: number;
367
+ Favourite?: number;
368
+ }
369
+
370
+ interface RedeemResponse {
371
+ CampaignId?: number;
372
+ ItemNumber?: number;
373
+ Serial?: string;
374
+ AgencyId?: number;
375
+ AgencyName?: string;
376
+ CatId?: number;
377
+ Name?: string;
378
+ NextRedeemDate?: number;
379
+ CurrentDate?: number;
380
+ RedeemCount?: number;
381
+ UseCount?: number;
382
+ Qty?: number;
383
+ IsConditionPass?: boolean;
384
+ ConditionAlert?: any;
385
+ IsNotAutoUse?: boolean;
386
+ PointType?: string;
387
+ InterfaceDisplay?: string;
388
+ RedeemKey?: string;
389
+ PricePerUnit?: number;
390
+ UseCountPerCard?: number;
391
+ RedeemDate?: number;
392
+ CampaignName?: string;
393
+ PointPerUnit?: number;
394
+ ExpireIn?: number;
395
+ Points?: number;
396
+ UpdatedPoints?: UpdatedPoints | null;
397
+ PrivilegeMessage?: string;
398
+ PrivilegeMessageEn?: string;
399
+ PrivilegeMessageFormat?: string;
400
+ Buzzebees?: Buzzebees | null;
401
+ }
402
+ interface Buzzebees {
403
+ points?: number;
404
+ updated_points?: UpdatedPoints;
405
+ traces?: Trace[];
406
+ badges?: Badge[];
407
+ }
408
+ interface Trace {
409
+ Id?: string;
410
+ Current?: number;
411
+ Change?: number;
412
+ Points?: number;
413
+ ObjectId?: string;
414
+ ValueResetReason?: string;
415
+ UserDescription?: string;
416
+ UserLevel?: number;
417
+ CustomInfo?: string;
418
+ LineMessageSetting?: string;
419
+ }
420
+
421
+ declare class CampaignApi extends BaseService {
422
+ constructor(client: AxiosInstance, baseUrl: string);
423
+ campaign(params: {
424
+ config: string;
425
+ cat?: string;
426
+ byConfig?: boolean;
427
+ skip?: number;
428
+ top?: number;
429
+ deviceLocale?: number;
430
+ locale?: number;
431
+ keyword?: string;
432
+ startDate?: string;
433
+ sponsorId?: string;
434
+ maxPoints?: string;
435
+ minPoints?: string;
436
+ sortBy?: string;
437
+ center?: string;
438
+ hashTags?: string;
439
+ locationAgencyId?: string;
440
+ option?: {
441
+ [key: string]: any;
442
+ };
443
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<Campaign[]>>;
444
+ favoriteCampaigns(params: {
445
+ skip?: number;
446
+ top?: number;
447
+ locale?: number;
448
+ option?: {
449
+ [key: string]: any;
450
+ };
451
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<Campaign[]>>;
452
+ campaignDetails(param: {
453
+ id: string;
454
+ deviceLocale?: number;
455
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<CampaignDetail>>;
456
+ addToFavorite(id: string, requestOptions?: RequestOptions): Promise<ServiceResponse<FavoriteResponse>>;
457
+ removeFromFavorite(id: string, requestOptions?: RequestOptions): Promise<ServiceResponse<FavoriteResponse>>;
458
+ redeem(params: {
459
+ id: string;
460
+ addressKey?: string;
461
+ contactNumber?: string;
462
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<RedeemResponse>>;
463
+ bulkRedeem(id: string, quantity: number, requestOptions?: RequestOptions): Promise<ServiceResponse<RedeemResponse>>;
464
+ }
465
+
466
+ interface CartCountResponse {
467
+ cart_count?: number;
468
+ }
469
+
470
+ declare class CartApi extends BaseService {
471
+ constructor(client: AxiosInstance, baseUrl: string);
472
+ addCart(params: {
473
+ id: string;
474
+ mode?: string;
475
+ qty?: number;
476
+ sideCampaignJson?: string;
477
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<CartCountResponse>>;
478
+ cartCount(requestOptions?: RequestOptions): Promise<ServiceResponse<CartCountResponse>>;
479
+ }
480
+
481
+ interface Category {
482
+ mode?: string;
483
+ listConfig?: string;
484
+ name?: string;
485
+ id?: number;
486
+ detail?: string;
487
+ count?: number;
488
+ imageUrl?: string;
489
+ subCats?: Category[];
490
+ nameEn?: string;
491
+ nameTh?: string;
492
+ }
493
+
494
+ declare class CategoryApi extends BaseService {
495
+ constructor(client: AxiosInstance, baseUrl: string);
496
+ categories(params: {
497
+ byConfig: boolean;
498
+ config: string;
499
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<Category[]>>;
500
+ }
501
+
502
+ interface Consent {
503
+ termAndCondition?: number;
504
+ dataPrivacy?: number;
505
+ marketingOption?: number;
506
+ consentAge?: number;
507
+ lineMarketing?: number;
508
+ notificationMarketing?: number;
509
+ smsMarketing?: number;
510
+ emailMarketing?: number;
511
+ analyticsBuzzebeesCookies?: number;
512
+ analyticsFirebaseCookies?: number;
513
+ analyticsGoogleCookies?: number;
514
+ analyticsMetaCookies?: number;
515
+ analyticsOtherCookies?: number;
516
+ functionalCookies?: number;
517
+ marketingCookies?: number;
518
+ necessaryCookies?: number;
519
+ }
520
+
521
+ declare class ConsentApi extends BaseService {
522
+ constructor(client: AxiosInstance, baseUrl: string);
523
+ getConsent(params: {
524
+ termsAndConditions?: string;
525
+ dataPrivacy?: string;
526
+ marketingOption?: string;
527
+ email?: string;
528
+ sms?: string;
529
+ notification?: string;
530
+ line?: string;
531
+ analyticsBuzzebeesCookies?: string;
532
+ analyticsFirebaseCookies?: string;
533
+ analyticsGoogleCookies?: string;
534
+ analyticsMetaCookies?: string;
535
+ analyticsOtherCookies?: string;
536
+ functionalCookies?: string;
537
+ marketingCookies?: string;
538
+ necessaryCookies?: string;
539
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<Consent>>;
540
+ unconsent(requestOptions?: RequestOptions): Promise<ServiceResponse<any>>;
541
+ }
542
+
543
+ interface CouponResponse {
544
+ success?: boolean;
545
+ data?: CouponResponseData;
546
+ }
547
+ interface CouponResponseData {
548
+ code?: {};
549
+ errorCount?: number;
550
+ banUnit?: any;
551
+ buzzebees?: Buzzebees;
552
+ today?: number;
553
+ }
554
+
555
+ declare class CouponApi extends BaseService {
556
+ constructor(client: AxiosInstance, baseUrl: string);
557
+ processCodes(params: {
558
+ codes: string;
559
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<CouponResponse>>;
560
+ }
561
+
562
+ interface Dashboard {
563
+ type?: string;
564
+ size?: string;
565
+ imgtype?: string;
566
+ walletVerifySuccessType?: string;
567
+ menu?: string;
568
+ catHeaderTh?: string;
569
+ catHeaderEn?: string;
570
+ headerThai?: string;
571
+ headerEn?: string;
572
+ id?: any;
573
+ imageUrl?: string;
574
+ url?: string;
575
+ cat?: string;
576
+ line1?: string;
577
+ line2?: string;
578
+ line3?: string;
579
+ line4?: string;
580
+ gaLabel?: string;
581
+ startDate?: number;
582
+ endDate?: number;
583
+ subCampaignDetails?: Dashboard[];
584
+ }
585
+
586
+ declare class DashboardApi extends BaseService {
587
+ constructor(client: AxiosInstance, baseUrl: string);
588
+ mainDashboard(appName: string, locale: number, requestOptions?: RequestOptions): Promise<ServiceResponse<Dashboard[]>>;
589
+ subDashboard(params: {
590
+ dashboardName: string;
591
+ locale: number;
592
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<Dashboard[]>>;
593
+ }
594
+
595
+ interface Purchase {
596
+ ID?: number;
597
+ ItemNumber?: number;
598
+ RedeemKey?: string;
599
+ Name?: string;
600
+ AgencyId?: number;
601
+ AgencyName?: string;
602
+ Type?: number;
603
+ RedeemDate?: number;
604
+ IsUsed?: boolean;
605
+ UsedDate?: number;
606
+ VoucherExpireDate?: number;
607
+ CurrentDate?: number;
608
+ ExpireIn?: number;
609
+ Delivered?: boolean;
610
+ IsShipped?: boolean;
611
+ IsWinner?: boolean;
612
+ WinningDate?: number;
613
+ HasWinner?: boolean;
614
+ PrivilegeMessage?: string;
615
+ IsSpecificPrintVoucher?: boolean;
616
+ IsConditionPass?: boolean;
617
+ ModifyDate?: number;
618
+ Serial?: string;
619
+ Condition?: string;
620
+ FullImageUrl?: string;
621
+ Barcode?: string;
622
+ ParcelNo?: string;
623
+ PointPerUnit?: number;
624
+ IsInstalledApp?: boolean;
625
+ InstalledAppDate?: number;
626
+ InstallAppUrl?: string;
627
+ AdsMessage?: string;
628
+ InstallPackageName?: string;
629
+ MinutesValidAfterUsed?: number;
630
+ Discount?: number;
631
+ InstallAppIosSchema?: string;
632
+ VerifyTypeIos?: string;
633
+ VerifyTypeAndroid?: string;
634
+ InstallingMessage?: string;
635
+ VerifyingMessage?: string;
636
+ InterfaceDisplay?: string;
637
+ PointType?: string;
638
+ PricePerUnit?: number;
639
+ FeePerUnit?: number;
640
+ OriginalPrice?: number;
641
+ ShippedStatus?: any;
642
+ IsCampaignTopup?: boolean;
643
+ IsNotAutoUse?: boolean;
644
+ OtherPointPerUnit?: number;
645
+ CategoryId?: number;
646
+ ParentCategoryId?: number;
647
+ PrivilegeMessageFormat?: string;
648
+ HasSplitProfile?: boolean;
649
+ PrivilegeMessageEn?: string;
650
+ InstallIsOpenApp?: boolean;
651
+ ApproveSurvey?: number;
652
+ IsRefunded?: boolean;
653
+ Website?: string;
654
+ Address?: string;
655
+ FirstName?: string;
656
+ LastName?: string;
657
+ Info1?: string;
658
+ Info2?: string;
659
+ Info3?: string;
660
+ Info4?: string;
661
+ Info5?: string;
662
+ Detail?: string;
663
+ ArrangedDate?: number;
664
+ }
665
+
666
+ interface UseCampaignResponse {
667
+ campaignId?: number;
668
+ itemNumber?: number;
669
+ serial?: string;
670
+ privilegeMessage?: string;
671
+ usedDate?: number;
672
+ currentDate?: number;
673
+ privilegeMessageFormat?: string;
674
+ redeemCount?: number;
675
+ useCount?: number;
676
+ expireIn?: number;
677
+ }
678
+
679
+ declare class HistoryApi extends BaseService {
680
+ constructor(client: AxiosInstance, baseUrl: string);
681
+ redeemHistories(params: {
682
+ byConfig: boolean;
683
+ config: string;
684
+ skip: number;
685
+ top: number;
686
+ locale?: number;
687
+ startDate?: string;
688
+ endDate?: string;
689
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<Purchase[]>>;
690
+ use(params: {
691
+ redeemKey: string;
692
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<UseCampaignResponse>>;
693
+ }
694
+
695
+ interface LineAuthResponse {
696
+ access_token: string;
697
+ token_type: string;
698
+ refresh_token: string;
699
+ expires_in: number;
700
+ scope: string;
701
+ id_token: string;
702
+ }
703
+
704
+ declare class LineApi extends BaseService {
705
+ constructor(client: AxiosInstance, baseUrl: string);
706
+ lineAuth(params: {
707
+ grantType: string;
708
+ code: string;
709
+ clientId: string;
710
+ clientSecret: string;
711
+ redirectUrl: string;
712
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<LineAuthResponse>>;
713
+ }
714
+
715
+ declare class NotificationApi extends BaseService {
716
+ constructor(client: AxiosInstance, baseUrl: string);
717
+ notifications(params: {
718
+ mode: string;
719
+ sortBy: string;
720
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<Notification[]>>;
721
+ read(params: {
722
+ ids: string;
723
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<any>>;
724
+ }
725
+
726
+ interface Place {
727
+ name?: string;
728
+ id?: string;
729
+ location?: Location;
730
+ isBuzzeBeesPlace?: boolean;
731
+ rank?: number;
732
+ distance?: number;
733
+ buzz?: number;
734
+ like?: number;
735
+ description?: string;
736
+ services?: PlaceService[];
737
+ contactNumber?: string;
738
+ workingDay?: string;
739
+ nameEn?: string;
740
+ descriptionEn?: string;
741
+ workingDayEn?: string;
742
+ address?: string;
743
+ addressEn?: string;
744
+ imageUrl?: string;
745
+ region?: string;
746
+ regionEn?: string;
747
+ lineChannelID?: any;
748
+ category?: any;
749
+ website?: any;
750
+ referenceCode?: any;
751
+ subdistrictCode?: any;
752
+ districtCode?: any;
753
+ provinceCode?: any;
754
+ expert?: any;
755
+ isBranchOpen?: boolean;
756
+ isPickupBranchOpen?: boolean;
757
+ isFavourite?: boolean;
758
+ fullImageUrl?: string;
759
+ }
760
+ interface PlaceService {
761
+ id?: number;
762
+ name?: string;
763
+ }
764
+
765
+ declare class PlaceApi extends BaseService {
766
+ constructor(client: AxiosInstance, baseUrl: string);
767
+ placeList(params: {
768
+ agencyId: string;
769
+ center: string;
770
+ distance: number;
771
+ top: number;
772
+ provinceCode?: string;
773
+ category?: string;
774
+ mode?: string;
775
+ requiredCampaign?: boolean;
776
+ keyword?: string;
777
+ isFavourite?: boolean;
778
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<Place[]>>;
779
+ place(params: {
780
+ id: string;
781
+ agencyId: string;
782
+ requiredCampaign?: boolean;
783
+ isFavourite?: boolean;
784
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<Place>>;
785
+ addToFavourite(params: {
786
+ id: string;
787
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<any>>;
788
+ removeFromFavourite(params: {
789
+ id: string;
790
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<any>>;
791
+ }
792
+
793
+ interface PointLog {
794
+ RowKey: string;
795
+ UserId: string;
796
+ Info: string;
797
+ Detail: string;
798
+ Points: number;
799
+ Type: string;
800
+ Caller: string;
801
+ Pair: string;
802
+ Timestamp: number;
803
+ Message: string;
804
+ CampaignId: string;
805
+ CampaignName: string;
806
+ CreateDate: number;
807
+ Input: string;
808
+ }
809
+
810
+ declare class PointLogApi extends BaseService {
811
+ constructor(client: AxiosInstance, baseUrl: string);
812
+ getPointLog(month: string, options?: {
813
+ type?: string;
814
+ lastRowKey?: string;
815
+ top?: number;
816
+ }, requestOption?: RequestOptions): Promise<ServiceResponse<PointLog[]>>;
817
+ }
818
+
819
+ interface ConfirmOtpResponse {
820
+ status?: string;
821
+ token?: string;
822
+ }
823
+
824
+ interface ExpiringPoints {
825
+ expiring_points?: UpdatedPoints[];
826
+ }
827
+
828
+ interface Notification$1 {
829
+ ObjectType: string;
830
+ ObjectCategoryId: string;
831
+ ObjectCampaignId: string;
832
+ IsRead: string;
833
+ CreateTime: string;
834
+ ExpireDate: string;
835
+ ImagePath: string;
836
+ Object: string;
837
+ PartitionKey: string;
838
+ RowKey: string;
839
+ Timestamp: string;
840
+ ETag: string;
841
+ }
842
+
843
+ interface ProfileResponse {
844
+ UserLevel: any;
845
+ UserId?: string;
846
+ Name?: string;
847
+ FirstName?: string;
848
+ LastName?: string;
849
+ Title?: string;
850
+ Gender?: string;
851
+ BirthDate?: number;
852
+ Age?: number;
853
+ Address?: string;
854
+ SubDistrictCode?: number;
855
+ SubDistrictName?: string;
856
+ DistrictCode?: number;
857
+ DistrictName?: string;
858
+ ProvinceCode?: number;
859
+ ProvinceName?: string;
860
+ Zipcode?: string;
861
+ Contact_Number?: string;
862
+ Email?: string;
863
+ NotificationEnable?: boolean;
864
+ PostToFacebook?: boolean;
865
+ Locale?: number;
866
+ ModifyDate?: number;
867
+ CreditCardHolder?: any;
868
+ CreditCardNo?: any;
869
+ CreditCardType?: any;
870
+ CreditCardExpireMonth?: any;
871
+ CreditCardExpireYear?: any;
872
+ ExtensionJsonProperty?: any;
873
+ NationalIdCard?: string;
874
+ Passport?: string;
875
+ MembershipId?: number;
876
+ MembershipUserName?: string;
877
+ LoginType?: string;
878
+ VerifiedEmail?: boolean;
879
+ DisplayName?: string;
880
+ PlayboyCampaignId?: string;
881
+ UserType?: string;
882
+ UserTypeName?: string;
883
+ OtherUserId?: string;
884
+ CategoryConfig?: string;
885
+ ShippingFirstName?: string;
886
+ ShippingLastName?: string;
887
+ ShippingContactNumber?: string;
888
+ ShippingAddress?: string;
889
+ ShippingSubDistrictCode?: number;
890
+ ShippingSubDistrictName?: string;
891
+ ShippingDistrictCode?: number;
892
+ ShippingDistrictName?: string;
893
+ ShippingProvinceCode?: number;
894
+ ShippingProvinceName?: string;
895
+ ShippingZipcode?: string;
896
+ PhonePurchase?: number;
897
+ Income?: string;
898
+ Interests?: string;
899
+ Region?: string;
900
+ Refercode?: string;
901
+ MaritalStatus?: string;
902
+ Nationality?: string;
903
+ Religion?: string;
904
+ HighestEducation?: string;
905
+ Occupation?: string;
906
+ DriverLicenseNumber?: string;
907
+ Latitude?: number;
908
+ Longitude?: number;
909
+ JoinDate?: number;
910
+ Village?: string;
911
+ Building?: string;
912
+ Number?: string;
913
+ Moo?: string;
914
+ Room?: string;
915
+ Floor?: string;
916
+ Soi?: string;
917
+ City?: string;
918
+ Road?: string;
919
+ Landmark?: string;
920
+ Location?: string;
921
+ FullAddress?: string;
922
+ CountryCode?: number;
923
+ CountryName?: string;
924
+ HomeContactNumber?: string;
925
+ AlternateContactNumber?: string;
926
+ Remark?: string;
927
+ TermAndCondition?: number;
928
+ DataPrivacy?: number;
929
+ EmailMarketing?: number;
930
+ SMSMarketing?: number;
931
+ NotificationMarketing?: number;
932
+ LineMarketing?: number;
933
+ updated_points?: UpdatedPoints;
934
+ Token?: string;
935
+ }
936
+
937
+ interface RegistrationResponse {
938
+ status?: string;
939
+ username?: string;
940
+ userId?: string;
941
+ membershipId?: number;
942
+ appId?: string;
943
+ firstname?: string;
944
+ lastname?: string;
945
+ address?: string;
946
+ email?: string;
947
+ clientVersion?: string;
948
+ carrier?: string;
949
+ macAddress?: string;
950
+ platform?: string;
951
+ os?: string;
952
+ gender?: string;
953
+ birthdate?: number;
954
+ buzzebees?: Buzzebees;
955
+ }
956
+
957
+ interface StatusResponse {
958
+ status?: string;
959
+ }
960
+
961
+ declare class ProfileApi extends BaseService {
962
+ constructor(client: AxiosInstance, baseUrl: string);
963
+ updateProfile(params: {
964
+ profileImage?: File;
965
+ firstName?: string;
966
+ lastName?: string;
967
+ contactNumber?: string;
968
+ email?: string;
969
+ notification?: boolean;
970
+ locale?: number;
971
+ title?: string;
972
+ gender?: string;
973
+ birthDate?: number;
974
+ address?: string;
975
+ subdistrictCode?: number;
976
+ subdistrictName?: string;
977
+ districtCode?: number;
978
+ districtName?: string;
979
+ provinceCode?: number;
980
+ provinceName?: string;
981
+ countryCode?: string;
982
+ countryName?: string;
983
+ zipCode?: string;
984
+ idCard?: string;
985
+ passport?: string;
986
+ maritalStatus?: string;
987
+ village?: string;
988
+ building?: string;
989
+ number?: string;
990
+ moo?: string;
991
+ room?: string;
992
+ floor?: string;
993
+ soi?: string;
994
+ city?: string;
995
+ road?: string;
996
+ landmark?: string;
997
+ alternateContactNumber?: string;
998
+ homeContactNumber?: string;
999
+ nationality?: string;
1000
+ religion?: string;
1001
+ location?: string;
1002
+ latitude?: number;
1003
+ longitude?: number;
1004
+ income?: string;
1005
+ interests?: string;
1006
+ region?: string;
1007
+ phonepurchase?: number;
1008
+ highestEducation?: string;
1009
+ occupation?: string;
1010
+ remark?: string;
1011
+ displayName?: string;
1012
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<ProfileResponse>>;
1013
+ changePassword(current: string, change: string, requestOptions?: RequestOptions): Promise<ServiceResponse<StatusResponse>>;
1014
+ updateShipping(params: {
1015
+ shippingFirstName?: string;
1016
+ shippingLastName?: string;
1017
+ shippingProvinceCode?: string;
1018
+ shippingDistrictCode?: string;
1019
+ shippingSubDistrictCode?: string;
1020
+ shippingZipCode?: string;
1021
+ shippingAddress?: string;
1022
+ shippingProvinceName?: string;
1023
+ shippingDistrictName?: string;
1024
+ shippingSubFDistrictName?: string;
1025
+ shippingContactNumber?: string;
1026
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<any>>;
1027
+ changeContactNumber(contactNumber: string, otp: string, refCode: string, idCard?: string, requestOptions?: RequestOptions): Promise<ServiceResponse<unknown>>;
1028
+ changeContactNumberV2(contactNumber: string, otp: string, refCode: string, requestOptions?: RequestOptions): Promise<ServiceResponse<any>>;
1029
+ points(requestOptions?: RequestOptions): Promise<ServiceResponse<UpdatedPoints>>;
1030
+ expiringPoints(requestOptions?: RequestOptions): Promise<ServiceResponse<ExpiringPoints>>;
1031
+ deactivate(requestOptions?: RequestOptions): Promise<ServiceResponse<any>>;
1032
+ }
1033
+
1034
+ declare class RegistrationApi extends BaseService {
1035
+ constructor(client: AxiosInstance, baseUrl: string);
1036
+ register(params: {
1037
+ appId: string;
1038
+ uuid: string;
1039
+ macAddress: string;
1040
+ os: string;
1041
+ platform: string;
1042
+ clientVersion: string;
1043
+ deviceNotificationEnable: boolean;
1044
+ username: string;
1045
+ password: string;
1046
+ confirmPassword: string;
1047
+ firstName: string;
1048
+ lastName: string;
1049
+ contactNumber: string;
1050
+ otp: string;
1051
+ refCode: string;
1052
+ address?: string;
1053
+ gender?: string;
1054
+ birthdate?: number;
1055
+ email?: string;
1056
+ refUserCode?: string;
1057
+ info?: string;
1058
+ termAndConditionVersion?: string;
1059
+ dataPrivacyVersion?: string;
1060
+ marketingOptionsVersion?: string;
1061
+ emailMarketing?: string;
1062
+ smsMarketing?: string;
1063
+ notificationMarketing?: string;
1064
+ lineMarketing?: string;
1065
+ phoneMarketing?: string;
1066
+ }, requestOptions?: RequestOptions): Promise<ServiceResponse<RegistrationResponse>>;
1067
+ }
1068
+
1069
+ declare class BzbsService {
1070
+ client: AxiosInstance | undefined;
1071
+ baseUrl: string | undefined;
1072
+ baseLineUrl: string | undefined;
1073
+ authApi?: AuthenticateApi;
1074
+ badgeApi?: BadgeApi;
1075
+ campaignApi?: CampaignApi;
1076
+ cartApi?: CartApi;
1077
+ categoryApi?: CategoryApi;
1078
+ consentApi?: ConsentApi;
1079
+ couponApi?: CouponApi;
1080
+ dashboardApi?: DashboardApi;
1081
+ historyApi?: HistoryApi;
1082
+ lineApi?: LineApi;
1083
+ notificationApi?: NotificationApi;
1084
+ placeApi?: PlaceApi;
1085
+ pointLogApi?: PointLogApi;
1086
+ profileApi?: ProfileApi;
1087
+ registerApi?: RegistrationApi;
1088
+ constructor(client: AxiosInstance | undefined, baseUrl: string | undefined, baseLineUrl: string | undefined);
1089
+ init(client: AxiosInstance | undefined, baseUrl: string | undefined, baseLineUrl: string | undefined): void;
1090
+ }
1091
+
1092
+ export { type Badge, BaseService, type Buzzebees, type BzbsErrorResponse, BzbsService, type Campaign, type CampaignDetail, type CartCountResponse, type Category, type ConfirmOtpResponse, type Consent, type CouponResponse, type CouponResponseData, type Dashboard, type Detail, type ExpiringPoints, type FavoriteResponse, type LineAuthResponse, type LoginResponse, type Mission, type Notification$1 as Notification, type Picture, type Place, type PlaceService, type PointLog, type ProfileResponse, type Purchase, type RedeemResponse, type RegistrationResponse, type RequestOptions, type ServiceResponse, type StatusResponse, type Style, type SubCampaign, type SubCampaignStyle, type Trace, type UpdatedPoints, type UseCampaignResponse };