@bpinternal/const 0.3.0 → 0.3.1

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.
@@ -4,10 +4,11 @@ import type { BillingFeature } from './billing-features';
4
4
  * This will be converted to $0 during deployment.
5
5
  */
6
6
  export declare const FREE_PRICE = -1;
7
- export type BillingPlanId = 'community' | 'plus' | 'team' | 'enterprise';
7
+ export declare const BILLING_PLAN_IDS: readonly ["community", "plus", "team", "enterprise"];
8
+ export type BillingPlanId = (typeof BILLING_PLAN_IDS)[number];
8
9
  export type BillingAddonId = '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';
9
10
  export type BillingPlan = {
10
- id: string;
11
+ id: BillingPlanId;
11
12
  name: string;
12
13
  description: string;
13
14
  prices: Array<{
@@ -18,7 +19,7 @@ export type BillingPlan = {
18
19
  features: Record<BillingFeature, number | boolean>;
19
20
  };
20
21
  export type BillingAddon = {
21
- id: string;
22
+ id: BillingAddonId;
22
23
  name: string;
23
24
  description: string;
24
25
  prices: Array<{
@@ -42,14 +43,14 @@ export declare const billingPlans: {
42
43
  readonly features: {
43
44
  readonly human_in_the_loop: false;
44
45
  readonly ratelimit: 100;
45
- readonly incoming_messages_events: 2000;
46
+ readonly incoming_messages_events: 500;
46
47
  readonly integration_spend: 5000000000;
47
48
  readonly integration_subscription: false;
48
- readonly table_rows: 5000;
49
- readonly bot_count: 5;
49
+ readonly table_rows: 1000;
50
+ readonly bot_count: 1;
50
51
  readonly always_alive_count: 0;
51
- readonly collaborator_count: 3;
52
- readonly file_storage: 500000000;
52
+ readonly collaborator_count: 1;
53
+ readonly file_storage: 100000000;
53
54
  readonly vector_db_storage: 100000000;
54
55
  readonly saved_versions: 3;
55
56
  };
@@ -69,16 +70,16 @@ export declare const billingPlans: {
69
70
  }];
70
71
  readonly features: {
71
72
  readonly human_in_the_loop: true;
72
- readonly ratelimit: 5000;
73
- readonly incoming_messages_events: 500000;
74
- readonly integration_spend: 50000000000;
73
+ readonly ratelimit: 100;
74
+ readonly incoming_messages_events: 5000;
75
+ readonly integration_spend: 5000000000;
75
76
  readonly integration_subscription: true;
76
- readonly table_rows: 5000000;
77
- readonly bot_count: 50;
78
- readonly always_alive_count: 50;
79
- readonly collaborator_count: 15;
80
- readonly file_storage: 50000000000;
81
- readonly vector_db_storage: 10000000000;
77
+ readonly table_rows: 100000;
78
+ readonly bot_count: 2;
79
+ readonly always_alive_count: 1;
80
+ readonly collaborator_count: 2;
81
+ readonly file_storage: 10000000000;
82
+ readonly vector_db_storage: 1000000000;
82
83
  readonly saved_versions: 50;
83
84
  };
84
85
  };
@@ -98,16 +99,16 @@ export declare const billingPlans: {
98
99
  readonly features: {
99
100
  readonly human_in_the_loop: true;
100
101
  readonly ratelimit: 1000;
101
- readonly incoming_messages_events: 250000;
102
- readonly integration_spend: 10000000000;
103
- readonly integration_subscription: false;
104
- readonly table_rows: 1000000;
105
- readonly bot_count: 20;
106
- readonly always_alive_count: 20;
107
- readonly collaborator_count: 5;
102
+ readonly incoming_messages_events: 50000;
103
+ readonly integration_spend: 5000000000;
104
+ readonly integration_subscription: true;
105
+ readonly table_rows: 100000;
106
+ readonly bot_count: 3;
107
+ readonly always_alive_count: 3;
108
+ readonly collaborator_count: 3;
108
109
  readonly file_storage: 10000000000;
109
110
  readonly vector_db_storage: 2000000000;
110
- readonly saved_versions: 10;
111
+ readonly saved_versions: 100;
111
112
  };
112
113
  };
113
114
  readonly enterprise: {
@@ -122,12 +123,12 @@ export declare const billingPlans: {
122
123
  readonly features: {
123
124
  readonly human_in_the_loop: true;
124
125
  readonly ratelimit: 10000;
125
- readonly incoming_messages_events: 10000000;
126
- readonly integration_spend: 1000000000000;
126
+ readonly incoming_messages_events: 1000000;
127
+ readonly integration_spend: 5000000000;
127
128
  readonly integration_subscription: true;
128
- readonly table_rows: 100000000;
129
- readonly bot_count: 1000;
130
- readonly always_alive_count: 500;
129
+ readonly table_rows: 10000000;
130
+ readonly bot_count: 100;
131
+ readonly always_alive_count: 50;
131
132
  readonly collaborator_count: 100;
132
133
  readonly file_storage: 1000000000000;
133
134
  readonly vector_db_storage: 500000000000;
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.billingAddons = exports.billingPlans = exports.FREE_PRICE = void 0;
3
+ exports.billingAddons = exports.billingPlans = exports.BILLING_PLAN_IDS = 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
+ // keep this in order of lowest to highest tier
10
+ exports.BILLING_PLAN_IDS = ['community', 'plus', 'team', 'enterprise'];
9
11
  exports.billingPlans = {
10
12
  community: {
11
13
  id: 'community',
@@ -21,14 +23,14 @@ exports.billingPlans = {
21
23
  features: {
22
24
  human_in_the_loop: false,
23
25
  ratelimit: 100,
24
- incoming_messages_events: 2000,
26
+ incoming_messages_events: 500,
25
27
  integration_spend: 5_000_000_000, // $5 in nano-dollars
26
28
  integration_subscription: false,
27
- table_rows: 5000,
28
- bot_count: 5,
29
+ table_rows: 1000,
30
+ bot_count: 1,
29
31
  always_alive_count: 0,
30
- collaborator_count: 3,
31
- file_storage: 500_000_000, // 500 MB
32
+ collaborator_count: 1,
33
+ file_storage: 100_000_000, // 100 MB
32
34
  vector_db_storage: 100_000_000, // 100 MB
33
35
  saved_versions: 3,
34
36
  },
@@ -51,16 +53,16 @@ exports.billingPlans = {
51
53
  ],
52
54
  features: {
53
55
  human_in_the_loop: true,
54
- ratelimit: 5000,
55
- incoming_messages_events: 500000,
56
- integration_spend: 50_000_000_000, // $50 in nano-dollars
56
+ ratelimit: 100,
57
+ incoming_messages_events: 5000,
58
+ integration_spend: 5_000_000_000, // $5 in nano-dollars
57
59
  integration_subscription: true,
58
- table_rows: 5000000,
59
- bot_count: 50,
60
- always_alive_count: 50,
61
- collaborator_count: 15,
62
- file_storage: 50_000_000_000, // 50 GB
63
- vector_db_storage: 10_000_000_000, // 10 GB
60
+ table_rows: 100000,
61
+ bot_count: 2,
62
+ always_alive_count: 1,
63
+ collaborator_count: 2,
64
+ file_storage: 10_000_000_000, // 10 GB
65
+ vector_db_storage: 1_000_000_000, // 1 GB
64
66
  saved_versions: 50,
65
67
  },
66
68
  },
@@ -83,16 +85,16 @@ exports.billingPlans = {
83
85
  features: {
84
86
  human_in_the_loop: true,
85
87
  ratelimit: 1000,
86
- incoming_messages_events: 250000,
87
- integration_spend: 10_000_000_000, // $10 in nano-dollars
88
- integration_subscription: false,
89
- table_rows: 1000000,
90
- bot_count: 20,
91
- always_alive_count: 20,
92
- collaborator_count: 5,
88
+ incoming_messages_events: 50000,
89
+ integration_spend: 5_000_000_000, // $5 in nano-dollars
90
+ integration_subscription: true,
91
+ table_rows: 100000,
92
+ bot_count: 3,
93
+ always_alive_count: 3,
94
+ collaborator_count: 3,
93
95
  file_storage: 10_000_000_000, // 10 GB
94
96
  vector_db_storage: 2_000_000_000, // 2 GB
95
- saved_versions: 10,
97
+ saved_versions: 100,
96
98
  },
97
99
  },
98
100
  enterprise: {
@@ -109,12 +111,12 @@ exports.billingPlans = {
109
111
  features: {
110
112
  human_in_the_loop: true,
111
113
  ratelimit: 10000,
112
- incoming_messages_events: 10000000,
113
- integration_spend: 1000_000_000_000, // $1000 in nano-dollars
114
+ incoming_messages_events: 1000000,
115
+ integration_spend: 5_000_000_000, // $5 in nano-dollars
114
116
  integration_subscription: true,
115
- table_rows: 100000000,
116
- bot_count: 1000,
117
- always_alive_count: 500,
117
+ table_rows: 10000000,
118
+ bot_count: 100,
119
+ always_alive_count: 50,
118
120
  collaborator_count: 100,
119
121
  file_storage: 1000_000_000_000, // 1000 GB
120
122
  vector_db_storage: 500_000_000_000, // 500 GB
@@ -3,8 +3,10 @@
3
3
  * Each version represents a complete billing configuration
4
4
  */
5
5
  import { billingPlans, billingAddons } from './billing-products';
6
+ export declare const BILLING_VERSIONS: readonly ["v4"];
7
+ export type BillingVersionId = (typeof BILLING_VERSIONS)[number];
6
8
  export type BillingVersion = {
7
- version: string;
9
+ version: BillingVersionId;
8
10
  name: string;
9
11
  description: string;
10
12
  plans: typeof billingPlans;
@@ -24,6 +26,8 @@ export type StripeMapping = {
24
26
  }>;
25
27
  };
26
28
  export declare const billingVersionV4: BillingVersion;
27
- export declare const billingVersions: Record<string, BillingVersion>;
29
+ export declare const billingVersions: {
30
+ [key in BillingVersionId]: BillingVersion;
31
+ };
28
32
  export declare const getActiveBillingVersion: () => BillingVersion;
29
- export declare const getBillingVersion: (version: string) => BillingVersion | undefined;
33
+ export declare const getBillingVersion: (version: BillingVersionId) => BillingVersion;
@@ -4,8 +4,9 @@
4
4
  * Each version represents a complete billing configuration
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.getBillingVersion = exports.getActiveBillingVersion = exports.billingVersions = exports.billingVersionV4 = void 0;
7
+ exports.getBillingVersion = exports.getActiveBillingVersion = exports.billingVersions = exports.billingVersionV4 = exports.BILLING_VERSIONS = void 0;
8
8
  const billing_products_1 = require("./billing-products");
9
+ exports.BILLING_VERSIONS = ['v4'];
9
10
  exports.billingVersionV4 = {
10
11
  version: 'v4',
11
12
  name: 'Billing Version 4',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpinternal/const",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
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",