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