@bpinternal/const 0.34.0 → 0.36.0

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,3 +1,4 @@
1
+ export type V5BillingPlanId = keyof typeof v5Plans;
1
2
  export declare const v5Plans: {
2
3
  readonly community: {
3
4
  readonly id: "community";
@@ -24,6 +25,14 @@ export declare const v5Plans: {
24
25
  readonly saved_versions: 3;
25
26
  readonly indexed_file_count: 1000;
26
27
  };
28
+ readonly autoRechargeSettings: {
29
+ conversation_sessions: {
30
+ enabled: false;
31
+ };
32
+ ai_spend: {
33
+ enabled: false;
34
+ };
35
+ };
27
36
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
28
37
  };
29
38
  readonly plus: {
@@ -57,6 +66,26 @@ export declare const v5Plans: {
57
66
  readonly saved_versions: 50;
58
67
  readonly indexed_file_count: 2000;
59
68
  };
69
+ readonly autoRechargeSettings: {
70
+ conversation_sessions: {
71
+ enabled: true;
72
+ addonId: string;
73
+ targetType: "addon";
74
+ thresholdType: "percentage";
75
+ threshold: number;
76
+ chunkSize: null;
77
+ maxAmount: null;
78
+ };
79
+ ai_spend: {
80
+ enabled: true;
81
+ addonId: string;
82
+ targetType: "credit_grant";
83
+ thresholdType: "remaining_amount";
84
+ threshold: number;
85
+ chunkSize: number;
86
+ maxAmount: null;
87
+ };
88
+ };
60
89
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
61
90
  };
62
91
  readonly team: {
@@ -90,6 +119,26 @@ export declare const v5Plans: {
90
119
  readonly ai_spend: number;
91
120
  readonly conversation_sessions: 1500;
92
121
  };
122
+ readonly autoRechargeSettings: {
123
+ conversation_sessions: {
124
+ enabled: true;
125
+ addonId: string;
126
+ targetType: "addon";
127
+ thresholdType: "percentage";
128
+ threshold: number;
129
+ chunkSize: null;
130
+ maxAmount: null;
131
+ };
132
+ ai_spend: {
133
+ enabled: true;
134
+ addonId: string;
135
+ targetType: "credit_grant";
136
+ thresholdType: "remaining_amount";
137
+ threshold: number;
138
+ chunkSize: number;
139
+ maxAmount: null;
140
+ };
141
+ };
93
142
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
94
143
  };
95
144
  readonly enterprise: {
@@ -117,6 +166,14 @@ export declare const v5Plans: {
117
166
  ai_spend: number;
118
167
  conversation_sessions: number;
119
168
  };
169
+ readonly autoRechargeSettings: {
170
+ conversation_sessions: {
171
+ enabled: false;
172
+ };
173
+ ai_spend: {
174
+ enabled: false;
175
+ };
176
+ };
120
177
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
121
178
  };
122
179
  readonly managed: {
@@ -144,6 +201,14 @@ export declare const v5Plans: {
144
201
  ai_spend: number;
145
202
  conversation_sessions: number;
146
203
  };
204
+ readonly autoRechargeSettings: {
205
+ conversation_sessions: {
206
+ enabled: false;
207
+ };
208
+ ai_spend: {
209
+ enabled: false;
210
+ };
211
+ };
147
212
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
148
213
  };
149
214
  };
@@ -63,6 +63,7 @@ exports.v5Plans = {
63
63
  indexed_file_count: 1_000,
64
64
  ...(0, utils_1.entitlementsForConversations)(25),
65
65
  },
66
+ autoRechargeSettings: (0, utils_1.disabledAutoRechargeDefaults)(),
66
67
  providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
67
68
  },
68
69
  plus: {
@@ -94,6 +95,10 @@ exports.v5Plans = {
94
95
  indexed_file_count: 2_000,
95
96
  ...(0, utils_1.entitlementsForConversations)(50),
96
97
  },
98
+ autoRechargeSettings: (0, utils_1.withAutoRechargeOverride)((0, utils_1.enabledAutoRechargeDefaults)(), 'ai_spend', {
99
+ threshold: 100 * consts_1.NANO_DOLLAR_PER_CENT,
100
+ chunkSize: 500 * consts_1.NANO_DOLLAR_PER_CENT,
101
+ }),
97
102
  providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
98
103
  },
99
104
  };
@@ -1,4 +1,11 @@
1
+ /**
2
+ * Billing versions for v4 billing system
3
+ * Each version represents a complete billing configuration
4
+ */
5
+ import * as v4 from './v4';
6
+ import * as v5 from './v5';
1
7
  export type BillingVersionId = keyof typeof billingConfig;
8
+ export type BillingPlanId = v4.V4BillingPlanId | v5.V5BillingPlanId;
2
9
  export declare const billingConfig: {
3
10
  readonly v4: {
4
11
  readonly version: "v4";
@@ -30,6 +37,14 @@ export declare const billingConfig: {
30
37
  readonly ai_spend: number;
31
38
  readonly conversation_sessions: 100;
32
39
  };
40
+ readonly autoRechargeSettings: {
41
+ conversation_sessions: {
42
+ enabled: false;
43
+ };
44
+ ai_spend: {
45
+ enabled: false;
46
+ };
47
+ };
33
48
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
34
49
  };
35
50
  readonly plus: {
@@ -63,6 +78,26 @@ export declare const billingConfig: {
63
78
  readonly ai_spend: number;
64
79
  readonly conversation_sessions: 250;
65
80
  };
81
+ readonly autoRechargeSettings: {
82
+ conversation_sessions: {
83
+ enabled: true;
84
+ addonId: string;
85
+ targetType: "addon";
86
+ thresholdType: "percentage";
87
+ threshold: number;
88
+ chunkSize: null;
89
+ maxAmount: null;
90
+ };
91
+ ai_spend: {
92
+ enabled: true;
93
+ addonId: string;
94
+ targetType: "credit_grant";
95
+ thresholdType: "remaining_amount";
96
+ threshold: number;
97
+ chunkSize: number;
98
+ maxAmount: null;
99
+ };
100
+ };
66
101
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
67
102
  };
68
103
  readonly team: {
@@ -96,6 +131,26 @@ export declare const billingConfig: {
96
131
  readonly ai_spend: number;
97
132
  readonly conversation_sessions: 1500;
98
133
  };
134
+ readonly autoRechargeSettings: {
135
+ conversation_sessions: {
136
+ enabled: true;
137
+ addonId: string;
138
+ targetType: "addon";
139
+ thresholdType: "percentage";
140
+ threshold: number;
141
+ chunkSize: null;
142
+ maxAmount: null;
143
+ };
144
+ ai_spend: {
145
+ enabled: true;
146
+ addonId: string;
147
+ targetType: "credit_grant";
148
+ thresholdType: "remaining_amount";
149
+ threshold: number;
150
+ chunkSize: number;
151
+ maxAmount: null;
152
+ };
153
+ };
99
154
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
100
155
  };
101
156
  readonly enterprise: {
@@ -123,6 +178,14 @@ export declare const billingConfig: {
123
178
  ai_spend: number;
124
179
  conversation_sessions: number;
125
180
  };
181
+ readonly autoRechargeSettings: {
182
+ conversation_sessions: {
183
+ enabled: false;
184
+ };
185
+ ai_spend: {
186
+ enabled: false;
187
+ };
188
+ };
126
189
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
127
190
  };
128
191
  readonly managed: {
@@ -150,6 +213,14 @@ export declare const billingConfig: {
150
213
  ai_spend: number;
151
214
  conversation_sessions: number;
152
215
  };
216
+ readonly autoRechargeSettings: {
217
+ conversation_sessions: {
218
+ enabled: false;
219
+ };
220
+ ai_spend: {
221
+ enabled: false;
222
+ };
223
+ };
153
224
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
154
225
  };
155
226
  };
@@ -259,6 +330,14 @@ export declare const billingConfig: {
259
330
  readonly saved_versions: 3;
260
331
  readonly indexed_file_count: 1000;
261
332
  };
333
+ readonly autoRechargeSettings: {
334
+ conversation_sessions: {
335
+ enabled: false;
336
+ };
337
+ ai_spend: {
338
+ enabled: false;
339
+ };
340
+ };
262
341
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
263
342
  };
264
343
  readonly plus: {
@@ -292,6 +371,26 @@ export declare const billingConfig: {
292
371
  readonly saved_versions: 50;
293
372
  readonly indexed_file_count: 2000;
294
373
  };
374
+ readonly autoRechargeSettings: {
375
+ conversation_sessions: {
376
+ enabled: true;
377
+ addonId: string;
378
+ targetType: "addon";
379
+ thresholdType: "percentage";
380
+ threshold: number;
381
+ chunkSize: null;
382
+ maxAmount: null;
383
+ };
384
+ ai_spend: {
385
+ enabled: true;
386
+ addonId: string;
387
+ targetType: "credit_grant";
388
+ thresholdType: "remaining_amount";
389
+ threshold: number;
390
+ chunkSize: number;
391
+ maxAmount: null;
392
+ };
393
+ };
295
394
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
296
395
  };
297
396
  readonly team: {
@@ -325,6 +424,26 @@ export declare const billingConfig: {
325
424
  readonly ai_spend: number;
326
425
  readonly conversation_sessions: 1500;
327
426
  };
427
+ readonly autoRechargeSettings: {
428
+ conversation_sessions: {
429
+ enabled: true;
430
+ addonId: string;
431
+ targetType: "addon";
432
+ thresholdType: "percentage";
433
+ threshold: number;
434
+ chunkSize: null;
435
+ maxAmount: null;
436
+ };
437
+ ai_spend: {
438
+ enabled: true;
439
+ addonId: string;
440
+ targetType: "credit_grant";
441
+ thresholdType: "remaining_amount";
442
+ threshold: number;
443
+ chunkSize: number;
444
+ maxAmount: null;
445
+ };
446
+ };
328
447
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
329
448
  };
330
449
  readonly enterprise: {
@@ -352,6 +471,14 @@ export declare const billingConfig: {
352
471
  ai_spend: number;
353
472
  conversation_sessions: number;
354
473
  };
474
+ readonly autoRechargeSettings: {
475
+ conversation_sessions: {
476
+ enabled: false;
477
+ };
478
+ ai_spend: {
479
+ enabled: false;
480
+ };
481
+ };
355
482
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
356
483
  };
357
484
  readonly managed: {
@@ -379,6 +506,14 @@ export declare const billingConfig: {
379
506
  ai_spend: number;
380
507
  conversation_sessions: number;
381
508
  };
509
+ readonly autoRechargeSettings: {
510
+ conversation_sessions: {
511
+ enabled: false;
512
+ };
513
+ ai_spend: {
514
+ enabled: false;
515
+ };
516
+ };
382
517
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
383
518
  };
384
519
  };
@@ -494,6 +629,14 @@ export declare const billingDefinitions: {
494
629
  readonly ai_spend: number;
495
630
  readonly conversation_sessions: 100;
496
631
  };
632
+ readonly autoRechargeSettings: {
633
+ conversation_sessions: {
634
+ enabled: false;
635
+ };
636
+ ai_spend: {
637
+ enabled: false;
638
+ };
639
+ };
497
640
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
498
641
  };
499
642
  readonly plus: {
@@ -527,6 +670,26 @@ export declare const billingDefinitions: {
527
670
  readonly ai_spend: number;
528
671
  readonly conversation_sessions: 250;
529
672
  };
673
+ readonly autoRechargeSettings: {
674
+ conversation_sessions: {
675
+ enabled: true;
676
+ addonId: string;
677
+ targetType: "addon";
678
+ thresholdType: "percentage";
679
+ threshold: number;
680
+ chunkSize: null;
681
+ maxAmount: null;
682
+ };
683
+ ai_spend: {
684
+ enabled: true;
685
+ addonId: string;
686
+ targetType: "credit_grant";
687
+ thresholdType: "remaining_amount";
688
+ threshold: number;
689
+ chunkSize: number;
690
+ maxAmount: null;
691
+ };
692
+ };
530
693
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
531
694
  };
532
695
  readonly team: {
@@ -560,6 +723,26 @@ export declare const billingDefinitions: {
560
723
  readonly ai_spend: number;
561
724
  readonly conversation_sessions: 1500;
562
725
  };
726
+ readonly autoRechargeSettings: {
727
+ conversation_sessions: {
728
+ enabled: true;
729
+ addonId: string;
730
+ targetType: "addon";
731
+ thresholdType: "percentage";
732
+ threshold: number;
733
+ chunkSize: null;
734
+ maxAmount: null;
735
+ };
736
+ ai_spend: {
737
+ enabled: true;
738
+ addonId: string;
739
+ targetType: "credit_grant";
740
+ thresholdType: "remaining_amount";
741
+ threshold: number;
742
+ chunkSize: number;
743
+ maxAmount: null;
744
+ };
745
+ };
563
746
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
564
747
  };
565
748
  readonly enterprise: {
@@ -587,6 +770,14 @@ export declare const billingDefinitions: {
587
770
  ai_spend: number;
588
771
  conversation_sessions: number;
589
772
  };
773
+ readonly autoRechargeSettings: {
774
+ conversation_sessions: {
775
+ enabled: false;
776
+ };
777
+ ai_spend: {
778
+ enabled: false;
779
+ };
780
+ };
590
781
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
591
782
  };
592
783
  readonly managed: {
@@ -614,6 +805,14 @@ export declare const billingDefinitions: {
614
805
  ai_spend: number;
615
806
  conversation_sessions: number;
616
807
  };
808
+ readonly autoRechargeSettings: {
809
+ conversation_sessions: {
810
+ enabled: false;
811
+ };
812
+ ai_spend: {
813
+ enabled: false;
814
+ };
815
+ };
617
816
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
618
817
  };
619
818
  };
@@ -723,6 +922,14 @@ export declare const billingDefinitions: {
723
922
  readonly saved_versions: 3;
724
923
  readonly indexed_file_count: 1000;
725
924
  };
925
+ readonly autoRechargeSettings: {
926
+ conversation_sessions: {
927
+ enabled: false;
928
+ };
929
+ ai_spend: {
930
+ enabled: false;
931
+ };
932
+ };
726
933
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
727
934
  };
728
935
  readonly plus: {
@@ -756,6 +963,26 @@ export declare const billingDefinitions: {
756
963
  readonly saved_versions: 50;
757
964
  readonly indexed_file_count: 2000;
758
965
  };
966
+ readonly autoRechargeSettings: {
967
+ conversation_sessions: {
968
+ enabled: true;
969
+ addonId: string;
970
+ targetType: "addon";
971
+ thresholdType: "percentage";
972
+ threshold: number;
973
+ chunkSize: null;
974
+ maxAmount: null;
975
+ };
976
+ ai_spend: {
977
+ enabled: true;
978
+ addonId: string;
979
+ targetType: "credit_grant";
980
+ thresholdType: "remaining_amount";
981
+ threshold: number;
982
+ chunkSize: number;
983
+ maxAmount: null;
984
+ };
985
+ };
759
986
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
760
987
  };
761
988
  readonly team: {
@@ -789,6 +1016,26 @@ export declare const billingDefinitions: {
789
1016
  readonly ai_spend: number;
790
1017
  readonly conversation_sessions: 1500;
791
1018
  };
1019
+ readonly autoRechargeSettings: {
1020
+ conversation_sessions: {
1021
+ enabled: true;
1022
+ addonId: string;
1023
+ targetType: "addon";
1024
+ thresholdType: "percentage";
1025
+ threshold: number;
1026
+ chunkSize: null;
1027
+ maxAmount: null;
1028
+ };
1029
+ ai_spend: {
1030
+ enabled: true;
1031
+ addonId: string;
1032
+ targetType: "credit_grant";
1033
+ thresholdType: "remaining_amount";
1034
+ threshold: number;
1035
+ chunkSize: number;
1036
+ maxAmount: null;
1037
+ };
1038
+ };
792
1039
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
793
1040
  };
794
1041
  readonly enterprise: {
@@ -816,6 +1063,14 @@ export declare const billingDefinitions: {
816
1063
  ai_spend: number;
817
1064
  conversation_sessions: number;
818
1065
  };
1066
+ readonly autoRechargeSettings: {
1067
+ conversation_sessions: {
1068
+ enabled: false;
1069
+ };
1070
+ ai_spend: {
1071
+ enabled: false;
1072
+ };
1073
+ };
819
1074
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
820
1075
  };
821
1076
  readonly managed: {
@@ -843,6 +1098,14 @@ export declare const billingDefinitions: {
843
1098
  ai_spend: number;
844
1099
  conversation_sessions: number;
845
1100
  };
1101
+ readonly autoRechargeSettings: {
1102
+ conversation_sessions: {
1103
+ enabled: false;
1104
+ };
1105
+ ai_spend: {
1106
+ enabled: false;
1107
+ };
1108
+ };
846
1109
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
847
1110
  };
848
1111
  };