@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
|
@@ -1,152 +1,165 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Stripe Identifier that is currently unknown when defining the billing config, but will be filled later by pulumi during deployment.
|
|
4
|
+
* This allows us to have a reference to the Stripe products and prices in our billing config without having to hardcode them before they are created in Stripe.
|
|
5
|
+
*/
|
|
6
|
+
export declare const UNKNOWN_STRIPE_ID = "__UNKNOWN_STRIPE_ID__";
|
|
7
|
+
export declare const featureSchema: z.ZodEnum<["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", "saved_versions", "indexed_file_count"]>;
|
|
8
|
+
export type Interval = z.infer<typeof intervalSchema>;
|
|
2
9
|
export declare const intervalSchema: z.ZodEnum<["month", "year"]>;
|
|
10
|
+
export type UnitAmount = z.infer<typeof unitAmountSchema>;
|
|
3
11
|
export declare const unitAmountSchema: z.ZodNumber;
|
|
12
|
+
export type Aggregation = z.infer<typeof aggregationSchema>;
|
|
4
13
|
export declare const aggregationSchema: z.ZodEnum<["sum", "count"]>;
|
|
14
|
+
export type MeterType = z.infer<typeof meterTypeSchema>;
|
|
5
15
|
export declare const meterTypeSchema: z.ZodEnum<["payAsYouGo", "creditGrant"]>;
|
|
16
|
+
export type BillingPrice = z.infer<typeof priceSchema>;
|
|
6
17
|
export declare const priceSchema: z.ZodObject<{
|
|
7
|
-
providerPriceId: z.ZodString;
|
|
8
18
|
amount: z.ZodNumber;
|
|
9
19
|
currency: z.ZodEnum<["usd"]>;
|
|
10
20
|
interval: z.ZodEnum<["month", "year"]>;
|
|
11
21
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
22
|
+
providerPriceId: z.ZodString;
|
|
12
23
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
providerPriceId: string;
|
|
14
24
|
amount: number;
|
|
15
25
|
currency: "usd";
|
|
16
26
|
interval: "month" | "year";
|
|
27
|
+
providerPriceId: string;
|
|
17
28
|
metadata?: Record<string, string> | undefined;
|
|
18
29
|
}, {
|
|
19
|
-
providerPriceId: string;
|
|
20
30
|
amount: number;
|
|
21
31
|
currency: "usd";
|
|
22
32
|
interval: "month" | "year";
|
|
33
|
+
providerPriceId: string;
|
|
23
34
|
metadata?: Record<string, string> | undefined;
|
|
24
35
|
}>;
|
|
36
|
+
export type BillingMeteredPrice = z.infer<typeof meteredPriceSchema>;
|
|
25
37
|
export declare const meteredPriceSchema: z.ZodObject<{
|
|
26
|
-
providerPriceId: z.ZodString;
|
|
27
38
|
unitAmount: z.ZodNumber;
|
|
28
39
|
currency: z.ZodEnum<["usd"]>;
|
|
29
40
|
interval: z.ZodEnum<["month", "year"]>;
|
|
30
41
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
42
|
+
providerPriceId: z.ZodString;
|
|
31
43
|
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
providerPriceId: string;
|
|
33
44
|
currency: "usd";
|
|
34
45
|
interval: "month" | "year";
|
|
46
|
+
providerPriceId: string;
|
|
35
47
|
unitAmount: number;
|
|
36
48
|
metadata?: Record<string, string> | undefined;
|
|
37
49
|
}, {
|
|
38
|
-
providerPriceId: string;
|
|
39
50
|
currency: "usd";
|
|
40
51
|
interval: "month" | "year";
|
|
52
|
+
providerPriceId: string;
|
|
41
53
|
unitAmount: number;
|
|
42
54
|
metadata?: Record<string, string> | undefined;
|
|
43
55
|
}>;
|
|
44
|
-
export
|
|
56
|
+
export type BillingPlan = z.infer<typeof planSchema>;
|
|
45
57
|
export declare const planSchema: z.ZodObject<{
|
|
46
58
|
id: z.ZodString;
|
|
47
59
|
name: z.ZodString;
|
|
48
60
|
description: z.ZodString;
|
|
49
61
|
tierIndex: z.ZodNumber;
|
|
50
|
-
providerProductId: z.ZodString;
|
|
51
62
|
prices: z.ZodRecord<z.ZodEnum<["month", "year"]>, z.ZodObject<{
|
|
52
|
-
providerPriceId: z.ZodString;
|
|
53
63
|
amount: z.ZodNumber;
|
|
54
64
|
currency: z.ZodEnum<["usd"]>;
|
|
55
65
|
interval: z.ZodEnum<["month", "year"]>;
|
|
56
66
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
67
|
+
providerPriceId: z.ZodString;
|
|
57
68
|
}, "strip", z.ZodTypeAny, {
|
|
58
|
-
providerPriceId: string;
|
|
59
69
|
amount: number;
|
|
60
70
|
currency: "usd";
|
|
61
71
|
interval: "month" | "year";
|
|
72
|
+
providerPriceId: string;
|
|
62
73
|
metadata?: Record<string, string> | undefined;
|
|
63
74
|
}, {
|
|
64
|
-
providerPriceId: string;
|
|
65
75
|
amount: number;
|
|
66
76
|
currency: "usd";
|
|
67
77
|
interval: "month" | "year";
|
|
78
|
+
providerPriceId: string;
|
|
68
79
|
metadata?: Record<string, string> | undefined;
|
|
69
80
|
}>>;
|
|
70
|
-
features: z.ZodRecord<z.ZodEnum<["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", "
|
|
81
|
+
features: z.ZodRecord<z.ZodEnum<["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", "saved_versions", "indexed_file_count"]>, z.ZodUnion<[z.ZodNumber, z.ZodBoolean]>>;
|
|
71
82
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
83
|
+
providerProductId: z.ZodString;
|
|
72
84
|
}, "strip", z.ZodTypeAny, {
|
|
73
85
|
id: string;
|
|
74
86
|
name: string;
|
|
75
87
|
description: string;
|
|
76
|
-
|
|
88
|
+
tierIndex: number;
|
|
77
89
|
prices: Partial<Record<"month" | "year", {
|
|
78
|
-
providerPriceId: string;
|
|
79
90
|
amount: number;
|
|
80
91
|
currency: "usd";
|
|
81
92
|
interval: "month" | "year";
|
|
93
|
+
providerPriceId: string;
|
|
82
94
|
metadata?: Record<string, string> | undefined;
|
|
83
95
|
}>>;
|
|
84
|
-
|
|
85
|
-
|
|
96
|
+
features: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number | boolean>>;
|
|
97
|
+
providerProductId: string;
|
|
86
98
|
metadata?: Record<string, string> | undefined;
|
|
87
99
|
}, {
|
|
88
100
|
id: string;
|
|
89
101
|
name: string;
|
|
90
102
|
description: string;
|
|
91
|
-
|
|
103
|
+
tierIndex: number;
|
|
92
104
|
prices: Partial<Record<"month" | "year", {
|
|
93
|
-
providerPriceId: string;
|
|
94
105
|
amount: number;
|
|
95
106
|
currency: "usd";
|
|
96
107
|
interval: "month" | "year";
|
|
108
|
+
providerPriceId: string;
|
|
97
109
|
metadata?: Record<string, string> | undefined;
|
|
98
110
|
}>>;
|
|
99
|
-
|
|
100
|
-
|
|
111
|
+
features: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number | boolean>>;
|
|
112
|
+
providerProductId: string;
|
|
101
113
|
metadata?: Record<string, string> | undefined;
|
|
102
114
|
}>;
|
|
115
|
+
export type BillingAddon = z.infer<typeof addOnSchema>;
|
|
103
116
|
export declare const addOnSchema: z.ZodEffects<z.ZodObject<{
|
|
104
117
|
id: z.ZodString;
|
|
105
118
|
name: z.ZodString;
|
|
106
119
|
description: z.ZodString;
|
|
107
|
-
providerProductId: z.ZodString;
|
|
108
120
|
prices: z.ZodRecord<z.ZodEnum<["month", "year"]>, z.ZodObject<{
|
|
109
|
-
providerPriceId: z.ZodString;
|
|
110
121
|
amount: z.ZodNumber;
|
|
111
122
|
currency: z.ZodEnum<["usd"]>;
|
|
112
123
|
interval: z.ZodEnum<["month", "year"]>;
|
|
113
124
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
125
|
+
providerPriceId: z.ZodString;
|
|
114
126
|
}, "strip", z.ZodTypeAny, {
|
|
115
|
-
providerPriceId: string;
|
|
116
127
|
amount: number;
|
|
117
128
|
currency: "usd";
|
|
118
129
|
interval: "month" | "year";
|
|
130
|
+
providerPriceId: string;
|
|
119
131
|
metadata?: Record<string, string> | undefined;
|
|
120
132
|
}, {
|
|
121
|
-
providerPriceId: string;
|
|
122
133
|
amount: number;
|
|
123
134
|
currency: "usd";
|
|
124
135
|
interval: "month" | "year";
|
|
136
|
+
providerPriceId: string;
|
|
125
137
|
metadata?: Record<string, string> | undefined;
|
|
126
138
|
}>>;
|
|
127
|
-
feature: z.ZodEnum<["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", "
|
|
139
|
+
feature: z.ZodEnum<["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", "saved_versions", "indexed_file_count"]>;
|
|
128
140
|
increment: z.ZodNumber;
|
|
129
|
-
increments: z.ZodOptional<z.ZodRecord<z.ZodEnum<["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", "
|
|
141
|
+
increments: z.ZodOptional<z.ZodRecord<z.ZodEnum<["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", "saved_versions", "indexed_file_count"]>, z.ZodNumber>>;
|
|
130
142
|
prorationDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
131
143
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
132
144
|
autoRechargeable: z.ZodOptional<z.ZodBoolean>;
|
|
133
145
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
+
providerProductId: z.ZodString;
|
|
134
147
|
}, "strip", z.ZodTypeAny, {
|
|
135
148
|
id: string;
|
|
136
149
|
name: string;
|
|
137
150
|
description: string;
|
|
138
|
-
providerProductId: string;
|
|
139
151
|
prices: Partial<Record<"month" | "year", {
|
|
140
|
-
providerPriceId: string;
|
|
141
152
|
amount: number;
|
|
142
153
|
currency: "usd";
|
|
143
154
|
interval: "month" | "year";
|
|
155
|
+
providerPriceId: string;
|
|
144
156
|
metadata?: Record<string, string> | undefined;
|
|
145
157
|
}>>;
|
|
146
|
-
|
|
158
|
+
providerProductId: string;
|
|
159
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
147
160
|
increment: number;
|
|
148
161
|
metadata?: Record<string, string> | undefined;
|
|
149
|
-
increments?: Partial<Record<"
|
|
162
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
150
163
|
prorationDisabled?: boolean | undefined;
|
|
151
164
|
autoRechargeable?: boolean | undefined;
|
|
152
165
|
hidden?: boolean | undefined;
|
|
@@ -154,18 +167,18 @@ export declare const addOnSchema: z.ZodEffects<z.ZodObject<{
|
|
|
154
167
|
id: string;
|
|
155
168
|
name: string;
|
|
156
169
|
description: string;
|
|
157
|
-
providerProductId: string;
|
|
158
170
|
prices: Partial<Record<"month" | "year", {
|
|
159
|
-
providerPriceId: string;
|
|
160
171
|
amount: number;
|
|
161
172
|
currency: "usd";
|
|
162
173
|
interval: "month" | "year";
|
|
174
|
+
providerPriceId: string;
|
|
163
175
|
metadata?: Record<string, string> | undefined;
|
|
164
176
|
}>>;
|
|
165
|
-
|
|
177
|
+
providerProductId: string;
|
|
178
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
166
179
|
increment: number;
|
|
167
180
|
metadata?: Record<string, string> | undefined;
|
|
168
|
-
increments?: Partial<Record<"
|
|
181
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
169
182
|
prorationDisabled?: boolean | undefined;
|
|
170
183
|
autoRechargeable?: boolean | undefined;
|
|
171
184
|
hidden?: boolean | undefined;
|
|
@@ -173,18 +186,18 @@ export declare const addOnSchema: z.ZodEffects<z.ZodObject<{
|
|
|
173
186
|
id: string;
|
|
174
187
|
name: string;
|
|
175
188
|
description: string;
|
|
176
|
-
providerProductId: string;
|
|
177
189
|
prices: Partial<Record<"month" | "year", {
|
|
178
|
-
providerPriceId: string;
|
|
179
190
|
amount: number;
|
|
180
191
|
currency: "usd";
|
|
181
192
|
interval: "month" | "year";
|
|
193
|
+
providerPriceId: string;
|
|
182
194
|
metadata?: Record<string, string> | undefined;
|
|
183
195
|
}>>;
|
|
184
|
-
|
|
196
|
+
providerProductId: string;
|
|
197
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
185
198
|
increment: number;
|
|
186
199
|
metadata?: Record<string, string> | undefined;
|
|
187
|
-
increments?: Partial<Record<"
|
|
200
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
188
201
|
prorationDisabled?: boolean | undefined;
|
|
189
202
|
autoRechargeable?: boolean | undefined;
|
|
190
203
|
hidden?: boolean | undefined;
|
|
@@ -192,82 +205,128 @@ export declare const addOnSchema: z.ZodEffects<z.ZodObject<{
|
|
|
192
205
|
id: string;
|
|
193
206
|
name: string;
|
|
194
207
|
description: string;
|
|
195
|
-
providerProductId: string;
|
|
196
208
|
prices: Partial<Record<"month" | "year", {
|
|
197
|
-
providerPriceId: string;
|
|
198
209
|
amount: number;
|
|
199
210
|
currency: "usd";
|
|
200
211
|
interval: "month" | "year";
|
|
212
|
+
providerPriceId: string;
|
|
201
213
|
metadata?: Record<string, string> | undefined;
|
|
202
214
|
}>>;
|
|
203
|
-
|
|
215
|
+
providerProductId: string;
|
|
216
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
204
217
|
increment: number;
|
|
205
218
|
metadata?: Record<string, string> | undefined;
|
|
206
|
-
increments?: Partial<Record<"
|
|
219
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
207
220
|
prorationDisabled?: boolean | undefined;
|
|
208
221
|
autoRechargeable?: boolean | undefined;
|
|
209
222
|
hidden?: boolean | undefined;
|
|
210
223
|
}>;
|
|
224
|
+
export type BillingMeter = z.infer<typeof meterSchema>;
|
|
211
225
|
export declare const meterSchema: z.ZodObject<{
|
|
212
226
|
id: z.ZodString;
|
|
213
227
|
name: z.ZodString;
|
|
214
228
|
description: z.ZodString;
|
|
215
|
-
|
|
216
|
-
|
|
229
|
+
defaultAggregation: z.ZodOptional<z.ZodObject<{
|
|
230
|
+
formula: z.ZodEnum<["sum", "count"]>;
|
|
231
|
+
}, "strip", z.ZodTypeAny, {
|
|
232
|
+
formula: "count" | "sum";
|
|
233
|
+
}, {
|
|
234
|
+
formula: "count" | "sum";
|
|
235
|
+
}>>;
|
|
236
|
+
customerMapping: z.ZodOptional<z.ZodObject<{
|
|
237
|
+
eventPayloadKey: z.ZodLiteral<"stripe_customer_id">;
|
|
238
|
+
type: z.ZodLiteral<"by_id">;
|
|
239
|
+
}, "strip", z.ZodTypeAny, {
|
|
240
|
+
type: "by_id";
|
|
241
|
+
eventPayloadKey: "stripe_customer_id";
|
|
242
|
+
}, {
|
|
243
|
+
type: "by_id";
|
|
244
|
+
eventPayloadKey: "stripe_customer_id";
|
|
245
|
+
}>>;
|
|
246
|
+
valueSettings: z.ZodOptional<z.ZodObject<{
|
|
247
|
+
eventPayloadKey: z.ZodLiteral<"value">;
|
|
248
|
+
}, "strip", z.ZodTypeAny, {
|
|
249
|
+
eventPayloadKey: "value";
|
|
250
|
+
}, {
|
|
251
|
+
eventPayloadKey: "value";
|
|
252
|
+
}>>;
|
|
217
253
|
prices: z.ZodRecord<z.ZodEnum<["month", "year"]>, z.ZodObject<{
|
|
218
|
-
providerPriceId: z.ZodString;
|
|
219
254
|
unitAmount: z.ZodNumber;
|
|
220
255
|
currency: z.ZodEnum<["usd"]>;
|
|
221
256
|
interval: z.ZodEnum<["month", "year"]>;
|
|
222
257
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
258
|
+
providerPriceId: z.ZodString;
|
|
223
259
|
}, "strip", z.ZodTypeAny, {
|
|
224
|
-
providerPriceId: string;
|
|
225
260
|
currency: "usd";
|
|
226
261
|
interval: "month" | "year";
|
|
262
|
+
providerPriceId: string;
|
|
227
263
|
unitAmount: number;
|
|
228
264
|
metadata?: Record<string, string> | undefined;
|
|
229
265
|
}, {
|
|
230
|
-
providerPriceId: string;
|
|
231
266
|
currency: "usd";
|
|
232
267
|
interval: "month" | "year";
|
|
268
|
+
providerPriceId: string;
|
|
233
269
|
unitAmount: number;
|
|
234
270
|
metadata?: Record<string, string> | undefined;
|
|
235
271
|
}>>;
|
|
236
272
|
meterType: z.ZodEnum<["payAsYouGo", "creditGrant"]>;
|
|
237
273
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
274
|
+
providerProductId: z.ZodString;
|
|
275
|
+
providerMeterId: z.ZodString;
|
|
238
276
|
}, "strip", z.ZodTypeAny, {
|
|
239
277
|
id: string;
|
|
240
278
|
name: string;
|
|
241
279
|
description: string;
|
|
242
|
-
providerProductId: string;
|
|
243
280
|
prices: Partial<Record<"month" | "year", {
|
|
244
|
-
providerPriceId: string;
|
|
245
281
|
currency: "usd";
|
|
246
282
|
interval: "month" | "year";
|
|
283
|
+
providerPriceId: string;
|
|
247
284
|
unitAmount: number;
|
|
248
285
|
metadata?: Record<string, string> | undefined;
|
|
249
286
|
}>>;
|
|
287
|
+
providerProductId: string;
|
|
288
|
+
meterType: "payAsYouGo" | "creditGrant";
|
|
250
289
|
providerMeterId: string;
|
|
251
|
-
meterType: "creditGrant" | "payAsYouGo";
|
|
252
290
|
metadata?: Record<string, string> | undefined;
|
|
291
|
+
defaultAggregation?: {
|
|
292
|
+
formula: "count" | "sum";
|
|
293
|
+
} | undefined;
|
|
294
|
+
customerMapping?: {
|
|
295
|
+
type: "by_id";
|
|
296
|
+
eventPayloadKey: "stripe_customer_id";
|
|
297
|
+
} | undefined;
|
|
298
|
+
valueSettings?: {
|
|
299
|
+
eventPayloadKey: "value";
|
|
300
|
+
} | undefined;
|
|
253
301
|
}, {
|
|
254
302
|
id: string;
|
|
255
303
|
name: string;
|
|
256
304
|
description: string;
|
|
257
|
-
providerProductId: string;
|
|
258
305
|
prices: Partial<Record<"month" | "year", {
|
|
259
|
-
providerPriceId: string;
|
|
260
306
|
currency: "usd";
|
|
261
307
|
interval: "month" | "year";
|
|
308
|
+
providerPriceId: string;
|
|
262
309
|
unitAmount: number;
|
|
263
310
|
metadata?: Record<string, string> | undefined;
|
|
264
311
|
}>>;
|
|
312
|
+
providerProductId: string;
|
|
313
|
+
meterType: "payAsYouGo" | "creditGrant";
|
|
265
314
|
providerMeterId: string;
|
|
266
|
-
meterType: "creditGrant" | "payAsYouGo";
|
|
267
315
|
metadata?: Record<string, string> | undefined;
|
|
316
|
+
defaultAggregation?: {
|
|
317
|
+
formula: "count" | "sum";
|
|
318
|
+
} | undefined;
|
|
319
|
+
customerMapping?: {
|
|
320
|
+
type: "by_id";
|
|
321
|
+
eventPayloadKey: "stripe_customer_id";
|
|
322
|
+
} | undefined;
|
|
323
|
+
valueSettings?: {
|
|
324
|
+
eventPayloadKey: "value";
|
|
325
|
+
} | undefined;
|
|
268
326
|
}>;
|
|
327
|
+
export type BillingVersion = z.infer<typeof billingVersionConfigSchema>;
|
|
269
328
|
export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
270
|
-
version: z.
|
|
329
|
+
version: z.ZodString;
|
|
271
330
|
name: z.ZodString;
|
|
272
331
|
description: z.ZodString;
|
|
273
332
|
plans: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -275,106 +334,106 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
275
334
|
name: z.ZodString;
|
|
276
335
|
description: z.ZodString;
|
|
277
336
|
tierIndex: z.ZodNumber;
|
|
278
|
-
providerProductId: z.ZodString;
|
|
279
337
|
prices: z.ZodRecord<z.ZodEnum<["month", "year"]>, z.ZodObject<{
|
|
280
|
-
providerPriceId: z.ZodString;
|
|
281
338
|
amount: z.ZodNumber;
|
|
282
339
|
currency: z.ZodEnum<["usd"]>;
|
|
283
340
|
interval: z.ZodEnum<["month", "year"]>;
|
|
284
341
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
342
|
+
providerPriceId: z.ZodString;
|
|
285
343
|
}, "strip", z.ZodTypeAny, {
|
|
286
|
-
providerPriceId: string;
|
|
287
344
|
amount: number;
|
|
288
345
|
currency: "usd";
|
|
289
346
|
interval: "month" | "year";
|
|
347
|
+
providerPriceId: string;
|
|
290
348
|
metadata?: Record<string, string> | undefined;
|
|
291
349
|
}, {
|
|
292
|
-
providerPriceId: string;
|
|
293
350
|
amount: number;
|
|
294
351
|
currency: "usd";
|
|
295
352
|
interval: "month" | "year";
|
|
353
|
+
providerPriceId: string;
|
|
296
354
|
metadata?: Record<string, string> | undefined;
|
|
297
355
|
}>>;
|
|
298
|
-
features: z.ZodRecord<z.ZodEnum<["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", "
|
|
356
|
+
features: z.ZodRecord<z.ZodEnum<["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", "saved_versions", "indexed_file_count"]>, z.ZodUnion<[z.ZodNumber, z.ZodBoolean]>>;
|
|
299
357
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
358
|
+
providerProductId: z.ZodString;
|
|
300
359
|
}, "strip", z.ZodTypeAny, {
|
|
301
360
|
id: string;
|
|
302
361
|
name: string;
|
|
303
362
|
description: string;
|
|
304
|
-
|
|
363
|
+
tierIndex: number;
|
|
305
364
|
prices: Partial<Record<"month" | "year", {
|
|
306
|
-
providerPriceId: string;
|
|
307
365
|
amount: number;
|
|
308
366
|
currency: "usd";
|
|
309
367
|
interval: "month" | "year";
|
|
368
|
+
providerPriceId: string;
|
|
310
369
|
metadata?: Record<string, string> | undefined;
|
|
311
370
|
}>>;
|
|
312
|
-
|
|
313
|
-
|
|
371
|
+
features: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number | boolean>>;
|
|
372
|
+
providerProductId: string;
|
|
314
373
|
metadata?: Record<string, string> | undefined;
|
|
315
374
|
}, {
|
|
316
375
|
id: string;
|
|
317
376
|
name: string;
|
|
318
377
|
description: string;
|
|
319
|
-
|
|
378
|
+
tierIndex: number;
|
|
320
379
|
prices: Partial<Record<"month" | "year", {
|
|
321
|
-
providerPriceId: string;
|
|
322
380
|
amount: number;
|
|
323
381
|
currency: "usd";
|
|
324
382
|
interval: "month" | "year";
|
|
383
|
+
providerPriceId: string;
|
|
325
384
|
metadata?: Record<string, string> | undefined;
|
|
326
385
|
}>>;
|
|
327
|
-
|
|
328
|
-
|
|
386
|
+
features: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number | boolean>>;
|
|
387
|
+
providerProductId: string;
|
|
329
388
|
metadata?: Record<string, string> | undefined;
|
|
330
389
|
}>>;
|
|
331
390
|
addons: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
|
|
332
391
|
id: z.ZodString;
|
|
333
392
|
name: z.ZodString;
|
|
334
393
|
description: z.ZodString;
|
|
335
|
-
providerProductId: z.ZodString;
|
|
336
394
|
prices: z.ZodRecord<z.ZodEnum<["month", "year"]>, z.ZodObject<{
|
|
337
|
-
providerPriceId: z.ZodString;
|
|
338
395
|
amount: z.ZodNumber;
|
|
339
396
|
currency: z.ZodEnum<["usd"]>;
|
|
340
397
|
interval: z.ZodEnum<["month", "year"]>;
|
|
341
398
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
399
|
+
providerPriceId: z.ZodString;
|
|
342
400
|
}, "strip", z.ZodTypeAny, {
|
|
343
|
-
providerPriceId: string;
|
|
344
401
|
amount: number;
|
|
345
402
|
currency: "usd";
|
|
346
403
|
interval: "month" | "year";
|
|
404
|
+
providerPriceId: string;
|
|
347
405
|
metadata?: Record<string, string> | undefined;
|
|
348
406
|
}, {
|
|
349
|
-
providerPriceId: string;
|
|
350
407
|
amount: number;
|
|
351
408
|
currency: "usd";
|
|
352
409
|
interval: "month" | "year";
|
|
410
|
+
providerPriceId: string;
|
|
353
411
|
metadata?: Record<string, string> | undefined;
|
|
354
412
|
}>>;
|
|
355
|
-
feature: z.ZodEnum<["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", "
|
|
413
|
+
feature: z.ZodEnum<["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", "saved_versions", "indexed_file_count"]>;
|
|
356
414
|
increment: z.ZodNumber;
|
|
357
|
-
increments: z.ZodOptional<z.ZodRecord<z.ZodEnum<["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", "
|
|
415
|
+
increments: z.ZodOptional<z.ZodRecord<z.ZodEnum<["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", "saved_versions", "indexed_file_count"]>, z.ZodNumber>>;
|
|
358
416
|
prorationDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
359
417
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
360
418
|
autoRechargeable: z.ZodOptional<z.ZodBoolean>;
|
|
361
419
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
420
|
+
providerProductId: z.ZodString;
|
|
362
421
|
}, "strip", z.ZodTypeAny, {
|
|
363
422
|
id: string;
|
|
364
423
|
name: string;
|
|
365
424
|
description: string;
|
|
366
|
-
providerProductId: string;
|
|
367
425
|
prices: Partial<Record<"month" | "year", {
|
|
368
|
-
providerPriceId: string;
|
|
369
426
|
amount: number;
|
|
370
427
|
currency: "usd";
|
|
371
428
|
interval: "month" | "year";
|
|
429
|
+
providerPriceId: string;
|
|
372
430
|
metadata?: Record<string, string> | undefined;
|
|
373
431
|
}>>;
|
|
374
|
-
|
|
432
|
+
providerProductId: string;
|
|
433
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
375
434
|
increment: number;
|
|
376
435
|
metadata?: Record<string, string> | undefined;
|
|
377
|
-
increments?: Partial<Record<"
|
|
436
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
378
437
|
prorationDisabled?: boolean | undefined;
|
|
379
438
|
autoRechargeable?: boolean | undefined;
|
|
380
439
|
hidden?: boolean | undefined;
|
|
@@ -382,18 +441,18 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
382
441
|
id: string;
|
|
383
442
|
name: string;
|
|
384
443
|
description: string;
|
|
385
|
-
providerProductId: string;
|
|
386
444
|
prices: Partial<Record<"month" | "year", {
|
|
387
|
-
providerPriceId: string;
|
|
388
445
|
amount: number;
|
|
389
446
|
currency: "usd";
|
|
390
447
|
interval: "month" | "year";
|
|
448
|
+
providerPriceId: string;
|
|
391
449
|
metadata?: Record<string, string> | undefined;
|
|
392
450
|
}>>;
|
|
393
|
-
|
|
451
|
+
providerProductId: string;
|
|
452
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
394
453
|
increment: number;
|
|
395
454
|
metadata?: Record<string, string> | undefined;
|
|
396
|
-
increments?: Partial<Record<"
|
|
455
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
397
456
|
prorationDisabled?: boolean | undefined;
|
|
398
457
|
autoRechargeable?: boolean | undefined;
|
|
399
458
|
hidden?: boolean | undefined;
|
|
@@ -401,18 +460,18 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
401
460
|
id: string;
|
|
402
461
|
name: string;
|
|
403
462
|
description: string;
|
|
404
|
-
providerProductId: string;
|
|
405
463
|
prices: Partial<Record<"month" | "year", {
|
|
406
|
-
providerPriceId: string;
|
|
407
464
|
amount: number;
|
|
408
465
|
currency: "usd";
|
|
409
466
|
interval: "month" | "year";
|
|
467
|
+
providerPriceId: string;
|
|
410
468
|
metadata?: Record<string, string> | undefined;
|
|
411
469
|
}>>;
|
|
412
|
-
|
|
470
|
+
providerProductId: string;
|
|
471
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
413
472
|
increment: number;
|
|
414
473
|
metadata?: Record<string, string> | undefined;
|
|
415
|
-
increments?: Partial<Record<"
|
|
474
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
416
475
|
prorationDisabled?: boolean | undefined;
|
|
417
476
|
autoRechargeable?: boolean | undefined;
|
|
418
477
|
hidden?: boolean | undefined;
|
|
@@ -420,18 +479,18 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
420
479
|
id: string;
|
|
421
480
|
name: string;
|
|
422
481
|
description: string;
|
|
423
|
-
providerProductId: string;
|
|
424
482
|
prices: Partial<Record<"month" | "year", {
|
|
425
|
-
providerPriceId: string;
|
|
426
483
|
amount: number;
|
|
427
484
|
currency: "usd";
|
|
428
485
|
interval: "month" | "year";
|
|
486
|
+
providerPriceId: string;
|
|
429
487
|
metadata?: Record<string, string> | undefined;
|
|
430
488
|
}>>;
|
|
431
|
-
|
|
489
|
+
providerProductId: string;
|
|
490
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
432
491
|
increment: number;
|
|
433
492
|
metadata?: Record<string, string> | undefined;
|
|
434
|
-
increments?: Partial<Record<"
|
|
493
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
435
494
|
prorationDisabled?: boolean | undefined;
|
|
436
495
|
autoRechargeable?: boolean | undefined;
|
|
437
496
|
hidden?: boolean | undefined;
|
|
@@ -440,98 +499,142 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
440
499
|
id: z.ZodString;
|
|
441
500
|
name: z.ZodString;
|
|
442
501
|
description: z.ZodString;
|
|
443
|
-
|
|
444
|
-
|
|
502
|
+
defaultAggregation: z.ZodOptional<z.ZodObject<{
|
|
503
|
+
formula: z.ZodEnum<["sum", "count"]>;
|
|
504
|
+
}, "strip", z.ZodTypeAny, {
|
|
505
|
+
formula: "count" | "sum";
|
|
506
|
+
}, {
|
|
507
|
+
formula: "count" | "sum";
|
|
508
|
+
}>>;
|
|
509
|
+
customerMapping: z.ZodOptional<z.ZodObject<{
|
|
510
|
+
eventPayloadKey: z.ZodLiteral<"stripe_customer_id">;
|
|
511
|
+
type: z.ZodLiteral<"by_id">;
|
|
512
|
+
}, "strip", z.ZodTypeAny, {
|
|
513
|
+
type: "by_id";
|
|
514
|
+
eventPayloadKey: "stripe_customer_id";
|
|
515
|
+
}, {
|
|
516
|
+
type: "by_id";
|
|
517
|
+
eventPayloadKey: "stripe_customer_id";
|
|
518
|
+
}>>;
|
|
519
|
+
valueSettings: z.ZodOptional<z.ZodObject<{
|
|
520
|
+
eventPayloadKey: z.ZodLiteral<"value">;
|
|
521
|
+
}, "strip", z.ZodTypeAny, {
|
|
522
|
+
eventPayloadKey: "value";
|
|
523
|
+
}, {
|
|
524
|
+
eventPayloadKey: "value";
|
|
525
|
+
}>>;
|
|
445
526
|
prices: z.ZodRecord<z.ZodEnum<["month", "year"]>, z.ZodObject<{
|
|
446
|
-
providerPriceId: z.ZodString;
|
|
447
527
|
unitAmount: z.ZodNumber;
|
|
448
528
|
currency: z.ZodEnum<["usd"]>;
|
|
449
529
|
interval: z.ZodEnum<["month", "year"]>;
|
|
450
530
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
531
|
+
providerPriceId: z.ZodString;
|
|
451
532
|
}, "strip", z.ZodTypeAny, {
|
|
452
|
-
providerPriceId: string;
|
|
453
533
|
currency: "usd";
|
|
454
534
|
interval: "month" | "year";
|
|
535
|
+
providerPriceId: string;
|
|
455
536
|
unitAmount: number;
|
|
456
537
|
metadata?: Record<string, string> | undefined;
|
|
457
538
|
}, {
|
|
458
|
-
providerPriceId: string;
|
|
459
539
|
currency: "usd";
|
|
460
540
|
interval: "month" | "year";
|
|
541
|
+
providerPriceId: string;
|
|
461
542
|
unitAmount: number;
|
|
462
543
|
metadata?: Record<string, string> | undefined;
|
|
463
544
|
}>>;
|
|
464
545
|
meterType: z.ZodEnum<["payAsYouGo", "creditGrant"]>;
|
|
465
546
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
547
|
+
providerProductId: z.ZodString;
|
|
548
|
+
providerMeterId: z.ZodString;
|
|
466
549
|
}, "strip", z.ZodTypeAny, {
|
|
467
550
|
id: string;
|
|
468
551
|
name: string;
|
|
469
552
|
description: string;
|
|
470
|
-
providerProductId: string;
|
|
471
553
|
prices: Partial<Record<"month" | "year", {
|
|
472
|
-
providerPriceId: string;
|
|
473
554
|
currency: "usd";
|
|
474
555
|
interval: "month" | "year";
|
|
556
|
+
providerPriceId: string;
|
|
475
557
|
unitAmount: number;
|
|
476
558
|
metadata?: Record<string, string> | undefined;
|
|
477
559
|
}>>;
|
|
560
|
+
providerProductId: string;
|
|
561
|
+
meterType: "payAsYouGo" | "creditGrant";
|
|
478
562
|
providerMeterId: string;
|
|
479
|
-
meterType: "creditGrant" | "payAsYouGo";
|
|
480
563
|
metadata?: Record<string, string> | undefined;
|
|
564
|
+
defaultAggregation?: {
|
|
565
|
+
formula: "count" | "sum";
|
|
566
|
+
} | undefined;
|
|
567
|
+
customerMapping?: {
|
|
568
|
+
type: "by_id";
|
|
569
|
+
eventPayloadKey: "stripe_customer_id";
|
|
570
|
+
} | undefined;
|
|
571
|
+
valueSettings?: {
|
|
572
|
+
eventPayloadKey: "value";
|
|
573
|
+
} | undefined;
|
|
481
574
|
}, {
|
|
482
575
|
id: string;
|
|
483
576
|
name: string;
|
|
484
577
|
description: string;
|
|
485
|
-
providerProductId: string;
|
|
486
578
|
prices: Partial<Record<"month" | "year", {
|
|
487
|
-
providerPriceId: string;
|
|
488
579
|
currency: "usd";
|
|
489
580
|
interval: "month" | "year";
|
|
581
|
+
providerPriceId: string;
|
|
490
582
|
unitAmount: number;
|
|
491
583
|
metadata?: Record<string, string> | undefined;
|
|
492
584
|
}>>;
|
|
585
|
+
providerProductId: string;
|
|
586
|
+
meterType: "payAsYouGo" | "creditGrant";
|
|
493
587
|
providerMeterId: string;
|
|
494
|
-
meterType: "creditGrant" | "payAsYouGo";
|
|
495
588
|
metadata?: Record<string, string> | undefined;
|
|
589
|
+
defaultAggregation?: {
|
|
590
|
+
formula: "count" | "sum";
|
|
591
|
+
} | undefined;
|
|
592
|
+
customerMapping?: {
|
|
593
|
+
type: "by_id";
|
|
594
|
+
eventPayloadKey: "stripe_customer_id";
|
|
595
|
+
} | undefined;
|
|
596
|
+
valueSettings?: {
|
|
597
|
+
eventPayloadKey: "value";
|
|
598
|
+
} | undefined;
|
|
496
599
|
}>>;
|
|
497
600
|
isActive: z.ZodBoolean;
|
|
498
601
|
createdAt: z.ZodString;
|
|
499
602
|
}, "strip", z.ZodTypeAny, {
|
|
500
603
|
name: string;
|
|
501
604
|
description: string;
|
|
502
|
-
version:
|
|
605
|
+
version: string;
|
|
503
606
|
plans: Record<string, {
|
|
504
607
|
id: string;
|
|
505
608
|
name: string;
|
|
506
609
|
description: string;
|
|
507
|
-
|
|
610
|
+
tierIndex: number;
|
|
508
611
|
prices: Partial<Record<"month" | "year", {
|
|
509
|
-
providerPriceId: string;
|
|
510
612
|
amount: number;
|
|
511
613
|
currency: "usd";
|
|
512
614
|
interval: "month" | "year";
|
|
615
|
+
providerPriceId: string;
|
|
513
616
|
metadata?: Record<string, string> | undefined;
|
|
514
617
|
}>>;
|
|
515
|
-
|
|
516
|
-
|
|
618
|
+
features: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number | boolean>>;
|
|
619
|
+
providerProductId: string;
|
|
517
620
|
metadata?: Record<string, string> | undefined;
|
|
518
621
|
}>;
|
|
519
622
|
addons: Record<string, {
|
|
520
623
|
id: string;
|
|
521
624
|
name: string;
|
|
522
625
|
description: string;
|
|
523
|
-
providerProductId: string;
|
|
524
626
|
prices: Partial<Record<"month" | "year", {
|
|
525
|
-
providerPriceId: string;
|
|
526
627
|
amount: number;
|
|
527
628
|
currency: "usd";
|
|
528
629
|
interval: "month" | "year";
|
|
630
|
+
providerPriceId: string;
|
|
529
631
|
metadata?: Record<string, string> | undefined;
|
|
530
632
|
}>>;
|
|
531
|
-
|
|
633
|
+
providerProductId: string;
|
|
634
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
532
635
|
increment: number;
|
|
533
636
|
metadata?: Record<string, string> | undefined;
|
|
534
|
-
increments?: Partial<Record<"
|
|
637
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
535
638
|
prorationDisabled?: boolean | undefined;
|
|
536
639
|
autoRechargeable?: boolean | undefined;
|
|
537
640
|
hidden?: boolean | undefined;
|
|
@@ -540,56 +643,66 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
540
643
|
id: string;
|
|
541
644
|
name: string;
|
|
542
645
|
description: string;
|
|
543
|
-
providerProductId: string;
|
|
544
646
|
prices: Partial<Record<"month" | "year", {
|
|
545
|
-
providerPriceId: string;
|
|
546
647
|
currency: "usd";
|
|
547
648
|
interval: "month" | "year";
|
|
649
|
+
providerPriceId: string;
|
|
548
650
|
unitAmount: number;
|
|
549
651
|
metadata?: Record<string, string> | undefined;
|
|
550
652
|
}>>;
|
|
653
|
+
providerProductId: string;
|
|
654
|
+
meterType: "payAsYouGo" | "creditGrant";
|
|
551
655
|
providerMeterId: string;
|
|
552
|
-
meterType: "creditGrant" | "payAsYouGo";
|
|
553
656
|
metadata?: Record<string, string> | undefined;
|
|
657
|
+
defaultAggregation?: {
|
|
658
|
+
formula: "count" | "sum";
|
|
659
|
+
} | undefined;
|
|
660
|
+
customerMapping?: {
|
|
661
|
+
type: "by_id";
|
|
662
|
+
eventPayloadKey: "stripe_customer_id";
|
|
663
|
+
} | undefined;
|
|
664
|
+
valueSettings?: {
|
|
665
|
+
eventPayloadKey: "value";
|
|
666
|
+
} | undefined;
|
|
554
667
|
}>;
|
|
555
668
|
isActive: boolean;
|
|
556
669
|
createdAt: string;
|
|
557
670
|
}, {
|
|
558
671
|
name: string;
|
|
559
672
|
description: string;
|
|
560
|
-
version:
|
|
673
|
+
version: string;
|
|
561
674
|
plans: Record<string, {
|
|
562
675
|
id: string;
|
|
563
676
|
name: string;
|
|
564
677
|
description: string;
|
|
565
|
-
|
|
678
|
+
tierIndex: number;
|
|
566
679
|
prices: Partial<Record<"month" | "year", {
|
|
567
|
-
providerPriceId: string;
|
|
568
680
|
amount: number;
|
|
569
681
|
currency: "usd";
|
|
570
682
|
interval: "month" | "year";
|
|
683
|
+
providerPriceId: string;
|
|
571
684
|
metadata?: Record<string, string> | undefined;
|
|
572
685
|
}>>;
|
|
573
|
-
|
|
574
|
-
|
|
686
|
+
features: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number | boolean>>;
|
|
687
|
+
providerProductId: string;
|
|
575
688
|
metadata?: Record<string, string> | undefined;
|
|
576
689
|
}>;
|
|
577
690
|
addons: Record<string, {
|
|
578
691
|
id: string;
|
|
579
692
|
name: string;
|
|
580
693
|
description: string;
|
|
581
|
-
providerProductId: string;
|
|
582
694
|
prices: Partial<Record<"month" | "year", {
|
|
583
|
-
providerPriceId: string;
|
|
584
695
|
amount: number;
|
|
585
696
|
currency: "usd";
|
|
586
697
|
interval: "month" | "year";
|
|
698
|
+
providerPriceId: string;
|
|
587
699
|
metadata?: Record<string, string> | undefined;
|
|
588
700
|
}>>;
|
|
589
|
-
|
|
701
|
+
providerProductId: string;
|
|
702
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
590
703
|
increment: number;
|
|
591
704
|
metadata?: Record<string, string> | undefined;
|
|
592
|
-
increments?: Partial<Record<"
|
|
705
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
593
706
|
prorationDisabled?: boolean | undefined;
|
|
594
707
|
autoRechargeable?: boolean | undefined;
|
|
595
708
|
hidden?: boolean | undefined;
|
|
@@ -598,23 +711,34 @@ export declare const billingVersionConfigSchema: z.ZodObject<{
|
|
|
598
711
|
id: string;
|
|
599
712
|
name: string;
|
|
600
713
|
description: string;
|
|
601
|
-
providerProductId: string;
|
|
602
714
|
prices: Partial<Record<"month" | "year", {
|
|
603
|
-
providerPriceId: string;
|
|
604
715
|
currency: "usd";
|
|
605
716
|
interval: "month" | "year";
|
|
717
|
+
providerPriceId: string;
|
|
606
718
|
unitAmount: number;
|
|
607
719
|
metadata?: Record<string, string> | undefined;
|
|
608
720
|
}>>;
|
|
721
|
+
providerProductId: string;
|
|
722
|
+
meterType: "payAsYouGo" | "creditGrant";
|
|
609
723
|
providerMeterId: string;
|
|
610
|
-
meterType: "creditGrant" | "payAsYouGo";
|
|
611
724
|
metadata?: Record<string, string> | undefined;
|
|
725
|
+
defaultAggregation?: {
|
|
726
|
+
formula: "count" | "sum";
|
|
727
|
+
} | undefined;
|
|
728
|
+
customerMapping?: {
|
|
729
|
+
type: "by_id";
|
|
730
|
+
eventPayloadKey: "stripe_customer_id";
|
|
731
|
+
} | undefined;
|
|
732
|
+
valueSettings?: {
|
|
733
|
+
eventPayloadKey: "value";
|
|
734
|
+
} | undefined;
|
|
612
735
|
}>;
|
|
613
736
|
isActive: boolean;
|
|
614
737
|
createdAt: string;
|
|
615
738
|
}>;
|
|
616
|
-
export
|
|
617
|
-
|
|
739
|
+
export type BillingConfig = z.infer<typeof billingConfigSchema>;
|
|
740
|
+
export declare const billingConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
741
|
+
version: z.ZodString;
|
|
618
742
|
name: z.ZodString;
|
|
619
743
|
description: z.ZodString;
|
|
620
744
|
plans: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -622,106 +746,106 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
|
|
|
622
746
|
name: z.ZodString;
|
|
623
747
|
description: z.ZodString;
|
|
624
748
|
tierIndex: z.ZodNumber;
|
|
625
|
-
providerProductId: z.ZodString;
|
|
626
749
|
prices: z.ZodRecord<z.ZodEnum<["month", "year"]>, z.ZodObject<{
|
|
627
|
-
providerPriceId: z.ZodString;
|
|
628
750
|
amount: z.ZodNumber;
|
|
629
751
|
currency: z.ZodEnum<["usd"]>;
|
|
630
752
|
interval: z.ZodEnum<["month", "year"]>;
|
|
631
753
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
754
|
+
providerPriceId: z.ZodString;
|
|
632
755
|
}, "strip", z.ZodTypeAny, {
|
|
633
|
-
providerPriceId: string;
|
|
634
756
|
amount: number;
|
|
635
757
|
currency: "usd";
|
|
636
758
|
interval: "month" | "year";
|
|
759
|
+
providerPriceId: string;
|
|
637
760
|
metadata?: Record<string, string> | undefined;
|
|
638
761
|
}, {
|
|
639
|
-
providerPriceId: string;
|
|
640
762
|
amount: number;
|
|
641
763
|
currency: "usd";
|
|
642
764
|
interval: "month" | "year";
|
|
765
|
+
providerPriceId: string;
|
|
643
766
|
metadata?: Record<string, string> | undefined;
|
|
644
767
|
}>>;
|
|
645
|
-
features: z.ZodRecord<z.ZodEnum<["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", "
|
|
768
|
+
features: z.ZodRecord<z.ZodEnum<["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", "saved_versions", "indexed_file_count"]>, z.ZodUnion<[z.ZodNumber, z.ZodBoolean]>>;
|
|
646
769
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
770
|
+
providerProductId: z.ZodString;
|
|
647
771
|
}, "strip", z.ZodTypeAny, {
|
|
648
772
|
id: string;
|
|
649
773
|
name: string;
|
|
650
774
|
description: string;
|
|
651
|
-
|
|
775
|
+
tierIndex: number;
|
|
652
776
|
prices: Partial<Record<"month" | "year", {
|
|
653
|
-
providerPriceId: string;
|
|
654
777
|
amount: number;
|
|
655
778
|
currency: "usd";
|
|
656
779
|
interval: "month" | "year";
|
|
780
|
+
providerPriceId: string;
|
|
657
781
|
metadata?: Record<string, string> | undefined;
|
|
658
782
|
}>>;
|
|
659
|
-
|
|
660
|
-
|
|
783
|
+
features: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number | boolean>>;
|
|
784
|
+
providerProductId: string;
|
|
661
785
|
metadata?: Record<string, string> | undefined;
|
|
662
786
|
}, {
|
|
663
787
|
id: string;
|
|
664
788
|
name: string;
|
|
665
789
|
description: string;
|
|
666
|
-
|
|
790
|
+
tierIndex: number;
|
|
667
791
|
prices: Partial<Record<"month" | "year", {
|
|
668
|
-
providerPriceId: string;
|
|
669
792
|
amount: number;
|
|
670
793
|
currency: "usd";
|
|
671
794
|
interval: "month" | "year";
|
|
795
|
+
providerPriceId: string;
|
|
672
796
|
metadata?: Record<string, string> | undefined;
|
|
673
797
|
}>>;
|
|
674
|
-
|
|
675
|
-
|
|
798
|
+
features: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number | boolean>>;
|
|
799
|
+
providerProductId: string;
|
|
676
800
|
metadata?: Record<string, string> | undefined;
|
|
677
801
|
}>>;
|
|
678
802
|
addons: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
|
|
679
803
|
id: z.ZodString;
|
|
680
804
|
name: z.ZodString;
|
|
681
805
|
description: z.ZodString;
|
|
682
|
-
providerProductId: z.ZodString;
|
|
683
806
|
prices: z.ZodRecord<z.ZodEnum<["month", "year"]>, z.ZodObject<{
|
|
684
|
-
providerPriceId: z.ZodString;
|
|
685
807
|
amount: z.ZodNumber;
|
|
686
808
|
currency: z.ZodEnum<["usd"]>;
|
|
687
809
|
interval: z.ZodEnum<["month", "year"]>;
|
|
688
810
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
811
|
+
providerPriceId: z.ZodString;
|
|
689
812
|
}, "strip", z.ZodTypeAny, {
|
|
690
|
-
providerPriceId: string;
|
|
691
813
|
amount: number;
|
|
692
814
|
currency: "usd";
|
|
693
815
|
interval: "month" | "year";
|
|
816
|
+
providerPriceId: string;
|
|
694
817
|
metadata?: Record<string, string> | undefined;
|
|
695
818
|
}, {
|
|
696
|
-
providerPriceId: string;
|
|
697
819
|
amount: number;
|
|
698
820
|
currency: "usd";
|
|
699
821
|
interval: "month" | "year";
|
|
822
|
+
providerPriceId: string;
|
|
700
823
|
metadata?: Record<string, string> | undefined;
|
|
701
824
|
}>>;
|
|
702
|
-
feature: z.ZodEnum<["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", "
|
|
825
|
+
feature: z.ZodEnum<["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", "saved_versions", "indexed_file_count"]>;
|
|
703
826
|
increment: z.ZodNumber;
|
|
704
|
-
increments: z.ZodOptional<z.ZodRecord<z.ZodEnum<["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", "
|
|
827
|
+
increments: z.ZodOptional<z.ZodRecord<z.ZodEnum<["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", "saved_versions", "indexed_file_count"]>, z.ZodNumber>>;
|
|
705
828
|
prorationDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
706
829
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
707
830
|
autoRechargeable: z.ZodOptional<z.ZodBoolean>;
|
|
708
831
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
832
|
+
providerProductId: z.ZodString;
|
|
709
833
|
}, "strip", z.ZodTypeAny, {
|
|
710
834
|
id: string;
|
|
711
835
|
name: string;
|
|
712
836
|
description: string;
|
|
713
|
-
providerProductId: string;
|
|
714
837
|
prices: Partial<Record<"month" | "year", {
|
|
715
|
-
providerPriceId: string;
|
|
716
838
|
amount: number;
|
|
717
839
|
currency: "usd";
|
|
718
840
|
interval: "month" | "year";
|
|
841
|
+
providerPriceId: string;
|
|
719
842
|
metadata?: Record<string, string> | undefined;
|
|
720
843
|
}>>;
|
|
721
|
-
|
|
844
|
+
providerProductId: string;
|
|
845
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
722
846
|
increment: number;
|
|
723
847
|
metadata?: Record<string, string> | undefined;
|
|
724
|
-
increments?: Partial<Record<"
|
|
848
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
725
849
|
prorationDisabled?: boolean | undefined;
|
|
726
850
|
autoRechargeable?: boolean | undefined;
|
|
727
851
|
hidden?: boolean | undefined;
|
|
@@ -729,18 +853,18 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
|
|
|
729
853
|
id: string;
|
|
730
854
|
name: string;
|
|
731
855
|
description: string;
|
|
732
|
-
providerProductId: string;
|
|
733
856
|
prices: Partial<Record<"month" | "year", {
|
|
734
|
-
providerPriceId: string;
|
|
735
857
|
amount: number;
|
|
736
858
|
currency: "usd";
|
|
737
859
|
interval: "month" | "year";
|
|
860
|
+
providerPriceId: string;
|
|
738
861
|
metadata?: Record<string, string> | undefined;
|
|
739
862
|
}>>;
|
|
740
|
-
|
|
863
|
+
providerProductId: string;
|
|
864
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
741
865
|
increment: number;
|
|
742
866
|
metadata?: Record<string, string> | undefined;
|
|
743
|
-
increments?: Partial<Record<"
|
|
867
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
744
868
|
prorationDisabled?: boolean | undefined;
|
|
745
869
|
autoRechargeable?: boolean | undefined;
|
|
746
870
|
hidden?: boolean | undefined;
|
|
@@ -748,18 +872,18 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
|
|
|
748
872
|
id: string;
|
|
749
873
|
name: string;
|
|
750
874
|
description: string;
|
|
751
|
-
providerProductId: string;
|
|
752
875
|
prices: Partial<Record<"month" | "year", {
|
|
753
|
-
providerPriceId: string;
|
|
754
876
|
amount: number;
|
|
755
877
|
currency: "usd";
|
|
756
878
|
interval: "month" | "year";
|
|
879
|
+
providerPriceId: string;
|
|
757
880
|
metadata?: Record<string, string> | undefined;
|
|
758
881
|
}>>;
|
|
759
|
-
|
|
882
|
+
providerProductId: string;
|
|
883
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
760
884
|
increment: number;
|
|
761
885
|
metadata?: Record<string, string> | undefined;
|
|
762
|
-
increments?: Partial<Record<"
|
|
886
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
763
887
|
prorationDisabled?: boolean | undefined;
|
|
764
888
|
autoRechargeable?: boolean | undefined;
|
|
765
889
|
hidden?: boolean | undefined;
|
|
@@ -767,18 +891,18 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
|
|
|
767
891
|
id: string;
|
|
768
892
|
name: string;
|
|
769
893
|
description: string;
|
|
770
|
-
providerProductId: string;
|
|
771
894
|
prices: Partial<Record<"month" | "year", {
|
|
772
|
-
providerPriceId: string;
|
|
773
895
|
amount: number;
|
|
774
896
|
currency: "usd";
|
|
775
897
|
interval: "month" | "year";
|
|
898
|
+
providerPriceId: string;
|
|
776
899
|
metadata?: Record<string, string> | undefined;
|
|
777
900
|
}>>;
|
|
778
|
-
|
|
901
|
+
providerProductId: string;
|
|
902
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
779
903
|
increment: number;
|
|
780
904
|
metadata?: Record<string, string> | undefined;
|
|
781
|
-
increments?: Partial<Record<"
|
|
905
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
782
906
|
prorationDisabled?: boolean | undefined;
|
|
783
907
|
autoRechargeable?: boolean | undefined;
|
|
784
908
|
hidden?: boolean | undefined;
|
|
@@ -787,98 +911,142 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
|
|
|
787
911
|
id: z.ZodString;
|
|
788
912
|
name: z.ZodString;
|
|
789
913
|
description: z.ZodString;
|
|
790
|
-
|
|
791
|
-
|
|
914
|
+
defaultAggregation: z.ZodOptional<z.ZodObject<{
|
|
915
|
+
formula: z.ZodEnum<["sum", "count"]>;
|
|
916
|
+
}, "strip", z.ZodTypeAny, {
|
|
917
|
+
formula: "count" | "sum";
|
|
918
|
+
}, {
|
|
919
|
+
formula: "count" | "sum";
|
|
920
|
+
}>>;
|
|
921
|
+
customerMapping: z.ZodOptional<z.ZodObject<{
|
|
922
|
+
eventPayloadKey: z.ZodLiteral<"stripe_customer_id">;
|
|
923
|
+
type: z.ZodLiteral<"by_id">;
|
|
924
|
+
}, "strip", z.ZodTypeAny, {
|
|
925
|
+
type: "by_id";
|
|
926
|
+
eventPayloadKey: "stripe_customer_id";
|
|
927
|
+
}, {
|
|
928
|
+
type: "by_id";
|
|
929
|
+
eventPayloadKey: "stripe_customer_id";
|
|
930
|
+
}>>;
|
|
931
|
+
valueSettings: z.ZodOptional<z.ZodObject<{
|
|
932
|
+
eventPayloadKey: z.ZodLiteral<"value">;
|
|
933
|
+
}, "strip", z.ZodTypeAny, {
|
|
934
|
+
eventPayloadKey: "value";
|
|
935
|
+
}, {
|
|
936
|
+
eventPayloadKey: "value";
|
|
937
|
+
}>>;
|
|
792
938
|
prices: z.ZodRecord<z.ZodEnum<["month", "year"]>, z.ZodObject<{
|
|
793
|
-
providerPriceId: z.ZodString;
|
|
794
939
|
unitAmount: z.ZodNumber;
|
|
795
940
|
currency: z.ZodEnum<["usd"]>;
|
|
796
941
|
interval: z.ZodEnum<["month", "year"]>;
|
|
797
942
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
943
|
+
providerPriceId: z.ZodString;
|
|
798
944
|
}, "strip", z.ZodTypeAny, {
|
|
799
|
-
providerPriceId: string;
|
|
800
945
|
currency: "usd";
|
|
801
946
|
interval: "month" | "year";
|
|
947
|
+
providerPriceId: string;
|
|
802
948
|
unitAmount: number;
|
|
803
949
|
metadata?: Record<string, string> | undefined;
|
|
804
950
|
}, {
|
|
805
|
-
providerPriceId: string;
|
|
806
951
|
currency: "usd";
|
|
807
952
|
interval: "month" | "year";
|
|
953
|
+
providerPriceId: string;
|
|
808
954
|
unitAmount: number;
|
|
809
955
|
metadata?: Record<string, string> | undefined;
|
|
810
956
|
}>>;
|
|
811
957
|
meterType: z.ZodEnum<["payAsYouGo", "creditGrant"]>;
|
|
812
958
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
959
|
+
providerProductId: z.ZodString;
|
|
960
|
+
providerMeterId: z.ZodString;
|
|
813
961
|
}, "strip", z.ZodTypeAny, {
|
|
814
962
|
id: string;
|
|
815
963
|
name: string;
|
|
816
964
|
description: string;
|
|
817
|
-
providerProductId: string;
|
|
818
965
|
prices: Partial<Record<"month" | "year", {
|
|
819
|
-
providerPriceId: string;
|
|
820
966
|
currency: "usd";
|
|
821
967
|
interval: "month" | "year";
|
|
968
|
+
providerPriceId: string;
|
|
822
969
|
unitAmount: number;
|
|
823
970
|
metadata?: Record<string, string> | undefined;
|
|
824
971
|
}>>;
|
|
972
|
+
providerProductId: string;
|
|
973
|
+
meterType: "payAsYouGo" | "creditGrant";
|
|
825
974
|
providerMeterId: string;
|
|
826
|
-
meterType: "creditGrant" | "payAsYouGo";
|
|
827
975
|
metadata?: Record<string, string> | undefined;
|
|
976
|
+
defaultAggregation?: {
|
|
977
|
+
formula: "count" | "sum";
|
|
978
|
+
} | undefined;
|
|
979
|
+
customerMapping?: {
|
|
980
|
+
type: "by_id";
|
|
981
|
+
eventPayloadKey: "stripe_customer_id";
|
|
982
|
+
} | undefined;
|
|
983
|
+
valueSettings?: {
|
|
984
|
+
eventPayloadKey: "value";
|
|
985
|
+
} | undefined;
|
|
828
986
|
}, {
|
|
829
987
|
id: string;
|
|
830
988
|
name: string;
|
|
831
989
|
description: string;
|
|
832
|
-
providerProductId: string;
|
|
833
990
|
prices: Partial<Record<"month" | "year", {
|
|
834
|
-
providerPriceId: string;
|
|
835
991
|
currency: "usd";
|
|
836
992
|
interval: "month" | "year";
|
|
993
|
+
providerPriceId: string;
|
|
837
994
|
unitAmount: number;
|
|
838
995
|
metadata?: Record<string, string> | undefined;
|
|
839
996
|
}>>;
|
|
997
|
+
providerProductId: string;
|
|
998
|
+
meterType: "payAsYouGo" | "creditGrant";
|
|
840
999
|
providerMeterId: string;
|
|
841
|
-
meterType: "creditGrant" | "payAsYouGo";
|
|
842
1000
|
metadata?: Record<string, string> | undefined;
|
|
1001
|
+
defaultAggregation?: {
|
|
1002
|
+
formula: "count" | "sum";
|
|
1003
|
+
} | undefined;
|
|
1004
|
+
customerMapping?: {
|
|
1005
|
+
type: "by_id";
|
|
1006
|
+
eventPayloadKey: "stripe_customer_id";
|
|
1007
|
+
} | undefined;
|
|
1008
|
+
valueSettings?: {
|
|
1009
|
+
eventPayloadKey: "value";
|
|
1010
|
+
} | undefined;
|
|
843
1011
|
}>>;
|
|
844
1012
|
isActive: z.ZodBoolean;
|
|
845
1013
|
createdAt: z.ZodString;
|
|
846
1014
|
}, "strip", z.ZodTypeAny, {
|
|
847
1015
|
name: string;
|
|
848
1016
|
description: string;
|
|
849
|
-
version:
|
|
1017
|
+
version: string;
|
|
850
1018
|
plans: Record<string, {
|
|
851
1019
|
id: string;
|
|
852
1020
|
name: string;
|
|
853
1021
|
description: string;
|
|
854
|
-
|
|
1022
|
+
tierIndex: number;
|
|
855
1023
|
prices: Partial<Record<"month" | "year", {
|
|
856
|
-
providerPriceId: string;
|
|
857
1024
|
amount: number;
|
|
858
1025
|
currency: "usd";
|
|
859
1026
|
interval: "month" | "year";
|
|
1027
|
+
providerPriceId: string;
|
|
860
1028
|
metadata?: Record<string, string> | undefined;
|
|
861
1029
|
}>>;
|
|
862
|
-
|
|
863
|
-
|
|
1030
|
+
features: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number | boolean>>;
|
|
1031
|
+
providerProductId: string;
|
|
864
1032
|
metadata?: Record<string, string> | undefined;
|
|
865
1033
|
}>;
|
|
866
1034
|
addons: Record<string, {
|
|
867
1035
|
id: string;
|
|
868
1036
|
name: string;
|
|
869
1037
|
description: string;
|
|
870
|
-
providerProductId: string;
|
|
871
1038
|
prices: Partial<Record<"month" | "year", {
|
|
872
|
-
providerPriceId: string;
|
|
873
1039
|
amount: number;
|
|
874
1040
|
currency: "usd";
|
|
875
1041
|
interval: "month" | "year";
|
|
1042
|
+
providerPriceId: string;
|
|
876
1043
|
metadata?: Record<string, string> | undefined;
|
|
877
1044
|
}>>;
|
|
878
|
-
|
|
1045
|
+
providerProductId: string;
|
|
1046
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
879
1047
|
increment: number;
|
|
880
1048
|
metadata?: Record<string, string> | undefined;
|
|
881
|
-
increments?: Partial<Record<"
|
|
1049
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
882
1050
|
prorationDisabled?: boolean | undefined;
|
|
883
1051
|
autoRechargeable?: boolean | undefined;
|
|
884
1052
|
hidden?: boolean | undefined;
|
|
@@ -887,56 +1055,66 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
|
|
|
887
1055
|
id: string;
|
|
888
1056
|
name: string;
|
|
889
1057
|
description: string;
|
|
890
|
-
providerProductId: string;
|
|
891
1058
|
prices: Partial<Record<"month" | "year", {
|
|
892
|
-
providerPriceId: string;
|
|
893
1059
|
currency: "usd";
|
|
894
1060
|
interval: "month" | "year";
|
|
1061
|
+
providerPriceId: string;
|
|
895
1062
|
unitAmount: number;
|
|
896
1063
|
metadata?: Record<string, string> | undefined;
|
|
897
1064
|
}>>;
|
|
1065
|
+
providerProductId: string;
|
|
1066
|
+
meterType: "payAsYouGo" | "creditGrant";
|
|
898
1067
|
providerMeterId: string;
|
|
899
|
-
meterType: "creditGrant" | "payAsYouGo";
|
|
900
1068
|
metadata?: Record<string, string> | undefined;
|
|
1069
|
+
defaultAggregation?: {
|
|
1070
|
+
formula: "count" | "sum";
|
|
1071
|
+
} | undefined;
|
|
1072
|
+
customerMapping?: {
|
|
1073
|
+
type: "by_id";
|
|
1074
|
+
eventPayloadKey: "stripe_customer_id";
|
|
1075
|
+
} | undefined;
|
|
1076
|
+
valueSettings?: {
|
|
1077
|
+
eventPayloadKey: "value";
|
|
1078
|
+
} | undefined;
|
|
901
1079
|
}>;
|
|
902
1080
|
isActive: boolean;
|
|
903
1081
|
createdAt: string;
|
|
904
1082
|
}, {
|
|
905
1083
|
name: string;
|
|
906
1084
|
description: string;
|
|
907
|
-
version:
|
|
1085
|
+
version: string;
|
|
908
1086
|
plans: Record<string, {
|
|
909
1087
|
id: string;
|
|
910
1088
|
name: string;
|
|
911
1089
|
description: string;
|
|
912
|
-
|
|
1090
|
+
tierIndex: number;
|
|
913
1091
|
prices: Partial<Record<"month" | "year", {
|
|
914
|
-
providerPriceId: string;
|
|
915
1092
|
amount: number;
|
|
916
1093
|
currency: "usd";
|
|
917
1094
|
interval: "month" | "year";
|
|
1095
|
+
providerPriceId: string;
|
|
918
1096
|
metadata?: Record<string, string> | undefined;
|
|
919
1097
|
}>>;
|
|
920
|
-
|
|
921
|
-
|
|
1098
|
+
features: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number | boolean>>;
|
|
1099
|
+
providerProductId: string;
|
|
922
1100
|
metadata?: Record<string, string> | undefined;
|
|
923
1101
|
}>;
|
|
924
1102
|
addons: Record<string, {
|
|
925
1103
|
id: string;
|
|
926
1104
|
name: string;
|
|
927
1105
|
description: string;
|
|
928
|
-
providerProductId: string;
|
|
929
1106
|
prices: Partial<Record<"month" | "year", {
|
|
930
|
-
providerPriceId: string;
|
|
931
1107
|
amount: number;
|
|
932
1108
|
currency: "usd";
|
|
933
1109
|
interval: "month" | "year";
|
|
1110
|
+
providerPriceId: string;
|
|
934
1111
|
metadata?: Record<string, string> | undefined;
|
|
935
1112
|
}>>;
|
|
936
|
-
|
|
1113
|
+
providerProductId: string;
|
|
1114
|
+
feature: "ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions";
|
|
937
1115
|
increment: number;
|
|
938
1116
|
metadata?: Record<string, string> | undefined;
|
|
939
|
-
increments?: Partial<Record<"
|
|
1117
|
+
increments?: Partial<Record<"ratelimit" | "bot_count" | "indexed_file_count" | "human_in_the_loop" | "incoming_messages_events" | "integration_spend" | "integration_subscription" | "table_rows" | "always_alive_count" | "always_alive_concurrency" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions", number>> | undefined;
|
|
940
1118
|
prorationDisabled?: boolean | undefined;
|
|
941
1119
|
autoRechargeable?: boolean | undefined;
|
|
942
1120
|
hidden?: boolean | undefined;
|
|
@@ -945,18 +1123,36 @@ export declare const billingConfigSchema: z.ZodRecord<z.ZodEnum<["v4"]>, z.ZodOb
|
|
|
945
1123
|
id: string;
|
|
946
1124
|
name: string;
|
|
947
1125
|
description: string;
|
|
948
|
-
providerProductId: string;
|
|
949
1126
|
prices: Partial<Record<"month" | "year", {
|
|
950
|
-
providerPriceId: string;
|
|
951
1127
|
currency: "usd";
|
|
952
1128
|
interval: "month" | "year";
|
|
1129
|
+
providerPriceId: string;
|
|
953
1130
|
unitAmount: number;
|
|
954
1131
|
metadata?: Record<string, string> | undefined;
|
|
955
1132
|
}>>;
|
|
1133
|
+
providerProductId: string;
|
|
1134
|
+
meterType: "payAsYouGo" | "creditGrant";
|
|
956
1135
|
providerMeterId: string;
|
|
957
|
-
meterType: "creditGrant" | "payAsYouGo";
|
|
958
1136
|
metadata?: Record<string, string> | undefined;
|
|
1137
|
+
defaultAggregation?: {
|
|
1138
|
+
formula: "count" | "sum";
|
|
1139
|
+
} | undefined;
|
|
1140
|
+
customerMapping?: {
|
|
1141
|
+
type: "by_id";
|
|
1142
|
+
eventPayloadKey: "stripe_customer_id";
|
|
1143
|
+
} | undefined;
|
|
1144
|
+
valueSettings?: {
|
|
1145
|
+
eventPayloadKey: "value";
|
|
1146
|
+
} | undefined;
|
|
959
1147
|
}>;
|
|
960
1148
|
isActive: boolean;
|
|
961
1149
|
createdAt: string;
|
|
962
1150
|
}>>;
|
|
1151
|
+
export type BillingPriceDefinition = BillingPrice;
|
|
1152
|
+
export type BillingMeteredPriceDefinition = BillingMeteredPrice;
|
|
1153
|
+
export type BillingPlanDefinition = BillingPlan;
|
|
1154
|
+
export type BillingAddonDefinition = BillingAddon;
|
|
1155
|
+
export type BillingMeterDefinition = BillingMeter;
|
|
1156
|
+
export type BillingVersionDefinition = BillingVersion;
|
|
1157
|
+
export type BillingVersionConfig = BillingVersion;
|
|
1158
|
+
export type BillingDefinition = BillingConfig;
|