@memberstack/dom 1.0.0-beta.22 → 1.0.0-beta.26

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,35 +1,647 @@
1
1
  import msClient from "@memberstack/client";
2
- export declare type ClientConfig = Parameters<typeof msClient["init"]>[0];
2
+ export declare type ClientConfig = Parameters<typeof msClient["init"]>[0] & {
3
+ useCookie: boolean;
4
+ };
3
5
  export declare const initClient: (props: ClientConfig) => {
4
- getApp(): Promise<import("@memberstack/client/lib/types/payloads").AppPayload>;
5
- getAuthProviders(): Promise<import("@memberstack/client/lib/types/payloads").AppPayload>;
6
- loginMemberEmailPassword(params: import("@memberstack/client/lib/types/params").LoginMemberEmailPasswordParams): Promise<import("@memberstack/client/lib/types/payloads").LoginMemberEmailPasswordPayload>;
7
- loginMemberAuthProvider(params: import("@memberstack/client/lib/types/params").LoginMemberAuthProviderParams): Promise<import("@memberstack/client/lib/types/payloads").LoginMemberAuthProviderPayload>;
8
- getPlan(params: import("@memberstack/client/lib/types/params").GetPlanParams): Promise<import("@memberstack/client/lib/types/payloads").GetPlanPayload>;
9
- getPlans(params?: import("@memberstack/client/lib/types/params").GetPlansParams): Promise<import("@memberstack/client/lib/types/payloads").GetPlansPayload>;
10
- getCurrentMember(options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").GetCurrentMemberPayload>;
11
- getMemberCards(options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").GetMemberCardsPayload>;
12
- getMemberInvoices(params?: import("@memberstack/client/lib/types/params").GetMemberInvoicesParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").GetMemberInvoicesPayload>;
13
- getMemberReceipts(params?: import("@memberstack/client/lib/types/params").GetMemberReceiptsParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").GetMemberReceiptsPayload>;
14
- getAuthenticationClientSecret(params: import("@memberstack/client/lib/types/params").GetAuthenticationClientSecretParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").GetAuthenticationClientSecretPayload>;
15
- getTotalCheckoutAmount(params: import("@memberstack/client/lib/types/params").GetTotalCheckoutAmountParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").GetTotalCheckoutAmountPayload>;
16
- purchasePlan(params: import("@memberstack/client/lib/types/params").PurchasePlanParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").PurchasePlanPayload>;
17
- cancelPlan(params: import("@memberstack/client/lib/types/params").CancelPlanParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").CancelPlanPayload>;
18
- updateMember(params: import("@memberstack/client/lib/types/params").UpdateMemberParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").UpdateMemberPayload>;
19
- updateMemberAuth(params: import("@memberstack/client/lib/types/params").UpdateMemberAuthParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").UpdateMemberAuthPayload>;
20
- addCard(params: import("@memberstack/client/lib/types/params").AddMemberCardParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").AddMemberCardPayload>;
21
- updateDefaultCard(params: import("@memberstack/client/lib/types/params").UpdateDefaultCardParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").UpdateDefaultCardPayload>;
22
- updatePlanPayment(params: import("@memberstack/client/lib/types/params").UpdatePlanPaymentParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").UpdatePlanPaymentPayload>;
23
- signupMemberEmailPassword(params: import("@memberstack/client/lib/types/params").SignupMemberEmailPasswordParams): Promise<import("@memberstack/client/lib/types/payloads").SignupMemberEmailPasswordPayload>;
24
- signupMemberAuthProvider(params: import("@memberstack/client/lib/types/params").SignupMemberAuthProviderParams): Promise<import("@memberstack/client/lib/types/payloads").SignupMemberAuthProviderPayload>;
25
- refreshMemberTokens(params: import("@memberstack/client/lib/types/params").RefreshMemberTokensParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").RefreshMemberTokensPayload>;
26
- sendMemberResetPasswordEmail(params: import("@memberstack/client/lib/types/params").SendMemberResetPasswordEmailParams): Promise<import("@memberstack/client/lib/types/payloads").SendMemberResetPasswordEmailPayload>;
27
- resetMemberPassword(params: import("@memberstack/client/lib/types/params").ResetMemberPasswordParams): Promise<import("@memberstack/client/lib/types/payloads").ResetMemberPasswordPayload>;
28
- logout(options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").LogoutMemberPayload>;
29
- replacePlan(params: import("@memberstack/client/lib/types/params").ReplacePlanParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<import("@memberstack/client/lib/types/payloads").ReplacePlanPayload>;
6
+ getApp(): Promise<{
7
+ data: {
8
+ id: string;
9
+ name: string;
10
+ domains?: {
11
+ url: string;
12
+ verified: boolean;
13
+ }[];
14
+ plans: {
15
+ id: string;
16
+ name: string;
17
+ description: string;
18
+ status: string;
19
+ prices?: [] | {
20
+ id: string;
21
+ amount: string;
22
+ interval: {
23
+ type: string;
24
+ count: number;
25
+ };
26
+ name: string;
27
+ type: string;
28
+ status: string;
29
+ currency: string;
30
+ }[];
31
+ }[];
32
+ customFields: {
33
+ id: string;
34
+ key: string;
35
+ label: string;
36
+ plans: {
37
+ id: string;
38
+ name: string;
39
+ description: string;
40
+ status: string;
41
+ prices?: [] | {
42
+ id: string;
43
+ amount: string;
44
+ interval: {
45
+ type: string;
46
+ count: number;
47
+ };
48
+ name: string;
49
+ type: string;
50
+ status: string;
51
+ currency: string;
52
+ }[];
53
+ }[];
54
+ }[];
55
+ };
56
+ }>;
57
+ getAuthProviders(): Promise<{
58
+ data: {
59
+ id: string;
60
+ name: string;
61
+ domains?: {
62
+ url: string;
63
+ verified: boolean;
64
+ }[];
65
+ plans: {
66
+ id: string;
67
+ name: string;
68
+ description: string;
69
+ status: string;
70
+ prices?: [] | {
71
+ id: string;
72
+ amount: string;
73
+ interval: {
74
+ type: string;
75
+ count: number;
76
+ };
77
+ name: string;
78
+ type: string;
79
+ status: string;
80
+ currency: string;
81
+ }[];
82
+ }[];
83
+ customFields: {
84
+ id: string;
85
+ key: string;
86
+ label: string;
87
+ plans: {
88
+ id: string;
89
+ name: string;
90
+ description: string;
91
+ status: string;
92
+ prices?: [] | {
93
+ id: string;
94
+ amount: string;
95
+ interval: {
96
+ type: string;
97
+ count: number;
98
+ };
99
+ name: string;
100
+ type: string;
101
+ status: string;
102
+ currency: string;
103
+ }[];
104
+ }[];
105
+ }[];
106
+ };
107
+ }>;
108
+ loginMemberEmailPassword(params: import("@memberstack/client/lib/types/params").LoginMemberEmailPasswordParams): Promise<{
109
+ data: {
110
+ tokens: {
111
+ accessToken: string;
112
+ refreshToken: string;
113
+ expires: number;
114
+ type: "bearer";
115
+ };
116
+ member: {
117
+ id: string;
118
+ auth: {
119
+ email: string;
120
+ };
121
+ metaData: object;
122
+ customFields: object;
123
+ permissions: string[] | [];
124
+ planConnections: {
125
+ id: string;
126
+ active: boolean;
127
+ status: string;
128
+ planId: string;
129
+ type: string;
130
+ payment: {
131
+ amount: number;
132
+ currency: string;
133
+ status: string;
134
+ lastBillingDate: number;
135
+ nextBillingDate: number;
136
+ cancelAtDate: number;
137
+ lastInvoice: string;
138
+ lastReceipt: string;
139
+ card: string;
140
+ };
141
+ }[];
142
+ };
143
+ payment: {
144
+ requirePayment: string[];
145
+ requireAuthentication: string[];
146
+ };
147
+ };
148
+ }>;
149
+ loginMemberAuthProvider(params: import("@memberstack/client/lib/types/params").LoginMemberAuthProviderParams): Promise<{
150
+ data: {
151
+ tokens: {
152
+ accessToken: string;
153
+ refreshToken: string;
154
+ expires: number;
155
+ type: "bearer";
156
+ };
157
+ member: {
158
+ id: string;
159
+ auth: {
160
+ email: string;
161
+ };
162
+ metaData: object;
163
+ customFields: object;
164
+ permissions: string[] | [];
165
+ planConnections: {
166
+ id: string;
167
+ active: boolean;
168
+ status: string;
169
+ planId: string;
170
+ type: string;
171
+ payment: {
172
+ amount: number;
173
+ currency: string;
174
+ status: string;
175
+ lastBillingDate: number;
176
+ nextBillingDate: number;
177
+ cancelAtDate: number;
178
+ lastInvoice: string;
179
+ lastReceipt: string;
180
+ card: string;
181
+ };
182
+ }[];
183
+ };
184
+ payment: {
185
+ requirePayment: string[];
186
+ requireAuthentication: string[];
187
+ };
188
+ };
189
+ }>;
190
+ getPlan(params: import("@memberstack/client/lib/types/params").GetPlanParams): Promise<{
191
+ data: {
192
+ id: string;
193
+ name: string;
194
+ description: string;
195
+ status: string;
196
+ prices?: [] | {
197
+ id: string;
198
+ amount: string;
199
+ interval: {
200
+ type: string;
201
+ count: number;
202
+ };
203
+ name: string;
204
+ type: string;
205
+ status: string;
206
+ currency: string;
207
+ }[];
208
+ };
209
+ }>;
210
+ getPlans(params?: import("@memberstack/client/lib/types/params").GetPlansParams): Promise<{
211
+ data: {
212
+ id: string;
213
+ name: string;
214
+ description: string;
215
+ status: string;
216
+ prices?: [] | {
217
+ id: string;
218
+ amount: string;
219
+ interval: {
220
+ type: string;
221
+ count: number;
222
+ };
223
+ name: string;
224
+ type: string;
225
+ status: string;
226
+ currency: string;
227
+ }[];
228
+ }[];
229
+ }>;
230
+ getCurrentMember(options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
231
+ data: {
232
+ id: string;
233
+ auth: {
234
+ email: string;
235
+ };
236
+ metaData: object;
237
+ customFields: object;
238
+ permissions: string[] | [];
239
+ planConnections: {
240
+ id: string;
241
+ active: boolean;
242
+ status: string;
243
+ planId: string;
244
+ type: string;
245
+ payment: {
246
+ amount: number;
247
+ currency: string;
248
+ status: string;
249
+ lastBillingDate: number;
250
+ nextBillingDate: number;
251
+ cancelAtDate: number;
252
+ lastInvoice: string;
253
+ lastReceipt: string;
254
+ card: string;
255
+ };
256
+ }[];
257
+ };
258
+ }>;
259
+ getMemberCards(options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
260
+ data: {
261
+ id: string;
262
+ brand: string;
263
+ expMonth: string;
264
+ expYear: string;
265
+ last4: string;
266
+ default: boolean;
267
+ }[];
268
+ }>;
269
+ getMemberInvoices(params?: import("@memberstack/client/lib/types/params").GetMemberInvoicesParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
270
+ hasNext: boolean;
271
+ endCursor: string;
272
+ totalCount: number;
273
+ data: {
274
+ id: string;
275
+ status: string;
276
+ amount: number;
277
+ url: string;
278
+ description: string;
279
+ number: string;
280
+ planConnection: string;
281
+ }[];
282
+ }>;
283
+ getMemberReceipts(params?: import("@memberstack/client/lib/types/params").GetMemberReceiptsParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
284
+ hasNext: boolean;
285
+ endCursor: string;
286
+ totalCount: number;
287
+ data: {
288
+ id: string;
289
+ amount: number;
290
+ url: string;
291
+ stripe?: {
292
+ url: string;
293
+ };
294
+ number: string;
295
+ purchase: string;
296
+ invoice: string;
297
+ }[];
298
+ }>;
299
+ getAuthenticationClientSecret(params: import("@memberstack/client/lib/types/params").GetAuthenticationClientSecretParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
300
+ data: string;
301
+ }>;
302
+ getTotalCheckoutAmount(params: import("@memberstack/client/lib/types/params").GetTotalCheckoutAmountParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
303
+ data: {
304
+ total: number;
305
+ subTotal: number;
306
+ currency: string;
307
+ setupFee?: {
308
+ enabled: boolean;
309
+ amount: number;
310
+ name: string;
311
+ };
312
+ freeTrial?: {
313
+ days: number;
314
+ enabled: boolean;
315
+ };
316
+ tax?: {
317
+ name: string;
318
+ percent: number;
319
+ description: string;
320
+ }[];
321
+ };
322
+ }>;
323
+ purchasePlan(params: import("@memberstack/client/lib/types/params").PurchasePlanParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
324
+ data: {
325
+ plan: string;
326
+ payment: {
327
+ requiresPayment: boolean;
328
+ requiresAuthentication: boolean;
329
+ };
330
+ };
331
+ }>;
332
+ cancelPlan(params: import("@memberstack/client/lib/types/params").CancelPlanParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
333
+ data: {
334
+ id: string;
335
+ auth: {
336
+ email: string;
337
+ };
338
+ metaData: object;
339
+ customFields: object;
340
+ permissions: string[] | [];
341
+ planConnections: {
342
+ id: string;
343
+ active: boolean;
344
+ status: string;
345
+ planId: string;
346
+ type: string;
347
+ payment: {
348
+ amount: number;
349
+ currency: string;
350
+ status: string;
351
+ lastBillingDate: number;
352
+ nextBillingDate: number;
353
+ cancelAtDate: number;
354
+ lastInvoice: string;
355
+ lastReceipt: string;
356
+ card: string;
357
+ };
358
+ }[];
359
+ };
360
+ }>;
361
+ updateMember(params: import("@memberstack/client/lib/types/params").UpdateMemberParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
362
+ data: {
363
+ id: string;
364
+ auth: {
365
+ email: string;
366
+ };
367
+ metaData: object;
368
+ customFields: object;
369
+ permissions: string[] | [];
370
+ planConnections: {
371
+ id: string;
372
+ active: boolean;
373
+ status: string;
374
+ planId: string;
375
+ type: string;
376
+ payment: {
377
+ amount: number;
378
+ currency: string;
379
+ status: string;
380
+ lastBillingDate: number;
381
+ nextBillingDate: number;
382
+ cancelAtDate: number;
383
+ lastInvoice: string;
384
+ lastReceipt: string;
385
+ card: string;
386
+ };
387
+ }[];
388
+ };
389
+ }>;
390
+ updateMemberAuth(params: import("@memberstack/client/lib/types/params").UpdateMemberAuthParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
391
+ data: {
392
+ id: string;
393
+ auth: {
394
+ email: string;
395
+ };
396
+ metaData: object;
397
+ customFields: object;
398
+ permissions: string[] | [];
399
+ planConnections: {
400
+ id: string;
401
+ active: boolean;
402
+ status: string;
403
+ planId: string;
404
+ type: string;
405
+ payment: {
406
+ amount: number;
407
+ currency: string;
408
+ status: string;
409
+ lastBillingDate: number;
410
+ nextBillingDate: number;
411
+ cancelAtDate: number;
412
+ lastInvoice: string;
413
+ lastReceipt: string;
414
+ card: string;
415
+ };
416
+ }[];
417
+ };
418
+ }>;
419
+ addCard(params: import("@memberstack/client/lib/types/params").AddMemberCardParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
420
+ data: {
421
+ id: string;
422
+ auth: {
423
+ email: string;
424
+ };
425
+ metaData: object;
426
+ customFields: object;
427
+ permissions: string[] | [];
428
+ planConnections: {
429
+ id: string;
430
+ active: boolean;
431
+ status: string;
432
+ planId: string;
433
+ type: string;
434
+ payment: {
435
+ amount: number;
436
+ currency: string;
437
+ status: string;
438
+ lastBillingDate: number;
439
+ nextBillingDate: number;
440
+ cancelAtDate: number;
441
+ lastInvoice: string;
442
+ lastReceipt: string;
443
+ card: string;
444
+ };
445
+ }[];
446
+ };
447
+ }>;
448
+ updateDefaultCard(params: import("@memberstack/client/lib/types/params").UpdateDefaultCardParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
449
+ data: {
450
+ id: string;
451
+ auth: {
452
+ email: string;
453
+ };
454
+ metaData: object;
455
+ customFields: object;
456
+ permissions: string[] | [];
457
+ planConnections: {
458
+ id: string;
459
+ active: boolean;
460
+ status: string;
461
+ planId: string;
462
+ type: string;
463
+ payment: {
464
+ amount: number;
465
+ currency: string;
466
+ status: string;
467
+ lastBillingDate: number;
468
+ nextBillingDate: number;
469
+ cancelAtDate: number;
470
+ lastInvoice: string;
471
+ lastReceipt: string;
472
+ card: string;
473
+ };
474
+ }[];
475
+ };
476
+ }>;
477
+ updatePlanPayment(params: import("@memberstack/client/lib/types/params").UpdatePlanPaymentParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
478
+ data: {
479
+ id: string;
480
+ auth: {
481
+ email: string;
482
+ };
483
+ metaData: object;
484
+ customFields: object;
485
+ permissions: string[] | [];
486
+ planConnections: {
487
+ id: string;
488
+ active: boolean;
489
+ status: string;
490
+ planId: string;
491
+ type: string;
492
+ payment: {
493
+ amount: number;
494
+ currency: string;
495
+ status: string;
496
+ lastBillingDate: number;
497
+ nextBillingDate: number;
498
+ cancelAtDate: number;
499
+ lastInvoice: string;
500
+ lastReceipt: string;
501
+ card: string;
502
+ };
503
+ }[];
504
+ };
505
+ }>;
506
+ signupMemberEmailPassword(params: import("@memberstack/client/lib/types/params").SignupMemberEmailPasswordParams): Promise<{
507
+ data: {
508
+ tokens: {
509
+ accessToken: string;
510
+ refreshToken: string;
511
+ expires: number;
512
+ type: "bearer";
513
+ };
514
+ member: {
515
+ id: string;
516
+ auth: {
517
+ email: string;
518
+ };
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
+ payment: {
542
+ requirePayment: string[];
543
+ requireAuthentication: string[];
544
+ };
545
+ };
546
+ }>;
547
+ signupMemberAuthProvider(params: import("@memberstack/client/lib/types/params").SignupMemberAuthProviderParams): Promise<{
548
+ data: {
549
+ tokens: {
550
+ accessToken: string;
551
+ refreshToken: string;
552
+ expires: number;
553
+ type: "bearer";
554
+ };
555
+ member: {
556
+ id: string;
557
+ auth: {
558
+ email: string;
559
+ };
560
+ metaData: object;
561
+ customFields: object;
562
+ permissions: string[] | [];
563
+ planConnections: {
564
+ id: string;
565
+ active: boolean;
566
+ status: string;
567
+ planId: string;
568
+ type: string;
569
+ payment: {
570
+ amount: number;
571
+ currency: string;
572
+ status: string;
573
+ lastBillingDate: number;
574
+ nextBillingDate: number;
575
+ cancelAtDate: number;
576
+ lastInvoice: string;
577
+ lastReceipt: string;
578
+ card: string;
579
+ };
580
+ }[];
581
+ };
582
+ payment: {
583
+ requirePayment: string[];
584
+ requireAuthentication: string[];
585
+ };
586
+ };
587
+ }>;
588
+ refreshMemberTokens(params: import("@memberstack/client/lib/types/params").RefreshMemberTokensParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
589
+ data: {
590
+ accessToken: string;
591
+ refreshToken: string;
592
+ expires: number;
593
+ type: "bearer";
594
+ };
595
+ }>;
596
+ sendMemberResetPasswordEmail(params: import("@memberstack/client/lib/types/params").SendMemberResetPasswordEmailParams): Promise<{
597
+ data: string;
598
+ }>;
599
+ resetMemberPassword(params: import("@memberstack/client/lib/types/params").ResetMemberPasswordParams): Promise<{
600
+ data: {
601
+ id: string;
602
+ auth: {
603
+ email: string;
604
+ };
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
+ logout(options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
629
+ data: {
630
+ redirect?: string;
631
+ };
632
+ }>;
633
+ replacePlan(params: import("@memberstack/client/lib/types/params").ReplacePlanParams, options?: import("@memberstack/client/lib/methods").MemberstackOptions): Promise<{
634
+ data: {
635
+ plan: string;
636
+ payment: {
637
+ requiresPayment: boolean;
638
+ requiresAuthentication: boolean;
639
+ };
640
+ };
641
+ }>;
30
642
  verifyToken({ token }: {
31
643
  token: string;
32
- }): Promise<Pick<import("jose/types").JWTPayload, "iat" | "exp"> & {
644
+ }): Promise<Pick<import("jose").JWTPayload, "iat" | "exp"> & {
33
645
  id: string;
34
646
  type: "member";
35
647
  }>;
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.initClient = void 0;
18
18
  var client_1 = __importDefault(require("@memberstack/client"));
19
19
  var cookies_1 = require("../utils/cookies");
20
- var initClient = function (props) {
21
- return client_1.default.init(__assign({ token: (0, cookies_1.getMemberCookie)() }, props));
20
+ exports.initClient = function (props) {
21
+ return client_1.default.init(__assign(__assign(__assign({}, (props.token && { token: props.token })), (props.useCookie && { token: cookies_1.getMemberCookie() })), props));
22
22
  };
23
- exports.initClient = initClient;