@bpinternal/const 0.2.2 → 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.
package/dist/index.cjs DELETED
@@ -1,546 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- Tags: () => Tags,
24
- limitConfigs: () => limitConfigs,
25
- objectToPrefixMap: () => objectToPrefixMap,
26
- prefixToObjectMap: () => prefixToObjectMap,
27
- quotaConfigs: () => quotaConfigs,
28
- quotaConfigsV3: () => quotaConfigsV3,
29
- quotaTypes: () => quotaTypes
30
- });
31
- module.exports = __toCommonJS(index_exports);
32
-
33
- // src/limits.ts
34
- var limitConfigs = {
35
- bot_configuration_bytes: {
36
- value: 20480,
37
- // 20 KB
38
- unit: "bytes"
39
- },
40
- bot_installed_integrations_count: {
41
- value: 30,
42
- unit: "count"
43
- },
44
- bot_integration_configuration_bytes: {
45
- value: 20480,
46
- // 20 KB
47
- unit: "bytes"
48
- },
49
- bot_recurring_event_count: {
50
- value: 50,
51
- unit: "count"
52
- },
53
- bot_recurring_event_payload_bytes: {
54
- value: 131072,
55
- // 128 KB
56
- unit: "bytes"
57
- },
58
- event_definition_count: {
59
- value: 20,
60
- unit: "count"
61
- },
62
- integration_channel_count: {
63
- value: 10,
64
- unit: "count"
65
- },
66
- integration_channel_message_type_count: {
67
- value: 20,
68
- unit: "count"
69
- },
70
- integration_identifier_count: {
71
- value: 50,
72
- unit: "count"
73
- },
74
- integration_version_count: {
75
- value: 50,
76
- unit: "count"
77
- },
78
- issue_event_item_payload_bytes: {
79
- value: 131072,
80
- // 128 KB
81
- unit: "bytes"
82
- },
83
- message_payload_bytes: {
84
- value: 131072,
85
- // 128 KB
86
- unit: "bytes"
87
- },
88
- schema_bytes: {
89
- value: 102400,
90
- // 100 KB
91
- unit: "bytes"
92
- },
93
- state_definition_count: {
94
- value: 10,
95
- unit: "count"
96
- },
97
- state_item_payload_bytes: {
98
- value: 131072,
99
- // 128 KB
100
- unit: "bytes"
101
- },
102
- tag_definition_count: {
103
- value: 50,
104
- unit: "count"
105
- },
106
- bot_integration_secret_count: {
107
- value: 25,
108
- unit: "count"
109
- },
110
- files_api_query_bytes: {
111
- value: 2048,
112
- // 2 KB
113
- unit: "bytes"
114
- },
115
- code_payload_bytes: {
116
- value: 52428800,
117
- // 50 MB
118
- unit: "bytes"
119
- }
120
- };
121
-
122
- // src/prefixes.ts
123
- var prefixToObjectMap = {
124
- accnt: "account",
125
- accntpf: "accountPreference",
126
- action: "action",
127
- activty: "activity",
128
- anlytic: "analytics",
129
- audit: "audit",
130
- bak: "botApiKey",
131
- bot: "bot",
132
- card: "card",
133
- cfg: "configuration",
134
- channel: "channel",
135
- conv: "conversation",
136
- devbot: "devBot",
137
- devint: "devIntegration",
138
- evt: "event",
139
- file: "file",
140
- flow: "flow",
141
- iak: "integrationApiKey",
142
- int: "integration",
143
- iface: "interface",
144
- ifver: "interfaceVersion",
145
- intver: "integrationVersion",
146
- iss: "issue",
147
- issevt: "issueEvent",
148
- kb: "knowledgeBase",
149
- limit: "limit",
150
- media: "media",
151
- msg: "message",
152
- node: "node",
153
- notif: "notification",
154
- pat: "personalAccessToken",
155
- plugin: "plugin",
156
- plugver: "pluginVersion",
157
- quota: "quota",
158
- recevt: "recurringEvent",
159
- report: "report",
160
- sandbox: "sandbox",
161
- schema: "schema",
162
- script: "script",
163
- state: "state",
164
- table: "table",
165
- tag: "tag",
166
- task: "task",
167
- usage: "usage",
168
- user: "user",
169
- webhook: "webhook",
170
- wkspace: "workspace",
171
- wrkflow: "workflow"
172
- };
173
- var objectToPrefixMap = {
174
- account: "accnt",
175
- accountPreference: "accntpf",
176
- action: "action",
177
- activity: "activty",
178
- analytics: "anlytic",
179
- audit: "audit",
180
- bot: "bot",
181
- botApiKey: "bak",
182
- card: "card",
183
- channel: "channel",
184
- configuration: "cfg",
185
- conversation: "conv",
186
- devBot: "devbot",
187
- devIntegration: "devint",
188
- event: "evt",
189
- file: "file",
190
- flow: "flow",
191
- integration: "int",
192
- integrationApiKey: "iak",
193
- integrationVersion: "intver",
194
- interface: "iface",
195
- interfaceVersion: "ifver",
196
- issue: "iss",
197
- issueEvent: "issevt",
198
- knowledgeBase: "kb",
199
- limit: "limit",
200
- media: "media",
201
- message: "msg",
202
- node: "node",
203
- notification: "notif",
204
- personalAccessToken: "pat",
205
- plugin: "plugin",
206
- pluginVersion: "plugver",
207
- quota: "quota",
208
- recurringEvent: "recevt",
209
- report: "report",
210
- sandbox: "sandbox",
211
- schema: "schema",
212
- script: "script",
213
- state: "state",
214
- table: "table",
215
- tag: "tag",
216
- task: "task",
217
- usage: "usage",
218
- user: "user",
219
- webhook: "webhook",
220
- workflow: "wrkflow",
221
- workspace: "wkspace"
222
- };
223
-
224
- // src/quotas.ts
225
- var quotaTypes = [
226
- "invocation_timeout",
227
- "invocation_calls",
228
- "storage_count",
229
- "bot_count",
230
- "knowledgebase_vector_storage",
231
- "workspace_ratelimit",
232
- "table_row_count",
233
- "workspace_member_count",
234
- "integrations_owned_count",
235
- "ai_spend",
236
- "openai_spend",
237
- "bing_search_spend",
238
- "always_alive"
239
- ];
240
- var quotaConfigs = {
241
- invocation_timeout: {
242
- name: "Invocation Timeout",
243
- description: "Maximum time in milliseconds a bot can run before timing out.",
244
- default: 6e4,
245
- kind: "workspace",
246
- category: "timeout",
247
- trackUsagePerBot: false
248
- },
249
- storage_count: {
250
- name: "Storage Count",
251
- description: "Maximum number of storage bytes that can be stored.",
252
- default: 5e8,
253
- // 500 MB
254
- kind: "workspace",
255
- category: "count",
256
- trackUsagePerBot: true
257
- },
258
- bot_count: {
259
- name: "Bot Count",
260
- description: "Maximum number of bots that can be created.",
261
- default: 5,
262
- kind: "workspace",
263
- category: "count",
264
- trackUsagePerBot: false
265
- },
266
- workspace_member_count: {
267
- name: "Workspace Member Count",
268
- description: "Maximum number of members that can be added to a workspace.",
269
- default: 3,
270
- kind: "workspace",
271
- category: "count",
272
- trackUsagePerBot: false
273
- },
274
- knowledgebase_vector_storage: {
275
- name: "Knowledgebase Vector Storage",
276
- description: "Maximum size of knowledge base documents",
277
- default: 1e8,
278
- // 100 MB
279
- kind: "workspace",
280
- category: "count",
281
- trackUsagePerBot: true
282
- },
283
- table_row_count: {
284
- name: "Table Row Count",
285
- description: "Maximum number of rows that can be stored in a table.",
286
- default: 5e3,
287
- kind: "workspace",
288
- category: "count",
289
- trackUsagePerBot: true
290
- },
291
- invocation_calls: {
292
- name: "Messages",
293
- description: "Maximum number of messages sent to a bot in a month.",
294
- default: 2e3,
295
- kind: "workspace",
296
- category: "calls",
297
- trackUsagePerBot: true
298
- },
299
- workspace_ratelimit: {
300
- name: "Workspace Ratelimit",
301
- description: "Maximum number of API calls per second for a workspace.",
302
- default: 100,
303
- kind: "workspace",
304
- category: "ratelimit",
305
- trackUsagePerBot: false
306
- },
307
- integrations_owned_count: {
308
- name: "Owned Integrations Count",
309
- description: "Maximum number of integrations that can be created.",
310
- default: 20,
311
- kind: "workspace",
312
- category: "count",
313
- trackUsagePerBot: false
314
- },
315
- ai_spend: {
316
- name: "AI Spend",
317
- description: "Maximum amount of AI spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
318
- default: 5e9,
319
- kind: "workspace",
320
- category: "credit",
321
- trackUsagePerBot: true
322
- },
323
- openai_spend: {
324
- name: "OpenAI Spend",
325
- description: "Maximum amount of OpenAI spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
326
- default: 5e9,
327
- kind: "workspace",
328
- category: "credit",
329
- trackUsagePerBot: true,
330
- parent: "ai_spend"
331
- },
332
- bing_search_spend: {
333
- name: "Bing Search Spend",
334
- description: "Maximum amount of Bing Search spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
335
- default: 5e9,
336
- kind: "workspace",
337
- category: "credit",
338
- trackUsagePerBot: true,
339
- parent: "ai_spend"
340
- },
341
- always_alive: {
342
- name: "Always Alive",
343
- description: "Maximum number of bots that can be in always alive mode.",
344
- default: 0,
345
- kind: "workspace",
346
- category: "count",
347
- trackUsagePerBot: false
348
- }
349
- };
350
- var quotaConfigsV3 = {
351
- invocation_timeout: {
352
- name: "Invocation Timeout",
353
- description: "Maximum time in milliseconds a bot can run before timing out.",
354
- default: 6e4,
355
- kind: "workspace",
356
- category: "timeout",
357
- trackUsagePerBot: false
358
- },
359
- storage_count: {
360
- name: "Storage Count",
361
- description: "Maximum number of storage bytes that can be stored.",
362
- default: 1e8,
363
- // 100 MB
364
- kind: "workspace",
365
- category: "count",
366
- trackUsagePerBot: true
367
- },
368
- bot_count: {
369
- name: "Bot Count",
370
- description: "Maximum number of bots that can be created.",
371
- default: 1,
372
- kind: "workspace",
373
- category: "count",
374
- trackUsagePerBot: false
375
- },
376
- workspace_member_count: {
377
- name: "Workspace Member Count",
378
- description: "Maximum number of members that can be added to a workspace.",
379
- default: 1,
380
- kind: "workspace",
381
- category: "count",
382
- trackUsagePerBot: false
383
- },
384
- knowledgebase_vector_storage: {
385
- name: "Knowledgebase Vector Storage",
386
- description: "Maximum size of knowledge base documents",
387
- default: 1e8,
388
- // 100 MB
389
- kind: "workspace",
390
- category: "count",
391
- trackUsagePerBot: true
392
- },
393
- table_row_count: {
394
- name: "Table Row Count",
395
- description: "Maximum number of rows that can be stored in a table.",
396
- default: 1e3,
397
- kind: "workspace",
398
- category: "count",
399
- trackUsagePerBot: true
400
- },
401
- invocation_calls: {
402
- name: "Messages",
403
- description: "Maximum number of messages sent to a bot in a month.",
404
- default: 500,
405
- kind: "workspace",
406
- category: "calls",
407
- trackUsagePerBot: true
408
- },
409
- workspace_ratelimit: {
410
- name: "Workspace Ratelimit",
411
- description: "Maximum number of API calls per second for a workspace.",
412
- default: 100,
413
- kind: "workspace",
414
- category: "ratelimit",
415
- trackUsagePerBot: false
416
- },
417
- integrations_owned_count: {
418
- name: "Owned Integrations Count",
419
- description: "Maximum number of integrations that can be created.",
420
- default: 20,
421
- kind: "workspace",
422
- category: "count",
423
- trackUsagePerBot: false
424
- },
425
- ai_spend: {
426
- name: "AI Spend",
427
- description: "Maximum amount of AI spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
428
- default: 5e9,
429
- kind: "workspace",
430
- category: "credit",
431
- trackUsagePerBot: true
432
- },
433
- openai_spend: {
434
- name: "OpenAI Spend",
435
- description: "Maximum amount of OpenAI spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
436
- default: 5e9,
437
- kind: "workspace",
438
- category: "credit",
439
- trackUsagePerBot: true,
440
- parent: "ai_spend"
441
- },
442
- bing_search_spend: {
443
- name: "Bing Search Spend",
444
- description: "Maximum amount of Bing Search spend, expressed in nano-dollars (1 nano-dollar = $0.000000001) that can be used in a month.",
445
- default: 5e9,
446
- kind: "workspace",
447
- category: "credit",
448
- trackUsagePerBot: true,
449
- parent: "ai_spend"
450
- },
451
- always_alive: {
452
- name: "Always Alive",
453
- description: "Maximum number of bots that can be in always alive mode.",
454
- default: 0,
455
- kind: "workspace",
456
- category: "count",
457
- trackUsagePerBot: false
458
- }
459
- };
460
-
461
- // src/tags.ts
462
- var Tags = {
463
- bot: {},
464
- conversation: {
465
- upstream: {
466
- description: "Used for HITL as a convention. The upstream conversation ID, ie. the conversation ID of the original conversation"
467
- },
468
- downstream: {
469
- description: "Used for HITL as a convention. The downstream conversation ID, ie. the conversation ID of conversation in HITL channel"
470
- }
471
- },
472
- message: {
473
- origin: {
474
- description: 'The origin location of the message in the bot, eg. "workflow://[id]/node/[id]"'
475
- },
476
- iteration: {
477
- description: "The LLMz iteration ID of the message, for tracking and debugging purposes"
478
- }
479
- },
480
- event: {},
481
- workflow: {},
482
- user: {},
483
- file: {
484
- system: {
485
- type: "boolean",
486
- description: "System files are managed by Botpress and should not be modified"
487
- },
488
- purpose: {
489
- description: 'The purpose of the file, eg. "swap"'
490
- },
491
- source: {
492
- description: 'The source of the file, eg. "knowledge-base"'
493
- },
494
- kbId: {
495
- description: "The ID of the knowledge base"
496
- },
497
- favicon: {
498
- description: 'The favicon URL to display for the file, eg. "https://example.com/favicon.ico"'
499
- },
500
- pageUrl: {
501
- description: 'The original page URL of the file, eg. "https://example.com/page"'
502
- },
503
- integrationName: {
504
- description: "The name of the integration that created the file"
505
- },
506
- webchatInjectConfigVersion: {
507
- description: "The version of the webchat inject configuration (used by the dashboard)"
508
- }
509
- },
510
- table: {
511
- system: {
512
- type: "boolean",
513
- description: "System tables are managed by Botpress and should not be modified"
514
- },
515
- "x-studio-title": {
516
- description: "Overrides the table title in the Studio"
517
- },
518
- "x-studio-readonly": {
519
- type: "boolean",
520
- description: "Prevents the table from being modified by the user in the Studio"
521
- },
522
- "x-studio-icon": {
523
- description: 'Overrides the table icon in the Studio. The value can be a lucide icon URL, eg. "lucide://atom"'
524
- },
525
- "x-studio-color": {
526
- description: "Overrides the table color in the Studio."
527
- },
528
- "x-studio-folder": {
529
- description: "Groups the table in a folder in the Studio"
530
- },
531
- "x-studio-deletable": {
532
- type: "boolean",
533
- description: "Prevents the table from being deleted by the user in the Studio"
534
- }
535
- }
536
- };
537
- // Annotate the CommonJS export names for ESM import in node:
538
- 0 && (module.exports = {
539
- Tags,
540
- limitConfigs,
541
- objectToPrefixMap,
542
- prefixToObjectMap,
543
- quotaConfigs,
544
- quotaConfigsV3,
545
- quotaTypes
546
- });