@bpinternal/const 0.18.0 → 0.19.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.
- package/dist/billing-next/config/addons.d.ts +30 -14
- package/dist/billing-next/config/addons.js +16 -16
- package/dist/billing-next/config/schemas.d.ts +420 -107
- package/dist/billing-next/config/schemas.js +6 -2
- package/dist/billing-next/config/versions.d.ts +60 -28
- package/dist/limits.d.ts +4 -0
- package/dist/limits.js +4 -0
- package/package.json +1 -1
|
@@ -4,14 +4,22 @@ export declare const addons: {
|
|
|
4
4
|
readonly id: "conversation_sessions_addon";
|
|
5
5
|
readonly name: "Add-on - Conversation Sessions";
|
|
6
6
|
readonly description: "Adds 500 conversations sessions per month";
|
|
7
|
-
readonly prices: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
readonly prices: Record<string, {
|
|
8
|
+
month: {
|
|
9
|
+
amount: number;
|
|
10
|
+
currency: "usd";
|
|
11
|
+
interval: "month" | "year";
|
|
12
|
+
providerPriceId: string;
|
|
13
|
+
metadata?: Record<string, string> | undefined;
|
|
13
14
|
};
|
|
14
|
-
|
|
15
|
+
year?: {
|
|
16
|
+
amount: number;
|
|
17
|
+
currency: "usd";
|
|
18
|
+
interval: "month" | "year";
|
|
19
|
+
providerPriceId: string;
|
|
20
|
+
metadata?: Record<string, string> | undefined;
|
|
21
|
+
} | undefined;
|
|
22
|
+
}>;
|
|
15
23
|
readonly increments: {
|
|
16
24
|
readonly conversation_sessions: 500;
|
|
17
25
|
};
|
|
@@ -22,14 +30,22 @@ export declare const addons: {
|
|
|
22
30
|
readonly id: "storage_addon";
|
|
23
31
|
readonly name: "Add-on - Storage";
|
|
24
32
|
readonly description: "Adds table rows, vector db space and files";
|
|
25
|
-
readonly prices: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
readonly prices: Record<string, {
|
|
34
|
+
month: {
|
|
35
|
+
amount: number;
|
|
36
|
+
currency: "usd";
|
|
37
|
+
interval: "month" | "year";
|
|
38
|
+
providerPriceId: string;
|
|
39
|
+
metadata?: Record<string, string> | undefined;
|
|
31
40
|
};
|
|
32
|
-
|
|
41
|
+
year?: {
|
|
42
|
+
amount: number;
|
|
43
|
+
currency: "usd";
|
|
44
|
+
interval: "month" | "year";
|
|
45
|
+
providerPriceId: string;
|
|
46
|
+
metadata?: Record<string, string> | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
}>;
|
|
33
49
|
readonly increments: {
|
|
34
50
|
readonly table_rows: 100000;
|
|
35
51
|
readonly vector_db_storage: number;
|
|
@@ -3,20 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addons = void 0;
|
|
4
4
|
const consts_1 = require("../consts");
|
|
5
5
|
const schemas_1 = require("./schemas");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
name: 'Add-on - Conversation Sessions',
|
|
11
|
-
description: 'Adds 500 conversations sessions per month',
|
|
12
|
-
prices: {
|
|
6
|
+
const constantMonthlyPrice = (amount, scope = ['community', 'plus', 'team', 'enterprise', 'managed']) => {
|
|
7
|
+
return scope
|
|
8
|
+
.map((plan) => ({
|
|
9
|
+
[plan]: {
|
|
13
10
|
month: {
|
|
14
|
-
amount
|
|
11
|
+
amount,
|
|
15
12
|
currency: 'usd',
|
|
16
13
|
interval: 'month',
|
|
17
14
|
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
18
15
|
},
|
|
19
16
|
},
|
|
17
|
+
}))
|
|
18
|
+
.reduce((acc, curr) => ({ ...acc, ...curr }), {});
|
|
19
|
+
};
|
|
20
|
+
/* IMPORTANT: the `name` field is used to match existing products in Stripe DO NOT CHANGE THE NAME OF AN EXISTING PRODUCT */
|
|
21
|
+
exports.addons = {
|
|
22
|
+
conversation_sessions_addon: {
|
|
23
|
+
id: 'conversation_sessions_addon',
|
|
24
|
+
name: 'Add-on - Conversation Sessions',
|
|
25
|
+
description: 'Adds 500 conversations sessions per month',
|
|
26
|
+
prices: constantMonthlyPrice(20),
|
|
20
27
|
increments: { conversation_sessions: 500 },
|
|
21
28
|
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
22
29
|
autoRechargeable: true,
|
|
@@ -25,14 +32,7 @@ exports.addons = {
|
|
|
25
32
|
id: 'storage_addon',
|
|
26
33
|
name: 'Add-on - Storage',
|
|
27
34
|
description: 'Adds table rows, vector db space and files',
|
|
28
|
-
prices:
|
|
29
|
-
month: {
|
|
30
|
-
amount: 40,
|
|
31
|
-
currency: 'usd',
|
|
32
|
-
interval: 'month',
|
|
33
|
-
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
34
|
-
},
|
|
35
|
-
},
|
|
35
|
+
prices: constantMonthlyPrice(40),
|
|
36
36
|
increments: {
|
|
37
37
|
table_rows: 100_000,
|
|
38
38
|
vector_db_storage: 1 * consts_1.GB,
|
|
@@ -113,11 +113,27 @@ export declare const planSchema: z.ZodObject<{
|
|
|
113
113
|
metadata?: Record<string, string> | undefined;
|
|
114
114
|
}>;
|
|
115
115
|
export type BillingAddon = z.infer<typeof addOnSchema>;
|
|
116
|
-
export declare const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
export declare const addonPlanPricesSchema: z.ZodObject<{
|
|
117
|
+
month: z.ZodObject<{
|
|
118
|
+
amount: z.ZodNumber;
|
|
119
|
+
currency: z.ZodEnum<["usd"]>;
|
|
120
|
+
interval: z.ZodEnum<["month", "year"]>;
|
|
121
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
122
|
+
providerPriceId: z.ZodString;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
amount: number;
|
|
125
|
+
currency: "usd";
|
|
126
|
+
interval: "month" | "year";
|
|
127
|
+
providerPriceId: string;
|
|
128
|
+
metadata?: Record<string, string> | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
amount: number;
|
|
131
|
+
currency: "usd";
|
|
132
|
+
interval: "month" | "year";
|
|
133
|
+
providerPriceId: string;
|
|
134
|
+
metadata?: Record<string, string> | undefined;
|
|
135
|
+
}>;
|
|
136
|
+
year: z.ZodOptional<z.ZodObject<{
|
|
121
137
|
amount: z.ZodNumber;
|
|
122
138
|
currency: z.ZodEnum<["usd"]>;
|
|
123
139
|
interval: z.ZodEnum<["month", "year"]>;
|
|
@@ -136,6 +152,111 @@ export declare const addOnSchema: z.ZodObject<{
|
|
|
136
152
|
providerPriceId: string;
|
|
137
153
|
metadata?: Record<string, string> | undefined;
|
|
138
154
|
}>>;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
month: {
|
|
157
|
+
amount: number;
|
|
158
|
+
currency: "usd";
|
|
159
|
+
interval: "month" | "year";
|
|
160
|
+
providerPriceId: string;
|
|
161
|
+
metadata?: Record<string, string> | undefined;
|
|
162
|
+
};
|
|
163
|
+
year?: {
|
|
164
|
+
amount: number;
|
|
165
|
+
currency: "usd";
|
|
166
|
+
interval: "month" | "year";
|
|
167
|
+
providerPriceId: string;
|
|
168
|
+
metadata?: Record<string, string> | undefined;
|
|
169
|
+
} | undefined;
|
|
170
|
+
}, {
|
|
171
|
+
month: {
|
|
172
|
+
amount: number;
|
|
173
|
+
currency: "usd";
|
|
174
|
+
interval: "month" | "year";
|
|
175
|
+
providerPriceId: string;
|
|
176
|
+
metadata?: Record<string, string> | undefined;
|
|
177
|
+
};
|
|
178
|
+
year?: {
|
|
179
|
+
amount: number;
|
|
180
|
+
currency: "usd";
|
|
181
|
+
interval: "month" | "year";
|
|
182
|
+
providerPriceId: string;
|
|
183
|
+
metadata?: Record<string, string> | undefined;
|
|
184
|
+
} | undefined;
|
|
185
|
+
}>;
|
|
186
|
+
export declare const addOnSchema: z.ZodObject<{
|
|
187
|
+
id: z.ZodString;
|
|
188
|
+
name: z.ZodString;
|
|
189
|
+
description: z.ZodString;
|
|
190
|
+
prices: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
191
|
+
month: z.ZodObject<{
|
|
192
|
+
amount: z.ZodNumber;
|
|
193
|
+
currency: z.ZodEnum<["usd"]>;
|
|
194
|
+
interval: z.ZodEnum<["month", "year"]>;
|
|
195
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
196
|
+
providerPriceId: z.ZodString;
|
|
197
|
+
}, "strip", z.ZodTypeAny, {
|
|
198
|
+
amount: number;
|
|
199
|
+
currency: "usd";
|
|
200
|
+
interval: "month" | "year";
|
|
201
|
+
providerPriceId: string;
|
|
202
|
+
metadata?: Record<string, string> | undefined;
|
|
203
|
+
}, {
|
|
204
|
+
amount: number;
|
|
205
|
+
currency: "usd";
|
|
206
|
+
interval: "month" | "year";
|
|
207
|
+
providerPriceId: string;
|
|
208
|
+
metadata?: Record<string, string> | undefined;
|
|
209
|
+
}>;
|
|
210
|
+
year: z.ZodOptional<z.ZodObject<{
|
|
211
|
+
amount: z.ZodNumber;
|
|
212
|
+
currency: z.ZodEnum<["usd"]>;
|
|
213
|
+
interval: z.ZodEnum<["month", "year"]>;
|
|
214
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
215
|
+
providerPriceId: z.ZodString;
|
|
216
|
+
}, "strip", z.ZodTypeAny, {
|
|
217
|
+
amount: number;
|
|
218
|
+
currency: "usd";
|
|
219
|
+
interval: "month" | "year";
|
|
220
|
+
providerPriceId: string;
|
|
221
|
+
metadata?: Record<string, string> | undefined;
|
|
222
|
+
}, {
|
|
223
|
+
amount: number;
|
|
224
|
+
currency: "usd";
|
|
225
|
+
interval: "month" | "year";
|
|
226
|
+
providerPriceId: string;
|
|
227
|
+
metadata?: Record<string, string> | undefined;
|
|
228
|
+
}>>;
|
|
229
|
+
}, "strip", z.ZodTypeAny, {
|
|
230
|
+
month: {
|
|
231
|
+
amount: number;
|
|
232
|
+
currency: "usd";
|
|
233
|
+
interval: "month" | "year";
|
|
234
|
+
providerPriceId: string;
|
|
235
|
+
metadata?: Record<string, string> | undefined;
|
|
236
|
+
};
|
|
237
|
+
year?: {
|
|
238
|
+
amount: number;
|
|
239
|
+
currency: "usd";
|
|
240
|
+
interval: "month" | "year";
|
|
241
|
+
providerPriceId: string;
|
|
242
|
+
metadata?: Record<string, string> | undefined;
|
|
243
|
+
} | undefined;
|
|
244
|
+
}, {
|
|
245
|
+
month: {
|
|
246
|
+
amount: number;
|
|
247
|
+
currency: "usd";
|
|
248
|
+
interval: "month" | "year";
|
|
249
|
+
providerPriceId: string;
|
|
250
|
+
metadata?: Record<string, string> | undefined;
|
|
251
|
+
};
|
|
252
|
+
year?: {
|
|
253
|
+
amount: number;
|
|
254
|
+
currency: "usd";
|
|
255
|
+
interval: "month" | "year";
|
|
256
|
+
providerPriceId: string;
|
|
257
|
+
metadata?: Record<string, string> | undefined;
|
|
258
|
+
} | undefined;
|
|
259
|
+
}>>;
|
|
139
260
|
increments: z.ZodRecord<z.ZodEnum<["incoming_messages_events", "integration_spend", "table_rows", "bot_count", "collaborator_count", "file_storage", "vector_db_storage", "saved_versions", "indexed_file_count", "conversation_sessions"]>, z.ZodNumber>;
|
|
140
261
|
prorationDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
141
262
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -146,13 +267,22 @@ export declare const addOnSchema: z.ZodObject<{
|
|
|
146
267
|
id: string;
|
|
147
268
|
name: string;
|
|
148
269
|
description: string;
|
|
149
|
-
prices:
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
270
|
+
prices: Record<string, {
|
|
271
|
+
month: {
|
|
272
|
+
amount: number;
|
|
273
|
+
currency: "usd";
|
|
274
|
+
interval: "month" | "year";
|
|
275
|
+
providerPriceId: string;
|
|
276
|
+
metadata?: Record<string, string> | undefined;
|
|
277
|
+
};
|
|
278
|
+
year?: {
|
|
279
|
+
amount: number;
|
|
280
|
+
currency: "usd";
|
|
281
|
+
interval: "month" | "year";
|
|
282
|
+
providerPriceId: string;
|
|
283
|
+
metadata?: Record<string, string> | undefined;
|
|
284
|
+
} | undefined;
|
|
285
|
+
}>;
|
|
156
286
|
providerProductId: string;
|
|
157
287
|
increments: Partial<Record<"bot_count" | "indexed_file_count" | "incoming_messages_events" | "integration_spend" | "table_rows" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions" | "conversation_sessions", number>>;
|
|
158
288
|
metadata?: Record<string, string> | undefined;
|
|
@@ -163,13 +293,22 @@ export declare const addOnSchema: z.ZodObject<{
|
|
|
163
293
|
id: string;
|
|
164
294
|
name: string;
|
|
165
295
|
description: string;
|
|
166
|
-
prices:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
296
|
+
prices: Record<string, {
|
|
297
|
+
month: {
|
|
298
|
+
amount: number;
|
|
299
|
+
currency: "usd";
|
|
300
|
+
interval: "month" | "year";
|
|
301
|
+
providerPriceId: string;
|
|
302
|
+
metadata?: Record<string, string> | undefined;
|
|
303
|
+
};
|
|
304
|
+
year?: {
|
|
305
|
+
amount: number;
|
|
306
|
+
currency: "usd";
|
|
307
|
+
interval: "month" | "year";
|
|
308
|
+
providerPriceId: string;
|
|
309
|
+
metadata?: Record<string, string> | undefined;
|
|
310
|
+
} | undefined;
|
|
311
|
+
}>;
|
|
173
312
|
providerProductId: string;
|
|
174
313
|
increments: Partial<Record<"bot_count" | "indexed_file_count" | "incoming_messages_events" | "integration_spend" | "table_rows" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions" | "conversation_sessions", number>>;
|
|
175
314
|
metadata?: Record<string, string> | undefined;
|
|
@@ -347,24 +486,75 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
347
486
|
id: z.ZodString;
|
|
348
487
|
name: z.ZodString;
|
|
349
488
|
description: z.ZodString;
|
|
350
|
-
prices: z.ZodRecord<z.
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
489
|
+
prices: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
490
|
+
month: z.ZodObject<{
|
|
491
|
+
amount: z.ZodNumber;
|
|
492
|
+
currency: z.ZodEnum<["usd"]>;
|
|
493
|
+
interval: z.ZodEnum<["month", "year"]>;
|
|
494
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
495
|
+
providerPriceId: z.ZodString;
|
|
496
|
+
}, "strip", z.ZodTypeAny, {
|
|
497
|
+
amount: number;
|
|
498
|
+
currency: "usd";
|
|
499
|
+
interval: "month" | "year";
|
|
500
|
+
providerPriceId: string;
|
|
501
|
+
metadata?: Record<string, string> | undefined;
|
|
502
|
+
}, {
|
|
503
|
+
amount: number;
|
|
504
|
+
currency: "usd";
|
|
505
|
+
interval: "month" | "year";
|
|
506
|
+
providerPriceId: string;
|
|
507
|
+
metadata?: Record<string, string> | undefined;
|
|
508
|
+
}>;
|
|
509
|
+
year: z.ZodOptional<z.ZodObject<{
|
|
510
|
+
amount: z.ZodNumber;
|
|
511
|
+
currency: z.ZodEnum<["usd"]>;
|
|
512
|
+
interval: z.ZodEnum<["month", "year"]>;
|
|
513
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
514
|
+
providerPriceId: z.ZodString;
|
|
515
|
+
}, "strip", z.ZodTypeAny, {
|
|
516
|
+
amount: number;
|
|
517
|
+
currency: "usd";
|
|
518
|
+
interval: "month" | "year";
|
|
519
|
+
providerPriceId: string;
|
|
520
|
+
metadata?: Record<string, string> | undefined;
|
|
521
|
+
}, {
|
|
522
|
+
amount: number;
|
|
523
|
+
currency: "usd";
|
|
524
|
+
interval: "month" | "year";
|
|
525
|
+
providerPriceId: string;
|
|
526
|
+
metadata?: Record<string, string> | undefined;
|
|
527
|
+
}>>;
|
|
356
528
|
}, "strip", z.ZodTypeAny, {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
529
|
+
month: {
|
|
530
|
+
amount: number;
|
|
531
|
+
currency: "usd";
|
|
532
|
+
interval: "month" | "year";
|
|
533
|
+
providerPriceId: string;
|
|
534
|
+
metadata?: Record<string, string> | undefined;
|
|
535
|
+
};
|
|
536
|
+
year?: {
|
|
537
|
+
amount: number;
|
|
538
|
+
currency: "usd";
|
|
539
|
+
interval: "month" | "year";
|
|
540
|
+
providerPriceId: string;
|
|
541
|
+
metadata?: Record<string, string> | undefined;
|
|
542
|
+
} | undefined;
|
|
362
543
|
}, {
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
544
|
+
month: {
|
|
545
|
+
amount: number;
|
|
546
|
+
currency: "usd";
|
|
547
|
+
interval: "month" | "year";
|
|
548
|
+
providerPriceId: string;
|
|
549
|
+
metadata?: Record<string, string> | undefined;
|
|
550
|
+
};
|
|
551
|
+
year?: {
|
|
552
|
+
amount: number;
|
|
553
|
+
currency: "usd";
|
|
554
|
+
interval: "month" | "year";
|
|
555
|
+
providerPriceId: string;
|
|
556
|
+
metadata?: Record<string, string> | undefined;
|
|
557
|
+
} | undefined;
|
|
368
558
|
}>>;
|
|
369
559
|
increments: z.ZodRecord<z.ZodEnum<["incoming_messages_events", "integration_spend", "table_rows", "bot_count", "collaborator_count", "file_storage", "vector_db_storage", "saved_versions", "indexed_file_count", "conversation_sessions"]>, z.ZodNumber>;
|
|
370
560
|
prorationDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -376,13 +566,22 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
376
566
|
id: string;
|
|
377
567
|
name: string;
|
|
378
568
|
description: string;
|
|
379
|
-
prices:
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
569
|
+
prices: Record<string, {
|
|
570
|
+
month: {
|
|
571
|
+
amount: number;
|
|
572
|
+
currency: "usd";
|
|
573
|
+
interval: "month" | "year";
|
|
574
|
+
providerPriceId: string;
|
|
575
|
+
metadata?: Record<string, string> | undefined;
|
|
576
|
+
};
|
|
577
|
+
year?: {
|
|
578
|
+
amount: number;
|
|
579
|
+
currency: "usd";
|
|
580
|
+
interval: "month" | "year";
|
|
581
|
+
providerPriceId: string;
|
|
582
|
+
metadata?: Record<string, string> | undefined;
|
|
583
|
+
} | undefined;
|
|
584
|
+
}>;
|
|
386
585
|
providerProductId: string;
|
|
387
586
|
increments: Partial<Record<"bot_count" | "indexed_file_count" | "incoming_messages_events" | "integration_spend" | "table_rows" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions" | "conversation_sessions", number>>;
|
|
388
587
|
metadata?: Record<string, string> | undefined;
|
|
@@ -393,13 +592,22 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
393
592
|
id: string;
|
|
394
593
|
name: string;
|
|
395
594
|
description: string;
|
|
396
|
-
prices:
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
595
|
+
prices: Record<string, {
|
|
596
|
+
month: {
|
|
597
|
+
amount: number;
|
|
598
|
+
currency: "usd";
|
|
599
|
+
interval: "month" | "year";
|
|
600
|
+
providerPriceId: string;
|
|
601
|
+
metadata?: Record<string, string> | undefined;
|
|
602
|
+
};
|
|
603
|
+
year?: {
|
|
604
|
+
amount: number;
|
|
605
|
+
currency: "usd";
|
|
606
|
+
interval: "month" | "year";
|
|
607
|
+
providerPriceId: string;
|
|
608
|
+
metadata?: Record<string, string> | undefined;
|
|
609
|
+
} | undefined;
|
|
610
|
+
}>;
|
|
403
611
|
providerProductId: string;
|
|
404
612
|
increments: Partial<Record<"bot_count" | "indexed_file_count" | "incoming_messages_events" | "integration_spend" | "table_rows" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions" | "conversation_sessions", number>>;
|
|
405
613
|
metadata?: Record<string, string> | undefined;
|
|
@@ -535,13 +743,22 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
535
743
|
id: string;
|
|
536
744
|
name: string;
|
|
537
745
|
description: string;
|
|
538
|
-
prices:
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
746
|
+
prices: Record<string, {
|
|
747
|
+
month: {
|
|
748
|
+
amount: number;
|
|
749
|
+
currency: "usd";
|
|
750
|
+
interval: "month" | "year";
|
|
751
|
+
providerPriceId: string;
|
|
752
|
+
metadata?: Record<string, string> | undefined;
|
|
753
|
+
};
|
|
754
|
+
year?: {
|
|
755
|
+
amount: number;
|
|
756
|
+
currency: "usd";
|
|
757
|
+
interval: "month" | "year";
|
|
758
|
+
providerPriceId: string;
|
|
759
|
+
metadata?: Record<string, string> | undefined;
|
|
760
|
+
} | undefined;
|
|
761
|
+
}>;
|
|
545
762
|
providerProductId: string;
|
|
546
763
|
increments: Partial<Record<"bot_count" | "indexed_file_count" | "incoming_messages_events" | "integration_spend" | "table_rows" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions" | "conversation_sessions", number>>;
|
|
547
764
|
metadata?: Record<string, string> | undefined;
|
|
@@ -601,13 +818,22 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
601
818
|
id: string;
|
|
602
819
|
name: string;
|
|
603
820
|
description: string;
|
|
604
|
-
prices:
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
821
|
+
prices: Record<string, {
|
|
822
|
+
month: {
|
|
823
|
+
amount: number;
|
|
824
|
+
currency: "usd";
|
|
825
|
+
interval: "month" | "year";
|
|
826
|
+
providerPriceId: string;
|
|
827
|
+
metadata?: Record<string, string> | undefined;
|
|
828
|
+
};
|
|
829
|
+
year?: {
|
|
830
|
+
amount: number;
|
|
831
|
+
currency: "usd";
|
|
832
|
+
interval: "month" | "year";
|
|
833
|
+
providerPriceId: string;
|
|
834
|
+
metadata?: Record<string, string> | undefined;
|
|
835
|
+
} | undefined;
|
|
836
|
+
}>;
|
|
611
837
|
providerProductId: string;
|
|
612
838
|
increments: Partial<Record<"bot_count" | "indexed_file_count" | "incoming_messages_events" | "integration_spend" | "table_rows" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions" | "conversation_sessions", number>>;
|
|
613
839
|
metadata?: Record<string, string> | undefined;
|
|
@@ -711,24 +937,75 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
711
937
|
id: z.ZodString;
|
|
712
938
|
name: z.ZodString;
|
|
713
939
|
description: z.ZodString;
|
|
714
|
-
prices: z.ZodRecord<z.
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
940
|
+
prices: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
941
|
+
month: z.ZodObject<{
|
|
942
|
+
amount: z.ZodNumber;
|
|
943
|
+
currency: z.ZodEnum<["usd"]>;
|
|
944
|
+
interval: z.ZodEnum<["month", "year"]>;
|
|
945
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
946
|
+
providerPriceId: z.ZodString;
|
|
947
|
+
}, "strip", z.ZodTypeAny, {
|
|
948
|
+
amount: number;
|
|
949
|
+
currency: "usd";
|
|
950
|
+
interval: "month" | "year";
|
|
951
|
+
providerPriceId: string;
|
|
952
|
+
metadata?: Record<string, string> | undefined;
|
|
953
|
+
}, {
|
|
954
|
+
amount: number;
|
|
955
|
+
currency: "usd";
|
|
956
|
+
interval: "month" | "year";
|
|
957
|
+
providerPriceId: string;
|
|
958
|
+
metadata?: Record<string, string> | undefined;
|
|
959
|
+
}>;
|
|
960
|
+
year: z.ZodOptional<z.ZodObject<{
|
|
961
|
+
amount: z.ZodNumber;
|
|
962
|
+
currency: z.ZodEnum<["usd"]>;
|
|
963
|
+
interval: z.ZodEnum<["month", "year"]>;
|
|
964
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
965
|
+
providerPriceId: z.ZodString;
|
|
966
|
+
}, "strip", z.ZodTypeAny, {
|
|
967
|
+
amount: number;
|
|
968
|
+
currency: "usd";
|
|
969
|
+
interval: "month" | "year";
|
|
970
|
+
providerPriceId: string;
|
|
971
|
+
metadata?: Record<string, string> | undefined;
|
|
972
|
+
}, {
|
|
973
|
+
amount: number;
|
|
974
|
+
currency: "usd";
|
|
975
|
+
interval: "month" | "year";
|
|
976
|
+
providerPriceId: string;
|
|
977
|
+
metadata?: Record<string, string> | undefined;
|
|
978
|
+
}>>;
|
|
720
979
|
}, "strip", z.ZodTypeAny, {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
980
|
+
month: {
|
|
981
|
+
amount: number;
|
|
982
|
+
currency: "usd";
|
|
983
|
+
interval: "month" | "year";
|
|
984
|
+
providerPriceId: string;
|
|
985
|
+
metadata?: Record<string, string> | undefined;
|
|
986
|
+
};
|
|
987
|
+
year?: {
|
|
988
|
+
amount: number;
|
|
989
|
+
currency: "usd";
|
|
990
|
+
interval: "month" | "year";
|
|
991
|
+
providerPriceId: string;
|
|
992
|
+
metadata?: Record<string, string> | undefined;
|
|
993
|
+
} | undefined;
|
|
726
994
|
}, {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
995
|
+
month: {
|
|
996
|
+
amount: number;
|
|
997
|
+
currency: "usd";
|
|
998
|
+
interval: "month" | "year";
|
|
999
|
+
providerPriceId: string;
|
|
1000
|
+
metadata?: Record<string, string> | undefined;
|
|
1001
|
+
};
|
|
1002
|
+
year?: {
|
|
1003
|
+
amount: number;
|
|
1004
|
+
currency: "usd";
|
|
1005
|
+
interval: "month" | "year";
|
|
1006
|
+
providerPriceId: string;
|
|
1007
|
+
metadata?: Record<string, string> | undefined;
|
|
1008
|
+
} | undefined;
|
|
732
1009
|
}>>;
|
|
733
1010
|
increments: z.ZodRecord<z.ZodEnum<["incoming_messages_events", "integration_spend", "table_rows", "bot_count", "collaborator_count", "file_storage", "vector_db_storage", "saved_versions", "indexed_file_count", "conversation_sessions"]>, z.ZodNumber>;
|
|
734
1011
|
prorationDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -740,13 +1017,22 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
740
1017
|
id: string;
|
|
741
1018
|
name: string;
|
|
742
1019
|
description: string;
|
|
743
|
-
prices:
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
1020
|
+
prices: Record<string, {
|
|
1021
|
+
month: {
|
|
1022
|
+
amount: number;
|
|
1023
|
+
currency: "usd";
|
|
1024
|
+
interval: "month" | "year";
|
|
1025
|
+
providerPriceId: string;
|
|
1026
|
+
metadata?: Record<string, string> | undefined;
|
|
1027
|
+
};
|
|
1028
|
+
year?: {
|
|
1029
|
+
amount: number;
|
|
1030
|
+
currency: "usd";
|
|
1031
|
+
interval: "month" | "year";
|
|
1032
|
+
providerPriceId: string;
|
|
1033
|
+
metadata?: Record<string, string> | undefined;
|
|
1034
|
+
} | undefined;
|
|
1035
|
+
}>;
|
|
750
1036
|
providerProductId: string;
|
|
751
1037
|
increments: Partial<Record<"bot_count" | "indexed_file_count" | "incoming_messages_events" | "integration_spend" | "table_rows" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions" | "conversation_sessions", number>>;
|
|
752
1038
|
metadata?: Record<string, string> | undefined;
|
|
@@ -757,13 +1043,22 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
757
1043
|
id: string;
|
|
758
1044
|
name: string;
|
|
759
1045
|
description: string;
|
|
760
|
-
prices:
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
1046
|
+
prices: Record<string, {
|
|
1047
|
+
month: {
|
|
1048
|
+
amount: number;
|
|
1049
|
+
currency: "usd";
|
|
1050
|
+
interval: "month" | "year";
|
|
1051
|
+
providerPriceId: string;
|
|
1052
|
+
metadata?: Record<string, string> | undefined;
|
|
1053
|
+
};
|
|
1054
|
+
year?: {
|
|
1055
|
+
amount: number;
|
|
1056
|
+
currency: "usd";
|
|
1057
|
+
interval: "month" | "year";
|
|
1058
|
+
providerPriceId: string;
|
|
1059
|
+
metadata?: Record<string, string> | undefined;
|
|
1060
|
+
} | undefined;
|
|
1061
|
+
}>;
|
|
767
1062
|
providerProductId: string;
|
|
768
1063
|
increments: Partial<Record<"bot_count" | "indexed_file_count" | "incoming_messages_events" | "integration_spend" | "table_rows" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions" | "conversation_sessions", number>>;
|
|
769
1064
|
metadata?: Record<string, string> | undefined;
|
|
@@ -899,13 +1194,22 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
899
1194
|
id: string;
|
|
900
1195
|
name: string;
|
|
901
1196
|
description: string;
|
|
902
|
-
prices:
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
1197
|
+
prices: Record<string, {
|
|
1198
|
+
month: {
|
|
1199
|
+
amount: number;
|
|
1200
|
+
currency: "usd";
|
|
1201
|
+
interval: "month" | "year";
|
|
1202
|
+
providerPriceId: string;
|
|
1203
|
+
metadata?: Record<string, string> | undefined;
|
|
1204
|
+
};
|
|
1205
|
+
year?: {
|
|
1206
|
+
amount: number;
|
|
1207
|
+
currency: "usd";
|
|
1208
|
+
interval: "month" | "year";
|
|
1209
|
+
providerPriceId: string;
|
|
1210
|
+
metadata?: Record<string, string> | undefined;
|
|
1211
|
+
} | undefined;
|
|
1212
|
+
}>;
|
|
909
1213
|
providerProductId: string;
|
|
910
1214
|
increments: Partial<Record<"bot_count" | "indexed_file_count" | "incoming_messages_events" | "integration_spend" | "table_rows" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions" | "conversation_sessions", number>>;
|
|
911
1215
|
metadata?: Record<string, string> | undefined;
|
|
@@ -965,13 +1269,22 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
965
1269
|
id: string;
|
|
966
1270
|
name: string;
|
|
967
1271
|
description: string;
|
|
968
|
-
prices:
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1272
|
+
prices: Record<string, {
|
|
1273
|
+
month: {
|
|
1274
|
+
amount: number;
|
|
1275
|
+
currency: "usd";
|
|
1276
|
+
interval: "month" | "year";
|
|
1277
|
+
providerPriceId: string;
|
|
1278
|
+
metadata?: Record<string, string> | undefined;
|
|
1279
|
+
};
|
|
1280
|
+
year?: {
|
|
1281
|
+
amount: number;
|
|
1282
|
+
currency: "usd";
|
|
1283
|
+
interval: "month" | "year";
|
|
1284
|
+
providerPriceId: string;
|
|
1285
|
+
metadata?: Record<string, string> | undefined;
|
|
1286
|
+
} | undefined;
|
|
1287
|
+
}>;
|
|
975
1288
|
providerProductId: string;
|
|
976
1289
|
increments: Partial<Record<"bot_count" | "indexed_file_count" | "incoming_messages_events" | "integration_spend" | "table_rows" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions" | "conversation_sessions", number>>;
|
|
977
1290
|
metadata?: Record<string, string> | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.billingConfigSchema = exports.billingVersionConfigSchema = exports.meterSchema = exports.addOnSchema = exports.planSchema = exports.meteredPriceSchema = exports.priceSchema = exports.meterTypeSchema = exports.aggregationSchema = exports.unitAmountSchema = exports.intervalSchema = exports.featureSchema = exports.UNKNOWN_STRIPE_ID = void 0;
|
|
3
|
+
exports.billingConfigSchema = exports.billingVersionConfigSchema = exports.meterSchema = exports.addOnSchema = exports.addonPlanPricesSchema = exports.planSchema = exports.meteredPriceSchema = exports.priceSchema = exports.meterTypeSchema = exports.aggregationSchema = exports.unitAmountSchema = exports.intervalSchema = exports.featureSchema = exports.UNKNOWN_STRIPE_ID = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const features_1 = require("../features");
|
|
6
6
|
/**
|
|
@@ -37,11 +37,15 @@ exports.planSchema = zod_1.z.object({
|
|
|
37
37
|
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
38
38
|
providerProductId: zod_1.z.string(), // pulumi
|
|
39
39
|
});
|
|
40
|
+
exports.addonPlanPricesSchema = zod_1.z.object({
|
|
41
|
+
month: exports.priceSchema,
|
|
42
|
+
year: exports.priceSchema.optional(),
|
|
43
|
+
});
|
|
40
44
|
exports.addOnSchema = zod_1.z.object({
|
|
41
45
|
id: zod_1.z.string(),
|
|
42
46
|
name: zod_1.z.string(),
|
|
43
47
|
description: zod_1.z.string(),
|
|
44
|
-
prices: zod_1.z.record(
|
|
48
|
+
prices: zod_1.z.record(zod_1.z.string(), exports.addonPlanPricesSchema),
|
|
45
49
|
increments: zod_1.z.record(exports.featureSchema, zod_1.z.number().positive()),
|
|
46
50
|
prorationDisabled: zod_1.z.boolean().optional(),
|
|
47
51
|
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
@@ -158,14 +158,22 @@ export declare const billingConfig: {
|
|
|
158
158
|
readonly id: "conversation_sessions_addon";
|
|
159
159
|
readonly name: "Add-on - Conversation Sessions";
|
|
160
160
|
readonly description: "Adds 500 conversations sessions per month";
|
|
161
|
-
readonly prices: {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
161
|
+
readonly prices: Record<string, {
|
|
162
|
+
month: {
|
|
163
|
+
amount: number;
|
|
164
|
+
currency: "usd";
|
|
165
|
+
interval: "month" | "year";
|
|
166
|
+
providerPriceId: string;
|
|
167
|
+
metadata?: Record<string, string> | undefined;
|
|
167
168
|
};
|
|
168
|
-
|
|
169
|
+
year?: {
|
|
170
|
+
amount: number;
|
|
171
|
+
currency: "usd";
|
|
172
|
+
interval: "month" | "year";
|
|
173
|
+
providerPriceId: string;
|
|
174
|
+
metadata?: Record<string, string> | undefined;
|
|
175
|
+
} | undefined;
|
|
176
|
+
}>;
|
|
169
177
|
readonly increments: {
|
|
170
178
|
readonly conversation_sessions: 500;
|
|
171
179
|
};
|
|
@@ -176,14 +184,22 @@ export declare const billingConfig: {
|
|
|
176
184
|
readonly id: "storage_addon";
|
|
177
185
|
readonly name: "Add-on - Storage";
|
|
178
186
|
readonly description: "Adds table rows, vector db space and files";
|
|
179
|
-
readonly prices: {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
187
|
+
readonly prices: Record<string, {
|
|
188
|
+
month: {
|
|
189
|
+
amount: number;
|
|
190
|
+
currency: "usd";
|
|
191
|
+
interval: "month" | "year";
|
|
192
|
+
providerPriceId: string;
|
|
193
|
+
metadata?: Record<string, string> | undefined;
|
|
185
194
|
};
|
|
186
|
-
|
|
195
|
+
year?: {
|
|
196
|
+
amount: number;
|
|
197
|
+
currency: "usd";
|
|
198
|
+
interval: "month" | "year";
|
|
199
|
+
providerPriceId: string;
|
|
200
|
+
metadata?: Record<string, string> | undefined;
|
|
201
|
+
} | undefined;
|
|
202
|
+
}>;
|
|
187
203
|
readonly increments: {
|
|
188
204
|
readonly table_rows: 100000;
|
|
189
205
|
readonly vector_db_storage: number;
|
|
@@ -413,14 +429,22 @@ export declare const billingDefinitions: {
|
|
|
413
429
|
readonly id: "conversation_sessions_addon";
|
|
414
430
|
readonly name: "Add-on - Conversation Sessions";
|
|
415
431
|
readonly description: "Adds 500 conversations sessions per month";
|
|
416
|
-
readonly prices: {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
432
|
+
readonly prices: Record<string, {
|
|
433
|
+
month: {
|
|
434
|
+
amount: number;
|
|
435
|
+
currency: "usd";
|
|
436
|
+
interval: "month" | "year";
|
|
437
|
+
providerPriceId: string;
|
|
438
|
+
metadata?: Record<string, string> | undefined;
|
|
422
439
|
};
|
|
423
|
-
|
|
440
|
+
year?: {
|
|
441
|
+
amount: number;
|
|
442
|
+
currency: "usd";
|
|
443
|
+
interval: "month" | "year";
|
|
444
|
+
providerPriceId: string;
|
|
445
|
+
metadata?: Record<string, string> | undefined;
|
|
446
|
+
} | undefined;
|
|
447
|
+
}>;
|
|
424
448
|
readonly increments: {
|
|
425
449
|
readonly conversation_sessions: 500;
|
|
426
450
|
};
|
|
@@ -431,14 +455,22 @@ export declare const billingDefinitions: {
|
|
|
431
455
|
readonly id: "storage_addon";
|
|
432
456
|
readonly name: "Add-on - Storage";
|
|
433
457
|
readonly description: "Adds table rows, vector db space and files";
|
|
434
|
-
readonly prices: {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
458
|
+
readonly prices: Record<string, {
|
|
459
|
+
month: {
|
|
460
|
+
amount: number;
|
|
461
|
+
currency: "usd";
|
|
462
|
+
interval: "month" | "year";
|
|
463
|
+
providerPriceId: string;
|
|
464
|
+
metadata?: Record<string, string> | undefined;
|
|
440
465
|
};
|
|
441
|
-
|
|
466
|
+
year?: {
|
|
467
|
+
amount: number;
|
|
468
|
+
currency: "usd";
|
|
469
|
+
interval: "month" | "year";
|
|
470
|
+
providerPriceId: string;
|
|
471
|
+
metadata?: Record<string, string> | undefined;
|
|
472
|
+
} | undefined;
|
|
473
|
+
}>;
|
|
442
474
|
readonly increments: {
|
|
443
475
|
readonly table_rows: 100000;
|
|
444
476
|
readonly vector_db_storage: number;
|
package/dist/limits.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ export declare const limitConfigs: {
|
|
|
9
9
|
readonly value: 30;
|
|
10
10
|
readonly unit: "count";
|
|
11
11
|
};
|
|
12
|
+
readonly bot_installed_plugins_count: {
|
|
13
|
+
readonly value: 30;
|
|
14
|
+
readonly unit: "count";
|
|
15
|
+
};
|
|
12
16
|
readonly bot_integration_configuration_bytes: {
|
|
13
17
|
readonly value: 20480;
|
|
14
18
|
readonly unit: "bytes";
|
package/dist/limits.js
CHANGED