@stigg/react-sdk 7.7.1-beta.1 → 7.8.0-beta.1
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/dist/index.d.mts +829 -0
- package/dist/index.d.ts +829 -938
- package/dist/stigg-sdk.cjs.js +5915 -0
- package/dist/stigg-sdk.esm.js +5915 -0
- package/package.json +16 -18
- package/dist/react-sdk.cjs.js +0 -3506
- package/dist/react-sdk.esm.js +0 -13587
package/dist/index.d.ts
CHANGED
|
@@ -1,938 +1,829 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
}) =>
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
}) =>
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
}) =>
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
export declare type TaxDetailsInput = {
|
|
831
|
-
taxPercentage?: SubscriptionBillingInfo['taxPercentage'];
|
|
832
|
-
};
|
|
833
|
-
|
|
834
|
-
export declare type TextAlignment = 'left' | 'center' | 'right';
|
|
835
|
-
|
|
836
|
-
export declare type Theme = DeepPartial<StiggTheme>;
|
|
837
|
-
|
|
838
|
-
declare type TypedGetBooleanEntitlement<T> = Omit<GetBooleanEntitlement, 'featureId'> & {
|
|
839
|
-
featureId: T;
|
|
840
|
-
};
|
|
841
|
-
|
|
842
|
-
declare type TypedGetEnumEntitlement<T> = Omit<GetEnumEntitlement, 'featureId'> & {
|
|
843
|
-
featureId: T;
|
|
844
|
-
};
|
|
845
|
-
|
|
846
|
-
declare type TypedGetMeteredEntitlement<T> = Omit<GetMeteredEntitlement, 'featureId'> & {
|
|
847
|
-
featureId: T;
|
|
848
|
-
};
|
|
849
|
-
|
|
850
|
-
declare type TypedGetNumericEntitlement<T> = Omit<GetNumericEntitlement, 'featureId'> & {
|
|
851
|
-
featureId: T;
|
|
852
|
-
};
|
|
853
|
-
|
|
854
|
-
export declare function useActiveSubscriptions(params?: GetActiveSubscriptions): {
|
|
855
|
-
activeSubscriptions: Subscription[] | null;
|
|
856
|
-
isLoading: boolean;
|
|
857
|
-
error: Error | null;
|
|
858
|
-
};
|
|
859
|
-
|
|
860
|
-
export declare function useBooleanEntitlement<T extends string>(params: TypedGetBooleanEntitlement<T>): BooleanEntitlement;
|
|
861
|
-
|
|
862
|
-
export declare function useCreditBalance(params: GetCreditBalanceParams): {
|
|
863
|
-
balance: {
|
|
864
|
-
currentBalance: number;
|
|
865
|
-
totalConsumed: number;
|
|
866
|
-
totalGranted: number;
|
|
867
|
-
currencyId: string;
|
|
868
|
-
displayName: string;
|
|
869
|
-
units: {
|
|
870
|
-
__typename?: "Units" | undefined;
|
|
871
|
-
singular: string;
|
|
872
|
-
plural: string;
|
|
873
|
-
} | null | undefined;
|
|
874
|
-
symbol: string | null | undefined;
|
|
875
|
-
} | {
|
|
876
|
-
currencyId: string;
|
|
877
|
-
currentBalance: number;
|
|
878
|
-
totalConsumed: number;
|
|
879
|
-
totalGranted: number;
|
|
880
|
-
displayName?: undefined;
|
|
881
|
-
units?: undefined;
|
|
882
|
-
symbol?: undefined;
|
|
883
|
-
} | null;
|
|
884
|
-
isLoading: boolean;
|
|
885
|
-
error: Error | null;
|
|
886
|
-
};
|
|
887
|
-
|
|
888
|
-
export declare function useCreditGrants(params: GetCreditGrantsParams): {
|
|
889
|
-
creditGrants: CreditGrant[];
|
|
890
|
-
isLoading: boolean;
|
|
891
|
-
error: Error | null;
|
|
892
|
-
};
|
|
893
|
-
|
|
894
|
-
export declare function useCreditUsage(params: GetCreditUsageInput): {
|
|
895
|
-
creditUsage: CreditUsageFragment | null;
|
|
896
|
-
isLoading: boolean;
|
|
897
|
-
error: Error | null;
|
|
898
|
-
};
|
|
899
|
-
|
|
900
|
-
export declare function useCustomerPortal(params?: GetCustomerPortal): {
|
|
901
|
-
customerPortal: CustomerPortal_2 | null;
|
|
902
|
-
isLoading: boolean;
|
|
903
|
-
error: Error | null;
|
|
904
|
-
};
|
|
905
|
-
|
|
906
|
-
export declare function useEnumEntitlement<T extends string>(params: TypedGetEnumEntitlement<T>): EnumEntitlement;
|
|
907
|
-
|
|
908
|
-
export declare function useMeteredEntitlement<T extends string>(params: TypedGetMeteredEntitlement<T>): MeteredEntitlement;
|
|
909
|
-
|
|
910
|
-
export declare function useNumericEntitlement<T extends string>(params: TypedGetNumericEntitlement<T>): NumericEntitlement;
|
|
911
|
-
|
|
912
|
-
export declare function usePaywall(params?: GetPaywall): {
|
|
913
|
-
paywall: Paywall_2 | null;
|
|
914
|
-
isLoading: boolean;
|
|
915
|
-
error: Error | null;
|
|
916
|
-
};
|
|
917
|
-
|
|
918
|
-
export declare function useStiggContext(options?: {
|
|
919
|
-
optional?: false;
|
|
920
|
-
}): StiggContextValue;
|
|
921
|
-
|
|
922
|
-
export declare function useStiggContext(options: {
|
|
923
|
-
optional: true;
|
|
924
|
-
}): StiggContextValue | null;
|
|
925
|
-
|
|
926
|
-
export declare const useWaitForCheckoutCompleted: ({ onProvisionStart, onProvisionSucceeded, onProvisionFailed, }?: {
|
|
927
|
-
onProvisionStart?: (() => void) | undefined;
|
|
928
|
-
onProvisionSucceeded?: ((subscription?: Subscription | null) => void) | undefined;
|
|
929
|
-
onProvisionFailed?: ((err?: any) => void) | undefined;
|
|
930
|
-
}) => {
|
|
931
|
-
isAwaitingCheckout: boolean;
|
|
932
|
-
provisionStatus: ProvisionStatus;
|
|
933
|
-
};
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
export * from "@stigg/js-client-sdk";
|
|
937
|
-
|
|
938
|
-
export { }
|
|
1
|
+
import * as _stigg_js_client_sdk from '@stigg/js-client-sdk';
|
|
2
|
+
import { Plan, Customer, Subscription, BillingPeriod, BillableFeature, CustomerPortalSubscriptionScheduledUpdateDataFragment, PaywallCurrency, PaywallCalculatedPricePoint, PriceTierFragment, Price, CustomerPortalSubscription, CustomerPortalEntitlement, EntitlementsFallback, SubscriptionAddon, Addon, BillingAddress, SubscriptionBillingInfo, GetCheckoutState, GetCheckoutStateResults, ApplySubscription, ApplySubscriptionResults, CheckoutStatePlan, PreviewSubscription, SubscriptionPreviewV2, SubscriptionPreviewDiscount, SubscriptionPreviewTaxDetails, GetBooleanEntitlement, BooleanEntitlement, GetNumericEntitlement, NumericEntitlement, GetMeteredEntitlement, MeteredEntitlement, GetEnumEntitlement, EnumEntitlement, GetActiveSubscriptions, GetPaywall, GetCustomerPortal, CreditUsageTimeRange, GetCreditUsageInput, CursorPaging, CreditGrantFragment, PageInfoFragment } from '@stigg/js-client-sdk';
|
|
3
|
+
export * from '@stigg/js-client-sdk';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import { FeatureFragment, BillingPeriod as BillingPeriod$1, BillableFeatureInput } from '@stigg/api-client-js/src/generated/sdk';
|
|
6
|
+
import react, { PropsWithChildren, ReactNode } from 'react';
|
|
7
|
+
import { ChipProps } from '@mui/material';
|
|
8
|
+
|
|
9
|
+
type DeepPartial<T> = T extends object ? {
|
|
10
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
11
|
+
} : T;
|
|
12
|
+
|
|
13
|
+
type HorizontalAlignment = 'left' | 'center' | 'right';
|
|
14
|
+
type TextAlignment = 'left' | 'center' | 'right';
|
|
15
|
+
type FontVariant = {
|
|
16
|
+
fontSize: string;
|
|
17
|
+
fontWeight: 'bold' | 'normal';
|
|
18
|
+
semanticElement: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div';
|
|
19
|
+
};
|
|
20
|
+
type StatusChipVariant = 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
21
|
+
type StatusChipColors = {
|
|
22
|
+
background: string;
|
|
23
|
+
text: string;
|
|
24
|
+
border: string;
|
|
25
|
+
};
|
|
26
|
+
type StiggTheme = {
|
|
27
|
+
palette: {
|
|
28
|
+
primary: string;
|
|
29
|
+
primaryDark: string;
|
|
30
|
+
primaryLight: string;
|
|
31
|
+
backgroundPaper: string;
|
|
32
|
+
backgroundHighlight: string;
|
|
33
|
+
backgroundSection: string;
|
|
34
|
+
backgroundButton: string;
|
|
35
|
+
outlinedBorder: string;
|
|
36
|
+
outlinedRestingBorder: string;
|
|
37
|
+
outlinedHoverBackground: string;
|
|
38
|
+
switchBorder: string;
|
|
39
|
+
switchFill: string;
|
|
40
|
+
switchHandle: string;
|
|
41
|
+
warning: string;
|
|
42
|
+
error: string;
|
|
43
|
+
errorDark: string;
|
|
44
|
+
white: string;
|
|
45
|
+
success: string;
|
|
46
|
+
successDark: string;
|
|
47
|
+
text: {
|
|
48
|
+
primary: string;
|
|
49
|
+
secondary: string;
|
|
50
|
+
tertiary: string;
|
|
51
|
+
disabled: string;
|
|
52
|
+
};
|
|
53
|
+
statusChips: {
|
|
54
|
+
success: StatusChipColors;
|
|
55
|
+
warning: StatusChipColors;
|
|
56
|
+
error: StatusChipColors;
|
|
57
|
+
info: StatusChipColors;
|
|
58
|
+
neutral: StatusChipColors;
|
|
59
|
+
};
|
|
60
|
+
progress: {
|
|
61
|
+
background: string;
|
|
62
|
+
low: string;
|
|
63
|
+
medium: string;
|
|
64
|
+
high: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
layout: {
|
|
68
|
+
planMinWidth: string;
|
|
69
|
+
planMaxWidth: string;
|
|
70
|
+
planMargin: string;
|
|
71
|
+
planPadding: string;
|
|
72
|
+
ctaAlignment: HorizontalAlignment;
|
|
73
|
+
headerAlignment: HorizontalAlignment;
|
|
74
|
+
descriptionAlignment: TextAlignment;
|
|
75
|
+
descriptionMinHeight: string;
|
|
76
|
+
switchBottomSpacing: string;
|
|
77
|
+
};
|
|
78
|
+
shadows: {
|
|
79
|
+
light: string;
|
|
80
|
+
popover: string;
|
|
81
|
+
};
|
|
82
|
+
border: {
|
|
83
|
+
radius: string;
|
|
84
|
+
};
|
|
85
|
+
typography: {
|
|
86
|
+
fontFamily: string;
|
|
87
|
+
fontFamilyUrl?: string;
|
|
88
|
+
h1: FontVariant;
|
|
89
|
+
h2: FontVariant;
|
|
90
|
+
h3: FontVariant;
|
|
91
|
+
body: FontVariant;
|
|
92
|
+
caption: FontVariant;
|
|
93
|
+
};
|
|
94
|
+
customCss?: string;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
type CustomizedTheme = DeepPartial<StiggTheme>;
|
|
98
|
+
|
|
99
|
+
type PaywallData = {
|
|
100
|
+
plans: PaywallPlan[] | null;
|
|
101
|
+
customer: Customer | null;
|
|
102
|
+
currentSubscription: Subscription | null;
|
|
103
|
+
currentSubscriptionOverride?: CurrentSubscriptionOverride | null;
|
|
104
|
+
isCustomerOnTrial: boolean;
|
|
105
|
+
isLoading: boolean;
|
|
106
|
+
selectedBillingPeriod: BillingPeriod;
|
|
107
|
+
setSelectedBillingPeriod: (billingPeriod: BillingPeriod) => void;
|
|
108
|
+
availableBillingPeriods: BillingPeriod[];
|
|
109
|
+
locale: string;
|
|
110
|
+
configuration?: CustomizedTheme;
|
|
111
|
+
showWatermark: boolean;
|
|
112
|
+
};
|
|
113
|
+
type CurrentSubscriptionOverride = {
|
|
114
|
+
planId: string;
|
|
115
|
+
billableFeatures: BillableFeature[];
|
|
116
|
+
};
|
|
117
|
+
declare enum SubscribeIntentionType {
|
|
118
|
+
START_TRIAL = "START_TRIAL",
|
|
119
|
+
UPGRADE_TRIAL_TO_PAID = "UPGRADE_TRIAL_TO_PAID",
|
|
120
|
+
REQUEST_CUSTOM_PLAN_ACCESS = "REQUEST_CUSTOM_PLAN_ACCESS",
|
|
121
|
+
CHANGE_BILLING_PERIOD = "CHANGE_BILLING_PERIOD",
|
|
122
|
+
CHANGE_UNIT_QUANTITY = "CHANGE_UNIT_QUANTITY",
|
|
123
|
+
UPGRADE_PLAN = "UPGRADE_PLAN",
|
|
124
|
+
DOWNGRADE_PLAN = "DOWNGRADE_PLAN",
|
|
125
|
+
CANCEL_SCHEDULED_UPDATES = "CANCEL_SCHEDULED_UPDATES"
|
|
126
|
+
}
|
|
127
|
+
type PaywallPlan = Plan & {
|
|
128
|
+
isLowerThanCurrentPlan?: boolean;
|
|
129
|
+
isTriable: boolean;
|
|
130
|
+
isCurrentCustomerPlan: boolean;
|
|
131
|
+
currentCustomerPlanBillingPeriod?: BillingPeriod;
|
|
132
|
+
trialDaysLeft?: number;
|
|
133
|
+
isNextPlan?: (billingPeriod: BillingPeriod) => boolean;
|
|
134
|
+
scheduledUpdate?: CustomerPortalSubscriptionScheduledUpdateDataFragment;
|
|
135
|
+
paywallCurrency?: PaywallCurrency;
|
|
136
|
+
paywallCalculatedPricePoints?: PaywallCalculatedPricePoint[];
|
|
137
|
+
};
|
|
138
|
+
type OnPlanSelectedCallbackFn = ({ plan, customer, subscription, intentionType, selectedBillingPeriod, billableFeatures, }: {
|
|
139
|
+
plan: Plan;
|
|
140
|
+
customer: Customer | null;
|
|
141
|
+
subscription: Subscription | null;
|
|
142
|
+
intentionType: SubscribeIntentionType;
|
|
143
|
+
selectedBillingPeriod: BillingPeriod;
|
|
144
|
+
billableFeatures?: BillableFeature[];
|
|
145
|
+
}) => void | Promise<void>;
|
|
146
|
+
type ShouldHidePlanFn = ({ plan }: {
|
|
147
|
+
plan: PaywallPlan;
|
|
148
|
+
}) => boolean | Promise<boolean>;
|
|
149
|
+
type CurrentSubscriptionOverrideFn = ({ currentSubscription, }: {
|
|
150
|
+
currentSubscription: Subscription | null;
|
|
151
|
+
}) => CurrentSubscriptionOverride | null | undefined;
|
|
152
|
+
type SelectDefaultTierIndexFn = ({ plan }: {
|
|
153
|
+
plan: PaywallPlan;
|
|
154
|
+
}) => number;
|
|
155
|
+
|
|
156
|
+
type PlanPriceText = {
|
|
157
|
+
price: string;
|
|
158
|
+
unit?: string;
|
|
159
|
+
tiers?: PriceTierFragment[] | null | undefined;
|
|
160
|
+
tierUnits?: string;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
type CurrentPlanParams = {
|
|
164
|
+
plan: Plan;
|
|
165
|
+
selectedBillingPeriod: BillingPeriod;
|
|
166
|
+
};
|
|
167
|
+
type PaywallLocalization = {
|
|
168
|
+
highlightChip: string;
|
|
169
|
+
entitlementsTitle?: (plan: PaywallPlan) => string;
|
|
170
|
+
addonsTitle?: string;
|
|
171
|
+
planCTAButton: {
|
|
172
|
+
upgrade: string | ((plan: PaywallPlan) => string);
|
|
173
|
+
downgrade: string | ((plan: PaywallPlan) => string);
|
|
174
|
+
startTrial: (plan: PaywallPlan) => string;
|
|
175
|
+
custom: ((data: CurrentPlanParams) => string) | string;
|
|
176
|
+
currentPlan: string;
|
|
177
|
+
startNew: string;
|
|
178
|
+
switchToBillingPeriod: (billingPeriod: BillingPeriod) => string;
|
|
179
|
+
cancelScheduledUpdate: string;
|
|
180
|
+
};
|
|
181
|
+
price: {
|
|
182
|
+
startingAtCaption: string;
|
|
183
|
+
billingPeriod?: (billingPeriod: BillingPeriod) => string;
|
|
184
|
+
pricePeriod: (billingPeriod: BillingPeriod) => string;
|
|
185
|
+
custom: ((data: CurrentPlanParams) => string) | string;
|
|
186
|
+
priceNotSet: string;
|
|
187
|
+
free: PlanPriceText | ((currency?: PaywallCurrency) => PlanPriceText);
|
|
188
|
+
paid?: (priceData: {
|
|
189
|
+
planPrices: Price[];
|
|
190
|
+
paywallCalculatedPrice?: PaywallCalculatedPricePoint;
|
|
191
|
+
plan: Plan;
|
|
192
|
+
selectedBillingPeriod: BillingPeriod;
|
|
193
|
+
selectedTier?: PriceTierFragment;
|
|
194
|
+
}) => PlanPriceText;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
type PaywallContainerProps = {
|
|
199
|
+
productId?: string;
|
|
200
|
+
resourceId?: string;
|
|
201
|
+
highlightedPlanId?: string;
|
|
202
|
+
showOnlyEligiblePlans?: boolean;
|
|
203
|
+
onPlanSelected: OnPlanSelectedCallbackFn;
|
|
204
|
+
preferredBillingPeriod?: BillingPeriod;
|
|
205
|
+
onBillingPeriodChange?: (billingPeriod: BillingPeriod) => void;
|
|
206
|
+
textOverrides?: DeepPartial<PaywallLocalization>;
|
|
207
|
+
billingCountryCode?: string;
|
|
208
|
+
shouldHidePlan?: ShouldHidePlanFn;
|
|
209
|
+
selectDefaultTierIndex?: SelectDefaultTierIndexFn;
|
|
210
|
+
hideCompatibleAddons?: boolean;
|
|
211
|
+
currentSubscriptionOverride?: CurrentSubscriptionOverrideFn;
|
|
212
|
+
};
|
|
213
|
+
declare const PaywallContainer: ({ productId, resourceId, highlightedPlanId, showOnlyEligiblePlans, textOverrides, onPlanSelected, preferredBillingPeriod, onBillingPeriodChange, billingCountryCode, shouldHidePlan, selectDefaultTierIndex, currentSubscriptionOverride: currentSubscriptionOverrideFn, hideCompatibleAddons, }: PaywallContainerProps) => react_jsx_runtime.JSX.Element;
|
|
214
|
+
|
|
215
|
+
type CustomerPortalLocalization = {
|
|
216
|
+
manageSubscription: string;
|
|
217
|
+
usageTabTitle: string;
|
|
218
|
+
addonsTabTitle: string;
|
|
219
|
+
promotionsTabTitle: string;
|
|
220
|
+
promotionsSubtitle: string;
|
|
221
|
+
contactSupportTitle: string;
|
|
222
|
+
contactSupportLink: string;
|
|
223
|
+
editBilling: string;
|
|
224
|
+
invoicesTitle: string;
|
|
225
|
+
viewInvoiceHistory: string;
|
|
226
|
+
editPaymentDetails: string;
|
|
227
|
+
paywallSectionTitle: string;
|
|
228
|
+
cancelScheduledUpdatesButtonTitle: string;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
type CustomerPortalTheme = {
|
|
232
|
+
sectionTitleColor: string;
|
|
233
|
+
planNameColor: string;
|
|
234
|
+
backgroundColor: string;
|
|
235
|
+
borderColor: string;
|
|
236
|
+
listItemBackgroundColor: string;
|
|
237
|
+
tabMaxHeight: string;
|
|
238
|
+
iconsColor?: string;
|
|
239
|
+
iconsBackgroundColor?: string;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
type OnBuyMoreCallbackFn = (feature: FeatureFragment, entitlement: CustomerPortalEntitlement) => void;
|
|
243
|
+
type FilterEntitlementsFn = (entitlements: CustomerPortalEntitlement[]) => CustomerPortalEntitlement[];
|
|
244
|
+
declare enum CustomerPortalIntentionType {
|
|
245
|
+
MANAGE_SUBSCRIPTION = "MANAGE_SUBSCRIPTION",
|
|
246
|
+
UPGRADE_PLAN = "UPGRADE_PLAN",
|
|
247
|
+
UPGRADE_TRIAL_PLAN = "UPGRADE_TRIAL_PLAN"
|
|
248
|
+
}
|
|
249
|
+
type OnManageSubscriptionFn = ({ intentionType, customerSubscriptions, }: {
|
|
250
|
+
intentionType: CustomerPortalIntentionType;
|
|
251
|
+
customerSubscriptions: CustomerPortalSubscription[];
|
|
252
|
+
}) => Promise<void> | void;
|
|
253
|
+
|
|
254
|
+
type CustomerPortalSection = 'usage' | 'addons' | 'promotionalEntitlements' | 'billingInformation' | 'paymentDetails' | 'invoices';
|
|
255
|
+
type CustomerPortalProps = {
|
|
256
|
+
onManageSubscription?: OnManageSubscriptionFn;
|
|
257
|
+
onBuyMore?: OnBuyMoreCallbackFn;
|
|
258
|
+
onCancelScheduledUpdates?: (subscription: CustomerPortalSubscription) => Promise<void> | void;
|
|
259
|
+
onContactSupport?: () => Promise<void> | void;
|
|
260
|
+
paywallComponent?: React.ReactNode;
|
|
261
|
+
hiddenSections?: CustomerPortalSection[];
|
|
262
|
+
textOverrides?: DeepPartial<CustomerPortalLocalization>;
|
|
263
|
+
theme?: DeepPartial<CustomerPortalTheme>;
|
|
264
|
+
filterEntitlements?: FilterEntitlementsFn;
|
|
265
|
+
resourceId?: string;
|
|
266
|
+
productId?: string;
|
|
267
|
+
};
|
|
268
|
+
declare function CustomerPortal({ textOverrides, theme, resourceId, productId, ...restProps }: CustomerPortalProps): react_jsx_runtime.JSX.Element;
|
|
269
|
+
|
|
270
|
+
type OnManageClick = ({ intentionType }: {
|
|
271
|
+
intentionType: CustomerPortalIntentionType;
|
|
272
|
+
}) => void;
|
|
273
|
+
|
|
274
|
+
type SubscriptionsOverviewProps = {
|
|
275
|
+
onManageSubscription: OnManageClick;
|
|
276
|
+
onBuyMore?: OnBuyMoreCallbackFn;
|
|
277
|
+
onCancelScheduledUpdates?: (subscription: CustomerPortalSubscription) => void;
|
|
278
|
+
onContactSupport?: () => void;
|
|
279
|
+
hiddenSections?: CustomerPortalSection[];
|
|
280
|
+
cancelScheduledUpdatesButtonTitle: string;
|
|
281
|
+
};
|
|
282
|
+
declare function SubscriptionsOverview({ onManageSubscription, onBuyMore, onCancelScheduledUpdates, onContactSupport, hiddenSections, cancelScheduledUpdatesButtonTitle, }: SubscriptionsOverviewProps): react_jsx_runtime.JSX.Element;
|
|
283
|
+
|
|
284
|
+
declare function PaymentDetailsSection(): react_jsx_runtime.JSX.Element | null;
|
|
285
|
+
|
|
286
|
+
declare function InvoicesSection(): react_jsx_runtime.JSX.Element | null;
|
|
287
|
+
|
|
288
|
+
type CustomerUsageDataProps = {
|
|
289
|
+
onManageSubscription?: OnManageClick;
|
|
290
|
+
onBuyMore?: OnBuyMoreCallbackFn;
|
|
291
|
+
filterEntitlements?: FilterEntitlementsFn;
|
|
292
|
+
};
|
|
293
|
+
declare function CustomerUsageData({ onManageSubscription, onBuyMore, filterEntitlements }: CustomerUsageDataProps): react_jsx_runtime.JSX.Element | null;
|
|
294
|
+
|
|
295
|
+
declare function AddonsList(): react_jsx_runtime.JSX.Element | null;
|
|
296
|
+
|
|
297
|
+
declare function Promotions(): react_jsx_runtime.JSX.Element;
|
|
298
|
+
|
|
299
|
+
declare function CustomerPortalProvider({ children, textOverrides, theme, resourceId, productId, }: {
|
|
300
|
+
children: react.ReactNode;
|
|
301
|
+
textOverrides?: DeepPartial<CustomerPortalLocalization>;
|
|
302
|
+
theme?: DeepPartial<CustomerPortalTheme>;
|
|
303
|
+
resourceId?: string;
|
|
304
|
+
productId?: string;
|
|
305
|
+
}): react_jsx_runtime.JSX.Element;
|
|
306
|
+
|
|
307
|
+
interface StiggContextValue {
|
|
308
|
+
stigg: _stigg_js_client_sdk.StiggClient;
|
|
309
|
+
isInitialized: boolean;
|
|
310
|
+
locale: string;
|
|
311
|
+
updatedAt?: Date;
|
|
312
|
+
customerPortalUpdatedAt?: Date;
|
|
313
|
+
refreshData: () => Promise<void>;
|
|
314
|
+
theme?: CustomizedTheme;
|
|
315
|
+
}
|
|
316
|
+
declare const StiggContext: react.Context<StiggContextValue | null>;
|
|
317
|
+
type StiggProviderProps = {
|
|
318
|
+
apiKey: string;
|
|
319
|
+
baseUri?: string;
|
|
320
|
+
baseEdgeUri?: string;
|
|
321
|
+
enableEdge?: boolean;
|
|
322
|
+
entitlementsFallback?: EntitlementsFallback;
|
|
323
|
+
customerId?: string;
|
|
324
|
+
customerToken?: string;
|
|
325
|
+
resourceId?: string;
|
|
326
|
+
theme?: CustomizedTheme;
|
|
327
|
+
locale?: string;
|
|
328
|
+
offline?: boolean;
|
|
329
|
+
cacheTtlMs?: number;
|
|
330
|
+
/** @deprecated not longer in use */
|
|
331
|
+
useEntitlementPolling?: boolean;
|
|
332
|
+
/** @deprecated not longer in use */
|
|
333
|
+
entitlementPollingInterval?: number;
|
|
334
|
+
stiggClient?: _stigg_js_client_sdk.StiggClient;
|
|
335
|
+
clientName?: string;
|
|
336
|
+
clientVersion?: string;
|
|
337
|
+
};
|
|
338
|
+
declare const StiggProvider: react.FC<PropsWithChildren<StiggProviderProps>>;
|
|
339
|
+
|
|
340
|
+
type AddonsStepState = {
|
|
341
|
+
addons: SubscriptionAddon[];
|
|
342
|
+
initialAddons?: SubscriptionAddon[];
|
|
343
|
+
availableAddons?: Addon[];
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
type PaymentStepState = {
|
|
347
|
+
useNewPaymentMethod: boolean;
|
|
348
|
+
errorMessage?: string;
|
|
349
|
+
billingAddress?: BillingAddress;
|
|
350
|
+
taxPercentage?: number;
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
type PlanStepState = {
|
|
354
|
+
billingPeriod: BillingPeriod$1;
|
|
355
|
+
billableFeatures: BillableFeatureInput[];
|
|
356
|
+
billingCountryCode?: string;
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
declare enum CheckoutStepKey {
|
|
360
|
+
PLAN = "PLAN",
|
|
361
|
+
ADDONS = "ADDONS",
|
|
362
|
+
PAYMENT = "PAYMENT"
|
|
363
|
+
}
|
|
364
|
+
type CheckoutState = {
|
|
365
|
+
planStep: PlanStepState;
|
|
366
|
+
addonsStep: AddonsStepState;
|
|
367
|
+
paymentStep: PaymentStepState;
|
|
368
|
+
};
|
|
369
|
+
type BillingInformation = {
|
|
370
|
+
taxDetails?: TaxDetailsInput;
|
|
371
|
+
};
|
|
372
|
+
type TaxDetailsInput = {
|
|
373
|
+
taxPercentage?: SubscriptionBillingInfo['taxPercentage'];
|
|
374
|
+
};
|
|
375
|
+
type MockCheckoutPreviewCallback = (params: PreviewSubscription) => SubscriptionPreviewV2;
|
|
376
|
+
type MockCheckoutStateCallback = (params: GetCheckoutState) => GetCheckoutStateResults;
|
|
377
|
+
type CheckoutMockProps = {
|
|
378
|
+
onMockCheckoutPreview?: MockCheckoutPreviewCallback;
|
|
379
|
+
onMockCheckoutState?: MockCheckoutStateCallback;
|
|
380
|
+
};
|
|
381
|
+
type OnBeforeStepChangeCallback = (params: {
|
|
382
|
+
from: CheckoutStepKey;
|
|
383
|
+
to: CheckoutStepKey;
|
|
384
|
+
state: CheckoutState;
|
|
385
|
+
}) => Promise<boolean>;
|
|
386
|
+
type OnBillableFeatureChangeCallback = (params: {
|
|
387
|
+
feature: NonNullable<Price['feature']>;
|
|
388
|
+
quantity: number;
|
|
389
|
+
}) => Promise<{
|
|
390
|
+
errorMessage?: string;
|
|
391
|
+
disableNextStep?: boolean;
|
|
392
|
+
}>;
|
|
393
|
+
type OnAddonChangeCallback = (params: {
|
|
394
|
+
addon: Addon;
|
|
395
|
+
quantity: number;
|
|
396
|
+
}) => Promise<{
|
|
397
|
+
errorMessage?: string;
|
|
398
|
+
disableNextStep?: boolean;
|
|
399
|
+
}>;
|
|
400
|
+
type OnCheckoutCallback = (params: {
|
|
401
|
+
customerId: string;
|
|
402
|
+
checkoutParams: ApplySubscription;
|
|
403
|
+
checkoutAction: (params: ApplySubscription) => Promise<{
|
|
404
|
+
success: boolean;
|
|
405
|
+
errorMessage?: string;
|
|
406
|
+
results?: ApplySubscriptionResults;
|
|
407
|
+
}>;
|
|
408
|
+
}) => Promise<{
|
|
409
|
+
success: boolean;
|
|
410
|
+
errorMessage?: string;
|
|
411
|
+
results?: ApplySubscriptionResults;
|
|
412
|
+
}>;
|
|
413
|
+
type OnCheckoutCompletedCallback = (params: {
|
|
414
|
+
success: boolean;
|
|
415
|
+
error?: string;
|
|
416
|
+
}) => Promise<void>;
|
|
417
|
+
type OnChangePlanCallback = (params: {
|
|
418
|
+
currentPlan: CheckoutStatePlan | undefined;
|
|
419
|
+
}) => void;
|
|
420
|
+
type OnBillingAddressChangeCallback = (params: {
|
|
421
|
+
billingAddress: BillingAddress;
|
|
422
|
+
}) => Promise<void>;
|
|
423
|
+
type OnCheckoutParams = {
|
|
424
|
+
customerId: string;
|
|
425
|
+
checkoutParams: ApplySubscription;
|
|
426
|
+
checkoutAction: (params: ApplySubscription) => Promise<{
|
|
427
|
+
success: boolean;
|
|
428
|
+
errorMessage?: string;
|
|
429
|
+
results?: ApplySubscriptionResults;
|
|
430
|
+
}>;
|
|
431
|
+
};
|
|
432
|
+
type OnCheckoutCompletedParams = {
|
|
433
|
+
success: boolean;
|
|
434
|
+
error?: string;
|
|
435
|
+
};
|
|
436
|
+
type CheckoutResult = {
|
|
437
|
+
success: boolean;
|
|
438
|
+
errorMessage?: string;
|
|
439
|
+
results?: ApplySubscriptionResults;
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
type CheckoutSteps = 'PLAN' | 'ADDONS';
|
|
443
|
+
|
|
444
|
+
type CheckoutLocalization = {
|
|
445
|
+
changePlan: string;
|
|
446
|
+
billingPeriodsTitle: string;
|
|
447
|
+
addAddonText: string;
|
|
448
|
+
addonBillingPeriodNotAvailableText: (params: {
|
|
449
|
+
planBillingPeriod: BillingPeriod;
|
|
450
|
+
}) => string;
|
|
451
|
+
newPaymentMethodText: string;
|
|
452
|
+
newPaymentMethodCardTitle: string;
|
|
453
|
+
newPaymentMethodBillingAddressTitle: string;
|
|
454
|
+
summary: {
|
|
455
|
+
title: string;
|
|
456
|
+
planName: (params: {
|
|
457
|
+
plan: {
|
|
458
|
+
displayName: string;
|
|
459
|
+
};
|
|
460
|
+
}) => string;
|
|
461
|
+
addCouponCodeText: string;
|
|
462
|
+
couponCodeTitle: string;
|
|
463
|
+
addonsSectionTitle: string;
|
|
464
|
+
discountsSectionTitle: string;
|
|
465
|
+
onlyPayAsYouGoText: string;
|
|
466
|
+
startsAtText: string;
|
|
467
|
+
proratedTotalDueText: string;
|
|
468
|
+
baseChargeText: string | ((params: {
|
|
469
|
+
billingPeriod: BillingPeriod;
|
|
470
|
+
}) => string);
|
|
471
|
+
totalText: string;
|
|
472
|
+
totalDueText: string;
|
|
473
|
+
totalBillingPeriodText: (params: {
|
|
474
|
+
billingPeriod: BillingPeriod;
|
|
475
|
+
}) => string;
|
|
476
|
+
discountText: (params: {
|
|
477
|
+
discountDetails: SubscriptionPreviewDiscount;
|
|
478
|
+
currency: string;
|
|
479
|
+
}) => string;
|
|
480
|
+
appliedCreditsTitle: string;
|
|
481
|
+
taxTitle: (params: {
|
|
482
|
+
taxDetails: SubscriptionPreviewTaxDetails;
|
|
483
|
+
}) => string;
|
|
484
|
+
checkoutSuccessText: string;
|
|
485
|
+
payAsYouGoTooltipText: string;
|
|
486
|
+
changesWillApplyAtEndOfBillingPeriod: string | ((params: {
|
|
487
|
+
billingPeriodEnd: Date;
|
|
488
|
+
}) => string);
|
|
489
|
+
creditsForUnusedTimeText: (params: {
|
|
490
|
+
credits: string;
|
|
491
|
+
}) => string;
|
|
492
|
+
};
|
|
493
|
+
checkoutButton: {
|
|
494
|
+
nextText: string;
|
|
495
|
+
noChangesText: string;
|
|
496
|
+
updateText: string;
|
|
497
|
+
downgradeToFreeText: string;
|
|
498
|
+
upgradeText: string;
|
|
499
|
+
};
|
|
500
|
+
downgradeToFree: {
|
|
501
|
+
alertText: (params: {
|
|
502
|
+
plan: Plan;
|
|
503
|
+
}) => string;
|
|
504
|
+
freePlanHeader: (params: {
|
|
505
|
+
plan: Plan;
|
|
506
|
+
}) => string;
|
|
507
|
+
freePlanName: (params: {
|
|
508
|
+
plan: Plan;
|
|
509
|
+
}) => string;
|
|
510
|
+
freePlanPriceText: (params: {
|
|
511
|
+
plan: Plan;
|
|
512
|
+
}) => string;
|
|
513
|
+
paidPlanHeader: (params: {
|
|
514
|
+
plan: Plan;
|
|
515
|
+
}) => string;
|
|
516
|
+
paidPlanName: (params: {
|
|
517
|
+
plan: Plan;
|
|
518
|
+
}) => string;
|
|
519
|
+
paidPlanPriceText: (params: {
|
|
520
|
+
plan: Plan;
|
|
521
|
+
billingPeriod?: BillingPeriod;
|
|
522
|
+
}) => string;
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
type CheckoutTheme = {
|
|
527
|
+
primary: string;
|
|
528
|
+
textColor: string;
|
|
529
|
+
backgroundColor: string;
|
|
530
|
+
borderColor: string;
|
|
531
|
+
summaryBackgroundColor: string;
|
|
532
|
+
paymentInputBackgroundColor?: string;
|
|
533
|
+
paymentInputBorderColor?: string;
|
|
534
|
+
paymentInputBorderRadius?: string;
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
type CheckoutProviderProps = {
|
|
538
|
+
textOverrides?: DeepPartial<CheckoutLocalization>;
|
|
539
|
+
theme?: DeepPartial<CheckoutTheme>;
|
|
540
|
+
resourceId?: string;
|
|
541
|
+
planId: string;
|
|
542
|
+
preferredBillingPeriod?: BillingPeriod;
|
|
543
|
+
billingCountryCode?: string;
|
|
544
|
+
billableFeatures?: BillableFeature[];
|
|
545
|
+
billingInformation?: BillingInformation;
|
|
546
|
+
onMockCheckoutState?: MockCheckoutStateCallback;
|
|
547
|
+
skipCheckoutSteps?: CheckoutSteps[];
|
|
548
|
+
onBeforeStepChange?: OnBeforeStepChangeCallback;
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
type CheckoutContainerProps = {
|
|
552
|
+
onCheckout?: OnCheckoutCallback;
|
|
553
|
+
onCheckoutCompleted: OnCheckoutCompletedCallback;
|
|
554
|
+
onChangePlan?: OnChangePlanCallback;
|
|
555
|
+
onBillingAddressChange?: OnBillingAddressChangeCallback;
|
|
556
|
+
onBillableFeatureChange?: OnBillableFeatureChangeCallback;
|
|
557
|
+
onAddonChange?: OnAddonChangeCallback;
|
|
558
|
+
disablePromotionCode?: boolean;
|
|
559
|
+
disableSuccessAnimation?: boolean;
|
|
560
|
+
collectPhoneNumber?: boolean;
|
|
561
|
+
onMockCheckoutPreview?: MockCheckoutPreviewCallback;
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
type CheckoutProps = CheckoutProviderProps & CheckoutContainerProps & CheckoutMockProps;
|
|
565
|
+
declare const Checkout: ({ textOverrides, theme, resourceId, planId, preferredBillingPeriod, billingCountryCode, billableFeatures, billingInformation, onMockCheckoutState, skipCheckoutSteps, onBeforeStepChange, ...containerProps }: CheckoutProps) => react_jsx_runtime.JSX.Element;
|
|
566
|
+
|
|
567
|
+
declare enum ProvisionStatus {
|
|
568
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
569
|
+
SUCCEEDED = "SUCCEEDED",
|
|
570
|
+
FAILED = "FAILED"
|
|
571
|
+
}
|
|
572
|
+
declare const useWaitForCheckoutCompleted: ({ onProvisionStart, onProvisionSucceeded, onProvisionFailed, }?: {
|
|
573
|
+
onProvisionStart?: (() => void) | undefined;
|
|
574
|
+
onProvisionSucceeded?: ((subscription?: Subscription | null) => void) | undefined;
|
|
575
|
+
onProvisionFailed?: ((err?: any) => void) | undefined;
|
|
576
|
+
}) => {
|
|
577
|
+
isAwaitingCheckout: boolean;
|
|
578
|
+
provisionStatus: ProvisionStatus;
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
type TypedGetBooleanEntitlement<T> = Omit<GetBooleanEntitlement, 'featureId'> & {
|
|
582
|
+
featureId: T;
|
|
583
|
+
};
|
|
584
|
+
declare function useBooleanEntitlement<T extends string>(params: TypedGetBooleanEntitlement<T>): BooleanEntitlement;
|
|
585
|
+
|
|
586
|
+
type TypedGetNumericEntitlement<T> = Omit<GetNumericEntitlement, 'featureId'> & {
|
|
587
|
+
featureId: T;
|
|
588
|
+
};
|
|
589
|
+
declare function useNumericEntitlement<T extends string>(params: TypedGetNumericEntitlement<T>): NumericEntitlement;
|
|
590
|
+
|
|
591
|
+
type TypedGetMeteredEntitlement<T> = Omit<GetMeteredEntitlement, 'featureId'> & {
|
|
592
|
+
featureId: T;
|
|
593
|
+
};
|
|
594
|
+
declare function useMeteredEntitlement<T extends string>(params: TypedGetMeteredEntitlement<T>): MeteredEntitlement;
|
|
595
|
+
|
|
596
|
+
type TypedGetEnumEntitlement<T> = Omit<GetEnumEntitlement, 'featureId'> & {
|
|
597
|
+
featureId: T;
|
|
598
|
+
};
|
|
599
|
+
declare function useEnumEntitlement<T extends string>(params: TypedGetEnumEntitlement<T>): EnumEntitlement;
|
|
600
|
+
|
|
601
|
+
declare function useActiveSubscriptions(params?: GetActiveSubscriptions): {
|
|
602
|
+
activeSubscriptions: _stigg_js_client_sdk.Subscription[] | null;
|
|
603
|
+
isLoading: boolean;
|
|
604
|
+
error: Error | null;
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
declare function usePaywall(params?: GetPaywall): {
|
|
608
|
+
paywall: _stigg_js_client_sdk.Paywall | null;
|
|
609
|
+
isLoading: boolean;
|
|
610
|
+
error: Error | null;
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
declare function useCustomerPortal(params?: GetCustomerPortal): {
|
|
614
|
+
customerPortal: _stigg_js_client_sdk.CustomerPortal | null;
|
|
615
|
+
isLoading: boolean;
|
|
616
|
+
error: Error | null;
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
declare function useStiggContext(options?: {
|
|
620
|
+
optional?: false;
|
|
621
|
+
}): StiggContextValue;
|
|
622
|
+
declare function useStiggContext(options: {
|
|
623
|
+
optional: true;
|
|
624
|
+
}): StiggContextValue | null;
|
|
625
|
+
|
|
626
|
+
type BooleanEntitlementGuardProps = GetBooleanEntitlement & {
|
|
627
|
+
noAccessComponent?: React.ReactNode;
|
|
628
|
+
children: React.ReactElement;
|
|
629
|
+
};
|
|
630
|
+
declare function BooleanEntitlementGuard({ noAccessComponent, children, ...rest }: BooleanEntitlementGuardProps): JSX.Element;
|
|
631
|
+
|
|
632
|
+
type NumericEntitlementGuardProps = GetNumericEntitlement & {
|
|
633
|
+
noAccessComponent?: React.ReactNode;
|
|
634
|
+
children: React.ReactElement;
|
|
635
|
+
};
|
|
636
|
+
declare function NumericEntitlementGuard({ noAccessComponent, children, ...rest }: NumericEntitlementGuardProps): JSX.Element;
|
|
637
|
+
|
|
638
|
+
type MeteredEntitlementGuardProps = GetMeteredEntitlement & {
|
|
639
|
+
noAccessComponent?: React.ReactNode;
|
|
640
|
+
children: React.ReactElement;
|
|
641
|
+
};
|
|
642
|
+
declare function MeteredEntitlementGuard({ noAccessComponent, children, ...rest }: MeteredEntitlementGuardProps): JSX.Element;
|
|
643
|
+
|
|
644
|
+
type EnumEntitlementGuardProps = GetEnumEntitlement & {
|
|
645
|
+
noAccessComponent?: React.ReactNode;
|
|
646
|
+
children: React.ReactElement;
|
|
647
|
+
};
|
|
648
|
+
declare function EnumEntitlementGuard({ noAccessComponent, children, ...rest }: EnumEntitlementGuardProps): JSX.Element;
|
|
649
|
+
|
|
650
|
+
interface GetCreditBalanceParams {
|
|
651
|
+
currencyId: string;
|
|
652
|
+
}
|
|
653
|
+
declare function useCreditBalance(params: GetCreditBalanceParams): {
|
|
654
|
+
balance: {
|
|
655
|
+
currentBalance: number;
|
|
656
|
+
totalConsumed: number;
|
|
657
|
+
totalGranted: number;
|
|
658
|
+
currencyId: string;
|
|
659
|
+
displayName: string;
|
|
660
|
+
units: {
|
|
661
|
+
__typename?: "Units" | undefined;
|
|
662
|
+
singular: string;
|
|
663
|
+
plural: string;
|
|
664
|
+
} | null | undefined;
|
|
665
|
+
symbol: string | null | undefined;
|
|
666
|
+
} | {
|
|
667
|
+
currencyId: string;
|
|
668
|
+
currentBalance: number;
|
|
669
|
+
totalConsumed: number;
|
|
670
|
+
totalGranted: number;
|
|
671
|
+
displayName?: undefined;
|
|
672
|
+
units?: undefined;
|
|
673
|
+
symbol?: undefined;
|
|
674
|
+
} | null;
|
|
675
|
+
isLoading: boolean;
|
|
676
|
+
error: Error | null;
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
type CreditBalanceProps = GetCreditBalanceParams & {
|
|
680
|
+
localization?: CreditBalanceLocalization;
|
|
681
|
+
decimalPlaces?: number | null;
|
|
682
|
+
showUnits?: boolean;
|
|
683
|
+
showSymbol?: boolean;
|
|
684
|
+
};
|
|
685
|
+
type CreditBalanceLocalization = {
|
|
686
|
+
title: string;
|
|
687
|
+
};
|
|
688
|
+
declare function CreditBalance({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditBalanceProps): react_jsx_runtime.JSX.Element;
|
|
689
|
+
|
|
690
|
+
type CreditUsageChartLocalization = {
|
|
691
|
+
title: string;
|
|
692
|
+
totalSpend: string;
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
type CreditUsageChartProps = {
|
|
696
|
+
currencyId: string;
|
|
697
|
+
timeRange: CreditUsageTimeRange;
|
|
698
|
+
localization?: Partial<CreditUsageChartLocalization>;
|
|
699
|
+
};
|
|
700
|
+
declare function CreditUsageChart({ currencyId, timeRange, localization: customLocalization }: CreditUsageChartProps): react_jsx_runtime.JSX.Element;
|
|
701
|
+
|
|
702
|
+
declare function useCreditUsage(params: GetCreditUsageInput): {
|
|
703
|
+
creditUsage: _stigg_js_client_sdk.CreditUsageFragment | null;
|
|
704
|
+
isLoading: boolean;
|
|
705
|
+
error: Error | null;
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
type CreditUtilizationProps = GetCreditBalanceParams & {
|
|
709
|
+
localization?: CreditUtilizationLocalization;
|
|
710
|
+
decimalPlaces?: number | null;
|
|
711
|
+
showUnits?: boolean;
|
|
712
|
+
showSymbol?: boolean;
|
|
713
|
+
};
|
|
714
|
+
type CreditUtilizationLocalization = {
|
|
715
|
+
title: string;
|
|
716
|
+
remaining: string;
|
|
717
|
+
};
|
|
718
|
+
declare function CreditUtilization({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditUtilizationProps): react_jsx_runtime.JSX.Element;
|
|
719
|
+
|
|
720
|
+
type CreditGrant = Pick<CreditGrantFragment, 'grantId' | 'amount' | 'comment' | 'currencyId' | 'effectiveAt' | 'expireAt' | 'grantType' | 'consumedAmount' | 'createdAt' | 'updatedAt'>;
|
|
721
|
+
declare enum CreditGrantStatus {
|
|
722
|
+
SCHEDULED = "SCHEDULED",
|
|
723
|
+
AVAILABLE = "AVAILABLE",
|
|
724
|
+
EXPIRED = "EXPIRED"
|
|
725
|
+
}
|
|
726
|
+
interface GetCreditGrantsParams {
|
|
727
|
+
currencyId?: string;
|
|
728
|
+
pageSize?: number;
|
|
729
|
+
paging?: CursorPaging;
|
|
730
|
+
}
|
|
731
|
+
type CreditGrantsLocalization = {
|
|
732
|
+
receivedAt: string;
|
|
733
|
+
effectiveAt: string;
|
|
734
|
+
grantType: string;
|
|
735
|
+
status: string;
|
|
736
|
+
balance: string;
|
|
737
|
+
expiryDate: string;
|
|
738
|
+
emptyState: string;
|
|
739
|
+
loadingState: string;
|
|
740
|
+
errorState: string;
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
type CreditGrantsProps = GetCreditGrantsParams & {
|
|
744
|
+
localization?: Partial<CreditGrantsLocalization>;
|
|
745
|
+
decimalPlaces?: number | null;
|
|
746
|
+
};
|
|
747
|
+
declare function CreditGrants({ currencyId, localization: customLocalization, decimalPlaces, pageSize, }: CreditGrantsProps): react_jsx_runtime.JSX.Element;
|
|
748
|
+
|
|
749
|
+
declare function useCreditGrants(params: GetCreditGrantsParams): {
|
|
750
|
+
creditGrants: CreditGrant[];
|
|
751
|
+
isLoading: boolean;
|
|
752
|
+
error: Error | null;
|
|
753
|
+
paging?: PageInfoFragment | null;
|
|
754
|
+
totalCount?: number;
|
|
755
|
+
};
|
|
756
|
+
|
|
757
|
+
type TableAlignment = 'left' | 'center' | 'right';
|
|
758
|
+
type PixelWidth = `${number}px`;
|
|
759
|
+
interface HeadCell<T> {
|
|
760
|
+
id: string;
|
|
761
|
+
alignment?: TableAlignment;
|
|
762
|
+
label: string;
|
|
763
|
+
width?: PixelWidth;
|
|
764
|
+
maxWidth?: PixelWidth;
|
|
765
|
+
minWidth?: PixelWidth;
|
|
766
|
+
disableClick?: boolean;
|
|
767
|
+
visible?: boolean;
|
|
768
|
+
render: (item: T) => ReactNode;
|
|
769
|
+
}
|
|
770
|
+
interface GenericTableProps<T> {
|
|
771
|
+
data: T[];
|
|
772
|
+
headCells: Array<HeadCell<T>>;
|
|
773
|
+
isLoading?: boolean;
|
|
774
|
+
error?: Error | null;
|
|
775
|
+
emptyMessage?: ReactNode;
|
|
776
|
+
loadingMessage?: string;
|
|
777
|
+
errorMessage?: ReactNode;
|
|
778
|
+
onRowClick?: (item: T) => void;
|
|
779
|
+
className?: string;
|
|
780
|
+
skeletonRows?: number;
|
|
781
|
+
hideLastRowBorder?: boolean;
|
|
782
|
+
pageSize?: number;
|
|
783
|
+
pageNum?: number;
|
|
784
|
+
totalCount?: number;
|
|
785
|
+
onPageChange?: (event: any, nextPage: number) => void;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
declare function GenericTable<T>({ data, headCells, isLoading, error, emptyMessage, errorMessage, onRowClick, className, skeletonRows, hideLastRowBorder, pageSize, pageNum, totalCount, onPageChange, }: GenericTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
789
|
+
|
|
790
|
+
interface ErrorStateProps {
|
|
791
|
+
errorMessage?: ReactNode;
|
|
792
|
+
className?: string;
|
|
793
|
+
}
|
|
794
|
+
declare function ErrorState({ errorMessage, className }: ErrorStateProps): react_jsx_runtime.JSX.Element;
|
|
795
|
+
|
|
796
|
+
interface EmptyStateProps {
|
|
797
|
+
message?: ReactNode;
|
|
798
|
+
className?: string;
|
|
799
|
+
}
|
|
800
|
+
declare function EmptyState({ message, className }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* Formats a date with time in the format "MMM D, YYYY h:mmA"
|
|
804
|
+
* Example: "Aug 2, 2025 3:45PM"
|
|
805
|
+
*/
|
|
806
|
+
declare function formatDateTime(date: any): string;
|
|
807
|
+
/**
|
|
808
|
+
* Formats a date without time in the format "MMM D, YYYY"
|
|
809
|
+
* Example: "Aug 2, 2025"
|
|
810
|
+
*/
|
|
811
|
+
declare function formatDateOnly(date: any): string;
|
|
812
|
+
|
|
813
|
+
interface StatusChipProps extends Omit<ChipProps, 'variant' | 'color'> {
|
|
814
|
+
variant: StatusChipVariant;
|
|
815
|
+
label: string;
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* StatusChip component for displaying status indicators with consistent theming
|
|
819
|
+
*
|
|
820
|
+
* @param variant - The status variant (success, warning, error, info, neutral)
|
|
821
|
+
* @param label - The text to display in the chip
|
|
822
|
+
* @param className - Optional CSS class name
|
|
823
|
+
* @param size - Size of the chip (defaults to 'small')
|
|
824
|
+
*/
|
|
825
|
+
declare function StatusChip({ variant, label, className, size, ...props }: StatusChipProps): react_jsx_runtime.JSX.Element;
|
|
826
|
+
|
|
827
|
+
declare const mapCreditGrantStatusToVariant: (status: CreditGrantStatus) => StatusChipVariant;
|
|
828
|
+
|
|
829
|
+
export { AddonsList, type BillingInformation, BooleanEntitlementGuard, Checkout, type CheckoutContainerProps, type CheckoutLocalization, type CheckoutMockProps, type CheckoutProps, type CheckoutProviderProps, type CheckoutResult, type CheckoutState, CheckoutStepKey, type CheckoutTheme, CreditBalance, type CreditBalanceProps, CreditGrants, type CreditGrantsLocalization, type CreditGrantsProps, CreditUsageChart, CreditUtilization, type CreditUtilizationLocalization, type CreditUtilizationProps, type CurrentPlanParams, type CurrentSubscriptionOverride, type CurrentSubscriptionOverrideFn, CustomerPortal, CustomerPortalIntentionType, type CustomerPortalLocalization, type CustomerPortalProps, CustomerPortalProvider, type CustomerPortalSection, type CustomerPortalTheme, CustomerUsageData, type CustomerUsageDataProps, EmptyState, EnumEntitlementGuard, ErrorState, type FontVariant, GenericTable, type GenericTableProps, type GetCreditBalanceParams, type GetCreditGrantsParams, type HeadCell, type HorizontalAlignment, InvoicesSection, MeteredEntitlementGuard, type MockCheckoutPreviewCallback, type MockCheckoutStateCallback, NumericEntitlementGuard, type OnAddonChangeCallback, type OnBeforeStepChangeCallback, type OnBillableFeatureChangeCallback, type OnBuyMoreCallbackFn, type OnCheckoutCompletedParams, type OnCheckoutParams, type OnManageSubscriptionFn, type OnPlanSelectedCallbackFn, PaymentDetailsSection, PaywallContainer as Paywall, type PaywallData, type PaywallLocalization, type PaywallPlan, type PaywallContainerProps as PaywallProps, type PixelWidth, type PlanPriceText, Promotions, ProvisionStatus, type SelectDefaultTierIndexFn, type ShouldHidePlanFn, StatusChip, type StatusChipColors, type StatusChipVariant, StiggContext, type StiggContextValue, StiggProvider, type StiggProviderProps, type StiggTheme, SubscribeIntentionType, SubscriptionsOverview, type SubscriptionsOverviewProps, type TableAlignment, type TaxDetailsInput, type TextAlignment, type CustomizedTheme as Theme, formatDateOnly, formatDateTime, mapCreditGrantStatusToVariant, useActiveSubscriptions, useBooleanEntitlement, useCreditBalance, useCreditGrants, useCreditUsage, useCustomerPortal, useEnumEntitlement, useMeteredEntitlement, useNumericEntitlement, usePaywall, useStiggContext, useWaitForCheckoutCompleted };
|