@maxim_mazurok/gapi.client.firestore-v1 0.0.20230421 → 0.0.20230508

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 (3) hide show
  1. package/index.d.ts +637 -1
  2. package/package.json +1 -1
  3. package/tests.ts +71 -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://firestore.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20230421
12
+ // Revision: 20230508
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -114,6 +114,25 @@ declare namespace gapi.client {
114
114
  transaction?:
115
115
  string;
116
116
  }
117
+ interface BitSequence {
118
+ /** The bytes that encode the bit sequence. May have a length of zero. */
119
+ bitmap?:
120
+ string;
121
+ /**
122
+ * The number of bits of the last byte in `bitmap` to ignore as "padding". If the length of `bitmap` is zero, then this value must be `0`. Otherwise, this value must be between 0 and
123
+ * 7, inclusive.
124
+ */
125
+ padding?:
126
+ number;
127
+ }
128
+ interface BloomFilter {
129
+ /** The bloom filter data. */
130
+ bits?:
131
+ BitSequence;
132
+ /** The number of hashes used by the algorithm. */
133
+ hashCount?:
134
+ number;
135
+ }
117
136
  interface CollectionSelector {
118
137
  /** When false, selects only collections that are immediate children of the `parent` specified in the containing `RunQueryRequest`. When true, selects all descendant collections. */
119
138
  allDescendants?:
@@ -256,6 +275,15 @@ declare namespace gapi.client {
256
275
  /** The target ID to which this filter applies. */
257
276
  targetId?:
258
277
  number;
278
+ /**
279
+ * A bloom filter that contains the UTF-8 byte encodings of the resource names of the documents that match target_id, in the form
280
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}` that have NOT changed since the query results indicated by the resume token or timestamp given in
281
+ * `Target.resume_type`. This bloom filter may be omitted at the server's discretion, such as if it is deemed that the client will not make use of it or if it is too computationally
282
+ * expensive to calculate or transmit. Clients must gracefully handle this field being absent by falling back to the logic used before this field existed; that is, re-add the target
283
+ * without a resume token to figure out which documents in the client's cache are out of sync.
284
+ */
285
+ unchangedNames?:
286
+ BloomFilter;
259
287
  }
260
288
  interface FieldFilter {
261
289
  /** The field to filter by. */
@@ -330,6 +358,55 @@ declare namespace gapi.client {
330
358
  unaryFilter?:
331
359
  UnaryFilter;
332
360
  }
361
+ interface GoogleFirestoreAdminV1Backup {
362
+ /** Output only. Name of the Firestore database that the backup is from. Format is `projects/{project}/databases/{database}`. */
363
+ database?:
364
+ string;
365
+ /** Output only. The system-generated UUID4 for the Firestore database that the backup is from. */
366
+ databaseUid?:
367
+ string;
368
+ /** Output only. The timestamp at which this backup expires. */
369
+ expireTime?:
370
+ string;
371
+ /** Output only. The unique resource name of the Backup. Format is `projects/{project}/locations/{location}/backups/{backup}`. */
372
+ name?:
373
+ string;
374
+ /** Output only. The backup contains an externally consistent copy of the database at this time. */
375
+ snapshotTime?:
376
+ string;
377
+ /** Output only. The current state of the backup. */
378
+ state?:
379
+ string;
380
+ /** Output only. Statistics about the backup. This data only becomes available after the backup is fully materialized to secondary storage. This field will be empty till then. */
381
+ stats?:
382
+ GoogleFirestoreAdminV1Stats;
383
+ }
384
+ interface GoogleFirestoreAdminV1BackupSchedule {
385
+ /** Output only. The timestamp at which this backup schedule was created and effective since. No backups will be created for this schedule before this time. */
386
+ createTime?:
387
+ string;
388
+ /** For a schedule that runs daily at a specified time. */
389
+ dailyRecurrence?:
390
+ any;
391
+ /**
392
+ * Output only. The unique backup schedule identifier across all locations and databases for the given project. This will be auto-assigned. Format is
393
+ * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`
394
+ */
395
+ name?:
396
+ string;
397
+ /** At what relative time in the future, compared to the creation time of the backup should the backup be deleted, i.e. keep backups for 7 days. */
398
+ retention?:
399
+ string;
400
+ /** Output only. The timestamp at which this backup schedule was most recently updated. When a backup schedule is first created, this is the same as create_time. */
401
+ updateTime?:
402
+ string;
403
+ /** For a schedule that runs weekly on a specific day and time. */
404
+ weeklyRecurrence?:
405
+ GoogleFirestoreAdminV1WeeklyRecurrence;
406
+ }
407
+ // tslint:disable-next-line:no-empty-interface
408
+ interface GoogleFirestoreAdminV1DailyRecurrence {
409
+ }
333
410
  interface GoogleFirestoreAdminV1Database {
334
411
  /** The App Engine integration mode to use for this database. */
335
412
  appEngineIntegrationMode?:
@@ -604,6 +681,22 @@ declare namespace gapi.client {
604
681
  state?:
605
682
  string;
606
683
  }
684
+ interface GoogleFirestoreAdminV1ListBackupSchedulesResponse {
685
+ /** List of all backup schedules. */
686
+ backupSchedules?:
687
+ GoogleFirestoreAdminV1BackupSchedule[];
688
+ }
689
+ interface GoogleFirestoreAdminV1ListBackupsResponse {
690
+ /** List of all backups for the project. Ordered by `location ASC, create_time DESC, name ASC`. */
691
+ backups?:
692
+ GoogleFirestoreAdminV1Backup[];
693
+ /**
694
+ * List of locations that existing backups were not able to be fetched from. Instead of failing the entire requests when a single location is unreachable, this response returns a
695
+ * partial result set and list of locations unable to be reached here. The request can be retried against a single location to get a concrete error.
696
+ */
697
+ unreachable?:
698
+ string[];
699
+ }
607
700
  interface GoogleFirestoreAdminV1ListDatabasesResponse {
608
701
  /** The databases in the project. */
609
702
  databases?:
@@ -636,6 +729,29 @@ declare namespace gapi.client {
636
729
  estimatedWork?:
637
730
  string;
638
731
  }
732
+ interface GoogleFirestoreAdminV1RestoreDatabaseRequest {
733
+ /** Required. Backup to restore from. Must be from the same project as the parent. Format is: `projects/{project_id}/locations/{location}/backups/{backup}` */
734
+ backup?:
735
+ string;
736
+ /**
737
+ * Required. The ID to use for the database, which will become the final component of the database's resource name. This database id must not be associated with an existing database.
738
+ * This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like
739
+ * /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also valid.
740
+ */
741
+ databaseId?:
742
+ string;
743
+ }
744
+ interface GoogleFirestoreAdminV1Stats {
745
+ /** Output only. The total number of documents contained in the backup. */
746
+ documentCount?:
747
+ string;
748
+ /** Output only. The total number of index entries contained in the backup. */
749
+ indexCount?:
750
+ string;
751
+ /** Output only. Summation of the size of all documents and index entries in the backup, measured in bytes. */
752
+ sizeBytes?:
753
+ string;
754
+ }
639
755
  interface GoogleFirestoreAdminV1TtlConfig {
640
756
  /** Output only. The state of the TTL configuration. */
641
757
  state?:
@@ -649,6 +765,11 @@ declare namespace gapi.client {
649
765
  // tslint:disable-next-line:no-empty-interface
650
766
  interface GoogleFirestoreAdminV1UpdateDatabaseMetadata {
651
767
  }
768
+ interface GoogleFirestoreAdminV1WeeklyRecurrence {
769
+ /** The day of week to run. DAY_OF_WEEK_UNSPECIFIED is not allowed. */
770
+ day?:
771
+ string;
772
+ }
652
773
  // tslint:disable-next-line:no-empty-interface
653
774
  interface GoogleLongrunningCancelOperationRequest {
654
775
  }
@@ -1021,6 +1142,12 @@ declare namespace gapi.client {
1021
1142
  /** A target specified by a set of document names. */
1022
1143
  documents?:
1023
1144
  DocumentsTarget;
1145
+ /**
1146
+ * The number of documents that last matched the query at the resume token or read time. This value is only relevant when a `resume_type` is provided. This value being present and
1147
+ * greater than zero signals that the client wants `ExistenceFilter.unchanged_names` to be included in the response.
1148
+ */
1149
+ expectedCount?:
1150
+ number;
1024
1151
  /** If the target should be removed once it is current and consistent. */
1025
1152
  once?:
1026
1153
  boolean;
@@ -1180,6 +1307,302 @@ declare namespace gapi.client {
1180
1307
  updateTime?:
1181
1308
  string;
1182
1309
  }
1310
+ interface BackupSchedulesResource {
1311
+ /**
1312
+ * Creates a backup schedule on a database. At most two backup schedules can be configured on a database, one daily backup schedule with retention up to 7 days and one weekly backup
1313
+ * schedule with retention up to 14 weeks.
1314
+ */
1315
+ create(request: {
1316
+ /** V1 error format. */
1317
+ "$.xgafv"?:
1318
+ string;
1319
+ /** OAuth access token. */
1320
+ access_token?:
1321
+ string;
1322
+ /** Data format for response. */
1323
+ alt?:
1324
+ string;
1325
+ /** JSONP */
1326
+ callback?:
1327
+ string;
1328
+ /** Selector specifying which fields to include in a partial response. */
1329
+ fields?:
1330
+ string;
1331
+ /** 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. */
1332
+ key?:
1333
+ string;
1334
+ /** OAuth 2.0 token for the current user. */
1335
+ oauth_token?:
1336
+ string;
1337
+ /** Required. The parent database. Format `projects/{project}/databases/{database}` */
1338
+ parent:
1339
+ string;
1340
+ /** Returns response with indentations and line breaks. */
1341
+ prettyPrint?:
1342
+ boolean;
1343
+ /** 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. */
1344
+ quotaUser?:
1345
+ string;
1346
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1347
+ upload_protocol?:
1348
+ string;
1349
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1350
+ uploadType?:
1351
+ string;
1352
+ /** Request body */
1353
+ resource:
1354
+ GoogleFirestoreAdminV1BackupSchedule;
1355
+ }): Request<GoogleFirestoreAdminV1BackupSchedule>;
1356
+ create(request: {
1357
+ /** V1 error format. */
1358
+ "$.xgafv"?:
1359
+ string;
1360
+ /** OAuth access token. */
1361
+ access_token?:
1362
+ string;
1363
+ /** Data format for response. */
1364
+ alt?:
1365
+ string;
1366
+ /** JSONP */
1367
+ callback?:
1368
+ string;
1369
+ /** Selector specifying which fields to include in a partial response. */
1370
+ fields?:
1371
+ string;
1372
+ /** 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. */
1373
+ key?:
1374
+ string;
1375
+ /** OAuth 2.0 token for the current user. */
1376
+ oauth_token?:
1377
+ string;
1378
+ /** Required. The parent database. Format `projects/{project}/databases/{database}` */
1379
+ parent:
1380
+ string;
1381
+ /** Returns response with indentations and line breaks. */
1382
+ prettyPrint?:
1383
+ boolean;
1384
+ /** 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. */
1385
+ quotaUser?:
1386
+ string;
1387
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1388
+ upload_protocol?:
1389
+ string;
1390
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1391
+ uploadType?:
1392
+ string;
1393
+ },
1394
+ body: GoogleFirestoreAdminV1BackupSchedule): Request<GoogleFirestoreAdminV1BackupSchedule>;
1395
+ /** Deletes a backup schedule. */
1396
+ delete(request?: {
1397
+ /** V1 error format. */
1398
+ "$.xgafv"?:
1399
+ string;
1400
+ /** OAuth access token. */
1401
+ access_token?:
1402
+ string;
1403
+ /** Data format for response. */
1404
+ alt?:
1405
+ string;
1406
+ /** JSONP */
1407
+ callback?:
1408
+ string;
1409
+ /** Selector specifying which fields to include in a partial response. */
1410
+ fields?:
1411
+ string;
1412
+ /** 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. */
1413
+ key?:
1414
+ string;
1415
+ /** Required. The name of backup schedule. Format `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` */
1416
+ name:
1417
+ string;
1418
+ /** OAuth 2.0 token for the current user. */
1419
+ oauth_token?:
1420
+ string;
1421
+ /** Returns response with indentations and line breaks. */
1422
+ prettyPrint?:
1423
+ boolean;
1424
+ /** 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. */
1425
+ quotaUser?:
1426
+ string;
1427
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1428
+ upload_protocol?:
1429
+ string;
1430
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1431
+ uploadType?:
1432
+ string;
1433
+ }): Request<{}>;
1434
+ /** Gets information about a backup schedule. */
1435
+ get(request?: {
1436
+ /** V1 error format. */
1437
+ "$.xgafv"?:
1438
+ string;
1439
+ /** OAuth access token. */
1440
+ access_token?:
1441
+ string;
1442
+ /** Data format for response. */
1443
+ alt?:
1444
+ string;
1445
+ /** JSONP */
1446
+ callback?:
1447
+ string;
1448
+ /** Selector specifying which fields to include in a partial response. */
1449
+ fields?:
1450
+ string;
1451
+ /** 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. */
1452
+ key?:
1453
+ string;
1454
+ /** Required. The name of the backup schedule. Format `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` */
1455
+ name:
1456
+ string;
1457
+ /** OAuth 2.0 token for the current user. */
1458
+ oauth_token?:
1459
+ string;
1460
+ /** Returns response with indentations and line breaks. */
1461
+ prettyPrint?:
1462
+ boolean;
1463
+ /** 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. */
1464
+ quotaUser?:
1465
+ string;
1466
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1467
+ upload_protocol?:
1468
+ string;
1469
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1470
+ uploadType?:
1471
+ string;
1472
+ }): Request<GoogleFirestoreAdminV1BackupSchedule>;
1473
+ /** List backup schedules. */
1474
+ list(request?: {
1475
+ /** V1 error format. */
1476
+ "$.xgafv"?:
1477
+ string;
1478
+ /** OAuth access token. */
1479
+ access_token?:
1480
+ string;
1481
+ /** Data format for response. */
1482
+ alt?:
1483
+ string;
1484
+ /** JSONP */
1485
+ callback?:
1486
+ string;
1487
+ /** Selector specifying which fields to include in a partial response. */
1488
+ fields?:
1489
+ string;
1490
+ /** 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. */
1491
+ key?:
1492
+ string;
1493
+ /** OAuth 2.0 token for the current user. */
1494
+ oauth_token?:
1495
+ string;
1496
+ /** Required. The parent database. Format is `projects/{project}/databases/{database}`. */
1497
+ parent:
1498
+ string;
1499
+ /** Returns response with indentations and line breaks. */
1500
+ prettyPrint?:
1501
+ boolean;
1502
+ /** 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. */
1503
+ quotaUser?:
1504
+ string;
1505
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1506
+ upload_protocol?:
1507
+ string;
1508
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1509
+ uploadType?:
1510
+ string;
1511
+ }): Request<GoogleFirestoreAdminV1ListBackupSchedulesResponse>;
1512
+ /** Updates a backup schedule. */
1513
+ patch(request: {
1514
+ /** V1 error format. */
1515
+ "$.xgafv"?:
1516
+ string;
1517
+ /** OAuth access token. */
1518
+ access_token?:
1519
+ string;
1520
+ /** Data format for response. */
1521
+ alt?:
1522
+ string;
1523
+ /** JSONP */
1524
+ callback?:
1525
+ string;
1526
+ /** Selector specifying which fields to include in a partial response. */
1527
+ fields?:
1528
+ string;
1529
+ /** 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. */
1530
+ key?:
1531
+ string;
1532
+ /**
1533
+ * Output only. The unique backup schedule identifier across all locations and databases for the given project. This will be auto-assigned. Format is
1534
+ * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`
1535
+ */
1536
+ name:
1537
+ string;
1538
+ /** OAuth 2.0 token for the current user. */
1539
+ oauth_token?:
1540
+ string;
1541
+ /** Returns response with indentations and line breaks. */
1542
+ prettyPrint?:
1543
+ boolean;
1544
+ /** 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. */
1545
+ quotaUser?:
1546
+ string;
1547
+ /** The list of fields to be updated. */
1548
+ updateMask?:
1549
+ string;
1550
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1551
+ upload_protocol?:
1552
+ string;
1553
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1554
+ uploadType?:
1555
+ string;
1556
+ /** Request body */
1557
+ resource:
1558
+ GoogleFirestoreAdminV1BackupSchedule;
1559
+ }): Request<GoogleFirestoreAdminV1BackupSchedule>;
1560
+ patch(request: {
1561
+ /** V1 error format. */
1562
+ "$.xgafv"?:
1563
+ string;
1564
+ /** OAuth access token. */
1565
+ access_token?:
1566
+ string;
1567
+ /** Data format for response. */
1568
+ alt?:
1569
+ string;
1570
+ /** JSONP */
1571
+ callback?:
1572
+ string;
1573
+ /** Selector specifying which fields to include in a partial response. */
1574
+ fields?:
1575
+ string;
1576
+ /** 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. */
1577
+ key?:
1578
+ string;
1579
+ /**
1580
+ * Output only. The unique backup schedule identifier across all locations and databases for the given project. This will be auto-assigned. Format is
1581
+ * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`
1582
+ */
1583
+ name:
1584
+ string;
1585
+ /** OAuth 2.0 token for the current user. */
1586
+ oauth_token?:
1587
+ string;
1588
+ /** Returns response with indentations and line breaks. */
1589
+ prettyPrint?:
1590
+ boolean;
1591
+ /** 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. */
1592
+ quotaUser?:
1593
+ string;
1594
+ /** The list of fields to be updated. */
1595
+ updateMask?:
1596
+ string;
1597
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1598
+ upload_protocol?:
1599
+ string;
1600
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1601
+ uploadType?:
1602
+ string;
1603
+ },
1604
+ body: GoogleFirestoreAdminV1BackupSchedule): Request<GoogleFirestoreAdminV1BackupSchedule>;
1605
+ }
1183
1606
  interface FieldsResource {
1184
1607
  /** Gets the metadata and configuration for a Field. */
1185
1608
  get(request?: {
@@ -3687,6 +4110,95 @@ declare namespace gapi.client {
3687
4110
  string;
3688
4111
  },
3689
4112
  body: GoogleFirestoreAdminV1Database): Request<GoogleLongrunningOperation>;
4113
+ /**
4114
+ * Create a new database by restore from an existing backup. The new database must be in the same cloud region or multi-region location as the existing backup. This behaves similar to
4115
+ * FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing
4116
+ * backup. The long-running operation can be used to track the progress of the restore, with the Operation's metadata field type being the RestoreDatabaseMetadata. The response type is
4117
+ * the Database if the restore was successful. The new database is not readable or writeable until the LRO has completed. Cancelling the returned operation will stop the restore and
4118
+ * delete the in-progress database, if the restore is still active.
4119
+ */
4120
+ restore(request: {
4121
+ /** V1 error format. */
4122
+ "$.xgafv"?:
4123
+ string;
4124
+ /** OAuth access token. */
4125
+ access_token?:
4126
+ string;
4127
+ /** Data format for response. */
4128
+ alt?:
4129
+ string;
4130
+ /** JSONP */
4131
+ callback?:
4132
+ string;
4133
+ /** Selector specifying which fields to include in a partial response. */
4134
+ fields?:
4135
+ string;
4136
+ /** 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. */
4137
+ key?:
4138
+ string;
4139
+ /** OAuth 2.0 token for the current user. */
4140
+ oauth_token?:
4141
+ string;
4142
+ /** Required. The project to restore the database in. Format is `projects/{project_id}`. */
4143
+ parent:
4144
+ string;
4145
+ /** Returns response with indentations and line breaks. */
4146
+ prettyPrint?:
4147
+ boolean;
4148
+ /** 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. */
4149
+ quotaUser?:
4150
+ string;
4151
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4152
+ upload_protocol?:
4153
+ string;
4154
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4155
+ uploadType?:
4156
+ string;
4157
+ /** Request body */
4158
+ resource:
4159
+ GoogleFirestoreAdminV1RestoreDatabaseRequest;
4160
+ }): Request<GoogleLongrunningOperation>;
4161
+ restore(request: {
4162
+ /** V1 error format. */
4163
+ "$.xgafv"?:
4164
+ string;
4165
+ /** OAuth access token. */
4166
+ access_token?:
4167
+ string;
4168
+ /** Data format for response. */
4169
+ alt?:
4170
+ string;
4171
+ /** JSONP */
4172
+ callback?:
4173
+ string;
4174
+ /** Selector specifying which fields to include in a partial response. */
4175
+ fields?:
4176
+ string;
4177
+ /** 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. */
4178
+ key?:
4179
+ string;
4180
+ /** OAuth 2.0 token for the current user. */
4181
+ oauth_token?:
4182
+ string;
4183
+ /** Required. The project to restore the database in. Format is `projects/{project_id}`. */
4184
+ parent:
4185
+ string;
4186
+ /** Returns response with indentations and line breaks. */
4187
+ prettyPrint?:
4188
+ boolean;
4189
+ /** 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. */
4190
+ quotaUser?:
4191
+ string;
4192
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4193
+ upload_protocol?:
4194
+ string;
4195
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4196
+ uploadType?:
4197
+ string;
4198
+ },
4199
+ body: GoogleFirestoreAdminV1RestoreDatabaseRequest): Request<GoogleLongrunningOperation>;
4200
+ backupSchedules:
4201
+ BackupSchedulesResource;
3690
4202
  collectionGroups:
3691
4203
  CollectionGroupsResource;
3692
4204
  documents:
@@ -3694,6 +4206,128 @@ declare namespace gapi.client {
3694
4206
  operations:
3695
4207
  OperationsResource;
3696
4208
  }
4209
+ interface BackupsResource {
4210
+ /** Deletes a backup. */
4211
+ delete(request?: {
4212
+ /** V1 error format. */
4213
+ "$.xgafv"?:
4214
+ string;
4215
+ /** OAuth access token. */
4216
+ access_token?:
4217
+ string;
4218
+ /** Data format for response. */
4219
+ alt?:
4220
+ string;
4221
+ /** JSONP */
4222
+ callback?:
4223
+ string;
4224
+ /** Selector specifying which fields to include in a partial response. */
4225
+ fields?:
4226
+ string;
4227
+ /** 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. */
4228
+ key?:
4229
+ string;
4230
+ /** Required. Name of the backup to delete. format is `projects/{project}/locations/{location}/backups/{backup}`. */
4231
+ name:
4232
+ string;
4233
+ /** OAuth 2.0 token for the current user. */
4234
+ oauth_token?:
4235
+ string;
4236
+ /** Returns response with indentations and line breaks. */
4237
+ prettyPrint?:
4238
+ boolean;
4239
+ /** 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. */
4240
+ quotaUser?:
4241
+ string;
4242
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4243
+ upload_protocol?:
4244
+ string;
4245
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4246
+ uploadType?:
4247
+ string;
4248
+ }): Request<{}>;
4249
+ /** Gets information about a backup. */
4250
+ get(request?: {
4251
+ /** V1 error format. */
4252
+ "$.xgafv"?:
4253
+ string;
4254
+ /** OAuth access token. */
4255
+ access_token?:
4256
+ string;
4257
+ /** Data format for response. */
4258
+ alt?:
4259
+ string;
4260
+ /** JSONP */
4261
+ callback?:
4262
+ string;
4263
+ /** Selector specifying which fields to include in a partial response. */
4264
+ fields?:
4265
+ string;
4266
+ /** 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. */
4267
+ key?:
4268
+ string;
4269
+ /** Required. Name of the backup to fetch. Format is `projects/{project}/locations/{location}/backups/{backup}`. */
4270
+ name:
4271
+ string;
4272
+ /** OAuth 2.0 token for the current user. */
4273
+ oauth_token?:
4274
+ string;
4275
+ /** Returns response with indentations and line breaks. */
4276
+ prettyPrint?:
4277
+ boolean;
4278
+ /** 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. */
4279
+ quotaUser?:
4280
+ string;
4281
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4282
+ upload_protocol?:
4283
+ string;
4284
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4285
+ uploadType?:
4286
+ string;
4287
+ }): Request<GoogleFirestoreAdminV1Backup>;
4288
+ /** Lists all the backups. */
4289
+ list(request?: {
4290
+ /** V1 error format. */
4291
+ "$.xgafv"?:
4292
+ string;
4293
+ /** OAuth access token. */
4294
+ access_token?:
4295
+ string;
4296
+ /** Data format for response. */
4297
+ alt?:
4298
+ string;
4299
+ /** JSONP */
4300
+ callback?:
4301
+ string;
4302
+ /** Selector specifying which fields to include in a partial response. */
4303
+ fields?:
4304
+ string;
4305
+ /** 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. */
4306
+ key?:
4307
+ string;
4308
+ /** OAuth 2.0 token for the current user. */
4309
+ oauth_token?:
4310
+ string;
4311
+ /**
4312
+ * Required. The location to list backups from. Format is `projects/{project}/locations/{location}`. Use `{location} = '-'` to list backups from all locations for the given
4313
+ * project. This allows listing backups from a single location or from all locations.
4314
+ */
4315
+ parent:
4316
+ string;
4317
+ /** Returns response with indentations and line breaks. */
4318
+ prettyPrint?:
4319
+ boolean;
4320
+ /** 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. */
4321
+ quotaUser?:
4322
+ string;
4323
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4324
+ upload_protocol?:
4325
+ string;
4326
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4327
+ uploadType?:
4328
+ string;
4329
+ }): Request<GoogleFirestoreAdminV1ListBackupsResponse>;
4330
+ }
3697
4331
  interface LocationsResource {
3698
4332
  /** Gets information about a location. */
3699
4333
  get(request?: {
@@ -3785,6 +4419,8 @@ declare namespace gapi.client {
3785
4419
  uploadType?:
3786
4420
  string;
3787
4421
  }): Request<ListLocationsResponse>;
4422
+ backups:
4423
+ BackupsResource;
3788
4424
  }
3789
4425
  interface ProjectsResource {
3790
4426
  databases:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.firestore-v1",
3
- "version": "0.0.20230421",
3
+ "version": "0.0.20230508",
4
4
  "description": "TypeScript typings for Cloud Firestore API v1",
5
5
  "license": "MIT",
6
6
  "author": {
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: 20230421
6
+ // Revision: 20230508
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -112,6 +112,63 @@ gapi.load('client', async () => {
112
112
  uid: "Test string",
113
113
  updateTime: "Test string",
114
114
  });
115
+ /**
116
+ * Create a new database by restore from an existing backup. The new database must be in the same cloud region or multi-region location as the existing backup. This behaves similar to
117
+ * FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing
118
+ * backup. The long-running operation can be used to track the progress of the restore, with the Operation's metadata field type being the RestoreDatabaseMetadata. The response type is the
119
+ * Database if the restore was successful. The new database is not readable or writeable until the LRO has completed. Cancelling the returned operation will stop the restore and delete the
120
+ * in-progress database, if the restore is still active.
121
+ */
122
+ await gapi.client.firestore.projects.databases.restore({
123
+ parent: "Test string",
124
+ }, {
125
+ backup: "Test string",
126
+ databaseId: "Test string",
127
+ });
128
+ /**
129
+ * Creates a backup schedule on a database. At most two backup schedules can be configured on a database, one daily backup schedule with retention up to 7 days and one weekly backup
130
+ * schedule with retention up to 14 weeks.
131
+ */
132
+ await gapi.client.firestore.projects.databases.backupSchedules.create({
133
+ parent: "Test string",
134
+ }, {
135
+ createTime: "Test string",
136
+ dailyRecurrence: {
137
+ },
138
+ name: "Test string",
139
+ retention: "Test string",
140
+ updateTime: "Test string",
141
+ weeklyRecurrence: {
142
+ day: "Test string",
143
+ },
144
+ });
145
+ /** Deletes a backup schedule. */
146
+ await gapi.client.firestore.projects.databases.backupSchedules.delete({
147
+ name: "Test string",
148
+ });
149
+ /** Gets information about a backup schedule. */
150
+ await gapi.client.firestore.projects.databases.backupSchedules.get({
151
+ name: "Test string",
152
+ });
153
+ /** List backup schedules. */
154
+ await gapi.client.firestore.projects.databases.backupSchedules.list({
155
+ parent: "Test string",
156
+ });
157
+ /** Updates a backup schedule. */
158
+ await gapi.client.firestore.projects.databases.backupSchedules.patch({
159
+ name: "Test string",
160
+ updateMask: "Test string",
161
+ }, {
162
+ createTime: "Test string",
163
+ dailyRecurrence: {
164
+ },
165
+ name: "Test string",
166
+ retention: "Test string",
167
+ updateTime: "Test string",
168
+ weeklyRecurrence: {
169
+ day: "Test string",
170
+ },
171
+ });
115
172
  /** Gets the metadata and configuration for a Field. */
116
173
  await gapi.client.firestore.projects.databases.collectionGroups.fields.get({
117
174
  name: "Test string",
@@ -865,6 +922,7 @@ gapi.load('client', async () => {
865
922
  "Test string"
866
923
  ],
867
924
  },
925
+ expectedCount: 42,
868
926
  once: true,
869
927
  query: {
870
928
  parent: "Test string",
@@ -1738,5 +1796,17 @@ gapi.load('client', async () => {
1738
1796
  pageSize: 42,
1739
1797
  pageToken: "Test string",
1740
1798
  });
1799
+ /** Deletes a backup. */
1800
+ await gapi.client.firestore.projects.locations.backups.delete({
1801
+ name: "Test string",
1802
+ });
1803
+ /** Gets information about a backup. */
1804
+ await gapi.client.firestore.projects.locations.backups.get({
1805
+ name: "Test string",
1806
+ });
1807
+ /** Lists all the backups. */
1808
+ await gapi.client.firestore.projects.locations.backups.list({
1809
+ parent: "Test string",
1810
+ });
1741
1811
  }
1742
1812
  });