@bpinternal/const 0.18.0 → 0.20.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 +14 -16
- package/dist/billing-next/config/addons.js +14 -16
- package/dist/billing-next/config/schemas.d.ts +23 -23
- package/dist/billing-next/config/schemas.js +1 -1
- package/dist/billing-next/config/versions.d.ts +28 -32
- package/dist/limits.d.ts +4 -0
- package/dist/limits.js +4 -0
- package/package.json +1 -1
|
@@ -4,14 +4,13 @@ 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
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
7
|
+
readonly prices: Record<string, {
|
|
8
|
+
amount: number;
|
|
9
|
+
currency: "usd";
|
|
10
|
+
interval: "month" | "year";
|
|
11
|
+
providerPriceId: string;
|
|
12
|
+
metadata?: Record<string, string> | undefined;
|
|
13
|
+
}>;
|
|
15
14
|
readonly increments: {
|
|
16
15
|
readonly conversation_sessions: 500;
|
|
17
16
|
};
|
|
@@ -22,14 +21,13 @@ export declare const addons: {
|
|
|
22
21
|
readonly id: "storage_addon";
|
|
23
22
|
readonly name: "Add-on - Storage";
|
|
24
23
|
readonly description: "Adds table rows, vector db space and files";
|
|
25
|
-
readonly prices: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
24
|
+
readonly prices: Record<string, {
|
|
25
|
+
amount: number;
|
|
26
|
+
currency: "usd";
|
|
27
|
+
interval: "month" | "year";
|
|
28
|
+
providerPriceId: string;
|
|
29
|
+
metadata?: Record<string, string> | undefined;
|
|
30
|
+
}>;
|
|
33
31
|
readonly increments: {
|
|
34
32
|
readonly table_rows: 100000;
|
|
35
33
|
readonly vector_db_storage: number;
|
|
@@ -3,20 +3,25 @@ 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
|
+
const constantMonthlyPrice = (amount, scope = ['community', 'plus', 'team', 'enterprise', 'managed']) => {
|
|
7
|
+
return scope
|
|
8
|
+
.map((plan) => ({
|
|
9
|
+
[plan]: {
|
|
10
|
+
amount,
|
|
11
|
+
currency: 'usd',
|
|
12
|
+
interval: 'month',
|
|
13
|
+
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
14
|
+
},
|
|
15
|
+
}))
|
|
16
|
+
.reduce((acc, curr) => ({ ...acc, ...curr }), {});
|
|
17
|
+
};
|
|
6
18
|
/* IMPORTANT: the `name` field is used to match existing products in Stripe DO NOT CHANGE THE NAME OF AN EXISTING PRODUCT */
|
|
7
19
|
exports.addons = {
|
|
8
20
|
conversation_sessions_addon: {
|
|
9
21
|
id: 'conversation_sessions_addon',
|
|
10
22
|
name: 'Add-on - Conversation Sessions',
|
|
11
23
|
description: 'Adds 500 conversations sessions per month',
|
|
12
|
-
prices:
|
|
13
|
-
month: {
|
|
14
|
-
amount: 20, //TODO change for variable pricing
|
|
15
|
-
currency: 'usd',
|
|
16
|
-
interval: 'month',
|
|
17
|
-
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
24
|
+
prices: constantMonthlyPrice(20),
|
|
20
25
|
increments: { conversation_sessions: 500 },
|
|
21
26
|
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
22
27
|
autoRechargeable: true,
|
|
@@ -25,14 +30,7 @@ exports.addons = {
|
|
|
25
30
|
id: 'storage_addon',
|
|
26
31
|
name: 'Add-on - Storage',
|
|
27
32
|
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
|
-
},
|
|
33
|
+
prices: constantMonthlyPrice(40),
|
|
36
34
|
increments: {
|
|
37
35
|
table_rows: 100_000,
|
|
38
36
|
vector_db_storage: 1 * consts_1.GB,
|
|
@@ -117,7 +117,7 @@ export declare const addOnSchema: z.ZodObject<{
|
|
|
117
117
|
id: z.ZodString;
|
|
118
118
|
name: z.ZodString;
|
|
119
119
|
description: z.ZodString;
|
|
120
|
-
prices: z.ZodRecord<z.
|
|
120
|
+
prices: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
121
121
|
amount: z.ZodNumber;
|
|
122
122
|
currency: z.ZodEnum<["usd"]>;
|
|
123
123
|
interval: z.ZodEnum<["month", "year"]>;
|
|
@@ -146,13 +146,13 @@ export declare const addOnSchema: z.ZodObject<{
|
|
|
146
146
|
id: string;
|
|
147
147
|
name: string;
|
|
148
148
|
description: string;
|
|
149
|
-
prices:
|
|
149
|
+
prices: Record<string, {
|
|
150
150
|
amount: number;
|
|
151
151
|
currency: "usd";
|
|
152
152
|
interval: "month" | "year";
|
|
153
153
|
providerPriceId: string;
|
|
154
154
|
metadata?: Record<string, string> | undefined;
|
|
155
|
-
}
|
|
155
|
+
}>;
|
|
156
156
|
providerProductId: string;
|
|
157
157
|
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
158
|
metadata?: Record<string, string> | undefined;
|
|
@@ -163,13 +163,13 @@ export declare const addOnSchema: z.ZodObject<{
|
|
|
163
163
|
id: string;
|
|
164
164
|
name: string;
|
|
165
165
|
description: string;
|
|
166
|
-
prices:
|
|
166
|
+
prices: Record<string, {
|
|
167
167
|
amount: number;
|
|
168
168
|
currency: "usd";
|
|
169
169
|
interval: "month" | "year";
|
|
170
170
|
providerPriceId: string;
|
|
171
171
|
metadata?: Record<string, string> | undefined;
|
|
172
|
-
}
|
|
172
|
+
}>;
|
|
173
173
|
providerProductId: string;
|
|
174
174
|
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
175
|
metadata?: Record<string, string> | undefined;
|
|
@@ -347,7 +347,7 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
347
347
|
id: z.ZodString;
|
|
348
348
|
name: z.ZodString;
|
|
349
349
|
description: z.ZodString;
|
|
350
|
-
prices: z.ZodRecord<z.
|
|
350
|
+
prices: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
351
351
|
amount: z.ZodNumber;
|
|
352
352
|
currency: z.ZodEnum<["usd"]>;
|
|
353
353
|
interval: z.ZodEnum<["month", "year"]>;
|
|
@@ -376,13 +376,13 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
376
376
|
id: string;
|
|
377
377
|
name: string;
|
|
378
378
|
description: string;
|
|
379
|
-
prices:
|
|
379
|
+
prices: Record<string, {
|
|
380
380
|
amount: number;
|
|
381
381
|
currency: "usd";
|
|
382
382
|
interval: "month" | "year";
|
|
383
383
|
providerPriceId: string;
|
|
384
384
|
metadata?: Record<string, string> | undefined;
|
|
385
|
-
}
|
|
385
|
+
}>;
|
|
386
386
|
providerProductId: string;
|
|
387
387
|
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
388
|
metadata?: Record<string, string> | undefined;
|
|
@@ -393,13 +393,13 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
393
393
|
id: string;
|
|
394
394
|
name: string;
|
|
395
395
|
description: string;
|
|
396
|
-
prices:
|
|
396
|
+
prices: Record<string, {
|
|
397
397
|
amount: number;
|
|
398
398
|
currency: "usd";
|
|
399
399
|
interval: "month" | "year";
|
|
400
400
|
providerPriceId: string;
|
|
401
401
|
metadata?: Record<string, string> | undefined;
|
|
402
|
-
}
|
|
402
|
+
}>;
|
|
403
403
|
providerProductId: string;
|
|
404
404
|
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
405
|
metadata?: Record<string, string> | undefined;
|
|
@@ -535,13 +535,13 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
535
535
|
id: string;
|
|
536
536
|
name: string;
|
|
537
537
|
description: string;
|
|
538
|
-
prices:
|
|
538
|
+
prices: Record<string, {
|
|
539
539
|
amount: number;
|
|
540
540
|
currency: "usd";
|
|
541
541
|
interval: "month" | "year";
|
|
542
542
|
providerPriceId: string;
|
|
543
543
|
metadata?: Record<string, string> | undefined;
|
|
544
|
-
}
|
|
544
|
+
}>;
|
|
545
545
|
providerProductId: string;
|
|
546
546
|
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
547
|
metadata?: Record<string, string> | undefined;
|
|
@@ -601,13 +601,13 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
601
601
|
id: string;
|
|
602
602
|
name: string;
|
|
603
603
|
description: string;
|
|
604
|
-
prices:
|
|
604
|
+
prices: Record<string, {
|
|
605
605
|
amount: number;
|
|
606
606
|
currency: "usd";
|
|
607
607
|
interval: "month" | "year";
|
|
608
608
|
providerPriceId: string;
|
|
609
609
|
metadata?: Record<string, string> | undefined;
|
|
610
|
-
}
|
|
610
|
+
}>;
|
|
611
611
|
providerProductId: string;
|
|
612
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>>;
|
|
613
613
|
metadata?: Record<string, string> | undefined;
|
|
@@ -711,7 +711,7 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
711
711
|
id: z.ZodString;
|
|
712
712
|
name: z.ZodString;
|
|
713
713
|
description: z.ZodString;
|
|
714
|
-
prices: z.ZodRecord<z.
|
|
714
|
+
prices: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
715
715
|
amount: z.ZodNumber;
|
|
716
716
|
currency: z.ZodEnum<["usd"]>;
|
|
717
717
|
interval: z.ZodEnum<["month", "year"]>;
|
|
@@ -740,13 +740,13 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
740
740
|
id: string;
|
|
741
741
|
name: string;
|
|
742
742
|
description: string;
|
|
743
|
-
prices:
|
|
743
|
+
prices: Record<string, {
|
|
744
744
|
amount: number;
|
|
745
745
|
currency: "usd";
|
|
746
746
|
interval: "month" | "year";
|
|
747
747
|
providerPriceId: string;
|
|
748
748
|
metadata?: Record<string, string> | undefined;
|
|
749
|
-
}
|
|
749
|
+
}>;
|
|
750
750
|
providerProductId: string;
|
|
751
751
|
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
752
|
metadata?: Record<string, string> | undefined;
|
|
@@ -757,13 +757,13 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
757
757
|
id: string;
|
|
758
758
|
name: string;
|
|
759
759
|
description: string;
|
|
760
|
-
prices:
|
|
760
|
+
prices: Record<string, {
|
|
761
761
|
amount: number;
|
|
762
762
|
currency: "usd";
|
|
763
763
|
interval: "month" | "year";
|
|
764
764
|
providerPriceId: string;
|
|
765
765
|
metadata?: Record<string, string> | undefined;
|
|
766
|
-
}
|
|
766
|
+
}>;
|
|
767
767
|
providerProductId: string;
|
|
768
768
|
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
769
|
metadata?: Record<string, string> | undefined;
|
|
@@ -899,13 +899,13 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
899
899
|
id: string;
|
|
900
900
|
name: string;
|
|
901
901
|
description: string;
|
|
902
|
-
prices:
|
|
902
|
+
prices: Record<string, {
|
|
903
903
|
amount: number;
|
|
904
904
|
currency: "usd";
|
|
905
905
|
interval: "month" | "year";
|
|
906
906
|
providerPriceId: string;
|
|
907
907
|
metadata?: Record<string, string> | undefined;
|
|
908
|
-
}
|
|
908
|
+
}>;
|
|
909
909
|
providerProductId: string;
|
|
910
910
|
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
911
|
metadata?: Record<string, string> | undefined;
|
|
@@ -965,13 +965,13 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
965
965
|
id: string;
|
|
966
966
|
name: string;
|
|
967
967
|
description: string;
|
|
968
|
-
prices:
|
|
968
|
+
prices: Record<string, {
|
|
969
969
|
amount: number;
|
|
970
970
|
currency: "usd";
|
|
971
971
|
interval: "month" | "year";
|
|
972
972
|
providerPriceId: string;
|
|
973
973
|
metadata?: Record<string, string> | undefined;
|
|
974
|
-
}
|
|
974
|
+
}>;
|
|
975
975
|
providerProductId: string;
|
|
976
976
|
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
977
|
metadata?: Record<string, string> | undefined;
|
|
@@ -41,7 +41,7 @@ exports.addOnSchema = zod_1.z.object({
|
|
|
41
41
|
id: zod_1.z.string(),
|
|
42
42
|
name: zod_1.z.string(),
|
|
43
43
|
description: zod_1.z.string(),
|
|
44
|
-
prices: zod_1.z.record(
|
|
44
|
+
prices: zod_1.z.record(zod_1.z.string(), exports.priceSchema),
|
|
45
45
|
increments: zod_1.z.record(exports.featureSchema, zod_1.z.number().positive()),
|
|
46
46
|
prorationDisabled: zod_1.z.boolean().optional(),
|
|
47
47
|
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
@@ -158,14 +158,13 @@ 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
|
-
|
|
167
|
-
|
|
168
|
-
};
|
|
161
|
+
readonly prices: Record<string, {
|
|
162
|
+
amount: number;
|
|
163
|
+
currency: "usd";
|
|
164
|
+
interval: "month" | "year";
|
|
165
|
+
providerPriceId: string;
|
|
166
|
+
metadata?: Record<string, string> | undefined;
|
|
167
|
+
}>;
|
|
169
168
|
readonly increments: {
|
|
170
169
|
readonly conversation_sessions: 500;
|
|
171
170
|
};
|
|
@@ -176,14 +175,13 @@ export declare const billingConfig: {
|
|
|
176
175
|
readonly id: "storage_addon";
|
|
177
176
|
readonly name: "Add-on - Storage";
|
|
178
177
|
readonly description: "Adds table rows, vector db space and files";
|
|
179
|
-
readonly prices: {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
};
|
|
178
|
+
readonly prices: Record<string, {
|
|
179
|
+
amount: number;
|
|
180
|
+
currency: "usd";
|
|
181
|
+
interval: "month" | "year";
|
|
182
|
+
providerPriceId: string;
|
|
183
|
+
metadata?: Record<string, string> | undefined;
|
|
184
|
+
}>;
|
|
187
185
|
readonly increments: {
|
|
188
186
|
readonly table_rows: 100000;
|
|
189
187
|
readonly vector_db_storage: number;
|
|
@@ -413,14 +411,13 @@ export declare const billingDefinitions: {
|
|
|
413
411
|
readonly id: "conversation_sessions_addon";
|
|
414
412
|
readonly name: "Add-on - Conversation Sessions";
|
|
415
413
|
readonly description: "Adds 500 conversations sessions per month";
|
|
416
|
-
readonly prices: {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
};
|
|
414
|
+
readonly prices: Record<string, {
|
|
415
|
+
amount: number;
|
|
416
|
+
currency: "usd";
|
|
417
|
+
interval: "month" | "year";
|
|
418
|
+
providerPriceId: string;
|
|
419
|
+
metadata?: Record<string, string> | undefined;
|
|
420
|
+
}>;
|
|
424
421
|
readonly increments: {
|
|
425
422
|
readonly conversation_sessions: 500;
|
|
426
423
|
};
|
|
@@ -431,14 +428,13 @@ export declare const billingDefinitions: {
|
|
|
431
428
|
readonly id: "storage_addon";
|
|
432
429
|
readonly name: "Add-on - Storage";
|
|
433
430
|
readonly description: "Adds table rows, vector db space and files";
|
|
434
|
-
readonly prices: {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
};
|
|
431
|
+
readonly prices: Record<string, {
|
|
432
|
+
amount: number;
|
|
433
|
+
currency: "usd";
|
|
434
|
+
interval: "month" | "year";
|
|
435
|
+
providerPriceId: string;
|
|
436
|
+
metadata?: Record<string, string> | undefined;
|
|
437
|
+
}>;
|
|
442
438
|
readonly increments: {
|
|
443
439
|
readonly table_rows: 100000;
|
|
444
440
|
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