@toshicloud/sdk 0.6.0 → 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 (44) hide show
  1. package/README.md +39 -510
  2. package/dist/client.d.ts +6 -4
  3. package/dist/client.js +4 -2
  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 +213 -19
  7. package/dist/gen/toshi/workspace/v1/connections_pb.js +97 -25
  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 +46 -22
  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 +552 -29
  31. package/dist/gen/toshi/workspace/v1/workloads_pb.js +85 -55
  32. package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +639 -119
  33. package/dist/gen/toshi/workspace/v1/workspace_pb.js +174 -88
  34. package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +101 -4
  35. package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +20 -15
  36. package/dist/index.d.ts +2 -1
  37. package/dist/index.js +2 -1
  38. package/dist/retry.js +33 -22
  39. package/dist/test/alarms.js +1 -1
  40. package/dist/test/procedures.js +35 -25
  41. package/dist/version.d.ts +1 -1
  42. package/dist/version.js +1 -1
  43. package/package.json +1 -1
  44. package/dist/gen/toshi/workspace/v1/channels_pb.js +0 -483
@@ -658,6 +658,492 @@ export type ListJobsResponseJson = {
658
658
  export declare const ListJobsResponseSchema: GenMessage<ListJobsResponse, {
659
659
  jsonType: ListJobsResponseJson;
660
660
  }>;
661
+ /**
662
+ * @generated from message toshi.workspace.v1.GetWorkloadUsageRequest
663
+ */
664
+ export type GetWorkloadUsageRequest = Message<"toshi.workspace.v1.GetWorkloadUsageRequest"> & {
665
+ /**
666
+ * @generated from field: string project = 1;
667
+ */
668
+ project: string;
669
+ /**
670
+ * @generated from field: string environment = 2;
671
+ */
672
+ environment: string;
673
+ /**
674
+ * Exactly one of job_id, sandbox_id and service_id names the workload.
675
+ *
676
+ * @generated from field: string job_id = 3;
677
+ */
678
+ jobId: string;
679
+ /**
680
+ * @generated from field: string sandbox_id = 4;
681
+ */
682
+ sandboxId: string;
683
+ /**
684
+ * @generated from field: string service_id = 5;
685
+ */
686
+ serviceId: string;
687
+ /**
688
+ * The UTC month as YYYY-MM; empty is the current UTC month.
689
+ *
690
+ * @generated from field: string month = 6;
691
+ */
692
+ month: string;
693
+ /**
694
+ * A grant the caller's workspace received, to act on the owner's sandbox
695
+ * through it (docs/grants.md); project and environment are then left
696
+ * empty, and sandbox_id names its workload.
697
+ *
698
+ * @generated from field: string grant = 7;
699
+ */
700
+ grant: string;
701
+ };
702
+ /**
703
+ * @generated from message toshi.workspace.v1.GetWorkloadUsageRequest
704
+ */
705
+ export type GetWorkloadUsageRequestJson = {
706
+ /**
707
+ * @generated from field: string project = 1;
708
+ */
709
+ project?: string;
710
+ /**
711
+ * @generated from field: string environment = 2;
712
+ */
713
+ environment?: string;
714
+ /**
715
+ * Exactly one of job_id, sandbox_id and service_id names the workload.
716
+ *
717
+ * @generated from field: string job_id = 3;
718
+ */
719
+ jobId?: string;
720
+ /**
721
+ * @generated from field: string sandbox_id = 4;
722
+ */
723
+ sandboxId?: string;
724
+ /**
725
+ * @generated from field: string service_id = 5;
726
+ */
727
+ serviceId?: string;
728
+ /**
729
+ * The UTC month as YYYY-MM; empty is the current UTC month.
730
+ *
731
+ * @generated from field: string month = 6;
732
+ */
733
+ month?: string;
734
+ /**
735
+ * A grant the caller's workspace received, to act on the owner's sandbox
736
+ * through it (docs/grants.md); project and environment are then left
737
+ * empty, and sandbox_id names its workload.
738
+ *
739
+ * @generated from field: string grant = 7;
740
+ */
741
+ grant?: string;
742
+ };
743
+ /**
744
+ * Describes the message toshi.workspace.v1.GetWorkloadUsageRequest.
745
+ * Use `create(GetWorkloadUsageRequestSchema)` to create a new message.
746
+ */
747
+ export declare const GetWorkloadUsageRequestSchema: GenMessage<GetWorkloadUsageRequest, {
748
+ jsonType: GetWorkloadUsageRequestJson;
749
+ }>;
750
+ /**
751
+ * @generated from message toshi.workspace.v1.GetWorkloadUsageResponse
752
+ */
753
+ export type GetWorkloadUsageResponse = Message<"toshi.workspace.v1.GetWorkloadUsageResponse"> & {
754
+ /**
755
+ * @generated from field: toshi.workspace.v1.WorkloadUsage usage = 1;
756
+ */
757
+ usage?: WorkloadUsage | undefined;
758
+ };
759
+ /**
760
+ * @generated from message toshi.workspace.v1.GetWorkloadUsageResponse
761
+ */
762
+ export type GetWorkloadUsageResponseJson = {
763
+ /**
764
+ * @generated from field: toshi.workspace.v1.WorkloadUsage usage = 1;
765
+ */
766
+ usage?: WorkloadUsageJson;
767
+ };
768
+ /**
769
+ * Describes the message toshi.workspace.v1.GetWorkloadUsageResponse.
770
+ * Use `create(GetWorkloadUsageResponseSchema)` to create a new message.
771
+ */
772
+ export declare const GetWorkloadUsageResponseSchema: GenMessage<GetWorkloadUsageResponse, {
773
+ jsonType: GetWorkloadUsageResponseJson;
774
+ }>;
775
+ /**
776
+ * WorkloadUsage is one workload's runtime, counters and, for a caller that
777
+ * holds billing.read, an estimate of its share of the month's bill.
778
+ *
779
+ * @generated from message toshi.workspace.v1.WorkloadUsage
780
+ */
781
+ export type WorkloadUsage = Message<"toshi.workspace.v1.WorkloadUsage"> & {
782
+ /**
783
+ * The job's, sandbox's or service's id.
784
+ *
785
+ * @generated from field: string workload_id = 1;
786
+ */
787
+ workloadId: string;
788
+ /**
789
+ * "job", "sandbox" or "service".
790
+ *
791
+ * @generated from field: string kind = 2;
792
+ */
793
+ kind: string;
794
+ /**
795
+ * The UTC month, as YYYY-MM.
796
+ *
797
+ * @generated from field: string month = 3;
798
+ */
799
+ month: string;
800
+ /**
801
+ * Whole seconds it ran in the month.
802
+ *
803
+ * @generated from field: int64 running_seconds_month = 4;
804
+ */
805
+ runningSecondsMonth: bigint;
806
+ /**
807
+ * Whole seconds it has run since its first start.
808
+ *
809
+ * @generated from field: int64 running_seconds_life = 5;
810
+ */
811
+ runningSecondsLife: bigint;
812
+ /**
813
+ * The CPU milliseconds its runs used, over its life.
814
+ *
815
+ * @generated from field: int64 cpu_millis = 6;
816
+ */
817
+ cpuMillis: bigint;
818
+ /**
819
+ * The executions it ran, over its life.
820
+ *
821
+ * @generated from field: int64 executions = 7;
822
+ */
823
+ executions: bigint;
824
+ /**
825
+ * The bytes it sent off its hosts, over its life.
826
+ *
827
+ * @generated from field: uint64 egress_bytes = 8;
828
+ */
829
+ egressBytes: bigint;
830
+ /**
831
+ * The bytes it sent to the exempt destinations, over its life.
832
+ *
833
+ * @generated from field: uint64 exempt_egress_bytes = 9;
834
+ */
835
+ exemptEgressBytes: bigint;
836
+ /**
837
+ * Always 0 today: paid starts are counted once start windows exist.
838
+ *
839
+ * @generated from field: int64 paid_starts = 10;
840
+ */
841
+ paidStarts: bigint;
842
+ /**
843
+ * When its runtime was read.
844
+ *
845
+ * @generated from field: google.protobuf.Timestamp running_read_at = 11;
846
+ */
847
+ runningReadAt?: Timestamp | undefined;
848
+ /**
849
+ * When its counters were read.
850
+ *
851
+ * @generated from field: google.protobuf.Timestamp counters_read_at = 12;
852
+ */
853
+ countersReadAt?: Timestamp | undefined;
854
+ /**
855
+ * When its egress was read. The three reads are separate, not one
856
+ * snapshot.
857
+ *
858
+ * @generated from field: google.protobuf.Timestamp egress_read_at = 13;
859
+ */
860
+ egressReadAt?: Timestamp | undefined;
861
+ /**
862
+ * An estimate of the workload's share of the month's bill. Set only for
863
+ * a caller that holds billing.read where the workload is; the invoice
864
+ * stays authoritative.
865
+ *
866
+ * @generated from field: toshi.workspace.v1.WorkloadCost cost = 14;
867
+ */
868
+ cost?: WorkloadCost | undefined;
869
+ };
870
+ /**
871
+ * WorkloadUsage is one workload's runtime, counters and, for a caller that
872
+ * holds billing.read, an estimate of its share of the month's bill.
873
+ *
874
+ * @generated from message toshi.workspace.v1.WorkloadUsage
875
+ */
876
+ export type WorkloadUsageJson = {
877
+ /**
878
+ * The job's, sandbox's or service's id.
879
+ *
880
+ * @generated from field: string workload_id = 1;
881
+ */
882
+ workloadId?: string;
883
+ /**
884
+ * "job", "sandbox" or "service".
885
+ *
886
+ * @generated from field: string kind = 2;
887
+ */
888
+ kind?: string;
889
+ /**
890
+ * The UTC month, as YYYY-MM.
891
+ *
892
+ * @generated from field: string month = 3;
893
+ */
894
+ month?: string;
895
+ /**
896
+ * Whole seconds it ran in the month.
897
+ *
898
+ * @generated from field: int64 running_seconds_month = 4;
899
+ */
900
+ runningSecondsMonth?: string;
901
+ /**
902
+ * Whole seconds it has run since its first start.
903
+ *
904
+ * @generated from field: int64 running_seconds_life = 5;
905
+ */
906
+ runningSecondsLife?: string;
907
+ /**
908
+ * The CPU milliseconds its runs used, over its life.
909
+ *
910
+ * @generated from field: int64 cpu_millis = 6;
911
+ */
912
+ cpuMillis?: string;
913
+ /**
914
+ * The executions it ran, over its life.
915
+ *
916
+ * @generated from field: int64 executions = 7;
917
+ */
918
+ executions?: string;
919
+ /**
920
+ * The bytes it sent off its hosts, over its life.
921
+ *
922
+ * @generated from field: uint64 egress_bytes = 8;
923
+ */
924
+ egressBytes?: string;
925
+ /**
926
+ * The bytes it sent to the exempt destinations, over its life.
927
+ *
928
+ * @generated from field: uint64 exempt_egress_bytes = 9;
929
+ */
930
+ exemptEgressBytes?: string;
931
+ /**
932
+ * Always 0 today: paid starts are counted once start windows exist.
933
+ *
934
+ * @generated from field: int64 paid_starts = 10;
935
+ */
936
+ paidStarts?: string;
937
+ /**
938
+ * When its runtime was read.
939
+ *
940
+ * @generated from field: google.protobuf.Timestamp running_read_at = 11;
941
+ */
942
+ runningReadAt?: TimestampJson;
943
+ /**
944
+ * When its counters were read.
945
+ *
946
+ * @generated from field: google.protobuf.Timestamp counters_read_at = 12;
947
+ */
948
+ countersReadAt?: TimestampJson;
949
+ /**
950
+ * When its egress was read. The three reads are separate, not one
951
+ * snapshot.
952
+ *
953
+ * @generated from field: google.protobuf.Timestamp egress_read_at = 13;
954
+ */
955
+ egressReadAt?: TimestampJson;
956
+ /**
957
+ * An estimate of the workload's share of the month's bill. Set only for
958
+ * a caller that holds billing.read where the workload is; the invoice
959
+ * stays authoritative.
960
+ *
961
+ * @generated from field: toshi.workspace.v1.WorkloadCost cost = 14;
962
+ */
963
+ cost?: WorkloadCostJson;
964
+ };
965
+ /**
966
+ * Describes the message toshi.workspace.v1.WorkloadUsage.
967
+ * Use `create(WorkloadUsageSchema)` to create a new message.
968
+ */
969
+ export declare const WorkloadUsageSchema: GenMessage<WorkloadUsage, {
970
+ jsonType: WorkloadUsageJson;
971
+ }>;
972
+ /**
973
+ * WorkloadCost is an estimate of one workload's share of its invoice. The
974
+ * invoice the provider bills stays authoritative.
975
+ *
976
+ * @generated from message toshi.workspace.v1.WorkloadCost
977
+ */
978
+ export type WorkloadCost = Message<"toshi.workspace.v1.WorkloadCost"> & {
979
+ /**
980
+ * The cost of the runs that have finished in the month, in cents.
981
+ *
982
+ * @generated from field: int64 current_cents = 1;
983
+ */
984
+ currentCents: bigint;
985
+ /**
986
+ * current_cents with the open run, if any, priced as if it ended at the
987
+ * read time.
988
+ *
989
+ * @generated from field: int64 estimated_cents = 2;
990
+ */
991
+ estimatedCents: bigint;
992
+ /**
993
+ * @generated from field: string currency = 3;
994
+ */
995
+ currency: string;
996
+ /**
997
+ * Always true today: a per-workload share is an estimate, not an invoice.
998
+ *
999
+ * @generated from field: bool estimate = 4;
1000
+ */
1001
+ estimate: boolean;
1002
+ };
1003
+ /**
1004
+ * WorkloadCost is an estimate of one workload's share of its invoice. The
1005
+ * invoice the provider bills stays authoritative.
1006
+ *
1007
+ * @generated from message toshi.workspace.v1.WorkloadCost
1008
+ */
1009
+ export type WorkloadCostJson = {
1010
+ /**
1011
+ * The cost of the runs that have finished in the month, in cents.
1012
+ *
1013
+ * @generated from field: int64 current_cents = 1;
1014
+ */
1015
+ currentCents?: string;
1016
+ /**
1017
+ * current_cents with the open run, if any, priced as if it ended at the
1018
+ * read time.
1019
+ *
1020
+ * @generated from field: int64 estimated_cents = 2;
1021
+ */
1022
+ estimatedCents?: string;
1023
+ /**
1024
+ * @generated from field: string currency = 3;
1025
+ */
1026
+ currency?: string;
1027
+ /**
1028
+ * Always true today: a per-workload share is an estimate, not an invoice.
1029
+ *
1030
+ * @generated from field: bool estimate = 4;
1031
+ */
1032
+ estimate?: boolean;
1033
+ };
1034
+ /**
1035
+ * Describes the message toshi.workspace.v1.WorkloadCost.
1036
+ * Use `create(WorkloadCostSchema)` to create a new message.
1037
+ */
1038
+ export declare const WorkloadCostSchema: GenMessage<WorkloadCost, {
1039
+ jsonType: WorkloadCostJson;
1040
+ }>;
1041
+ /**
1042
+ * @generated from message toshi.workspace.v1.ListWorkloadUsagesRequest
1043
+ */
1044
+ export type ListWorkloadUsagesRequest = Message<"toshi.workspace.v1.ListWorkloadUsagesRequest"> & {
1045
+ /**
1046
+ * @generated from field: string project = 1;
1047
+ */
1048
+ project: string;
1049
+ /**
1050
+ * @generated from field: string environment = 2;
1051
+ */
1052
+ environment: string;
1053
+ /**
1054
+ * The UTC month as YYYY-MM; empty is the current UTC month.
1055
+ *
1056
+ * @generated from field: string month = 3;
1057
+ */
1058
+ month: string;
1059
+ /**
1060
+ * The most workloads in one page; zero lets the server choose.
1061
+ *
1062
+ * @generated from field: int32 page_size = 4;
1063
+ */
1064
+ pageSize: number;
1065
+ /**
1066
+ * From an earlier response's next_page_token; empty for the first page.
1067
+ *
1068
+ * @generated from field: string page_token = 5;
1069
+ */
1070
+ pageToken: string;
1071
+ };
1072
+ /**
1073
+ * @generated from message toshi.workspace.v1.ListWorkloadUsagesRequest
1074
+ */
1075
+ export type ListWorkloadUsagesRequestJson = {
1076
+ /**
1077
+ * @generated from field: string project = 1;
1078
+ */
1079
+ project?: string;
1080
+ /**
1081
+ * @generated from field: string environment = 2;
1082
+ */
1083
+ environment?: string;
1084
+ /**
1085
+ * The UTC month as YYYY-MM; empty is the current UTC month.
1086
+ *
1087
+ * @generated from field: string month = 3;
1088
+ */
1089
+ month?: string;
1090
+ /**
1091
+ * The most workloads in one page; zero lets the server choose.
1092
+ *
1093
+ * @generated from field: int32 page_size = 4;
1094
+ */
1095
+ pageSize?: number;
1096
+ /**
1097
+ * From an earlier response's next_page_token; empty for the first page.
1098
+ *
1099
+ * @generated from field: string page_token = 5;
1100
+ */
1101
+ pageToken?: string;
1102
+ };
1103
+ /**
1104
+ * Describes the message toshi.workspace.v1.ListWorkloadUsagesRequest.
1105
+ * Use `create(ListWorkloadUsagesRequestSchema)` to create a new message.
1106
+ */
1107
+ export declare const ListWorkloadUsagesRequestSchema: GenMessage<ListWorkloadUsagesRequest, {
1108
+ jsonType: ListWorkloadUsagesRequestJson;
1109
+ }>;
1110
+ /**
1111
+ * @generated from message toshi.workspace.v1.ListWorkloadUsagesResponse
1112
+ */
1113
+ export type ListWorkloadUsagesResponse = Message<"toshi.workspace.v1.ListWorkloadUsagesResponse"> & {
1114
+ /**
1115
+ * @generated from field: repeated toshi.workspace.v1.WorkloadUsage usages = 1;
1116
+ */
1117
+ usages: WorkloadUsage[];
1118
+ /**
1119
+ * Empty on the last page.
1120
+ *
1121
+ * @generated from field: string next_page_token = 2;
1122
+ */
1123
+ nextPageToken: string;
1124
+ };
1125
+ /**
1126
+ * @generated from message toshi.workspace.v1.ListWorkloadUsagesResponse
1127
+ */
1128
+ export type ListWorkloadUsagesResponseJson = {
1129
+ /**
1130
+ * @generated from field: repeated toshi.workspace.v1.WorkloadUsage usages = 1;
1131
+ */
1132
+ usages?: WorkloadUsageJson[];
1133
+ /**
1134
+ * Empty on the last page.
1135
+ *
1136
+ * @generated from field: string next_page_token = 2;
1137
+ */
1138
+ nextPageToken?: string;
1139
+ };
1140
+ /**
1141
+ * Describes the message toshi.workspace.v1.ListWorkloadUsagesResponse.
1142
+ * Use `create(ListWorkloadUsagesResponseSchema)` to create a new message.
1143
+ */
1144
+ export declare const ListWorkloadUsagesResponseSchema: GenMessage<ListWorkloadUsagesResponse, {
1145
+ jsonType: ListWorkloadUsagesResponseJson;
1146
+ }>;
661
1147
  /**
662
1148
  * @generated from message toshi.workspace.v1.UpdateJobRequest
663
1149
  */
@@ -2680,7 +3166,7 @@ export declare const WatchServicesResponseSchema: GenMessage<WatchServicesRespon
2680
3166
  }>;
2681
3167
  /**
2682
3168
  * ServiceAlarm is one of a service's alarms: a schedule, the event it
2683
- * publishes on one of the service's event channels, and the instant it
3169
+ * publishes on one of the service's event endpoints, and the instant it
2684
3170
  * next publishes.
2685
3171
  *
2686
3172
  * @generated from message toshi.workspace.v1.ServiceAlarm
@@ -2731,11 +3217,11 @@ export type ServiceAlarm = Message<"toshi.workspace.v1.ServiceAlarm"> & {
2731
3217
  */
2732
3218
  timezone: string;
2733
3219
  /**
2734
- * The name of the service's event channel it publishes on.
3220
+ * The name of the service's event endpoint it publishes on.
2735
3221
  *
2736
- * @generated from field: string channel = 6;
3222
+ * @generated from field: string endpoint = 6;
2737
3223
  */
2738
- channel: string;
3224
+ endpoint: string;
2739
3225
  /**
2740
3226
  * The event name it publishes.
2741
3227
  *
@@ -2787,7 +3273,7 @@ export type ServiceAlarm = Message<"toshi.workspace.v1.ServiceAlarm"> & {
2787
3273
  };
2788
3274
  /**
2789
3275
  * ServiceAlarm is one of a service's alarms: a schedule, the event it
2790
- * publishes on one of the service's event channels, and the instant it
3276
+ * publishes on one of the service's event endpoints, and the instant it
2791
3277
  * next publishes.
2792
3278
  *
2793
3279
  * @generated from message toshi.workspace.v1.ServiceAlarm
@@ -2825,11 +3311,11 @@ export type ServiceAlarmJson = {
2825
3311
  */
2826
3312
  timezone?: string;
2827
3313
  /**
2828
- * The name of the service's event channel it publishes on.
3314
+ * The name of the service's event endpoint it publishes on.
2829
3315
  *
2830
- * @generated from field: string channel = 6;
3316
+ * @generated from field: string endpoint = 6;
2831
3317
  */
2832
- channel?: string;
3318
+ endpoint?: string;
2833
3319
  /**
2834
3320
  * The event name it publishes.
2835
3321
  *
@@ -3069,11 +3555,11 @@ export type SetServiceAlarmRequest = Message<"toshi.workspace.v1.SetServiceAlarm
3069
3555
  */
3070
3556
  timezone: string;
3071
3557
  /**
3072
- * The name of the service's event channel to publish on.
3558
+ * The name of the service's event endpoint to publish on.
3073
3559
  *
3074
- * @generated from field: string channel = 8;
3560
+ * @generated from field: string endpoint = 8;
3075
3561
  */
3076
- channel: string;
3562
+ endpoint: string;
3077
3563
  /**
3078
3564
  * The event name to publish.
3079
3565
  *
@@ -3149,11 +3635,11 @@ export type SetServiceAlarmRequestJson = {
3149
3635
  */
3150
3636
  timezone?: string;
3151
3637
  /**
3152
- * The name of the service's event channel to publish on.
3638
+ * The name of the service's event endpoint to publish on.
3153
3639
  *
3154
- * @generated from field: string channel = 8;
3640
+ * @generated from field: string endpoint = 8;
3155
3641
  */
3156
- channel?: string;
3642
+ endpoint?: string;
3157
3643
  /**
3158
3644
  * The event name to publish.
3159
3645
  *
@@ -3942,6 +4428,43 @@ export declare const WorkloadService: GenService<{
3942
4428
  input: typeof ListJobsRequestSchema;
3943
4429
  output: typeof ListJobsResponseSchema;
3944
4430
  };
4431
+ /**
4432
+ * GetWorkloadUsage returns one job's, sandbox's or service's runtime and
4433
+ * counters for a UTC month. The request names exactly one of job_id,
4434
+ * sandbox_id and service_id; naming none or more than one fails with
4435
+ * INVALID_ARGUMENT, and so does a month that is not YYYY-MM. An empty month
4436
+ * is the current UTC month. An unknown workload, or one of another kind
4437
+ * than the field naming it, fails with NOT_FOUND.
4438
+ *
4439
+ * The counts need workloads.read. cost is set only for a caller that also
4440
+ * holds billing.read where the workload is; it is an estimate, and the
4441
+ * invoice stays authoritative.
4442
+ *
4443
+ * @generated from rpc toshi.workspace.v1.WorkloadService.GetWorkloadUsage
4444
+ */
4445
+ getWorkloadUsage: {
4446
+ methodKind: "unary";
4447
+ input: typeof GetWorkloadUsageRequestSchema;
4448
+ output: typeof GetWorkloadUsageResponseSchema;
4449
+ };
4450
+ /**
4451
+ * ListWorkloadUsages returns the jobs, sandboxes and services of the
4452
+ * project and environment that ran any part of a UTC month, a page at a
4453
+ * time. month is the UTC month as YYYY-MM, and an empty month is the
4454
+ * current one. A page holds 50 workloads when page_size is zero, and 500
4455
+ * at most.
4456
+ *
4457
+ * The runtime and counters need workloads.read. cost is set only for a
4458
+ * caller that also holds billing.read where the workload is; it is an
4459
+ * estimate, and the invoice stays authoritative.
4460
+ *
4461
+ * @generated from rpc toshi.workspace.v1.WorkloadService.ListWorkloadUsages
4462
+ */
4463
+ listWorkloadUsages: {
4464
+ methodKind: "unary";
4465
+ input: typeof ListWorkloadUsagesRequestSchema;
4466
+ output: typeof ListWorkloadUsagesResponseSchema;
4467
+ };
3945
4468
  /**
3946
4469
  * UpdateJob changes the fields the mask names and returns the job. Only
3947
4470
  * "labels" can be changed; another path fails with INVALID_ARGUMENT.
@@ -4269,15 +4792,15 @@ export declare const WorkloadService: GenService<{
4269
4792
  };
4270
4793
  /**
4271
4794
  * CreatePreviewShareLink mints a share link for one of a running
4272
- * sandbox's previews: the channel `preview`, served at the sandbox's own
4273
- * hostname, unless the request names another of its http channels. The
4795
+ * sandbox's previews: the endpoint `preview`, served at the sandbox's own
4796
+ * hostname, unless the request names another of its http endpoints. The
4274
4797
  * link is a signed link that admits one device, the first to open it,
4275
4798
  * until it expires, carries its byte cap or is revoked, and only at that
4276
- * channel's hostname. The link is in this answer only. The sandbox must
4799
+ * endpoint's hostname. The link is in this answer only. The sandbox must
4277
4800
  * be running with that preview open, or the call fails with
4278
4801
  * FAILED_PRECONDITION, as it does when the workspace's plan turns share
4279
- * links off. A channel or port the sandbox has no http channel for fails
4280
- * with NOT_FOUND; a channel that is not http, a port outside 1 to 65535,
4802
+ * links off. An endpoint or port the sandbox has no http endpoint for fails
4803
+ * with NOT_FOUND; an endpoint that is not http, a port outside 1 to 65535,
4281
4804
  * or an expiry or a byte cap above the plan's, with INVALID_ARGUMENT.
4282
4805
  *
4283
4806
  * @generated from rpc toshi.workspace.v1.WorkloadService.CreatePreviewShareLink
@@ -4314,14 +4837,14 @@ export declare const WorkloadService: GenService<{
4314
4837
  };
4315
4838
  /**
4316
4839
  * CreateServiceShareLink mints a share link for one of a service's
4317
- * provided names: its front channel's, unless the request names another
4318
- * of its http channels. The link admits one device, the first to open
4840
+ * provided names: its front endpoint's, unless the request names another
4841
+ * of its http endpoints. The link admits one device, the first to open
4319
4842
  * it, until it expires, carries its byte cap or is revoked, on whichever
4320
4843
  * run of the service is running, across restarts and redeploys. The link
4321
4844
  * is in this answer only. The call fails with FAILED_PRECONDITION when
4322
4845
  * this server serves no provided names, when the service has none, or
4323
- * when the workspace's plan turns share links off; with NOT_FOUND for a
4324
- * channel that is not an http channel of the service's current revision;
4846
+ * when the workspace's plan turns share links off; with NOT_FOUND for an
4847
+ * endpoint that is not an http endpoint of the service's current revision;
4325
4848
  * and with INVALID_ARGUMENT for an expiry or a byte cap above the plan's.
4326
4849
  *
4327
4850
  * @generated from rpc toshi.workspace.v1.WorkloadService.CreateServiceShareLink
@@ -4333,7 +4856,7 @@ export declare const WorkloadService: GenService<{
4333
4856
  };
4334
4857
  /**
4335
4858
  * ListServiceShareLinks returns a service's share links, for all of its
4336
- * channels, the oldest first, never with the link itself.
4859
+ * endpoints, the oldest first, never with the link itself.
4337
4860
  *
4338
4861
  * A page holds 100 share links when page_size is zero, and 1000 at most.
4339
4862
  *
@@ -4461,7 +4984,7 @@ export declare const WorkloadService: GenService<{
4461
4984
  * a host, placed by the service's size; the run's start moves the
4462
4985
  * workload to RUNNING. While the service is started, a run that ends is
4463
4986
  * followed by another. An on-demand service is started asleep: it runs
4464
- * only once WakeService, a hold or a connect on one of its channels
4987
+ * only once WakeService, a hold or a connect on one of its endpoints
4465
4988
  * wakes it, and sleeps again when it has been idle for its recipe's
4466
4989
  * idle period. Starting a started service returns it as it is. A size
4467
4990
  * that is not a Linux one and a start past the plan's shared services
@@ -4570,11 +5093,11 @@ export declare const WorkloadService: GenService<{
4570
5093
  /**
4571
5094
  * SetServiceAlarm creates or replaces the service's alarm with this name
4572
5095
  * and returns it. At each instant of its schedule an alarm publishes its
4573
- * event, with its data, on one of the service's event channels. Replacing
5096
+ * event, with its data, on one of the service's event endpoints. Replacing
4574
5097
  * an alarm raises its generation and schedules it again from now. A
4575
- * schedule, zone, channel, event or data that is not valid fails with
5098
+ * schedule, zone, endpoint, event or data that is not valid fails with
4576
5099
  * INVALID_ARGUMENT, as does an event name under a prefix Toshi keeps for
4577
- * its own events; a channel the service does not declare fails with
5100
+ * its own events; an endpoint the service does not declare fails with
4578
5101
  * NOT_FOUND; a service holding 100 alarms refuses another with
4579
5102
  * RESOURCE_EXHAUSTED.
4580
5103
  *
@@ -4608,7 +5131,7 @@ export declare const WorkloadService: GenService<{
4608
5131
  };
4609
5132
  /**
4610
5133
  * DeleteServiceAlarm removes an alarm and its occurrences. Messages it
4611
- * already published stay on the channel.
5134
+ * already published stay on the endpoint.
4612
5135
  *
4613
5136
  * @generated from rpc toshi.workspace.v1.WorkloadService.DeleteServiceAlarm
4614
5137
  */