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