@trigger.dev/platform 1.0.15 → 1.0.16

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.
@@ -5134,8 +5134,9 @@ declare const SubscriptionResult: z.ZodObject<{
5134
5134
  title: string;
5135
5135
  }>]>>;
5136
5136
  }, "strip", z.ZodTypeAny, {
5137
- isPaying: boolean;
5138
5137
  freeTierStatus: "requires_connect" | "approved" | "rejected";
5138
+ isPaying: boolean;
5139
+ canceledAt?: string | undefined;
5139
5140
  plan?: {
5140
5141
  code: string;
5141
5142
  type: "free";
@@ -5254,10 +5255,10 @@ declare const SubscriptionResult: z.ZodObject<{
5254
5255
  };
5255
5256
  title: string;
5256
5257
  } | undefined;
5257
- canceledAt?: string | undefined;
5258
5258
  }, {
5259
- isPaying: boolean;
5260
5259
  freeTierStatus: "requires_connect" | "approved" | "rejected";
5260
+ isPaying: boolean;
5261
+ canceledAt?: string | undefined;
5261
5262
  plan?: {
5262
5263
  code: string;
5263
5264
  type: "free";
@@ -5376,162 +5377,10 @@ declare const SubscriptionResult: z.ZodObject<{
5376
5377
  };
5377
5378
  title: string;
5378
5379
  } | undefined;
5379
- canceledAt?: string | undefined;
5380
5380
  }>;
5381
5381
  type SubscriptionResult = z.infer<typeof SubscriptionResult>;
5382
5382
  declare const CurrentPlan: z.ZodObject<{
5383
- subscription: z.ZodObject<{
5384
- isPaying: z.ZodBoolean;
5385
- plan: z.ZodObject<{
5386
- title: z.ZodString;
5387
- code: z.ZodString;
5388
- concurrentRuns: z.ZodObject<{
5389
- pricing: z.ZodOptional<z.ZodObject<{
5390
- code: z.ZodString;
5391
- upto: z.ZodOptional<z.ZodNumber>;
5392
- tierCost: z.ZodOptional<z.ZodNumber>;
5393
- }, "strip", z.ZodTypeAny, {
5394
- code: string;
5395
- upto?: number | undefined;
5396
- tierCost?: number | undefined;
5397
- }, {
5398
- code: string;
5399
- upto?: number | undefined;
5400
- tierCost?: number | undefined;
5401
- }>>;
5402
- freeAllowance: z.ZodOptional<z.ZodNumber>;
5403
- }, "strip", z.ZodTypeAny, {
5404
- pricing?: {
5405
- code: string;
5406
- upto?: number | undefined;
5407
- tierCost?: number | undefined;
5408
- } | undefined;
5409
- freeAllowance?: number | undefined;
5410
- }, {
5411
- pricing?: {
5412
- code: string;
5413
- upto?: number | undefined;
5414
- tierCost?: number | undefined;
5415
- } | undefined;
5416
- freeAllowance?: number | undefined;
5417
- }>;
5418
- runs: z.ZodOptional<z.ZodObject<{
5419
- pricing: z.ZodOptional<z.ZodObject<{
5420
- code: z.ZodString;
5421
- }, "strip", z.ZodTypeAny, {
5422
- code: string;
5423
- }, {
5424
- code: string;
5425
- }>>;
5426
- freeAllowance: z.ZodOptional<z.ZodNumber>;
5427
- }, "strip", z.ZodTypeAny, {
5428
- pricing?: {
5429
- code: string;
5430
- } | undefined;
5431
- freeAllowance?: number | undefined;
5432
- }, {
5433
- pricing?: {
5434
- code: string;
5435
- } | undefined;
5436
- freeAllowance?: number | undefined;
5437
- }>>;
5438
- }, "strip", z.ZodTypeAny, {
5439
- code: string;
5440
- concurrentRuns: {
5441
- pricing?: {
5442
- code: string;
5443
- upto?: number | undefined;
5444
- tierCost?: number | undefined;
5445
- } | undefined;
5446
- freeAllowance?: number | undefined;
5447
- };
5448
- title: string;
5449
- runs?: {
5450
- pricing?: {
5451
- code: string;
5452
- } | undefined;
5453
- freeAllowance?: number | undefined;
5454
- } | undefined;
5455
- }, {
5456
- code: string;
5457
- concurrentRuns: {
5458
- pricing?: {
5459
- code: string;
5460
- upto?: number | undefined;
5461
- tierCost?: number | undefined;
5462
- } | undefined;
5463
- freeAllowance?: number | undefined;
5464
- };
5465
- title: string;
5466
- runs?: {
5467
- pricing?: {
5468
- code: string;
5469
- } | undefined;
5470
- freeAllowance?: number | undefined;
5471
- } | undefined;
5472
- }>;
5473
- limits: z.ZodObject<{
5474
- runs: z.ZodOptional<z.ZodNumber>;
5475
- concurrentRuns: z.ZodOptional<z.ZodNumber>;
5476
- }, "strip", z.ZodTypeAny, {
5477
- concurrentRuns?: number | undefined;
5478
- runs?: number | undefined;
5479
- }, {
5480
- concurrentRuns?: number | undefined;
5481
- runs?: number | undefined;
5482
- }>;
5483
- canceledAt: z.ZodOptional<z.ZodString>;
5484
- }, "strip", z.ZodTypeAny, {
5485
- limits: {
5486
- concurrentRuns?: number | undefined;
5487
- runs?: number | undefined;
5488
- };
5489
- isPaying: boolean;
5490
- plan: {
5491
- code: string;
5492
- concurrentRuns: {
5493
- pricing?: {
5494
- code: string;
5495
- upto?: number | undefined;
5496
- tierCost?: number | undefined;
5497
- } | undefined;
5498
- freeAllowance?: number | undefined;
5499
- };
5500
- title: string;
5501
- runs?: {
5502
- pricing?: {
5503
- code: string;
5504
- } | undefined;
5505
- freeAllowance?: number | undefined;
5506
- } | undefined;
5507
- };
5508
- canceledAt?: string | undefined;
5509
- }, {
5510
- limits: {
5511
- concurrentRuns?: number | undefined;
5512
- runs?: number | undefined;
5513
- };
5514
- isPaying: boolean;
5515
- plan: {
5516
- code: string;
5517
- concurrentRuns: {
5518
- pricing?: {
5519
- code: string;
5520
- upto?: number | undefined;
5521
- tierCost?: number | undefined;
5522
- } | undefined;
5523
- freeAllowance?: number | undefined;
5524
- };
5525
- title: string;
5526
- runs?: {
5527
- pricing?: {
5528
- code: string;
5529
- } | undefined;
5530
- freeAllowance?: number | undefined;
5531
- } | undefined;
5532
- };
5533
- canceledAt?: string | undefined;
5534
- }>;
5383
+ subscription: z.ZodAny;
5535
5384
  v3Subscription: z.ZodObject<{
5536
5385
  freeTierStatus: z.ZodEnum<["requires_connect", "approved", "rejected"]>;
5537
5386
  isPaying: z.ZodBoolean;
@@ -6215,8 +6064,9 @@ declare const CurrentPlan: z.ZodObject<{
6215
6064
  title: string;
6216
6065
  }>]>>;
6217
6066
  }, "strip", z.ZodTypeAny, {
6218
- isPaying: boolean;
6219
6067
  freeTierStatus: "requires_connect" | "approved" | "rejected";
6068
+ isPaying: boolean;
6069
+ canceledAt?: string | undefined;
6220
6070
  plan?: {
6221
6071
  code: string;
6222
6072
  type: "free";
@@ -6335,10 +6185,10 @@ declare const CurrentPlan: z.ZodObject<{
6335
6185
  };
6336
6186
  title: string;
6337
6187
  } | undefined;
6338
- canceledAt?: string | undefined;
6339
6188
  }, {
6340
- isPaying: boolean;
6341
6189
  freeTierStatus: "requires_connect" | "approved" | "rejected";
6190
+ isPaying: boolean;
6191
+ canceledAt?: string | undefined;
6342
6192
  plan?: {
6343
6193
  code: string;
6344
6194
  type: "free";
@@ -6457,38 +6307,12 @@ declare const CurrentPlan: z.ZodObject<{
6457
6307
  };
6458
6308
  title: string;
6459
6309
  } | undefined;
6460
- canceledAt?: string | undefined;
6461
6310
  }>;
6462
6311
  }, "strip", z.ZodTypeAny, {
6463
- subscription: {
6464
- limits: {
6465
- concurrentRuns?: number | undefined;
6466
- runs?: number | undefined;
6467
- };
6468
- isPaying: boolean;
6469
- plan: {
6470
- code: string;
6471
- concurrentRuns: {
6472
- pricing?: {
6473
- code: string;
6474
- upto?: number | undefined;
6475
- tierCost?: number | undefined;
6476
- } | undefined;
6477
- freeAllowance?: number | undefined;
6478
- };
6479
- title: string;
6480
- runs?: {
6481
- pricing?: {
6482
- code: string;
6483
- } | undefined;
6484
- freeAllowance?: number | undefined;
6485
- } | undefined;
6486
- };
6487
- canceledAt?: string | undefined;
6488
- };
6489
6312
  v3Subscription: {
6490
- isPaying: boolean;
6491
6313
  freeTierStatus: "requires_connect" | "approved" | "rejected";
6314
+ isPaying: boolean;
6315
+ canceledAt?: string | undefined;
6492
6316
  plan?: {
6493
6317
  code: string;
6494
6318
  type: "free";
@@ -6607,38 +6431,13 @@ declare const CurrentPlan: z.ZodObject<{
6607
6431
  };
6608
6432
  title: string;
6609
6433
  } | undefined;
6610
- canceledAt?: string | undefined;
6611
6434
  };
6435
+ subscription?: any;
6612
6436
  }, {
6613
- subscription: {
6614
- limits: {
6615
- concurrentRuns?: number | undefined;
6616
- runs?: number | undefined;
6617
- };
6618
- isPaying: boolean;
6619
- plan: {
6620
- code: string;
6621
- concurrentRuns: {
6622
- pricing?: {
6623
- code: string;
6624
- upto?: number | undefined;
6625
- tierCost?: number | undefined;
6626
- } | undefined;
6627
- freeAllowance?: number | undefined;
6628
- };
6629
- title: string;
6630
- runs?: {
6631
- pricing?: {
6632
- code: string;
6633
- } | undefined;
6634
- freeAllowance?: number | undefined;
6635
- } | undefined;
6636
- };
6637
- canceledAt?: string | undefined;
6638
- };
6639
6437
  v3Subscription: {
6640
- isPaying: boolean;
6641
6438
  freeTierStatus: "requires_connect" | "approved" | "rejected";
6439
+ isPaying: boolean;
6440
+ canceledAt?: string | undefined;
6642
6441
  plan?: {
6643
6442
  code: string;
6644
6443
  type: "free";
@@ -6757,8 +6556,8 @@ declare const CurrentPlan: z.ZodObject<{
6757
6556
  };
6758
6557
  title: string;
6759
6558
  } | undefined;
6760
- canceledAt?: string | undefined;
6761
6559
  };
6560
+ subscription?: any;
6762
6561
  }>;
6763
6562
  type CurrentPlan = z.infer<typeof CurrentPlan>;
6764
6563
 
@@ -7084,6 +6883,35 @@ declare const ReportInvocationUsageResult: z.ZodDiscriminatedUnion<"success", [z
7084
6883
  success: false;
7085
6884
  }>]>;
7086
6885
 
6886
+ declare const BillingAlertsResult: z.ZodObject<{
6887
+ amount: z.ZodNumber;
6888
+ emails: z.ZodArray<z.ZodString, "many">;
6889
+ alertLevels: z.ZodArray<z.ZodNumber, "many">;
6890
+ }, "strip", z.ZodTypeAny, {
6891
+ amount: number;
6892
+ emails: string[];
6893
+ alertLevels: number[];
6894
+ }, {
6895
+ amount: number;
6896
+ emails: string[];
6897
+ alertLevels: number[];
6898
+ }>;
6899
+ type BillingAlertsResult = z.infer<typeof BillingAlertsResult>;
6900
+ declare const UpdateBillingAlertsRequest: z.ZodObject<{
6901
+ amount: z.ZodNumber;
6902
+ emails: z.ZodArray<z.ZodString, "many">;
6903
+ alertLevels: z.ZodArray<z.ZodNumber, "many">;
6904
+ }, "strip", z.ZodTypeAny, {
6905
+ amount: number;
6906
+ emails: string[];
6907
+ alertLevels: number[];
6908
+ }, {
6909
+ amount: number;
6910
+ emails: string[];
6911
+ alertLevels: number[];
6912
+ }>;
6913
+ type UpdateBillingAlertsRequest = z.infer<typeof UpdateBillingAlertsRequest>;
6914
+
7087
6915
  type BillingClientConfig = {
7088
6916
  url: string;
7089
6917
  apiKey: string;
@@ -7104,6 +6932,7 @@ type UsageResponse = Result<typeof UsageResult>;
7104
6932
  type UsageSeriesResponse = Result<typeof UsageSeriesResult>;
7105
6933
  type UsageInvocationReportResponse = Result<typeof ReportInvocationUsageResult>;
7106
6934
  type UsageEntitlementResponse = Result<typeof ReportUsageResult>;
6935
+ type BillingAlertsResponse = Result<typeof BillingAlertsResult>;
7107
6936
  declare class BillingClient {
7108
6937
  private readonly config;
7109
6938
  constructor(config: BillingClientConfig);
@@ -7125,6 +6954,8 @@ declare class BillingClient {
7125
6954
  * @returns details about usage
7126
6955
  */
7127
6956
  getEntitlement(orgId: string): Promise<UsageEntitlementResponse>;
6957
+ getBillingAlerts(orgId: string): Promise<BillingAlertsResponse>;
6958
+ updateBillingAlerts(orgId: string, body: UpdateBillingAlertsRequest): Promise<BillingAlertsResponse>;
7128
6959
  fetch<TSchema extends ZodType = z.ZodTypeAny>(path: string, schema: TSchema, requestInit?: RequestInit): Promise<Result<TSchema>>;
7129
6960
  }
7130
6961
  declare function objectToSearchParams(obj: undefined | Record<string, string | string[] | number | number[] | boolean | boolean[] | Date | Date[] | undefined>): URLSearchParams | undefined;
@@ -7193,4 +7024,4 @@ declare const machines: {
7193
7024
  type MachineCode = keyof typeof machines;
7194
7025
  declare const defaultMachine: MachineCode;
7195
7026
 
7196
- export { BillingClient, type CanceledSubscriptionResult, type CreateSubscriptionFlowStart, CurrentPlan, type CurrentPlanResponse, type CustomerPortal, type CustomerPortalRequestBody, CustomerPortalRequestBodySchema, type CustomerPortalResponse, CustomerPortalSchema, EnterprisePlanDefinition, type Error, ErrorSchema, ExceedableLimit, type FreeConnectRequired, FreeConnectRequiredSchema, type FreeConnected, FreeConnectedSchema, FreePlanDefinition, FreeTierStatus, Limits, type MachineCode, MachineDefinition, type MachineDefinitionInput, PaidPlanDefinition, type PlanDefinition, PlanDefinitionSchema, Plans, type PlansResponse, PlansResult, ReportComputeUsageEvent, ReportInvocationUsageEvent, ReportInvocationUsageResult, ReportUsageResult, type SetPlanBody, SetPlanBodySchema, type SetPlanResponse, type SubscribeResult, SubscribeResultSchema, SubscriptionResult, type UpdatedSubscriptionResult, type UsageEntitlementResponse, type UsageInvocationReportResponse, UsageParams, type UsageResponse, UsageResult, UsageSeriesParams, type UsageSeriesResponse, UsageSeriesResult, defaultMachine, machineDefinition, machines, objectToSearchParams };
7027
+ export { type BillingAlertsResponse, BillingAlertsResult, BillingClient, type CanceledSubscriptionResult, type CreateSubscriptionFlowStart, CurrentPlan, type CurrentPlanResponse, type CustomerPortal, type CustomerPortalRequestBody, CustomerPortalRequestBodySchema, type CustomerPortalResponse, CustomerPortalSchema, EnterprisePlanDefinition, type Error, ErrorSchema, ExceedableLimit, type FreeConnectRequired, FreeConnectRequiredSchema, type FreeConnected, FreeConnectedSchema, FreePlanDefinition, FreeTierStatus, Limits, type MachineCode, MachineDefinition, type MachineDefinitionInput, PaidPlanDefinition, type PlanDefinition, PlanDefinitionSchema, Plans, type PlansResponse, PlansResult, ReportComputeUsageEvent, ReportInvocationUsageEvent, ReportInvocationUsageResult, ReportUsageResult, type SetPlanBody, SetPlanBodySchema, type SetPlanResponse, type SubscribeResult, SubscribeResultSchema, SubscriptionResult, UpdateBillingAlertsRequest, type UpdatedSubscriptionResult, type UsageEntitlementResponse, type UsageInvocationReportResponse, UsageParams, type UsageResponse, UsageResult, UsageSeriesParams, type UsageSeriesResponse, UsageSeriesResult, defaultMachine, machineDefinition, machines, objectToSearchParams };