@memberstack/dom 1.9.7 → 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.
@@ -15,65 +15,127 @@ declare const _default: {
15
15
  unsubscribe: () => boolean;
16
16
  };
17
17
  } & {
18
- getApp(): Promise<{
18
+ signupWithProvider(params?: import("../types").SignupWithProviderParams): Promise<unknown>;
19
+ loginWithProvider(params?: import("../types").LoginWithProviderParams): Promise<unknown>;
20
+ connectProvider(params?: import("../types").LoginWithProviderParams): Promise<{
19
21
  data: {
20
- id: string;
21
- name: string;
22
- mode: "live" | "sandbox";
23
- plans: {
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<{
35
+ data: {
36
+ app: {
24
37
  id: string;
25
38
  name: string;
26
- description: string;
27
- status: string;
28
- redirects: {
29
- afterLogin: string;
30
- afterLogout: string;
31
- afterSignup: string;
32
- };
33
- prices?: [] | {
39
+ mode: "live" | "sandbox";
40
+ plans: {
34
41
  id: string;
35
- amount: string;
36
- interval: {
37
- type: string;
38
- count: number;
39
- };
40
42
  name: string;
41
- type: string;
43
+ description: string;
42
44
  status: string;
43
- currency: string;
44
- }[];
45
- }[];
46
- contentGroups: {
47
- id: string;
48
- name: string;
49
- key: string;
50
- allowAllMembers: boolean;
51
- redirect: string;
52
- urls: {
53
- url: string;
54
- filter: string;
45
+ redirects: {
46
+ afterLogin: string;
47
+ afterLogout: string;
48
+ afterSignup: string;
49
+ };
50
+ prices?: [] | {
51
+ id: string;
52
+ amount: string;
53
+ interval: {
54
+ type: string;
55
+ count: number;
56
+ };
57
+ name: string;
58
+ type: string;
59
+ status: string;
60
+ currency: string;
61
+ }[];
55
62
  }[];
56
- plans: {
63
+ contentGroups: {
57
64
  id: string;
65
+ name: string;
66
+ key: string;
67
+ allowAllMembers: boolean;
68
+ activeMemberHasAccess?: boolean;
69
+ redirect: string;
70
+ urls: {
71
+ url: string;
72
+ filter: string;
73
+ }[];
74
+ plans: {
75
+ id: string;
76
+ }[];
58
77
  }[];
59
- }[];
60
- customField: {
61
- order: number;
62
- key: string;
63
- label: string;
64
- hidden: boolean;
65
- }[];
66
- branding: {
67
- logo: string;
68
- colors: {
69
- lightMode: {
70
- primaryButton: string;
78
+ emailVerificationEnabled: boolean;
79
+ requireEmailVerification: boolean;
80
+ customField: {
81
+ order: number;
82
+ key: string;
83
+ label: string;
84
+ hidden: boolean;
85
+ }[];
86
+ branding: {
87
+ logo: string;
88
+ colors: {
89
+ lightMode: {
90
+ primaryButton: string;
91
+ };
71
92
  };
72
93
  };
94
+ authProviders: {
95
+ clientId: string;
96
+ provider: string;
97
+ providerType: string;
98
+ icon: string;
99
+ }[];
100
+ };
101
+ member: {
102
+ id: string;
103
+ verified: boolean;
104
+ auth: {
105
+ email: string;
106
+ hasPassword: boolean;
107
+ providers: {
108
+ provider: string;
109
+ }[];
110
+ };
111
+ loginRedirect: string;
112
+ stripeCustomerId: string;
113
+ createdAt: string;
114
+ metaData: object;
115
+ customFields: object;
116
+ permissions: [] | string[];
117
+ planConnections: {
118
+ id: string;
119
+ active: boolean;
120
+ status: string;
121
+ planId: string;
122
+ type: string;
123
+ payment: {
124
+ amount: number;
125
+ currency: string;
126
+ status: string;
127
+ lastBillingDate: number;
128
+ nextBillingDate: number;
129
+ cancelAtDate: number;
130
+ lastInvoice: string;
131
+ lastReceipt: string;
132
+ card: string;
133
+ };
134
+ }[];
73
135
  };
74
136
  };
75
137
  }>;
76
- getAuthProviders(): Promise<{
138
+ getApp(): Promise<{
77
139
  data: {
78
140
  id: string;
79
141
  name: string;
@@ -106,6 +168,7 @@ declare const _default: {
106
168
  name: string;
107
169
  key: string;
108
170
  allowAllMembers: boolean;
171
+ activeMemberHasAccess?: boolean;
109
172
  redirect: string;
110
173
  urls: {
111
174
  url: string;
@@ -115,6 +178,8 @@ declare const _default: {
115
178
  id: string;
116
179
  }[];
117
180
  }[];
181
+ emailVerificationEnabled: boolean;
182
+ requireEmailVerification: boolean;
118
183
  customField: {
119
184
  order: number;
120
185
  key: string;
@@ -129,9 +194,15 @@ declare const _default: {
129
194
  };
130
195
  };
131
196
  };
197
+ authProviders: {
198
+ clientId: string;
199
+ provider: string;
200
+ providerType: string;
201
+ icon: string;
202
+ }[];
132
203
  };
133
204
  }>;
134
- loginMemberEmailPassword(params: import("../types").LoginMemberEmailPasswordParams): Promise<{
205
+ loginMemberEmailPassword(params: import("../types").LoginMemberEmailPasswordParams, options?: any): Promise<{
135
206
  data: {
136
207
  tokens: {
137
208
  accessToken: string;
@@ -140,8 +211,13 @@ declare const _default: {
140
211
  };
141
212
  member: {
142
213
  id: string;
214
+ verified: boolean;
143
215
  auth: {
144
216
  email: string;
217
+ hasPassword: boolean;
218
+ providers: {
219
+ provider: string;
220
+ }[];
145
221
  };
146
222
  loginRedirect: string;
147
223
  stripeCustomerId: string;
@@ -169,10 +245,21 @@ declare const _default: {
169
245
  }[];
170
246
  };
171
247
  redirect: string;
172
- payment: {
173
- requirePayment: string[];
174
- requireAuthentication: string[];
175
- };
248
+ contentGroups?: {
249
+ id: string;
250
+ name: string;
251
+ key: string;
252
+ allowAllMembers: boolean;
253
+ activeMemberHasAccess?: boolean;
254
+ redirect: string;
255
+ urls: {
256
+ url: string;
257
+ filter: string;
258
+ }[];
259
+ plans: {
260
+ id: string;
261
+ }[];
262
+ }[];
176
263
  };
177
264
  }>;
178
265
  loginMemberAuthProvider(params: import("../types").LoginMemberAuthProviderParams): Promise<{
@@ -184,8 +271,13 @@ declare const _default: {
184
271
  };
185
272
  member: {
186
273
  id: string;
274
+ verified: boolean;
187
275
  auth: {
188
276
  email: string;
277
+ hasPassword: boolean;
278
+ providers: {
279
+ provider: string;
280
+ }[];
189
281
  };
190
282
  loginRedirect: string;
191
283
  stripeCustomerId: string;
@@ -213,10 +305,21 @@ declare const _default: {
213
305
  }[];
214
306
  };
215
307
  redirect: string;
216
- payment: {
217
- requirePayment: string[];
218
- requireAuthentication: string[];
219
- };
308
+ contentGroups?: {
309
+ id: string;
310
+ name: string;
311
+ key: string;
312
+ allowAllMembers: boolean;
313
+ activeMemberHasAccess?: boolean;
314
+ redirect: string;
315
+ urls: {
316
+ url: string;
317
+ filter: string;
318
+ }[];
319
+ plans: {
320
+ id: string;
321
+ }[];
322
+ }[];
220
323
  };
221
324
  }>;
222
325
  getPlan(params: import("../types").GetPlanParams): Promise<{
@@ -275,6 +378,7 @@ declare const _default: {
275
378
  name: string;
276
379
  key: string;
277
380
  allowAllMembers: boolean;
381
+ activeMemberHasAccess?: boolean;
278
382
  redirect: string;
279
383
  urls: {
280
384
  url: string;
@@ -288,8 +392,13 @@ declare const _default: {
288
392
  getCurrentMember(options?: import("./requests").GetCurrentMemberParams): Promise<{
289
393
  data: {
290
394
  id: string;
395
+ verified: boolean;
291
396
  auth: {
292
397
  email: string;
398
+ hasPassword: boolean;
399
+ providers: {
400
+ provider: string;
401
+ }[];
293
402
  };
294
403
  loginRedirect: string;
295
404
  stripeCustomerId: string;
@@ -327,83 +436,6 @@ declare const _default: {
327
436
  json: object;
328
437
  };
329
438
  }>;
330
- getMemberCards(options?: import("./requests").MemberstackOptions): Promise<{
331
- data: {
332
- id: string;
333
- brand: string;
334
- expMonth: string;
335
- expYear: string;
336
- last4: string;
337
- default: boolean;
338
- }[];
339
- }>;
340
- getMemberInvoices(params?: import("../types").GetMemberInvoicesParams, options?: import("./requests").MemberstackOptions): Promise<{
341
- hasNext: boolean;
342
- endCursor: string;
343
- totalCount: number;
344
- data: {
345
- id: string;
346
- status: string;
347
- amount: number;
348
- url: string;
349
- description: string;
350
- number: string;
351
- planConnection: string;
352
- createdAt: string;
353
- currency: string;
354
- }[];
355
- }>;
356
- getMemberReceipts(params?: import("../types").GetMemberReceiptsParams, options?: import("./requests").MemberstackOptions): Promise<{
357
- hasNext: boolean;
358
- endCursor: string;
359
- totalCount: number;
360
- data: {
361
- id: string;
362
- amount: number;
363
- url: string;
364
- stripe?: {
365
- url: string;
366
- };
367
- number: string;
368
- purchase: string;
369
- invoice: string;
370
- createdAt: string;
371
- currency: string;
372
- }[];
373
- }>;
374
- getAuthenticationClientSecret(params: import("../types").GetAuthenticationClientSecretParams, options?: import("./requests").MemberstackOptions): Promise<{
375
- data: string;
376
- }>;
377
- getTotalCheckoutAmount(params: import("../types").GetTotalCheckoutAmountParams, options?: import("./requests").MemberstackOptions): Promise<{
378
- data: {
379
- total: number;
380
- subTotal: number;
381
- currency: string;
382
- setupFee?: {
383
- enabled: boolean;
384
- amount: number;
385
- name: string;
386
- };
387
- freeTrial?: {
388
- days: number;
389
- enabled: boolean;
390
- };
391
- tax?: {
392
- name: string;
393
- percent: number;
394
- description: string;
395
- }[];
396
- };
397
- }>;
398
- purchasePlans(params: import("../types").PurchasePlansParams, options?: import("./requests").MemberstackOptions): Promise<{
399
- data: {
400
- plan: string;
401
- payment: {
402
- requiresPayment: boolean;
403
- requiresAuthentication: boolean;
404
- };
405
- };
406
- }>;
407
439
  addPlan(params: import("../types").AddPlanParams, options?: import("./requests").MemberstackOptions): Promise<{
408
440
  data: {
409
441
  redirect: string;
@@ -438,43 +470,16 @@ declare const _default: {
438
470
  };
439
471
  }>;
440
472
  removePlan(params: import("../types").RemovePlanParams, options?: import("./requests").MemberstackOptions): Promise<null>;
441
- cancelPlan(params: import("../types").CancelPlanParams, options?: import("./requests").MemberstackOptions): Promise<{
442
- data: {
443
- id: string;
444
- auth: {
445
- email: string;
446
- };
447
- loginRedirect: string;
448
- stripeCustomerId: string;
449
- createdAt: string;
450
- metaData: object;
451
- customFields: object;
452
- permissions: [] | string[];
453
- planConnections: {
454
- id: string;
455
- active: boolean;
456
- status: string;
457
- planId: string;
458
- type: string;
459
- payment: {
460
- amount: number;
461
- currency: string;
462
- status: string;
463
- lastBillingDate: number;
464
- nextBillingDate: number;
465
- cancelAtDate: number;
466
- lastInvoice: string;
467
- lastReceipt: string;
468
- card: string;
469
- };
470
- }[];
471
- };
472
- }>;
473
473
  updateMember(params: import("../types").UpdateMemberParams, options?: import("./requests").MemberstackOptions): Promise<{
474
474
  data: {
475
475
  id: string;
476
+ verified: boolean;
476
477
  auth: {
477
478
  email: string;
479
+ hasPassword: boolean;
480
+ providers: {
481
+ provider: string;
482
+ }[];
478
483
  };
479
484
  loginRedirect: string;
480
485
  stripeCustomerId: string;
@@ -505,8 +510,13 @@ declare const _default: {
505
510
  updateMemberAuth(params: import("../types").UpdateMemberAuthParams, options?: import("./requests").MemberstackOptions): Promise<{
506
511
  data: {
507
512
  id: string;
513
+ verified: boolean;
508
514
  auth: {
509
515
  email: string;
516
+ hasPassword: boolean;
517
+ providers: {
518
+ provider: string;
519
+ }[];
510
520
  };
511
521
  loginRedirect: string;
512
522
  stripeCustomerId: string;
@@ -534,75 +544,16 @@ declare const _default: {
534
544
  }[];
535
545
  };
536
546
  }>;
537
- addCard(params: import("../types").AddMemberCardParams, options?: import("./requests").MemberstackOptions): Promise<{
538
- data: {
539
- id: string;
540
- auth: {
541
- email: string;
542
- };
543
- loginRedirect: string;
544
- stripeCustomerId: string;
545
- createdAt: string;
546
- metaData: object;
547
- customFields: object;
548
- permissions: [] | string[];
549
- planConnections: {
550
- id: string;
551
- active: boolean;
552
- status: string;
553
- planId: string;
554
- type: string;
555
- payment: {
556
- amount: number;
557
- currency: string;
558
- status: string;
559
- lastBillingDate: number;
560
- nextBillingDate: number;
561
- cancelAtDate: number;
562
- lastInvoice: string;
563
- lastReceipt: string;
564
- card: string;
565
- };
566
- }[];
567
- };
568
- }>;
569
- updateDefaultCard(params: import("../types").UpdateDefaultCardParams, options?: import("./requests").MemberstackOptions): Promise<{
570
- data: {
571
- id: string;
572
- auth: {
573
- email: string;
574
- };
575
- loginRedirect: string;
576
- stripeCustomerId: string;
577
- createdAt: string;
578
- metaData: object;
579
- customFields: object;
580
- permissions: [] | string[];
581
- planConnections: {
582
- id: string;
583
- active: boolean;
584
- status: string;
585
- planId: string;
586
- type: string;
587
- payment: {
588
- amount: number;
589
- currency: string;
590
- status: string;
591
- lastBillingDate: number;
592
- nextBillingDate: number;
593
- cancelAtDate: number;
594
- lastInvoice: string;
595
- lastReceipt: string;
596
- card: string;
597
- };
598
- }[];
599
- };
600
- }>;
601
- updatePlanPayment(params: import("../types").UpdatePlanPaymentParams, options?: import("./requests").MemberstackOptions): Promise<{
547
+ setPassword(params: import("../types").SetPasswordParams, options?: import("./requests").MemberstackOptions): Promise<{
602
548
  data: {
603
549
  id: string;
550
+ verified: boolean;
604
551
  auth: {
605
552
  email: string;
553
+ hasPassword: boolean;
554
+ providers: {
555
+ provider: string;
556
+ }[];
606
557
  };
607
558
  loginRedirect: string;
608
559
  stripeCustomerId: string;
@@ -630,7 +581,7 @@ declare const _default: {
630
581
  }[];
631
582
  };
632
583
  }>;
633
- signupMemberEmailPassword(params: import("../types").SignupMemberEmailPasswordParams): Promise<{
584
+ signupMemberEmailPassword(params: import("../types").SignupMemberEmailPasswordParams, options?: any): Promise<{
634
585
  data: {
635
586
  tokens: {
636
587
  accessToken: string;
@@ -639,8 +590,13 @@ declare const _default: {
639
590
  };
640
591
  member: {
641
592
  id: string;
593
+ verified: boolean;
642
594
  auth: {
643
595
  email: string;
596
+ hasPassword: boolean;
597
+ providers: {
598
+ provider: string;
599
+ }[];
644
600
  };
645
601
  loginRedirect: string;
646
602
  stripeCustomerId: string;
@@ -668,105 +624,33 @@ declare const _default: {
668
624
  }[];
669
625
  };
670
626
  redirect: string;
671
- payment: {
672
- requirePayment: string[];
673
- requireAuthentication: string[];
674
- };
675
- };
676
- }>;
677
- signupMemberAuthProvider(params: import("../types").SignupMemberAuthProviderParams): Promise<{
678
- data: {
679
- tokens: {
680
- accessToken: string;
681
- expires: number;
682
- type: "bearer";
683
- };
684
- member: {
627
+ contentGroups?: {
685
628
  id: string;
686
- auth: {
687
- email: string;
688
- };
689
- loginRedirect: string;
690
- stripeCustomerId: string;
691
- createdAt: string;
692
- metaData: object;
693
- customFields: object;
694
- permissions: [] | string[];
695
- planConnections: {
629
+ name: string;
630
+ key: string;
631
+ allowAllMembers: boolean;
632
+ activeMemberHasAccess?: boolean;
633
+ redirect: string;
634
+ urls: {
635
+ url: string;
636
+ filter: string;
637
+ }[];
638
+ plans: {
696
639
  id: string;
697
- active: boolean;
698
- status: string;
699
- planId: string;
700
- type: string;
701
- payment: {
702
- amount: number;
703
- currency: string;
704
- status: string;
705
- lastBillingDate: number;
706
- nextBillingDate: number;
707
- cancelAtDate: number;
708
- lastInvoice: string;
709
- lastReceipt: string;
710
- card: string;
711
- };
712
640
  }[];
713
- };
714
- redirect: string;
715
- payment: {
716
- requirePayment: string[];
717
- requireAuthentication: string[];
718
- };
641
+ }[];
719
642
  };
720
643
  }>;
644
+ sendMemberVerificationEmail(): Promise<void>;
721
645
  sendMemberResetPasswordEmail(params: import("../types").SendMemberResetPasswordEmailParams): Promise<{
722
646
  data: string;
723
647
  }>;
724
- resetMemberPassword(params: import("../types").ResetMemberPasswordParams): Promise<{
725
- data: {
726
- id: string;
727
- auth: {
728
- email: string;
729
- };
730
- loginRedirect: string;
731
- stripeCustomerId: string;
732
- createdAt: string;
733
- metaData: object;
734
- customFields: object;
735
- permissions: [] | string[];
736
- planConnections: {
737
- id: string;
738
- active: boolean;
739
- status: string;
740
- planId: string;
741
- type: string;
742
- payment: {
743
- amount: number;
744
- currency: string;
745
- status: string;
746
- lastBillingDate: number;
747
- nextBillingDate: number;
748
- cancelAtDate: number;
749
- lastInvoice: string;
750
- lastReceipt: string;
751
- card: string;
752
- };
753
- }[];
754
- };
755
- }>;
648
+ resetMemberPassword(params: import("../types").ResetMemberPasswordParams): Promise<void>;
756
649
  logout(options?: import("./requests").MemberstackOptions): Promise<{
757
650
  data: {
758
651
  redirect?: string;
759
652
  };
760
653
  }>;
761
- replacePlan(params: import("../types").ReplacePlanParams, options?: import("./requests").MemberstackOptions): Promise<{
762
- data: {
763
- plan: string;
764
- payment: {
765
- requiresPayment: boolean;
766
- requiresAuthentication: boolean;
767
- };
768
- };
769
- }>;
770
654
  decodeToken({ token }: {
771
655
  token: string;
772
656
  }): Promise<Pick<import("jose").JWTPayload, "iat" | "exp"> & {