@toshicloud/sdk 0.5.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +39 -455
  2. package/dist/client.d.ts +76 -6
  3. package/dist/client.js +20 -4
  4. package/dist/gen/toshi/permission_pb.d.ts +12 -0
  5. package/dist/gen/toshi/permission_pb.js +14 -2
  6. package/dist/gen/toshi/workspace/v1/connections_pb.d.ts +358 -29
  7. package/dist/gen/toshi/workspace/v1/connections_pb.js +112 -24
  8. package/dist/gen/toshi/workspace/v1/domains_pb.d.ts +26 -26
  9. package/dist/gen/toshi/workspace/v1/domains_pb.js +4 -4
  10. package/dist/gen/toshi/workspace/v1/{channels_pb.d.ts → endpoints_pb.d.ts} +945 -822
  11. package/dist/gen/toshi/workspace/v1/endpoints_pb.js +488 -0
  12. package/dist/gen/toshi/workspace/v1/grants_pb.d.ts +10 -10
  13. package/dist/gen/toshi/workspace/v1/grants_pb.js +3 -3
  14. package/dist/gen/toshi/workspace/v1/hostjobs_pb.d.ts +62 -24
  15. package/dist/gen/toshi/workspace/v1/hostjobs_pb.js +1 -1
  16. package/dist/gen/toshi/workspace/v1/hosts_pb.d.ts +110 -36
  17. package/dist/gen/toshi/workspace/v1/hosts_pb.js +1 -1
  18. package/dist/gen/toshi/workspace/v1/model_credentials_pb.d.ts +654 -0
  19. package/dist/gen/toshi/workspace/v1/model_credentials_pb.js +110 -0
  20. package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +21 -2
  21. package/dist/gen/toshi/workspace/v1/recordings_pb.js +1 -1
  22. package/dist/gen/toshi/workspace/v1/roles_pb.d.ts +1 -1
  23. package/dist/gen/toshi/workspace/v1/roles_pb.js +1 -1
  24. package/dist/gen/toshi/workspace/v1/secrets_pb.d.ts +19 -2
  25. package/dist/gen/toshi/workspace/v1/secrets_pb.js +1 -1
  26. package/dist/gen/toshi/workspace/v1/triggers_pb.d.ts +28 -28
  27. package/dist/gen/toshi/workspace/v1/triggers_pb.js +6 -6
  28. package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +202 -202
  29. package/dist/gen/toshi/workspace/v1/webhook_pb.js +46 -46
  30. package/dist/gen/toshi/workspace/v1/workloads_pb.d.ts +579 -30
  31. package/dist/gen/toshi/workspace/v1/workloads_pb.js +85 -55
  32. package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +991 -123
  33. package/dist/gen/toshi/workspace/v1/workspace_pb.js +294 -102
  34. package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +390 -8
  35. package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +75 -50
  36. package/dist/index.d.ts +2 -1
  37. package/dist/index.js +2 -1
  38. package/dist/retry.js +38 -22
  39. package/dist/test/alarms.d.ts +29 -0
  40. package/dist/test/alarms.js +144 -0
  41. package/dist/test/fake.js +31 -0
  42. package/dist/test/index.d.ts +12 -2
  43. package/dist/test/index.js +12 -2
  44. package/dist/test/procedures.js +40 -34
  45. package/dist/version.d.ts +1 -1
  46. package/dist/version.js +1 -1
  47. package/package.json +1 -1
  48. package/dist/gen/toshi/workspace/v1/channels_pb.js +0 -483
@@ -432,6 +432,274 @@ export type GetWorkspaceStatementResponseJson = {
432
432
  export declare const GetWorkspaceStatementResponseSchema: GenMessage<GetWorkspaceStatementResponse, {
433
433
  jsonType: GetWorkspaceStatementResponseJson;
434
434
  }>;
435
+ /**
436
+ * @generated from message toshi.workspace.v1.GetWorkspaceUpcomingInvoiceRequest
437
+ */
438
+ export type GetWorkspaceUpcomingInvoiceRequest = Message<"toshi.workspace.v1.GetWorkspaceUpcomingInvoiceRequest"> & {};
439
+ /**
440
+ * @generated from message toshi.workspace.v1.GetWorkspaceUpcomingInvoiceRequest
441
+ */
442
+ export type GetWorkspaceUpcomingInvoiceRequestJson = {};
443
+ /**
444
+ * Describes the message toshi.workspace.v1.GetWorkspaceUpcomingInvoiceRequest.
445
+ * Use `create(GetWorkspaceUpcomingInvoiceRequestSchema)` to create a new message.
446
+ */
447
+ export declare const GetWorkspaceUpcomingInvoiceRequestSchema: GenMessage<GetWorkspaceUpcomingInvoiceRequest, {
448
+ jsonType: GetWorkspaceUpcomingInvoiceRequestJson;
449
+ }>;
450
+ /**
451
+ * @generated from message toshi.workspace.v1.GetWorkspaceUpcomingInvoiceResponse
452
+ */
453
+ export type GetWorkspaceUpcomingInvoiceResponse = Message<"toshi.workspace.v1.GetWorkspaceUpcomingInvoiceResponse"> & {
454
+ /**
455
+ * The billing provider's preview of the next invoice.
456
+ *
457
+ * @generated from field: toshi.workspace.v1.UpcomingInvoice invoice = 1;
458
+ */
459
+ invoice?: UpcomingInvoice | undefined;
460
+ /**
461
+ * The current UTC month's cost per project, highest cost so far first.
462
+ * The row with an empty project_id holds what no project accounts for.
463
+ *
464
+ * @generated from field: repeated toshi.workspace.v1.ProjectCost projects = 2;
465
+ */
466
+ projects: ProjectCost[];
467
+ /**
468
+ * The sums of the projects' month_so_far_cents and estimated_month_cents.
469
+ * month_so_far_cents equals the current month's statement estimated_cents.
470
+ *
471
+ * @generated from field: int64 month_so_far_cents = 3;
472
+ */
473
+ monthSoFarCents: bigint;
474
+ /**
475
+ * @generated from field: int64 estimated_month_cents = 4;
476
+ */
477
+ estimatedMonthCents: bigint;
478
+ /**
479
+ * The currency of the project costs, as the statement gives it; empty
480
+ * while no price is known.
481
+ *
482
+ * @generated from field: string currency = 5;
483
+ */
484
+ currency: string;
485
+ };
486
+ /**
487
+ * @generated from message toshi.workspace.v1.GetWorkspaceUpcomingInvoiceResponse
488
+ */
489
+ export type GetWorkspaceUpcomingInvoiceResponseJson = {
490
+ /**
491
+ * The billing provider's preview of the next invoice.
492
+ *
493
+ * @generated from field: toshi.workspace.v1.UpcomingInvoice invoice = 1;
494
+ */
495
+ invoice?: UpcomingInvoiceJson;
496
+ /**
497
+ * The current UTC month's cost per project, highest cost so far first.
498
+ * The row with an empty project_id holds what no project accounts for.
499
+ *
500
+ * @generated from field: repeated toshi.workspace.v1.ProjectCost projects = 2;
501
+ */
502
+ projects?: ProjectCostJson[];
503
+ /**
504
+ * The sums of the projects' month_so_far_cents and estimated_month_cents.
505
+ * month_so_far_cents equals the current month's statement estimated_cents.
506
+ *
507
+ * @generated from field: int64 month_so_far_cents = 3;
508
+ */
509
+ monthSoFarCents?: string;
510
+ /**
511
+ * @generated from field: int64 estimated_month_cents = 4;
512
+ */
513
+ estimatedMonthCents?: string;
514
+ /**
515
+ * The currency of the project costs, as the statement gives it; empty
516
+ * while no price is known.
517
+ *
518
+ * @generated from field: string currency = 5;
519
+ */
520
+ currency?: string;
521
+ };
522
+ /**
523
+ * Describes the message toshi.workspace.v1.GetWorkspaceUpcomingInvoiceResponse.
524
+ * Use `create(GetWorkspaceUpcomingInvoiceResponseSchema)` to create a new message.
525
+ */
526
+ export declare const GetWorkspaceUpcomingInvoiceResponseSchema: GenMessage<GetWorkspaceUpcomingInvoiceResponse, {
527
+ jsonType: GetWorkspaceUpcomingInvoiceResponseJson;
528
+ }>;
529
+ /**
530
+ * UpcomingInvoice is the billing provider's preview of a workspace's next
531
+ * invoice.
532
+ *
533
+ * @generated from message toshi.workspace.v1.UpcomingInvoice
534
+ */
535
+ export type UpcomingInvoice = Message<"toshi.workspace.v1.UpcomingInvoice"> & {
536
+ /**
537
+ * The amount due, in the currency's minor unit, after the customer
538
+ * balance (such as a starter credit) is applied.
539
+ *
540
+ * @generated from field: int64 amount_cents = 1;
541
+ */
542
+ amountCents: bigint;
543
+ /**
544
+ * The ISO currency code in lower case, such as "usd".
545
+ *
546
+ * @generated from field: string currency = 2;
547
+ */
548
+ currency: string;
549
+ /**
550
+ * The period the invoice covers.
551
+ *
552
+ * @generated from field: google.protobuf.Timestamp period_start = 3;
553
+ */
554
+ periodStart?: Timestamp | undefined;
555
+ /**
556
+ * @generated from field: google.protobuf.Timestamp period_end = 4;
557
+ */
558
+ periodEnd?: Timestamp | undefined;
559
+ /**
560
+ * When the usage behind this answer was read. Meter events reach the
561
+ * provider asynchronously, so the preview may not yet include usage
562
+ * read at this time.
563
+ *
564
+ * @generated from field: google.protobuf.Timestamp meters_read_at = 5;
565
+ */
566
+ metersReadAt?: Timestamp | undefined;
567
+ /**
568
+ * False when the workspace has no billing customer, or the provider has
569
+ * no upcoming invoice for it: the other fields are then empty.
570
+ *
571
+ * @generated from field: bool available = 6;
572
+ */
573
+ available: boolean;
574
+ };
575
+ /**
576
+ * UpcomingInvoice is the billing provider's preview of a workspace's next
577
+ * invoice.
578
+ *
579
+ * @generated from message toshi.workspace.v1.UpcomingInvoice
580
+ */
581
+ export type UpcomingInvoiceJson = {
582
+ /**
583
+ * The amount due, in the currency's minor unit, after the customer
584
+ * balance (such as a starter credit) is applied.
585
+ *
586
+ * @generated from field: int64 amount_cents = 1;
587
+ */
588
+ amountCents?: string;
589
+ /**
590
+ * The ISO currency code in lower case, such as "usd".
591
+ *
592
+ * @generated from field: string currency = 2;
593
+ */
594
+ currency?: string;
595
+ /**
596
+ * The period the invoice covers.
597
+ *
598
+ * @generated from field: google.protobuf.Timestamp period_start = 3;
599
+ */
600
+ periodStart?: TimestampJson;
601
+ /**
602
+ * @generated from field: google.protobuf.Timestamp period_end = 4;
603
+ */
604
+ periodEnd?: TimestampJson;
605
+ /**
606
+ * When the usage behind this answer was read. Meter events reach the
607
+ * provider asynchronously, so the preview may not yet include usage
608
+ * read at this time.
609
+ *
610
+ * @generated from field: google.protobuf.Timestamp meters_read_at = 5;
611
+ */
612
+ metersReadAt?: TimestampJson;
613
+ /**
614
+ * False when the workspace has no billing customer, or the provider has
615
+ * no upcoming invoice for it: the other fields are then empty.
616
+ *
617
+ * @generated from field: bool available = 6;
618
+ */
619
+ available?: boolean;
620
+ };
621
+ /**
622
+ * Describes the message toshi.workspace.v1.UpcomingInvoice.
623
+ * Use `create(UpcomingInvoiceSchema)` to create a new message.
624
+ */
625
+ export declare const UpcomingInvoiceSchema: GenMessage<UpcomingInvoice, {
626
+ jsonType: UpcomingInvoiceJson;
627
+ }>;
628
+ /**
629
+ * ProjectCost is one project's cost in the current UTC month.
630
+ *
631
+ * @generated from message toshi.workspace.v1.ProjectCost
632
+ */
633
+ export type ProjectCost = Message<"toshi.workspace.v1.ProjectCost"> & {
634
+ /**
635
+ * The project's id and name. An empty project_id is the cost no project
636
+ * accounts for: the own-host fee, storage, desktop seats, and minutes of
637
+ * jobs with no project, a deleted project, or that history retention
638
+ * already removed.
639
+ *
640
+ * @generated from field: string project_id = 1;
641
+ */
642
+ projectId: string;
643
+ /**
644
+ * @generated from field: string project_name = 2;
645
+ */
646
+ projectName: string;
647
+ /**
648
+ * The cost of the month so far, in the currency's minor unit.
649
+ *
650
+ * @generated from field: int64 month_so_far_cents = 3;
651
+ */
652
+ monthSoFarCents: bigint;
653
+ /**
654
+ * month_so_far_cents carried in a straight line to the month's end: so
655
+ * far times the month's length over the time elapsed. Desktop seats are
656
+ * a whole-month charge and are not carried forward.
657
+ *
658
+ * @generated from field: int64 estimated_month_cents = 4;
659
+ */
660
+ estimatedMonthCents: bigint;
661
+ };
662
+ /**
663
+ * ProjectCost is one project's cost in the current UTC month.
664
+ *
665
+ * @generated from message toshi.workspace.v1.ProjectCost
666
+ */
667
+ export type ProjectCostJson = {
668
+ /**
669
+ * The project's id and name. An empty project_id is the cost no project
670
+ * accounts for: the own-host fee, storage, desktop seats, and minutes of
671
+ * jobs with no project, a deleted project, or that history retention
672
+ * already removed.
673
+ *
674
+ * @generated from field: string project_id = 1;
675
+ */
676
+ projectId?: string;
677
+ /**
678
+ * @generated from field: string project_name = 2;
679
+ */
680
+ projectName?: string;
681
+ /**
682
+ * The cost of the month so far, in the currency's minor unit.
683
+ *
684
+ * @generated from field: int64 month_so_far_cents = 3;
685
+ */
686
+ monthSoFarCents?: string;
687
+ /**
688
+ * month_so_far_cents carried in a straight line to the month's end: so
689
+ * far times the month's length over the time elapsed. Desktop seats are
690
+ * a whole-month charge and are not carried forward.
691
+ *
692
+ * @generated from field: int64 estimated_month_cents = 4;
693
+ */
694
+ estimatedMonthCents?: string;
695
+ };
696
+ /**
697
+ * Describes the message toshi.workspace.v1.ProjectCost.
698
+ * Use `create(ProjectCostSchema)` to create a new message.
699
+ */
700
+ export declare const ProjectCostSchema: GenMessage<ProjectCost, {
701
+ jsonType: ProjectCostJson;
702
+ }>;
435
703
  /**
436
704
  * Seat is one assignment of a desktop seat to a person.
437
705
  *
@@ -1923,7 +2191,7 @@ export declare const WorkspaceSchema: GenMessage<Workspace, {
1923
2191
  /**
1924
2192
  * HostingCertificate is a workspace's wildcard certificate for its
1925
2193
  * services' provided names. Toshi orders it when the workspace first
1926
- * hosts a service with an http channel and renews it before it expires.
2194
+ * hosts a service with an http endpoint and renews it before it expires.
1927
2195
  *
1928
2196
  * @generated from message toshi.workspace.v1.HostingCertificate
1929
2197
  */
@@ -1968,7 +2236,7 @@ export type HostingCertificate = Message<"toshi.workspace.v1.HostingCertificate"
1968
2236
  /**
1969
2237
  * HostingCertificate is a workspace's wildcard certificate for its
1970
2238
  * services' provided names. Toshi orders it when the workspace first
1971
- * hosts a service with an http channel and renews it before it expires.
2239
+ * hosts a service with an http endpoint and renews it before it expires.
1972
2240
  *
1973
2241
  * @generated from message toshi.workspace.v1.HostingCertificate
1974
2242
  */
@@ -2796,6 +3064,13 @@ export type WorkspaceBilling_HeldJobs = Message<"toshi.workspace.v1.WorkspaceBil
2796
3064
  * @generated from field: google.protobuf.Timestamp since = 25;
2797
3065
  */
2798
3066
  since?: Timestamp | undefined;
3067
+ /**
3068
+ * For reason start_rate: the earliest time every start window of the
3069
+ * workspace has room again. Unset otherwise.
3070
+ *
3071
+ * @generated from field: google.protobuf.Timestamp next_start_at = 26;
3072
+ */
3073
+ nextStartAt?: Timestamp | undefined;
2799
3074
  };
2800
3075
  /**
2801
3076
  * HeldJobs counts the jobs held now for one reason.
@@ -2819,6 +3094,13 @@ export type WorkspaceBilling_HeldJobsJson = {
2819
3094
  * @generated from field: google.protobuf.Timestamp since = 25;
2820
3095
  */
2821
3096
  since?: TimestampJson;
3097
+ /**
3098
+ * For reason start_rate: the earliest time every start window of the
3099
+ * workspace has room again. Unset otherwise.
3100
+ *
3101
+ * @generated from field: google.protobuf.Timestamp next_start_at = 26;
3102
+ */
3103
+ nextStartAt?: TimestampJson;
2822
3104
  };
2823
3105
  /**
2824
3106
  * Describes the message toshi.workspace.v1.WorkspaceBilling.HeldJobs.
@@ -3163,6 +3445,13 @@ export type WorkspaceStatement = Message<"toshi.workspace.v1.WorkspaceStatement"
3163
3445
  * @generated from field: toshi.workspace.v1.DesktopSeats desktop_seats = 23;
3164
3446
  */
3165
3447
  desktopSeats?: DesktopSeats | undefined;
3448
+ /**
3449
+ * The month's paid starts; unset when there were none. Their cost is
3450
+ * included in estimated_cents.
3451
+ *
3452
+ * @generated from field: toshi.workspace.v1.PaidStarts paid_starts = 24;
3453
+ */
3454
+ paidStarts?: PaidStarts | undefined;
3166
3455
  };
3167
3456
  /**
3168
3457
  * @generated from message toshi.workspace.v1.WorkspaceStatement
@@ -3316,6 +3605,13 @@ export type WorkspaceStatementJson = {
3316
3605
  * @generated from field: toshi.workspace.v1.DesktopSeats desktop_seats = 23;
3317
3606
  */
3318
3607
  desktopSeats?: DesktopSeatsJson;
3608
+ /**
3609
+ * The month's paid starts; unset when there were none. Their cost is
3610
+ * included in estimated_cents.
3611
+ *
3612
+ * @generated from field: toshi.workspace.v1.PaidStarts paid_starts = 24;
3613
+ */
3614
+ paidStarts?: PaidStartsJson;
3319
3615
  };
3320
3616
  /**
3321
3617
  * Describes the message toshi.workspace.v1.WorkspaceStatement.
@@ -3415,6 +3711,55 @@ export type DesktopSeatsJson = {
3415
3711
  export declare const DesktopSeatsSchema: GenMessage<DesktopSeats, {
3416
3712
  jsonType: DesktopSeatsJson;
3417
3713
  }>;
3714
+ /**
3715
+ * PaidStarts is the month's paid starts: the starts past the plan's included
3716
+ * starts, within its ceiling, and what they cost.
3717
+ *
3718
+ * @generated from message toshi.workspace.v1.PaidStarts
3719
+ */
3720
+ export type PaidStarts = Message<"toshi.workspace.v1.PaidStarts"> & {
3721
+ /**
3722
+ * The starts billed for the month.
3723
+ *
3724
+ * @generated from field: int64 count = 1;
3725
+ */
3726
+ count: bigint;
3727
+ /**
3728
+ * count at the plan's price today, in the smallest unit of currency;
3729
+ * included in estimated_cents.
3730
+ *
3731
+ * @generated from field: int64 estimated_cents = 2;
3732
+ */
3733
+ estimatedCents: bigint;
3734
+ };
3735
+ /**
3736
+ * PaidStarts is the month's paid starts: the starts past the plan's included
3737
+ * starts, within its ceiling, and what they cost.
3738
+ *
3739
+ * @generated from message toshi.workspace.v1.PaidStarts
3740
+ */
3741
+ export type PaidStartsJson = {
3742
+ /**
3743
+ * The starts billed for the month.
3744
+ *
3745
+ * @generated from field: int64 count = 1;
3746
+ */
3747
+ count?: string;
3748
+ /**
3749
+ * count at the plan's price today, in the smallest unit of currency;
3750
+ * included in estimated_cents.
3751
+ *
3752
+ * @generated from field: int64 estimated_cents = 2;
3753
+ */
3754
+ estimatedCents?: string;
3755
+ };
3756
+ /**
3757
+ * Describes the message toshi.workspace.v1.PaidStarts.
3758
+ * Use `create(PaidStartsSchema)` to create a new message.
3759
+ */
3760
+ export declare const PaidStartsSchema: GenMessage<PaidStarts, {
3761
+ jsonType: PaidStartsJson;
3762
+ }>;
3418
3763
  /**
3419
3764
  * StatementSeat is one desktop seat on a statement.
3420
3765
  *
@@ -3782,8 +4127,8 @@ export declare const StorageSchema: GenMessage<Storage, {
3782
4127
  jsonType: StorageJson;
3783
4128
  }>;
3784
4129
  /**
3785
- * StoredKind is one kind of stored data in a month: image, volume_version,
3786
- * artifact or recording.
4130
+ * StoredKind is one kind of stored data in a month: images, volume_versions,
4131
+ * artifacts, recordings or held_disks.
3787
4132
  *
3788
4133
  * @generated from message toshi.workspace.v1.StoredKind
3789
4134
  */
@@ -3806,8 +4151,8 @@ export type StoredKind = Message<"toshi.workspace.v1.StoredKind"> & {
3806
4151
  gbHours: number;
3807
4152
  };
3808
4153
  /**
3809
- * StoredKind is one kind of stored data in a month: image, volume_version,
3810
- * artifact or recording.
4154
+ * StoredKind is one kind of stored data in a month: images, volume_versions,
4155
+ * artifacts, recordings or held_disks.
3811
4156
  *
3812
4157
  * @generated from message toshi.workspace.v1.StoredKind
3813
4158
  */
@@ -4054,16 +4399,26 @@ export type StatementCharge = Message<"toshi.workspace.v1.StatementCharge"> & {
4054
4399
  */
4055
4400
  size: string;
4056
4401
  /**
4402
+ * The metered minutes of a size billed by the minute; 0 on a line of
4403
+ * seconds.
4404
+ *
4057
4405
  * @generated from field: int64 minutes = 2;
4058
4406
  */
4059
4407
  minutes: bigint;
4060
4408
  /**
4061
4409
  * The minutes at their recorded prices, or today's for minutes with none,
4062
- * rounded up.
4410
+ * or the seconds at today's per-second price, rounded up.
4063
4411
  *
4064
4412
  * @generated from field: int64 estimated_cents = 3;
4065
4413
  */
4066
4414
  estimatedCents: bigint;
4415
+ /**
4416
+ * The billed running seconds of a size billed by the second, its
4417
+ * month's seconds summed and rounded up once; 0 on a line of minutes.
4418
+ *
4419
+ * @generated from field: int64 seconds = 4;
4420
+ */
4421
+ seconds: bigint;
4067
4422
  };
4068
4423
  /**
4069
4424
  * @generated from message toshi.workspace.v1.StatementCharge
@@ -4077,16 +4432,26 @@ export type StatementChargeJson = {
4077
4432
  */
4078
4433
  size?: string;
4079
4434
  /**
4435
+ * The metered minutes of a size billed by the minute; 0 on a line of
4436
+ * seconds.
4437
+ *
4080
4438
  * @generated from field: int64 minutes = 2;
4081
4439
  */
4082
4440
  minutes?: string;
4083
4441
  /**
4084
4442
  * The minutes at their recorded prices, or today's for minutes with none,
4085
- * rounded up.
4443
+ * or the seconds at today's per-second price, rounded up.
4086
4444
  *
4087
4445
  * @generated from field: int64 estimated_cents = 3;
4088
4446
  */
4089
4447
  estimatedCents?: string;
4448
+ /**
4449
+ * The billed running seconds of a size billed by the second, its
4450
+ * month's seconds summed and rounded up once; 0 on a line of minutes.
4451
+ *
4452
+ * @generated from field: int64 seconds = 4;
4453
+ */
4454
+ seconds?: string;
4090
4455
  };
4091
4456
  /**
4092
4457
  * Describes the message toshi.workspace.v1.StatementCharge.
@@ -5075,6 +5440,23 @@ export declare const WorkspaceService: GenService<{
5075
5440
  input: typeof GetWorkspaceStatementRequestSchema;
5076
5441
  output: typeof GetWorkspaceStatementResponseSchema;
5077
5442
  };
5443
+ /**
5444
+ * GetWorkspaceUpcomingInvoice returns the billing provider's preview of
5445
+ * the workspace's next invoice, and the current UTC month's cost so far
5446
+ * per project with a straight-line estimate to the month's end. The cost
5447
+ * comes from the same usage and prices as GetWorkspaceStatement, and the
5448
+ * projects' cost so far sums to its estimated_cents. Meter events reach
5449
+ * the provider asynchronously, so the preview can lag the usage; the
5450
+ * invoice is what is billed, and no estimate here changes it. A workspace
5451
+ * with no billing customer gets a preview with available false.
5452
+ *
5453
+ * @generated from rpc toshi.workspace.v1.WorkspaceService.GetWorkspaceUpcomingInvoice
5454
+ */
5455
+ getWorkspaceUpcomingInvoice: {
5456
+ methodKind: "unary";
5457
+ input: typeof GetWorkspaceUpcomingInvoiceRequestSchema;
5458
+ output: typeof GetWorkspaceUpcomingInvoiceResponseSchema;
5459
+ };
5078
5460
  /**
5079
5461
  * ListSeats returns the desktop seats the workspace held in one UTC
5080
5462
  * month, oldest assigned first: the seats live at some time in it,