@bpinternal/const 0.11.0 → 0.13.0
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/billing-legacy/consts.d.ts +9 -0
- package/dist/billing-legacy/consts.js +53 -0
- package/dist/billing-legacy/index.d.ts +2 -0
- package/dist/billing-legacy/index.js +18 -0
- package/dist/billing-next/config/addons.d.ts +181 -0
- package/dist/{billing-addons.js → billing-next/config/addons.js} +70 -47
- package/dist/billing-next/config/index.d.ts +5 -0
- package/dist/billing-next/config/index.js +18 -0
- package/dist/{billing-meters.d.ts → billing-next/config/meters.d.ts} +22 -12
- package/dist/{billing-meters.js → billing-next/config/meters.js} +15 -9
- package/dist/billing-next/config/plans.d.ts +170 -0
- package/dist/{billing-plans.js → billing-next/config/plans.js} +66 -59
- package/dist/{schema.d.ts → billing-next/config/schemas.d.ts} +392 -196
- package/dist/{schema.js → billing-next/config/schemas.js} +19 -12
- package/dist/billing-next/config/versions.d.ts +829 -0
- package/dist/billing-next/config/versions.js +27 -0
- package/dist/billing-next/consts.d.ts +5 -0
- package/dist/billing-next/consts.js +8 -0
- package/dist/billing-next/features.d.ts +125 -0
- package/dist/billing-next/features.js +127 -0
- package/dist/billing-next/index.d.ts +3 -0
- package/dist/billing-next/index.js +19 -0
- package/dist/billing-next/type-utils.d.ts +4 -0
- package/dist/{types.js → billing-next/type-utils.js} +1 -0
- package/dist/index.d.ts +2 -9
- package/dist/index.js +2 -10
- package/package.json +1 -1
- package/dist/billing-addons.d.ts +0 -136
- package/dist/billing-features.d.ts +0 -94
- package/dist/billing-features.js +0 -132
- package/dist/billing-plans.d.ts +0 -127
- package/dist/billing-versions.d.ts +0 -10
- package/dist/billing-versions.js +0 -37
- package/dist/types.d.ts +0 -82
- package/dist/usage-metadata.d.ts +0 -22
- package/dist/usage-metadata.js +0 -138
- /package/dist/{quotas.d.ts → billing-legacy/quotas.d.ts} +0 -0
- /package/dist/{quotas.js → billing-legacy/quotas.js} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.billingDefinitions = exports.billingConfig = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Billing versions for v4 billing system
|
|
6
|
+
* Each version represents a complete billing configuration
|
|
7
|
+
*/
|
|
8
|
+
const plans_1 = require("./plans");
|
|
9
|
+
const addons_1 = require("./addons");
|
|
10
|
+
const meters_1 = require("./meters");
|
|
11
|
+
exports.billingConfig = {
|
|
12
|
+
v4: {
|
|
13
|
+
version: 'v4',
|
|
14
|
+
name: 'Billing Version 4',
|
|
15
|
+
description: 'New billing system with credit grants and entitlements',
|
|
16
|
+
plans: plans_1.plans,
|
|
17
|
+
addons: addons_1.addons,
|
|
18
|
+
meters: meters_1.meters,
|
|
19
|
+
isActive: true,
|
|
20
|
+
createdAt: new Date().toISOString(),
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Alias for billingConfig
|
|
25
|
+
* @deprecated Use `billingConfig` instead
|
|
26
|
+
*/
|
|
27
|
+
exports.billingDefinitions = exports.billingConfig;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { FilterTuple, MapTuple } from './type-utils';
|
|
2
|
+
export declare const billingFeatureDefinitions: [{
|
|
3
|
+
readonly id: "human_in_the_loop";
|
|
4
|
+
readonly name: "Human in the Loop";
|
|
5
|
+
readonly description: "Ability to enable human intervention in bot conversations";
|
|
6
|
+
readonly resetPeriod: undefined;
|
|
7
|
+
readonly consistency: undefined;
|
|
8
|
+
}, {
|
|
9
|
+
readonly id: "ratelimit";
|
|
10
|
+
readonly name: "Rate Limit";
|
|
11
|
+
readonly description: "API rate limiting configuration";
|
|
12
|
+
readonly resetPeriod: undefined;
|
|
13
|
+
readonly consistency: undefined;
|
|
14
|
+
}, {
|
|
15
|
+
readonly id: "incoming_messages_events";
|
|
16
|
+
readonly name: "Incoming Messages/Events";
|
|
17
|
+
readonly description: "Number of incoming messages and events processed per month";
|
|
18
|
+
readonly resetPeriod: "monthly";
|
|
19
|
+
readonly consistency: "eventual";
|
|
20
|
+
readonly dimensions: {
|
|
21
|
+
readonly botId: "Bot ID";
|
|
22
|
+
readonly type: "Message or Event type";
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
readonly id: "integration_spend";
|
|
26
|
+
readonly name: "Integration Spend";
|
|
27
|
+
readonly description: "Credits spent on integrations (AI, third-party services)";
|
|
28
|
+
readonly resetPeriod: "monthly";
|
|
29
|
+
readonly consistency: "eventual";
|
|
30
|
+
readonly grantable: true;
|
|
31
|
+
readonly dimensions: {
|
|
32
|
+
readonly botId: "Bot ID";
|
|
33
|
+
readonly integrationName: "Integration name";
|
|
34
|
+
readonly integrationVersionId: "Integration version ID";
|
|
35
|
+
readonly actionName: "Action name";
|
|
36
|
+
};
|
|
37
|
+
}, {
|
|
38
|
+
readonly id: "integration_subscription";
|
|
39
|
+
readonly name: "Integration Subscription";
|
|
40
|
+
readonly description: "Monthly subscription to premium integrations";
|
|
41
|
+
readonly resetPeriod: "never";
|
|
42
|
+
readonly consistency: "atomic";
|
|
43
|
+
}, {
|
|
44
|
+
readonly id: "table_rows";
|
|
45
|
+
readonly name: "Table Rows";
|
|
46
|
+
readonly description: "Number of table rows that can be stored";
|
|
47
|
+
readonly resetPeriod: "never";
|
|
48
|
+
readonly consistency: "eventual";
|
|
49
|
+
}, {
|
|
50
|
+
readonly id: "bot_count";
|
|
51
|
+
readonly name: "Bot Count";
|
|
52
|
+
readonly description: "Number of bots that can be created";
|
|
53
|
+
readonly resetPeriod: "never";
|
|
54
|
+
readonly consistency: "atomic";
|
|
55
|
+
}, {
|
|
56
|
+
readonly id: "always_alive_count";
|
|
57
|
+
readonly name: "Always Alive Count";
|
|
58
|
+
readonly description: "Number of bots that can be kept always alive";
|
|
59
|
+
readonly resetPeriod: "never";
|
|
60
|
+
readonly consistency: "atomic";
|
|
61
|
+
}, {
|
|
62
|
+
readonly id: "always_alive_concurrency";
|
|
63
|
+
readonly name: "Always Alive Concurrency";
|
|
64
|
+
readonly description: "Number of concurrent instances for always alive bots";
|
|
65
|
+
readonly resetPeriod: "never";
|
|
66
|
+
readonly consistency: "atomic";
|
|
67
|
+
}, {
|
|
68
|
+
readonly id: "collaborator_count";
|
|
69
|
+
readonly name: "Collaborator Count";
|
|
70
|
+
readonly description: "Number of collaborators that can be added to workspace";
|
|
71
|
+
readonly resetPeriod: "never";
|
|
72
|
+
readonly consistency: "atomic";
|
|
73
|
+
}, {
|
|
74
|
+
readonly id: "file_storage";
|
|
75
|
+
readonly name: "File Storage";
|
|
76
|
+
readonly description: "Amount of file storage available";
|
|
77
|
+
readonly resetPeriod: "never";
|
|
78
|
+
readonly consistency: "eventual";
|
|
79
|
+
}, {
|
|
80
|
+
readonly id: "vector_db_storage";
|
|
81
|
+
readonly name: "Vector DB Storage";
|
|
82
|
+
readonly description: "Amount of vector database storage available";
|
|
83
|
+
readonly resetPeriod: "never";
|
|
84
|
+
readonly consistency: "eventual";
|
|
85
|
+
}, {
|
|
86
|
+
readonly id: "saved_versions";
|
|
87
|
+
readonly name: "Saved Versions";
|
|
88
|
+
readonly description: "Number of bot versions that can be saved";
|
|
89
|
+
readonly resetPeriod: "never";
|
|
90
|
+
readonly consistency: "atomic";
|
|
91
|
+
}, {
|
|
92
|
+
readonly id: "indexed_file_count";
|
|
93
|
+
readonly name: "Indexed File Count";
|
|
94
|
+
readonly description: "The number of indexed files in the files api";
|
|
95
|
+
readonly resetPeriod: "never";
|
|
96
|
+
readonly consistency: "eventual";
|
|
97
|
+
}];
|
|
98
|
+
export type BillingFeatureDefinitions = typeof billingFeatureDefinitions;
|
|
99
|
+
export type AtomicBillingFeatureDefinitions = FilterTuple<BillingFeatureDefinitions, {
|
|
100
|
+
consistency: 'atomic';
|
|
101
|
+
}>;
|
|
102
|
+
export type EventualBillingFeatureDefinitions = FilterTuple<BillingFeatureDefinitions, {
|
|
103
|
+
consistency: 'eventual';
|
|
104
|
+
}>;
|
|
105
|
+
export type StaticBillingFeatureDefinitions = FilterTuple<BillingFeatureDefinitions, {
|
|
106
|
+
resetPeriod: 'never';
|
|
107
|
+
}>;
|
|
108
|
+
export type GrantableBillingFeatureDefinitions = FilterTuple<BillingFeatureDefinitions, {
|
|
109
|
+
grantable: true;
|
|
110
|
+
}>;
|
|
111
|
+
export type BillingFeatureIds = MapTuple<BillingFeatureDefinitions, 'id'>;
|
|
112
|
+
export type AtomicBillingFeatureIds = MapTuple<AtomicBillingFeatureDefinitions, 'id'>;
|
|
113
|
+
export type EventualBillingFeatureIds = MapTuple<EventualBillingFeatureDefinitions, 'id'>;
|
|
114
|
+
export type StaticBillingFeatureIds = MapTuple<StaticBillingFeatureDefinitions, 'id'>;
|
|
115
|
+
export type GrantableBillingFeatureIds = MapTuple<GrantableBillingFeatureDefinitions, 'id'>;
|
|
116
|
+
export type BillingFeatureId = BillingFeatureIds[number];
|
|
117
|
+
export type AtomicBillingFeatureId = AtomicBillingFeatureIds[number];
|
|
118
|
+
export type EventualBillingFeatureId = EventualBillingFeatureIds[number];
|
|
119
|
+
export type StaticBillingFeatureId = StaticBillingFeatureIds[number];
|
|
120
|
+
export type GrantableBillingFeatureId = GrantableBillingFeatureIds[number];
|
|
121
|
+
export declare const BILLING_FEATURE_IDS: BillingFeatureIds;
|
|
122
|
+
export declare const ATOMIC_BILLING_FEATURE_IDS: AtomicBillingFeatureIds;
|
|
123
|
+
export declare const NON_ATOMIC_BILLING_FEATURE_IDS: EventualBillingFeatureIds;
|
|
124
|
+
export declare const NON_RESETTING_BILLING_FEATURE_IDS: StaticBillingFeatureIds;
|
|
125
|
+
export declare const CREDIT_GRANT_BILLING_FEATURE_IDS: GrantableBillingFeatureIds;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CREDIT_GRANT_BILLING_FEATURE_IDS = exports.NON_RESETTING_BILLING_FEATURE_IDS = exports.NON_ATOMIC_BILLING_FEATURE_IDS = exports.ATOMIC_BILLING_FEATURE_IDS = exports.BILLING_FEATURE_IDS = exports.billingFeatureDefinitions = void 0;
|
|
4
|
+
exports.billingFeatureDefinitions = [
|
|
5
|
+
{
|
|
6
|
+
id: 'human_in_the_loop',
|
|
7
|
+
name: 'Human in the Loop',
|
|
8
|
+
description: 'Ability to enable human intervention in bot conversations',
|
|
9
|
+
resetPeriod: undefined,
|
|
10
|
+
consistency: undefined,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: 'ratelimit',
|
|
14
|
+
name: 'Rate Limit',
|
|
15
|
+
description: 'API rate limiting configuration',
|
|
16
|
+
resetPeriod: undefined,
|
|
17
|
+
consistency: undefined,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: 'incoming_messages_events',
|
|
21
|
+
name: 'Incoming Messages/Events',
|
|
22
|
+
description: 'Number of incoming messages and events processed per month',
|
|
23
|
+
resetPeriod: 'monthly',
|
|
24
|
+
consistency: 'eventual',
|
|
25
|
+
dimensions: {
|
|
26
|
+
botId: 'Bot ID',
|
|
27
|
+
type: 'Message or Event type',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: 'integration_spend',
|
|
32
|
+
name: 'Integration Spend',
|
|
33
|
+
description: 'Credits spent on integrations (AI, third-party services)',
|
|
34
|
+
resetPeriod: 'monthly',
|
|
35
|
+
consistency: 'eventual',
|
|
36
|
+
grantable: true,
|
|
37
|
+
dimensions: {
|
|
38
|
+
botId: 'Bot ID',
|
|
39
|
+
integrationName: 'Integration name',
|
|
40
|
+
integrationVersionId: 'Integration version ID',
|
|
41
|
+
actionName: 'Action name',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'integration_subscription',
|
|
46
|
+
name: 'Integration Subscription',
|
|
47
|
+
description: 'Monthly subscription to premium integrations',
|
|
48
|
+
resetPeriod: 'never',
|
|
49
|
+
consistency: 'atomic',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'table_rows',
|
|
53
|
+
name: 'Table Rows',
|
|
54
|
+
description: 'Number of table rows that can be stored',
|
|
55
|
+
resetPeriod: 'never',
|
|
56
|
+
consistency: 'eventual',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'bot_count',
|
|
60
|
+
name: 'Bot Count',
|
|
61
|
+
description: 'Number of bots that can be created',
|
|
62
|
+
resetPeriod: 'never',
|
|
63
|
+
consistency: 'atomic',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'always_alive_count',
|
|
67
|
+
name: 'Always Alive Count',
|
|
68
|
+
description: 'Number of bots that can be kept always alive',
|
|
69
|
+
resetPeriod: 'never',
|
|
70
|
+
consistency: 'atomic',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: 'always_alive_concurrency',
|
|
74
|
+
name: 'Always Alive Concurrency',
|
|
75
|
+
description: 'Number of concurrent instances for always alive bots',
|
|
76
|
+
resetPeriod: 'never',
|
|
77
|
+
consistency: 'atomic',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 'collaborator_count',
|
|
81
|
+
name: 'Collaborator Count',
|
|
82
|
+
description: 'Number of collaborators that can be added to workspace',
|
|
83
|
+
resetPeriod: 'never',
|
|
84
|
+
consistency: 'atomic',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: 'file_storage',
|
|
88
|
+
name: 'File Storage',
|
|
89
|
+
description: 'Amount of file storage available',
|
|
90
|
+
resetPeriod: 'never',
|
|
91
|
+
consistency: 'eventual',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 'vector_db_storage',
|
|
95
|
+
name: 'Vector DB Storage',
|
|
96
|
+
description: 'Amount of vector database storage available',
|
|
97
|
+
resetPeriod: 'never',
|
|
98
|
+
consistency: 'eventual',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 'saved_versions',
|
|
102
|
+
name: 'Saved Versions',
|
|
103
|
+
description: 'Number of bot versions that can be saved',
|
|
104
|
+
resetPeriod: 'never',
|
|
105
|
+
consistency: 'atomic',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: 'indexed_file_count',
|
|
109
|
+
name: 'Indexed File Count',
|
|
110
|
+
description: 'The number of indexed files in the files api',
|
|
111
|
+
resetPeriod: 'never',
|
|
112
|
+
consistency: 'eventual',
|
|
113
|
+
},
|
|
114
|
+
];
|
|
115
|
+
exports.BILLING_FEATURE_IDS = exports.billingFeatureDefinitions.map((def) => def.id);
|
|
116
|
+
exports.ATOMIC_BILLING_FEATURE_IDS = exports.billingFeatureDefinitions
|
|
117
|
+
.filter((def) => def.consistency === 'atomic')
|
|
118
|
+
.map((def) => def.id);
|
|
119
|
+
exports.NON_ATOMIC_BILLING_FEATURE_IDS = exports.billingFeatureDefinitions
|
|
120
|
+
.filter((def) => def.consistency === 'eventual')
|
|
121
|
+
.map((def) => def.id);
|
|
122
|
+
exports.NON_RESETTING_BILLING_FEATURE_IDS = exports.billingFeatureDefinitions
|
|
123
|
+
.filter((def) => def.resetPeriod === 'never')
|
|
124
|
+
.map((def) => def.id);
|
|
125
|
+
exports.CREDIT_GRANT_BILLING_FEATURE_IDS = exports.billingFeatureDefinitions
|
|
126
|
+
.filter((def) => def.grantable)
|
|
127
|
+
.map((def) => def.id);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./features"), exports);
|
|
18
|
+
__exportStar(require("./config"), exports);
|
|
19
|
+
__exportStar(require("./consts"), exports);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type MapTuple<T extends readonly object[], K extends keyof T[number]> = T extends readonly [...infer Items] ? {
|
|
2
|
+
[I in keyof Items]: Items[I] extends Record<K, infer Value> ? Value : never;
|
|
3
|
+
} : never;
|
|
4
|
+
export type FilterTuple<T extends readonly unknown[], F> = T extends readonly [infer Head, ...infer Tail] ? Head extends F ? [Head, ...FilterTuple<Tail, F>] : FilterTuple<Tail, F> : [];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
export * from './bot-use-cases';
|
|
2
2
|
export * from './limits';
|
|
3
3
|
export * from './prefixes';
|
|
4
|
-
export * from './
|
|
4
|
+
export * from './billing-legacy';
|
|
5
5
|
export * from './tags';
|
|
6
6
|
export * from './workflow-names';
|
|
7
7
|
export * from './cancellation-reasons';
|
|
8
|
-
export * from './billing-
|
|
9
|
-
export * from './billing-plans';
|
|
10
|
-
export * from './billing-versions';
|
|
11
|
-
export * from './billing-addons';
|
|
12
|
-
export * from './billing-meters';
|
|
13
|
-
export * from './usage-metadata';
|
|
14
|
-
export * from './schema';
|
|
15
|
-
export * from './types';
|
|
8
|
+
export * from './billing-next';
|
package/dist/index.js
CHANGED
|
@@ -17,16 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./bot-use-cases"), exports);
|
|
18
18
|
__exportStar(require("./limits"), exports);
|
|
19
19
|
__exportStar(require("./prefixes"), exports);
|
|
20
|
-
__exportStar(require("./
|
|
20
|
+
__exportStar(require("./billing-legacy"), exports);
|
|
21
21
|
__exportStar(require("./tags"), exports);
|
|
22
22
|
__exportStar(require("./workflow-names"), exports);
|
|
23
23
|
__exportStar(require("./cancellation-reasons"), exports);
|
|
24
|
-
|
|
25
|
-
__exportStar(require("./billing-features"), exports);
|
|
26
|
-
__exportStar(require("./billing-plans"), exports);
|
|
27
|
-
__exportStar(require("./billing-versions"), exports);
|
|
28
|
-
__exportStar(require("./billing-addons"), exports);
|
|
29
|
-
__exportStar(require("./billing-meters"), exports);
|
|
30
|
-
__exportStar(require("./usage-metadata"), exports);
|
|
31
|
-
__exportStar(require("./schema"), exports);
|
|
32
|
-
__exportStar(require("./types"), exports);
|
|
24
|
+
__exportStar(require("./billing-next"), exports);
|
package/package.json
CHANGED
package/dist/billing-addons.d.ts
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
export declare const billingAddonsDefs: {
|
|
2
|
-
readonly bot_addon: {
|
|
3
|
-
readonly id: "bot_addon";
|
|
4
|
-
readonly name: "Add-on - Bot";
|
|
5
|
-
readonly description: "Add one more bot to your workspace";
|
|
6
|
-
readonly prices: [{
|
|
7
|
-
readonly price: 10;
|
|
8
|
-
readonly currency: "usd";
|
|
9
|
-
readonly interval: "month";
|
|
10
|
-
}];
|
|
11
|
-
readonly feature: "bot_count";
|
|
12
|
-
readonly increment: 1;
|
|
13
|
-
};
|
|
14
|
-
readonly collaborator_addon: {
|
|
15
|
-
readonly id: "collaborator_addon";
|
|
16
|
-
readonly name: "Add-on - Collaborators";
|
|
17
|
-
readonly description: "Add one more collaborator to your workspace";
|
|
18
|
-
readonly prices: [{
|
|
19
|
-
readonly price: 25;
|
|
20
|
-
readonly currency: "usd";
|
|
21
|
-
readonly interval: "month";
|
|
22
|
-
}];
|
|
23
|
-
readonly feature: "collaborator_count";
|
|
24
|
-
readonly increment: 1;
|
|
25
|
-
};
|
|
26
|
-
readonly always_alive_addon: {
|
|
27
|
-
readonly id: "always_alive_addon";
|
|
28
|
-
readonly name: "Add-on - Always Alive";
|
|
29
|
-
readonly description: "Keep one more bot always alive";
|
|
30
|
-
readonly prices: [{
|
|
31
|
-
readonly price: 10;
|
|
32
|
-
readonly currency: "usd";
|
|
33
|
-
readonly interval: "month";
|
|
34
|
-
}];
|
|
35
|
-
readonly feature: "always_alive_count";
|
|
36
|
-
readonly increment: 1;
|
|
37
|
-
};
|
|
38
|
-
readonly messages_events_addon: {
|
|
39
|
-
readonly id: "messages_events_addon";
|
|
40
|
-
readonly name: "Add-on - Messages & Events";
|
|
41
|
-
readonly description: "Adds 5,000 messages and events";
|
|
42
|
-
readonly prices: [{
|
|
43
|
-
readonly price: 20;
|
|
44
|
-
readonly currency: "usd";
|
|
45
|
-
readonly interval: "month";
|
|
46
|
-
}];
|
|
47
|
-
readonly feature: "incoming_messages_events";
|
|
48
|
-
readonly increment: 5000;
|
|
49
|
-
};
|
|
50
|
-
readonly table_rows_addon: {
|
|
51
|
-
readonly id: "table_rows_addon";
|
|
52
|
-
readonly name: "Add-on - Table Rows";
|
|
53
|
-
readonly description: "Adds 100,000 additional table rows";
|
|
54
|
-
readonly prices: [{
|
|
55
|
-
readonly price: 25;
|
|
56
|
-
readonly currency: "usd";
|
|
57
|
-
readonly interval: "month";
|
|
58
|
-
}];
|
|
59
|
-
readonly feature: "table_rows";
|
|
60
|
-
readonly increment: 100000;
|
|
61
|
-
};
|
|
62
|
-
readonly file_storage_addon: {
|
|
63
|
-
readonly id: "file_storage_addon";
|
|
64
|
-
readonly name: "Add-on - File Storage";
|
|
65
|
-
readonly description: "Adds 10GB of File Storage";
|
|
66
|
-
readonly prices: [{
|
|
67
|
-
readonly price: 10;
|
|
68
|
-
readonly currency: "usd";
|
|
69
|
-
readonly interval: "month";
|
|
70
|
-
}];
|
|
71
|
-
readonly feature: "file_storage";
|
|
72
|
-
readonly increment: 10000000000;
|
|
73
|
-
};
|
|
74
|
-
readonly vector_db_storage_addon: {
|
|
75
|
-
readonly id: "vector_db_storage_addon";
|
|
76
|
-
readonly name: "Add-on - Vector DB Storage";
|
|
77
|
-
readonly description: "Add 1 GB of vector database storage";
|
|
78
|
-
readonly prices: [{
|
|
79
|
-
readonly price: 20;
|
|
80
|
-
readonly currency: "usd";
|
|
81
|
-
readonly interval: "month";
|
|
82
|
-
}];
|
|
83
|
-
readonly feature: "vector_db_storage";
|
|
84
|
-
readonly increment: 1000000000;
|
|
85
|
-
};
|
|
86
|
-
readonly web_search_addon: {
|
|
87
|
-
readonly id: "web_search_addon";
|
|
88
|
-
readonly name: "Web Search and Crawl";
|
|
89
|
-
readonly description: "Web search and crawl functionality";
|
|
90
|
-
readonly prices: [{
|
|
91
|
-
readonly price: 10;
|
|
92
|
-
readonly currency: "usd";
|
|
93
|
-
readonly interval: "month";
|
|
94
|
-
}];
|
|
95
|
-
readonly feature: "integration_spend";
|
|
96
|
-
readonly increment: 10000000000;
|
|
97
|
-
};
|
|
98
|
-
readonly ai_credits_addon: {
|
|
99
|
-
readonly id: "ai_credits_addon";
|
|
100
|
-
readonly name: "AI Tokens";
|
|
101
|
-
readonly description: "Add $25 worth of AI credits";
|
|
102
|
-
readonly prices: [{
|
|
103
|
-
readonly price: 25;
|
|
104
|
-
readonly currency: "usd";
|
|
105
|
-
readonly interval: "month";
|
|
106
|
-
}];
|
|
107
|
-
readonly feature: "integration_spend";
|
|
108
|
-
readonly increment: 25000000000;
|
|
109
|
-
};
|
|
110
|
-
readonly enterprise_ai_token: {
|
|
111
|
-
readonly id: "enterprise_ai_token";
|
|
112
|
-
readonly name: "Enterprise - AI Token";
|
|
113
|
-
readonly description: "Enterprise AI token credits";
|
|
114
|
-
readonly prices: [{
|
|
115
|
-
readonly price: -1;
|
|
116
|
-
readonly currency: "usd";
|
|
117
|
-
readonly interval: "month";
|
|
118
|
-
}];
|
|
119
|
-
readonly feature: "integration_spend";
|
|
120
|
-
readonly increment: 100000000000;
|
|
121
|
-
readonly hidden: true;
|
|
122
|
-
};
|
|
123
|
-
readonly enterprise_additional_workspace: {
|
|
124
|
-
readonly id: "enterprise_additional_workspace";
|
|
125
|
-
readonly name: "Enterprise - Additional Workspace";
|
|
126
|
-
readonly description: "Enterprise additional workspace";
|
|
127
|
-
readonly prices: [{
|
|
128
|
-
readonly price: -1;
|
|
129
|
-
readonly currency: "usd";
|
|
130
|
-
readonly interval: "month";
|
|
131
|
-
}];
|
|
132
|
-
readonly feature: "collaborator_count";
|
|
133
|
-
readonly increment: 10;
|
|
134
|
-
readonly hidden: true;
|
|
135
|
-
};
|
|
136
|
-
};
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Billing features for v4 billing system
|
|
3
|
-
* Based on the requirements from the billing refactor document
|
|
4
|
-
*/
|
|
5
|
-
export declare const BILLING_FEATURE_IDS: readonly ["human_in_the_loop", "ratelimit", "incoming_messages_events", "integration_spend", "integration_subscription", "table_rows", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "file_storage", "vector_db_storage", "indexed_file_count", "saved_versions"];
|
|
6
|
-
export declare const ATOMIC_BILLING_FEATURE_IDS: ["integration_subscription", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "saved_versions"];
|
|
7
|
-
export declare const NON_ATOMIC_BILLING_FEATURE_IDS: ["incoming_messages_events", "integration_spend", "table_rows", "file_storage", "vector_db_storage", "indexed_file_count"];
|
|
8
|
-
export declare const NON_RESETTING_BILLING_FEATURE_IDS: ["integration_subscription", "bot_count", "always_alive_count", "always_alive_concurrency", "collaborator_count", "saved_versions", "table_rows", "file_storage", "vector_db_storage", "indexed_file_count"];
|
|
9
|
-
export declare const CREDIT_GRANT_BILLING_FEATURE_IDS: ["integration_spend"];
|
|
10
|
-
export declare const billingFeatureDefs: {
|
|
11
|
-
readonly human_in_the_loop: {
|
|
12
|
-
readonly name: "Human in the Loop";
|
|
13
|
-
readonly description: "Ability to enable human intervention in bot conversations";
|
|
14
|
-
readonly type: "boolean";
|
|
15
|
-
};
|
|
16
|
-
readonly ratelimit: {
|
|
17
|
-
readonly name: "Rate Limit";
|
|
18
|
-
readonly description: "API rate limiting configuration";
|
|
19
|
-
readonly type: "static";
|
|
20
|
-
};
|
|
21
|
-
readonly incoming_messages_events: {
|
|
22
|
-
readonly name: "Incoming Messages/Events";
|
|
23
|
-
readonly description: "Number of incoming messages and events processed per month";
|
|
24
|
-
readonly type: "usage";
|
|
25
|
-
readonly resetPeriod: "monthly";
|
|
26
|
-
readonly dimensions: {
|
|
27
|
-
readonly botId: "Bot ID";
|
|
28
|
-
readonly type: "Message or Event type";
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
readonly integration_spend: {
|
|
32
|
-
readonly name: "Integration Spend";
|
|
33
|
-
readonly description: "Credits spent on integrations (AI, third-party services)";
|
|
34
|
-
readonly type: "usage";
|
|
35
|
-
readonly resetPeriod: "monthly";
|
|
36
|
-
readonly dimensions: {
|
|
37
|
-
readonly botId: "Bot ID";
|
|
38
|
-
readonly integrationName: "Integration name";
|
|
39
|
-
readonly integrationVersionId: "Integration version ID";
|
|
40
|
-
readonly actionName: "Action name";
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
readonly integration_subscription: {
|
|
44
|
-
readonly name: "Integration Subscription";
|
|
45
|
-
readonly description: "Monthly subscription to premium integrations";
|
|
46
|
-
readonly type: "subscription";
|
|
47
|
-
readonly resetPeriod: "monthly";
|
|
48
|
-
};
|
|
49
|
-
readonly table_rows: {
|
|
50
|
-
readonly name: "Table Rows";
|
|
51
|
-
readonly description: "Number of table rows that can be stored";
|
|
52
|
-
readonly type: "static";
|
|
53
|
-
};
|
|
54
|
-
readonly bot_count: {
|
|
55
|
-
readonly name: "Bot Count";
|
|
56
|
-
readonly description: "Number of bots that can be created";
|
|
57
|
-
readonly type: "static";
|
|
58
|
-
};
|
|
59
|
-
readonly always_alive_count: {
|
|
60
|
-
readonly name: "Always Alive Count";
|
|
61
|
-
readonly description: "Number of bots that can be kept always alive";
|
|
62
|
-
readonly type: "static";
|
|
63
|
-
};
|
|
64
|
-
readonly always_alive_concurrency: {
|
|
65
|
-
readonly name: "Always Alive Concurrency";
|
|
66
|
-
readonly description: "Number of concurrent instances for always alive bots";
|
|
67
|
-
readonly type: "static";
|
|
68
|
-
};
|
|
69
|
-
readonly collaborator_count: {
|
|
70
|
-
readonly name: "Collaborator Count";
|
|
71
|
-
readonly description: "Number of collaborators that can be added to workspace";
|
|
72
|
-
readonly type: "static";
|
|
73
|
-
};
|
|
74
|
-
readonly file_storage: {
|
|
75
|
-
readonly name: "File Storage";
|
|
76
|
-
readonly description: "Amount of file storage available";
|
|
77
|
-
readonly type: "static";
|
|
78
|
-
};
|
|
79
|
-
readonly vector_db_storage: {
|
|
80
|
-
readonly name: "Vector DB Storage";
|
|
81
|
-
readonly description: "Amount of vector database storage available";
|
|
82
|
-
readonly type: "static";
|
|
83
|
-
};
|
|
84
|
-
readonly saved_versions: {
|
|
85
|
-
readonly name: "Saved Versions";
|
|
86
|
-
readonly description: "Number of bot versions that can be saved";
|
|
87
|
-
readonly type: "static";
|
|
88
|
-
};
|
|
89
|
-
readonly indexed_file_count: {
|
|
90
|
-
readonly name: "Indexed File Count";
|
|
91
|
-
readonly description: "The number of indexed files in the files api";
|
|
92
|
-
readonly type: "static";
|
|
93
|
-
};
|
|
94
|
-
};
|