@trigger.dev/platform 1.3.1 → 1.4.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/index.cjs +829 -993
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2664 -2034
- package/dist/index.d.ts +2664 -2034
- package/dist/index.js +764 -904
- package/dist/index.js.map +1 -1
- package/package.json +7 -8
package/dist/index.js
CHANGED
|
@@ -1,926 +1,786 @@
|
|
|
1
|
-
// src/v3/schemas/planDefinitions.ts
|
|
2
1
|
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
2
|
+
//#region src/v3/schemas/planDefinitions.ts
|
|
3
|
+
const ExceedableLimit = z.object({
|
|
4
|
+
number: z.number(),
|
|
5
|
+
canExceed: z.boolean().optional()
|
|
6
|
+
});
|
|
7
|
+
const EnvironmentBasedLimit = z.object({
|
|
8
|
+
production: z.number(),
|
|
9
|
+
staging: z.number(),
|
|
10
|
+
preview: z.number(),
|
|
11
|
+
development: z.number(),
|
|
12
|
+
canExceed: z.boolean().optional(),
|
|
13
|
+
number: z.number()
|
|
14
|
+
});
|
|
15
|
+
const BatchRateLimitConfig = z.object({
|
|
16
|
+
type: z.string(),
|
|
17
|
+
interval: z.string(),
|
|
18
|
+
maxTokens: z.number(),
|
|
19
|
+
refillRate: z.number()
|
|
20
|
+
});
|
|
21
|
+
const BatchQueueConcurrencyConfig = z.object({ processingConcurrency: z.number() });
|
|
22
|
+
/**
|
|
23
|
+
* Hosted webhook limits, synced into Organization.webhookLimitsConfig on plan changes. The webapp
|
|
24
|
+
* falls back to its env defaults for any field that isn't set.
|
|
25
|
+
*/
|
|
26
|
+
const WebhookLimitsConfig = z.object({
|
|
27
|
+
maxWaitersPerEnvironment: z.number(),
|
|
28
|
+
maxWaitersPerEndpoint: z.number(),
|
|
29
|
+
concurrency: z.number(),
|
|
30
|
+
deliveryRetentionDays: z.number(),
|
|
31
|
+
deliveryRetentionStrict: z.boolean().optional(),
|
|
32
|
+
endpointRateLimitTokens: z.number().optional(),
|
|
33
|
+
endpointRateLimitWindowSeconds: z.number().optional(),
|
|
34
|
+
environmentRateLimitTokens: z.number().optional(),
|
|
35
|
+
environmentRateLimitWindowSeconds: z.number().optional()
|
|
36
|
+
});
|
|
37
|
+
const QueueSizeLimits = z.object({
|
|
38
|
+
development: z.number(),
|
|
39
|
+
deployed: z.number()
|
|
40
|
+
});
|
|
41
|
+
const Limits = z.object({
|
|
42
|
+
includedUsage: z.number(),
|
|
43
|
+
concurrentRuns: EnvironmentBasedLimit,
|
|
44
|
+
teamMembers: ExceedableLimit,
|
|
45
|
+
schedules: ExceedableLimit,
|
|
46
|
+
logRetentionDays: ExceedableLimit,
|
|
47
|
+
queryPeriodDays: ExceedableLimit,
|
|
48
|
+
alerts: ExceedableLimit,
|
|
49
|
+
hasStagingEnvironment: z.boolean(),
|
|
50
|
+
realtimeConcurrentConnections: ExceedableLimit,
|
|
51
|
+
branches: ExceedableLimit,
|
|
52
|
+
branchesDev: ExceedableLimit,
|
|
53
|
+
support: z.enum(["community", "slack"]),
|
|
54
|
+
batchRateLimitConfig: BatchRateLimitConfig.optional(),
|
|
55
|
+
batchQueueConcurrencyConfig: BatchQueueConcurrencyConfig.optional(),
|
|
56
|
+
webhookLimitsConfig: WebhookLimitsConfig.optional(),
|
|
57
|
+
metricDashboards: ExceedableLimit,
|
|
58
|
+
metricWidgetsPerDashboard: ExceedableLimit,
|
|
59
|
+
agentMessages: ExceedableLimit.optional(),
|
|
60
|
+
agentWatchMaxHours: ExceedableLimit.optional(),
|
|
61
|
+
agentWatchers: ExceedableLimit.optional(),
|
|
62
|
+
declaredSchedulesPerDeploy: ExceedableLimit.optional(),
|
|
63
|
+
queueSizeLimits: QueueSizeLimits.optional(),
|
|
64
|
+
hasPrivateNetworking: z.boolean().optional(),
|
|
65
|
+
privateLinkConnectionLimit: z.number().optional(),
|
|
66
|
+
hasSso: z.boolean().optional(),
|
|
67
|
+
streamBasinRetention: z.string().optional()
|
|
68
|
+
});
|
|
69
|
+
const commonMetadata = {
|
|
70
|
+
title: z.string(),
|
|
71
|
+
code: z.string()
|
|
58
72
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
73
|
+
const pricingLookup = {
|
|
74
|
+
tierPriceCode: z.string(),
|
|
75
|
+
usagePriceCode: z.string(),
|
|
76
|
+
usageCouponCode: z.string().optional()
|
|
63
77
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
const FreePlanDefinition = z.object({
|
|
79
|
+
...commonMetadata,
|
|
80
|
+
type: z.literal("free"),
|
|
81
|
+
limits: Limits
|
|
82
|
+
});
|
|
83
|
+
const PaidPlanDefinition = z.object({
|
|
84
|
+
...commonMetadata,
|
|
85
|
+
type: z.literal("paid"),
|
|
86
|
+
tierPrice: z.number(),
|
|
87
|
+
stripe: z.object(pricingLookup),
|
|
88
|
+
limits: Limits
|
|
89
|
+
});
|
|
90
|
+
const EnterprisePlanDefinition = z.object({
|
|
91
|
+
...commonMetadata,
|
|
92
|
+
type: z.literal("enterprise"),
|
|
93
|
+
limits: Limits
|
|
94
|
+
});
|
|
95
|
+
const PlanDefinitionSchema = z.discriminatedUnion("type", [
|
|
96
|
+
FreePlanDefinition,
|
|
97
|
+
PaidPlanDefinition,
|
|
98
|
+
EnterprisePlanDefinition
|
|
85
99
|
]);
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
})
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
var CurrentPlan = z2.object({
|
|
147
|
-
//todo remove this after the next deploy
|
|
148
|
-
subscription: z2.any(),
|
|
149
|
-
v3Subscription: SubscriptionResult
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
// src/v3/schemas/subscribe.ts
|
|
153
|
-
import { z as z3 } from "zod";
|
|
154
|
-
var SetPaidPlanBodySchema = z3.object({
|
|
155
|
-
type: z3.literal("paid"),
|
|
156
|
-
planCode: z3.string(),
|
|
157
|
-
userId: z3.string()
|
|
158
|
-
});
|
|
159
|
-
var SetFreePlanBodySchema = z3.object({
|
|
160
|
-
type: z3.literal("free"),
|
|
161
|
-
userId: z3.string()
|
|
162
|
-
});
|
|
163
|
-
var SetPlanBodySchema = z3.discriminatedUnion("type", [
|
|
164
|
-
SetPaidPlanBodySchema,
|
|
165
|
-
SetFreePlanBodySchema
|
|
100
|
+
const MachineDefinition = z.object({
|
|
101
|
+
code: z.string(),
|
|
102
|
+
title: z.string(),
|
|
103
|
+
cpu: z.number(),
|
|
104
|
+
memory: z.number(),
|
|
105
|
+
centsPerMs: z.number()
|
|
106
|
+
});
|
|
107
|
+
const Plans = z.object({
|
|
108
|
+
free: FreePlanDefinition,
|
|
109
|
+
hobby: PaidPlanDefinition,
|
|
110
|
+
pro: PaidPlanDefinition,
|
|
111
|
+
enterprise: EnterprisePlanDefinition
|
|
112
|
+
});
|
|
113
|
+
/** The pricing per step of the add-on, e.g. $10 for 50 units */
|
|
114
|
+
const AddOnPricing = z.object({
|
|
115
|
+
/** The step size - must purchase in multiples of this amount */
|
|
116
|
+
stepSize: z.number(),
|
|
117
|
+
/** Price per step in cents */
|
|
118
|
+
centsPerStep: z.number()
|
|
119
|
+
});
|
|
120
|
+
const PlansResult = z.object({
|
|
121
|
+
plans: Plans,
|
|
122
|
+
usagePricing: z.object({
|
|
123
|
+
centsPerRunInvocation: z.number(),
|
|
124
|
+
machines: z.record(z.string(), MachineDefinition),
|
|
125
|
+
defaultMachine: z.string()
|
|
126
|
+
}),
|
|
127
|
+
addOnPricing: z.object({
|
|
128
|
+
concurrency: AddOnPricing,
|
|
129
|
+
branches: AddOnPricing,
|
|
130
|
+
seats: AddOnPricing,
|
|
131
|
+
schedules: AddOnPricing
|
|
132
|
+
})
|
|
133
|
+
});
|
|
134
|
+
const AddOnDefinition = z.object({
|
|
135
|
+
code: z.enum([
|
|
136
|
+
"concurrency",
|
|
137
|
+
"branches",
|
|
138
|
+
"seats",
|
|
139
|
+
"schedules"
|
|
140
|
+
]),
|
|
141
|
+
priceCode: z.string(),
|
|
142
|
+
pricing: AddOnPricing
|
|
143
|
+
});
|
|
144
|
+
const AddOn = z.object({
|
|
145
|
+
purchased: z.number(),
|
|
146
|
+
quota: z.number().optional()
|
|
147
|
+
});
|
|
148
|
+
const AddOns = z.object({
|
|
149
|
+
concurrentRuns: AddOn.optional(),
|
|
150
|
+
branches: AddOn.optional(),
|
|
151
|
+
seats: AddOn.optional(),
|
|
152
|
+
schedules: AddOn.optional()
|
|
153
|
+
});
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/v3/schemas/subscription.ts
|
|
156
|
+
const FreeTierStatus = z.enum([
|
|
157
|
+
"requires_connect",
|
|
158
|
+
"approved",
|
|
159
|
+
"rejected"
|
|
166
160
|
]);
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
161
|
+
const SubscriptionResult = z.object({
|
|
162
|
+
freeTierStatus: FreeTierStatus,
|
|
163
|
+
isPaying: z.boolean(),
|
|
164
|
+
showSelfServe: z.boolean().default(true),
|
|
165
|
+
canceledAt: z.string().optional(),
|
|
166
|
+
plan: PlanDefinitionSchema.optional(),
|
|
167
|
+
addOns: AddOns.optional()
|
|
168
|
+
});
|
|
169
|
+
const CurrentPlan = z.object({
|
|
170
|
+
subscription: z.any(),
|
|
171
|
+
v3Subscription: SubscriptionResult
|
|
172
|
+
});
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/v3/schemas/subscribe.ts
|
|
175
|
+
const SetPaidPlanBodySchema = z.object({
|
|
176
|
+
type: z.literal("paid"),
|
|
177
|
+
planCode: z.string(),
|
|
178
|
+
userId: z.string()
|
|
179
|
+
});
|
|
180
|
+
const SetFreePlanBodySchema = z.object({
|
|
181
|
+
type: z.literal("free"),
|
|
182
|
+
userId: z.string()
|
|
183
|
+
});
|
|
184
|
+
const SetPlanBodySchema = z.discriminatedUnion("type", [SetPaidPlanBodySchema, SetFreePlanBodySchema]);
|
|
185
|
+
const FreeConnectRequiredSchema = z.object({
|
|
186
|
+
action: z.literal("free_connect_required"),
|
|
187
|
+
connectUrl: z.string().url()
|
|
188
|
+
});
|
|
189
|
+
const FreeConnectedSchema = z.object({
|
|
190
|
+
action: z.literal("free_connected"),
|
|
191
|
+
accepted: z.boolean()
|
|
192
|
+
});
|
|
193
|
+
const UpdatedSubscriptionResultSchema = z.object({
|
|
194
|
+
action: z.literal("updated_subscription"),
|
|
195
|
+
subscription: z.object({ planCode: z.string() })
|
|
196
|
+
});
|
|
197
|
+
const CreateSubscriptionFlowStartSchema = z.object({
|
|
198
|
+
action: z.literal("create_subscription_flow_start"),
|
|
199
|
+
subscription: z.object({ planCode: z.string() }),
|
|
200
|
+
checkoutUrl: z.string().url()
|
|
201
|
+
});
|
|
202
|
+
const CanceledSubscriptionResultSchema = z.object({ action: z.literal("canceled_subscription") });
|
|
203
|
+
const SubscribeResultSchema = z.discriminatedUnion("action", [
|
|
204
|
+
FreeConnectRequiredSchema,
|
|
205
|
+
FreeConnectedSchema,
|
|
206
|
+
CreateSubscriptionFlowStartSchema,
|
|
207
|
+
UpdatedSubscriptionResultSchema,
|
|
208
|
+
CanceledSubscriptionResultSchema
|
|
197
209
|
]);
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
210
|
+
const SetAddOnBody = z.object({
|
|
211
|
+
type: z.enum([
|
|
212
|
+
"concurrency",
|
|
213
|
+
"branches",
|
|
214
|
+
"seats",
|
|
215
|
+
"schedules"
|
|
216
|
+
]),
|
|
217
|
+
amount: z.number()
|
|
218
|
+
});
|
|
219
|
+
const SetAddOnResult = z.discriminatedUnion("result", [
|
|
220
|
+
z.object({
|
|
221
|
+
result: z.literal("error"),
|
|
222
|
+
error: z.string()
|
|
223
|
+
}),
|
|
224
|
+
z.object({
|
|
225
|
+
result: z.literal("success"),
|
|
226
|
+
type: z.string(),
|
|
227
|
+
amount: z.number(),
|
|
228
|
+
subscription: z.object({ id: z.string() })
|
|
229
|
+
}),
|
|
230
|
+
z.object({
|
|
231
|
+
result: z.literal("max_quota_reached"),
|
|
232
|
+
type: z.string(),
|
|
233
|
+
maxQuota: z.number()
|
|
234
|
+
})
|
|
220
235
|
]);
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
+
const CancelSubscriptionResponse = z.object({
|
|
237
|
+
outcome: z.enum([
|
|
238
|
+
"canceled",
|
|
239
|
+
"already_canceled",
|
|
240
|
+
"no_subscription"
|
|
241
|
+
]),
|
|
242
|
+
cancelAt: z.string().nullable()
|
|
243
|
+
});
|
|
244
|
+
//#endregion
|
|
245
|
+
//#region src/v3/schemas/portal.ts
|
|
246
|
+
const CustomerPortalRequestBodySchema = z.object({ returnUrl: z.string() });
|
|
247
|
+
const CustomerPortalSchema = z.object({ customerPortalUrl: z.string().optional() });
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/v3/schemas/error.ts
|
|
250
|
+
const ErrorSchema = z.object({
|
|
251
|
+
error: z.string(),
|
|
252
|
+
code: z.string().optional()
|
|
236
253
|
}).passthrough();
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
});
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
var UsageSeriesParams = z6.object({
|
|
249
|
-
from: z6.coerce.date(),
|
|
250
|
-
to: z6.coerce.date(),
|
|
251
|
-
/** defaults to DAY */
|
|
252
|
-
window: Window.optional(),
|
|
253
|
-
timezone: z6.string().optional()
|
|
254
|
-
//these don't work at the moment because you can't group by items that aren't defined in the meter group by
|
|
255
|
-
// groupByEnvironmentType: BooleanParam.optional(),
|
|
256
|
-
// groupByTaskIdentifier: BooleanParam.optional(),
|
|
257
|
-
});
|
|
258
|
-
var UsageSeriesResult = z6.object({
|
|
259
|
-
from: z6.string(),
|
|
260
|
-
to: z6.string(),
|
|
261
|
-
window: Window.optional(),
|
|
262
|
-
data: z6.object({
|
|
263
|
-
value: z6.number(),
|
|
264
|
-
windowStart: z6.string(),
|
|
265
|
-
windowEnd: z6.string()
|
|
266
|
-
//these don't work at the moment
|
|
267
|
-
// groupBy: z
|
|
268
|
-
// .object({
|
|
269
|
-
// environmentType: z.string().optional(),
|
|
270
|
-
// taskIdentifer: z.string().optional(),
|
|
271
|
-
// })
|
|
272
|
-
// .optional(),
|
|
273
|
-
}).array()
|
|
274
|
-
});
|
|
275
|
-
var ReportComputeUsageEvent = z6.object({
|
|
276
|
-
durationMs: z6.number()
|
|
277
|
-
});
|
|
278
|
-
var ReportUsagePlan = z6.object({
|
|
279
|
-
type: z6.string(),
|
|
280
|
-
code: z6.string(),
|
|
281
|
-
isPaying: z6.boolean()
|
|
282
|
-
});
|
|
283
|
-
var ReportUsageResult = z6.object({
|
|
284
|
-
hasAccess: z6.boolean(),
|
|
285
|
-
balance: z6.number().optional(),
|
|
286
|
-
usage: z6.number().optional(),
|
|
287
|
-
overage: z6.number().optional(),
|
|
288
|
-
plan: ReportUsagePlan.optional(),
|
|
289
|
-
limitState: z6.literal("grace").optional(),
|
|
290
|
-
reason: z6.enum(["free_tier_exceeded", "billing_limit"]).optional()
|
|
291
|
-
});
|
|
292
|
-
var MAX_INVOCATION_COST_IN_CENTS = 1e4;
|
|
293
|
-
var ReportInvocationUsageEvent = z6.object({
|
|
294
|
-
organizationId: z6.string().min(1).max(128),
|
|
295
|
-
costInCents: z6.number().finite().min(0).max(MAX_INVOCATION_COST_IN_CENTS),
|
|
296
|
-
additionalData: z6.record(z6.string(), z6.any()).optional()
|
|
297
|
-
});
|
|
298
|
-
var ReportInvocationUsageResult = z6.discriminatedUnion("success", [
|
|
299
|
-
z6.object({
|
|
300
|
-
success: z6.literal(true)
|
|
301
|
-
}),
|
|
302
|
-
z6.object({
|
|
303
|
-
success: z6.literal(false),
|
|
304
|
-
error: z6.string()
|
|
305
|
-
})
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/v3/schemas/usage.ts
|
|
256
|
+
const UsageParams = z.object({
|
|
257
|
+
from: z.coerce.date(),
|
|
258
|
+
to: z.coerce.date()
|
|
259
|
+
});
|
|
260
|
+
const UsageResult = z.object({ cents: z.number() });
|
|
261
|
+
const Window = z.enum([
|
|
262
|
+
"MINUTE",
|
|
263
|
+
"HOUR",
|
|
264
|
+
"DAY"
|
|
306
265
|
]);
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
266
|
+
const UsageSeriesParams = z.object({
|
|
267
|
+
from: z.coerce.date(),
|
|
268
|
+
to: z.coerce.date(),
|
|
269
|
+
/** defaults to DAY */
|
|
270
|
+
window: Window.optional(),
|
|
271
|
+
timezone: z.string().optional()
|
|
272
|
+
});
|
|
273
|
+
const UsageSeriesResult = z.object({
|
|
274
|
+
from: z.string(),
|
|
275
|
+
to: z.string(),
|
|
276
|
+
window: Window.optional(),
|
|
277
|
+
data: z.object({
|
|
278
|
+
value: z.number(),
|
|
279
|
+
windowStart: z.string(),
|
|
280
|
+
windowEnd: z.string()
|
|
281
|
+
}).array()
|
|
282
|
+
});
|
|
283
|
+
const ReportComputeUsageEvent = z.object({ durationMs: z.number() });
|
|
284
|
+
const ReportUsagePlan = z.object({
|
|
285
|
+
type: z.string(),
|
|
286
|
+
code: z.string(),
|
|
287
|
+
isPaying: z.boolean()
|
|
288
|
+
});
|
|
289
|
+
const ReportUsageResult = z.object({
|
|
290
|
+
hasAccess: z.boolean(),
|
|
291
|
+
balance: z.number().optional(),
|
|
292
|
+
usage: z.number().optional(),
|
|
293
|
+
overage: z.number().optional(),
|
|
294
|
+
plan: ReportUsagePlan.optional(),
|
|
295
|
+
limitState: z.literal("grace").optional(),
|
|
296
|
+
reason: z.enum(["free_tier_exceeded", "billing_limit"]).optional()
|
|
297
|
+
});
|
|
298
|
+
/** Upper bound for a single invocation base charge ($100). */
|
|
299
|
+
const MAX_INVOCATION_COST_IN_CENTS = 1e4;
|
|
300
|
+
const ReportInvocationUsageEvent = z.object({
|
|
301
|
+
organizationId: z.string().min(1).max(128),
|
|
302
|
+
costInCents: z.number().finite().min(0).max(MAX_INVOCATION_COST_IN_CENTS),
|
|
303
|
+
additionalData: z.record(z.string(), z.any()).optional()
|
|
304
|
+
});
|
|
305
|
+
const ReportInvocationUsageResult = z.discriminatedUnion("success", [z.object({ success: z.literal(true) }), z.object({
|
|
306
|
+
success: z.literal(false),
|
|
307
|
+
error: z.string()
|
|
308
|
+
})]);
|
|
309
|
+
const BillingAlertsResult = z.object({
|
|
310
|
+
amount: z.number(),
|
|
311
|
+
emails: z.array(z.string()),
|
|
312
|
+
alertLevels: z.array(z.number())
|
|
313
|
+
});
|
|
314
|
+
const UpdateBillingAlertsRequest = z.object({
|
|
315
|
+
amount: z.number().positive(),
|
|
316
|
+
emails: z.array(z.string()),
|
|
317
|
+
alertLevels: z.array(z.number())
|
|
318
|
+
});
|
|
319
|
+
//#endregion
|
|
320
|
+
//#region src/v3/schemas/billingLimit.ts
|
|
321
|
+
const BillingLimitState = z.discriminatedUnion("status", [
|
|
322
|
+
z.object({ status: z.literal("ok") }),
|
|
323
|
+
z.object({
|
|
324
|
+
status: z.literal("grace"),
|
|
325
|
+
hitAt: z.string(),
|
|
326
|
+
graceEndsAt: z.string()
|
|
327
|
+
}),
|
|
328
|
+
z.object({
|
|
329
|
+
status: z.literal("rejected"),
|
|
330
|
+
hitAt: z.string(),
|
|
331
|
+
graceEndsAt: z.string()
|
|
332
|
+
})
|
|
338
333
|
]);
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
334
|
+
const billingLimitConfiguredFields = {
|
|
335
|
+
isConfigured: z.literal(true),
|
|
336
|
+
cancelInProgressRuns: z.boolean(),
|
|
337
|
+
limitState: BillingLimitState,
|
|
338
|
+
effectiveAmountCents: z.number().int().nonnegative().nullable(),
|
|
339
|
+
gracePeriodMs: z.number().int().nonnegative()
|
|
345
340
|
};
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
});
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
});
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
});
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
});
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
341
|
+
const BillingLimitUnconfigured = z.object({
|
|
342
|
+
isConfigured: z.literal(false),
|
|
343
|
+
gracePeriodMs: z.number().int().nonnegative()
|
|
344
|
+
});
|
|
345
|
+
const BillingLimitConfiguredNone = z.object({
|
|
346
|
+
...billingLimitConfiguredFields,
|
|
347
|
+
mode: z.literal("none")
|
|
348
|
+
});
|
|
349
|
+
const BillingLimitConfiguredPlan = z.object({
|
|
350
|
+
...billingLimitConfiguredFields,
|
|
351
|
+
mode: z.literal("plan")
|
|
352
|
+
});
|
|
353
|
+
const BillingLimitConfiguredCustom = z.object({
|
|
354
|
+
...billingLimitConfiguredFields,
|
|
355
|
+
mode: z.literal("custom"),
|
|
356
|
+
amountCents: z.number().int().positive()
|
|
357
|
+
});
|
|
358
|
+
const BillingLimitResult = z.union([
|
|
359
|
+
BillingLimitUnconfigured,
|
|
360
|
+
BillingLimitConfiguredNone,
|
|
361
|
+
BillingLimitConfiguredPlan,
|
|
362
|
+
BillingLimitConfiguredCustom
|
|
368
363
|
]);
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
364
|
+
const UpdateBillingLimitRequest = z.discriminatedUnion("mode", [
|
|
365
|
+
z.object({
|
|
366
|
+
mode: z.literal("none"),
|
|
367
|
+
cancelInProgressRuns: z.boolean()
|
|
368
|
+
}),
|
|
369
|
+
z.object({
|
|
370
|
+
mode: z.literal("plan"),
|
|
371
|
+
cancelInProgressRuns: z.boolean()
|
|
372
|
+
}),
|
|
373
|
+
z.object({
|
|
374
|
+
mode: z.literal("custom"),
|
|
375
|
+
amountCents: z.number().int().positive(),
|
|
376
|
+
cancelInProgressRuns: z.boolean()
|
|
377
|
+
})
|
|
383
378
|
]);
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
379
|
+
const ResolveBillingLimitRequest = z.discriminatedUnion("action", [z.object({
|
|
380
|
+
action: z.literal("increase"),
|
|
381
|
+
newAmountCents: z.number().int().positive(),
|
|
382
|
+
resumeMode: z.enum(["queue", "new_only"])
|
|
383
|
+
}), z.object({
|
|
384
|
+
action: z.literal("remove"),
|
|
385
|
+
resumeMode: z.enum(["queue", "new_only"])
|
|
386
|
+
})]);
|
|
387
|
+
const BillingLimitActiveOrg = z.object({
|
|
388
|
+
orgId: z.string(),
|
|
389
|
+
limitState: z.enum(["grace", "rejected"])
|
|
390
|
+
});
|
|
391
|
+
const BillingLimitsActiveResult = z.object({ orgs: z.array(BillingLimitActiveOrg) });
|
|
392
|
+
const BillingLimitPendingResolveOrg = z.object({
|
|
393
|
+
organizationId: z.string(),
|
|
394
|
+
resumeMode: z.enum(["queue", "new_only"]),
|
|
395
|
+
resolvedAt: z.string()
|
|
396
|
+
});
|
|
397
|
+
const BillingLimitsPendingResolvesResult = z.object({ orgs: z.array(BillingLimitPendingResolveOrg) });
|
|
398
|
+
//#endregion
|
|
399
|
+
//#region src/v3/schemas/registryCredentials.ts
|
|
400
|
+
const RegistryCredentialsResponseSchema = z.object({
|
|
401
|
+
username: z.string(),
|
|
402
|
+
password: z.string(),
|
|
403
|
+
expiresAt: z.string().datetime(),
|
|
404
|
+
repositoryUri: z.string()
|
|
405
|
+
});
|
|
406
|
+
//#endregion
|
|
407
|
+
//#region src/v3/schemas/enqueueBuild.ts
|
|
408
|
+
const EnqueueBuildOptionsSchema = z.object({
|
|
409
|
+
skipPromotion: z.boolean().optional(),
|
|
410
|
+
configFilePath: z.string().optional(),
|
|
411
|
+
fromBundle: z.boolean().optional()
|
|
412
|
+
});
|
|
413
|
+
const EnqueueBuildRequestSchema = z.union([z.object({
|
|
414
|
+
deploymentId: z.string(),
|
|
415
|
+
artifactKey: z.string(),
|
|
416
|
+
options: EnqueueBuildOptionsSchema
|
|
417
|
+
}), z.object({
|
|
418
|
+
deploymentId: z.string(),
|
|
419
|
+
github: z.object({
|
|
420
|
+
commitSha: z.string().regex(/^[0-9a-f]{40}$/, "commitSha must be a full lowercase git SHA"),
|
|
421
|
+
ref: z.string().min(1).max(255)
|
|
422
|
+
}),
|
|
423
|
+
options: EnqueueBuildOptionsSchema
|
|
424
|
+
})]);
|
|
425
|
+
const EnqueueBuildResponseSchema = z.object({ buildId: z.string() });
|
|
426
|
+
const EnqueueBuildErrorCodeSchema = z.enum([
|
|
427
|
+
"DEPLOYMENT_NOT_PENDING",
|
|
428
|
+
"NO_CONNECTED_REPOSITORY",
|
|
429
|
+
"ATOMIC_PRODUCTION_REQUIRES_VERCEL",
|
|
430
|
+
"COMMIT_NOT_FOUND",
|
|
431
|
+
"GITHUB_UNAVAILABLE"
|
|
394
432
|
]);
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
username: z9.string(),
|
|
415
|
-
password: z9.string(),
|
|
416
|
-
expiresAt: z9.string().datetime(),
|
|
417
|
-
repositoryUri: z9.string()
|
|
418
|
-
});
|
|
419
|
-
|
|
420
|
-
// src/v3/schemas/enqueueBuild.ts
|
|
421
|
-
import { z as z10 } from "zod";
|
|
422
|
-
var EnqueueBuildRequestSchema = z10.object({
|
|
423
|
-
deploymentId: z10.string(),
|
|
424
|
-
artifactKey: z10.string(),
|
|
425
|
-
options: z10.object({
|
|
426
|
-
skipPromotion: z10.boolean().optional(),
|
|
427
|
-
configFilePath: z10.string().optional()
|
|
428
|
-
})
|
|
429
|
-
});
|
|
430
|
-
var EnqueueBuildResponseSchema = z10.object({
|
|
431
|
-
buildId: z10.string()
|
|
432
|
-
});
|
|
433
|
-
|
|
434
|
-
// src/v3/schemas/initialDeployment.ts
|
|
435
|
-
import { z as z11 } from "zod";
|
|
436
|
-
var TriggerInitialDeploymentRequestSchema = z11.object({
|
|
437
|
-
environment: z11.enum(["prod", "staging", "preview"])
|
|
438
|
-
});
|
|
439
|
-
var TriggerInitialDeploymentResponseSchema = z11.object({
|
|
440
|
-
ok: z11.boolean()
|
|
441
|
-
});
|
|
442
|
-
|
|
443
|
-
// src/v3/schemas/privateLink.ts
|
|
444
|
-
import { z as z12 } from "zod";
|
|
445
|
-
var PrivateLinkConnectionStatus = z12.enum([
|
|
446
|
-
"PENDING",
|
|
447
|
-
"PROVISIONING",
|
|
448
|
-
"ACTIVE",
|
|
449
|
-
"ERROR",
|
|
450
|
-
"DELETING"
|
|
433
|
+
//#endregion
|
|
434
|
+
//#region src/v3/schemas/initialDeployment.ts
|
|
435
|
+
const TriggerInitialDeploymentRequestSchema = z.object({
|
|
436
|
+
environment: z.enum([
|
|
437
|
+
"prod",
|
|
438
|
+
"staging",
|
|
439
|
+
"preview"
|
|
440
|
+
]),
|
|
441
|
+
branch: z.string().min(1).max(255).optional()
|
|
442
|
+
});
|
|
443
|
+
const TriggerInitialDeploymentResponseSchema = z.object({ ok: z.boolean() });
|
|
444
|
+
//#endregion
|
|
445
|
+
//#region src/v3/schemas/privateLink.ts
|
|
446
|
+
const PrivateLinkConnectionStatus = z.enum([
|
|
447
|
+
"PENDING",
|
|
448
|
+
"PROVISIONING",
|
|
449
|
+
"ACTIVE",
|
|
450
|
+
"ERROR",
|
|
451
|
+
"DELETING"
|
|
451
452
|
]);
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
});
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
var ApplyPromoCodeBodySchema = z13.object({
|
|
504
|
-
code: z13.string(),
|
|
505
|
-
userId: z13.string()
|
|
506
|
-
});
|
|
507
|
-
var ApplyPromoCodeResult = z13.object({
|
|
508
|
-
applied: z13.boolean(),
|
|
509
|
-
amountInCents: z13.number().optional(),
|
|
510
|
-
expiresAt: z13.string().datetime().nullable().optional(),
|
|
511
|
-
// Present when applied is false, e.g. "already_redeemed" or "invalid".
|
|
512
|
-
reason: z13.string().optional()
|
|
513
|
-
});
|
|
514
|
-
var PromoCreditsResult = z13.object({
|
|
515
|
-
promoCredits: z13.object({
|
|
516
|
-
grantedCents: z13.number(),
|
|
517
|
-
remainingCents: z13.number(),
|
|
518
|
-
expiresAt: z13.string().datetime().nullable()
|
|
519
|
-
}).nullable()
|
|
520
|
-
});
|
|
521
|
-
|
|
522
|
-
// src/v3/client/index.ts
|
|
453
|
+
const PrivateLinkConnection = z.object({
|
|
454
|
+
id: z.string(),
|
|
455
|
+
friendlyId: z.string(),
|
|
456
|
+
name: z.string(),
|
|
457
|
+
organizationId: z.string(),
|
|
458
|
+
endpointServiceName: z.string(),
|
|
459
|
+
targetRegion: z.string(),
|
|
460
|
+
status: PrivateLinkConnectionStatus,
|
|
461
|
+
statusMessage: z.string().nullable(),
|
|
462
|
+
endpointDnsName: z.string().nullable(),
|
|
463
|
+
endpointIps: z.array(z.string()).nullable(),
|
|
464
|
+
provisionedAt: z.string().nullable(),
|
|
465
|
+
createdAt: z.string(),
|
|
466
|
+
updatedAt: z.string()
|
|
467
|
+
});
|
|
468
|
+
const PrivateLinkConnectionList = z.object({ connections: z.array(PrivateLinkConnection) });
|
|
469
|
+
const CreatePrivateLinkConnectionBody = z.object({
|
|
470
|
+
name: z.string().min(1).max(100).regex(/^[a-zA-Z][a-zA-Z0-9 _-]*$/, "Must start with a letter and contain only letters, numbers, spaces, hyphens, or underscores"),
|
|
471
|
+
endpointServiceName: z.string().regex(/^com\.amazonaws\.vpce\..+\.vpce-svc-.+$/, "Must be a valid VPC Endpoint Service name (com.amazonaws.vpce.<region>.vpce-svc-*)"),
|
|
472
|
+
targetRegion: z.string().regex(/^[a-z]{2}-[a-z]+-\d+$/, "Must be a valid AWS region")
|
|
473
|
+
});
|
|
474
|
+
const DeletePrivateLinkResult = z.object({ success: z.boolean() });
|
|
475
|
+
const PrivateLinkRegionsResult = z.object({
|
|
476
|
+
availableRegions: z.array(z.string()),
|
|
477
|
+
activeRegions: z.array(z.string())
|
|
478
|
+
});
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region src/v3/schemas/promoCodes.ts
|
|
481
|
+
const ValidatePromoCodeBodySchema = z.object({ code: z.string() });
|
|
482
|
+
const ValidatePromoCodeResult = z.object({
|
|
483
|
+
valid: z.boolean(),
|
|
484
|
+
amountInCents: z.number().optional(),
|
|
485
|
+
expiresAt: z.string().datetime().nullable().optional()
|
|
486
|
+
});
|
|
487
|
+
const ApplyPromoCodeBodySchema = z.object({
|
|
488
|
+
code: z.string(),
|
|
489
|
+
userId: z.string()
|
|
490
|
+
});
|
|
491
|
+
const ApplyPromoCodeResult = z.object({
|
|
492
|
+
applied: z.boolean(),
|
|
493
|
+
amountInCents: z.number().optional(),
|
|
494
|
+
expiresAt: z.string().datetime().nullable().optional(),
|
|
495
|
+
reason: z.string().optional()
|
|
496
|
+
});
|
|
497
|
+
const PromoCreditsResult = z.object({ promoCredits: z.object({
|
|
498
|
+
grantedCents: z.number(),
|
|
499
|
+
remainingCents: z.number(),
|
|
500
|
+
expiresAt: z.string().datetime().nullable()
|
|
501
|
+
}).nullable() });
|
|
502
|
+
//#endregion
|
|
503
|
+
//#region src/v3/client/index.ts
|
|
523
504
|
var BillingClient = class {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
);
|
|
710
|
-
}
|
|
711
|
-
async getPrivateLinkRegions(orgId) {
|
|
712
|
-
return await this.fetch(
|
|
713
|
-
`/api/v1/orgs/${orgId}/private-connections/regions`,
|
|
714
|
-
PrivateLinkRegionsResult
|
|
715
|
-
);
|
|
716
|
-
}
|
|
717
|
-
async triggerInitialDeployment(projectId, body) {
|
|
718
|
-
return await this.fetch(
|
|
719
|
-
`/api/v1/projects/${projectId}/initial-deployment`,
|
|
720
|
-
TriggerInitialDeploymentResponseSchema,
|
|
721
|
-
{
|
|
722
|
-
method: "POST",
|
|
723
|
-
headers: {
|
|
724
|
-
"Content-Type": "application/json"
|
|
725
|
-
},
|
|
726
|
-
body: JSON.stringify(body)
|
|
727
|
-
}
|
|
728
|
-
);
|
|
729
|
-
}
|
|
730
|
-
async fetch(path, schema, requestInit) {
|
|
731
|
-
const response = await fetch(`${this.config.url}${path}`, {
|
|
732
|
-
...requestInit,
|
|
733
|
-
headers: {
|
|
734
|
-
...requestInit == null ? void 0 : requestInit.headers,
|
|
735
|
-
Authorization: `Bearer ${this.config.apiKey}`
|
|
736
|
-
}
|
|
737
|
-
});
|
|
738
|
-
if (!response.ok) {
|
|
739
|
-
let parsedError;
|
|
740
|
-
try {
|
|
741
|
-
parsedError = ErrorSchema.parse(await response.json());
|
|
742
|
-
} catch {
|
|
743
|
-
parsedError = { error: `http_${response.status}` };
|
|
744
|
-
}
|
|
745
|
-
return {
|
|
746
|
-
success: false,
|
|
747
|
-
...parsedError
|
|
748
|
-
};
|
|
749
|
-
}
|
|
750
|
-
const json = await response.json();
|
|
751
|
-
const parsed = schema.parse(json);
|
|
752
|
-
return {
|
|
753
|
-
success: true,
|
|
754
|
-
...parsed
|
|
755
|
-
};
|
|
756
|
-
}
|
|
505
|
+
constructor(config) {
|
|
506
|
+
this.config = config;
|
|
507
|
+
}
|
|
508
|
+
async plans() {
|
|
509
|
+
return await this.fetch(`/api/v1/plans/v3`, PlansResult);
|
|
510
|
+
}
|
|
511
|
+
async currentPlan(orgId) {
|
|
512
|
+
return await this.fetch(`/api/v1/orgs/${orgId}`, CurrentPlan);
|
|
513
|
+
}
|
|
514
|
+
async usage(orgId, params) {
|
|
515
|
+
const search = objectToSearchParams(params);
|
|
516
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/usage?${search?.toString()}`, UsageResult);
|
|
517
|
+
}
|
|
518
|
+
async usageSeries(orgId, params) {
|
|
519
|
+
const search = objectToSearchParams(params);
|
|
520
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/usage/series?${search?.toString()}`, UsageSeriesResult);
|
|
521
|
+
}
|
|
522
|
+
async setPlan(orgId, body) {
|
|
523
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/v3/subscription`, SubscribeResultSchema, {
|
|
524
|
+
method: "POST",
|
|
525
|
+
headers: { "Content-Type": "application/json" },
|
|
526
|
+
body: JSON.stringify(body)
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
async cancelSubscription(orgId) {
|
|
530
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/v3/subscription/cancel`, CancelSubscriptionResponse, { method: "POST" });
|
|
531
|
+
}
|
|
532
|
+
async setAddOn(orgId, body) {
|
|
533
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/v3/subscription/addon`, SetAddOnResult, {
|
|
534
|
+
method: "POST",
|
|
535
|
+
headers: { "Content-Type": "application/json" },
|
|
536
|
+
body: JSON.stringify(body)
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
async validatePromoCode(code) {
|
|
540
|
+
return await this.fetch(`/api/v1/promo-codes/validate`, ValidatePromoCodeResult, {
|
|
541
|
+
method: "POST",
|
|
542
|
+
headers: { "Content-Type": "application/json" },
|
|
543
|
+
body: JSON.stringify({ code })
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
async applyPromoCode(orgId, body) {
|
|
547
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/promo/apply`, ApplyPromoCodeResult, {
|
|
548
|
+
method: "POST",
|
|
549
|
+
headers: { "Content-Type": "application/json" },
|
|
550
|
+
body: JSON.stringify(body)
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
async promoCredits(orgId) {
|
|
554
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/promo/credits`, PromoCreditsResult);
|
|
555
|
+
}
|
|
556
|
+
async createPortalSession(orgId, body) {
|
|
557
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/v3/subscription/portal`, CustomerPortalSchema, {
|
|
558
|
+
method: "POST",
|
|
559
|
+
headers: { "Content-Type": "application/json" },
|
|
560
|
+
body: JSON.stringify(body)
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
*
|
|
565
|
+
* @param event The data is in the body, not using a JWT
|
|
566
|
+
* @returns details about usage
|
|
567
|
+
*/
|
|
568
|
+
async reportInvocationUsage(event) {
|
|
569
|
+
return await this.fetch(`/api/v1/usage/ingest/invocation`, ReportInvocationUsageResult, {
|
|
570
|
+
method: "POST",
|
|
571
|
+
headers: { "Content-Type": "application/json" },
|
|
572
|
+
body: JSON.stringify(event)
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Generates registry credentials for a project. This is used to push images to a project's container repository.
|
|
577
|
+
*
|
|
578
|
+
* @param projectId The ID of the project
|
|
579
|
+
* @param region The region to generate credentials for
|
|
580
|
+
* @returns The registry credentials
|
|
581
|
+
*/
|
|
582
|
+
async generateRegistryCredentials(projectId, region) {
|
|
583
|
+
return await this.fetch(`/api/v1/projects/${projectId}/generate-registry-credentials`, RegistryCredentialsResponseSchema, {
|
|
584
|
+
method: "POST",
|
|
585
|
+
headers: { "Content-Type": "application/json" },
|
|
586
|
+
body: JSON.stringify({ region })
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Enqueues a build for a project deployment.
|
|
591
|
+
*
|
|
592
|
+
* @param projectId The ID of the project
|
|
593
|
+
* @param body The enqueue build request containing the deployment ID
|
|
594
|
+
* @returns The build ID
|
|
595
|
+
*/
|
|
596
|
+
async enqueueBuild(projectId, body) {
|
|
597
|
+
return await this.fetch(`/api/v1/projects/${projectId}/enqueue-build`, EnqueueBuildResponseSchema, {
|
|
598
|
+
method: "POST",
|
|
599
|
+
headers: { "Content-Type": "application/json" },
|
|
600
|
+
body: JSON.stringify(body)
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
*
|
|
605
|
+
* @param event The data is in the body, not using a JWT
|
|
606
|
+
* @returns details about usage
|
|
607
|
+
*/
|
|
608
|
+
async getEntitlement(orgId) {
|
|
609
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/usage/entitlement`, ReportUsageResult);
|
|
610
|
+
}
|
|
611
|
+
async getBillingAlerts(orgId) {
|
|
612
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/billing-alerts`, BillingAlertsResult);
|
|
613
|
+
}
|
|
614
|
+
async updateBillingAlerts(orgId, body) {
|
|
615
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/billing-alerts`, BillingAlertsResult, {
|
|
616
|
+
method: "POST",
|
|
617
|
+
headers: { "Content-Type": "application/json" },
|
|
618
|
+
body: JSON.stringify(body)
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
async getBillingLimit(orgId) {
|
|
622
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/billing-limit`, BillingLimitResult);
|
|
623
|
+
}
|
|
624
|
+
async updateBillingLimit(orgId, body) {
|
|
625
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/billing-limit`, BillingLimitResult, {
|
|
626
|
+
method: "PUT",
|
|
627
|
+
headers: { "Content-Type": "application/json" },
|
|
628
|
+
body: JSON.stringify(body)
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
async resolveBillingLimit(orgId, body) {
|
|
632
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/billing-limit/resolve`, BillingLimitResult, {
|
|
633
|
+
method: "POST",
|
|
634
|
+
headers: { "Content-Type": "application/json" },
|
|
635
|
+
body: JSON.stringify(body)
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
async getActiveBillingLimits() {
|
|
639
|
+
return await this.fetch(`/api/v1/billing-limits/active`, BillingLimitsActiveResult);
|
|
640
|
+
}
|
|
641
|
+
async getPrivateLinks(orgId) {
|
|
642
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/private-connections`, PrivateLinkConnectionList);
|
|
643
|
+
}
|
|
644
|
+
async createPrivateLink(orgId, body) {
|
|
645
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/private-connections`, PrivateLinkConnection, {
|
|
646
|
+
method: "POST",
|
|
647
|
+
headers: { "Content-Type": "application/json" },
|
|
648
|
+
body: JSON.stringify(body)
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
async deletePrivateLink(orgId, connectionId) {
|
|
652
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/private-connections/${connectionId}`, DeletePrivateLinkResult, { method: "DELETE" });
|
|
653
|
+
}
|
|
654
|
+
async getPrivateLinkRegions(orgId) {
|
|
655
|
+
return await this.fetch(`/api/v1/orgs/${orgId}/private-connections/regions`, PrivateLinkRegionsResult);
|
|
656
|
+
}
|
|
657
|
+
async triggerInitialDeployment(projectId, body) {
|
|
658
|
+
return await this.fetch(`/api/v1/projects/${projectId}/initial-deployment`, TriggerInitialDeploymentResponseSchema, {
|
|
659
|
+
method: "POST",
|
|
660
|
+
headers: { "Content-Type": "application/json" },
|
|
661
|
+
body: JSON.stringify(body)
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
async fetch(path, schema, requestInit) {
|
|
665
|
+
const response = await fetch(`${this.config.url}${path}`, {
|
|
666
|
+
...requestInit,
|
|
667
|
+
headers: {
|
|
668
|
+
...requestInit?.headers,
|
|
669
|
+
Authorization: `Bearer ${this.config.apiKey}`
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
if (!response.ok) {
|
|
673
|
+
let parsedError;
|
|
674
|
+
try {
|
|
675
|
+
parsedError = ErrorSchema.parse(await response.json());
|
|
676
|
+
} catch {
|
|
677
|
+
parsedError = { error: `http_${response.status}` };
|
|
678
|
+
}
|
|
679
|
+
return {
|
|
680
|
+
success: false,
|
|
681
|
+
...parsedError
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
const json = await response.json();
|
|
685
|
+
return {
|
|
686
|
+
success: true,
|
|
687
|
+
...schema.parse(json)
|
|
688
|
+
};
|
|
689
|
+
}
|
|
757
690
|
};
|
|
758
691
|
function objectToSearchParams(obj) {
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
}
|
|
776
|
-
});
|
|
777
|
-
return searchParams;
|
|
692
|
+
if (!obj) return void 0;
|
|
693
|
+
const searchParams = new URLSearchParams();
|
|
694
|
+
Object.entries(obj).forEach(([key, value]) => {
|
|
695
|
+
if (value === void 0) return;
|
|
696
|
+
if (Array.isArray(value)) {
|
|
697
|
+
const values = value.map((d) => {
|
|
698
|
+
if (d instanceof Date) return d.toISOString();
|
|
699
|
+
return d;
|
|
700
|
+
});
|
|
701
|
+
searchParams.append(key, values.join(","));
|
|
702
|
+
} else {
|
|
703
|
+
const v = value instanceof Date ? value.toISOString() : value;
|
|
704
|
+
searchParams.append(key, v.toString());
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
return searchParams;
|
|
778
708
|
}
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
function machineDefinition({
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
}
|
|
789
|
-
const centsPerSecond = cpu * centsPerVCpuSecond2 + memory * centsPerGbRamSecond2;
|
|
790
|
-
const centsPerMs = centsPerSecond / 1e3;
|
|
791
|
-
return {
|
|
792
|
-
code,
|
|
793
|
-
title,
|
|
794
|
-
cpu,
|
|
795
|
-
memory,
|
|
796
|
-
centsPerMs
|
|
797
|
-
};
|
|
709
|
+
//#endregion
|
|
710
|
+
//#region src/v3/machineDefinition.ts
|
|
711
|
+
function machineDefinition({ code, title, cpu, memory, centsPerVCpuSecond, centsPerGbRamSecond }) {
|
|
712
|
+
return {
|
|
713
|
+
code,
|
|
714
|
+
title,
|
|
715
|
+
cpu,
|
|
716
|
+
memory,
|
|
717
|
+
centsPerMs: (cpu * centsPerVCpuSecond + memory * centsPerGbRamSecond) / 1e3
|
|
718
|
+
};
|
|
798
719
|
}
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
};
|
|
861
|
-
var defaultMachine = "small-1x";
|
|
862
|
-
export {
|
|
863
|
-
AddOn,
|
|
864
|
-
AddOnDefinition,
|
|
865
|
-
AddOns,
|
|
866
|
-
ApplyPromoCodeBodySchema,
|
|
867
|
-
ApplyPromoCodeResult,
|
|
868
|
-
BillingAlertsResult,
|
|
869
|
-
BillingClient,
|
|
870
|
-
BillingLimitActiveOrg,
|
|
871
|
-
BillingLimitConfiguredCustom,
|
|
872
|
-
BillingLimitConfiguredNone,
|
|
873
|
-
BillingLimitConfiguredPlan,
|
|
874
|
-
BillingLimitPendingResolveOrg,
|
|
875
|
-
BillingLimitResult,
|
|
876
|
-
BillingLimitState,
|
|
877
|
-
BillingLimitUnconfigured,
|
|
878
|
-
BillingLimitsActiveResult,
|
|
879
|
-
BillingLimitsPendingResolvesResult,
|
|
880
|
-
CreatePrivateLinkConnectionBody,
|
|
881
|
-
CurrentPlan,
|
|
882
|
-
CustomerPortalRequestBodySchema,
|
|
883
|
-
CustomerPortalSchema,
|
|
884
|
-
DeletePrivateLinkResult,
|
|
885
|
-
EnqueueBuildRequestSchema,
|
|
886
|
-
EnqueueBuildResponseSchema,
|
|
887
|
-
ErrorSchema,
|
|
888
|
-
FreeConnectRequiredSchema,
|
|
889
|
-
FreeConnectedSchema,
|
|
890
|
-
MAX_INVOCATION_COST_IN_CENTS,
|
|
891
|
-
PlanDefinitionSchema,
|
|
892
|
-
Plans,
|
|
893
|
-
PlansResult,
|
|
894
|
-
PrivateLinkConnection,
|
|
895
|
-
PrivateLinkConnectionList,
|
|
896
|
-
PrivateLinkConnectionStatus,
|
|
897
|
-
PrivateLinkRegionsResult,
|
|
898
|
-
PromoCreditsResult,
|
|
899
|
-
RegistryCredentialsResponseSchema,
|
|
900
|
-
ReportComputeUsageEvent,
|
|
901
|
-
ReportInvocationUsageEvent,
|
|
902
|
-
ReportInvocationUsageResult,
|
|
903
|
-
ReportUsagePlan,
|
|
904
|
-
ReportUsageResult,
|
|
905
|
-
ResolveBillingLimitRequest,
|
|
906
|
-
SetAddOnBody,
|
|
907
|
-
SetAddOnResult,
|
|
908
|
-
SetPlanBodySchema,
|
|
909
|
-
SubscribeResultSchema,
|
|
910
|
-
SubscriptionResult,
|
|
911
|
-
TriggerInitialDeploymentRequestSchema,
|
|
912
|
-
TriggerInitialDeploymentResponseSchema,
|
|
913
|
-
UpdateBillingAlertsRequest,
|
|
914
|
-
UpdateBillingLimitRequest,
|
|
915
|
-
UsageParams,
|
|
916
|
-
UsageResult,
|
|
917
|
-
UsageSeriesParams,
|
|
918
|
-
UsageSeriesResult,
|
|
919
|
-
ValidatePromoCodeBodySchema,
|
|
920
|
-
ValidatePromoCodeResult,
|
|
921
|
-
defaultMachine,
|
|
922
|
-
machineDefinition,
|
|
923
|
-
machines,
|
|
924
|
-
objectToSearchParams
|
|
720
|
+
//#endregion
|
|
721
|
+
//#region src/v3/machinePresets.ts
|
|
722
|
+
const centsPerVCpuSecond = Number(process.env.CENTS_PER_VCPU_SECOND ?? 0);
|
|
723
|
+
const centsPerGbRamSecond = Number(process.env.CENTS_PER_GB_RAM_SECOND ?? 0);
|
|
724
|
+
const machines = {
|
|
725
|
+
micro: machineDefinition({
|
|
726
|
+
code: "micro",
|
|
727
|
+
title: "Micro",
|
|
728
|
+
cpu: .25,
|
|
729
|
+
memory: .25,
|
|
730
|
+
centsPerVCpuSecond,
|
|
731
|
+
centsPerGbRamSecond
|
|
732
|
+
}),
|
|
733
|
+
"small-1x": machineDefinition({
|
|
734
|
+
code: "small-1x",
|
|
735
|
+
title: "Small 1x",
|
|
736
|
+
cpu: .5,
|
|
737
|
+
memory: .5,
|
|
738
|
+
centsPerVCpuSecond,
|
|
739
|
+
centsPerGbRamSecond
|
|
740
|
+
}),
|
|
741
|
+
"small-2x": machineDefinition({
|
|
742
|
+
code: "small-2x",
|
|
743
|
+
title: "Small 2x",
|
|
744
|
+
cpu: 1,
|
|
745
|
+
memory: 1,
|
|
746
|
+
centsPerVCpuSecond,
|
|
747
|
+
centsPerGbRamSecond
|
|
748
|
+
}),
|
|
749
|
+
"medium-1x": machineDefinition({
|
|
750
|
+
code: "medium-1x",
|
|
751
|
+
title: "Medium 1x",
|
|
752
|
+
cpu: 1,
|
|
753
|
+
memory: 2,
|
|
754
|
+
centsPerVCpuSecond,
|
|
755
|
+
centsPerGbRamSecond
|
|
756
|
+
}),
|
|
757
|
+
"medium-2x": machineDefinition({
|
|
758
|
+
code: "medium-2x",
|
|
759
|
+
title: "Medium 2x",
|
|
760
|
+
cpu: 2,
|
|
761
|
+
memory: 4,
|
|
762
|
+
centsPerVCpuSecond,
|
|
763
|
+
centsPerGbRamSecond
|
|
764
|
+
}),
|
|
765
|
+
"large-1x": machineDefinition({
|
|
766
|
+
code: "large-1x",
|
|
767
|
+
title: "Large 1x",
|
|
768
|
+
cpu: 4,
|
|
769
|
+
memory: 8,
|
|
770
|
+
centsPerVCpuSecond,
|
|
771
|
+
centsPerGbRamSecond
|
|
772
|
+
}),
|
|
773
|
+
"large-2x": machineDefinition({
|
|
774
|
+
code: "large-2x",
|
|
775
|
+
title: "Large 2x",
|
|
776
|
+
cpu: 8,
|
|
777
|
+
memory: 16,
|
|
778
|
+
centsPerVCpuSecond,
|
|
779
|
+
centsPerGbRamSecond
|
|
780
|
+
})
|
|
925
781
|
};
|
|
782
|
+
const defaultMachine = "small-1x";
|
|
783
|
+
//#endregion
|
|
784
|
+
export { AddOn, AddOnDefinition, AddOns, ApplyPromoCodeBodySchema, ApplyPromoCodeResult, BillingAlertsResult, BillingClient, BillingLimitActiveOrg, BillingLimitConfiguredCustom, BillingLimitConfiguredNone, BillingLimitConfiguredPlan, BillingLimitPendingResolveOrg, BillingLimitResult, BillingLimitState, BillingLimitUnconfigured, BillingLimitsActiveResult, BillingLimitsPendingResolvesResult, CancelSubscriptionResponse, CreatePrivateLinkConnectionBody, CurrentPlan, CustomerPortalRequestBodySchema, CustomerPortalSchema, DeletePrivateLinkResult, EnqueueBuildErrorCodeSchema, EnqueueBuildRequestSchema, EnqueueBuildResponseSchema, ErrorSchema, FreeConnectRequiredSchema, FreeConnectedSchema, MAX_INVOCATION_COST_IN_CENTS, PlanDefinitionSchema, Plans, PlansResult, PrivateLinkConnection, PrivateLinkConnectionList, PrivateLinkConnectionStatus, PrivateLinkRegionsResult, PromoCreditsResult, RegistryCredentialsResponseSchema, ReportComputeUsageEvent, ReportInvocationUsageEvent, ReportInvocationUsageResult, ReportUsagePlan, ReportUsageResult, ResolveBillingLimitRequest, SetAddOnBody, SetAddOnResult, SetPlanBodySchema, SubscribeResultSchema, SubscriptionResult, TriggerInitialDeploymentRequestSchema, TriggerInitialDeploymentResponseSchema, UpdateBillingAlertsRequest, UpdateBillingLimitRequest, UsageParams, UsageResult, UsageSeriesParams, UsageSeriesResult, ValidatePromoCodeBodySchema, ValidatePromoCodeResult, defaultMachine, machineDefinition, machines, objectToSearchParams };
|
|
785
|
+
|
|
926
786
|
//# sourceMappingURL=index.js.map
|