@maxim_mazurok/gapi.client.batch-v1 0.1.20260302 → 0.2.20260302

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 (2) hide show
  1. package/index.d.ts +112 -50
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -64,7 +64,11 @@ declare namespace gapi.client {
64
64
  /** When the AgentInfo is generated. */
65
65
  reportTime?: string;
66
66
  /** Agent state. */
67
- state?: string;
67
+ state?:
68
+ | 'AGENT_STATE_UNSPECIFIED'
69
+ | 'AGENT_STARTING'
70
+ | 'AGENT_RUNNING'
71
+ | 'AGENT_STOPPED';
68
72
  /** The assigned task group ID. */
69
73
  taskGroupId?: string;
70
74
  /** Task Info. */
@@ -108,7 +112,11 @@ declare namespace gapi.client {
108
112
  /** AgentTaskSpec is the taskSpec representation between Agent and CLH communication. This field will replace the TaskSpec field above in future to have a better separation between user-facaing API and internal API. */
109
113
  agentTaskSpec?: AgentTaskSpec;
110
114
  /** The intended state of the task. */
111
- intendedState?: string;
115
+ intendedState?:
116
+ | 'INTENDED_STATE_UNSPECIFIED'
117
+ | 'ASSIGNED'
118
+ | 'CANCELLED'
119
+ | 'DELETED';
112
120
  /** The highest barrier reached by all tasks in the task's TaskGroup. */
113
121
  reachedBarrier?: string;
114
122
  /** Task Spec. This field will be replaced by agent_task_spec below in future. */
@@ -118,7 +126,7 @@ declare namespace gapi.client {
118
126
  /** Task name. */
119
127
  task?: string;
120
128
  /** TaskSource represents the source of the task. */
121
- taskSource?: string;
129
+ taskSource?: 'TASK_SOURCE_UNSPECIFIED' | 'BATCH_INTERNAL' | 'USER';
122
130
  }
123
131
  interface AgentTaskInfo {
124
132
  /** The highest index of a runnable started by the agent for this task. The runnables are indexed from 1. Value 0 is undefined. */
@@ -275,7 +283,13 @@ declare namespace gapi.client {
275
283
  /** The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. */
276
284
  minCpuPlatform?: string;
277
285
  /** The provisioning model. */
278
- provisioningModel?: string;
286
+ provisioningModel?:
287
+ | 'PROVISIONING_MODEL_UNSPECIFIED'
288
+ | 'STANDARD'
289
+ | 'SPOT'
290
+ | 'PREEMPTIBLE'
291
+ | 'RESERVATION_BOUND'
292
+ | 'FLEX_START';
279
293
  /** Optional. If not specified (default), VMs will consume any applicable reservation. If "NO_RESERVATION" is specified, VMs will not consume any reservation. Otherwise, if specified, VMs will consume only the specified reservation. */
280
294
  reservation?: string;
281
295
  }
@@ -297,7 +311,13 @@ declare namespace gapi.client {
297
311
  /** The Compute Engine machine type. */
298
312
  machineType?: string;
299
313
  /** The VM instance provisioning model. */
300
- provisioningModel?: string;
314
+ provisioningModel?:
315
+ | 'PROVISIONING_MODEL_UNSPECIFIED'
316
+ | 'STANDARD'
317
+ | 'SPOT'
318
+ | 'PREEMPTIBLE'
319
+ | 'RESERVATION_BOUND'
320
+ | 'FLEX_START';
301
321
  /** The max number of tasks can be assigned to this instance type. */
302
322
  taskPack?: string;
303
323
  }
@@ -335,7 +355,16 @@ declare namespace gapi.client {
335
355
  /** The duration of time that the Job spent in status RUNNING. */
336
356
  runDuration?: string;
337
357
  /** Job state */
338
- state?: string;
358
+ state?:
359
+ | 'STATE_UNSPECIFIED'
360
+ | 'QUEUED'
361
+ | 'SCHEDULED'
362
+ | 'RUNNING'
363
+ | 'SUCCEEDED'
364
+ | 'FAILED'
365
+ | 'DELETION_IN_PROGRESS'
366
+ | 'CANCELLATION_IN_PROGRESS'
367
+ | 'CANCELLED';
339
368
  /** Job status events */
340
369
  statusEvents?: StatusEvent[];
341
370
  /** Aggregated task status for each TaskGroup in the Job. The map key is TaskGroup ID. */
@@ -349,7 +378,7 @@ declare namespace gapi.client {
349
378
  }
350
379
  interface LifecyclePolicy {
351
380
  /** Action to execute when ActionCondition is true. When RETRY_TASK is specified, we will retry failed tasks if we notice any exit code match and fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we will fail tasks if we notice any exit code match and retry tasks if no match is found. */
352
- action?: string;
381
+ action?: 'ACTION_UNSPECIFIED' | 'RETRY_TASK' | 'FAIL_TASK';
353
382
  /** Conditions that decide why a task failure is dealt with a specific action. */
354
383
  actionCondition?: ActionCondition;
355
384
  }
@@ -403,17 +432,33 @@ declare namespace gapi.client {
403
432
  /** Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally set this field to configure additional settings for Cloud Logging. */
404
433
  cloudLoggingOption?: CloudLoggingOption;
405
434
  /** If and where logs should be saved. */
406
- destination?: string;
435
+ destination?: 'DESTINATION_UNSPECIFIED' | 'CLOUD_LOGGING' | 'PATH';
407
436
  /** When `destination` is set to `PATH`, you must set this field to the path where you want logs to be saved. This path can point to a local directory on the VM or (if congifured) a directory under the mount path of any Cloud Storage bucket, network file system (NFS), or writable persistent disk that is mounted to the job. For example, if the job has a bucket with `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the root directory of the `remotePath` of that bucket by setting this field to `/mnt/disks/my-bucket/`. */
408
437
  logsPath?: string;
409
438
  }
410
439
  interface Message {
411
440
  /** The new job state. */
412
- newJobState?: string;
441
+ newJobState?:
442
+ | 'STATE_UNSPECIFIED'
443
+ | 'QUEUED'
444
+ | 'SCHEDULED'
445
+ | 'RUNNING'
446
+ | 'SUCCEEDED'
447
+ | 'FAILED'
448
+ | 'DELETION_IN_PROGRESS'
449
+ | 'CANCELLATION_IN_PROGRESS'
450
+ | 'CANCELLED';
413
451
  /** The new task state. */
414
- newTaskState?: string;
452
+ newTaskState?:
453
+ | 'STATE_UNSPECIFIED'
454
+ | 'PENDING'
455
+ | 'ASSIGNED'
456
+ | 'RUNNING'
457
+ | 'FAILED'
458
+ | 'SUCCEEDED'
459
+ | 'UNEXECUTED';
415
460
  /** The message type. */
416
- type?: string;
461
+ type?: 'TYPE_UNSPECIFIED' | 'JOB_STATE_CHANGED' | 'TASK_STATE_CHANGED';
417
462
  }
418
463
  interface NetworkInterface {
419
464
  /** The URL of an existing network resource. You can specify the network as a full or partial URL. For example, the following are all valid URLs: * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} * projects/{project}/global/networks/{network} * global/networks/{network} */
@@ -535,7 +580,14 @@ declare namespace gapi.client {
535
580
  /** Task Execution. This field is only defined for task-level status events where the task fails. */
536
581
  taskExecution?: TaskExecution;
537
582
  /** Task State. This field is only defined for task-level status events. */
538
- taskState?: string;
583
+ taskState?:
584
+ | 'STATE_UNSPECIFIED'
585
+ | 'PENDING'
586
+ | 'ASSIGNED'
587
+ | 'RUNNING'
588
+ | 'FAILED'
589
+ | 'SUCCEEDED'
590
+ | 'UNEXECUTED';
539
591
  /** Type of the event. */
540
592
  type?: string;
541
593
  }
@@ -561,7 +613,10 @@ declare namespace gapi.client {
561
613
  /** Optional. If not set or set to false, Batch uses the root user to execute runnables. If set to true, Batch runs the runnables using a non-root user. Currently, the non-root user Batch used is generated by OS Login. For more information, see [About OS Login](https://cloud.google.com/compute/docs/oslogin). */
562
614
  runAsNonRoot?: boolean;
563
615
  /** Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE. */
564
- schedulingPolicy?: string;
616
+ schedulingPolicy?:
617
+ | 'SCHEDULING_POLICY_UNSPECIFIED'
618
+ | 'AS_SOON_AS_POSSIBLE'
619
+ | 'IN_ORDER';
565
620
  /** Number of Tasks in the TaskGroup. Default is 1. */
566
621
  taskCount?: string;
567
622
  /** Max number of tasks that can be run on a VM at the same time. If not specified, the system will decide a value based on available compute resources on a VM and task requirements. */
@@ -597,7 +652,14 @@ declare namespace gapi.client {
597
652
  }
598
653
  interface TaskStatus {
599
654
  /** Task state. */
600
- state?: string;
655
+ state?:
656
+ | 'STATE_UNSPECIFIED'
657
+ | 'PENDING'
658
+ | 'ASSIGNED'
659
+ | 'RUNNING'
660
+ | 'FAILED'
661
+ | 'SUCCEEDED'
662
+ | 'UNEXECUTED';
601
663
  /** Detailed info about why the state is reached. */
602
664
  statusEvents?: StatusEvent[];
603
665
  }
@@ -617,11 +679,11 @@ declare namespace gapi.client {
617
679
  /** Return a single Task. */
618
680
  get(request?: {
619
681
  /** V1 error format. */
620
- '$.xgafv'?: string;
682
+ '$.xgafv'?: '1' | '2';
621
683
  /** OAuth access token. */
622
684
  access_token?: string;
623
685
  /** Data format for response. */
624
- alt?: string;
686
+ alt?: 'json' | 'media' | 'proto';
625
687
  /** JSONP */
626
688
  callback?: string;
627
689
  /** Selector specifying which fields to include in a partial response. */
@@ -644,11 +706,11 @@ declare namespace gapi.client {
644
706
  /** List Tasks associated with a job. */
645
707
  list(request?: {
646
708
  /** V1 error format. */
647
- '$.xgafv'?: string;
709
+ '$.xgafv'?: '1' | '2';
648
710
  /** OAuth access token. */
649
711
  access_token?: string;
650
712
  /** Data format for response. */
651
- alt?: string;
713
+ alt?: 'json' | 'media' | 'proto';
652
714
  /** JSONP */
653
715
  callback?: string;
654
716
  /** Selector specifying which fields to include in a partial response. */
@@ -682,11 +744,11 @@ declare namespace gapi.client {
682
744
  /** Cancel a Job. */
683
745
  cancel(request: {
684
746
  /** V1 error format. */
685
- '$.xgafv'?: string;
747
+ '$.xgafv'?: '1' | '2';
686
748
  /** OAuth access token. */
687
749
  access_token?: string;
688
750
  /** Data format for response. */
689
- alt?: string;
751
+ alt?: 'json' | 'media' | 'proto';
690
752
  /** JSONP */
691
753
  callback?: string;
692
754
  /** Selector specifying which fields to include in a partial response. */
@@ -711,11 +773,11 @@ declare namespace gapi.client {
711
773
  cancel(
712
774
  request: {
713
775
  /** V1 error format. */
714
- '$.xgafv'?: string;
776
+ '$.xgafv'?: '1' | '2';
715
777
  /** OAuth access token. */
716
778
  access_token?: string;
717
779
  /** Data format for response. */
718
- alt?: string;
780
+ alt?: 'json' | 'media' | 'proto';
719
781
  /** JSONP */
720
782
  callback?: string;
721
783
  /** Selector specifying which fields to include in a partial response. */
@@ -740,11 +802,11 @@ declare namespace gapi.client {
740
802
  /** Create a Job. */
741
803
  create(request: {
742
804
  /** V1 error format. */
743
- '$.xgafv'?: string;
805
+ '$.xgafv'?: '1' | '2';
744
806
  /** OAuth access token. */
745
807
  access_token?: string;
746
808
  /** Data format for response. */
747
- alt?: string;
809
+ alt?: 'json' | 'media' | 'proto';
748
810
  /** JSONP */
749
811
  callback?: string;
750
812
  /** Selector specifying which fields to include in a partial response. */
@@ -773,11 +835,11 @@ declare namespace gapi.client {
773
835
  create(
774
836
  request: {
775
837
  /** V1 error format. */
776
- '$.xgafv'?: string;
838
+ '$.xgafv'?: '1' | '2';
777
839
  /** OAuth access token. */
778
840
  access_token?: string;
779
841
  /** Data format for response. */
780
- alt?: string;
842
+ alt?: 'json' | 'media' | 'proto';
781
843
  /** JSONP */
782
844
  callback?: string;
783
845
  /** Selector specifying which fields to include in a partial response. */
@@ -806,11 +868,11 @@ declare namespace gapi.client {
806
868
  /** Delete a Job. */
807
869
  delete(request?: {
808
870
  /** V1 error format. */
809
- '$.xgafv'?: string;
871
+ '$.xgafv'?: '1' | '2';
810
872
  /** OAuth access token. */
811
873
  access_token?: string;
812
874
  /** Data format for response. */
813
- alt?: string;
875
+ alt?: 'json' | 'media' | 'proto';
814
876
  /** JSONP */
815
877
  callback?: string;
816
878
  /** Selector specifying which fields to include in a partial response. */
@@ -837,11 +899,11 @@ declare namespace gapi.client {
837
899
  /** Get a Job specified by its resource name. */
838
900
  get(request?: {
839
901
  /** V1 error format. */
840
- '$.xgafv'?: string;
902
+ '$.xgafv'?: '1' | '2';
841
903
  /** OAuth access token. */
842
904
  access_token?: string;
843
905
  /** Data format for response. */
844
- alt?: string;
906
+ alt?: 'json' | 'media' | 'proto';
845
907
  /** JSONP */
846
908
  callback?: string;
847
909
  /** Selector specifying which fields to include in a partial response. */
@@ -864,11 +926,11 @@ declare namespace gapi.client {
864
926
  /** List all Jobs for a project within a region. */
865
927
  list(request?: {
866
928
  /** V1 error format. */
867
- '$.xgafv'?: string;
929
+ '$.xgafv'?: '1' | '2';
868
930
  /** OAuth access token. */
869
931
  access_token?: string;
870
932
  /** Data format for response. */
871
- alt?: string;
933
+ alt?: 'json' | 'media' | 'proto';
872
934
  /** JSONP */
873
935
  callback?: string;
874
936
  /** Selector specifying which fields to include in a partial response. */
@@ -902,11 +964,11 @@ declare namespace gapi.client {
902
964
  /** Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. */
903
965
  cancel(request: {
904
966
  /** V1 error format. */
905
- '$.xgafv'?: string;
967
+ '$.xgafv'?: '1' | '2';
906
968
  /** OAuth access token. */
907
969
  access_token?: string;
908
970
  /** Data format for response. */
909
- alt?: string;
971
+ alt?: 'json' | 'media' | 'proto';
910
972
  /** JSONP */
911
973
  callback?: string;
912
974
  /** Selector specifying which fields to include in a partial response. */
@@ -931,11 +993,11 @@ declare namespace gapi.client {
931
993
  cancel(
932
994
  request: {
933
995
  /** V1 error format. */
934
- '$.xgafv'?: string;
996
+ '$.xgafv'?: '1' | '2';
935
997
  /** OAuth access token. */
936
998
  access_token?: string;
937
999
  /** Data format for response. */
938
- alt?: string;
1000
+ alt?: 'json' | 'media' | 'proto';
939
1001
  /** JSONP */
940
1002
  callback?: string;
941
1003
  /** Selector specifying which fields to include in a partial response. */
@@ -960,11 +1022,11 @@ declare namespace gapi.client {
960
1022
  /** Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. */
961
1023
  delete(request?: {
962
1024
  /** V1 error format. */
963
- '$.xgafv'?: string;
1025
+ '$.xgafv'?: '1' | '2';
964
1026
  /** OAuth access token. */
965
1027
  access_token?: string;
966
1028
  /** Data format for response. */
967
- alt?: string;
1029
+ alt?: 'json' | 'media' | 'proto';
968
1030
  /** JSONP */
969
1031
  callback?: string;
970
1032
  /** Selector specifying which fields to include in a partial response. */
@@ -987,11 +1049,11 @@ declare namespace gapi.client {
987
1049
  /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
988
1050
  get(request?: {
989
1051
  /** V1 error format. */
990
- '$.xgafv'?: string;
1052
+ '$.xgafv'?: '1' | '2';
991
1053
  /** OAuth access token. */
992
1054
  access_token?: string;
993
1055
  /** Data format for response. */
994
- alt?: string;
1056
+ alt?: 'json' | 'media' | 'proto';
995
1057
  /** JSONP */
996
1058
  callback?: string;
997
1059
  /** Selector specifying which fields to include in a partial response. */
@@ -1014,11 +1076,11 @@ declare namespace gapi.client {
1014
1076
  /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
1015
1077
  list(request?: {
1016
1078
  /** V1 error format. */
1017
- '$.xgafv'?: string;
1079
+ '$.xgafv'?: '1' | '2';
1018
1080
  /** OAuth access token. */
1019
1081
  access_token?: string;
1020
1082
  /** Data format for response. */
1021
- alt?: string;
1083
+ alt?: 'json' | 'media' | 'proto';
1022
1084
  /** JSONP */
1023
1085
  callback?: string;
1024
1086
  /** Selector specifying which fields to include in a partial response. */
@@ -1051,11 +1113,11 @@ declare namespace gapi.client {
1051
1113
  /** Report agent's state, e.g. agent status and tasks information */
1052
1114
  report(request: {
1053
1115
  /** V1 error format. */
1054
- '$.xgafv'?: string;
1116
+ '$.xgafv'?: '1' | '2';
1055
1117
  /** OAuth access token. */
1056
1118
  access_token?: string;
1057
1119
  /** Data format for response. */
1058
- alt?: string;
1120
+ alt?: 'json' | 'media' | 'proto';
1059
1121
  /** JSONP */
1060
1122
  callback?: string;
1061
1123
  /** Selector specifying which fields to include in a partial response. */
@@ -1080,11 +1142,11 @@ declare namespace gapi.client {
1080
1142
  report(
1081
1143
  request: {
1082
1144
  /** V1 error format. */
1083
- '$.xgafv'?: string;
1145
+ '$.xgafv'?: '1' | '2';
1084
1146
  /** OAuth access token. */
1085
1147
  access_token?: string;
1086
1148
  /** Data format for response. */
1087
- alt?: string;
1149
+ alt?: 'json' | 'media' | 'proto';
1088
1150
  /** JSONP */
1089
1151
  callback?: string;
1090
1152
  /** Selector specifying which fields to include in a partial response. */
@@ -1111,11 +1173,11 @@ declare namespace gapi.client {
1111
1173
  /** Gets information about a location. */
1112
1174
  get(request?: {
1113
1175
  /** V1 error format. */
1114
- '$.xgafv'?: string;
1176
+ '$.xgafv'?: '1' | '2';
1115
1177
  /** OAuth access token. */
1116
1178
  access_token?: string;
1117
1179
  /** Data format for response. */
1118
- alt?: string;
1180
+ alt?: 'json' | 'media' | 'proto';
1119
1181
  /** JSONP */
1120
1182
  callback?: string;
1121
1183
  /** Selector specifying which fields to include in a partial response. */
@@ -1138,11 +1200,11 @@ declare namespace gapi.client {
1138
1200
  /** Lists information about the supported locations for this service. This method can be called in two ways: * **List all public locations:** Use the path `GET /v1/locations`. * **List project-visible locations:** Use the path `GET /v1/projects/{project_id}/locations`. This may include public locations as well as private or other locations specifically visible to the project. */
1139
1201
  list(request?: {
1140
1202
  /** V1 error format. */
1141
- '$.xgafv'?: string;
1203
+ '$.xgafv'?: '1' | '2';
1142
1204
  /** OAuth access token. */
1143
1205
  access_token?: string;
1144
1206
  /** Data format for response. */
1145
- alt?: string;
1207
+ alt?: 'json' | 'media' | 'proto';
1146
1208
  /** JSONP */
1147
1209
  callback?: string;
1148
1210
  /** Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.batch-v1",
3
- "version": "0.1.20260302",
3
+ "version": "0.2.20260302",
4
4
  "description": "TypeScript typings for Batch API v1",
5
5
  "repository": {
6
6
  "type": "git",