@memberstack/dom 1.9.25 → 1.9.27

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.
@@ -2,6 +2,8 @@ export declare type DOMConfig = {
2
2
  publicKey: string;
3
3
  appId?: string;
4
4
  sessionDurationDays?: number;
5
+ useCookies?: boolean;
6
+ domain?: string;
5
7
  };
6
8
  declare const _default: {
7
9
  init: (props: DOMConfig) => {
@@ -16,779 +18,39 @@ declare const _default: {
16
18
  };
17
19
  _captchaReady: Promise<unknown>;
18
20
  } & {
21
+ getSecureContent(params?: import("../types").GetSecureContentParams): Promise<import("../types").GetSecureContentPayload>;
19
22
  signupWithProvider(params?: import("../types").SignupWithProviderParams): Promise<unknown>;
20
23
  loginWithProvider(params?: import("../types").LoginWithProviderParams): Promise<unknown>;
21
- connectProvider(params?: import("../types").LoginWithProviderParams): Promise<{
22
- data: {
23
- providers: {
24
- provider: string;
25
- }[];
26
- message?: string;
27
- };
28
- }>;
29
- disconnectProvider(params: import("../types").LoginWithProviderParams): Promise<{
30
- data: {
31
- providers: {
32
- provider: string;
33
- }[];
34
- message?: string;
35
- };
36
- }>;
37
- getAppAndMember(params?: any): Promise<{
38
- data: {
39
- app: {
40
- id: string;
41
- name: string;
42
- mode: "live" | "sandbox";
43
- plans: {
44
- id: string;
45
- name: string;
46
- description: string;
47
- status: string;
48
- redirects: {
49
- afterLogin: string;
50
- afterLogout: string;
51
- afterSignup: string;
52
- };
53
- prices?: [] | {
54
- id: string;
55
- amount: string;
56
- interval: {
57
- type: string;
58
- count: number;
59
- };
60
- name: string;
61
- type: string;
62
- status: string;
63
- currency: string;
64
- }[];
65
- }[];
66
- contentGroups: {
67
- id: string;
68
- name: string;
69
- key: string;
70
- allowAllMembers: boolean;
71
- activeMemberHasAccess?: boolean;
72
- redirect: string;
73
- urls: {
74
- url: string;
75
- filter: string;
76
- }[];
77
- plans: {
78
- id: string;
79
- }[];
80
- }[];
81
- emailVerificationEnabled: boolean;
82
- requireEmailVerification: boolean;
83
- customField: {
84
- order: number;
85
- key: string;
86
- label: string;
87
- hidden: boolean;
88
- }[];
89
- branding: {
90
- logo: string;
91
- colors: {
92
- lightMode: {
93
- primaryButton: string;
94
- };
95
- };
96
- };
97
- authProviders: {
98
- clientId: string;
99
- provider: string;
100
- providerType: string;
101
- icon: string;
102
- }[];
103
- };
104
- member: {
105
- id: string;
106
- verified: boolean;
107
- auth: {
108
- email: string;
109
- hasPassword: boolean;
110
- providers: {
111
- provider: string;
112
- }[];
113
- };
114
- loginRedirect: string;
115
- stripeCustomerId: string;
116
- createdAt: string;
117
- metaData: object;
118
- customFields: object;
119
- permissions: [] | string[];
120
- planConnections: {
121
- id: string;
122
- active: boolean;
123
- status: string;
124
- planId: string;
125
- type: string;
126
- payment: {
127
- amount: number;
128
- currency: string;
129
- status: string;
130
- lastBillingDate: number;
131
- nextBillingDate: number;
132
- cancelAtDate: number;
133
- lastInvoice: string;
134
- lastReceipt: string;
135
- card: string;
136
- };
137
- }[];
138
- };
139
- };
140
- }>;
141
- getApp(): Promise<{
142
- data: {
143
- id: string;
144
- name: string;
145
- mode: "live" | "sandbox";
146
- plans: {
147
- id: string;
148
- name: string;
149
- description: string;
150
- status: string;
151
- redirects: {
152
- afterLogin: string;
153
- afterLogout: string;
154
- afterSignup: string;
155
- };
156
- prices?: [] | {
157
- id: string;
158
- amount: string;
159
- interval: {
160
- type: string;
161
- count: number;
162
- };
163
- name: string;
164
- type: string;
165
- status: string;
166
- currency: string;
167
- }[];
168
- }[];
169
- contentGroups: {
170
- id: string;
171
- name: string;
172
- key: string;
173
- allowAllMembers: boolean;
174
- activeMemberHasAccess?: boolean;
175
- redirect: string;
176
- urls: {
177
- url: string;
178
- filter: string;
179
- }[];
180
- plans: {
181
- id: string;
182
- }[];
183
- }[];
184
- emailVerificationEnabled: boolean;
185
- requireEmailVerification: boolean;
186
- customField: {
187
- order: number;
188
- key: string;
189
- label: string;
190
- hidden: boolean;
191
- }[];
192
- branding: {
193
- logo: string;
194
- colors: {
195
- lightMode: {
196
- primaryButton: string;
197
- };
198
- };
199
- };
200
- authProviders: {
201
- clientId: string;
202
- provider: string;
203
- providerType: string;
204
- icon: string;
205
- }[];
206
- };
207
- }>;
208
- loginMemberEmailPassword(params: import("../types").LoginMemberEmailPasswordParams, options?: any): Promise<{
209
- data: {
210
- tokens: {
211
- accessToken: string;
212
- expires: number;
213
- type: "bearer";
214
- };
215
- member: {
216
- id: string;
217
- verified: boolean;
218
- auth: {
219
- email: string;
220
- hasPassword: boolean;
221
- providers: {
222
- provider: string;
223
- }[];
224
- };
225
- loginRedirect: string;
226
- stripeCustomerId: string;
227
- createdAt: string;
228
- metaData: object;
229
- customFields: object;
230
- permissions: [] | string[];
231
- planConnections: {
232
- id: string;
233
- active: boolean;
234
- status: string;
235
- planId: string;
236
- type: string;
237
- payment: {
238
- amount: number;
239
- currency: string;
240
- status: string;
241
- lastBillingDate: number;
242
- nextBillingDate: number;
243
- cancelAtDate: number;
244
- lastInvoice: string;
245
- lastReceipt: string;
246
- card: string;
247
- };
248
- }[];
249
- };
250
- redirect: string;
251
- contentGroups?: {
252
- id: string;
253
- name: string;
254
- key: string;
255
- allowAllMembers: boolean;
256
- activeMemberHasAccess?: boolean;
257
- redirect: string;
258
- urls: {
259
- url: string;
260
- filter: string;
261
- }[];
262
- plans: {
263
- id: string;
264
- }[];
265
- }[];
266
- };
267
- }>;
268
- sendMemberLoginPasswordlessEmail(params: import("../types").SendMemberLoginPasswordlessEmailParams, options?: any): Promise<{
269
- data: {
270
- success: boolean;
271
- };
272
- }>;
273
- sendMemberSignupPasswordlessEmail(params: import("../types").SendMemberLoginPasswordlessEmailParams, options?: any): Promise<{
274
- data: {
275
- success: boolean;
276
- };
277
- }>;
278
- loginMemberPasswordless(params: import("../types").LoginMemberPasswordlessParams, options?: any): Promise<{
279
- data: {
280
- tokens: {
281
- accessToken: string;
282
- expires: number;
283
- type: "bearer";
284
- };
285
- member: {
286
- id: string;
287
- verified: boolean;
288
- auth: {
289
- email: string;
290
- hasPassword: boolean;
291
- providers: {
292
- provider: string;
293
- }[];
294
- };
295
- loginRedirect: string;
296
- stripeCustomerId: string;
297
- createdAt: string;
298
- metaData: object;
299
- customFields: object;
300
- permissions: [] | string[];
301
- planConnections: {
302
- id: string;
303
- active: boolean;
304
- status: string;
305
- planId: string;
306
- type: string;
307
- payment: {
308
- amount: number;
309
- currency: string;
310
- status: string;
311
- lastBillingDate: number;
312
- nextBillingDate: number;
313
- cancelAtDate: number;
314
- lastInvoice: string;
315
- lastReceipt: string;
316
- card: string;
317
- };
318
- }[];
319
- };
320
- redirect: string;
321
- contentGroups?: {
322
- id: string;
323
- name: string;
324
- key: string;
325
- allowAllMembers: boolean;
326
- activeMemberHasAccess?: boolean;
327
- redirect: string;
328
- urls: {
329
- url: string;
330
- filter: string;
331
- }[];
332
- plans: {
333
- id: string;
334
- }[];
335
- }[];
336
- };
337
- }>;
338
- getPlan(params: import("../types").GetPlanParams): Promise<{
339
- data: {
340
- id: string;
341
- name: string;
342
- description: string;
343
- status: string;
344
- redirects: {
345
- afterLogin: string;
346
- afterLogout: string;
347
- afterSignup: string;
348
- };
349
- prices?: [] | {
350
- id: string;
351
- amount: string;
352
- interval: {
353
- type: string;
354
- count: number;
355
- };
356
- name: string;
357
- type: string;
358
- status: string;
359
- currency: string;
360
- }[];
361
- };
362
- }>;
363
- getPlans(): Promise<{
364
- data: {
365
- id: string;
366
- name: string;
367
- description: string;
368
- status: string;
369
- redirects: {
370
- afterLogin: string;
371
- afterLogout: string;
372
- afterSignup: string;
373
- };
374
- prices?: [] | {
375
- id: string;
376
- amount: string;
377
- interval: {
378
- type: string;
379
- count: number;
380
- };
381
- name: string;
382
- type: string;
383
- status: string;
384
- currency: string;
385
- }[];
386
- }[];
387
- }>;
388
- getRestrictedUrlGroups(): Promise<{
389
- data: {
390
- id: string;
391
- name: string;
392
- key: string;
393
- allowAllMembers: boolean;
394
- activeMemberHasAccess?: boolean;
395
- redirect: string;
396
- urls: {
397
- url: string;
398
- filter: string;
399
- }[];
400
- plans: {
401
- id: string;
402
- }[];
403
- }[];
404
- }>;
405
- getCurrentMember(options?: import("./requests").GetCurrentMemberParams): Promise<{
406
- data: {
407
- id: string;
408
- verified: boolean;
409
- auth: {
410
- email: string;
411
- hasPassword: boolean;
412
- providers: {
413
- provider: string;
414
- }[];
415
- };
416
- loginRedirect: string;
417
- stripeCustomerId: string;
418
- createdAt: string;
419
- metaData: object;
420
- customFields: object;
421
- permissions: [] | string[];
422
- planConnections: {
423
- id: string;
424
- active: boolean;
425
- status: string;
426
- planId: string;
427
- type: string;
428
- payment: {
429
- amount: number;
430
- currency: string;
431
- status: string;
432
- lastBillingDate: number;
433
- nextBillingDate: number;
434
- cancelAtDate: number;
435
- lastInvoice: string;
436
- lastReceipt: string;
437
- card: string;
438
- };
439
- }[];
440
- };
441
- }>;
442
- getMemberJSON(options?: import("./requests").MemberstackOptions): Promise<{
443
- data: {
444
- json: object;
445
- };
446
- }>;
447
- updateMemberJSON(params: import("../types").UpdateMemberJSONParams, options?: import("./requests").MemberstackOptions): Promise<{
448
- data: {
449
- json: object;
450
- };
451
- }>;
452
- addPlan(params: import("../types").AddPlanParams, options?: import("./requests").MemberstackOptions): Promise<{
453
- data: {
454
- redirect: string;
455
- member: {
456
- id: string;
457
- verified: boolean;
458
- auth: {
459
- email: string;
460
- hasPassword: boolean;
461
- providers: {
462
- provider: string;
463
- }[];
464
- };
465
- loginRedirect: string;
466
- stripeCustomerId: string;
467
- createdAt: string;
468
- metaData: object;
469
- customFields: object;
470
- permissions: [] | string[];
471
- planConnections: {
472
- id: string;
473
- active: boolean;
474
- status: string;
475
- planId: string;
476
- type: string;
477
- payment: {
478
- amount: number;
479
- currency: string;
480
- status: string;
481
- lastBillingDate: number;
482
- nextBillingDate: number;
483
- cancelAtDate: number;
484
- lastInvoice: string;
485
- lastReceipt: string;
486
- card: string;
487
- };
488
- }[];
489
- };
490
- };
491
- }>;
492
- purchasePlansWithCheckout(params: import("../types").PurchasePlansWithCheckoutParams, options?: import("./requests").MemberstackOptions): Promise<{
493
- data: {
494
- url: string;
495
- };
496
- }>;
497
- launchStripeCustomerPortal(params: import("../types").LaunchStripeCustomerPortalParams, options?: import("./requests").MemberstackOptions): Promise<{
498
- data: {
499
- url: string;
500
- };
501
- }>;
502
- removePlan(params: import("../types").RemovePlanParams, options?: import("./requests").MemberstackOptions): Promise<{
503
- data: {
504
- member: {
505
- id: string;
506
- verified: boolean;
507
- auth: {
508
- email: string;
509
- hasPassword: boolean;
510
- providers: {
511
- provider: string;
512
- }[];
513
- };
514
- loginRedirect: string;
515
- stripeCustomerId: string;
516
- createdAt: string;
517
- metaData: object;
518
- customFields: object;
519
- permissions: [] | string[];
520
- planConnections: {
521
- id: string;
522
- active: boolean;
523
- status: string;
524
- planId: string;
525
- type: string;
526
- payment: {
527
- amount: number;
528
- currency: string;
529
- status: string;
530
- lastBillingDate: number;
531
- nextBillingDate: number;
532
- cancelAtDate: number;
533
- lastInvoice: string;
534
- lastReceipt: string;
535
- card: string;
536
- };
537
- }[];
538
- };
539
- };
540
- }>;
541
- updateMember(params: import("../types").UpdateMemberParams, options?: import("./requests").MemberstackOptions): Promise<{
542
- data: {
543
- id: string;
544
- verified: boolean;
545
- auth: {
546
- email: string;
547
- hasPassword: boolean;
548
- providers: {
549
- provider: string;
550
- }[];
551
- };
552
- loginRedirect: string;
553
- stripeCustomerId: string;
554
- createdAt: string;
555
- metaData: object;
556
- customFields: object;
557
- permissions: [] | string[];
558
- planConnections: {
559
- id: string;
560
- active: boolean;
561
- status: string;
562
- planId: string;
563
- type: string;
564
- payment: {
565
- amount: number;
566
- currency: string;
567
- status: string;
568
- lastBillingDate: number;
569
- nextBillingDate: number;
570
- cancelAtDate: number;
571
- lastInvoice: string;
572
- lastReceipt: string;
573
- card: string;
574
- };
575
- }[];
576
- };
577
- }>;
578
- updateMemberAuth(params: import("../types").UpdateMemberAuthParams, options?: import("./requests").MemberstackOptions): Promise<{
579
- data: {
580
- id: string;
581
- verified: boolean;
582
- auth: {
583
- email: string;
584
- hasPassword: boolean;
585
- providers: {
586
- provider: string;
587
- }[];
588
- };
589
- loginRedirect: string;
590
- stripeCustomerId: string;
591
- createdAt: string;
592
- metaData: object;
593
- customFields: object;
594
- permissions: [] | string[];
595
- planConnections: {
596
- id: string;
597
- active: boolean;
598
- status: string;
599
- planId: string;
600
- type: string;
601
- payment: {
602
- amount: number;
603
- currency: string;
604
- status: string;
605
- lastBillingDate: number;
606
- nextBillingDate: number;
607
- cancelAtDate: number;
608
- lastInvoice: string;
609
- lastReceipt: string;
610
- card: string;
611
- };
612
- }[];
613
- };
614
- }>;
615
- setPassword(params: import("../types").SetPasswordParams, options?: import("./requests").MemberstackOptions): Promise<{
616
- data: {
617
- id: string;
618
- verified: boolean;
619
- auth: {
620
- email: string;
621
- hasPassword: boolean;
622
- providers: {
623
- provider: string;
624
- }[];
625
- };
626
- loginRedirect: string;
627
- stripeCustomerId: string;
628
- createdAt: string;
629
- metaData: object;
630
- customFields: object;
631
- permissions: [] | string[];
632
- planConnections: {
633
- id: string;
634
- active: boolean;
635
- status: string;
636
- planId: string;
637
- type: string;
638
- payment: {
639
- amount: number;
640
- currency: string;
641
- status: string;
642
- lastBillingDate: number;
643
- nextBillingDate: number;
644
- cancelAtDate: number;
645
- lastInvoice: string;
646
- lastReceipt: string;
647
- card: string;
648
- };
649
- }[];
650
- };
651
- }>;
652
- signupMemberPasswordless(params: Pick<import("../types").SignupMemberEmailPasswordParams, "email" | "customFields" | "metaData" | "plans" | "captchaToken"> & {
24
+ connectProvider(params?: import("../types").LoginWithProviderParams): Promise<import("../types").ConnectProviderPayload>;
25
+ disconnectProvider(params: import("../types").LoginWithProviderParams): Promise<import("../types").ConnectProviderPayload>;
26
+ getAppAndMember(params?: any): Promise<import("../types").GetAppAndMemberPayload>;
27
+ getApp(): Promise<import("../types").AppPayload>;
28
+ loginMemberEmailPassword(params: import("../types").LoginMemberEmailPasswordParams, options?: any): Promise<import("../types").LoginMemberEmailPasswordPayload>;
29
+ sendMemberLoginPasswordlessEmail(params: import("../types").SendMemberLoginPasswordlessEmailParams, options?: any): Promise<import("../types").SendMemberLoginPasswordlessEmailPayload>;
30
+ sendMemberSignupPasswordlessEmail(params: import("../types").SendMemberLoginPasswordlessEmailParams, options?: any): Promise<import("../types").SendMemberLoginPasswordlessEmailPayload>;
31
+ loginMemberPasswordless(params: import("../types").LoginMemberPasswordlessParams, options?: any): Promise<import("../types").LoginMemberEmailPasswordPayload>;
32
+ getPlan(params: import("../types").GetPlanParams): Promise<import("../types").GetPlanPayload>;
33
+ getPlans(): Promise<import("../types").GetPlansPayload>;
34
+ getRestrictedUrlGroups(): Promise<import("../types").GetRestrictedUrlGroupsPayload>;
35
+ getCurrentMember(options?: import("./requests").GetCurrentMemberParams): Promise<import("../types").GetCurrentMemberPayload>;
36
+ getMemberJSON(options?: import("./requests").MemberstackOptions): Promise<import("../types").GetMemberJSONPayload>;
37
+ updateMemberJSON(params: import("../types").UpdateMemberJSONParams, options?: import("./requests").MemberstackOptions): Promise<import("../types").GetMemberJSONPayload>;
38
+ addPlan(params: import("../types").AddPlanParams, options?: import("./requests").MemberstackOptions): Promise<import("../types").AddPlanPayload>;
39
+ purchasePlansWithCheckout(params: import("../types").PurchasePlansWithCheckoutParams, options?: import("./requests").MemberstackOptions): Promise<import("../types").PurchasePlansWithCheckoutPayload>;
40
+ launchStripeCustomerPortal(params: import("../types").LaunchStripeCustomerPortalParams, options?: import("./requests").MemberstackOptions): Promise<import("../types").LaunchStripeCustomerPortalPayload>;
41
+ removePlan(params: import("../types").RemovePlanParams, options?: import("./requests").MemberstackOptions): Promise<import("../types").RemovePlanPayload>;
42
+ updateMember(params: import("../types").UpdateMemberParams, options?: import("./requests").MemberstackOptions): Promise<import("../types").UpdateMemberPayload>;
43
+ updateMemberAuth(params: import("../types").UpdateMemberAuthParams, options?: import("./requests").MemberstackOptions): Promise<import("../types").UpdateMemberAuthPayload>;
44
+ setPassword(params: import("../types").SetPasswordParams, options?: import("./requests").MemberstackOptions): Promise<import("../types").SetPasswordPayload>;
45
+ signupMemberPasswordless(params: Omit<import("../types").SignupMemberEmailPasswordParams, "password"> & {
653
46
  passwordlessToken: string;
654
- }, options?: any): Promise<{
655
- data: {
656
- tokens: {
657
- accessToken: string;
658
- expires: number;
659
- type: "bearer";
660
- };
661
- member: {
662
- id: string;
663
- verified: boolean;
664
- auth: {
665
- email: string;
666
- hasPassword: boolean;
667
- providers: {
668
- provider: string;
669
- }[];
670
- };
671
- loginRedirect: string;
672
- stripeCustomerId: string;
673
- createdAt: string;
674
- metaData: object;
675
- customFields: object;
676
- permissions: [] | string[];
677
- planConnections: {
678
- id: string;
679
- active: boolean;
680
- status: string;
681
- planId: string;
682
- type: string;
683
- payment: {
684
- amount: number;
685
- currency: string;
686
- status: string;
687
- lastBillingDate: number;
688
- nextBillingDate: number;
689
- cancelAtDate: number;
690
- lastInvoice: string;
691
- lastReceipt: string;
692
- card: string;
693
- };
694
- }[];
695
- };
696
- redirect: string;
697
- contentGroups?: {
698
- id: string;
699
- name: string;
700
- key: string;
701
- allowAllMembers: boolean;
702
- activeMemberHasAccess?: boolean;
703
- redirect: string;
704
- urls: {
705
- url: string;
706
- filter: string;
707
- }[];
708
- plans: {
709
- id: string;
710
- }[];
711
- }[];
712
- };
713
- }>;
714
- signupMemberEmailPassword(params: import("../types").SignupMemberEmailPasswordParams, options?: any): Promise<{
715
- data: {
716
- tokens: {
717
- accessToken: string;
718
- expires: number;
719
- type: "bearer";
720
- };
721
- member: {
722
- id: string;
723
- verified: boolean;
724
- auth: {
725
- email: string;
726
- hasPassword: boolean;
727
- providers: {
728
- provider: string;
729
- }[];
730
- };
731
- loginRedirect: string;
732
- stripeCustomerId: string;
733
- createdAt: string;
734
- metaData: object;
735
- customFields: object;
736
- permissions: [] | string[];
737
- planConnections: {
738
- id: string;
739
- active: boolean;
740
- status: string;
741
- planId: string;
742
- type: string;
743
- payment: {
744
- amount: number;
745
- currency: string;
746
- status: string;
747
- lastBillingDate: number;
748
- nextBillingDate: number;
749
- cancelAtDate: number;
750
- lastInvoice: string;
751
- lastReceipt: string;
752
- card: string;
753
- };
754
- }[];
755
- };
756
- redirect: string;
757
- contentGroups?: {
758
- id: string;
759
- name: string;
760
- key: string;
761
- allowAllMembers: boolean;
762
- activeMemberHasAccess?: boolean;
763
- redirect: string;
764
- urls: {
765
- url: string;
766
- filter: string;
767
- }[];
768
- plans: {
769
- id: string;
770
- }[];
771
- }[];
772
- };
773
- }>;
774
- sendMemberVerificationEmail(): Promise<{
775
- data: {
776
- success: boolean;
777
- };
778
- }>;
779
- sendMemberResetPasswordEmail(params: import("../types").SendMemberResetPasswordEmailParams): Promise<{
780
- data: string;
781
- }>;
782
- resetMemberPassword(params: import("../types").ResetMemberPasswordParams): Promise<{
783
- data: {
784
- success: boolean;
785
- };
786
- }>;
787
- logout(options?: import("./requests").MemberstackOptions): Promise<{
788
- data: {
789
- redirect?: string;
790
- };
791
- }>;
47
+ }, options?: any): Promise<import("../types").SignupMemberEmailPasswordPayload>;
48
+ signupMemberEmailPassword(params: import("../types").SignupMemberEmailPasswordParams, options?: any): Promise<import("../types").SignupMemberEmailPasswordPayload>;
49
+ updateMemberProfileImage(params: import("../types").UpdateMemberProfileImageParams): Promise<import("../types").UpdateMemberProfileImagePayload>;
50
+ sendMemberVerificationEmail(): Promise<import("../types").SendMemberVerificationEmailPayload>;
51
+ sendMemberResetPasswordEmail(params: import("../types").SendMemberResetPasswordEmailParams): Promise<import("../types").SendMemberResetPasswordEmailPayload>;
52
+ resetMemberPassword(params: import("../types").ResetMemberPasswordParams): Promise<import("../types").ResetMemberPassworPayload>;
53
+ logout(options?: import("./requests").MemberstackOptions): Promise<import("../types").LogoutMemberPayload>;
792
54
  };
793
55
  };
794
56
  export default _default;