@bpinternal/const 0.0.15 → 0.0.16

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
@@ -210,7 +210,8 @@ var quotaConfigs = {
210
210
  default: 524288e3,
211
211
  // 500 MB
212
212
  kind: "workspace",
213
- category: "count"
213
+ category: "count",
214
+ trackUsagePerBot: true
214
215
  },
215
216
  bot_count: {
216
217
  name: "Bot Count",
@@ -232,21 +233,24 @@ var quotaConfigs = {
232
233
  default: 104857600,
233
234
  // 100 MB
234
235
  kind: "workspace",
235
- category: "count"
236
+ category: "count",
237
+ trackUsagePerBot: true
236
238
  },
237
239
  table_row_count: {
238
240
  name: "Table Row Count",
239
241
  description: "Maximum number of rows that can be stored in a table.",
240
242
  default: 5e3,
241
243
  kind: "workspace",
242
- category: "count"
244
+ category: "count",
245
+ trackUsagePerBot: true
243
246
  },
244
247
  invocation_calls: {
245
248
  name: "Invocation Calls",
246
249
  description: "Maximum number of times a bot can be invoked in a month.",
247
250
  default: 2e3,
248
251
  kind: "workspace",
249
- category: "calls"
252
+ category: "calls",
253
+ trackUsagePerBot: true
250
254
  },
251
255
  workspace_ratelimit: {
252
256
  name: "Workspace Ratelimit",
@@ -267,7 +271,8 @@ var quotaConfigs = {
267
271
  description: "Maximum amount of token spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
268
272
  default: 5e9,
269
273
  kind: "workspace",
270
- category: "credit"
274
+ category: "credit",
275
+ trackUsagePerBot: true
271
276
  }
272
277
  };
273
278
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.mjs CHANGED
@@ -180,7 +180,8 @@ var quotaConfigs = {
180
180
  default: 524288e3,
181
181
  // 500 MB
182
182
  kind: "workspace",
183
- category: "count"
183
+ category: "count",
184
+ trackUsagePerBot: true
184
185
  },
185
186
  bot_count: {
186
187
  name: "Bot Count",
@@ -202,21 +203,24 @@ var quotaConfigs = {
202
203
  default: 104857600,
203
204
  // 100 MB
204
205
  kind: "workspace",
205
- category: "count"
206
+ category: "count",
207
+ trackUsagePerBot: true
206
208
  },
207
209
  table_row_count: {
208
210
  name: "Table Row Count",
209
211
  description: "Maximum number of rows that can be stored in a table.",
210
212
  default: 5e3,
211
213
  kind: "workspace",
212
- category: "count"
214
+ category: "count",
215
+ trackUsagePerBot: true
213
216
  },
214
217
  invocation_calls: {
215
218
  name: "Invocation Calls",
216
219
  description: "Maximum number of times a bot can be invoked in a month.",
217
220
  default: 2e3,
218
221
  kind: "workspace",
219
- category: "calls"
222
+ category: "calls",
223
+ trackUsagePerBot: true
220
224
  },
221
225
  workspace_ratelimit: {
222
226
  name: "Workspace Ratelimit",
@@ -237,7 +241,8 @@ var quotaConfigs = {
237
241
  description: "Maximum amount of token spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
238
242
  default: 5e9,
239
243
  kind: "workspace",
240
- category: "credit"
244
+ category: "credit",
245
+ trackUsagePerBot: true
241
246
  }
242
247
  };
243
248
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpinternal/const",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "Constant utilities for Botpress",
5
5
  "main": "./dist/index.cjs",
6
6
  "browser": "./dist/index.mjs",
package/src/quotas.ts CHANGED
@@ -19,6 +19,10 @@ export type Quota = {
19
19
  * The usage category determine how the usage is calculated.
20
20
  */
21
21
  category: QuotaCategory
22
+ /**
23
+ * If true, the usage is tracked per bot. This is only applicable if the kind is workspace.
24
+ */
25
+ trackUsagePerBot?: boolean
22
26
  }
23
27
 
24
28
  export type QuotaKind = 'workspace' | 'bot'
@@ -51,7 +55,8 @@ export const quotaConfigs = {
51
55
  description: 'Maximum number of storage bytes that can be stored.',
52
56
  default: 524_288_000, // 500 MB
53
57
  kind: 'workspace',
54
- category: 'count'
58
+ category: 'count',
59
+ trackUsagePerBot: true
55
60
  },
56
61
  bot_count: {
57
62
  name: 'Bot Count',
@@ -72,21 +77,24 @@ export const quotaConfigs = {
72
77
  description: 'Maximum size knowledge base documents',
73
78
  default: 104_857_600, // 100 MB
74
79
  kind: 'workspace',
75
- category: 'count'
80
+ category: 'count',
81
+ trackUsagePerBot: true
76
82
  },
77
83
  table_row_count: {
78
84
  name: 'Table Row Count',
79
85
  description: 'Maximum number of rows that can be stored in a table.',
80
86
  default: 5_000,
81
87
  kind: 'workspace',
82
- category: 'count'
88
+ category: 'count',
89
+ trackUsagePerBot: true
83
90
  },
84
91
  invocation_calls: {
85
92
  name: 'Invocation Calls',
86
93
  description: 'Maximum number of times a bot can be invoked in a month.',
87
94
  default: 2_000,
88
95
  kind: 'workspace',
89
- category: 'calls'
96
+ category: 'calls',
97
+ trackUsagePerBot: true
90
98
  },
91
99
  workspace_ratelimit: {
92
100
  name: 'Workspace Ratelimit',
@@ -108,6 +116,7 @@ export const quotaConfigs = {
108
116
  'Maximum amount of token spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.',
109
117
  default: 5_000_000_000,
110
118
  kind: 'workspace',
111
- category: 'credit'
119
+ category: 'credit',
120
+ trackUsagePerBot: true
112
121
  }
113
122
  } as const satisfies Record<QuotaType, Quota>