@maxim_mazurok/gapi.client.sqladmin-v1 0.0.20230302 → 0.0.20230316

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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* Type definitions for non-npm package sqladmin API (prod) v1 0.0 */
1
+ /* Type definitions for non-npm package Cloud SQL Admin API v1 0.0 */
2
2
  // Project: https://developers.google.com/cloud-sql/
3
3
  // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
4
  // Nick Amoscato <https://github.com/namoscato>
@@ -9,12 +9,12 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://sqladmin.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20230302
12
+ // Revision: 20230316
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
16
16
  declare namespace gapi.client {
17
- /** Load sqladmin API (prod) v1 */
17
+ /** Load Cloud SQL Admin API v1 */
18
18
  function load(urlOrObject: "https://sqladmin.googleapis.com/$discovery/rest?version=v1"): Promise<void>;
19
19
  /** @deprecated Please load APIs with discovery documents. */
20
20
  function load(name: "sqladmin", version: "v1"): Promise<void>;
@@ -808,6 +808,10 @@ declare namespace gapi.client {
808
808
  /** Number of previous passwords that cannot be reused. */
809
809
  reuseInterval?: number;
810
810
  }
811
+ interface PerformDiskShrinkContext {
812
+ /** The target disk shrink size in GigaBytes. */
813
+ targetSizeGb?: string;
814
+ }
811
815
  interface ReplicaConfiguration {
812
816
  /**
813
817
  * Specifies if the replica is the failover target. If the field is set to `true`, the replica will be designated as a failover replica. In case the primary instance fails, the replica
@@ -945,10 +949,19 @@ declare namespace gapi.client {
945
949
  /** Identifies the specific error that occurred. */
946
950
  type?: string;
947
951
  }
952
+ interface SqlInstancesGetDiskShrinkConfigResponse {
953
+ /** This is always `sql#getDiskShrinkConfig`. */
954
+ kind?: string;
955
+ /** The minimum size to which a disk can be shrunk in GigaBytes. */
956
+ minimalTargetSizeGb?: string;
957
+ }
948
958
  interface SqlInstancesRescheduleMaintenanceRequestBody {
949
959
  /** Required. The type of the reschedule the user wants. */
950
960
  reschedule?: Reschedule;
951
961
  }
962
+ // tslint:disable-next-line:no-empty-interface
963
+ interface SqlInstancesResetReplicaSizeRequest {
964
+ }
952
965
  interface SqlInstancesStartExternalSyncRequest {
953
966
  /** MySQL-specific settings for start external sync. */
954
967
  mysqlSyncConfig?: MySqlSyncConfig;
@@ -2743,6 +2756,95 @@ declare namespace gapi.client {
2743
2756
  }): Request<OperationsListResponse>;
2744
2757
  }
2745
2758
  interface InstancesResource {
2759
+ /** Get Disk Shrink Config for a given instance. */
2760
+ getDiskShrinkConfig(request?: {
2761
+ /** V1 error format. */
2762
+ "$.xgafv"?: string;
2763
+ /** OAuth access token. */
2764
+ access_token?: string;
2765
+ /** Data format for response. */
2766
+ alt?: string;
2767
+ /** JSONP */
2768
+ callback?: string;
2769
+ /** Selector specifying which fields to include in a partial response. */
2770
+ fields?: string;
2771
+ /** Cloud SQL instance ID. This does not include the project ID. */
2772
+ instance: string;
2773
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2774
+ key?: string;
2775
+ /** OAuth 2.0 token for the current user. */
2776
+ oauth_token?: string;
2777
+ /** Returns response with indentations and line breaks. */
2778
+ prettyPrint?: boolean;
2779
+ /** Project ID of the project that contains the instance. */
2780
+ project: string;
2781
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2782
+ quotaUser?: string;
2783
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2784
+ upload_protocol?: string;
2785
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2786
+ uploadType?: string;
2787
+ }): Request<SqlInstancesGetDiskShrinkConfigResponse>;
2788
+ /** Perform Disk Shrink on primary instance. */
2789
+ performDiskShrink(request: {
2790
+ /** V1 error format. */
2791
+ "$.xgafv"?: string;
2792
+ /** OAuth access token. */
2793
+ access_token?: string;
2794
+ /** Data format for response. */
2795
+ alt?: string;
2796
+ /** JSONP */
2797
+ callback?: string;
2798
+ /** Selector specifying which fields to include in a partial response. */
2799
+ fields?: string;
2800
+ /** Cloud SQL instance ID. This does not include the project ID. */
2801
+ instance: string;
2802
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2803
+ key?: string;
2804
+ /** OAuth 2.0 token for the current user. */
2805
+ oauth_token?: string;
2806
+ /** Returns response with indentations and line breaks. */
2807
+ prettyPrint?: boolean;
2808
+ /** Project ID of the project that contains the instance. */
2809
+ project: string;
2810
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2811
+ quotaUser?: string;
2812
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2813
+ upload_protocol?: string;
2814
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2815
+ uploadType?: string;
2816
+ /** Request body */
2817
+ resource: PerformDiskShrinkContext;
2818
+ }): Request<Operation>;
2819
+ performDiskShrink(request: {
2820
+ /** V1 error format. */
2821
+ "$.xgafv"?: string;
2822
+ /** OAuth access token. */
2823
+ access_token?: string;
2824
+ /** Data format for response. */
2825
+ alt?: string;
2826
+ /** JSONP */
2827
+ callback?: string;
2828
+ /** Selector specifying which fields to include in a partial response. */
2829
+ fields?: string;
2830
+ /** Cloud SQL instance ID. This does not include the project ID. */
2831
+ instance: string;
2832
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2833
+ key?: string;
2834
+ /** OAuth 2.0 token for the current user. */
2835
+ oauth_token?: string;
2836
+ /** Returns response with indentations and line breaks. */
2837
+ prettyPrint?: boolean;
2838
+ /** Project ID of the project that contains the instance. */
2839
+ project: string;
2840
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2841
+ quotaUser?: string;
2842
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2843
+ upload_protocol?: string;
2844
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2845
+ uploadType?: string;
2846
+ },
2847
+ body: PerformDiskShrinkContext): Request<Operation>;
2746
2848
  /** Reschedules the maintenance on the given instance. */
2747
2849
  rescheduleMaintenance(request: {
2748
2850
  /** V1 error format. */
@@ -2803,6 +2905,66 @@ declare namespace gapi.client {
2803
2905
  uploadType?: string;
2804
2906
  },
2805
2907
  body: SqlInstancesRescheduleMaintenanceRequestBody): Request<Operation>;
2908
+ /** Reset Replica Size to primary instance disk size. */
2909
+ resetReplicaSize(request: {
2910
+ /** V1 error format. */
2911
+ "$.xgafv"?: string;
2912
+ /** OAuth access token. */
2913
+ access_token?: string;
2914
+ /** Data format for response. */
2915
+ alt?: string;
2916
+ /** JSONP */
2917
+ callback?: string;
2918
+ /** Selector specifying which fields to include in a partial response. */
2919
+ fields?: string;
2920
+ /** Cloud SQL read replica instance name. */
2921
+ instance: string;
2922
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2923
+ key?: string;
2924
+ /** OAuth 2.0 token for the current user. */
2925
+ oauth_token?: string;
2926
+ /** Returns response with indentations and line breaks. */
2927
+ prettyPrint?: boolean;
2928
+ /** ID of the project that contains the read replica. */
2929
+ project: string;
2930
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2931
+ quotaUser?: string;
2932
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2933
+ upload_protocol?: string;
2934
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2935
+ uploadType?: string;
2936
+ /** Request body */
2937
+ resource: SqlInstancesResetReplicaSizeRequest;
2938
+ }): Request<Operation>;
2939
+ resetReplicaSize(request: {
2940
+ /** V1 error format. */
2941
+ "$.xgafv"?: string;
2942
+ /** OAuth access token. */
2943
+ access_token?: string;
2944
+ /** Data format for response. */
2945
+ alt?: string;
2946
+ /** JSONP */
2947
+ callback?: string;
2948
+ /** Selector specifying which fields to include in a partial response. */
2949
+ fields?: string;
2950
+ /** Cloud SQL read replica instance name. */
2951
+ instance: string;
2952
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2953
+ key?: string;
2954
+ /** OAuth 2.0 token for the current user. */
2955
+ oauth_token?: string;
2956
+ /** Returns response with indentations and line breaks. */
2957
+ prettyPrint?: boolean;
2958
+ /** ID of the project that contains the read replica. */
2959
+ project: string;
2960
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2961
+ quotaUser?: string;
2962
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2963
+ upload_protocol?: string;
2964
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2965
+ uploadType?: string;
2966
+ },
2967
+ body: SqlInstancesResetReplicaSizeRequest): Request<Operation>;
2806
2968
  /** Start External primary instance migration. */
2807
2969
  startExternalSync(request: {
2808
2970
  /** V1 error format. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.sqladmin-v1",
3
- "version": "0.0.20230302",
4
- "description": "TypeScript typings for sqladmin API (prod) v1",
3
+ "version": "0.0.20230316",
4
+ "description": "TypeScript typings for Cloud SQL Admin API v1",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "email": "maxim@mazurok.com",
package/readme.md CHANGED
@@ -1,11 +1,11 @@
1
- # TypeScript typings for sqladmin API (prod) v1
1
+ # TypeScript typings for Cloud SQL Admin API v1
2
2
 
3
3
  API for Cloud SQL database instance management
4
4
  For detailed description please check [documentation](https://developers.google.com/cloud-sql/).
5
5
 
6
6
  ## Installing
7
7
 
8
- Install typings for sqladmin API (prod):
8
+ Install typings for Cloud SQL Admin API:
9
9
 
10
10
  ```
11
11
  npm install @types/gapi.client.sqladmin-v1 --save-dev
@@ -65,7 +65,7 @@ gapi.auth.authorize(
65
65
  });
66
66
  ```
67
67
 
68
- After that you can use sqladmin API (prod) resources: <!-- TODO: make this work for multiple namespaces -->
68
+ After that you can use Cloud SQL Admin API resources: <!-- TODO: make this work for multiple namespaces -->
69
69
 
70
70
  ```typescript
71
71
 
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230302
6
+ // Revision: 20230316
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -1046,6 +1046,18 @@ gapi.load('client', async () => {
1046
1046
  pageToken: "Test string",
1047
1047
  project: "Test string",
1048
1048
  });
1049
+ /** Get Disk Shrink Config for a given instance. */
1050
+ await gapi.client.sql.projects.instances.getDiskShrinkConfig({
1051
+ instance: "Test string",
1052
+ project: "Test string",
1053
+ });
1054
+ /** Perform Disk Shrink on primary instance. */
1055
+ await gapi.client.sql.projects.instances.performDiskShrink({
1056
+ instance: "Test string",
1057
+ project: "Test string",
1058
+ }, {
1059
+ targetSizeGb: "Test string",
1060
+ });
1049
1061
  /** Reschedules the maintenance on the given instance. */
1050
1062
  await gapi.client.sql.projects.instances.rescheduleMaintenance({
1051
1063
  instance: "Test string",
@@ -1056,6 +1068,12 @@ gapi.load('client', async () => {
1056
1068
  scheduleTime: "Test string",
1057
1069
  },
1058
1070
  });
1071
+ /** Reset Replica Size to primary instance disk size. */
1072
+ await gapi.client.sql.projects.instances.resetReplicaSize({
1073
+ instance: "Test string",
1074
+ project: "Test string",
1075
+ }, {
1076
+ });
1059
1077
  /** Start External primary instance migration. */
1060
1078
  await gapi.client.sql.projects.instances.startExternalSync({
1061
1079
  instance: "Test string",