@memberstack/dom 1.9.8 → 1.9.9

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.
@@ -1,6 +1,7 @@
1
1
  export declare type OpenModalParams = {
2
2
  type: "LOGIN" | "SIGNUP" | "FORGOT_PASSWORD" | "RESET_PASSWORD" | "PROFILE";
3
3
  };
4
+ export declare const initDefaultMessageBox: () => void;
4
5
  export declare const showMessage: (msg: any, isError: any) => void;
5
6
  export declare const showLoader: (element?: any) => void;
6
7
  export declare const hideLoader: (element?: any) => void;
@@ -39,25 +39,49 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  return (mod && mod.__esModule) ? mod : { "default": mod };
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.hideModal = exports.openModal = exports.handleRedirect = exports.hideLoader = exports.showLoader = exports.showMessage = void 0;
42
+ exports.hideModal = exports.openModal = exports.handleRedirect = exports.hideLoader = exports.showLoader = exports.showMessage = exports.initDefaultMessageBox = void 0;
43
+ var defaultMessageBox_js_1 = require("../../utils/defaultMessageBox.js");
43
44
  var main_dom_js_1 = __importDefault(require("./main-dom.js"));
45
+ exports.initDefaultMessageBox = function () {
46
+ if (document.readyState !== "loading") {
47
+ initMessageBoxes();
48
+ }
49
+ else {
50
+ document.addEventListener("DOMContentLoaded", function (event) {
51
+ initMessageBoxes();
52
+ });
53
+ }
54
+ function initMessageBoxes() {
55
+ defaultMessageBox_js_1.initCSS();
56
+ defaultMessageBox_js_1.addSuccessBox();
57
+ defaultMessageBox_js_1.addErrorBox();
58
+ }
59
+ };
44
60
  exports.showMessage = function (msg, isError) {
45
- var cssEl = document.createElement("style");
46
- var css = ".ms-error-message { position: fixed; left: 5%; right: 5%; bottom: 3%; z-index: 10000000; display: block; margin-right: auto; margin-left: auto; padding-top: 1em; padding-right: 10px; padding-bottom: 1em; border-radius: 3px; background-color: #fd3a57; box-shadow: 0 0 0 2px #fff; color: #fff; font-size: 1.1em; line-height: 1.8em; font-weight: 700; text-align: center; }";
47
- cssEl.setAttribute("data-ms-style", "");
48
- cssEl.appendChild(document.createTextNode(css));
49
- document.head.appendChild(cssEl);
50
- var color = isError ? "#FD3A57" : "#40c88b";
51
- var messageHTML = "<div data-ms-message style=\"background: " + color + "\" class=\"ms-error-message\"><div id=\"ms-message\">" + msg + "</div></div>";
52
- var div = document.createElement("div");
53
- div.setAttribute("data-ms-message", "");
54
- div.innerHTML = messageHTML;
55
- document.body.appendChild(div);
61
+ if (!document.querySelector("[data-ms-message='success']")) {
62
+ exports.initDefaultMessageBox();
63
+ }
64
+ var messageBox;
65
+ if (isError) {
66
+ messageBox = document.querySelector("[data-ms-message='error']");
67
+ }
68
+ else {
69
+ messageBox = document.querySelector("[data-ms-message='success']");
70
+ }
71
+ //set text
72
+ var messageTextBox = messageBox.querySelector("[data-ms-message-text]");
73
+ if (messageTextBox) {
74
+ messageTextBox.innerHTML = msg;
75
+ }
76
+ messageBox.style.display = "block";
77
+ //add event listener to close button
78
+ var closeBtn = messageBox.querySelector("[data-ms-message-close]");
79
+ closeBtn === null || closeBtn === void 0 ? void 0 : closeBtn.addEventListener("click", function () {
80
+ messageBox.style.display = "none";
81
+ });
56
82
  setTimeout(function () {
57
- var _a, _b;
58
- (_a = document.querySelector("[data-ms-style]")) === null || _a === void 0 ? void 0 : _a.remove();
59
- (_b = document.querySelector("[data-ms-message]")) === null || _b === void 0 ? void 0 : _b.remove();
60
- }, 4000);
83
+ messageBox.style.display = "none";
84
+ }, 7000);
61
85
  };
62
86
  exports.showLoader = function (element) {
63
87
  if (element) {
@@ -91,9 +115,9 @@ exports.hideLoader = function (element) {
91
115
  };
92
116
  exports.handleRedirect = function (redirect, redirectOverride) {
93
117
  if (redirectOverride)
94
- return window.location.href = redirectOverride;
95
- if (redirect && (window.location.pathname !== redirect))
96
- return window.location.href = redirect;
118
+ return (window.location.href = redirectOverride);
119
+ if (redirect && window.location.pathname !== redirect)
120
+ return (window.location.href = redirect);
97
121
  };
98
122
  var modal;
99
123
  exports.openModal = function (type, params) {
@@ -110,13 +134,15 @@ exports.openModal = function (type, params) {
110
134
  display: type.toLowerCase(),
111
135
  params: params,
112
136
  onSuccess: resolveModal,
113
- }
137
+ },
114
138
  });
115
139
  return [2 /*return*/, modalPromise];
116
140
  });
117
141
  });
118
142
  };
119
143
  exports.hideModal = function () {
144
+ var _a;
120
145
  modal === null || modal === void 0 ? void 0 : modal.$destroy();
121
146
  exports.hideLoader();
147
+ (_a = document.querySelector("#msOverlay")) === null || _a === void 0 ? void 0 : _a.remove();
122
148
  };
@@ -16,8 +16,22 @@ declare const _default: {
16
16
  };
17
17
  } & {
18
18
  signupWithProvider(params?: import("../types").SignupWithProviderParams): Promise<unknown>;
19
- loginWithProvider(params?: import("../types").SignupWithProviderParams): Promise<unknown>;
20
- getAppAndMember(): Promise<{
19
+ loginWithProvider(params?: import("../types").LoginWithProviderParams): Promise<unknown>;
20
+ connectProvider(params?: import("../types").LoginWithProviderParams): Promise<{
21
+ data: {
22
+ providers: {
23
+ provider: string;
24
+ }[];
25
+ };
26
+ }>;
27
+ disconnectProvider(params: import("../types").LoginWithProviderParams): Promise<{
28
+ data: {
29
+ providers: {
30
+ provider: string;
31
+ }[];
32
+ };
33
+ }>;
34
+ getAppAndMember(params?: any): Promise<{
21
35
  data: {
22
36
  app: {
23
37
  id: string;
@@ -89,6 +103,10 @@ declare const _default: {
89
103
  verified: boolean;
90
104
  auth: {
91
105
  email: string;
106
+ hasPassword: boolean;
107
+ providers: {
108
+ provider: string;
109
+ }[];
92
110
  };
93
111
  loginRedirect: string;
94
112
  stripeCustomerId: string;
@@ -184,73 +202,6 @@ declare const _default: {
184
202
  }[];
185
203
  };
186
204
  }>;
187
- getAuthProviders(): Promise<{
188
- data: {
189
- id: string;
190
- name: string;
191
- mode: "live" | "sandbox";
192
- plans: {
193
- id: string;
194
- name: string;
195
- description: string;
196
- status: string;
197
- redirects: {
198
- afterLogin: string;
199
- afterLogout: string;
200
- afterSignup: string;
201
- };
202
- prices?: [] | {
203
- id: string;
204
- amount: string;
205
- interval: {
206
- type: string;
207
- count: number;
208
- };
209
- name: string;
210
- type: string;
211
- status: string;
212
- currency: string;
213
- }[];
214
- }[];
215
- contentGroups: {
216
- id: string;
217
- name: string;
218
- key: string;
219
- allowAllMembers: boolean;
220
- activeMemberHasAccess?: boolean;
221
- redirect: string;
222
- urls: {
223
- url: string;
224
- filter: string;
225
- }[];
226
- plans: {
227
- id: string;
228
- }[];
229
- }[];
230
- emailVerificationEnabled: boolean;
231
- requireEmailVerification: boolean;
232
- customField: {
233
- order: number;
234
- key: string;
235
- label: string;
236
- hidden: boolean;
237
- }[];
238
- branding: {
239
- logo: string;
240
- colors: {
241
- lightMode: {
242
- primaryButton: string;
243
- };
244
- };
245
- };
246
- authProviders: {
247
- clientId: string;
248
- provider: string;
249
- providerType: string;
250
- icon: string;
251
- }[];
252
- };
253
- }>;
254
205
  loginMemberEmailPassword(params: import("../types").LoginMemberEmailPasswordParams, options?: any): Promise<{
255
206
  data: {
256
207
  tokens: {
@@ -263,6 +214,10 @@ declare const _default: {
263
214
  verified: boolean;
264
215
  auth: {
265
216
  email: string;
217
+ hasPassword: boolean;
218
+ providers: {
219
+ provider: string;
220
+ }[];
266
221
  };
267
222
  loginRedirect: string;
268
223
  stripeCustomerId: string;
@@ -290,10 +245,6 @@ declare const _default: {
290
245
  }[];
291
246
  };
292
247
  redirect: string;
293
- payment: {
294
- requirePayment: string[];
295
- requireAuthentication: string[];
296
- };
297
248
  contentGroups?: {
298
249
  id: string;
299
250
  name: string;
@@ -323,6 +274,10 @@ declare const _default: {
323
274
  verified: boolean;
324
275
  auth: {
325
276
  email: string;
277
+ hasPassword: boolean;
278
+ providers: {
279
+ provider: string;
280
+ }[];
326
281
  };
327
282
  loginRedirect: string;
328
283
  stripeCustomerId: string;
@@ -350,10 +305,6 @@ declare const _default: {
350
305
  }[];
351
306
  };
352
307
  redirect: string;
353
- payment: {
354
- requirePayment: string[];
355
- requireAuthentication: string[];
356
- };
357
308
  contentGroups?: {
358
309
  id: string;
359
310
  name: string;
@@ -444,6 +395,10 @@ declare const _default: {
444
395
  verified: boolean;
445
396
  auth: {
446
397
  email: string;
398
+ hasPassword: boolean;
399
+ providers: {
400
+ provider: string;
401
+ }[];
447
402
  };
448
403
  loginRedirect: string;
449
404
  stripeCustomerId: string;
@@ -481,83 +436,6 @@ declare const _default: {
481
436
  json: object;
482
437
  };
483
438
  }>;
484
- getMemberCards(options?: import("./requests").MemberstackOptions): Promise<{
485
- data: {
486
- id: string;
487
- brand: string;
488
- expMonth: string;
489
- expYear: string;
490
- last4: string;
491
- default: boolean;
492
- }[];
493
- }>;
494
- getMemberInvoices(params?: import("../types").GetMemberInvoicesParams, options?: import("./requests").MemberstackOptions): Promise<{
495
- hasNext: boolean;
496
- endCursor: string;
497
- totalCount: number;
498
- data: {
499
- id: string;
500
- status: string;
501
- amount: number;
502
- url: string;
503
- description: string;
504
- number: string;
505
- planConnection: string;
506
- createdAt: string;
507
- currency: string;
508
- }[];
509
- }>;
510
- getMemberReceipts(params?: import("../types").GetMemberReceiptsParams, options?: import("./requests").MemberstackOptions): Promise<{
511
- hasNext: boolean;
512
- endCursor: string;
513
- totalCount: number;
514
- data: {
515
- id: string;
516
- amount: number;
517
- url: string;
518
- stripe?: {
519
- url: string;
520
- };
521
- number: string;
522
- purchase: string;
523
- invoice: string;
524
- createdAt: string;
525
- currency: string;
526
- }[];
527
- }>;
528
- getAuthenticationClientSecret(params: import("../types").GetAuthenticationClientSecretParams, options?: import("./requests").MemberstackOptions): Promise<{
529
- data: string;
530
- }>;
531
- getTotalCheckoutAmount(params: import("../types").GetTotalCheckoutAmountParams, options?: import("./requests").MemberstackOptions): Promise<{
532
- data: {
533
- total: number;
534
- subTotal: number;
535
- currency: string;
536
- setupFee?: {
537
- enabled: boolean;
538
- amount: number;
539
- name: string;
540
- };
541
- freeTrial?: {
542
- days: number;
543
- enabled: boolean;
544
- };
545
- tax?: {
546
- name: string;
547
- percent: number;
548
- description: string;
549
- }[];
550
- };
551
- }>;
552
- purchasePlans(params: import("../types").PurchasePlansParams, options?: import("./requests").MemberstackOptions): Promise<{
553
- data: {
554
- plan: string;
555
- payment: {
556
- requiresPayment: boolean;
557
- requiresAuthentication: boolean;
558
- };
559
- };
560
- }>;
561
439
  addPlan(params: import("../types").AddPlanParams, options?: import("./requests").MemberstackOptions): Promise<{
562
440
  data: {
563
441
  redirect: string;
@@ -592,45 +470,16 @@ declare const _default: {
592
470
  };
593
471
  }>;
594
472
  removePlan(params: import("../types").RemovePlanParams, options?: import("./requests").MemberstackOptions): Promise<null>;
595
- cancelPlan(params: import("../types").CancelPlanParams, options?: import("./requests").MemberstackOptions): Promise<{
596
- data: {
597
- id: string;
598
- verified: boolean;
599
- auth: {
600
- email: string;
601
- };
602
- loginRedirect: string;
603
- stripeCustomerId: string;
604
- createdAt: string;
605
- metaData: object;
606
- customFields: object;
607
- permissions: [] | string[];
608
- planConnections: {
609
- id: string;
610
- active: boolean;
611
- status: string;
612
- planId: string;
613
- type: string;
614
- payment: {
615
- amount: number;
616
- currency: string;
617
- status: string;
618
- lastBillingDate: number;
619
- nextBillingDate: number;
620
- cancelAtDate: number;
621
- lastInvoice: string;
622
- lastReceipt: string;
623
- card: string;
624
- };
625
- }[];
626
- };
627
- }>;
628
473
  updateMember(params: import("../types").UpdateMemberParams, options?: import("./requests").MemberstackOptions): Promise<{
629
474
  data: {
630
475
  id: string;
631
476
  verified: boolean;
632
477
  auth: {
633
478
  email: string;
479
+ hasPassword: boolean;
480
+ providers: {
481
+ provider: string;
482
+ }[];
634
483
  };
635
484
  loginRedirect: string;
636
485
  stripeCustomerId: string;
@@ -664,6 +513,10 @@ declare const _default: {
664
513
  verified: boolean;
665
514
  auth: {
666
515
  email: string;
516
+ hasPassword: boolean;
517
+ providers: {
518
+ provider: string;
519
+ }[];
667
520
  };
668
521
  loginRedirect: string;
669
522
  stripeCustomerId: string;
@@ -691,78 +544,16 @@ declare const _default: {
691
544
  }[];
692
545
  };
693
546
  }>;
694
- addCard(params: import("../types").AddMemberCardParams, options?: import("./requests").MemberstackOptions): Promise<{
695
- data: {
696
- id: string;
697
- verified: boolean;
698
- auth: {
699
- email: string;
700
- };
701
- loginRedirect: string;
702
- stripeCustomerId: string;
703
- createdAt: string;
704
- metaData: object;
705
- customFields: object;
706
- permissions: [] | string[];
707
- planConnections: {
708
- id: string;
709
- active: boolean;
710
- status: string;
711
- planId: string;
712
- type: string;
713
- payment: {
714
- amount: number;
715
- currency: string;
716
- status: string;
717
- lastBillingDate: number;
718
- nextBillingDate: number;
719
- cancelAtDate: number;
720
- lastInvoice: string;
721
- lastReceipt: string;
722
- card: string;
723
- };
724
- }[];
725
- };
726
- }>;
727
- updateDefaultCard(params: import("../types").UpdateDefaultCardParams, options?: import("./requests").MemberstackOptions): Promise<{
728
- data: {
729
- id: string;
730
- verified: boolean;
731
- auth: {
732
- email: string;
733
- };
734
- loginRedirect: string;
735
- stripeCustomerId: string;
736
- createdAt: string;
737
- metaData: object;
738
- customFields: object;
739
- permissions: [] | string[];
740
- planConnections: {
741
- id: string;
742
- active: boolean;
743
- status: string;
744
- planId: string;
745
- type: string;
746
- payment: {
747
- amount: number;
748
- currency: string;
749
- status: string;
750
- lastBillingDate: number;
751
- nextBillingDate: number;
752
- cancelAtDate: number;
753
- lastInvoice: string;
754
- lastReceipt: string;
755
- card: string;
756
- };
757
- }[];
758
- };
759
- }>;
760
- updatePlanPayment(params: import("../types").UpdatePlanPaymentParams, options?: import("./requests").MemberstackOptions): Promise<{
547
+ setPassword(params: import("../types").SetPasswordParams, options?: import("./requests").MemberstackOptions): Promise<{
761
548
  data: {
762
549
  id: string;
763
550
  verified: boolean;
764
551
  auth: {
765
552
  email: string;
553
+ hasPassword: boolean;
554
+ providers: {
555
+ provider: string;
556
+ }[];
766
557
  };
767
558
  loginRedirect: string;
768
559
  stripeCustomerId: string;
@@ -802,6 +593,10 @@ declare const _default: {
802
593
  verified: boolean;
803
594
  auth: {
804
595
  email: string;
596
+ hasPassword: boolean;
597
+ providers: {
598
+ provider: string;
599
+ }[];
805
600
  };
806
601
  loginRedirect: string;
807
602
  stripeCustomerId: string;
@@ -829,70 +624,6 @@ declare const _default: {
829
624
  }[];
830
625
  };
831
626
  redirect: string;
832
- payment: {
833
- requirePayment: string[];
834
- requireAuthentication: string[];
835
- };
836
- contentGroups?: {
837
- id: string;
838
- name: string;
839
- key: string;
840
- allowAllMembers: boolean;
841
- activeMemberHasAccess?: boolean;
842
- redirect: string;
843
- urls: {
844
- url: string;
845
- filter: string;
846
- }[];
847
- plans: {
848
- id: string;
849
- }[];
850
- }[];
851
- };
852
- }>;
853
- signupMemberAuthProvider(params: import("../types").SignupMemberAuthProviderParams): Promise<{
854
- data: {
855
- tokens: {
856
- accessToken: string;
857
- expires: number;
858
- type: "bearer";
859
- };
860
- member: {
861
- id: string;
862
- verified: boolean;
863
- auth: {
864
- email: string;
865
- };
866
- loginRedirect: string;
867
- stripeCustomerId: string;
868
- createdAt: string;
869
- metaData: object;
870
- customFields: object;
871
- permissions: [] | string[];
872
- planConnections: {
873
- id: string;
874
- active: boolean;
875
- status: string;
876
- planId: string;
877
- type: string;
878
- payment: {
879
- amount: number;
880
- currency: string;
881
- status: string;
882
- lastBillingDate: number;
883
- nextBillingDate: number;
884
- cancelAtDate: number;
885
- lastInvoice: string;
886
- lastReceipt: string;
887
- card: string;
888
- };
889
- }[];
890
- };
891
- redirect: string;
892
- payment: {
893
- requirePayment: string[];
894
- requireAuthentication: string[];
895
- };
896
627
  contentGroups?: {
897
628
  id: string;
898
629
  name: string;
@@ -914,53 +645,12 @@ declare const _default: {
914
645
  sendMemberResetPasswordEmail(params: import("../types").SendMemberResetPasswordEmailParams): Promise<{
915
646
  data: string;
916
647
  }>;
917
- resetMemberPassword(params: import("../types").ResetMemberPasswordParams): Promise<{
918
- data: {
919
- id: string;
920
- verified: boolean;
921
- auth: {
922
- email: string;
923
- };
924
- loginRedirect: string;
925
- stripeCustomerId: string;
926
- createdAt: string;
927
- metaData: object;
928
- customFields: object;
929
- permissions: [] | string[];
930
- planConnections: {
931
- id: string;
932
- active: boolean;
933
- status: string;
934
- planId: string;
935
- type: string;
936
- payment: {
937
- amount: number;
938
- currency: string;
939
- status: string;
940
- lastBillingDate: number;
941
- nextBillingDate: number;
942
- cancelAtDate: number;
943
- lastInvoice: string;
944
- lastReceipt: string;
945
- card: string;
946
- };
947
- }[];
948
- };
949
- }>;
648
+ resetMemberPassword(params: import("../types").ResetMemberPasswordParams): Promise<void>;
950
649
  logout(options?: import("./requests").MemberstackOptions): Promise<{
951
650
  data: {
952
651
  redirect?: string;
953
652
  };
954
653
  }>;
955
- replacePlan(params: import("../types").ReplacePlanParams, options?: import("./requests").MemberstackOptions): Promise<{
956
- data: {
957
- plan: string;
958
- payment: {
959
- requiresPayment: boolean;
960
- requiresAuthentication: boolean;
961
- };
962
- };
963
- }>;
964
654
  decodeToken({ token }: {
965
655
  token: string;
966
656
  }): Promise<Pick<import("jose").JWTPayload, "iat" | "exp"> & {
@@ -17,10 +17,11 @@ export interface ClientConfig {
17
17
  declare type BearerToken = string;
18
18
  export declare const initRequest: ({ publicKey, appId, token, customEndpoint, sessionDurationDays }: ClientConfig) => {
19
19
  signupWithProvider(params?: Params.SignupWithProviderParams): Promise<unknown>;
20
- loginWithProvider(params?: Params.SignupWithProviderParams): Promise<unknown>;
21
- getAppAndMember(): Promise<Payloads.GetAppAndMemberPayload>;
20
+ loginWithProvider(params?: Params.LoginWithProviderParams): Promise<unknown>;
21
+ connectProvider(params?: Params.LoginWithProviderParams): Promise<Payloads.ConnectProviderPayload>;
22
+ disconnectProvider(params: Params.LoginWithProviderParams): Promise<Payloads.ConnectProviderPayload>;
23
+ getAppAndMember(params?: any): Promise<Payloads.GetAppAndMemberPayload>;
22
24
  getApp(): Promise<Payloads.AppPayload>;
23
- getAuthProviders(): Promise<Payloads.AppPayload>;
24
25
  loginMemberEmailPassword(params: Params.LoginMemberEmailPasswordParams, options?: any): Promise<Payloads.LoginMemberEmailPasswordPayload>;
25
26
  loginMemberAuthProvider(params: Params.LoginMemberAuthProviderParams): Promise<Payloads.LoginMemberAuthProviderPayload>;
26
27
  getPlan(params: Params.GetPlanParams): Promise<Payloads.GetPlanPayload>;
@@ -29,29 +30,18 @@ export declare const initRequest: ({ publicKey, appId, token, customEndpoint, se
29
30
  getCurrentMember(options?: GetCurrentMemberParams): Promise<Payloads.GetCurrentMemberPayload>;
30
31
  getMemberJSON(options?: MemberstackOptions): Promise<Payloads.GetMemberJSONPayload>;
31
32
  updateMemberJSON(params: Params.UpdateMemberJSONParams, options?: MemberstackOptions): Promise<Payloads.GetMemberJSONPayload>;
32
- getMemberCards(options?: MemberstackOptions): Promise<Payloads.GetMemberCardsPayload>;
33
- getMemberInvoices(params?: Params.GetMemberInvoicesParams, options?: MemberstackOptions): Promise<Payloads.GetMemberInvoicesPayload>;
34
- getMemberReceipts(params?: Params.GetMemberReceiptsParams, options?: MemberstackOptions): Promise<Payloads.GetMemberReceiptsPayload>;
35
- getAuthenticationClientSecret(params: Params.GetAuthenticationClientSecretParams, options?: MemberstackOptions): Promise<Payloads.GetAuthenticationClientSecretPayload>;
36
- getTotalCheckoutAmount(params: Params.GetTotalCheckoutAmountParams, options?: MemberstackOptions): Promise<Payloads.GetTotalCheckoutAmountPayload>;
37
- purchasePlans(params: Params.PurchasePlansParams, options?: MemberstackOptions): Promise<Payloads.PurchasePlansPayload>;
38
33
  addPlan(params: Params.AddPlanParams, options?: MemberstackOptions): Promise<Payloads.AddPlanPayload>;
39
34
  purchasePlansWithCheckout(params: Params.PurchasePlansWithCheckoutParams, options?: MemberstackOptions): Promise<Payloads.PurchasePlansWithCheckoutPayload>;
40
35
  launchStripeCustomerPortal(params: Params.LaunchStripeCustomerPortalParams, options?: MemberstackOptions): Promise<Payloads.LaunchStripeCustomerPortalPayload>;
41
36
  removePlan(params: Params.RemovePlanParams, options?: MemberstackOptions): Promise<null>;
42
- cancelPlan(params: Params.CancelPlanParams, options?: MemberstackOptions): Promise<Payloads.CancelPlanPayload>;
43
37
  updateMember(params: Params.UpdateMemberParams, options?: MemberstackOptions): Promise<Payloads.UpdateMemberPayload>;
44
38
  updateMemberAuth(params: Params.UpdateMemberAuthParams, options?: MemberstackOptions): Promise<Payloads.UpdateMemberAuthPayload>;
45
- addCard(params: Params.AddMemberCardParams, options?: MemberstackOptions): Promise<Payloads.AddMemberCardPayload>;
46
- updateDefaultCard(params: Params.UpdateDefaultCardParams, options?: MemberstackOptions): Promise<Payloads.UpdateDefaultCardPayload>;
47
- updatePlanPayment(params: Params.UpdatePlanPaymentParams, options?: MemberstackOptions): Promise<Payloads.UpdatePlanPaymentPayload>;
39
+ setPassword(params: Params.SetPasswordParams, options?: MemberstackOptions): Promise<Payloads.SetPasswordPayload>;
48
40
  signupMemberEmailPassword(params: Params.SignupMemberEmailPasswordParams, options?: any): Promise<Payloads.SignupMemberEmailPasswordPayload>;
49
- signupMemberAuthProvider(params: Params.SignupMemberAuthProviderParams): Promise<Payloads.SignupMemberAuthProviderPayload>;
50
41
  sendMemberVerificationEmail(): Promise<void>;
51
42
  sendMemberResetPasswordEmail(params: Params.SendMemberResetPasswordEmailParams): Promise<Payloads.SendMemberResetPasswordEmailPayload>;
52
- resetMemberPassword(params: Params.ResetMemberPasswordParams): Promise<Payloads.ResetMemberPasswordPayload>;
43
+ resetMemberPassword(params: Params.ResetMemberPasswordParams): Promise<void>;
53
44
  logout(options?: MemberstackOptions): Promise<Payloads.LogoutMemberPayload>;
54
- replacePlan(params: Params.ReplacePlanParams, options?: MemberstackOptions): Promise<Payloads.ReplacePlanPayload>;
55
45
  decodeToken({ token }: {
56
46
  token: string;
57
47
  }): Promise<Pick<JWTPayload, "iat" | "exp"> & {