favesalon-embed 1.0.14 → 1.0.16

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.
Files changed (51) hide show
  1. package/dist/custom-elements/index.d.ts +36 -0
  2. package/dist/favesalon-embed/{_commonjsHelpers-a4f66ccd.js → _commonjsHelpers-9bc404fc.js} +1 -1
  3. package/dist/favesalon-embed/activate-form.entry.js +10 -3
  4. package/dist/favesalon-embed/buy-giftcard-form.entry.js +998 -0
  5. package/dist/favesalon-embed/buy-giftcard-verification.entry.js +153 -0
  6. package/dist/favesalon-embed/change-password-form.entry.js +10 -3
  7. package/dist/favesalon-embed/chat-box.entry.js +2 -2
  8. package/dist/favesalon-embed/chat-button.entry.js +2 -2
  9. package/dist/favesalon-embed/chat-form.entry.js +2 -2
  10. package/dist/favesalon-embed/chat-messages.entry.js +4 -4
  11. package/dist/favesalon-embed/chat-rooms.entry.js +3 -3
  12. package/dist/favesalon-embed/credit-card-types.entry.js +16 -0
  13. package/dist/favesalon-embed/favesalon-embed.esm.js +1 -1
  14. package/dist/favesalon-embed/{index-00b83e1c.js → index-ac52896a.js} +1 -1
  15. package/dist/favesalon-embed/{lodash-d5526b38.js → lodash-b4fe554a.js} +1 -1
  16. package/dist/favesalon-embed/login-form.entry.js +2 -2
  17. package/dist/favesalon-embed/powered-by-favesalon.entry.js +16 -0
  18. package/dist/favesalon-embed/register-form.entry.js +10 -4
  19. package/dist/favesalon-embed/{relativeTime-268e64b0.js → relativeTime-15477f02.js} +1 -1
  20. package/dist/favesalon-embed/reset-password-form.entry.js +10 -3
  21. package/dist/favesalon-embed/salon-booking.entry.js +2 -2
  22. package/dist/favesalon-embed/salon-gift-card.entry.js +2 -2
  23. package/dist/favesalon-embed/salon-info.entry.js +2 -2
  24. package/dist/favesalon-embed/salon-latest-reviews.entry.js +2 -2
  25. package/dist/favesalon-embed/salon-latest-styles.entry.js +2 -2
  26. package/dist/favesalon-embed/salon-locations.entry.js +2 -2
  27. package/dist/favesalon-embed/salon-lookbook.entry.js +2 -2
  28. package/dist/favesalon-embed/salon-reviews.entry.js +2 -2
  29. package/dist/favesalon-embed/salon-schedules.entry.js +2 -2
  30. package/dist/favesalon-embed/salon-services.entry.js +2 -2
  31. package/dist/favesalon-embed/salon-stylists.entry.js +2 -2
  32. package/dist/favesalon-embed/services-3dd9f820.js +24104 -0
  33. package/dist/favesalon-embed/services-45c0e274.js +24122 -0
  34. package/dist/favesalon-embed/{services-ece4767f.js → services-65861516.js} +333 -167
  35. package/dist/favesalon-embed/services-935ba09f.js +24118 -0
  36. package/dist/favesalon-embed/services-9a686ade.js +24122 -0
  37. package/dist/favesalon-embed/services-baa3f112.js +24123 -0
  38. package/dist/favesalon-embed/style-detail.entry.js +3 -3
  39. package/dist/favesalon-embed/wizard-existing-user.entry.js +146 -0
  40. package/dist/favesalon-embed/wizard-new-user.entry.js +178 -0
  41. package/dist/types/components/buy-giftcard-form/buy-giftcard-form.d.ts +56 -0
  42. package/dist/types/components/buy-giftcard-verification/buy-giftcard-verification.d.ts +21 -0
  43. package/dist/types/components/credit-card-types/credit-card-types.d.ts +4 -0
  44. package/dist/types/components/powered-by-favesalon/powered-by-favesalon.d.ts +4 -0
  45. package/dist/types/components/wizard-existing-user/wizard-existing-user.d.ts +19 -0
  46. package/dist/types/components/wizard-new-user/wizard-new-user.d.ts +23 -0
  47. package/dist/types/components.d.ts +108 -0
  48. package/dist/types/services/services.d.ts +55 -0
  49. package/dist/types/types/giftcard.d.ts +13 -0
  50. package/dist/types/types/salon.d.ts +1 -0
  51. package/package.json +3 -1
@@ -15,6 +15,13 @@ export namespace Components {
15
15
  "resendCode": (evt: any) => Promise<void>;
16
16
  "username": string;
17
17
  }
18
+ interface BuyGiftcardForm {
19
+ "salonId": string;
20
+ }
21
+ interface BuyGiftcardVerification {
22
+ "onSuccess": (user: User) => void;
23
+ "salonId": string;
24
+ }
18
25
  interface ChangePasswordForm {
19
26
  "onSubmit": (evt: any) => Promise<void>;
20
27
  "onSuccess": (user: User) => void;
@@ -58,6 +65,9 @@ export namespace Components {
58
65
  "salonId": number;
59
66
  "senderId": number;
60
67
  }
68
+ interface CreditCardTypes {
69
+ "css": any;
70
+ }
61
71
  interface GoogleMap {
62
72
  "locationAddress"?: string;
63
73
  "locationName"?: string;
@@ -68,6 +78,9 @@ export namespace Components {
68
78
  }
69
79
  interface NotifySounds {
70
80
  }
81
+ interface PoweredByFavesalon {
82
+ "css": any;
83
+ }
71
84
  interface RegisterForm {
72
85
  "onSubmit": (evt: any) => Promise<void>;
73
86
  "onSuccess": (user: User) => void;
@@ -168,6 +181,20 @@ export namespace Components {
168
181
  interface UserForm {
169
182
  "onSuccess": (user: User) => void;
170
183
  }
184
+ interface WizardExistingUser {
185
+ "inputtedPhone": string;
186
+ "onClose": () => void;
187
+ "onSuccess": (user: User) => void;
188
+ "salonId": string;
189
+ }
190
+ interface WizardNewUser {
191
+ "firstName": string;
192
+ "inputtedPhone": string;
193
+ "lastName": string;
194
+ "onClose": () => void;
195
+ "onSuccess": (user: User) => void;
196
+ "salonId": string;
197
+ }
171
198
  }
172
199
  declare global {
173
200
  interface HTMLActivateFormElement extends Components.ActivateForm, HTMLStencilElement {
@@ -176,6 +203,18 @@ declare global {
176
203
  prototype: HTMLActivateFormElement;
177
204
  new (): HTMLActivateFormElement;
178
205
  };
206
+ interface HTMLBuyGiftcardFormElement extends Components.BuyGiftcardForm, HTMLStencilElement {
207
+ }
208
+ var HTMLBuyGiftcardFormElement: {
209
+ prototype: HTMLBuyGiftcardFormElement;
210
+ new (): HTMLBuyGiftcardFormElement;
211
+ };
212
+ interface HTMLBuyGiftcardVerificationElement extends Components.BuyGiftcardVerification, HTMLStencilElement {
213
+ }
214
+ var HTMLBuyGiftcardVerificationElement: {
215
+ prototype: HTMLBuyGiftcardVerificationElement;
216
+ new (): HTMLBuyGiftcardVerificationElement;
217
+ };
179
218
  interface HTMLChangePasswordFormElement extends Components.ChangePasswordForm, HTMLStencilElement {
180
219
  }
181
220
  var HTMLChangePasswordFormElement: {
@@ -212,6 +251,12 @@ declare global {
212
251
  prototype: HTMLChatRoomsElement;
213
252
  new (): HTMLChatRoomsElement;
214
253
  };
254
+ interface HTMLCreditCardTypesElement extends Components.CreditCardTypes, HTMLStencilElement {
255
+ }
256
+ var HTMLCreditCardTypesElement: {
257
+ prototype: HTMLCreditCardTypesElement;
258
+ new (): HTMLCreditCardTypesElement;
259
+ };
215
260
  interface HTMLGoogleMapElement extends Components.GoogleMap, HTMLStencilElement {
216
261
  }
217
262
  var HTMLGoogleMapElement: {
@@ -230,6 +275,12 @@ declare global {
230
275
  prototype: HTMLNotifySoundsElement;
231
276
  new (): HTMLNotifySoundsElement;
232
277
  };
278
+ interface HTMLPoweredByFavesalonElement extends Components.PoweredByFavesalon, HTMLStencilElement {
279
+ }
280
+ var HTMLPoweredByFavesalonElement: {
281
+ prototype: HTMLPoweredByFavesalonElement;
282
+ new (): HTMLPoweredByFavesalonElement;
283
+ };
233
284
  interface HTMLRegisterFormElement extends Components.RegisterForm, HTMLStencilElement {
234
285
  }
235
286
  var HTMLRegisterFormElement: {
@@ -344,17 +395,33 @@ declare global {
344
395
  prototype: HTMLUserFormElement;
345
396
  new (): HTMLUserFormElement;
346
397
  };
398
+ interface HTMLWizardExistingUserElement extends Components.WizardExistingUser, HTMLStencilElement {
399
+ }
400
+ var HTMLWizardExistingUserElement: {
401
+ prototype: HTMLWizardExistingUserElement;
402
+ new (): HTMLWizardExistingUserElement;
403
+ };
404
+ interface HTMLWizardNewUserElement extends Components.WizardNewUser, HTMLStencilElement {
405
+ }
406
+ var HTMLWizardNewUserElement: {
407
+ prototype: HTMLWizardNewUserElement;
408
+ new (): HTMLWizardNewUserElement;
409
+ };
347
410
  interface HTMLElementTagNameMap {
348
411
  "activate-form": HTMLActivateFormElement;
412
+ "buy-giftcard-form": HTMLBuyGiftcardFormElement;
413
+ "buy-giftcard-verification": HTMLBuyGiftcardVerificationElement;
349
414
  "change-password-form": HTMLChangePasswordFormElement;
350
415
  "chat-box": HTMLChatBoxElement;
351
416
  "chat-button": HTMLChatButtonElement;
352
417
  "chat-form": HTMLChatFormElement;
353
418
  "chat-messages": HTMLChatMessagesElement;
354
419
  "chat-rooms": HTMLChatRoomsElement;
420
+ "credit-card-types": HTMLCreditCardTypesElement;
355
421
  "google-map": HTMLGoogleMapElement;
356
422
  "login-form": HTMLLoginFormElement;
357
423
  "notify-sounds": HTMLNotifySoundsElement;
424
+ "powered-by-favesalon": HTMLPoweredByFavesalonElement;
358
425
  "register-form": HTMLRegisterFormElement;
359
426
  "reset-password-form": HTMLResetPasswordFormElement;
360
427
  "salon-booking": HTMLSalonBookingElement;
@@ -374,6 +441,8 @@ declare global {
374
441
  "style-detail": HTMLStyleDetailElement;
375
442
  "user-avatar": HTMLUserAvatarElement;
376
443
  "user-form": HTMLUserFormElement;
444
+ "wizard-existing-user": HTMLWizardExistingUserElement;
445
+ "wizard-new-user": HTMLWizardNewUserElement;
377
446
  }
378
447
  }
379
448
  declare namespace LocalJSX {
@@ -382,6 +451,13 @@ declare namespace LocalJSX {
382
451
  "password"?: string;
383
452
  "username"?: string;
384
453
  }
454
+ interface BuyGiftcardForm {
455
+ "salonId"?: string;
456
+ }
457
+ interface BuyGiftcardVerification {
458
+ "onSuccess"?: (user: User) => void;
459
+ "salonId"?: string;
460
+ }
385
461
  interface ChangePasswordForm {
386
462
  "onSuccess"?: (user: User) => void;
387
463
  "username"?: string;
@@ -418,6 +494,9 @@ declare namespace LocalJSX {
418
494
  "salonId"?: number;
419
495
  "senderId"?: number;
420
496
  }
497
+ interface CreditCardTypes {
498
+ "css"?: any;
499
+ }
421
500
  interface GoogleMap {
422
501
  "locationAddress"?: string;
423
502
  "locationName"?: string;
@@ -427,6 +506,9 @@ declare namespace LocalJSX {
427
506
  }
428
507
  interface NotifySounds {
429
508
  }
509
+ interface PoweredByFavesalon {
510
+ "css"?: any;
511
+ }
430
512
  interface RegisterForm {
431
513
  "onSuccess"?: (user: User) => void;
432
514
  }
@@ -512,17 +594,35 @@ declare namespace LocalJSX {
512
594
  interface UserForm {
513
595
  "onSuccess"?: (user: User) => void;
514
596
  }
597
+ interface WizardExistingUser {
598
+ "inputtedPhone"?: string;
599
+ "onClose"?: () => void;
600
+ "onSuccess"?: (user: User) => void;
601
+ "salonId"?: string;
602
+ }
603
+ interface WizardNewUser {
604
+ "firstName"?: string;
605
+ "inputtedPhone"?: string;
606
+ "lastName"?: string;
607
+ "onClose"?: () => void;
608
+ "onSuccess"?: (user: User) => void;
609
+ "salonId"?: string;
610
+ }
515
611
  interface IntrinsicElements {
516
612
  "activate-form": ActivateForm;
613
+ "buy-giftcard-form": BuyGiftcardForm;
614
+ "buy-giftcard-verification": BuyGiftcardVerification;
517
615
  "change-password-form": ChangePasswordForm;
518
616
  "chat-box": ChatBox;
519
617
  "chat-button": ChatButton;
520
618
  "chat-form": ChatForm;
521
619
  "chat-messages": ChatMessages;
522
620
  "chat-rooms": ChatRooms;
621
+ "credit-card-types": CreditCardTypes;
523
622
  "google-map": GoogleMap;
524
623
  "login-form": LoginForm;
525
624
  "notify-sounds": NotifySounds;
625
+ "powered-by-favesalon": PoweredByFavesalon;
526
626
  "register-form": RegisterForm;
527
627
  "reset-password-form": ResetPasswordForm;
528
628
  "salon-booking": SalonBooking;
@@ -542,6 +642,8 @@ declare namespace LocalJSX {
542
642
  "style-detail": StyleDetail;
543
643
  "user-avatar": UserAvatar;
544
644
  "user-form": UserForm;
645
+ "wizard-existing-user": WizardExistingUser;
646
+ "wizard-new-user": WizardNewUser;
545
647
  }
546
648
  }
547
649
  export { LocalJSX as JSX };
@@ -549,15 +651,19 @@ declare module "@stencil/core" {
549
651
  export namespace JSX {
550
652
  interface IntrinsicElements {
551
653
  "activate-form": LocalJSX.ActivateForm & JSXBase.HTMLAttributes<HTMLActivateFormElement>;
654
+ "buy-giftcard-form": LocalJSX.BuyGiftcardForm & JSXBase.HTMLAttributes<HTMLBuyGiftcardFormElement>;
655
+ "buy-giftcard-verification": LocalJSX.BuyGiftcardVerification & JSXBase.HTMLAttributes<HTMLBuyGiftcardVerificationElement>;
552
656
  "change-password-form": LocalJSX.ChangePasswordForm & JSXBase.HTMLAttributes<HTMLChangePasswordFormElement>;
553
657
  "chat-box": LocalJSX.ChatBox & JSXBase.HTMLAttributes<HTMLChatBoxElement>;
554
658
  "chat-button": LocalJSX.ChatButton & JSXBase.HTMLAttributes<HTMLChatButtonElement>;
555
659
  "chat-form": LocalJSX.ChatForm & JSXBase.HTMLAttributes<HTMLChatFormElement>;
556
660
  "chat-messages": LocalJSX.ChatMessages & JSXBase.HTMLAttributes<HTMLChatMessagesElement>;
557
661
  "chat-rooms": LocalJSX.ChatRooms & JSXBase.HTMLAttributes<HTMLChatRoomsElement>;
662
+ "credit-card-types": LocalJSX.CreditCardTypes & JSXBase.HTMLAttributes<HTMLCreditCardTypesElement>;
558
663
  "google-map": LocalJSX.GoogleMap & JSXBase.HTMLAttributes<HTMLGoogleMapElement>;
559
664
  "login-form": LocalJSX.LoginForm & JSXBase.HTMLAttributes<HTMLLoginFormElement>;
560
665
  "notify-sounds": LocalJSX.NotifySounds & JSXBase.HTMLAttributes<HTMLNotifySoundsElement>;
666
+ "powered-by-favesalon": LocalJSX.PoweredByFavesalon & JSXBase.HTMLAttributes<HTMLPoweredByFavesalonElement>;
561
667
  "register-form": LocalJSX.RegisterForm & JSXBase.HTMLAttributes<HTMLRegisterFormElement>;
562
668
  "reset-password-form": LocalJSX.ResetPasswordForm & JSXBase.HTMLAttributes<HTMLResetPasswordFormElement>;
563
669
  "salon-booking": LocalJSX.SalonBooking & JSXBase.HTMLAttributes<HTMLSalonBookingElement>;
@@ -577,6 +683,8 @@ declare module "@stencil/core" {
577
683
  "style-detail": LocalJSX.StyleDetail & JSXBase.HTMLAttributes<HTMLStyleDetailElement>;
578
684
  "user-avatar": LocalJSX.UserAvatar & JSXBase.HTMLAttributes<HTMLUserAvatarElement>;
579
685
  "user-form": LocalJSX.UserForm & JSXBase.HTMLAttributes<HTMLUserFormElement>;
686
+ "wizard-existing-user": LocalJSX.WizardExistingUser & JSXBase.HTMLAttributes<HTMLWizardExistingUserElement>;
687
+ "wizard-new-user": LocalJSX.WizardNewUser & JSXBase.HTMLAttributes<HTMLWizardNewUserElement>;
580
688
  }
581
689
  }
582
690
  }
@@ -88,6 +88,61 @@ declare class HttpService {
88
88
  senderId: any;
89
89
  timestamp: number;
90
90
  }>;
91
+ loginByPhoneCode(options: any): Promise<{
92
+ id: any;
93
+ firstName: any;
94
+ lastName: any;
95
+ fullName: any;
96
+ avatar: any;
97
+ mobilePhone: any;
98
+ accessToken: any;
99
+ email: any;
100
+ password: any;
101
+ }>;
102
+ createAccount(options: any): Promise<{
103
+ id: any;
104
+ firstName: any;
105
+ lastName: any;
106
+ fullName: any;
107
+ avatar: any;
108
+ mobilePhone: any;
109
+ accessToken: any;
110
+ email: any;
111
+ password: any;
112
+ }>;
113
+ activateUserAccount({ email, code }: {
114
+ email: any;
115
+ code: any;
116
+ }): Promise<{
117
+ id: any;
118
+ firstName: any;
119
+ lastName: any;
120
+ fullName: any;
121
+ avatar: any;
122
+ mobilePhone: any;
123
+ accessToken: any;
124
+ email: any;
125
+ password: any;
126
+ }>;
127
+ sendLoginCode(phone: string, salonId?: string): Promise<import("axios").AxiosResponse<never>>;
128
+ onBuyGiftCard(salonId: number, options: any): Promise<import("axios").AxiosResponse<any>>;
129
+ fetchGiftCardSettings(salonId: any): Promise<any>;
130
+ fetchSalonClientInfo(salonId: any, mobilePhone: any): Promise<{} | {}>;
131
+ fetchMagensaCredentials(salonId: any): Promise<{
132
+ processorName: string;
133
+ customerCode: string;
134
+ username: string;
135
+ password: string;
136
+ token: string;
137
+ } | {
138
+ processorName?: undefined;
139
+ customerCode?: undefined;
140
+ username?: undefined;
141
+ password?: undefined;
142
+ token?: undefined;
143
+ }>;
144
+ magensaProcessToken(options: any): Promise<any>;
145
+ magensaConfirmTransaction(options: any): Promise<any>;
91
146
  }
92
147
  declare const _default: () => HttpService;
93
148
  export default _default;
@@ -0,0 +1,13 @@
1
+ export declare class GiftCardStyle {
2
+ id: number;
3
+ imageUrl: string;
4
+ }
5
+ export declare class GiftCardSettings {
6
+ isMagensaPayment: boolean;
7
+ acceptCustomAmount: boolean;
8
+ acceptPaymentOnline: boolean;
9
+ giftCardTerms: string;
10
+ recommendAmounts: number[];
11
+ giftCardStyles: GiftCardStyle[];
12
+ }
13
+ export declare function createGiftCardSettings(blob: any): GiftCardSettings;
@@ -33,3 +33,4 @@ export interface Salon {
33
33
  }
34
34
  export declare function createSalon(blob: any): Salon;
35
35
  export declare function getSalonImage({ salonImages, fullProfileImage }: Salon): string;
36
+ export declare function getSalonAddress(salon: any): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "favesalon-embed",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "Favesalon Embed",
5
5
  "author": "Trung Luu <trung@favesalon.com> (https://favesalon.com)",
6
6
  "main": "dist/index.cjs.js",
@@ -23,6 +23,8 @@
23
23
  "generate": "stencil generate"
24
24
  },
25
25
  "dependencies": {
26
+ "@magensa/te-connect": "^1.2.3",
27
+ "@magensa/te-connect-js": "^1.2.2",
26
28
  "@stencil/core": "^2.22.3",
27
29
  "axios": "^0.22.0",
28
30
  "color": "^4.0.1",