@maxim_mazurok/gapi.client.spanner-v1 0.0.20230323 → 0.0.20230403
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 +93 -1
- package/package.json +1 -1
- package/tests.ts +51 -1
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
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://spanner.googleapis.com/$discovery/rest?version=v1
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20230403
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -333,6 +333,8 @@ declare namespace gapi.client {
|
|
|
333
333
|
* you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
|
|
334
334
|
*/
|
|
335
335
|
earliestVersionTime?: string;
|
|
336
|
+
/** Whether drop protection is enabled for this database. Defaults to false, if not set. */
|
|
337
|
+
enableDropProtection?: boolean;
|
|
336
338
|
/**
|
|
337
339
|
* Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default
|
|
338
340
|
* or other types of encryption, this field is empty.
|
|
@@ -349,6 +351,8 @@ declare namespace gapi.client {
|
|
|
349
351
|
* other API methods to identify the database.
|
|
350
352
|
*/
|
|
351
353
|
name?: string;
|
|
354
|
+
/** Output only. If true, the database is being updated. If false, there are no ongoing update operations for the database. */
|
|
355
|
+
reconciling?: boolean;
|
|
352
356
|
/** Output only. Applicable only for restored databases. Contains information about the restore source. */
|
|
353
357
|
restoreInfo?: RestoreInfo;
|
|
354
358
|
/** Output only. The current database state. */
|
|
@@ -1457,6 +1461,20 @@ declare namespace gapi.client {
|
|
|
1457
1461
|
/** Required. DDL statements to be applied to the database. */
|
|
1458
1462
|
statements?: string[];
|
|
1459
1463
|
}
|
|
1464
|
+
interface UpdateDatabaseMetadata {
|
|
1465
|
+
/** The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is best-effort). */
|
|
1466
|
+
cancelTime?: string;
|
|
1467
|
+
/** The progress of the UpdateDatabase operation. */
|
|
1468
|
+
progress?: OperationProgress;
|
|
1469
|
+
/** The request for UpdateDatabase. */
|
|
1470
|
+
request?: UpdateDatabaseRequest;
|
|
1471
|
+
}
|
|
1472
|
+
interface UpdateDatabaseRequest {
|
|
1473
|
+
/** Required. The database to update. The `name` field of the database is of the form `projects//instances//databases/`. */
|
|
1474
|
+
database?: Database;
|
|
1475
|
+
/** Required. The list of fields to update. Currently, only `enable_drop_protection` field can be updated. */
|
|
1476
|
+
updateMask?: string;
|
|
1477
|
+
}
|
|
1460
1478
|
interface UpdateInstanceConfigMetadata {
|
|
1461
1479
|
/** The time at which this operation was cancelled. */
|
|
1462
1480
|
cancelTime?: string;
|
|
@@ -3849,6 +3867,80 @@ declare namespace gapi.client {
|
|
|
3849
3867
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3850
3868
|
uploadType?: string;
|
|
3851
3869
|
}): Request<ListDatabasesResponse>;
|
|
3870
|
+
/**
|
|
3871
|
+
* Updates a Cloud Spanner database. The returned long-running operation can be used to track the progress of updating the database. If the named database does not exist, returns
|
|
3872
|
+
* `NOT_FOUND`. While the operation is pending: * The database's reconciling field is set to true. * Cancelling the operation is best-effort. If the cancellation succeeds, the
|
|
3873
|
+
* operation metadata's cancel_time is set, the updates are reverted, and the operation terminates with a `CANCELLED` status. * New UpdateDatabase requests will return a
|
|
3874
|
+
* `FAILED_PRECONDITION` error until the pending operation is done (returns successfully or with error). * Reading the database via the API continues to give the pre-request values.
|
|
3875
|
+
* Upon completion of the returned operation: * The new values are in effect and readable via the API. * The database's reconciling field becomes false. The returned long-running
|
|
3876
|
+
* operation will have a name of the format `projects//instances//databases//operations/` and can be used to track the database modification. The metadata field type is
|
|
3877
|
+
* UpdateDatabaseMetadata. The response field type is Database, if successful.
|
|
3878
|
+
*/
|
|
3879
|
+
patch(request: {
|
|
3880
|
+
/** V1 error format. */
|
|
3881
|
+
"$.xgafv"?: string;
|
|
3882
|
+
/** OAuth access token. */
|
|
3883
|
+
access_token?: string;
|
|
3884
|
+
/** Data format for response. */
|
|
3885
|
+
alt?: string;
|
|
3886
|
+
/** JSONP */
|
|
3887
|
+
callback?: string;
|
|
3888
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3889
|
+
fields?: string;
|
|
3890
|
+
/** 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. */
|
|
3891
|
+
key?: string;
|
|
3892
|
+
/**
|
|
3893
|
+
* Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be
|
|
3894
|
+
* passed to other API methods to identify the database.
|
|
3895
|
+
*/
|
|
3896
|
+
name: string;
|
|
3897
|
+
/** OAuth 2.0 token for the current user. */
|
|
3898
|
+
oauth_token?: string;
|
|
3899
|
+
/** Returns response with indentations and line breaks. */
|
|
3900
|
+
prettyPrint?: boolean;
|
|
3901
|
+
/** 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. */
|
|
3902
|
+
quotaUser?: string;
|
|
3903
|
+
/** Required. The list of fields to update. Currently, only `enable_drop_protection` field can be updated. */
|
|
3904
|
+
updateMask?: string;
|
|
3905
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3906
|
+
upload_protocol?: string;
|
|
3907
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3908
|
+
uploadType?: string;
|
|
3909
|
+
/** Request body */
|
|
3910
|
+
resource: Database;
|
|
3911
|
+
}): Request<Operation>;
|
|
3912
|
+
patch(request: {
|
|
3913
|
+
/** V1 error format. */
|
|
3914
|
+
"$.xgafv"?: string;
|
|
3915
|
+
/** OAuth access token. */
|
|
3916
|
+
access_token?: string;
|
|
3917
|
+
/** Data format for response. */
|
|
3918
|
+
alt?: string;
|
|
3919
|
+
/** JSONP */
|
|
3920
|
+
callback?: string;
|
|
3921
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3922
|
+
fields?: string;
|
|
3923
|
+
/** 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. */
|
|
3924
|
+
key?: string;
|
|
3925
|
+
/**
|
|
3926
|
+
* Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be
|
|
3927
|
+
* passed to other API methods to identify the database.
|
|
3928
|
+
*/
|
|
3929
|
+
name: string;
|
|
3930
|
+
/** OAuth 2.0 token for the current user. */
|
|
3931
|
+
oauth_token?: string;
|
|
3932
|
+
/** Returns response with indentations and line breaks. */
|
|
3933
|
+
prettyPrint?: boolean;
|
|
3934
|
+
/** 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. */
|
|
3935
|
+
quotaUser?: string;
|
|
3936
|
+
/** Required. The list of fields to update. Currently, only `enable_drop_protection` field can be updated. */
|
|
3937
|
+
updateMask?: string;
|
|
3938
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3939
|
+
upload_protocol?: string;
|
|
3940
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3941
|
+
uploadType?: string;
|
|
3942
|
+
},
|
|
3943
|
+
body: Database): Request<Operation>;
|
|
3852
3944
|
/**
|
|
3853
3945
|
* Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance
|
|
3854
3946
|
* containing the backup. The returned database long-running operation has a name of the format `projects//instances//databases//operations/`, and can be used to track the progress of
|
package/package.json
CHANGED
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:
|
|
6
|
+
// Revision: 20230403
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -578,6 +578,56 @@ gapi.load('client', async () => {
|
|
|
578
578
|
pageToken: "Test string",
|
|
579
579
|
parent: "Test string",
|
|
580
580
|
});
|
|
581
|
+
/**
|
|
582
|
+
* Updates a Cloud Spanner database. The returned long-running operation can be used to track the progress of updating the database. If the named database does not exist, returns
|
|
583
|
+
* `NOT_FOUND`. While the operation is pending: * The database's reconciling field is set to true. * Cancelling the operation is best-effort. If the cancellation succeeds, the operation
|
|
584
|
+
* metadata's cancel_time is set, the updates are reverted, and the operation terminates with a `CANCELLED` status. * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error
|
|
585
|
+
* until the pending operation is done (returns successfully or with error). * Reading the database via the API continues to give the pre-request values. Upon completion of the returned
|
|
586
|
+
* operation: * The new values are in effect and readable via the API. * The database's reconciling field becomes false. The returned long-running operation will have a name of the format
|
|
587
|
+
* `projects//instances//databases//operations/` and can be used to track the database modification. The metadata field type is UpdateDatabaseMetadata. The response field type is Database,
|
|
588
|
+
* if successful.
|
|
589
|
+
*/
|
|
590
|
+
await gapi.client.spanner.projects.instances.databases.patch({
|
|
591
|
+
name: "Test string",
|
|
592
|
+
updateMask: "Test string",
|
|
593
|
+
}, {
|
|
594
|
+
createTime: "Test string",
|
|
595
|
+
databaseDialect: "Test string",
|
|
596
|
+
defaultLeader: "Test string",
|
|
597
|
+
earliestVersionTime: "Test string",
|
|
598
|
+
enableDropProtection: true,
|
|
599
|
+
encryptionConfig: {
|
|
600
|
+
kmsKeyName: "Test string",
|
|
601
|
+
},
|
|
602
|
+
encryptionInfo: [
|
|
603
|
+
{
|
|
604
|
+
encryptionStatus: {
|
|
605
|
+
code: 42,
|
|
606
|
+
details: [
|
|
607
|
+
{
|
|
608
|
+
A: 42
|
|
609
|
+
}
|
|
610
|
+
],
|
|
611
|
+
message: "Test string",
|
|
612
|
+
},
|
|
613
|
+
encryptionType: "Test string",
|
|
614
|
+
kmsKeyVersion: "Test string",
|
|
615
|
+
}
|
|
616
|
+
],
|
|
617
|
+
name: "Test string",
|
|
618
|
+
reconciling: true,
|
|
619
|
+
restoreInfo: {
|
|
620
|
+
backupInfo: {
|
|
621
|
+
backup: "Test string",
|
|
622
|
+
createTime: "Test string",
|
|
623
|
+
sourceDatabase: "Test string",
|
|
624
|
+
versionTime: "Test string",
|
|
625
|
+
},
|
|
626
|
+
sourceType: "Test string",
|
|
627
|
+
},
|
|
628
|
+
state: "Test string",
|
|
629
|
+
versionRetentionPeriod: "Test string",
|
|
630
|
+
});
|
|
581
631
|
/**
|
|
582
632
|
* Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance
|
|
583
633
|
* containing the backup. The returned database long-running operation has a name of the format `projects//instances//databases//operations/`, and can be used to track the progress of the
|