@bpinternal/const 0.0.16 → 0.0.18

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/index.cjs CHANGED
@@ -194,7 +194,7 @@ var quotaTypes = [
194
194
  "table_row_count",
195
195
  "workspace_member_count",
196
196
  "integrations_owned_count",
197
- "token_spend"
197
+ "ai_spend"
198
198
  ];
199
199
  var quotaConfigs = {
200
200
  invocation_timeout: {
@@ -202,7 +202,8 @@ var quotaConfigs = {
202
202
  description: "Maximum time in milliseconds a bot can run before timing out.",
203
203
  default: 6e4,
204
204
  kind: "bot",
205
- category: "timeout"
205
+ category: "timeout",
206
+ trackUsagePerBot: false
206
207
  },
207
208
  storage_count: {
208
209
  name: "Storage Count",
@@ -218,14 +219,16 @@ var quotaConfigs = {
218
219
  description: "Maximum number of bots that can be created.",
219
220
  default: 5,
220
221
  kind: "workspace",
221
- category: "count"
222
+ category: "count",
223
+ trackUsagePerBot: false
222
224
  },
223
225
  workspace_member_count: {
224
226
  name: "Workspace Member Count",
225
227
  description: "Maximum number of members that can be added to a workspace.",
226
228
  default: 3,
227
229
  kind: "workspace",
228
- category: "count"
230
+ category: "count",
231
+ trackUsagePerBot: false
229
232
  },
230
233
  knowledgebase_vector_storage: {
231
234
  name: "Knowledgebase Vector Storage",
@@ -257,18 +260,20 @@ var quotaConfigs = {
257
260
  description: "Maximum number of API calls per second for a workspace.",
258
261
  default: 100,
259
262
  kind: "workspace",
260
- category: "ratelimit"
263
+ category: "ratelimit",
264
+ trackUsagePerBot: false
261
265
  },
262
266
  integrations_owned_count: {
263
267
  name: "Owned Integrations Count",
264
268
  description: "Maximum number of integrations that can be created.",
265
269
  default: 20,
266
270
  kind: "workspace",
267
- category: "count"
271
+ category: "count",
272
+ trackUsagePerBot: false
268
273
  },
269
- token_spend: {
270
- name: "Token Spend",
271
- description: "Maximum amount of token spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
274
+ ai_spend: {
275
+ name: "AI Spend",
276
+ description: "Maximum amount of AI spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
272
277
  default: 5e9,
273
278
  kind: "workspace",
274
279
  category: "credit",
package/dist/index.mjs CHANGED
@@ -164,7 +164,7 @@ var quotaTypes = [
164
164
  "table_row_count",
165
165
  "workspace_member_count",
166
166
  "integrations_owned_count",
167
- "token_spend"
167
+ "ai_spend"
168
168
  ];
169
169
  var quotaConfigs = {
170
170
  invocation_timeout: {
@@ -172,7 +172,8 @@ var quotaConfigs = {
172
172
  description: "Maximum time in milliseconds a bot can run before timing out.",
173
173
  default: 6e4,
174
174
  kind: "bot",
175
- category: "timeout"
175
+ category: "timeout",
176
+ trackUsagePerBot: false
176
177
  },
177
178
  storage_count: {
178
179
  name: "Storage Count",
@@ -188,14 +189,16 @@ var quotaConfigs = {
188
189
  description: "Maximum number of bots that can be created.",
189
190
  default: 5,
190
191
  kind: "workspace",
191
- category: "count"
192
+ category: "count",
193
+ trackUsagePerBot: false
192
194
  },
193
195
  workspace_member_count: {
194
196
  name: "Workspace Member Count",
195
197
  description: "Maximum number of members that can be added to a workspace.",
196
198
  default: 3,
197
199
  kind: "workspace",
198
- category: "count"
200
+ category: "count",
201
+ trackUsagePerBot: false
199
202
  },
200
203
  knowledgebase_vector_storage: {
201
204
  name: "Knowledgebase Vector Storage",
@@ -227,18 +230,20 @@ var quotaConfigs = {
227
230
  description: "Maximum number of API calls per second for a workspace.",
228
231
  default: 100,
229
232
  kind: "workspace",
230
- category: "ratelimit"
233
+ category: "ratelimit",
234
+ trackUsagePerBot: false
231
235
  },
232
236
  integrations_owned_count: {
233
237
  name: "Owned Integrations Count",
234
238
  description: "Maximum number of integrations that can be created.",
235
239
  default: 20,
236
240
  kind: "workspace",
237
- category: "count"
241
+ category: "count",
242
+ trackUsagePerBot: false
238
243
  },
239
- token_spend: {
240
- name: "Token Spend",
241
- description: "Maximum amount of token spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
244
+ ai_spend: {
245
+ name: "AI Spend",
246
+ description: "Maximum amount of AI spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
242
247
  default: 5e9,
243
248
  kind: "workspace",
244
249
  category: "credit",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpinternal/const",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "description": "Constant utilities for Botpress",
5
5
  "main": "./dist/index.cjs",
6
6
  "browser": "./dist/index.mjs",
package/src/quotas.ts CHANGED
@@ -22,7 +22,7 @@ export type Quota = {
22
22
  /**
23
23
  * If true, the usage is tracked per bot. This is only applicable if the kind is workspace.
24
24
  */
25
- trackUsagePerBot?: boolean
25
+ trackUsagePerBot: boolean
26
26
  }
27
27
 
28
28
  export type QuotaKind = 'workspace' | 'bot'
@@ -39,7 +39,7 @@ export const quotaTypes = [
39
39
  'table_row_count',
40
40
  'workspace_member_count',
41
41
  'integrations_owned_count',
42
- 'token_spend'
42
+ 'ai_spend'
43
43
  ] as const satisfies Readonly<string[]>
44
44
 
45
45
  export const quotaConfigs = {
@@ -48,7 +48,8 @@ export const quotaConfigs = {
48
48
  description: 'Maximum time in milliseconds a bot can run before timing out.',
49
49
  default: 60_000,
50
50
  kind: 'bot',
51
- category: 'timeout'
51
+ category: 'timeout',
52
+ trackUsagePerBot: false
52
53
  },
53
54
  storage_count: {
54
55
  name: 'Storage Count',
@@ -63,14 +64,16 @@ export const quotaConfigs = {
63
64
  description: 'Maximum number of bots that can be created.',
64
65
  default: 5,
65
66
  kind: 'workspace',
66
- category: 'count'
67
+ category: 'count',
68
+ trackUsagePerBot: false
67
69
  },
68
70
  workspace_member_count: {
69
71
  name: 'Workspace Member Count',
70
72
  description: 'Maximum number of members that can be added to a workspace.',
71
73
  default: 3,
72
74
  kind: 'workspace',
73
- category: 'count'
75
+ category: 'count',
76
+ trackUsagePerBot: false
74
77
  },
75
78
  knowledgebase_vector_storage: {
76
79
  name: 'Knowledgebase Vector Storage',
@@ -101,19 +104,21 @@ export const quotaConfigs = {
101
104
  description: 'Maximum number of API calls per second for a workspace.',
102
105
  default: 100,
103
106
  kind: 'workspace',
104
- category: 'ratelimit'
107
+ category: 'ratelimit',
108
+ trackUsagePerBot: false
105
109
  },
106
110
  integrations_owned_count: {
107
111
  name: 'Owned Integrations Count',
108
112
  description: 'Maximum number of integrations that can be created.',
109
113
  default: 20,
110
114
  kind: 'workspace',
111
- category: 'count'
115
+ category: 'count',
116
+ trackUsagePerBot: false
112
117
  },
113
- token_spend: {
114
- name: 'Token Spend',
118
+ ai_spend: {
119
+ name: 'AI Spend',
115
120
  description:
116
- 'Maximum amount of token spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.',
121
+ 'Maximum amount of AI spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.',
117
122
  default: 5_000_000_000,
118
123
  kind: 'workspace',
119
124
  category: 'credit',