@maxim_mazurok/gapi.client.firestore-v1 0.2.20260310 → 0.2.20260529

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 +47 -8
  2. package/package.json +1 -1
  3. package/readme.md +12 -0
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: 20260310
12
+ // Revision: 20260529
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -426,7 +426,7 @@ declare namespace gapi.client {
426
426
  | 'DISABLED';
427
427
  /** Optional. Presence indicates CMEK is enabled for this database. */
428
428
  cmekConfig?: GoogleFirestoreAdminV1CmekConfig;
429
- /** The concurrency control mode to use for this database. If unspecified in a CreateDatabase request, this will default based on the database edition: Optimistic for Enterprise and Pessimistic for all other databases. */
429
+ /** The default concurrency control mode to use for this database. If unspecified in a CreateDatabase request, this will default based on the database edition: Optimistic for Enterprise and Pessimistic for all other databases. While transactions can explicitly specify their own concurrency mode, this setting defines the default behavior when left unspecified. Important: This database-level setting is not respected for Firestore with MongoDB compatibility. All transactions through the MongoDB compatibility layer will use optimistic concurrency control, regardless of this setting. */
430
430
  concurrencyMode?:
431
431
  | 'CONCURRENCY_MODE_UNSPECIFIED'
432
432
  | 'OPTIMISTIC'
@@ -636,6 +636,8 @@ declare namespace gapi.client {
636
636
  | 'COLLECTION'
637
637
  | 'COLLECTION_GROUP'
638
638
  | 'COLLECTION_RECURSIVE';
639
+ /** Optional. Options for search indexes that are at the index definition level. This field is only currently supported for indexes with MONGODB_COMPATIBLE_API ApiScope. */
640
+ searchIndexOptions?: GoogleFirestoreAdminV1SearchIndexOptions;
639
641
  /** Optional. The number of shards for the index. */
640
642
  shardCount?: number;
641
643
  /** Output only. The serving state of the index. */
@@ -666,6 +668,8 @@ declare namespace gapi.client {
666
668
  fieldPath?: string;
667
669
  /** Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=. */
668
670
  order?: 'ORDER_UNSPECIFIED' | 'ASCENDING' | 'DESCENDING';
671
+ /** Indicates that this field supports search operations. */
672
+ searchConfig?: GoogleFirestoreAdminV1SearchConfig;
669
673
  /** Indicates that this field supports nearest neighbor and distance operations on vector. */
670
674
  vectorConfig?: GoogleFirestoreAdminV1VectorConfig;
671
675
  }
@@ -775,6 +779,32 @@ declare namespace gapi.client {
775
779
  /** Optional. Immutable. Tags to be bound to the restored database. The tags should be provided in the format of `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. */
776
780
  tags?: {[P in string]: string};
777
781
  }
782
+ interface GoogleFirestoreAdminV1SearchConfig {
783
+ /** Optional. The specification for building a geo search index for a field. */
784
+ geoSpec?: GoogleFirestoreAdminV1SearchGeoSpec;
785
+ /** Optional. The specification for building a text search index for a field. */
786
+ textSpec?: GoogleFirestoreAdminV1SearchTextSpec;
787
+ }
788
+ interface GoogleFirestoreAdminV1SearchGeoSpec {
789
+ /** Optional. Disables geoJSON indexing for the field. By default, geoJSON points are indexed. */
790
+ geoJsonIndexingDisabled?: boolean;
791
+ }
792
+ interface GoogleFirestoreAdminV1SearchIndexOptions {
793
+ /** Optional. The language to use for text search indexes. Used as the default language if not overridden at the document level by specifying the `text_language_override_field`. The language is specified as a BCP 47 language code. For indexes with MONGODB_COMPATIBLE_API ApiScope: If unspecified, the default language is English. For indexes with `ANY_API` ApiScope: If unspecified, the default behavior is autodetect. */
794
+ textLanguage?: string;
795
+ /** Optional. The field in the document that specifies which language to use for that specific document. For indexes with MONGODB_COMPATIBLE_API ApiScope: if unspecified, the language is taken from the "language" field if it exists or from `text_language` if it does not. */
796
+ textLanguageOverrideFieldPath?: string;
797
+ }
798
+ interface GoogleFirestoreAdminV1SearchTextIndexSpec {
799
+ /** Required. How to index the text field value. */
800
+ indexType?: 'TEXT_INDEX_TYPE_UNSPECIFIED' | 'TOKENIZED';
801
+ /** Required. How to match the text field value. */
802
+ matchType?: 'TEXT_MATCH_TYPE_UNSPECIFIED' | 'MATCH_GLOBALLY';
803
+ }
804
+ interface GoogleFirestoreAdminV1SearchTextSpec {
805
+ /** Required. Specifications for how the field should be indexed. Repeated so that the field can be indexed in multiple ways. */
806
+ indexSpecs?: GoogleFirestoreAdminV1SearchTextIndexSpec[];
807
+ }
778
808
  interface GoogleFirestoreAdminV1SourceEncryptionOptions {}
779
809
  interface GoogleFirestoreAdminV1SourceInfo {
780
810
  /** If set, this database was restored from the specified backup (or a snapshot thereof). */
@@ -791,12 +821,16 @@ declare namespace gapi.client {
791
821
  sizeBytes?: string;
792
822
  }
793
823
  interface GoogleFirestoreAdminV1TtlConfig {
824
+ /** Optional. The offset, relative to the timestamp value from the TTL-enabled field, used to determine the document's expiration time. `expiration_offset.seconds` must be between 0 and 2,147,483,647 inclusive. Values more precise than seconds are rejected. If unset, defaults to 0, in which case the expiration time is the same as the timestamp value from the TTL-enabled field. */
825
+ expirationOffset?: string;
794
826
  /** Output only. The state of the TTL configuration. */
795
827
  state?: 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'NEEDS_REPAIR';
796
828
  }
797
829
  interface GoogleFirestoreAdminV1TtlConfigDelta {
798
830
  /** Specifies how the TTL configuration is changing. */
799
831
  changeType?: 'CHANGE_TYPE_UNSPECIFIED' | 'ADD' | 'REMOVE';
832
+ /** The offset, relative to the timestamp value in the TTL-enabled field, used determine the document's expiration time. */
833
+ expirationOffset?: string;
800
834
  }
801
835
  interface GoogleFirestoreAdminV1UpdateDatabaseMetadata {}
802
836
  interface GoogleFirestoreAdminV1UserCreds {
@@ -950,7 +984,7 @@ declare namespace gapi.client {
950
984
  }
951
985
  interface PlanSummary {
952
986
  /** The indexes selected for the query. For example: [ {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} ] */
953
- indexesUsed?: Array<{[P in string]: any}>;
987
+ indexesUsed?: {[P in string]: any}[];
954
988
  }
955
989
  interface Precondition {
956
990
  /** When set to `true`, the target document must exist. When set to `false`, the target document must not exist. */
@@ -973,6 +1007,11 @@ declare namespace gapi.client {
973
1007
  readTime?: string;
974
1008
  }
975
1009
  interface ReadWrite {
1010
+ /** Optional. The concurrency control mode to use for this transaction. A database is able to use different concurrency modes for different transactions simultaneously. 3rd party auth requests are only allowed to create optimistic read-write transactions and must specify that here even if the database-level setting is already configured to optimistic. */
1011
+ concurrencyMode?:
1012
+ | 'CONCURRENCY_MODE_UNSPECIFIED'
1013
+ | 'OPTIMISTIC'
1014
+ | 'PESSIMISTIC';
976
1015
  /** An optional transaction to retry. */
977
1016
  retryTransaction?: string;
978
1017
  }
@@ -1040,7 +1079,7 @@ declare namespace gapi.client {
1040
1079
  /** The status code, which should be an enum value of google.rpc.Code. */
1041
1080
  code?: number;
1042
1081
  /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
1043
- details?: Array<{[P in string]: any}>;
1082
+ details?: {[P in string]: any}[];
1044
1083
  /** A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. */
1045
1084
  message?: string;
1046
1085
  }
@@ -2159,7 +2198,7 @@ declare namespace gapi.client {
2159
2198
  key?: string;
2160
2199
  /** OAuth 2.0 token for the current user. */
2161
2200
  oauth_token?: string;
2162
- /** Required. The parent document. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` */
2201
+ /** Required. The parent document. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` Use `projects/{project_id}/databases/{database_id}/documents` to list top-level collections. */
2163
2202
  parent: string;
2164
2203
  /** Returns response with indentations and line breaks. */
2165
2204
  prettyPrint?: boolean;
@@ -2188,7 +2227,7 @@ declare namespace gapi.client {
2188
2227
  key?: string;
2189
2228
  /** OAuth 2.0 token for the current user. */
2190
2229
  oauth_token?: string;
2191
- /** Required. The parent document. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` */
2230
+ /** Required. The parent document. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` Use `projects/{project_id}/databases/{database_id}/documents` to list top-level collections. */
2192
2231
  parent: string;
2193
2232
  /** Returns response with indentations and line breaks. */
2194
2233
  prettyPrint?: boolean;
@@ -3754,7 +3793,7 @@ declare namespace gapi.client {
3754
3793
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3755
3794
  uploadType?: string;
3756
3795
  }): Request<Location>;
3757
- /** 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. */
3796
+ /** Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: * **Global locations**: If `name` is empty, the method lists the public locations available to all projects. * **Project-specific locations**: If `name` follows the format `projects/{project}`, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project. For gRPC and client library implementations, the resource name is passed as the `name` field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version. */
3758
3797
  list(request?: {
3759
3798
  /** V1 error format. */
3760
3799
  '$.xgafv'?: '1' | '2';
@@ -3764,7 +3803,7 @@ declare namespace gapi.client {
3764
3803
  alt?: 'json' | 'media' | 'proto';
3765
3804
  /** JSONP */
3766
3805
  callback?: string;
3767
- /** Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage. */
3806
+ /** Optional. Do not use this field unless explicitly documented otherwise. This is primarily for internal usage. */
3768
3807
  extraLocationTypes?: string | string[];
3769
3808
  /** Selector specifying which fields to include in a partial response. */
3770
3809
  fields?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.firestore-v1",
3
- "version": "0.2.20260310",
3
+ "version": "0.2.20260529",
4
4
  "description": "TypeScript typings for Cloud Firestore API v1",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -11,6 +11,18 @@ Install typings for Cloud Firestore API:
11
11
  npm install @types/gapi.client.firestore-v1 --save-dev
12
12
  ```
13
13
 
14
+ ## TypeScript 6.0+
15
+
16
+ TypeScript 6.0 changed `types` to default to `[]`. You must now explicitly list type packages in `tsconfig.json`:
17
+
18
+ ```json
19
+ {
20
+ "compilerOptions": {
21
+ "types": ["gapi", "gapi.auth2", "gapi.client", "gapi.client.firestore-v1"]
22
+ }
23
+ }
24
+ ```
25
+
14
26
  ## Usage
15
27
 
16
28
  You need to initialize Google API client in your code: