@bpinternal/const 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,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.addonPlanPricesSchema = 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.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,15 +37,11 @@ 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
- });
44
40
  exports.addOnSchema = zod_1.z.object({
45
41
  id: zod_1.z.string(),
46
42
  name: zod_1.z.string(),
47
43
  description: zod_1.z.string(),
48
- prices: zod_1.z.record(zod_1.z.string(), exports.addonPlanPricesSchema),
44
+ prices: zod_1.z.record(zod_1.z.string(), exports.priceSchema),
49
45
  increments: zod_1.z.record(exports.featureSchema, zod_1.z.number().positive()),
50
46
  prorationDisabled: zod_1.z.boolean().optional(),
51
47
  metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
@@ -7,8 +7,8 @@ export declare const billingConfig: {
7
7
  readonly plans: {
8
8
  readonly community: {
9
9
  readonly id: "community";
10
- readonly name: "Plan - Pay as you go";
11
- readonly description: "Free plan for developers";
10
+ readonly name: "Plan - Free";
11
+ readonly description: "Free plan for trying things out";
12
12
  readonly tierIndex: 0;
13
13
  readonly prices: {
14
14
  readonly month: {
@@ -19,13 +19,13 @@ export declare const billingConfig: {
19
19
  };
20
20
  };
21
21
  readonly features: {
22
- readonly incoming_messages_events: 500;
23
- readonly integration_spend: 5000000000;
22
+ readonly incoming_messages_events: 5000000;
23
+ readonly integration_spend: number;
24
24
  readonly table_rows: 1000;
25
- readonly bot_count: 1;
25
+ readonly bot_count: 3;
26
26
  readonly collaborator_count: 1;
27
- readonly file_storage: 100000000;
28
- readonly vector_db_storage: 100000000;
27
+ readonly file_storage: number;
28
+ readonly vector_db_storage: number;
29
29
  readonly saved_versions: 3;
30
30
  readonly indexed_file_count: 1000;
31
31
  readonly conversation_sessions: 100;
@@ -39,26 +39,26 @@ export declare const billingConfig: {
39
39
  readonly tierIndex: 1;
40
40
  readonly prices: {
41
41
  readonly month: {
42
- readonly amount: 89;
42
+ readonly amount: 189;
43
43
  readonly currency: "usd";
44
44
  readonly interval: "month";
45
45
  readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
46
46
  };
47
47
  readonly year: {
48
- readonly amount: 948;
48
+ readonly amount: number;
49
49
  readonly currency: "usd";
50
50
  readonly interval: "year";
51
51
  readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
52
52
  };
53
53
  };
54
54
  readonly features: {
55
- readonly incoming_messages_events: 5000;
56
- readonly integration_spend: 5000000000;
55
+ readonly incoming_messages_events: 5000000;
56
+ readonly integration_spend: number;
57
57
  readonly table_rows: 100000;
58
- readonly bot_count: 2;
59
- readonly collaborator_count: 2;
60
- readonly file_storage: 10000000000;
61
- readonly vector_db_storage: 1000000000;
58
+ readonly bot_count: 5000;
59
+ readonly collaborator_count: 3;
60
+ readonly file_storage: number;
61
+ readonly vector_db_storage: number;
62
62
  readonly saved_versions: 50;
63
63
  readonly indexed_file_count: 2000;
64
64
  readonly conversation_sessions: 250;
@@ -72,29 +72,29 @@ export declare const billingConfig: {
72
72
  readonly tierIndex: 2;
73
73
  readonly prices: {
74
74
  readonly month: {
75
- readonly amount: 495;
75
+ readonly amount: 939;
76
76
  readonly currency: "usd";
77
77
  readonly interval: "month";
78
78
  readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
79
79
  };
80
80
  readonly year: {
81
- readonly amount: 5346;
81
+ readonly amount: number;
82
82
  readonly currency: "usd";
83
83
  readonly interval: "year";
84
84
  readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
85
85
  };
86
86
  };
87
87
  readonly features: {
88
- readonly incoming_messages_events: 50000;
89
- readonly integration_spend: 5000000000;
90
- readonly table_rows: 100000;
91
- readonly bot_count: 3;
92
- readonly collaborator_count: 3;
93
- readonly file_storage: 10000000000;
94
- readonly vector_db_storage: 2000000000;
88
+ readonly incoming_messages_events: 5000000;
89
+ readonly integration_spend: number;
90
+ readonly table_rows: 500000;
91
+ readonly bot_count: 5000;
92
+ readonly collaborator_count: 5000;
93
+ readonly file_storage: number;
94
+ readonly vector_db_storage: number;
95
95
  readonly saved_versions: 100;
96
- readonly indexed_file_count: 10000;
97
- readonly conversation_sessions: 1000;
96
+ readonly indexed_file_count: 5000000;
97
+ readonly conversation_sessions: 1500;
98
98
  };
99
99
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
100
100
  };
@@ -157,25 +157,30 @@ export declare const billingConfig: {
157
157
  readonly conversation_sessions_addon: {
158
158
  readonly id: "conversation_sessions_addon";
159
159
  readonly name: "Add-on - Conversation Sessions";
160
- readonly description: "Adds 500 conversations sessions per month";
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;
160
+ readonly description: "Adds conversations sessions for the month";
161
+ readonly prices: {
162
+ readonly plus: {
163
+ readonly amount: 65;
164
+ readonly currency: "usd";
165
+ readonly interval: "month";
166
+ readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
168
167
  };
169
- year?: {
170
- amount: number;
171
- currency: "usd";
172
- interval: "month" | "year";
173
- providerPriceId: string;
174
- metadata?: Record<string, string> | undefined;
175
- } | undefined;
176
- }>;
168
+ readonly team: {
169
+ readonly amount: 50;
170
+ readonly currency: "usd";
171
+ readonly interval: "month";
172
+ readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
173
+ };
174
+ readonly enterprise: {
175
+ readonly amount: -1;
176
+ readonly currency: "usd";
177
+ readonly interval: "month";
178
+ readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
179
+ };
180
+ };
177
181
  readonly increments: {
178
- readonly conversation_sessions: 500;
182
+ readonly conversation_sessions: 100;
183
+ readonly ai_spend: number;
179
184
  };
180
185
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
181
186
  readonly autoRechargeable: true;
@@ -185,20 +190,11 @@ export declare const billingConfig: {
185
190
  readonly name: "Add-on - Storage";
186
191
  readonly description: "Adds table rows, vector db space and files";
187
192
  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;
194
- };
195
- year?: {
196
- amount: number;
197
- currency: "usd";
198
- interval: "month" | "year";
199
- providerPriceId: string;
200
- metadata?: Record<string, string> | undefined;
201
- } | undefined;
193
+ amount: number;
194
+ currency: "usd";
195
+ interval: "month" | "year";
196
+ providerPriceId: string;
197
+ metadata?: Record<string, string> | undefined;
202
198
  }>;
203
199
  readonly increments: {
204
200
  readonly table_rows: 100000;
@@ -278,8 +274,8 @@ export declare const billingDefinitions: {
278
274
  readonly plans: {
279
275
  readonly community: {
280
276
  readonly id: "community";
281
- readonly name: "Plan - Pay as you go";
282
- readonly description: "Free plan for developers";
277
+ readonly name: "Plan - Free";
278
+ readonly description: "Free plan for trying things out";
283
279
  readonly tierIndex: 0;
284
280
  readonly prices: {
285
281
  readonly month: {
@@ -290,13 +286,13 @@ export declare const billingDefinitions: {
290
286
  };
291
287
  };
292
288
  readonly features: {
293
- readonly incoming_messages_events: 500;
294
- readonly integration_spend: 5000000000;
289
+ readonly incoming_messages_events: 5000000;
290
+ readonly integration_spend: number;
295
291
  readonly table_rows: 1000;
296
- readonly bot_count: 1;
292
+ readonly bot_count: 3;
297
293
  readonly collaborator_count: 1;
298
- readonly file_storage: 100000000;
299
- readonly vector_db_storage: 100000000;
294
+ readonly file_storage: number;
295
+ readonly vector_db_storage: number;
300
296
  readonly saved_versions: 3;
301
297
  readonly indexed_file_count: 1000;
302
298
  readonly conversation_sessions: 100;
@@ -310,26 +306,26 @@ export declare const billingDefinitions: {
310
306
  readonly tierIndex: 1;
311
307
  readonly prices: {
312
308
  readonly month: {
313
- readonly amount: 89;
309
+ readonly amount: 189;
314
310
  readonly currency: "usd";
315
311
  readonly interval: "month";
316
312
  readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
317
313
  };
318
314
  readonly year: {
319
- readonly amount: 948;
315
+ readonly amount: number;
320
316
  readonly currency: "usd";
321
317
  readonly interval: "year";
322
318
  readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
323
319
  };
324
320
  };
325
321
  readonly features: {
326
- readonly incoming_messages_events: 5000;
327
- readonly integration_spend: 5000000000;
322
+ readonly incoming_messages_events: 5000000;
323
+ readonly integration_spend: number;
328
324
  readonly table_rows: 100000;
329
- readonly bot_count: 2;
330
- readonly collaborator_count: 2;
331
- readonly file_storage: 10000000000;
332
- readonly vector_db_storage: 1000000000;
325
+ readonly bot_count: 5000;
326
+ readonly collaborator_count: 3;
327
+ readonly file_storage: number;
328
+ readonly vector_db_storage: number;
333
329
  readonly saved_versions: 50;
334
330
  readonly indexed_file_count: 2000;
335
331
  readonly conversation_sessions: 250;
@@ -343,29 +339,29 @@ export declare const billingDefinitions: {
343
339
  readonly tierIndex: 2;
344
340
  readonly prices: {
345
341
  readonly month: {
346
- readonly amount: 495;
342
+ readonly amount: 939;
347
343
  readonly currency: "usd";
348
344
  readonly interval: "month";
349
345
  readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
350
346
  };
351
347
  readonly year: {
352
- readonly amount: 5346;
348
+ readonly amount: number;
353
349
  readonly currency: "usd";
354
350
  readonly interval: "year";
355
351
  readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
356
352
  };
357
353
  };
358
354
  readonly features: {
359
- readonly incoming_messages_events: 50000;
360
- readonly integration_spend: 5000000000;
361
- readonly table_rows: 100000;
362
- readonly bot_count: 3;
363
- readonly collaborator_count: 3;
364
- readonly file_storage: 10000000000;
365
- readonly vector_db_storage: 2000000000;
355
+ readonly incoming_messages_events: 5000000;
356
+ readonly integration_spend: number;
357
+ readonly table_rows: 500000;
358
+ readonly bot_count: 5000;
359
+ readonly collaborator_count: 5000;
360
+ readonly file_storage: number;
361
+ readonly vector_db_storage: number;
366
362
  readonly saved_versions: 100;
367
- readonly indexed_file_count: 10000;
368
- readonly conversation_sessions: 1000;
363
+ readonly indexed_file_count: 5000000;
364
+ readonly conversation_sessions: 1500;
369
365
  };
370
366
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
371
367
  };
@@ -428,25 +424,30 @@ export declare const billingDefinitions: {
428
424
  readonly conversation_sessions_addon: {
429
425
  readonly id: "conversation_sessions_addon";
430
426
  readonly name: "Add-on - Conversation Sessions";
431
- readonly description: "Adds 500 conversations sessions per month";
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;
427
+ readonly description: "Adds conversations sessions for the month";
428
+ readonly prices: {
429
+ readonly plus: {
430
+ readonly amount: 65;
431
+ readonly currency: "usd";
432
+ readonly interval: "month";
433
+ readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
439
434
  };
440
- year?: {
441
- amount: number;
442
- currency: "usd";
443
- interval: "month" | "year";
444
- providerPriceId: string;
445
- metadata?: Record<string, string> | undefined;
446
- } | undefined;
447
- }>;
435
+ readonly team: {
436
+ readonly amount: 50;
437
+ readonly currency: "usd";
438
+ readonly interval: "month";
439
+ readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
440
+ };
441
+ readonly enterprise: {
442
+ readonly amount: -1;
443
+ readonly currency: "usd";
444
+ readonly interval: "month";
445
+ readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
446
+ };
447
+ };
448
448
  readonly increments: {
449
- readonly conversation_sessions: 500;
449
+ readonly conversation_sessions: 100;
450
+ readonly ai_spend: number;
450
451
  };
451
452
  readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
452
453
  readonly autoRechargeable: true;
@@ -456,20 +457,11 @@ export declare const billingDefinitions: {
456
457
  readonly name: "Add-on - Storage";
457
458
  readonly description: "Adds table rows, vector db space and files";
458
459
  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;
465
- };
466
- year?: {
467
- amount: number;
468
- currency: "usd";
469
- interval: "month" | "year";
470
- providerPriceId: string;
471
- metadata?: Record<string, string> | undefined;
472
- } | undefined;
460
+ amount: number;
461
+ currency: "usd";
462
+ interval: "month" | "year";
463
+ providerPriceId: string;
464
+ metadata?: Record<string, string> | undefined;
473
465
  }>;
474
466
  readonly increments: {
475
467
  readonly table_rows: 100000;
@@ -4,3 +4,8 @@
4
4
  */
5
5
  export declare const FREE_PRICE = -1;
6
6
  export declare const GB = 1000000000;
7
+ export declare const MB = 1000000;
8
+ export declare const SMALL_UNLIMITED = 5000;
9
+ export declare const BIG_UNLIMITED = 5000000;
10
+ export declare const NANO_DOLLAR_IN_DOLLAR = 1000000000;
11
+ export declare const YEAR_MONTHS = 12;
@@ -1,9 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GB = exports.FREE_PRICE = void 0;
3
+ exports.YEAR_MONTHS = exports.NANO_DOLLAR_IN_DOLLAR = exports.BIG_UNLIMITED = exports.SMALL_UNLIMITED = exports.MB = exports.GB = exports.FREE_PRICE = void 0;
4
4
  /**
5
5
  * Special price value indicating a free product/plan.
6
6
  * This will be converted to $0 during deployment.
7
7
  */
8
8
  exports.FREE_PRICE = -1;
9
9
  exports.GB = 1_000_000_000;
10
+ exports.MB = 1_000_000;
11
+ exports.SMALL_UNLIMITED = 5000;
12
+ exports.BIG_UNLIMITED = 5_000_000;
13
+ exports.NANO_DOLLAR_IN_DOLLAR = 1_000_000_000;
14
+ exports.YEAR_MONTHS = 12;
@@ -70,6 +70,12 @@ export declare const billingFeatureDefinitions: [{
70
70
  readonly description: "Number of conversation sessions that can occur";
71
71
  readonly resetPeriod: "monthly";
72
72
  readonly consistency: "eventual";
73
+ }, {
74
+ readonly id: "ai_spend";
75
+ readonly name: "AI Spend";
76
+ readonly description: "Amount that is useable for AI in nano-dollars";
77
+ readonly resetPeriod: "monthly";
78
+ readonly consistency: "eventual";
73
79
  }];
74
80
  export type BillingFeatureDefinitions = typeof billingFeatureDefinitions;
75
81
  export type AtomicBillingFeatureDefinitions = FilterTuple<BillingFeatureDefinitions, {
@@ -83,6 +83,13 @@ exports.billingFeatureDefinitions = [
83
83
  resetPeriod: 'monthly',
84
84
  consistency: 'eventual',
85
85
  },
86
+ {
87
+ id: 'ai_spend',
88
+ name: 'AI Spend',
89
+ description: 'Amount that is useable for AI in nano-dollars',
90
+ resetPeriod: 'monthly',
91
+ consistency: 'eventual',
92
+ },
86
93
  ];
87
94
  exports.BILLING_FEATURE_IDS = exports.billingFeatureDefinitions.map((def) => def.id);
88
95
  exports.ATOMIC_BILLING_FEATURE_IDS = exports.billingFeatureDefinitions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpinternal/const",
3
- "version": "0.19.0",
3
+ "version": "0.21.0",
4
4
  "description": "Shared constants for Skynet billing refactor (vendored copy of upstream packages/const)",
5
5
  "license": "UNLICENSED",
6
6
  "files": [
@@ -20,6 +20,7 @@
20
20
  "clean": "rm -rf dist tsconfig.tsbuildinfo",
21
21
  "check:type": "tsc --noEmit",
22
22
  "check:lint": "oxlint --type-aware",
23
- "fix:lint": "oxlint --type-aware --fix"
23
+ "fix:lint": "oxlint --type-aware --fix",
24
+ "docs": "typedoc --out docs/typedoc"
24
25
  }
25
26
  }