@maxim_mazurok/gapi.client.documentai-v1beta3 0.0.20230504 → 0.0.20230526

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 +293 -1
  2. package/package.json +1 -1
  3. package/tests.ts +89 -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://documentai.googleapis.com/$discovery/rest?version=v1beta3
12
- // Revision: 20230504
12
+ // Revision: 20230526
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -148,11 +148,15 @@ declare namespace gapi.client {
148
148
  interface GoogleCloudDocumentaiUiv1beta3DisableProcessorResponse {
149
149
  }
150
150
  interface GoogleCloudDocumentaiUiv1beta3DocumentId {
151
+ /** A document id within user managed Cloud Storage. */
151
152
  gcsManagedDocId?:
152
153
  GoogleCloudDocumentaiUiv1beta3DocumentIdGCSManagedDocumentId;
153
154
  /** Points to a specific revision of the document if set. */
154
155
  revisionRef?:
155
156
  GoogleCloudDocumentaiUiv1beta3RevisionRef;
157
+ /** A document id within unmanaged dataset. */
158
+ unmanagedDocId?:
159
+ GoogleCloudDocumentaiUiv1beta3DocumentIdUnmanagedDocumentId;
156
160
  }
157
161
  interface GoogleCloudDocumentaiUiv1beta3DocumentIdGCSManagedDocumentId {
158
162
  /** Id of the document (indexed) managed by Content Warehouse. */
@@ -162,6 +166,11 @@ declare namespace gapi.client {
162
166
  gcsUri?:
163
167
  string;
164
168
  }
169
+ interface GoogleCloudDocumentaiUiv1beta3DocumentIdUnmanagedDocumentId {
170
+ /** Required. The id of the document. */
171
+ docId?:
172
+ string;
173
+ }
165
174
  interface GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata {
166
175
  /** The basic metadata of the long-running operation. */
167
176
  commonMetadata?:
@@ -2016,6 +2025,53 @@ declare namespace gapi.client {
2016
2025
  updateTime?:
2017
2026
  string;
2018
2027
  }
2028
+ interface GoogleCloudDocumentaiV1beta3Dataset {
2029
+ /** Optional. Document Warehouse-based dataset config. */
2030
+ documentWarehouseConfig?:
2031
+ GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig;
2032
+ /** Optional. User managed GCS dataset config. Use this config if the dataset documents are stored under a user managed GCS location. */
2033
+ gcsManagedConfig?:
2034
+ GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig;
2035
+ /** Dataset resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset` */
2036
+ name?:
2037
+ string;
2038
+ /** Optional. A lightweight indexing source with low latency and high reliablity, but lack advanced features like CMEK and content based search. */
2039
+ spannerIndexingConfig?:
2040
+ any;
2041
+ /** Required. State of the dataset. Will be ignored when updating dataset. */
2042
+ state?:
2043
+ string;
2044
+ /** Optional. Unmanaged dataset config. Use this config if the dataset documents are managed by the document service internally (not user managed). */
2045
+ unmanagedDatasetConfig?:
2046
+ any;
2047
+ }
2048
+ interface GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig {
2049
+ /** Output only. The collection in Document Warehouse associated with the dataset. */
2050
+ collection?:
2051
+ string;
2052
+ /** Output only. The schema in Document Warehouse associated with the dataset. */
2053
+ schema?:
2054
+ string;
2055
+ }
2056
+ interface GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig {
2057
+ /** Required. The Cloud Storage uri (a directory) where the documents belonging to the dataset must be stored. */
2058
+ gcsPrefix?:
2059
+ GoogleCloudDocumentaiV1beta3GcsPrefix;
2060
+ }
2061
+ interface GoogleCloudDocumentaiV1beta3DatasetSchema {
2062
+ /** Optional. Schema of the dataset. */
2063
+ documentSchema?:
2064
+ GoogleCloudDocumentaiV1beta3DocumentSchema;
2065
+ /** Dataset schema resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema` */
2066
+ name?:
2067
+ string;
2068
+ }
2069
+ // tslint:disable-next-line:no-empty-interface
2070
+ interface GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig {
2071
+ }
2072
+ // tslint:disable-next-line:no-empty-interface
2073
+ interface GoogleCloudDocumentaiV1beta3DatasetUnmanagedDatasetConfig {
2074
+ }
2019
2075
  interface GoogleCloudDocumentaiV1beta3DeleteProcessorMetadata {
2020
2076
  /** The basic metadata of the long-running operation. */
2021
2077
  commonMetadata?:
@@ -2640,6 +2696,9 @@ declare namespace gapi.client {
2640
2696
  /** User defined name for the type. */
2641
2697
  displayName?:
2642
2698
  string;
2699
+ /** Metadata for the entity type. */
2700
+ entityTypeMetadata?:
2701
+ GoogleCloudDocumentaiV1beta3EntityTypeMetadata;
2643
2702
  /**
2644
2703
  * If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is >10 or could change frequently use the
2645
2704
  * `EntityType.value_ontology` field and specify a list of all possible values in a value ontology file.
@@ -2670,6 +2729,9 @@ declare namespace gapi.client {
2670
2729
  /** Occurrence type limits the number of instances an entity type appears in the document. */
2671
2730
  occurrenceType?:
2672
2731
  string;
2732
+ /** Any additional metadata about the property can be added here. */
2733
+ propertyMetadata?:
2734
+ GoogleCloudDocumentaiV1beta3PropertyMetadata;
2673
2735
  /** A reference to the value type of the property. This type is subject to the same conventions as the `Entity.base_types` field. */
2674
2736
  valueType?:
2675
2737
  string;
@@ -2777,6 +2839,11 @@ declare namespace gapi.client {
2777
2839
  // tslint:disable-next-line:no-empty-interface
2778
2840
  interface GoogleCloudDocumentaiV1beta3EnableProcessorResponse {
2779
2841
  }
2842
+ interface GoogleCloudDocumentaiV1beta3EntityTypeMetadata {
2843
+ /** Whether the entity type should be considered as "inactive". */
2844
+ inactive?:
2845
+ boolean;
2846
+ }
2780
2847
  interface GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata {
2781
2848
  /** The basic metadata of the long-running operation. */
2782
2849
  commonMetadata?:
@@ -3172,6 +3239,11 @@ declare namespace gapi.client {
3172
3239
  humanReviewStatus?:
3173
3240
  GoogleCloudDocumentaiV1beta3HumanReviewStatus;
3174
3241
  }
3242
+ interface GoogleCloudDocumentaiV1beta3PropertyMetadata {
3243
+ /** Whether the property should be considered as "inactive". */
3244
+ inactive?:
3245
+ boolean;
3246
+ }
3175
3247
  interface GoogleCloudDocumentaiV1beta3RawDocument {
3176
3248
  /** Inline document content. */
3177
3249
  content?:
@@ -3811,6 +3883,137 @@ declare namespace gapi.client {
3811
3883
  string;
3812
3884
  }): Request<GoogleLongrunningListOperationsResponse>;
3813
3885
  }
3886
+ interface DatasetResource {
3887
+ /** Gets the DatasetSchema of a Dataset. */
3888
+ getDatasetSchema(request?: {
3889
+ /** V1 error format. */
3890
+ "$.xgafv"?:
3891
+ string;
3892
+ /** OAuth access token. */
3893
+ access_token?:
3894
+ string;
3895
+ /** Data format for response. */
3896
+ alt?:
3897
+ string;
3898
+ /** JSONP */
3899
+ callback?:
3900
+ string;
3901
+ /** Selector specifying which fields to include in a partial response. */
3902
+ fields?:
3903
+ string;
3904
+ /** 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. */
3905
+ key?:
3906
+ string;
3907
+ /** Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema */
3908
+ name:
3909
+ string;
3910
+ /** OAuth 2.0 token for the current user. */
3911
+ oauth_token?:
3912
+ string;
3913
+ /** Returns response with indentations and line breaks. */
3914
+ prettyPrint?:
3915
+ boolean;
3916
+ /** 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. */
3917
+ quotaUser?:
3918
+ string;
3919
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3920
+ upload_protocol?:
3921
+ string;
3922
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3923
+ uploadType?:
3924
+ string;
3925
+ /** If set, only returns the visible fields of the schema. */
3926
+ visibleFieldsOnly?:
3927
+ boolean;
3928
+ }): Request<GoogleCloudDocumentaiV1beta3DatasetSchema>;
3929
+ /** Updates a DatasetSchema. */
3930
+ updateDatasetSchema(request: {
3931
+ /** V1 error format. */
3932
+ "$.xgafv"?:
3933
+ string;
3934
+ /** OAuth access token. */
3935
+ access_token?:
3936
+ string;
3937
+ /** Data format for response. */
3938
+ alt?:
3939
+ string;
3940
+ /** JSONP */
3941
+ callback?:
3942
+ string;
3943
+ /** Selector specifying which fields to include in a partial response. */
3944
+ fields?:
3945
+ string;
3946
+ /** 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. */
3947
+ key?:
3948
+ string;
3949
+ /** Dataset schema resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema` */
3950
+ name:
3951
+ string;
3952
+ /** OAuth 2.0 token for the current user. */
3953
+ oauth_token?:
3954
+ string;
3955
+ /** Returns response with indentations and line breaks. */
3956
+ prettyPrint?:
3957
+ boolean;
3958
+ /** 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. */
3959
+ quotaUser?:
3960
+ string;
3961
+ /** The update mask applies to the resource. */
3962
+ updateMask?:
3963
+ string;
3964
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3965
+ upload_protocol?:
3966
+ string;
3967
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3968
+ uploadType?:
3969
+ string;
3970
+ /** Request body */
3971
+ resource:
3972
+ GoogleCloudDocumentaiV1beta3DatasetSchema;
3973
+ }): Request<GoogleCloudDocumentaiV1beta3DatasetSchema>;
3974
+ updateDatasetSchema(request: {
3975
+ /** V1 error format. */
3976
+ "$.xgafv"?:
3977
+ string;
3978
+ /** OAuth access token. */
3979
+ access_token?:
3980
+ string;
3981
+ /** Data format for response. */
3982
+ alt?:
3983
+ string;
3984
+ /** JSONP */
3985
+ callback?:
3986
+ string;
3987
+ /** Selector specifying which fields to include in a partial response. */
3988
+ fields?:
3989
+ string;
3990
+ /** 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. */
3991
+ key?:
3992
+ string;
3993
+ /** Dataset schema resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema` */
3994
+ name:
3995
+ string;
3996
+ /** OAuth 2.0 token for the current user. */
3997
+ oauth_token?:
3998
+ string;
3999
+ /** Returns response with indentations and line breaks. */
4000
+ prettyPrint?:
4001
+ boolean;
4002
+ /** 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. */
4003
+ quotaUser?:
4004
+ string;
4005
+ /** The update mask applies to the resource. */
4006
+ updateMask?:
4007
+ string;
4008
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4009
+ upload_protocol?:
4010
+ string;
4011
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4012
+ uploadType?:
4013
+ string;
4014
+ },
4015
+ body: GoogleCloudDocumentaiV1beta3DatasetSchema): Request<GoogleCloudDocumentaiV1beta3DatasetSchema>;
4016
+ }
3814
4017
  interface HumanReviewConfigResource {
3815
4018
  /** Send a document for Human Review. The input document should be processed by the specified processor. */
3816
4019
  reviewDocument(request: {
@@ -5317,6 +5520,95 @@ declare namespace gapi.client {
5317
5520
  string;
5318
5521
  },
5319
5522
  body: GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionRequest): Request<GoogleLongrunningOperation>;
5523
+ /** Updates metadata associated with a dataset. */
5524
+ updateDataset(request: {
5525
+ /** V1 error format. */
5526
+ "$.xgafv"?:
5527
+ string;
5528
+ /** OAuth access token. */
5529
+ access_token?:
5530
+ string;
5531
+ /** Data format for response. */
5532
+ alt?:
5533
+ string;
5534
+ /** JSONP */
5535
+ callback?:
5536
+ string;
5537
+ /** Selector specifying which fields to include in a partial response. */
5538
+ fields?:
5539
+ string;
5540
+ /** 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. */
5541
+ key?:
5542
+ string;
5543
+ /** Dataset resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset` */
5544
+ name:
5545
+ string;
5546
+ /** OAuth 2.0 token for the current user. */
5547
+ oauth_token?:
5548
+ string;
5549
+ /** Returns response with indentations and line breaks. */
5550
+ prettyPrint?:
5551
+ boolean;
5552
+ /** 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. */
5553
+ quotaUser?:
5554
+ string;
5555
+ /** The update mask applies to the resource. */
5556
+ updateMask?:
5557
+ string;
5558
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
5559
+ upload_protocol?:
5560
+ string;
5561
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
5562
+ uploadType?:
5563
+ string;
5564
+ /** Request body */
5565
+ resource:
5566
+ GoogleCloudDocumentaiV1beta3Dataset;
5567
+ }): Request<GoogleLongrunningOperation>;
5568
+ updateDataset(request: {
5569
+ /** V1 error format. */
5570
+ "$.xgafv"?:
5571
+ string;
5572
+ /** OAuth access token. */
5573
+ access_token?:
5574
+ string;
5575
+ /** Data format for response. */
5576
+ alt?:
5577
+ string;
5578
+ /** JSONP */
5579
+ callback?:
5580
+ string;
5581
+ /** Selector specifying which fields to include in a partial response. */
5582
+ fields?:
5583
+ string;
5584
+ /** 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. */
5585
+ key?:
5586
+ string;
5587
+ /** Dataset resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset` */
5588
+ name:
5589
+ string;
5590
+ /** OAuth 2.0 token for the current user. */
5591
+ oauth_token?:
5592
+ string;
5593
+ /** Returns response with indentations and line breaks. */
5594
+ prettyPrint?:
5595
+ boolean;
5596
+ /** 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. */
5597
+ quotaUser?:
5598
+ string;
5599
+ /** The update mask applies to the resource. */
5600
+ updateMask?:
5601
+ string;
5602
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
5603
+ upload_protocol?:
5604
+ string;
5605
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
5606
+ uploadType?:
5607
+ string;
5608
+ },
5609
+ body: GoogleCloudDocumentaiV1beta3Dataset): Request<GoogleLongrunningOperation>;
5610
+ dataset:
5611
+ DatasetResource;
5320
5612
  humanReviewConfig:
5321
5613
  HumanReviewConfigResource;
5322
5614
  processorVersions:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.documentai-v1beta3",
3
- "version": "0.0.20230504",
3
+ "version": "0.0.20230526",
4
4
  "description": "TypeScript typings for Cloud Document AI API v1beta3",
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: 20230504
6
+ // Revision: 20230526
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -1876,6 +1876,76 @@ gapi.load('client', async () => {
1876
1876
  }, {
1877
1877
  defaultProcessorVersion: "Test string",
1878
1878
  });
1879
+ /** Updates metadata associated with a dataset. */
1880
+ await gapi.client.documentai.projects.locations.processors.updateDataset({
1881
+ name: "Test string",
1882
+ updateMask: "Test string",
1883
+ }, {
1884
+ documentWarehouseConfig: {
1885
+ collection: "Test string",
1886
+ schema: "Test string",
1887
+ },
1888
+ gcsManagedConfig: {
1889
+ gcsPrefix: {
1890
+ gcsUriPrefix: "Test string",
1891
+ },
1892
+ },
1893
+ name: "Test string",
1894
+ spannerIndexingConfig: {
1895
+ },
1896
+ state: "Test string",
1897
+ unmanagedDatasetConfig: {
1898
+ },
1899
+ });
1900
+ /** Gets the DatasetSchema of a Dataset. */
1901
+ await gapi.client.documentai.projects.locations.processors.dataset.getDatasetSchema({
1902
+ name: "Test string",
1903
+ visibleFieldsOnly: true,
1904
+ });
1905
+ /** Updates a DatasetSchema. */
1906
+ await gapi.client.documentai.projects.locations.processors.dataset.updateDatasetSchema({
1907
+ name: "Test string",
1908
+ updateMask: "Test string",
1909
+ }, {
1910
+ documentSchema: {
1911
+ description: "Test string",
1912
+ displayName: "Test string",
1913
+ entityTypes: [
1914
+ {
1915
+ baseTypes: [
1916
+ "Test string"
1917
+ ],
1918
+ displayName: "Test string",
1919
+ entityTypeMetadata: {
1920
+ inactive: true,
1921
+ },
1922
+ enumValues: {
1923
+ values: [
1924
+ "Test string"
1925
+ ],
1926
+ },
1927
+ name: "Test string",
1928
+ properties: [
1929
+ {
1930
+ name: "Test string",
1931
+ occurrenceType: "Test string",
1932
+ propertyMetadata: {
1933
+ inactive: true,
1934
+ },
1935
+ valueType: "Test string",
1936
+ }
1937
+ ],
1938
+ }
1939
+ ],
1940
+ metadata: {
1941
+ documentAllowMultipleLabels: true,
1942
+ documentSplitter: true,
1943
+ prefixedNamingOnProperties: true,
1944
+ skipNamingValidation: true,
1945
+ },
1946
+ },
1947
+ name: "Test string",
1948
+ });
1879
1949
  /** Send a document for Human Review. The input document should be processed by the specified processor. */
1880
1950
  await gapi.client.documentai.projects.locations.processors.humanReviewConfig.reviewDocument({
1881
1951
  humanReviewConfig: "Test string",
@@ -2733,6 +2803,9 @@ gapi.load('client', async () => {
2733
2803
  "Test string"
2734
2804
  ],
2735
2805
  displayName: "Test string",
2806
+ entityTypeMetadata: {
2807
+ inactive: true,
2808
+ },
2736
2809
  enumValues: {
2737
2810
  values: [
2738
2811
  "Test string"
@@ -2743,6 +2816,9 @@ gapi.load('client', async () => {
2743
2816
  {
2744
2817
  name: "Test string",
2745
2818
  occurrenceType: "Test string",
2819
+ propertyMetadata: {
2820
+ inactive: true,
2821
+ },
2746
2822
  valueType: "Test string",
2747
2823
  }
2748
2824
  ],
@@ -5428,6 +5504,9 @@ gapi.load('client', async () => {
5428
5504
  "Test string"
5429
5505
  ],
5430
5506
  displayName: "Test string",
5507
+ entityTypeMetadata: {
5508
+ inactive: true,
5509
+ },
5431
5510
  enumValues: {
5432
5511
  values: [
5433
5512
  "Test string"
@@ -5438,6 +5517,9 @@ gapi.load('client', async () => {
5438
5517
  {
5439
5518
  name: "Test string",
5440
5519
  occurrenceType: "Test string",
5520
+ propertyMetadata: {
5521
+ inactive: true,
5522
+ },
5441
5523
  valueType: "Test string",
5442
5524
  }
5443
5525
  ],
@@ -5494,6 +5576,9 @@ gapi.load('client', async () => {
5494
5576
  "Test string"
5495
5577
  ],
5496
5578
  displayName: "Test string",
5579
+ entityTypeMetadata: {
5580
+ inactive: true,
5581
+ },
5497
5582
  enumValues: {
5498
5583
  values: [
5499
5584
  "Test string"
@@ -5504,6 +5589,9 @@ gapi.load('client', async () => {
5504
5589
  {
5505
5590
  name: "Test string",
5506
5591
  occurrenceType: "Test string",
5592
+ propertyMetadata: {
5593
+ inactive: true,
5594
+ },
5507
5595
  valueType: "Test string",
5508
5596
  }
5509
5597
  ],