@bpinternal/const 0.0.15 → 0.0.17
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 +20 -10
- package/dist/index.mjs +20 -10
- package/package.json +1 -1
- package/src/quotas.ts +24 -10
package/dist/index.cjs
CHANGED
|
@@ -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",
|
|
@@ -210,21 +211,24 @@ var quotaConfigs = {
|
|
|
210
211
|
default: 524288e3,
|
|
211
212
|
// 500 MB
|
|
212
213
|
kind: "workspace",
|
|
213
|
-
category: "count"
|
|
214
|
+
category: "count",
|
|
215
|
+
trackUsagePerBot: true
|
|
214
216
|
},
|
|
215
217
|
bot_count: {
|
|
216
218
|
name: "Bot Count",
|
|
217
219
|
description: "Maximum number of bots that can be created.",
|
|
218
220
|
default: 5,
|
|
219
221
|
kind: "workspace",
|
|
220
|
-
category: "count"
|
|
222
|
+
category: "count",
|
|
223
|
+
trackUsagePerBot: false
|
|
221
224
|
},
|
|
222
225
|
workspace_member_count: {
|
|
223
226
|
name: "Workspace Member Count",
|
|
224
227
|
description: "Maximum number of members that can be added to a workspace.",
|
|
225
228
|
default: 3,
|
|
226
229
|
kind: "workspace",
|
|
227
|
-
category: "count"
|
|
230
|
+
category: "count",
|
|
231
|
+
trackUsagePerBot: false
|
|
228
232
|
},
|
|
229
233
|
knowledgebase_vector_storage: {
|
|
230
234
|
name: "Knowledgebase Vector Storage",
|
|
@@ -232,42 +236,48 @@ var quotaConfigs = {
|
|
|
232
236
|
default: 104857600,
|
|
233
237
|
// 100 MB
|
|
234
238
|
kind: "workspace",
|
|
235
|
-
category: "count"
|
|
239
|
+
category: "count",
|
|
240
|
+
trackUsagePerBot: true
|
|
236
241
|
},
|
|
237
242
|
table_row_count: {
|
|
238
243
|
name: "Table Row Count",
|
|
239
244
|
description: "Maximum number of rows that can be stored in a table.",
|
|
240
245
|
default: 5e3,
|
|
241
246
|
kind: "workspace",
|
|
242
|
-
category: "count"
|
|
247
|
+
category: "count",
|
|
248
|
+
trackUsagePerBot: true
|
|
243
249
|
},
|
|
244
250
|
invocation_calls: {
|
|
245
251
|
name: "Invocation Calls",
|
|
246
252
|
description: "Maximum number of times a bot can be invoked in a month.",
|
|
247
253
|
default: 2e3,
|
|
248
254
|
kind: "workspace",
|
|
249
|
-
category: "calls"
|
|
255
|
+
category: "calls",
|
|
256
|
+
trackUsagePerBot: true
|
|
250
257
|
},
|
|
251
258
|
workspace_ratelimit: {
|
|
252
259
|
name: "Workspace Ratelimit",
|
|
253
260
|
description: "Maximum number of API calls per second for a workspace.",
|
|
254
261
|
default: 100,
|
|
255
262
|
kind: "workspace",
|
|
256
|
-
category: "ratelimit"
|
|
263
|
+
category: "ratelimit",
|
|
264
|
+
trackUsagePerBot: false
|
|
257
265
|
},
|
|
258
266
|
integrations_owned_count: {
|
|
259
267
|
name: "Owned Integrations Count",
|
|
260
268
|
description: "Maximum number of integrations that can be created.",
|
|
261
269
|
default: 20,
|
|
262
270
|
kind: "workspace",
|
|
263
|
-
category: "count"
|
|
271
|
+
category: "count",
|
|
272
|
+
trackUsagePerBot: false
|
|
264
273
|
},
|
|
265
274
|
token_spend: {
|
|
266
275
|
name: "Token Spend",
|
|
267
276
|
description: "Maximum amount of token spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
|
|
268
277
|
default: 5e9,
|
|
269
278
|
kind: "workspace",
|
|
270
|
-
category: "credit"
|
|
279
|
+
category: "credit",
|
|
280
|
+
trackUsagePerBot: true
|
|
271
281
|
}
|
|
272
282
|
};
|
|
273
283
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
|
@@ -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",
|
|
@@ -180,21 +181,24 @@ var quotaConfigs = {
|
|
|
180
181
|
default: 524288e3,
|
|
181
182
|
// 500 MB
|
|
182
183
|
kind: "workspace",
|
|
183
|
-
category: "count"
|
|
184
|
+
category: "count",
|
|
185
|
+
trackUsagePerBot: true
|
|
184
186
|
},
|
|
185
187
|
bot_count: {
|
|
186
188
|
name: "Bot Count",
|
|
187
189
|
description: "Maximum number of bots that can be created.",
|
|
188
190
|
default: 5,
|
|
189
191
|
kind: "workspace",
|
|
190
|
-
category: "count"
|
|
192
|
+
category: "count",
|
|
193
|
+
trackUsagePerBot: false
|
|
191
194
|
},
|
|
192
195
|
workspace_member_count: {
|
|
193
196
|
name: "Workspace Member Count",
|
|
194
197
|
description: "Maximum number of members that can be added to a workspace.",
|
|
195
198
|
default: 3,
|
|
196
199
|
kind: "workspace",
|
|
197
|
-
category: "count"
|
|
200
|
+
category: "count",
|
|
201
|
+
trackUsagePerBot: false
|
|
198
202
|
},
|
|
199
203
|
knowledgebase_vector_storage: {
|
|
200
204
|
name: "Knowledgebase Vector Storage",
|
|
@@ -202,42 +206,48 @@ var quotaConfigs = {
|
|
|
202
206
|
default: 104857600,
|
|
203
207
|
// 100 MB
|
|
204
208
|
kind: "workspace",
|
|
205
|
-
category: "count"
|
|
209
|
+
category: "count",
|
|
210
|
+
trackUsagePerBot: true
|
|
206
211
|
},
|
|
207
212
|
table_row_count: {
|
|
208
213
|
name: "Table Row Count",
|
|
209
214
|
description: "Maximum number of rows that can be stored in a table.",
|
|
210
215
|
default: 5e3,
|
|
211
216
|
kind: "workspace",
|
|
212
|
-
category: "count"
|
|
217
|
+
category: "count",
|
|
218
|
+
trackUsagePerBot: true
|
|
213
219
|
},
|
|
214
220
|
invocation_calls: {
|
|
215
221
|
name: "Invocation Calls",
|
|
216
222
|
description: "Maximum number of times a bot can be invoked in a month.",
|
|
217
223
|
default: 2e3,
|
|
218
224
|
kind: "workspace",
|
|
219
|
-
category: "calls"
|
|
225
|
+
category: "calls",
|
|
226
|
+
trackUsagePerBot: true
|
|
220
227
|
},
|
|
221
228
|
workspace_ratelimit: {
|
|
222
229
|
name: "Workspace Ratelimit",
|
|
223
230
|
description: "Maximum number of API calls per second for a workspace.",
|
|
224
231
|
default: 100,
|
|
225
232
|
kind: "workspace",
|
|
226
|
-
category: "ratelimit"
|
|
233
|
+
category: "ratelimit",
|
|
234
|
+
trackUsagePerBot: false
|
|
227
235
|
},
|
|
228
236
|
integrations_owned_count: {
|
|
229
237
|
name: "Owned Integrations Count",
|
|
230
238
|
description: "Maximum number of integrations that can be created.",
|
|
231
239
|
default: 20,
|
|
232
240
|
kind: "workspace",
|
|
233
|
-
category: "count"
|
|
241
|
+
category: "count",
|
|
242
|
+
trackUsagePerBot: false
|
|
234
243
|
},
|
|
235
244
|
token_spend: {
|
|
236
245
|
name: "Token Spend",
|
|
237
246
|
description: "Maximum amount of token spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
|
|
238
247
|
default: 5e9,
|
|
239
248
|
kind: "workspace",
|
|
240
|
-
category: "credit"
|
|
249
|
+
category: "credit",
|
|
250
|
+
trackUsagePerBot: true
|
|
241
251
|
}
|
|
242
252
|
};
|
|
243
253
|
export {
|
package/package.json
CHANGED
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'
|
|
@@ -44,63 +48,72 @@ export const quotaConfigs = {
|
|
|
44
48
|
description: 'Maximum time in milliseconds a bot can run before timing out.',
|
|
45
49
|
default: 60_000,
|
|
46
50
|
kind: 'bot',
|
|
47
|
-
category: 'timeout'
|
|
51
|
+
category: 'timeout',
|
|
52
|
+
trackUsagePerBot: false
|
|
48
53
|
},
|
|
49
54
|
storage_count: {
|
|
50
55
|
name: 'Storage Count',
|
|
51
56
|
description: 'Maximum number of storage bytes that can be stored.',
|
|
52
57
|
default: 524_288_000, // 500 MB
|
|
53
58
|
kind: 'workspace',
|
|
54
|
-
category: 'count'
|
|
59
|
+
category: 'count',
|
|
60
|
+
trackUsagePerBot: true
|
|
55
61
|
},
|
|
56
62
|
bot_count: {
|
|
57
63
|
name: 'Bot Count',
|
|
58
64
|
description: 'Maximum number of bots that can be created.',
|
|
59
65
|
default: 5,
|
|
60
66
|
kind: 'workspace',
|
|
61
|
-
category: 'count'
|
|
67
|
+
category: 'count',
|
|
68
|
+
trackUsagePerBot: false
|
|
62
69
|
},
|
|
63
70
|
workspace_member_count: {
|
|
64
71
|
name: 'Workspace Member Count',
|
|
65
72
|
description: 'Maximum number of members that can be added to a workspace.',
|
|
66
73
|
default: 3,
|
|
67
74
|
kind: 'workspace',
|
|
68
|
-
category: 'count'
|
|
75
|
+
category: 'count',
|
|
76
|
+
trackUsagePerBot: false
|
|
69
77
|
},
|
|
70
78
|
knowledgebase_vector_storage: {
|
|
71
79
|
name: 'Knowledgebase Vector Storage',
|
|
72
80
|
description: 'Maximum size knowledge base documents',
|
|
73
81
|
default: 104_857_600, // 100 MB
|
|
74
82
|
kind: 'workspace',
|
|
75
|
-
category: 'count'
|
|
83
|
+
category: 'count',
|
|
84
|
+
trackUsagePerBot: true
|
|
76
85
|
},
|
|
77
86
|
table_row_count: {
|
|
78
87
|
name: 'Table Row Count',
|
|
79
88
|
description: 'Maximum number of rows that can be stored in a table.',
|
|
80
89
|
default: 5_000,
|
|
81
90
|
kind: 'workspace',
|
|
82
|
-
category: 'count'
|
|
91
|
+
category: 'count',
|
|
92
|
+
trackUsagePerBot: true
|
|
83
93
|
},
|
|
84
94
|
invocation_calls: {
|
|
85
95
|
name: 'Invocation Calls',
|
|
86
96
|
description: 'Maximum number of times a bot can be invoked in a month.',
|
|
87
97
|
default: 2_000,
|
|
88
98
|
kind: 'workspace',
|
|
89
|
-
category: 'calls'
|
|
99
|
+
category: 'calls',
|
|
100
|
+
trackUsagePerBot: true
|
|
90
101
|
},
|
|
91
102
|
workspace_ratelimit: {
|
|
92
103
|
name: 'Workspace Ratelimit',
|
|
93
104
|
description: 'Maximum number of API calls per second for a workspace.',
|
|
94
105
|
default: 100,
|
|
95
106
|
kind: 'workspace',
|
|
96
|
-
category: 'ratelimit'
|
|
107
|
+
category: 'ratelimit',
|
|
108
|
+
trackUsagePerBot: false
|
|
97
109
|
},
|
|
98
110
|
integrations_owned_count: {
|
|
99
111
|
name: 'Owned Integrations Count',
|
|
100
112
|
description: 'Maximum number of integrations that can be created.',
|
|
101
113
|
default: 20,
|
|
102
114
|
kind: 'workspace',
|
|
103
|
-
category: 'count'
|
|
115
|
+
category: 'count',
|
|
116
|
+
trackUsagePerBot: false
|
|
104
117
|
},
|
|
105
118
|
token_spend: {
|
|
106
119
|
name: 'Token Spend',
|
|
@@ -108,6 +121,7 @@ export const quotaConfigs = {
|
|
|
108
121
|
'Maximum amount of token spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.',
|
|
109
122
|
default: 5_000_000_000,
|
|
110
123
|
kind: 'workspace',
|
|
111
|
-
category: 'credit'
|
|
124
|
+
category: 'credit',
|
|
125
|
+
trackUsagePerBot: true
|
|
112
126
|
}
|
|
113
127
|
} as const satisfies Record<QuotaType, Quota>
|