@bpinternal/const 0.9.0 → 0.11.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.
@@ -2,10 +2,10 @@
2
2
  * Billing features for v4 billing system
3
3
  * Based on the requirements from the billing refactor document
4
4
  */
5
- export declare const BILLING_FEATURE_IDS: readonly ["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "saved_versions"];
5
+ export declare const BILLING_FEATURE_IDS: readonly ["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "indexed_file_count", "saved_versions"];
6
6
  export declare const ATOMIC_BILLING_FEATURE_IDS: ["integration_subscription", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "saved_versions"];
7
- export declare const NON_ATOMIC_BILLING_FEATURE_IDS: ["incoming_messages_events", "integration_spend", "table_rows", "file_storage", "vector_db_storage"];
8
- export declare const NON_RESETTING_BILLING_FEATURE_IDS: ["integration_subscription", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "saved_versions", "table_rows", "file_storage", "vector_db_storage"];
7
+ export declare const NON_ATOMIC_BILLING_FEATURE_IDS: ["incoming_messages_events", "integration_spend", "table_rows", "file_storage", "vector_db_storage", "indexed_file_count"];
8
+ export declare const NON_RESETTING_BILLING_FEATURE_IDS: ["integration_subscription", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "saved_versions", "table_rows", "file_storage", "vector_db_storage", "indexed_file_count"];
9
9
  export declare const CREDIT_GRANT_BILLING_FEATURE_IDS: ["integration_spend"];
10
10
  export declare const billingFeatureDefs: {
11
11
  readonly human_in_the_loop: {
@@ -86,4 +86,9 @@ export declare const billingFeatureDefs: {
86
86
  readonly description: "Number of bot versions that can be saved";
87
87
  readonly type: "static";
88
88
  };
89
+ readonly indexed_file_count: {
90
+ readonly name: "Indexed File Count";
91
+ readonly description: "The number of indexed files in the files api";
92
+ readonly type: "static";
93
+ };
89
94
  };
@@ -18,6 +18,7 @@ exports.BILLING_FEATURE_IDS = [
18
18
  'collaborator_count',
19
19
  'file_storage',
20
20
  'vector_db_storage',
21
+ 'indexed_file_count',
21
22
  'saved_versions',
22
23
  ];
23
24
  exports.ATOMIC_BILLING_FEATURE_IDS = [
@@ -34,12 +35,14 @@ exports.NON_ATOMIC_BILLING_FEATURE_IDS = [
34
35
  'table_rows',
35
36
  'file_storage',
36
37
  'vector_db_storage',
38
+ 'indexed_file_count',
37
39
  ];
38
40
  exports.NON_RESETTING_BILLING_FEATURE_IDS = [
39
41
  ...exports.ATOMIC_BILLING_FEATURE_IDS,
40
42
  'table_rows',
41
43
  'file_storage',
42
44
  'vector_db_storage',
45
+ 'indexed_file_count',
43
46
  ];
44
47
  exports.CREDIT_GRANT_BILLING_FEATURE_IDS = ['integration_spend'];
45
48
  exports.billingFeatureDefs = {
@@ -121,4 +124,9 @@ exports.billingFeatureDefs = {
121
124
  description: 'Number of bot versions that can be saved',
122
125
  type: 'static',
123
126
  },
127
+ indexed_file_count: {
128
+ name: 'Indexed File Count',
129
+ description: 'The number of indexed files in the files api',
130
+ type: 'static',
131
+ },
124
132
  };
@@ -32,6 +32,7 @@ export declare const billingPlansDefs: {
32
32
  readonly file_storage: 100000000;
33
33
  readonly vector_db_storage: 100000000;
34
34
  readonly saved_versions: 3;
35
+ readonly indexed_file_count: 1000;
35
36
  };
36
37
  };
37
38
  readonly plus: {
@@ -62,6 +63,7 @@ export declare const billingPlansDefs: {
62
63
  readonly file_storage: 10000000000;
63
64
  readonly vector_db_storage: 1000000000;
64
65
  readonly saved_versions: 50;
66
+ readonly indexed_file_count: 2000;
65
67
  };
66
68
  };
67
69
  readonly team: {
@@ -92,6 +94,7 @@ export declare const billingPlansDefs: {
92
94
  readonly file_storage: 10000000000;
93
95
  readonly vector_db_storage: 2000000000;
94
96
  readonly saved_versions: 100;
97
+ readonly indexed_file_count: 10000;
95
98
  };
96
99
  };
97
100
  readonly enterprise: {
@@ -118,6 +121,7 @@ export declare const billingPlansDefs: {
118
121
  readonly file_storage: 1000000000000;
119
122
  readonly vector_db_storage: 500000000000;
120
123
  readonly saved_versions: 1000;
124
+ readonly indexed_file_count: 10000;
121
125
  };
122
126
  };
123
127
  };
@@ -51,6 +51,7 @@ exports.billingPlansDefs = {
51
51
  file_storage: 100_000_000, // 100 MB
52
52
  vector_db_storage: 100_000_000, // 100 MB
53
53
  saved_versions: 3,
54
+ indexed_file_count: 1_000,
54
55
  },
55
56
  },
56
57
  plus: {
@@ -84,6 +85,7 @@ exports.billingPlansDefs = {
84
85
  file_storage: 10_000_000_000, // 10 GB
85
86
  vector_db_storage: 1_000_000_000, // 1 GB
86
87
  saved_versions: 50,
88
+ indexed_file_count: 2_000,
87
89
  },
88
90
  },
89
91
  team: {
@@ -117,6 +119,7 @@ exports.billingPlansDefs = {
117
119
  file_storage: 10_000_000_000, // 10 GB
118
120
  vector_db_storage: 2_000_000_000, // 2 GB
119
121
  saved_versions: 100,
122
+ indexed_file_count: 10_000,
120
123
  },
121
124
  },
122
125
  enterprise: {
@@ -145,6 +148,7 @@ exports.billingPlansDefs = {
145
148
  file_storage: 1000_000_000_000, // 1000 GB
146
149
  vector_db_storage: 500_000_000_000, // 500 GB
147
150
  saved_versions: 1000,
151
+ indexed_file_count: 10_000,
148
152
  },
149
153
  },
150
154
  };
package/dist/schema.d.ts CHANGED
@@ -41,7 +41,7 @@ export declare const meteredPriceSchema: z.ZodObject<{
41
41
  unitAmount: number;
42
42
  metadata?: Record<string, string> | undefined;
43
43
  }>;
44
- export declare const featureSchema: z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "saved_versions"]>;
44
+ export declare const featureSchema: z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "indexed_file_count", "saved_versions"]>;
45
45
  export declare const planSchema: z.ZodObject<{
46
46
  id: z.ZodString;
47
47
  name: z.ZodString;
@@ -67,13 +67,12 @@ export declare const planSchema: z.ZodObject<{
67
67
  interval: "month" | "year";
68
68
  metadata?: Record<string, string> | undefined;
69
69
  }>>;
70
- features: z.ZodRecord<z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "saved_versions"]>, z.ZodAny>;
70
+ features: z.ZodRecord<z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "indexed_file_count", "saved_versions"]>, z.ZodUnion<[z.ZodNumber, z.ZodBoolean]>>;
71
71
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
72
72
  }, "strip", z.ZodTypeAny, {
73
73
  id: string;
74
74
  name: string;
75
75
  description: string;
76
- tierIndex: number;
77
76
  providerProductId: string;
78
77
  prices: Partial<Record<"month" | "year", {
79
78
  providerPriceId: string;
@@ -82,13 +81,13 @@ export declare const planSchema: z.ZodObject<{
82
81
  interval: "month" | "year";
83
82
  metadata?: Record<string, string> | undefined;
84
83
  }>>;
85
- features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", any>>;
84
+ tierIndex: number;
85
+ features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number | boolean>>;
86
86
  metadata?: Record<string, string> | undefined;
87
87
  }, {
88
88
  id: string;
89
89
  name: string;
90
90
  description: string;
91
- tierIndex: number;
92
91
  providerProductId: string;
93
92
  prices: Partial<Record<"month" | "year", {
94
93
  providerPriceId: string;
@@ -97,10 +96,11 @@ export declare const planSchema: z.ZodObject<{
97
96
  interval: "month" | "year";
98
97
  metadata?: Record<string, string> | undefined;
99
98
  }>>;
100
- features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", any>>;
99
+ tierIndex: number;
100
+ features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number | boolean>>;
101
101
  metadata?: Record<string, string> | undefined;
102
102
  }>;
103
- export declare const addOnSchema: z.ZodObject<{
103
+ export declare const addOnSchema: z.ZodEffects<z.ZodObject<{
104
104
  id: z.ZodString;
105
105
  name: z.ZodString;
106
106
  description: z.ZodString;
@@ -124,8 +124,9 @@ export declare const addOnSchema: z.ZodObject<{
124
124
  interval: "month" | "year";
125
125
  metadata?: Record<string, string> | undefined;
126
126
  }>>;
127
- feature: z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "saved_versions"]>;
127
+ feature: z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "indexed_file_count", "saved_versions"]>;
128
128
  increment: z.ZodNumber;
129
+ increments: z.ZodOptional<z.ZodRecord<z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "indexed_file_count", "saved_versions"]>, z.ZodNumber>>;
129
130
  prorationDisabled: z.ZodOptional<z.ZodBoolean>;
130
131
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
131
132
  autoRechargeable: z.ZodOptional<z.ZodBoolean>;
@@ -142,9 +143,48 @@ export declare const addOnSchema: z.ZodObject<{
142
143
  interval: "month" | "year";
143
144
  metadata?: Record<string, string> | undefined;
144
145
  }>>;
145
- feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
146
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
147
+ increment: number;
148
+ metadata?: Record<string, string> | undefined;
149
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
150
+ prorationDisabled?: boolean | undefined;
151
+ autoRechargeable?: boolean | undefined;
152
+ hidden?: boolean | undefined;
153
+ }, {
154
+ id: string;
155
+ name: string;
156
+ description: string;
157
+ providerProductId: string;
158
+ prices: Partial<Record<"month" | "year", {
159
+ providerPriceId: string;
160
+ amount: number;
161
+ currency: "usd";
162
+ interval: "month" | "year";
163
+ metadata?: Record<string, string> | undefined;
164
+ }>>;
165
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
166
+ increment: number;
167
+ metadata?: Record<string, string> | undefined;
168
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
169
+ prorationDisabled?: boolean | undefined;
170
+ autoRechargeable?: boolean | undefined;
171
+ hidden?: boolean | undefined;
172
+ }>, {
173
+ id: string;
174
+ name: string;
175
+ description: string;
176
+ providerProductId: string;
177
+ prices: Partial<Record<"month" | "year", {
178
+ providerPriceId: string;
179
+ amount: number;
180
+ currency: "usd";
181
+ interval: "month" | "year";
182
+ metadata?: Record<string, string> | undefined;
183
+ }>>;
184
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
146
185
  increment: number;
147
186
  metadata?: Record<string, string> | undefined;
187
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
148
188
  prorationDisabled?: boolean | undefined;
149
189
  autoRechargeable?: boolean | undefined;
150
190
  hidden?: boolean | undefined;
@@ -160,9 +200,10 @@ export declare const addOnSchema: z.ZodObject<{
160
200
  interval: "month" | "year";
161
201
  metadata?: Record<string, string> | undefined;
162
202
  }>>;
163
- feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
203
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
164
204
  increment: number;
165
205
  metadata?: Record<string, string> | undefined;
206
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
166
207
  prorationDisabled?: boolean | undefined;
167
208
  autoRechargeable?: boolean | undefined;
168
209
  hidden?: boolean | undefined;
@@ -254,13 +295,12 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
254
295
  interval: "month" | "year";
255
296
  metadata?: Record<string, string> | undefined;
256
297
  }>>;
257
- features: z.ZodRecord<z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "saved_versions"]>, z.ZodAny>;
298
+ features: z.ZodRecord<z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "indexed_file_count", "saved_versions"]>, z.ZodUnion<[z.ZodNumber, z.ZodBoolean]>>;
258
299
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
259
300
  }, "strip", z.ZodTypeAny, {
260
301
  id: string;
261
302
  name: string;
262
303
  description: string;
263
- tierIndex: number;
264
304
  providerProductId: string;
265
305
  prices: Partial<Record<"month" | "year", {
266
306
  providerPriceId: string;
@@ -269,13 +309,13 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
269
309
  interval: "month" | "year";
270
310
  metadata?: Record<string, string> | undefined;
271
311
  }>>;
272
- features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", any>>;
312
+ tierIndex: number;
313
+ features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number | boolean>>;
273
314
  metadata?: Record<string, string> | undefined;
274
315
  }, {
275
316
  id: string;
276
317
  name: string;
277
318
  description: string;
278
- tierIndex: number;
279
319
  providerProductId: string;
280
320
  prices: Partial<Record<"month" | "year", {
281
321
  providerPriceId: string;
@@ -284,10 +324,11 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
284
324
  interval: "month" | "year";
285
325
  metadata?: Record<string, string> | undefined;
286
326
  }>>;
287
- features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", any>>;
327
+ tierIndex: number;
328
+ features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number | boolean>>;
288
329
  metadata?: Record<string, string> | undefined;
289
330
  }>>;
290
- addons: z.ZodRecord<z.ZodString, z.ZodObject<{
331
+ addons: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
291
332
  id: z.ZodString;
292
333
  name: z.ZodString;
293
334
  description: z.ZodString;
@@ -311,8 +352,9 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
311
352
  interval: "month" | "year";
312
353
  metadata?: Record<string, string> | undefined;
313
354
  }>>;
314
- feature: z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "saved_versions"]>;
355
+ feature: z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "indexed_file_count", "saved_versions"]>;
315
356
  increment: z.ZodNumber;
357
+ increments: z.ZodOptional<z.ZodRecord<z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "indexed_file_count", "saved_versions"]>, z.ZodNumber>>;
316
358
  prorationDisabled: z.ZodOptional<z.ZodBoolean>;
317
359
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
318
360
  autoRechargeable: z.ZodOptional<z.ZodBoolean>;
@@ -329,9 +371,10 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
329
371
  interval: "month" | "year";
330
372
  metadata?: Record<string, string> | undefined;
331
373
  }>>;
332
- feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
374
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
333
375
  increment: number;
334
376
  metadata?: Record<string, string> | undefined;
377
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
335
378
  prorationDisabled?: boolean | undefined;
336
379
  autoRechargeable?: boolean | undefined;
337
380
  hidden?: boolean | undefined;
@@ -347,9 +390,48 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
347
390
  interval: "month" | "year";
348
391
  metadata?: Record<string, string> | undefined;
349
392
  }>>;
350
- feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
393
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
394
+ increment: number;
395
+ metadata?: Record<string, string> | undefined;
396
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
397
+ prorationDisabled?: boolean | undefined;
398
+ autoRechargeable?: boolean | undefined;
399
+ hidden?: boolean | undefined;
400
+ }>, {
401
+ id: string;
402
+ name: string;
403
+ description: string;
404
+ providerProductId: string;
405
+ prices: Partial<Record<"month" | "year", {
406
+ providerPriceId: string;
407
+ amount: number;
408
+ currency: "usd";
409
+ interval: "month" | "year";
410
+ metadata?: Record<string, string> | undefined;
411
+ }>>;
412
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
351
413
  increment: number;
352
414
  metadata?: Record<string, string> | undefined;
415
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
416
+ prorationDisabled?: boolean | undefined;
417
+ autoRechargeable?: boolean | undefined;
418
+ hidden?: boolean | undefined;
419
+ }, {
420
+ id: string;
421
+ name: string;
422
+ description: string;
423
+ providerProductId: string;
424
+ prices: Partial<Record<"month" | "year", {
425
+ providerPriceId: string;
426
+ amount: number;
427
+ currency: "usd";
428
+ interval: "month" | "year";
429
+ metadata?: Record<string, string> | undefined;
430
+ }>>;
431
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
432
+ increment: number;
433
+ metadata?: Record<string, string> | undefined;
434
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
353
435
  prorationDisabled?: boolean | undefined;
354
436
  autoRechargeable?: boolean | undefined;
355
437
  hidden?: boolean | undefined;
@@ -422,7 +504,6 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
422
504
  id: string;
423
505
  name: string;
424
506
  description: string;
425
- tierIndex: number;
426
507
  providerProductId: string;
427
508
  prices: Partial<Record<"month" | "year", {
428
509
  providerPriceId: string;
@@ -431,7 +512,8 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
431
512
  interval: "month" | "year";
432
513
  metadata?: Record<string, string> | undefined;
433
514
  }>>;
434
- features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", any>>;
515
+ tierIndex: number;
516
+ features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number | boolean>>;
435
517
  metadata?: Record<string, string> | undefined;
436
518
  }>;
437
519
  addons: Record<string, {
@@ -446,9 +528,10 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
446
528
  interval: "month" | "year";
447
529
  metadata?: Record<string, string> | undefined;
448
530
  }>>;
449
- feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
531
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
450
532
  increment: number;
451
533
  metadata?: Record<string, string> | undefined;
534
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
452
535
  prorationDisabled?: boolean | undefined;
453
536
  autoRechargeable?: boolean | undefined;
454
537
  hidden?: boolean | undefined;
@@ -479,7 +562,6 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
479
562
  id: string;
480
563
  name: string;
481
564
  description: string;
482
- tierIndex: number;
483
565
  providerProductId: string;
484
566
  prices: Partial<Record<"month" | "year", {
485
567
  providerPriceId: string;
@@ -488,7 +570,8 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
488
570
  interval: "month" | "year";
489
571
  metadata?: Record<string, string> | undefined;
490
572
  }>>;
491
- features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", any>>;
573
+ tierIndex: number;
574
+ features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number | boolean>>;
492
575
  metadata?: Record<string, string> | undefined;
493
576
  }>;
494
577
  addons: Record<string, {
@@ -503,9 +586,10 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
503
586
  interval: "month" | "year";
504
587
  metadata?: Record<string, string> | undefined;
505
588
  }>>;
506
- feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
589
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
507
590
  increment: number;
508
591
  metadata?: Record<string, string> | undefined;
592
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
509
593
  prorationDisabled?: boolean | undefined;
510
594
  autoRechargeable?: boolean | undefined;
511
595
  hidden?: boolean | undefined;
@@ -558,13 +642,12 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
558
642
  interval: "month" | "year";
559
643
  metadata?: Record<string, string> | undefined;
560
644
  }>>;
561
- features: z.ZodRecord<z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "saved_versions"]>, z.ZodAny>;
645
+ features: z.ZodRecord<z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "indexed_file_count", "saved_versions"]>, z.ZodUnion<[z.ZodNumber, z.ZodBoolean]>>;
562
646
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
563
647
  }, "strip", z.ZodTypeAny, {
564
648
  id: string;
565
649
  name: string;
566
650
  description: string;
567
- tierIndex: number;
568
651
  providerProductId: string;
569
652
  prices: Partial<Record<"month" | "year", {
570
653
  providerPriceId: string;
@@ -573,13 +656,13 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
573
656
  interval: "month" | "year";
574
657
  metadata?: Record<string, string> | undefined;
575
658
  }>>;
576
- features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", any>>;
659
+ tierIndex: number;
660
+ features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number | boolean>>;
577
661
  metadata?: Record<string, string> | undefined;
578
662
  }, {
579
663
  id: string;
580
664
  name: string;
581
665
  description: string;
582
- tierIndex: number;
583
666
  providerProductId: string;
584
667
  prices: Partial<Record<"month" | "year", {
585
668
  providerPriceId: string;
@@ -588,10 +671,11 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
588
671
  interval: "month" | "year";
589
672
  metadata?: Record<string, string> | undefined;
590
673
  }>>;
591
- features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", any>>;
674
+ tierIndex: number;
675
+ features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number | boolean>>;
592
676
  metadata?: Record<string, string> | undefined;
593
677
  }>>;
594
- addons: z.ZodRecord<z.ZodString, z.ZodObject<{
678
+ addons: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
595
679
  id: z.ZodString;
596
680
  name: z.ZodString;
597
681
  description: z.ZodString;
@@ -615,8 +699,9 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
615
699
  interval: "month" | "year";
616
700
  metadata?: Record<string, string> | undefined;
617
701
  }>>;
618
- feature: z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "saved_versions"]>;
702
+ feature: z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "indexed_file_count", "saved_versions"]>;
619
703
  increment: z.ZodNumber;
704
+ increments: z.ZodOptional<z.ZodRecord<z.ZodEnum<["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "indexed_file_count", "saved_versions"]>, z.ZodNumber>>;
620
705
  prorationDisabled: z.ZodOptional<z.ZodBoolean>;
621
706
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
622
707
  autoRechargeable: z.ZodOptional<z.ZodBoolean>;
@@ -633,9 +718,10 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
633
718
  interval: "month" | "year";
634
719
  metadata?: Record<string, string> | undefined;
635
720
  }>>;
636
- feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
721
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
637
722
  increment: number;
638
723
  metadata?: Record<string, string> | undefined;
724
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
639
725
  prorationDisabled?: boolean | undefined;
640
726
  autoRechargeable?: boolean | undefined;
641
727
  hidden?: boolean | undefined;
@@ -651,9 +737,48 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
651
737
  interval: "month" | "year";
652
738
  metadata?: Record<string, string> | undefined;
653
739
  }>>;
654
- feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
740
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
655
741
  increment: number;
656
742
  metadata?: Record<string, string> | undefined;
743
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
744
+ prorationDisabled?: boolean | undefined;
745
+ autoRechargeable?: boolean | undefined;
746
+ hidden?: boolean | undefined;
747
+ }>, {
748
+ id: string;
749
+ name: string;
750
+ description: string;
751
+ providerProductId: string;
752
+ prices: Partial<Record<"month" | "year", {
753
+ providerPriceId: string;
754
+ amount: number;
755
+ currency: "usd";
756
+ interval: "month" | "year";
757
+ metadata?: Record<string, string> | undefined;
758
+ }>>;
759
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
760
+ increment: number;
761
+ metadata?: Record<string, string> | undefined;
762
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
763
+ prorationDisabled?: boolean | undefined;
764
+ autoRechargeable?: boolean | undefined;
765
+ hidden?: boolean | undefined;
766
+ }, {
767
+ id: string;
768
+ name: string;
769
+ description: string;
770
+ providerProductId: string;
771
+ prices: Partial<Record<"month" | "year", {
772
+ providerPriceId: string;
773
+ amount: number;
774
+ currency: "usd";
775
+ interval: "month" | "year";
776
+ metadata?: Record<string, string> | undefined;
777
+ }>>;
778
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
779
+ increment: number;
780
+ metadata?: Record<string, string> | undefined;
781
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
657
782
  prorationDisabled?: boolean | undefined;
658
783
  autoRechargeable?: boolean | undefined;
659
784
  hidden?: boolean | undefined;
@@ -726,7 +851,6 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
726
851
  id: string;
727
852
  name: string;
728
853
  description: string;
729
- tierIndex: number;
730
854
  providerProductId: string;
731
855
  prices: Partial<Record<"month" | "year", {
732
856
  providerPriceId: string;
@@ -735,7 +859,8 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
735
859
  interval: "month" | "year";
736
860
  metadata?: Record<string, string> | undefined;
737
861
  }>>;
738
- features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", any>>;
862
+ tierIndex: number;
863
+ features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number | boolean>>;
739
864
  metadata?: Record<string, string> | undefined;
740
865
  }>;
741
866
  addons: Record<string, {
@@ -750,9 +875,10 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
750
875
  interval: "month" | "year";
751
876
  metadata?: Record<string, string> | undefined;
752
877
  }>>;
753
- feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
878
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
754
879
  increment: number;
755
880
  metadata?: Record<string, string> | undefined;
881
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
756
882
  prorationDisabled?: boolean | undefined;
757
883
  autoRechargeable?: boolean | undefined;
758
884
  hidden?: boolean | undefined;
@@ -783,7 +909,6 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
783
909
  id: string;
784
910
  name: string;
785
911
  description: string;
786
- tierIndex: number;
787
912
  providerProductId: string;
788
913
  prices: Partial<Record<"month" | "year", {
789
914
  providerPriceId: string;
@@ -792,7 +917,8 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
792
917
  interval: "month" | "year";
793
918
  metadata?: Record<string, string> | undefined;
794
919
  }>>;
795
- features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", any>>;
920
+ tierIndex: number;
921
+ features: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number | boolean>>;
796
922
  metadata?: Record<string, string> | undefined;
797
923
  }>;
798
924
  addons: Record<string, {
@@ -807,9 +933,10 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
807
933
  interval: "month" | "year";
808
934
  metadata?: Record<string, string> | undefined;
809
935
  }>>;
810
- feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
936
+ feature: "human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions";
811
937
  increment: number;
812
938
  metadata?: Record<string, string> | undefined;
939
+ increments?: Partial<Record<"human_in_the_loop" | "ratelimit" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "bot_count" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "indexed_file_count" | "saved_versions", number>> | undefined;
813
940
  prorationDisabled?: boolean | undefined;
814
941
  autoRechargeable?: boolean | undefined;
815
942
  hidden?: boolean | undefined;
package/dist/schema.js CHANGED
@@ -30,21 +30,35 @@ exports.planSchema = zod_1.z.object({
30
30
  tierIndex: zod_1.z.number(),
31
31
  providerProductId: zod_1.z.string(),
32
32
  prices: zod_1.z.record(exports.intervalSchema, exports.priceSchema),
33
- features: zod_1.z.record(exports.featureSchema, zod_1.z.any()),
33
+ features: zod_1.z.record(exports.featureSchema, zod_1.z.union([zod_1.z.number(), zod_1.z.boolean()])),
34
34
  metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
35
35
  });
36
- exports.addOnSchema = zod_1.z.object({
36
+ exports.addOnSchema = zod_1.z
37
+ .object({
37
38
  id: zod_1.z.string(),
38
39
  name: zod_1.z.string(),
39
40
  description: zod_1.z.string(),
40
41
  providerProductId: zod_1.z.string(),
41
42
  prices: zod_1.z.record(exports.intervalSchema, exports.priceSchema),
42
43
  feature: exports.featureSchema,
43
- increment: zod_1.z.number(),
44
+ increment: zod_1.z.number().positive(),
45
+ increments: zod_1.z.record(exports.featureSchema, zod_1.z.number().positive()).optional(),
44
46
  prorationDisabled: zod_1.z.boolean().optional(),
45
47
  metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
46
48
  autoRechargeable: zod_1.z.boolean().optional(),
47
49
  hidden: zod_1.z.boolean().optional(),
50
+ })
51
+ .superRefine((data, ctx) => {
52
+ if (!data.increments) {
53
+ return;
54
+ }
55
+ if (data.increments[data.feature] !== data.increment) {
56
+ ctx.addIssue({
57
+ code: zod_1.z.ZodIssueCode.custom,
58
+ message: 'addon increments must include the legacy feature with the same increment',
59
+ path: ['increments', data.feature],
60
+ });
61
+ }
48
62
  });
49
63
  exports.meterSchema = zod_1.z.object({
50
64
  id: zod_1.z.string(),
package/dist/types.d.ts CHANGED
@@ -39,16 +39,9 @@ export type BillingPlanDefinition = {
39
39
  features: Partial<Record<BillingFeatureId, number | boolean>>;
40
40
  metadata?: Record<string, string>;
41
41
  };
42
- export type BillingAddonDefinition = {
42
+ export type BillingAddonDefinition = Omit<BillingAddon, 'id' | 'prices' | 'providerProductId'> & {
43
43
  id: BillingAddonId;
44
- name: string;
45
- description: string;
46
44
  prices: Array<BillingPriceDefinition>;
47
- feature: BillingFeatureId;
48
- increment: number;
49
- prorationDisabled?: boolean;
50
- metadata?: Record<string, string>;
51
- hidden?: boolean;
52
45
  };
53
46
  export type BillingMeterDefinition = {
54
47
  id: BillingMeterId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpinternal/const",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "Shared constants for Skynet billing refactor (vendored copy of upstream packages/const)",
5
5
  "license": "UNLICENSED",
6
6
  "files": [