@bpinternal/const 0.0.18 → 0.0.20
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 +24 -4
- package/dist/index.mjs +24 -4
- package/package.json +1 -1
- package/src/quotas.ts +31 -5
package/dist/index.cjs
CHANGED
|
@@ -194,7 +194,9 @@ var quotaTypes = [
|
|
|
194
194
|
"table_row_count",
|
|
195
195
|
"workspace_member_count",
|
|
196
196
|
"integrations_owned_count",
|
|
197
|
-
"ai_spend"
|
|
197
|
+
"ai_spend",
|
|
198
|
+
"openai_spend",
|
|
199
|
+
"bing_search_spend"
|
|
198
200
|
];
|
|
199
201
|
var quotaConfigs = {
|
|
200
202
|
invocation_timeout: {
|
|
@@ -208,7 +210,7 @@ var quotaConfigs = {
|
|
|
208
210
|
storage_count: {
|
|
209
211
|
name: "Storage Count",
|
|
210
212
|
description: "Maximum number of storage bytes that can be stored.",
|
|
211
|
-
default:
|
|
213
|
+
default: 5e8,
|
|
212
214
|
// 500 MB
|
|
213
215
|
kind: "workspace",
|
|
214
216
|
category: "count",
|
|
@@ -232,8 +234,8 @@ var quotaConfigs = {
|
|
|
232
234
|
},
|
|
233
235
|
knowledgebase_vector_storage: {
|
|
234
236
|
name: "Knowledgebase Vector Storage",
|
|
235
|
-
description: "Maximum size knowledge base documents",
|
|
236
|
-
default:
|
|
237
|
+
description: "Maximum size of knowledge base documents",
|
|
238
|
+
default: 1e8,
|
|
237
239
|
// 100 MB
|
|
238
240
|
kind: "workspace",
|
|
239
241
|
category: "count",
|
|
@@ -278,6 +280,24 @@ var quotaConfigs = {
|
|
|
278
280
|
kind: "workspace",
|
|
279
281
|
category: "credit",
|
|
280
282
|
trackUsagePerBot: true
|
|
283
|
+
},
|
|
284
|
+
openai_spend: {
|
|
285
|
+
name: "OpenAI Spend",
|
|
286
|
+
description: "Maximum amount of OpenAI spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
|
|
287
|
+
default: 5e9,
|
|
288
|
+
kind: "workspace",
|
|
289
|
+
category: "credit",
|
|
290
|
+
trackUsagePerBot: true,
|
|
291
|
+
parent: "ai_spend"
|
|
292
|
+
},
|
|
293
|
+
bing_search_spend: {
|
|
294
|
+
name: "Bing Search Spend",
|
|
295
|
+
description: "Maximum amount of Bing Search spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
|
|
296
|
+
default: 5e9,
|
|
297
|
+
kind: "workspace",
|
|
298
|
+
category: "credit",
|
|
299
|
+
trackUsagePerBot: true,
|
|
300
|
+
parent: "ai_spend"
|
|
281
301
|
}
|
|
282
302
|
};
|
|
283
303
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
|
@@ -164,7 +164,9 @@ var quotaTypes = [
|
|
|
164
164
|
"table_row_count",
|
|
165
165
|
"workspace_member_count",
|
|
166
166
|
"integrations_owned_count",
|
|
167
|
-
"ai_spend"
|
|
167
|
+
"ai_spend",
|
|
168
|
+
"openai_spend",
|
|
169
|
+
"bing_search_spend"
|
|
168
170
|
];
|
|
169
171
|
var quotaConfigs = {
|
|
170
172
|
invocation_timeout: {
|
|
@@ -178,7 +180,7 @@ var quotaConfigs = {
|
|
|
178
180
|
storage_count: {
|
|
179
181
|
name: "Storage Count",
|
|
180
182
|
description: "Maximum number of storage bytes that can be stored.",
|
|
181
|
-
default:
|
|
183
|
+
default: 5e8,
|
|
182
184
|
// 500 MB
|
|
183
185
|
kind: "workspace",
|
|
184
186
|
category: "count",
|
|
@@ -202,8 +204,8 @@ var quotaConfigs = {
|
|
|
202
204
|
},
|
|
203
205
|
knowledgebase_vector_storage: {
|
|
204
206
|
name: "Knowledgebase Vector Storage",
|
|
205
|
-
description: "Maximum size knowledge base documents",
|
|
206
|
-
default:
|
|
207
|
+
description: "Maximum size of knowledge base documents",
|
|
208
|
+
default: 1e8,
|
|
207
209
|
// 100 MB
|
|
208
210
|
kind: "workspace",
|
|
209
211
|
category: "count",
|
|
@@ -248,6 +250,24 @@ var quotaConfigs = {
|
|
|
248
250
|
kind: "workspace",
|
|
249
251
|
category: "credit",
|
|
250
252
|
trackUsagePerBot: true
|
|
253
|
+
},
|
|
254
|
+
openai_spend: {
|
|
255
|
+
name: "OpenAI Spend",
|
|
256
|
+
description: "Maximum amount of OpenAI spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
|
|
257
|
+
default: 5e9,
|
|
258
|
+
kind: "workspace",
|
|
259
|
+
category: "credit",
|
|
260
|
+
trackUsagePerBot: true,
|
|
261
|
+
parent: "ai_spend"
|
|
262
|
+
},
|
|
263
|
+
bing_search_spend: {
|
|
264
|
+
name: "Bing Search Spend",
|
|
265
|
+
description: "Maximum amount of Bing Search spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
|
|
266
|
+
default: 5e9,
|
|
267
|
+
kind: "workspace",
|
|
268
|
+
category: "credit",
|
|
269
|
+
trackUsagePerBot: true,
|
|
270
|
+
parent: "ai_spend"
|
|
251
271
|
}
|
|
252
272
|
};
|
|
253
273
|
export {
|
package/package.json
CHANGED
package/src/quotas.ts
CHANGED
|
@@ -23,6 +23,10 @@ export type Quota = {
|
|
|
23
23
|
* If true, the usage is tracked per bot. This is only applicable if the kind is workspace.
|
|
24
24
|
*/
|
|
25
25
|
trackUsagePerBot: boolean
|
|
26
|
+
/**
|
|
27
|
+
* Parent quota type. This is used to determine the object linked to the usage type.
|
|
28
|
+
*/
|
|
29
|
+
parent?: QuotaType
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
export type QuotaKind = 'workspace' | 'bot'
|
|
@@ -39,7 +43,9 @@ export const quotaTypes = [
|
|
|
39
43
|
'table_row_count',
|
|
40
44
|
'workspace_member_count',
|
|
41
45
|
'integrations_owned_count',
|
|
42
|
-
'ai_spend'
|
|
46
|
+
'ai_spend',
|
|
47
|
+
'openai_spend',
|
|
48
|
+
'bing_search_spend',
|
|
43
49
|
] as const satisfies Readonly<string[]>
|
|
44
50
|
|
|
45
51
|
export const quotaConfigs = {
|
|
@@ -54,7 +60,7 @@ export const quotaConfigs = {
|
|
|
54
60
|
storage_count: {
|
|
55
61
|
name: 'Storage Count',
|
|
56
62
|
description: 'Maximum number of storage bytes that can be stored.',
|
|
57
|
-
default:
|
|
63
|
+
default: 500_000_000, // 500 MB
|
|
58
64
|
kind: 'workspace',
|
|
59
65
|
category: 'count',
|
|
60
66
|
trackUsagePerBot: true
|
|
@@ -77,8 +83,8 @@ export const quotaConfigs = {
|
|
|
77
83
|
},
|
|
78
84
|
knowledgebase_vector_storage: {
|
|
79
85
|
name: 'Knowledgebase Vector Storage',
|
|
80
|
-
description: 'Maximum size knowledge base documents',
|
|
81
|
-
default:
|
|
86
|
+
description: 'Maximum size of knowledge base documents',
|
|
87
|
+
default: 100_000_000, // 100 MB
|
|
82
88
|
kind: 'workspace',
|
|
83
89
|
category: 'count',
|
|
84
90
|
trackUsagePerBot: true
|
|
@@ -123,5 +129,25 @@ export const quotaConfigs = {
|
|
|
123
129
|
kind: 'workspace',
|
|
124
130
|
category: 'credit',
|
|
125
131
|
trackUsagePerBot: true
|
|
126
|
-
}
|
|
132
|
+
},
|
|
133
|
+
openai_spend: {
|
|
134
|
+
name: 'OpenAI Spend',
|
|
135
|
+
description:
|
|
136
|
+
'Maximum amount of OpenAI spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.',
|
|
137
|
+
default: 5_000_000_000,
|
|
138
|
+
kind: 'workspace',
|
|
139
|
+
category: 'credit',
|
|
140
|
+
trackUsagePerBot: true,
|
|
141
|
+
parent: 'ai_spend'
|
|
142
|
+
},
|
|
143
|
+
bing_search_spend: {
|
|
144
|
+
name: 'Bing Search Spend',
|
|
145
|
+
description:
|
|
146
|
+
'Maximum amount of Bing Search spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.',
|
|
147
|
+
default: 5_000_000_000,
|
|
148
|
+
kind: 'workspace',
|
|
149
|
+
category: 'credit',
|
|
150
|
+
trackUsagePerBot: true,
|
|
151
|
+
parent: 'ai_spend'
|
|
152
|
+
},
|
|
127
153
|
} as const satisfies Record<QuotaType, Quota>
|