@bpinternal/const 0.4.1 → 0.4.2
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-plans.d.ts +5 -1
- package/dist/billing-plans.js +5 -1
- package/dist/quotas.d.ts +18 -2
- package/dist/quotas.js +17 -0
- package/dist/schema.d.ts +13 -0
- package/dist/schema.js +1 -0
- package/dist/types.d.ts +1 -0
- package/package.json +2 -2
package/dist/billing-plans.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const FREE_PRICE = -1;
|
|
6
6
|
export declare const ALLOWED_TRIAL_LENGTHS_IN_DAYS = 7;
|
|
7
|
-
export declare const ALLOWED_TRIAL_PLANS: readonly ["plus"];
|
|
7
|
+
export declare const ALLOWED_TRIAL_PLANS: readonly ["plus", "team"];
|
|
8
8
|
export declare const BILLING_PLAN_IDS: readonly ["community", "plus", "team", "enterprise"];
|
|
9
9
|
export declare const BILLING_ADDON_IDS: readonly ["bot_addon", "collaborator_addon", "always_alive_addon", "messages_events_addon", "table_rows_addon", "file_storage_addon", "vector_db_storage_addon", "web_search_addon", "ai_credits_addon", "enterprise_ai_token", "enterprise_additional_workspace"];
|
|
10
10
|
export declare const billingPlansDefs: {
|
|
@@ -12,6 +12,7 @@ export declare const billingPlansDefs: {
|
|
|
12
12
|
readonly id: "community";
|
|
13
13
|
readonly name: "Plan - Pay as you go";
|
|
14
14
|
readonly description: "Free plan for developers";
|
|
15
|
+
readonly tierIndex: 0;
|
|
15
16
|
readonly prices: [{
|
|
16
17
|
readonly price: -1;
|
|
17
18
|
readonly currency: "usd";
|
|
@@ -37,6 +38,7 @@ export declare const billingPlansDefs: {
|
|
|
37
38
|
readonly id: "plus";
|
|
38
39
|
readonly name: "Plan - Plus";
|
|
39
40
|
readonly description: "For growing businesses";
|
|
41
|
+
readonly tierIndex: 1;
|
|
40
42
|
readonly prices: [{
|
|
41
43
|
readonly price: 89;
|
|
42
44
|
readonly currency: "usd";
|
|
@@ -66,6 +68,7 @@ export declare const billingPlansDefs: {
|
|
|
66
68
|
readonly id: "team";
|
|
67
69
|
readonly name: "Plan - Team";
|
|
68
70
|
readonly description: "For small teams";
|
|
71
|
+
readonly tierIndex: 2;
|
|
69
72
|
readonly prices: [{
|
|
70
73
|
readonly price: 495;
|
|
71
74
|
readonly currency: "usd";
|
|
@@ -95,6 +98,7 @@ export declare const billingPlansDefs: {
|
|
|
95
98
|
readonly id: "enterprise";
|
|
96
99
|
readonly name: "Plan - Enterprise";
|
|
97
100
|
readonly description: "Enterprise license subscription";
|
|
101
|
+
readonly tierIndex: 3;
|
|
98
102
|
readonly prices: [{
|
|
99
103
|
readonly price: -1;
|
|
100
104
|
readonly currency: "usd";
|
package/dist/billing-plans.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.billingPlansDefs = exports.BILLING_ADDON_IDS = exports.BILLING_PLAN_IDS
|
|
|
7
7
|
*/
|
|
8
8
|
exports.FREE_PRICE = -1;
|
|
9
9
|
exports.ALLOWED_TRIAL_LENGTHS_IN_DAYS = 7;
|
|
10
|
-
exports.ALLOWED_TRIAL_PLANS = ['plus'];
|
|
10
|
+
exports.ALLOWED_TRIAL_PLANS = ['plus', 'team'];
|
|
11
11
|
// keep this in order of lowest to highest tier
|
|
12
12
|
exports.BILLING_PLAN_IDS = ['community', 'plus', 'team', 'enterprise'];
|
|
13
13
|
exports.BILLING_ADDON_IDS = [
|
|
@@ -29,6 +29,7 @@ exports.billingPlansDefs = {
|
|
|
29
29
|
id: 'community',
|
|
30
30
|
name: 'Plan - Pay as you go',
|
|
31
31
|
description: 'Free plan for developers',
|
|
32
|
+
tierIndex: 0,
|
|
32
33
|
prices: [
|
|
33
34
|
{
|
|
34
35
|
price: exports.FREE_PRICE,
|
|
@@ -56,6 +57,7 @@ exports.billingPlansDefs = {
|
|
|
56
57
|
id: 'plus',
|
|
57
58
|
name: 'Plan - Plus',
|
|
58
59
|
description: 'For growing businesses',
|
|
60
|
+
tierIndex: 1,
|
|
59
61
|
prices: [
|
|
60
62
|
{
|
|
61
63
|
price: 89,
|
|
@@ -88,6 +90,7 @@ exports.billingPlansDefs = {
|
|
|
88
90
|
id: 'team',
|
|
89
91
|
name: 'Plan - Team',
|
|
90
92
|
description: 'For small teams',
|
|
93
|
+
tierIndex: 2,
|
|
91
94
|
prices: [
|
|
92
95
|
{
|
|
93
96
|
price: 495,
|
|
@@ -120,6 +123,7 @@ exports.billingPlansDefs = {
|
|
|
120
123
|
id: 'enterprise',
|
|
121
124
|
name: 'Plan - Enterprise',
|
|
122
125
|
description: 'Enterprise license subscription',
|
|
126
|
+
tierIndex: 3,
|
|
123
127
|
prices: [
|
|
124
128
|
{
|
|
125
129
|
price: exports.FREE_PRICE, // Custom pricing
|
package/dist/quotas.d.ts
CHANGED
|
@@ -29,9 +29,9 @@ export type Quota = {
|
|
|
29
29
|
parent?: QuotaType;
|
|
30
30
|
};
|
|
31
31
|
export type QuotaKind = 'workspace' | 'bot';
|
|
32
|
-
export type QuotaCategory = 'ratelimit' | 'count' | 'calls' | 'timeout' | 'credit';
|
|
32
|
+
export type QuotaCategory = 'ratelimit' | 'count' | 'calls' | 'timeout' | 'credit' | 'limit';
|
|
33
33
|
export type QuotaType = (typeof quotaTypes)[number];
|
|
34
|
-
export declare const quotaTypes: readonly ["invocation_timeout", "invocation_calls", "storage_count", "bot_count", "knowledgebase_vector_storage", "workspace_ratelimit", "table_row_count", "workspace_member_count", "integrations_owned_count", "ai_spend", "openai_spend", "bing_search_spend", "always_alive", "indexed_file_count"];
|
|
34
|
+
export declare const quotaTypes: readonly ["invocation_timeout", "invocation_calls", "storage_count", "bot_count", "knowledgebase_vector_storage", "workspace_ratelimit", "table_row_count", "workspace_member_count", "integrations_owned_count", "ai_spend", "openai_spend", "bing_search_spend", "always_alive", "indexed_file_count", "file_max_size_bytes"];
|
|
35
35
|
export declare const quotaConfigs: {
|
|
36
36
|
readonly invocation_timeout: {
|
|
37
37
|
readonly name: "Invocation Timeout";
|
|
@@ -147,6 +147,14 @@ export declare const quotaConfigs: {
|
|
|
147
147
|
readonly category: "count";
|
|
148
148
|
readonly trackUsagePerBot: true;
|
|
149
149
|
};
|
|
150
|
+
readonly file_max_size_bytes: {
|
|
151
|
+
readonly name: "Max File Size";
|
|
152
|
+
readonly description: "Maximum size of a file in bytes.";
|
|
153
|
+
readonly default: 100000000;
|
|
154
|
+
readonly kind: "workspace";
|
|
155
|
+
readonly category: "limit";
|
|
156
|
+
readonly trackUsagePerBot: true;
|
|
157
|
+
};
|
|
150
158
|
};
|
|
151
159
|
export declare const quotaConfigsV3: {
|
|
152
160
|
readonly invocation_timeout: {
|
|
@@ -263,4 +271,12 @@ export declare const quotaConfigsV3: {
|
|
|
263
271
|
readonly category: "count";
|
|
264
272
|
readonly trackUsagePerBot: true;
|
|
265
273
|
};
|
|
274
|
+
readonly file_max_size_bytes: {
|
|
275
|
+
readonly name: "Max File Size";
|
|
276
|
+
readonly description: "Maximum size of a file in bytes.";
|
|
277
|
+
readonly default: 100000000;
|
|
278
|
+
readonly kind: "workspace";
|
|
279
|
+
readonly category: "limit";
|
|
280
|
+
readonly trackUsagePerBot: true;
|
|
281
|
+
};
|
|
266
282
|
};
|
package/dist/quotas.js
CHANGED
|
@@ -16,6 +16,7 @@ exports.quotaTypes = [
|
|
|
16
16
|
'bing_search_spend',
|
|
17
17
|
'always_alive',
|
|
18
18
|
'indexed_file_count',
|
|
19
|
+
'file_max_size_bytes',
|
|
19
20
|
];
|
|
20
21
|
exports.quotaConfigs = {
|
|
21
22
|
invocation_timeout: {
|
|
@@ -132,6 +133,14 @@ exports.quotaConfigs = {
|
|
|
132
133
|
category: 'count',
|
|
133
134
|
trackUsagePerBot: true,
|
|
134
135
|
},
|
|
136
|
+
file_max_size_bytes: {
|
|
137
|
+
name: 'Max File Size',
|
|
138
|
+
description: 'Maximum size of a file in bytes.',
|
|
139
|
+
default: 100_000_000, // 100 MB
|
|
140
|
+
kind: 'workspace',
|
|
141
|
+
category: 'limit',
|
|
142
|
+
trackUsagePerBot: true,
|
|
143
|
+
},
|
|
135
144
|
};
|
|
136
145
|
exports.quotaConfigsV3 = {
|
|
137
146
|
invocation_timeout: {
|
|
@@ -248,4 +257,12 @@ exports.quotaConfigsV3 = {
|
|
|
248
257
|
category: 'count',
|
|
249
258
|
trackUsagePerBot: true,
|
|
250
259
|
},
|
|
260
|
+
file_max_size_bytes: {
|
|
261
|
+
name: 'Max File Size',
|
|
262
|
+
description: 'Maximum size of a file in bytes.',
|
|
263
|
+
default: 100_000_000, // 100 MB
|
|
264
|
+
kind: 'workspace',
|
|
265
|
+
category: 'limit',
|
|
266
|
+
trackUsagePerBot: true,
|
|
267
|
+
},
|
|
251
268
|
};
|
package/dist/schema.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare const planSchema: z.ZodObject<{
|
|
|
24
24
|
id: z.ZodString;
|
|
25
25
|
name: z.ZodString;
|
|
26
26
|
description: z.ZodString;
|
|
27
|
+
tierIndex: z.ZodNumber;
|
|
27
28
|
providerProductId: z.ZodString;
|
|
28
29
|
prices: z.ZodRecord<z.ZodEnum<["month", "year"]>, z.ZodObject<{
|
|
29
30
|
providerPriceId: z.ZodString;
|
|
@@ -50,6 +51,7 @@ export declare const planSchema: z.ZodObject<{
|
|
|
50
51
|
id: string;
|
|
51
52
|
name: string;
|
|
52
53
|
description: string;
|
|
54
|
+
tierIndex: number;
|
|
53
55
|
providerProductId: string;
|
|
54
56
|
prices: Partial<Record<"month" | "year", {
|
|
55
57
|
providerPriceId: string;
|
|
@@ -64,6 +66,7 @@ export declare const planSchema: z.ZodObject<{
|
|
|
64
66
|
id: string;
|
|
65
67
|
name: string;
|
|
66
68
|
description: string;
|
|
69
|
+
tierIndex: number;
|
|
67
70
|
providerProductId: string;
|
|
68
71
|
prices: Partial<Record<"month" | "year", {
|
|
69
72
|
providerPriceId: string;
|
|
@@ -141,6 +144,7 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
141
144
|
id: z.ZodString;
|
|
142
145
|
name: z.ZodString;
|
|
143
146
|
description: z.ZodString;
|
|
147
|
+
tierIndex: z.ZodNumber;
|
|
144
148
|
providerProductId: z.ZodString;
|
|
145
149
|
prices: z.ZodRecord<z.ZodEnum<["month", "year"]>, z.ZodObject<{
|
|
146
150
|
providerPriceId: z.ZodString;
|
|
@@ -167,6 +171,7 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
167
171
|
id: string;
|
|
168
172
|
name: string;
|
|
169
173
|
description: string;
|
|
174
|
+
tierIndex: number;
|
|
170
175
|
providerProductId: string;
|
|
171
176
|
prices: Partial<Record<"month" | "year", {
|
|
172
177
|
providerPriceId: string;
|
|
@@ -181,6 +186,7 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
181
186
|
id: string;
|
|
182
187
|
name: string;
|
|
183
188
|
description: string;
|
|
189
|
+
tierIndex: number;
|
|
184
190
|
providerProductId: string;
|
|
185
191
|
prices: Partial<Record<"month" | "year", {
|
|
186
192
|
providerPriceId: string;
|
|
@@ -260,6 +266,7 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
260
266
|
id: string;
|
|
261
267
|
name: string;
|
|
262
268
|
description: string;
|
|
269
|
+
tierIndex: number;
|
|
263
270
|
providerProductId: string;
|
|
264
271
|
prices: Partial<Record<"month" | "year", {
|
|
265
272
|
providerPriceId: string;
|
|
@@ -297,6 +304,7 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
297
304
|
id: string;
|
|
298
305
|
name: string;
|
|
299
306
|
description: string;
|
|
307
|
+
tierIndex: number;
|
|
300
308
|
providerProductId: string;
|
|
301
309
|
prices: Partial<Record<"month" | "year", {
|
|
302
310
|
providerPriceId: string;
|
|
@@ -335,6 +343,7 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
|
|
|
335
343
|
id: z.ZodString;
|
|
336
344
|
name: z.ZodString;
|
|
337
345
|
description: z.ZodString;
|
|
346
|
+
tierIndex: z.ZodNumber;
|
|
338
347
|
providerProductId: z.ZodString;
|
|
339
348
|
prices: z.ZodRecord<z.ZodEnum<["month", "year"]>, z.ZodObject<{
|
|
340
349
|
providerPriceId: z.ZodString;
|
|
@@ -361,6 +370,7 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
|
|
|
361
370
|
id: string;
|
|
362
371
|
name: string;
|
|
363
372
|
description: string;
|
|
373
|
+
tierIndex: number;
|
|
364
374
|
providerProductId: string;
|
|
365
375
|
prices: Partial<Record<"month" | "year", {
|
|
366
376
|
providerPriceId: string;
|
|
@@ -375,6 +385,7 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
|
|
|
375
385
|
id: string;
|
|
376
386
|
name: string;
|
|
377
387
|
description: string;
|
|
388
|
+
tierIndex: number;
|
|
378
389
|
providerProductId: string;
|
|
379
390
|
prices: Partial<Record<"month" | "year", {
|
|
380
391
|
providerPriceId: string;
|
|
@@ -454,6 +465,7 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
|
|
|
454
465
|
id: string;
|
|
455
466
|
name: string;
|
|
456
467
|
description: string;
|
|
468
|
+
tierIndex: number;
|
|
457
469
|
providerProductId: string;
|
|
458
470
|
prices: Partial<Record<"month" | "year", {
|
|
459
471
|
providerPriceId: string;
|
|
@@ -491,6 +503,7 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
|
|
|
491
503
|
id: string;
|
|
492
504
|
name: string;
|
|
493
505
|
description: string;
|
|
506
|
+
tierIndex: number;
|
|
494
507
|
providerProductId: string;
|
|
495
508
|
prices: Partial<Record<"month" | "year", {
|
|
496
509
|
providerPriceId: string;
|
package/dist/schema.js
CHANGED
|
@@ -17,6 +17,7 @@ exports.planSchema = zod_1.z.object({
|
|
|
17
17
|
id: zod_1.z.string(),
|
|
18
18
|
name: zod_1.z.string(),
|
|
19
19
|
description: zod_1.z.string(),
|
|
20
|
+
tierIndex: zod_1.z.number(),
|
|
20
21
|
providerProductId: zod_1.z.string(),
|
|
21
22
|
prices: zod_1.z.record(exports.intervalSchema, exports.priceSchema),
|
|
22
23
|
features: zod_1.z.record(exports.featureSchema, zod_1.z.any()),
|
package/dist/types.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export type BillingPlanDefinition = {
|
|
|
24
24
|
id: BillingPlanId;
|
|
25
25
|
name: string;
|
|
26
26
|
description: string;
|
|
27
|
+
tierIndex: number;
|
|
27
28
|
prices: Array<BillingPriceDefinition>;
|
|
28
29
|
features: Partial<Record<BillingFeatureId, number | boolean>>;
|
|
29
30
|
metadata?: Record<string, string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpinternal/const",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Shared constants for Skynet billing refactor (vendored copy of upstream packages/const)",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"typescript": "5.
|
|
12
|
+
"typescript": "5.9.3"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"zod": "^3.24.4"
|