@bpinternal/const 0.12.0 → 0.14.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 +165 -0
- package/dist/{billing-addons.js → billing-next/config/addons.js} +64 -57
- 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-plans.d.ts → billing-next/config/plans.d.ts} +59 -68
- package/dist/{billing-plans.js → billing-next/config/plans.js} +40 -68
- 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 +747 -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 +95 -0
- package/dist/billing-next/features.js +92 -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-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,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These constants and types are used by the billing v3 codebase, we should ensure both codebase can evolve separately
|
|
3
|
+
*/
|
|
4
|
+
export declare const ALLOWED_TRIAL_LENGTHS_IN_DAYS = 7;
|
|
5
|
+
export declare const ALLOWED_TRIAL_PLANS: readonly ["plus", "team"];
|
|
6
|
+
export declare const BILLING_PLAN_IDS: readonly ["community", "plus", "team", "enterprise", "managed"];
|
|
7
|
+
export declare const billingFeatureDefs: Record<string, {
|
|
8
|
+
name: string;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* These constants and types are used by the billing v3 codebase, we should ensure both codebase can evolve separately
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.billingFeatureDefs = exports.BILLING_PLAN_IDS = exports.ALLOWED_TRIAL_PLANS = exports.ALLOWED_TRIAL_LENGTHS_IN_DAYS = void 0;
|
|
7
|
+
exports.ALLOWED_TRIAL_LENGTHS_IN_DAYS = 7;
|
|
8
|
+
exports.ALLOWED_TRIAL_PLANS = ['plus', 'team'];
|
|
9
|
+
exports.BILLING_PLAN_IDS = ['community', 'plus', 'team', 'enterprise', 'managed']; // keep this in order of lowest to highest tier
|
|
10
|
+
exports.billingFeatureDefs = {
|
|
11
|
+
human_in_the_loop: {
|
|
12
|
+
name: 'Human in the Loop',
|
|
13
|
+
},
|
|
14
|
+
ratelimit: {
|
|
15
|
+
name: 'Rate Limit',
|
|
16
|
+
},
|
|
17
|
+
incoming_messages_events: {
|
|
18
|
+
name: 'Incoming Messages/Events',
|
|
19
|
+
},
|
|
20
|
+
integration_spend: {
|
|
21
|
+
name: 'Integration Spend',
|
|
22
|
+
},
|
|
23
|
+
integration_subscription: {
|
|
24
|
+
name: 'Integration Subscription',
|
|
25
|
+
},
|
|
26
|
+
table_rows: {
|
|
27
|
+
name: 'Table Rows',
|
|
28
|
+
},
|
|
29
|
+
bot_count: {
|
|
30
|
+
name: 'Bot Count',
|
|
31
|
+
},
|
|
32
|
+
always_alive_count: {
|
|
33
|
+
name: 'Always Alive Count',
|
|
34
|
+
},
|
|
35
|
+
always_alive_concurrency: {
|
|
36
|
+
name: 'Always Alive Concurrency',
|
|
37
|
+
},
|
|
38
|
+
collaborator_count: {
|
|
39
|
+
name: 'Collaborator Count',
|
|
40
|
+
},
|
|
41
|
+
file_storage: {
|
|
42
|
+
name: 'File Storage',
|
|
43
|
+
},
|
|
44
|
+
vector_db_storage: {
|
|
45
|
+
name: 'Vector DB Storage',
|
|
46
|
+
},
|
|
47
|
+
saved_versions: {
|
|
48
|
+
name: 'Saved Versions',
|
|
49
|
+
},
|
|
50
|
+
indexed_file_count: {
|
|
51
|
+
name: 'Indexed File Count',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./quotas"), exports);
|
|
18
|
+
__exportStar(require("./consts"), exports);
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
export type BillingAddonId = keyof typeof addons;
|
|
2
|
+
export declare const addons: {
|
|
3
|
+
readonly bot_addon: {
|
|
4
|
+
readonly id: "bot_addon";
|
|
5
|
+
readonly name: "Add-on - Bot";
|
|
6
|
+
readonly description: "Add one more bot to your workspace";
|
|
7
|
+
readonly prices: {
|
|
8
|
+
readonly month: {
|
|
9
|
+
readonly amount: 10;
|
|
10
|
+
readonly currency: "usd";
|
|
11
|
+
readonly interval: "month";
|
|
12
|
+
readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
readonly feature: "bot_count";
|
|
16
|
+
readonly increment: 1;
|
|
17
|
+
readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
|
|
18
|
+
};
|
|
19
|
+
readonly collaborator_addon: {
|
|
20
|
+
readonly id: "collaborator_addon";
|
|
21
|
+
readonly name: "Add-on - Collaborators";
|
|
22
|
+
readonly description: "Add one more collaborator to your workspace";
|
|
23
|
+
readonly prices: {
|
|
24
|
+
readonly month: {
|
|
25
|
+
readonly amount: 25;
|
|
26
|
+
readonly currency: "usd";
|
|
27
|
+
readonly interval: "month";
|
|
28
|
+
readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
readonly feature: "collaborator_count";
|
|
32
|
+
readonly increment: 1;
|
|
33
|
+
readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
|
|
34
|
+
};
|
|
35
|
+
readonly messages_events_addon: {
|
|
36
|
+
readonly id: "messages_events_addon";
|
|
37
|
+
readonly name: "Add-on - Messages & Events";
|
|
38
|
+
readonly description: "Adds 5,000 messages and events";
|
|
39
|
+
readonly prices: {
|
|
40
|
+
readonly month: {
|
|
41
|
+
readonly amount: 20;
|
|
42
|
+
readonly currency: "usd";
|
|
43
|
+
readonly interval: "month";
|
|
44
|
+
readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
readonly feature: "incoming_messages_events";
|
|
48
|
+
readonly increment: 5000;
|
|
49
|
+
readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
|
|
50
|
+
};
|
|
51
|
+
readonly table_rows_addon: {
|
|
52
|
+
readonly id: "table_rows_addon";
|
|
53
|
+
readonly name: "Add-on - Table Rows";
|
|
54
|
+
readonly description: "Adds 100,000 additional table rows";
|
|
55
|
+
readonly prices: {
|
|
56
|
+
readonly month: {
|
|
57
|
+
readonly amount: 25;
|
|
58
|
+
readonly currency: "usd";
|
|
59
|
+
readonly interval: "month";
|
|
60
|
+
readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
readonly feature: "table_rows";
|
|
64
|
+
readonly increment: 100000;
|
|
65
|
+
readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
|
|
66
|
+
};
|
|
67
|
+
readonly file_storage_addon: {
|
|
68
|
+
readonly id: "file_storage_addon";
|
|
69
|
+
readonly name: "Add-on - File Storage";
|
|
70
|
+
readonly description: "Adds 10GB of File Storage";
|
|
71
|
+
readonly prices: {
|
|
72
|
+
readonly month: {
|
|
73
|
+
readonly amount: 10;
|
|
74
|
+
readonly currency: "usd";
|
|
75
|
+
readonly interval: "month";
|
|
76
|
+
readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
readonly feature: "file_storage";
|
|
80
|
+
readonly increment: 10000000000;
|
|
81
|
+
readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
|
|
82
|
+
};
|
|
83
|
+
readonly vector_db_storage_addon: {
|
|
84
|
+
readonly id: "vector_db_storage_addon";
|
|
85
|
+
readonly name: "Add-on - Vector DB Storage";
|
|
86
|
+
readonly description: "Add 1 GB of vector database storage";
|
|
87
|
+
readonly prices: {
|
|
88
|
+
readonly month: {
|
|
89
|
+
readonly amount: 20;
|
|
90
|
+
readonly currency: "usd";
|
|
91
|
+
readonly interval: "month";
|
|
92
|
+
readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
readonly feature: "vector_db_storage";
|
|
96
|
+
readonly increment: 1000000000;
|
|
97
|
+
readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
|
|
98
|
+
};
|
|
99
|
+
readonly web_search_addon: {
|
|
100
|
+
readonly id: "web_search_addon";
|
|
101
|
+
readonly name: "Web Search and Crawl";
|
|
102
|
+
readonly description: "Web search and crawl functionality";
|
|
103
|
+
readonly prices: {
|
|
104
|
+
readonly month: {
|
|
105
|
+
readonly amount: 10;
|
|
106
|
+
readonly currency: "usd";
|
|
107
|
+
readonly interval: "month";
|
|
108
|
+
readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
readonly feature: "integration_spend";
|
|
112
|
+
readonly increment: 10000000000;
|
|
113
|
+
readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
|
|
114
|
+
};
|
|
115
|
+
readonly ai_credits_addon: {
|
|
116
|
+
readonly id: "ai_credits_addon";
|
|
117
|
+
readonly name: "AI Tokens";
|
|
118
|
+
readonly description: "Add $25 worth of AI credits";
|
|
119
|
+
readonly prices: {
|
|
120
|
+
readonly month: {
|
|
121
|
+
readonly amount: 25;
|
|
122
|
+
readonly currency: "usd";
|
|
123
|
+
readonly interval: "month";
|
|
124
|
+
readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
readonly feature: "integration_spend";
|
|
128
|
+
readonly increment: 25000000000;
|
|
129
|
+
readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
|
|
130
|
+
};
|
|
131
|
+
readonly enterprise_ai_token: {
|
|
132
|
+
readonly id: "enterprise_ai_token";
|
|
133
|
+
readonly name: "Enterprise - AI Token";
|
|
134
|
+
readonly description: "Enterprise AI token credits";
|
|
135
|
+
readonly prices: {
|
|
136
|
+
readonly month: {
|
|
137
|
+
readonly amount: -1;
|
|
138
|
+
readonly currency: "usd";
|
|
139
|
+
readonly interval: "month";
|
|
140
|
+
readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
readonly feature: "integration_spend";
|
|
144
|
+
readonly increment: 100000000000;
|
|
145
|
+
readonly hidden: true;
|
|
146
|
+
readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
|
|
147
|
+
};
|
|
148
|
+
readonly enterprise_additional_workspace: {
|
|
149
|
+
readonly id: "enterprise_additional_workspace";
|
|
150
|
+
readonly name: "Enterprise - Additional Workspace";
|
|
151
|
+
readonly description: "Enterprise additional workspace";
|
|
152
|
+
readonly prices: {
|
|
153
|
+
readonly month: {
|
|
154
|
+
readonly amount: -1;
|
|
155
|
+
readonly currency: "usd";
|
|
156
|
+
readonly interval: "month";
|
|
157
|
+
readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
readonly feature: "collaborator_count";
|
|
161
|
+
readonly increment: 10;
|
|
162
|
+
readonly hidden: true;
|
|
163
|
+
readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
@@ -1,163 +1,170 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
3
|
+
exports.addons = void 0;
|
|
4
|
+
const consts_1 = require("../consts");
|
|
5
|
+
const schemas_1 = require("./schemas");
|
|
5
6
|
/* IMPORTANT: the `name` field is used to match existing products in Stripe DO NOT CHANGE THE NAME OF AN EXISTING PRODUCT */
|
|
6
|
-
exports.
|
|
7
|
+
exports.addons = {
|
|
7
8
|
bot_addon: {
|
|
8
9
|
id: 'bot_addon',
|
|
9
10
|
name: 'Add-on - Bot',
|
|
10
11
|
description: 'Add one more bot to your workspace',
|
|
11
|
-
prices:
|
|
12
|
-
{
|
|
13
|
-
|
|
12
|
+
prices: {
|
|
13
|
+
month: {
|
|
14
|
+
amount: 10,
|
|
14
15
|
currency: 'usd',
|
|
15
16
|
interval: 'month',
|
|
17
|
+
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
16
18
|
},
|
|
17
|
-
|
|
19
|
+
},
|
|
18
20
|
feature: 'bot_count',
|
|
19
21
|
increment: 1,
|
|
22
|
+
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
20
23
|
},
|
|
21
24
|
collaborator_addon: {
|
|
22
25
|
id: 'collaborator_addon',
|
|
23
26
|
name: 'Add-on - Collaborators',
|
|
24
27
|
description: 'Add one more collaborator to your workspace',
|
|
25
|
-
prices:
|
|
26
|
-
{
|
|
27
|
-
|
|
28
|
+
prices: {
|
|
29
|
+
month: {
|
|
30
|
+
amount: 25,
|
|
28
31
|
currency: 'usd',
|
|
29
32
|
interval: 'month',
|
|
33
|
+
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
30
34
|
},
|
|
31
|
-
|
|
35
|
+
},
|
|
32
36
|
feature: 'collaborator_count',
|
|
33
37
|
increment: 1,
|
|
34
|
-
|
|
35
|
-
always_alive_addon: {
|
|
36
|
-
id: 'always_alive_addon',
|
|
37
|
-
name: 'Add-on - Always Alive',
|
|
38
|
-
description: 'Keep one more bot always alive',
|
|
39
|
-
prices: [
|
|
40
|
-
{
|
|
41
|
-
price: 10,
|
|
42
|
-
currency: 'usd',
|
|
43
|
-
interval: 'month',
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
feature: 'always_alive_count',
|
|
47
|
-
increment: 1,
|
|
38
|
+
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
48
39
|
},
|
|
49
40
|
messages_events_addon: {
|
|
50
41
|
id: 'messages_events_addon',
|
|
51
42
|
name: 'Add-on - Messages & Events',
|
|
52
43
|
description: 'Adds 5,000 messages and events',
|
|
53
|
-
prices:
|
|
54
|
-
{
|
|
55
|
-
|
|
44
|
+
prices: {
|
|
45
|
+
month: {
|
|
46
|
+
amount: 20,
|
|
56
47
|
currency: 'usd',
|
|
57
48
|
interval: 'month',
|
|
49
|
+
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
58
50
|
},
|
|
59
|
-
|
|
51
|
+
},
|
|
60
52
|
feature: 'incoming_messages_events',
|
|
61
53
|
increment: 5000,
|
|
54
|
+
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
62
55
|
},
|
|
63
56
|
table_rows_addon: {
|
|
64
57
|
id: 'table_rows_addon',
|
|
65
58
|
name: 'Add-on - Table Rows',
|
|
66
59
|
description: 'Adds 100,000 additional table rows',
|
|
67
|
-
prices:
|
|
68
|
-
{
|
|
69
|
-
|
|
60
|
+
prices: {
|
|
61
|
+
month: {
|
|
62
|
+
amount: 25,
|
|
70
63
|
currency: 'usd',
|
|
71
64
|
interval: 'month',
|
|
65
|
+
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
72
66
|
},
|
|
73
|
-
|
|
67
|
+
},
|
|
74
68
|
feature: 'table_rows',
|
|
75
69
|
increment: 100000,
|
|
70
|
+
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
76
71
|
},
|
|
77
72
|
file_storage_addon: {
|
|
78
73
|
id: 'file_storage_addon',
|
|
79
74
|
name: 'Add-on - File Storage',
|
|
80
75
|
description: 'Adds 10GB of File Storage',
|
|
81
|
-
prices:
|
|
82
|
-
{
|
|
83
|
-
|
|
76
|
+
prices: {
|
|
77
|
+
month: {
|
|
78
|
+
amount: 10,
|
|
84
79
|
currency: 'usd',
|
|
85
80
|
interval: 'month',
|
|
81
|
+
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
86
82
|
},
|
|
87
|
-
|
|
83
|
+
},
|
|
88
84
|
feature: 'file_storage',
|
|
89
85
|
increment: 10_000_000_000, // 10 GB
|
|
86
|
+
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
90
87
|
},
|
|
91
88
|
vector_db_storage_addon: {
|
|
92
89
|
id: 'vector_db_storage_addon',
|
|
93
90
|
name: 'Add-on - Vector DB Storage',
|
|
94
91
|
description: 'Add 1 GB of vector database storage',
|
|
95
|
-
prices:
|
|
96
|
-
{
|
|
97
|
-
|
|
92
|
+
prices: {
|
|
93
|
+
month: {
|
|
94
|
+
amount: 20,
|
|
98
95
|
currency: 'usd',
|
|
99
96
|
interval: 'month',
|
|
97
|
+
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
100
98
|
},
|
|
101
|
-
|
|
99
|
+
},
|
|
102
100
|
feature: 'vector_db_storage',
|
|
103
101
|
increment: 1_000_000_000, // 1 GB
|
|
102
|
+
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
104
103
|
},
|
|
105
104
|
web_search_addon: {
|
|
106
105
|
id: 'web_search_addon',
|
|
107
106
|
name: 'Web Search and Crawl',
|
|
108
107
|
description: 'Web search and crawl functionality',
|
|
109
|
-
prices:
|
|
110
|
-
{
|
|
111
|
-
|
|
108
|
+
prices: {
|
|
109
|
+
month: {
|
|
110
|
+
amount: 10,
|
|
112
111
|
currency: 'usd',
|
|
113
112
|
interval: 'month',
|
|
113
|
+
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
114
114
|
},
|
|
115
|
-
|
|
115
|
+
},
|
|
116
116
|
feature: 'integration_spend',
|
|
117
117
|
increment: 10_000_000_000, // $10 in nano-dollars
|
|
118
|
+
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
118
119
|
},
|
|
119
120
|
ai_credits_addon: {
|
|
120
121
|
id: 'ai_credits_addon',
|
|
121
122
|
name: 'AI Tokens',
|
|
122
123
|
description: 'Add $25 worth of AI credits',
|
|
123
|
-
prices:
|
|
124
|
-
{
|
|
125
|
-
|
|
124
|
+
prices: {
|
|
125
|
+
month: {
|
|
126
|
+
amount: 25,
|
|
126
127
|
currency: 'usd',
|
|
127
128
|
interval: 'month',
|
|
129
|
+
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
128
130
|
},
|
|
129
|
-
|
|
131
|
+
},
|
|
130
132
|
feature: 'integration_spend',
|
|
131
133
|
increment: 25_000_000_000, // $25 in nano-dollars
|
|
134
|
+
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
132
135
|
},
|
|
133
136
|
enterprise_ai_token: {
|
|
134
137
|
id: 'enterprise_ai_token',
|
|
135
138
|
name: 'Enterprise - AI Token',
|
|
136
139
|
description: 'Enterprise AI token credits',
|
|
137
|
-
prices:
|
|
138
|
-
{
|
|
139
|
-
|
|
140
|
+
prices: {
|
|
141
|
+
month: {
|
|
142
|
+
amount: consts_1.FREE_PRICE, // Custom pricing
|
|
140
143
|
currency: 'usd',
|
|
141
144
|
interval: 'month',
|
|
145
|
+
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
142
146
|
},
|
|
143
|
-
|
|
147
|
+
},
|
|
144
148
|
feature: 'integration_spend',
|
|
145
149
|
increment: 100_000_000_000, // $100 in nano-dollars
|
|
146
150
|
hidden: true,
|
|
151
|
+
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
147
152
|
},
|
|
148
153
|
enterprise_additional_workspace: {
|
|
149
154
|
id: 'enterprise_additional_workspace',
|
|
150
155
|
name: 'Enterprise - Additional Workspace',
|
|
151
156
|
description: 'Enterprise additional workspace',
|
|
152
|
-
prices:
|
|
153
|
-
{
|
|
154
|
-
|
|
157
|
+
prices: {
|
|
158
|
+
month: {
|
|
159
|
+
amount: consts_1.FREE_PRICE, // Custom pricing
|
|
155
160
|
currency: 'usd',
|
|
156
161
|
interval: 'month',
|
|
162
|
+
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
157
163
|
},
|
|
158
|
-
|
|
164
|
+
},
|
|
159
165
|
feature: 'collaborator_count',
|
|
160
166
|
increment: 10,
|
|
161
167
|
hidden: true,
|
|
168
|
+
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
162
169
|
},
|
|
163
170
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./schemas"), exports);
|
|
18
|
+
__exportStar(require("./versions"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const
|
|
1
|
+
export type BillingMeterId = keyof typeof meters;
|
|
2
|
+
export declare const meters: {
|
|
3
3
|
readonly ai_spend_credit_grant: {
|
|
4
4
|
readonly id: "ai_spend_credit_grant";
|
|
5
5
|
readonly name: "AI Spend - Credit grant";
|
|
@@ -14,12 +14,17 @@ export declare const billingMetersDefs: {
|
|
|
14
14
|
readonly valueSettings: {
|
|
15
15
|
readonly eventPayloadKey: "value";
|
|
16
16
|
};
|
|
17
|
-
readonly prices:
|
|
18
|
-
readonly
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
readonly prices: {
|
|
18
|
+
readonly month: {
|
|
19
|
+
readonly unitAmount: 1;
|
|
20
|
+
readonly currency: "usd";
|
|
21
|
+
readonly interval: "month";
|
|
22
|
+
readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
22
25
|
readonly meterType: "creditGrant";
|
|
26
|
+
readonly providerMeterId: "__UNKNOWN_STRIPE_ID__";
|
|
27
|
+
readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
|
|
23
28
|
};
|
|
24
29
|
readonly ai_spend_pay_as_you_go: {
|
|
25
30
|
readonly id: "ai_spend_pay_as_you_go";
|
|
@@ -35,11 +40,16 @@ export declare const billingMetersDefs: {
|
|
|
35
40
|
readonly valueSettings: {
|
|
36
41
|
readonly eventPayloadKey: "value";
|
|
37
42
|
};
|
|
38
|
-
readonly prices:
|
|
39
|
-
readonly
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
readonly prices: {
|
|
44
|
+
readonly month: {
|
|
45
|
+
readonly unitAmount: 1;
|
|
46
|
+
readonly currency: "usd";
|
|
47
|
+
readonly interval: "month";
|
|
48
|
+
readonly providerPriceId: "__UNKNOWN_STRIPE_ID__";
|
|
49
|
+
};
|
|
50
|
+
};
|
|
43
51
|
readonly meterType: "payAsYouGo";
|
|
52
|
+
readonly providerMeterId: "__UNKNOWN_STRIPE_ID__";
|
|
53
|
+
readonly providerProductId: "__UNKNOWN_STRIPE_ID__";
|
|
44
54
|
};
|
|
45
55
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
exports.
|
|
3
|
+
exports.meters = void 0;
|
|
4
|
+
const schemas_1 = require("./schemas");
|
|
5
|
+
exports.meters = {
|
|
6
6
|
ai_spend_credit_grant: {
|
|
7
7
|
id: 'ai_spend_credit_grant',
|
|
8
8
|
name: 'AI Spend - Credit grant',
|
|
@@ -10,14 +10,17 @@ exports.billingMetersDefs = {
|
|
|
10
10
|
defaultAggregation: { formula: 'sum' },
|
|
11
11
|
customerMapping: { eventPayloadKey: 'stripe_customer_id', type: 'by_id' },
|
|
12
12
|
valueSettings: { eventPayloadKey: 'value' },
|
|
13
|
-
prices:
|
|
14
|
-
{
|
|
13
|
+
prices: {
|
|
14
|
+
month: {
|
|
15
15
|
unitAmount: 1,
|
|
16
16
|
currency: 'usd',
|
|
17
17
|
interval: 'month',
|
|
18
|
+
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
18
19
|
},
|
|
19
|
-
|
|
20
|
+
},
|
|
20
21
|
meterType: 'creditGrant',
|
|
22
|
+
providerMeterId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
23
|
+
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
21
24
|
},
|
|
22
25
|
ai_spend_pay_as_you_go: {
|
|
23
26
|
id: 'ai_spend_pay_as_you_go',
|
|
@@ -26,13 +29,16 @@ exports.billingMetersDefs = {
|
|
|
26
29
|
defaultAggregation: { formula: 'sum' },
|
|
27
30
|
customerMapping: { eventPayloadKey: 'stripe_customer_id', type: 'by_id' },
|
|
28
31
|
valueSettings: { eventPayloadKey: 'value' },
|
|
29
|
-
prices:
|
|
30
|
-
{
|
|
32
|
+
prices: {
|
|
33
|
+
month: {
|
|
31
34
|
unitAmount: 1,
|
|
32
35
|
currency: 'usd',
|
|
33
36
|
interval: 'month',
|
|
37
|
+
providerPriceId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
34
38
|
},
|
|
35
|
-
|
|
39
|
+
},
|
|
36
40
|
meterType: 'payAsYouGo',
|
|
41
|
+
providerMeterId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
42
|
+
providerProductId: schemas_1.UNKNOWN_STRIPE_ID,
|
|
37
43
|
},
|
|
38
44
|
};
|