@memberstack/dom 1.9.9 → 1.9.10

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.
package/lib/index.d.ts CHANGED
@@ -9,643 +9,34 @@ declare const _default: {
9
9
  onAuthChange: (cb: any) => {
10
10
  unsubscribe: () => boolean;
11
11
  };
12
+ _captchaReady: Promise<unknown>;
12
13
  } & {
13
14
  signupWithProvider(params?: import("./types").SignupWithProviderParams): Promise<unknown>;
14
15
  loginWithProvider(params?: import("./types").LoginWithProviderParams): Promise<unknown>;
15
- connectProvider(params?: import("./types").LoginWithProviderParams): Promise<{
16
- data: {
17
- providers: {
18
- provider: string;
19
- }[];
20
- };
21
- }>;
22
- disconnectProvider(params: import("./types").LoginWithProviderParams): Promise<{
23
- data: {
24
- providers: {
25
- provider: string;
26
- }[];
27
- };
28
- }>;
29
- getAppAndMember(params?: any): Promise<{
30
- data: {
31
- app: {
32
- id: string;
33
- name: string;
34
- mode: "live" | "sandbox";
35
- plans: {
36
- id: string;
37
- name: string;
38
- description: string;
39
- status: string;
40
- redirects: {
41
- afterLogin: string;
42
- afterLogout: string;
43
- afterSignup: string;
44
- };
45
- prices?: [] | {
46
- id: string;
47
- amount: string;
48
- interval: {
49
- type: string;
50
- count: number;
51
- };
52
- name: string;
53
- type: string;
54
- status: string;
55
- currency: string;
56
- }[];
57
- }[];
58
- contentGroups: {
59
- id: string;
60
- name: string;
61
- key: string;
62
- allowAllMembers: boolean;
63
- activeMemberHasAccess?: boolean;
64
- redirect: string;
65
- urls: {
66
- url: string;
67
- filter: string;
68
- }[];
69
- plans: {
70
- id: string;
71
- }[];
72
- }[];
73
- emailVerificationEnabled: boolean;
74
- requireEmailVerification: boolean;
75
- customField: {
76
- order: number;
77
- key: string;
78
- label: string;
79
- hidden: boolean;
80
- }[];
81
- branding: {
82
- logo: string;
83
- colors: {
84
- lightMode: {
85
- primaryButton: string;
86
- };
87
- };
88
- };
89
- authProviders: {
90
- clientId: string;
91
- provider: string;
92
- providerType: string;
93
- icon: string;
94
- }[];
95
- };
96
- member: {
97
- id: string;
98
- verified: boolean;
99
- auth: {
100
- email: string;
101
- hasPassword: boolean;
102
- providers: {
103
- provider: string;
104
- }[];
105
- };
106
- loginRedirect: string;
107
- stripeCustomerId: string;
108
- createdAt: string;
109
- metaData: object;
110
- customFields: object;
111
- permissions: [] | string[];
112
- planConnections: {
113
- id: string;
114
- active: boolean;
115
- status: string;
116
- planId: string;
117
- type: string;
118
- payment: {
119
- amount: number;
120
- currency: string;
121
- status: string;
122
- lastBillingDate: number;
123
- nextBillingDate: number;
124
- cancelAtDate: number;
125
- lastInvoice: string;
126
- lastReceipt: string;
127
- card: string;
128
- };
129
- }[];
130
- };
131
- };
132
- }>;
133
- getApp(): Promise<{
134
- data: {
135
- id: string;
136
- name: string;
137
- mode: "live" | "sandbox";
138
- plans: {
139
- id: string;
140
- name: string;
141
- description: string;
142
- status: string;
143
- redirects: {
144
- afterLogin: string;
145
- afterLogout: string;
146
- afterSignup: string;
147
- };
148
- prices?: [] | {
149
- id: string;
150
- amount: string;
151
- interval: {
152
- type: string;
153
- count: number;
154
- };
155
- name: string;
156
- type: string;
157
- status: string;
158
- currency: string;
159
- }[];
160
- }[];
161
- contentGroups: {
162
- id: string;
163
- name: string;
164
- key: string;
165
- allowAllMembers: boolean;
166
- activeMemberHasAccess?: boolean;
167
- redirect: string;
168
- urls: {
169
- url: string;
170
- filter: string;
171
- }[];
172
- plans: {
173
- id: string;
174
- }[];
175
- }[];
176
- emailVerificationEnabled: boolean;
177
- requireEmailVerification: boolean;
178
- customField: {
179
- order: number;
180
- key: string;
181
- label: string;
182
- hidden: boolean;
183
- }[];
184
- branding: {
185
- logo: string;
186
- colors: {
187
- lightMode: {
188
- primaryButton: string;
189
- };
190
- };
191
- };
192
- authProviders: {
193
- clientId: string;
194
- provider: string;
195
- providerType: string;
196
- icon: string;
197
- }[];
198
- };
199
- }>;
200
- loginMemberEmailPassword(params: import("./types").LoginMemberEmailPasswordParams, options?: any): Promise<{
201
- data: {
202
- tokens: {
203
- accessToken: string;
204
- expires: number;
205
- type: "bearer";
206
- };
207
- member: {
208
- id: string;
209
- verified: boolean;
210
- auth: {
211
- email: string;
212
- hasPassword: boolean;
213
- providers: {
214
- provider: string;
215
- }[];
216
- };
217
- loginRedirect: string;
218
- stripeCustomerId: string;
219
- createdAt: string;
220
- metaData: object;
221
- customFields: object;
222
- permissions: [] | string[];
223
- planConnections: {
224
- id: string;
225
- active: boolean;
226
- status: string;
227
- planId: string;
228
- type: string;
229
- payment: {
230
- amount: number;
231
- currency: string;
232
- status: string;
233
- lastBillingDate: number;
234
- nextBillingDate: number;
235
- cancelAtDate: number;
236
- lastInvoice: string;
237
- lastReceipt: string;
238
- card: string;
239
- };
240
- }[];
241
- };
242
- redirect: string;
243
- contentGroups?: {
244
- id: string;
245
- name: string;
246
- key: string;
247
- allowAllMembers: boolean;
248
- activeMemberHasAccess?: boolean;
249
- redirect: string;
250
- urls: {
251
- url: string;
252
- filter: string;
253
- }[];
254
- plans: {
255
- id: string;
256
- }[];
257
- }[];
258
- };
259
- }>;
260
- loginMemberAuthProvider(params: import("./types").LoginMemberAuthProviderParams): Promise<{
261
- data: {
262
- tokens: {
263
- accessToken: string;
264
- expires: number;
265
- type: "bearer";
266
- };
267
- member: {
268
- id: string;
269
- verified: boolean;
270
- auth: {
271
- email: string;
272
- hasPassword: boolean;
273
- providers: {
274
- provider: string;
275
- }[];
276
- };
277
- loginRedirect: string;
278
- stripeCustomerId: string;
279
- createdAt: string;
280
- metaData: object;
281
- customFields: object;
282
- permissions: [] | string[];
283
- planConnections: {
284
- id: string;
285
- active: boolean;
286
- status: string;
287
- planId: string;
288
- type: string;
289
- payment: {
290
- amount: number;
291
- currency: string;
292
- status: string;
293
- lastBillingDate: number;
294
- nextBillingDate: number;
295
- cancelAtDate: number;
296
- lastInvoice: string;
297
- lastReceipt: string;
298
- card: string;
299
- };
300
- }[];
301
- };
302
- redirect: string;
303
- contentGroups?: {
304
- id: string;
305
- name: string;
306
- key: string;
307
- allowAllMembers: boolean;
308
- activeMemberHasAccess?: boolean;
309
- redirect: string;
310
- urls: {
311
- url: string;
312
- filter: string;
313
- }[];
314
- plans: {
315
- id: string;
316
- }[];
317
- }[];
318
- };
319
- }>;
320
- getPlan(params: import("./types").GetPlanParams): Promise<{
321
- data: {
322
- id: string;
323
- name: string;
324
- description: string;
325
- status: string;
326
- redirects: {
327
- afterLogin: string;
328
- afterLogout: string;
329
- afterSignup: string;
330
- };
331
- prices?: [] | {
332
- id: string;
333
- amount: string;
334
- interval: {
335
- type: string;
336
- count: number;
337
- };
338
- name: string;
339
- type: string;
340
- status: string;
341
- currency: string;
342
- }[];
343
- };
344
- }>;
345
- getPlans(): Promise<{
346
- data: {
347
- id: string;
348
- name: string;
349
- description: string;
350
- status: string;
351
- redirects: {
352
- afterLogin: string;
353
- afterLogout: string;
354
- afterSignup: string;
355
- };
356
- prices?: [] | {
357
- id: string;
358
- amount: string;
359
- interval: {
360
- type: string;
361
- count: number;
362
- };
363
- name: string;
364
- type: string;
365
- status: string;
366
- currency: string;
367
- }[];
368
- }[];
369
- }>;
370
- getRestrictedUrlGroups(): Promise<{
371
- data: {
372
- id: string;
373
- name: string;
374
- key: string;
375
- allowAllMembers: boolean;
376
- activeMemberHasAccess?: boolean;
377
- redirect: string;
378
- urls: {
379
- url: string;
380
- filter: string;
381
- }[];
382
- plans: {
383
- id: string;
384
- }[];
385
- }[];
386
- }>;
387
- getCurrentMember(options?: import("./methods/requests").GetCurrentMemberParams): Promise<{
388
- data: {
389
- id: string;
390
- verified: boolean;
391
- auth: {
392
- email: string;
393
- hasPassword: boolean;
394
- providers: {
395
- provider: string;
396
- }[];
397
- };
398
- loginRedirect: string;
399
- stripeCustomerId: string;
400
- createdAt: string;
401
- metaData: object;
402
- customFields: object;
403
- permissions: [] | string[];
404
- planConnections: {
405
- id: string;
406
- active: boolean;
407
- status: string;
408
- planId: string;
409
- type: string;
410
- payment: {
411
- amount: number;
412
- currency: string;
413
- status: string;
414
- lastBillingDate: number;
415
- nextBillingDate: number;
416
- cancelAtDate: number;
417
- lastInvoice: string;
418
- lastReceipt: string;
419
- card: string;
420
- };
421
- }[];
422
- };
423
- }>;
424
- getMemberJSON(options?: import("./methods/requests").MemberstackOptions): Promise<{
425
- data: {
426
- json: object;
427
- };
428
- }>;
429
- updateMemberJSON(params: import("./types").UpdateMemberJSONParams, options?: import("./methods/requests").MemberstackOptions): Promise<{
430
- data: {
431
- json: object;
432
- };
433
- }>;
434
- addPlan(params: import("./types").AddPlanParams, options?: import("./methods/requests").MemberstackOptions): Promise<{
435
- data: {
436
- redirect: string;
437
- planConnection: {
438
- id: string;
439
- active: boolean;
440
- status: string;
441
- planId: string;
442
- type: string;
443
- payment: {
444
- amount: number;
445
- currency: string;
446
- status: string;
447
- lastBillingDate: number;
448
- nextBillingDate: number;
449
- cancelAtDate: number;
450
- lastInvoice: string;
451
- lastReceipt: string;
452
- card: string;
453
- };
454
- };
455
- };
456
- }>;
457
- purchasePlansWithCheckout(params: import("./types").PurchasePlansWithCheckoutParams, options?: import("./methods/requests").MemberstackOptions): Promise<{
458
- data: {
459
- url: string;
460
- };
461
- }>;
462
- launchStripeCustomerPortal(params: import("./types").LaunchStripeCustomerPortalParams, options?: import("./methods/requests").MemberstackOptions): Promise<{
463
- data: {
464
- url: string;
465
- };
466
- }>;
467
- removePlan(params: import("./types").RemovePlanParams, options?: import("./methods/requests").MemberstackOptions): Promise<null>;
468
- updateMember(params: import("./types").UpdateMemberParams, options?: import("./methods/requests").MemberstackOptions): Promise<{
469
- data: {
470
- id: string;
471
- verified: boolean;
472
- auth: {
473
- email: string;
474
- hasPassword: boolean;
475
- providers: {
476
- provider: string;
477
- }[];
478
- };
479
- loginRedirect: string;
480
- stripeCustomerId: string;
481
- createdAt: string;
482
- metaData: object;
483
- customFields: object;
484
- permissions: [] | string[];
485
- planConnections: {
486
- id: string;
487
- active: boolean;
488
- status: string;
489
- planId: string;
490
- type: string;
491
- payment: {
492
- amount: number;
493
- currency: string;
494
- status: string;
495
- lastBillingDate: number;
496
- nextBillingDate: number;
497
- cancelAtDate: number;
498
- lastInvoice: string;
499
- lastReceipt: string;
500
- card: string;
501
- };
502
- }[];
503
- };
504
- }>;
505
- updateMemberAuth(params: import("./types").UpdateMemberAuthParams, options?: import("./methods/requests").MemberstackOptions): Promise<{
506
- data: {
507
- id: string;
508
- verified: boolean;
509
- auth: {
510
- email: string;
511
- hasPassword: boolean;
512
- providers: {
513
- provider: string;
514
- }[];
515
- };
516
- loginRedirect: string;
517
- stripeCustomerId: string;
518
- createdAt: string;
519
- metaData: object;
520
- customFields: object;
521
- permissions: [] | string[];
522
- planConnections: {
523
- id: string;
524
- active: boolean;
525
- status: string;
526
- planId: string;
527
- type: string;
528
- payment: {
529
- amount: number;
530
- currency: string;
531
- status: string;
532
- lastBillingDate: number;
533
- nextBillingDate: number;
534
- cancelAtDate: number;
535
- lastInvoice: string;
536
- lastReceipt: string;
537
- card: string;
538
- };
539
- }[];
540
- };
541
- }>;
542
- setPassword(params: import("./types").SetPasswordParams, options?: import("./methods/requests").MemberstackOptions): Promise<{
543
- data: {
544
- id: string;
545
- verified: boolean;
546
- auth: {
547
- email: string;
548
- hasPassword: boolean;
549
- providers: {
550
- provider: string;
551
- }[];
552
- };
553
- loginRedirect: string;
554
- stripeCustomerId: string;
555
- createdAt: string;
556
- metaData: object;
557
- customFields: object;
558
- permissions: [] | string[];
559
- planConnections: {
560
- id: string;
561
- active: boolean;
562
- status: string;
563
- planId: string;
564
- type: string;
565
- payment: {
566
- amount: number;
567
- currency: string;
568
- status: string;
569
- lastBillingDate: number;
570
- nextBillingDate: number;
571
- cancelAtDate: number;
572
- lastInvoice: string;
573
- lastReceipt: string;
574
- card: string;
575
- };
576
- }[];
577
- };
578
- }>;
579
- signupMemberEmailPassword(params: import("./types").SignupMemberEmailPasswordParams, options?: any): Promise<{
580
- data: {
581
- tokens: {
582
- accessToken: string;
583
- expires: number;
584
- type: "bearer";
585
- };
586
- member: {
587
- id: string;
588
- verified: boolean;
589
- auth: {
590
- email: string;
591
- hasPassword: boolean;
592
- providers: {
593
- provider: string;
594
- }[];
595
- };
596
- loginRedirect: string;
597
- stripeCustomerId: string;
598
- createdAt: string;
599
- metaData: object;
600
- customFields: object;
601
- permissions: [] | string[];
602
- planConnections: {
603
- id: string;
604
- active: boolean;
605
- status: string;
606
- planId: string;
607
- type: string;
608
- payment: {
609
- amount: number;
610
- currency: string;
611
- status: string;
612
- lastBillingDate: number;
613
- nextBillingDate: number;
614
- cancelAtDate: number;
615
- lastInvoice: string;
616
- lastReceipt: string;
617
- card: string;
618
- };
619
- }[];
620
- };
621
- redirect: string;
622
- contentGroups?: {
623
- id: string;
624
- name: string;
625
- key: string;
626
- allowAllMembers: boolean;
627
- activeMemberHasAccess?: boolean;
628
- redirect: string;
629
- urls: {
630
- url: string;
631
- filter: string;
632
- }[];
633
- plans: {
634
- id: string;
635
- }[];
636
- }[];
637
- };
638
- }>;
639
- sendMemberVerificationEmail(): Promise<void>;
640
- sendMemberResetPasswordEmail(params: import("./types").SendMemberResetPasswordEmailParams): Promise<{
641
- data: string;
642
- }>;
643
- resetMemberPassword(params: import("./types").ResetMemberPasswordParams): Promise<void>;
644
- logout(options?: import("./methods/requests").MemberstackOptions): Promise<{
645
- data: {
646
- redirect?: string;
647
- };
648
- }>;
16
+ connectProvider(params?: import("./types").LoginWithProviderParams): Promise<import("./types").ConnectProviderPayload>;
17
+ disconnectProvider(params: import("./types").LoginWithProviderParams): Promise<import("./types").ConnectProviderPayload>;
18
+ getAppAndMember(params?: any): Promise<import("./types").GetAppAndMemberPayload>;
19
+ getApp(): Promise<import("./types").AppPayload>;
20
+ loginMemberEmailPassword(params: import("./types").LoginMemberEmailPasswordParams, options?: any): Promise<import("./types").LoginMemberEmailPasswordPayload>;
21
+ loginMemberAuthProvider(params: import("./types").LoginMemberAuthProviderParams): Promise<import("./types").LoginMemberAuthProviderPayload>;
22
+ getPlan(params: import("./types").GetPlanParams): Promise<import("./types").GetPlanPayload>;
23
+ getPlans(): Promise<import("./types").GetPlansPayload>;
24
+ getRestrictedUrlGroups(): Promise<import("./types").GetRestrictedUrlGroupsPayload>;
25
+ getCurrentMember(options?: import("./methods/requests").GetCurrentMemberParams): Promise<import("./types").GetCurrentMemberPayload>;
26
+ getMemberJSON(options?: import("./methods/requests").MemberstackOptions): Promise<import("./types").GetMemberJSONPayload>;
27
+ updateMemberJSON(params: import("./types").UpdateMemberJSONParams, options?: import("./methods/requests").MemberstackOptions): Promise<import("./types").GetMemberJSONPayload>;
28
+ addPlan(params: import("./types").AddPlanParams, options?: import("./methods/requests").MemberstackOptions): Promise<import("./types").AddPlanPayload>;
29
+ purchasePlansWithCheckout(params: import("./types").PurchasePlansWithCheckoutParams, options?: import("./methods/requests").MemberstackOptions): Promise<import("./types").PurchasePlansWithCheckoutPayload>;
30
+ launchStripeCustomerPortal(params: import("./types").LaunchStripeCustomerPortalParams, options?: import("./methods/requests").MemberstackOptions): Promise<import("./types").LaunchStripeCustomerPortalPayload>;
31
+ removePlan(params: import("./types").RemovePlanParams, options?: import("./methods/requests").MemberstackOptions): Promise<import("./types").RemovePlanPayload>;
32
+ updateMember(params: import("./types").UpdateMemberParams, options?: import("./methods/requests").MemberstackOptions): Promise<import("./types").UpdateMemberPayload>;
33
+ updateMemberAuth(params: import("./types").UpdateMemberAuthParams, options?: import("./methods/requests").MemberstackOptions): Promise<import("./types").UpdateMemberAuthPayload>;
34
+ setPassword(params: import("./types").SetPasswordParams, options?: import("./methods/requests").MemberstackOptions): Promise<import("./types").SetPasswordPayload>;
35
+ signupMemberEmailPassword(params: import("./types").SignupMemberEmailPasswordParams, options?: any): Promise<import("./types").SignupMemberEmailPasswordPayload>;
36
+ sendMemberVerificationEmail(): Promise<import("./types").SendMemberVerificationEmailPayload>;
37
+ sendMemberResetPasswordEmail(params: import("./types").SendMemberResetPasswordEmailParams): Promise<import("./types").SendMemberResetPasswordEmailPayload>;
38
+ resetMemberPassword(params: import("./types").ResetMemberPasswordParams): Promise<import("./types").ResetMemberPassworPayload>;
39
+ logout(options?: import("./methods/requests").MemberstackOptions): Promise<import("./types").LogoutMemberPayload>;
649
40
  decodeToken({ token }: {
650
41
  token: string;
651
42
  }): Promise<Pick<import("jose").JWTPayload, "iat" | "exp"> & {