@maxim_mazurok/gapi.client.deepreview-v1 0.0.0 → 0.0.20261016

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 (4) hide show
  1. package/index.d.ts +778 -1
  2. package/package.json +16 -3
  3. package/readme.md +125 -0
  4. package/README.md +0 -3
package/index.d.ts CHANGED
@@ -1 +1,778 @@
1
- export {};
1
+ /* Type definitions for non-npm package Deep Review API v1 0.0 */
2
+ // Project: https://research.google/
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+
8
+ // IMPORTANT
9
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
+ // Generated from: https://deepreview.googleapis.com/$discovery/rest?version=v1
12
+ // Revision: 20261016
13
+
14
+ /// <reference types="gapi.client" />
15
+
16
+ declare namespace gapi.client {
17
+ /** Load Deep Review API v1 */
18
+ function load(
19
+ urlOrObject: 'https://deepreview.googleapis.com/$discovery/rest?version=v1',
20
+ ): Promise<void>;
21
+ /** @deprecated Please load APIs with discovery documents. */
22
+ function load(name: 'deepreview', version: 'v1'): Promise<void>;
23
+ /** @deprecated Please load APIs with discovery documents. */
24
+ function load(name: 'deepreview', version: 'v1', callback: () => any): void;
25
+
26
+ namespace deepreview {
27
+ interface AnchoredReviewComment {
28
+ /** Output only. Detailed markdown explanation of the review comment. */
29
+ bodyMarkdown?: string;
30
+ /** Output only. Optional structured citation verification report when this comment corresponds to a bibliography reference. */
31
+ citationReport?: CitationReport;
32
+ /** Output only. Unique identifier for the comment within the review. */
33
+ commentId?: string;
34
+ /** Output only. Polymorphic location in the document where this comment is anchored. */
35
+ location?: DocumentLocation;
36
+ /** Output only. Severity classification of the comment. */
37
+ severity?:
38
+ 'SEVERITY_UNSPECIFIED' | 'CRITICAL' | 'MAJOR' | 'MINOR' | 'SUGGESTION';
39
+ /** Output only. Optional suggested replacement text or edit for the anchored span. */
40
+ suggestedEdit?: string;
41
+ /** Output only. Short one-line summary of the review comment. */
42
+ summary?: string;
43
+ }
44
+ interface Author {
45
+ /** Output only. Author family name / surname (or organization name). */
46
+ familyName?: string;
47
+ /** Output only. Author given name / initials. */
48
+ givenName?: string;
49
+ }
50
+ interface CancelOperationRequest {}
51
+ interface CitationMetadata {
52
+ /** Output only. Ordered list of authors. */
53
+ authors?: Author[];
54
+ /** Output only. Digital Object Identifier (DOI). */
55
+ doi?: string;
56
+ /** Output only. Journal, conference, or venue name. */
57
+ journal?: string;
58
+ /** Output only. Page range or article number. */
59
+ pages?: string;
60
+ /** Output only. Publication date (month and day left as 0 if just year). */
61
+ publicationDate?: Date;
62
+ /** Output only. Source database for retrieved metadata (e.g., "openalex", "crossref"). Empty on `extracted_metadata`. */
63
+ source?: string;
64
+ /** Output only. Work title. */
65
+ title?: string;
66
+ /** Output only. URLs associated with the reference. */
67
+ urls?: string[];
68
+ /** Output only. Volume identifier. */
69
+ volume?: string;
70
+ }
71
+ interface CitationReport {
72
+ /** Output only. Generated BibTeX citation key (e.g., "smith2023deep"). */
73
+ citationKey?: string;
74
+ /** Output only. BibTeX entry type (e.g., "article", "inproceedings", "misc"). */
75
+ entryType?: string;
76
+ /** Output only. Metadata parsed from the paper's bibliography entry. */
77
+ extractedMetadata?: CitationMetadata;
78
+ /** Output only. Per-field comparisons (populated only when `retrieved_metadata` is present). */
79
+ fieldComparisons?: FieldComparison[];
80
+ /** Output only. Final combined verdict after database lookup and search grounding. */
81
+ finalVerdict?:
82
+ | 'VERDICT_UNSPECIFIED'
83
+ | 'OK'
84
+ | 'MINOR_MISMATCH'
85
+ | 'MAJOR_MISMATCH'
86
+ | 'VERIFIED_BY_SEARCH'
87
+ | 'NOT_FOUND'
88
+ | 'HALLUCINATED'
89
+ | 'SKIPPED';
90
+ /** Output only. Whether the first author's family name matched between extracted and retrieved metadata. */
91
+ firstAuthorFamilyNameMatch?: boolean;
92
+ /** Output only. Web sources surfaced during Google Search grounding. */
93
+ groundingUrls?: GroundingUrl[];
94
+ /** Output only. Verdict from scholarly database lookup (OpenAlex / Crossref) before search grounding. */
95
+ lookupVerdict?:
96
+ | 'VERDICT_UNSPECIFIED'
97
+ | 'OK'
98
+ | 'MINOR_MISMATCH'
99
+ | 'MAJOR_MISMATCH'
100
+ | 'VERIFIED_BY_SEARCH'
101
+ | 'NOT_FOUND'
102
+ | 'HALLUCINATED'
103
+ | 'SKIPPED';
104
+ /** Output only. Verbatim reference string extracted from the paper's bibliography. */
105
+ rawReference?: string;
106
+ /** Output only. 1-indexed bibliography reference number in the paper. */
107
+ refNum?: number;
108
+ /** Output only. Formatted BibTeX entry for the verified `retrieved_metadata` when present. Empty when `retrieved_metadata` is absent. */
109
+ retrievedBibtex?: string;
110
+ /** Output only. Metadata retrieved from OpenAlex / Crossref. Populated only when the retrieved work's title matches the extracted title. Omitted when no candidate matches the title so unrelated papers are never displayed as candidates. */
111
+ retrievedMetadata?: CitationMetadata;
112
+ /** Output only. Strategy that produced the scholarly database match (e.g., "doi", "title", "title_author", "autocomplete"). Empty when no title-matching candidate was found. */
113
+ searchMethod?: string;
114
+ /** Output only. Explanation from the Google Search grounding verification step (when run). */
115
+ searchRationale?: string;
116
+ /** Output only. Verdict from Google Search grounding verification (when run). */
117
+ searchVerdict?:
118
+ | 'SEARCH_VERDICT_UNSPECIFIED'
119
+ | 'NOT_HALLUCINATED'
120
+ | 'HALLUCINATED_BY_SEARCH'
121
+ | 'SEARCH_ERROR';
122
+ }
123
+ interface Date {
124
+ /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */
125
+ day?: number;
126
+ /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */
127
+ month?: number;
128
+ /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */
129
+ year?: number;
130
+ }
131
+ interface DeepReviewRunConfig {
132
+ /** Optional. Input only. Developer Bring-Your-Own-Key Gemini API key. When provided, requests are billed to the caller's Gemini API project. Input only; forwarded to the asynchronous review runner in the task payload and never persisted in database records or returned in review resources (see companion field `gemini_api_key_set`, AIP-147). */
133
+ geminiApiKey?: string;
134
+ /** Output only. Indicates whether a developer Bring-Your-Own-Key Gemini API key was provided for this review run. */
135
+ geminiApiKeySet?: boolean;
136
+ /** Optional. The Gemini model name/version to use (e.g., "gemini-1.5-pro", "gemini-2.0-flash"). */
137
+ model?: string;
138
+ /** Optional. Review execution topology profile to use. */
139
+ topology?: 'TOPOLOGY_UNSPECIFIED' | 'EXTRA_HIGH' | 'HIGH' | 'MID' | 'LOW';
140
+ /** Optional. User-provided guidance, focus areas, or custom evaluation instructions passed to the review agents. */
141
+ userPrompt?: string;
142
+ }
143
+ interface Document {
144
+ /** Output only. Timestamp when the document was initially created. */
145
+ createTime?: string;
146
+ /** Optional. User-provided display title or filename for the document. */
147
+ displayName?: string;
148
+ /** Optional. Reference to a Google Drive file to import. */
149
+ driveSource?: DriveSource;
150
+ /** Output only. Summary of the most recent review run for this document, if any. */
151
+ latestReviewSummary?: ReviewSummary;
152
+ /** Identifier. Resource name in format `documents/{document}`. */
153
+ name?: string;
154
+ }
155
+ interface DocumentLocation {
156
+ /** Output only. Location within a rendered PDF document. */
157
+ pdf?: PdfLocation;
158
+ /** Output only. Location within a plain-text, Markdown, or LaTeX source document. */
159
+ text?: TextLocation;
160
+ }
161
+ interface DownloadDocumentResponse {}
162
+ interface DriveSource {
163
+ /** Required. Immutable. The Google Drive file ID (e.g. "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"). For Google Drive shortcuts, callers must pass the resolved target file's `file_id` and `resource_key`. */
164
+ fileId?: string;
165
+ /** Optional. Input only. Immutable. Resource key (`^[a-zA-Z0-9_-]{1,128}$`) required to access certain older link-shared Google Drive files returned by the Google Drive Picker (for shortcuts, pass the resolved target file's resource key). Never persisted in database records or returned in Document resources (see companion field `resource_key_set`, AIP-147). */
166
+ resourceKey?: string;
167
+ /** Output only. Indicates whether a resource key was provided for this Drive source. */
168
+ resourceKeySet?: boolean;
169
+ /** Optional. Input only. Immutable. Specific revision ID to import (defaults to latest head revision). */
170
+ revisionId?: string;
171
+ }
172
+ interface Empty {}
173
+ interface FieldComparison {
174
+ /** Output only. Human-readable comparison detail (e.g., "extracted=2023, found=2024 (diff=1)"). */
175
+ detail?: string;
176
+ /** Output only. Field key ("title", "authors", "year", "journal", "volume", "pages", "doi"). */
177
+ fieldKey?: string;
178
+ /** Output only. Whether the extracted and retrieved values matched. */
179
+ match?: boolean;
180
+ }
181
+ interface GroundingUrl {
182
+ /** Output only. Source page title or domain. */
183
+ title?: string;
184
+ /** Output only. Source URL. */
185
+ url?: string;
186
+ }
187
+ interface ListDocumentsResponse {
188
+ /** The list of Document resources. */
189
+ documents?: Document[];
190
+ /** A token to retrieve the next page of results, or empty if no further pages exist. */
191
+ nextPageToken?: string;
192
+ }
193
+ interface ListOperationsResponse {
194
+ /** The standard List next-page token. */
195
+ nextPageToken?: string;
196
+ /** A list of operations that matches the specified filter in the request. */
197
+ operations?: Operation[];
198
+ /** Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations. */
199
+ unreachable?: string[];
200
+ }
201
+ interface ListReviewsResponse {
202
+ /** A token to retrieve the next page of results, or empty if no further pages exist. */
203
+ nextPageToken?: string;
204
+ /** The list of Review resources. */
205
+ reviews?: Review[];
206
+ }
207
+ interface NormalizedBoundingBox {
208
+ /** Output only. Bottom coordinate in [0.0, 1.0]. */
209
+ bottom?: number;
210
+ /** Output only. Left coordinate in [0.0, 1.0]. */
211
+ left?: number;
212
+ /** Output only. Right coordinate in [0.0, 1.0]. */
213
+ right?: number;
214
+ /** Output only. Top coordinate in [0.0, 1.0]. */
215
+ top?: number;
216
+ }
217
+ interface Operation {
218
+ /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
219
+ done?: boolean;
220
+ /** The error result of the operation in case of failure or cancellation. */
221
+ error?: Status;
222
+ /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */
223
+ metadata?: {[P in string]: any};
224
+ /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */
225
+ name?: string;
226
+ /** The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */
227
+ response?: {[P in string]: any};
228
+ }
229
+ interface PdfLocation {
230
+ /** Output only. Normalized bounding boxes [0.0, 1.0] relative to page width and height. At most 50 bounding boxes are returned per anchored span. */
231
+ boundingBoxes?: NormalizedBoundingBox[];
232
+ /** Output only. 1-indexed page number within the PDF document. */
233
+ pageNumber?: number;
234
+ /** Output only. W3C Web Annotation TextQuoteSelector (https://www.w3.org/TR/annotation-model/#text-quote-selector) for exact text span highlighting. */
235
+ quoteSelector?: TextQuoteSelector;
236
+ }
237
+ interface Result {
238
+ /** Output only. Structured review comments anchored to specific locations in the document. At most 300 anchored comments are returned per review. */
239
+ anchoredComments?: AnchoredReviewComment[];
240
+ /** Output only. Failure status details if review execution failed. */
241
+ error?: Status;
242
+ /** Output only. Synthesized review report markdown. */
243
+ reviewMarkdown?: string;
244
+ }
245
+ interface Review {
246
+ /** Output only. Timestamp when this review attempt was initiated. */
247
+ createTime?: string;
248
+ /** Output only. Timestamp when the review reached a terminal state. */
249
+ endTime?: string;
250
+ /** Identifier. Resource name in format `documents/{document}/reviews/{review}`. */
251
+ name?: string;
252
+ /** Output only. Estimated completion progress percentage of the review in [0, 100]. */
253
+ progressPercent?: number;
254
+ /** Output only. Review output (markdown, errors, and future modalities). */
255
+ result?: Result;
256
+ /** Optional. Run configuration parameters used for this review. */
257
+ runConfig?: DeepReviewRunConfig;
258
+ /** Output only. Timestamp when the worker started evaluation. */
259
+ startTime?: string;
260
+ /** Output only. Current review lifecycle state. */
261
+ state?:
262
+ 'STATE_UNSPECIFIED' | 'PENDING' | 'RUNNING' | 'SUCCEEDED' | 'FAILED';
263
+ }
264
+ interface ReviewSummary {
265
+ /** Output only. Timestamp when this review attempt was initiated. */
266
+ createTime?: string;
267
+ /** Output only. Resource name of the Review. Format: `documents/{document}/reviews/{review}` */
268
+ review?: string;
269
+ /** Output only. Current review lifecycle state. */
270
+ state?:
271
+ 'STATE_UNSPECIFIED' | 'PENDING' | 'RUNNING' | 'SUCCEEDED' | 'FAILED';
272
+ }
273
+ interface Status {
274
+ /** The status code, which should be an enum value of google.rpc.Code. */
275
+ code?: number;
276
+ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
277
+ details?: {[P in string]: any}[];
278
+ /** 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. */
279
+ message?: string;
280
+ }
281
+ interface TextLocation {
282
+ /** Output only. Optional 1-indexed inclusive first column offset within `first_line`. */
283
+ firstColumn?: number;
284
+ /** Output only. 1-indexed inclusive first line number. */
285
+ firstLine?: number;
286
+ /** Output only. Optional 1-indexed inclusive last column offset within `last_line`. */
287
+ lastColumn?: number;
288
+ /** Output only. 1-indexed inclusive last line number. */
289
+ lastLine?: number;
290
+ /** Output only. Verbatim snippet of the anchored source line(s). */
291
+ quotedLinePreview?: string;
292
+ }
293
+ interface TextQuoteSelector {
294
+ /** Output only. Verbatim substring extracted from the document character stream. */
295
+ exact?: string;
296
+ /** Output only. Characters immediately preceding `exact` for disambiguation. */
297
+ prefix?: string;
298
+ /** Output only. Characters immediately following `exact` for disambiguation. */
299
+ suffix?: string;
300
+ }
301
+ interface ReviewsResource {
302
+ /** Creates and initiates an asynchronous multi-agent review for a document. */
303
+ create(request: {
304
+ /** V1 error format. */
305
+ '$.xgafv'?: '1' | '2';
306
+ /** OAuth access token. */
307
+ access_token?: string;
308
+ /** Data format for response. */
309
+ alt?: 'json' | 'media' | 'proto';
310
+ /** JSONP */
311
+ callback?: string;
312
+ /** Selector specifying which fields to include in a partial response. */
313
+ fields?: string;
314
+ /** 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. */
315
+ key?: string;
316
+ /** OAuth 2.0 token for the current user. */
317
+ oauth_token?: string;
318
+ /** Required. The parent Document resource name where this review will be created. Format: `documents/{document}` */
319
+ parent: string;
320
+ /** Returns response with indentations and line breaks. */
321
+ prettyPrint?: boolean;
322
+ /** 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. */
323
+ quotaUser?: string;
324
+ /** Optional. Idempotency identifier for network retry safety (AIP-155). Must be a valid UUID4 string. */
325
+ requestId?: string;
326
+ /** Optional. The ID to use for the review, which will become the final component of the review's resource name. If not provided, a unique server-generated UUID will be assigned. */
327
+ reviewId?: string;
328
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
329
+ upload_protocol?: string;
330
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
331
+ uploadType?: string;
332
+ /** Request body */
333
+ resource: Review;
334
+ }): Request<Operation>;
335
+ create(
336
+ request: {
337
+ /** V1 error format. */
338
+ '$.xgafv'?: '1' | '2';
339
+ /** OAuth access token. */
340
+ access_token?: string;
341
+ /** Data format for response. */
342
+ alt?: 'json' | 'media' | 'proto';
343
+ /** JSONP */
344
+ callback?: string;
345
+ /** Selector specifying which fields to include in a partial response. */
346
+ fields?: string;
347
+ /** 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. */
348
+ key?: string;
349
+ /** OAuth 2.0 token for the current user. */
350
+ oauth_token?: string;
351
+ /** Required. The parent Document resource name where this review will be created. Format: `documents/{document}` */
352
+ parent: string;
353
+ /** Returns response with indentations and line breaks. */
354
+ prettyPrint?: boolean;
355
+ /** 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. */
356
+ quotaUser?: string;
357
+ /** Optional. Idempotency identifier for network retry safety (AIP-155). Must be a valid UUID4 string. */
358
+ requestId?: string;
359
+ /** Optional. The ID to use for the review, which will become the final component of the review's resource name. If not provided, a unique server-generated UUID will be assigned. */
360
+ reviewId?: string;
361
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
362
+ upload_protocol?: string;
363
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
364
+ uploadType?: string;
365
+ },
366
+ body: Review,
367
+ ): Request<Operation>;
368
+ /** Retrieves a specific review execution result. */
369
+ get(request?: {
370
+ /** V1 error format. */
371
+ '$.xgafv'?: '1' | '2';
372
+ /** OAuth access token. */
373
+ access_token?: string;
374
+ /** Data format for response. */
375
+ alt?: 'json' | 'media' | 'proto';
376
+ /** JSONP */
377
+ callback?: string;
378
+ /** Selector specifying which fields to include in a partial response. */
379
+ fields?: string;
380
+ /** 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. */
381
+ key?: string;
382
+ /** Required. The resource name of the review to retrieve. Format: `documents/{document}/reviews/{review}` */
383
+ name: string;
384
+ /** OAuth 2.0 token for the current user. */
385
+ oauth_token?: string;
386
+ /** Returns response with indentations and line breaks. */
387
+ prettyPrint?: boolean;
388
+ /** 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. */
389
+ quotaUser?: string;
390
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
391
+ upload_protocol?: string;
392
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
393
+ uploadType?: string;
394
+ }): Request<Review>;
395
+ /** Lists all review execution runs for a document. */
396
+ list(request?: {
397
+ /** V1 error format. */
398
+ '$.xgafv'?: '1' | '2';
399
+ /** OAuth access token. */
400
+ access_token?: string;
401
+ /** Data format for response. */
402
+ alt?: 'json' | 'media' | 'proto';
403
+ /** JSONP */
404
+ callback?: string;
405
+ /** Selector specifying which fields to include in a partial response. */
406
+ fields?: string;
407
+ /** Optional. Supported AIP-160 filter expressions. */
408
+ filter?: string;
409
+ /** 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. */
410
+ key?: string;
411
+ /** OAuth 2.0 token for the current user. */
412
+ oauth_token?: string;
413
+ /** Optional. Supported AIP-132 order_by field. */
414
+ orderBy?: string;
415
+ /** Optional. The maximum number of reviews to return in a single page. The server may return fewer than this value. If unspecified, at most 50 reviews will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. */
416
+ pageSize?: number;
417
+ /** Optional. A page token received from a previous `ListReviews` call. */
418
+ pageToken?: string;
419
+ /** Required. The parent Document resource name. Format: `documents/{document}` */
420
+ parent: string;
421
+ /** Returns response with indentations and line breaks. */
422
+ prettyPrint?: boolean;
423
+ /** 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. */
424
+ quotaUser?: string;
425
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
426
+ upload_protocol?: string;
427
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
428
+ uploadType?: string;
429
+ }): Request<ListReviewsResponse>;
430
+ }
431
+ interface DocumentsResource {
432
+ /** Deletes a document and all associated reviews and stored blobs. */
433
+ delete(request?: {
434
+ /** V1 error format. */
435
+ '$.xgafv'?: '1' | '2';
436
+ /** OAuth access token. */
437
+ access_token?: string;
438
+ /** Optional. If set to true, and the document is not found, the request succeeds. */
439
+ allowMissing?: boolean;
440
+ /** Data format for response. */
441
+ alt?: 'json' | 'media' | 'proto';
442
+ /** JSONP */
443
+ callback?: string;
444
+ /** Selector specifying which fields to include in a partial response. */
445
+ fields?: string;
446
+ /** Optional. If set to true, any child resources (e.g. review resources) are also deleted. */
447
+ force?: boolean;
448
+ /** 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. */
449
+ key?: string;
450
+ /** Required. The resource name of the document to delete. Format: `documents/{document}` */
451
+ name: string;
452
+ /** OAuth 2.0 token for the current user. */
453
+ oauth_token?: string;
454
+ /** Returns response with indentations and line breaks. */
455
+ prettyPrint?: boolean;
456
+ /** 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. */
457
+ quotaUser?: string;
458
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
459
+ upload_protocol?: string;
460
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
461
+ uploadType?: string;
462
+ }): Request<{}>;
463
+ /** Retrieves document metadata and review history. */
464
+ get(request?: {
465
+ /** V1 error format. */
466
+ '$.xgafv'?: '1' | '2';
467
+ /** OAuth access token. */
468
+ access_token?: string;
469
+ /** Data format for response. */
470
+ alt?: 'json' | 'media' | 'proto';
471
+ /** JSONP */
472
+ callback?: string;
473
+ /** Selector specifying which fields to include in a partial response. */
474
+ fields?: string;
475
+ /** 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. */
476
+ key?: string;
477
+ /** Required. The resource name of the document to retrieve. Format: `documents/{document}` */
478
+ name: string;
479
+ /** OAuth 2.0 token for the current user. */
480
+ oauth_token?: string;
481
+ /** Returns response with indentations and line breaks. */
482
+ prettyPrint?: boolean;
483
+ /** 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. */
484
+ quotaUser?: string;
485
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
486
+ upload_protocol?: string;
487
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
488
+ uploadType?: string;
489
+ }): Request<Document>;
490
+ /** Lists documents for the authenticated caller with cursor pagination. */
491
+ list(request?: {
492
+ /** V1 error format. */
493
+ '$.xgafv'?: '1' | '2';
494
+ /** OAuth access token. */
495
+ access_token?: string;
496
+ /** Data format for response. */
497
+ alt?: 'json' | 'media' | 'proto';
498
+ /** JSONP */
499
+ callback?: string;
500
+ /** Selector specifying which fields to include in a partial response. */
501
+ fields?: string;
502
+ /** Optional. Supported AIP-160 filter expressions (e.g., `display_name = "..."`). */
503
+ filter?: string;
504
+ /** 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. */
505
+ key?: string;
506
+ /** OAuth 2.0 token for the current user. */
507
+ oauth_token?: string;
508
+ /** Optional. Supported AIP-132 order_by field. */
509
+ orderBy?: string;
510
+ /** Optional. The maximum number of documents to return in a single page. The server may return fewer than this value. If unspecified, at most 50 documents will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. */
511
+ pageSize?: number;
512
+ /** Optional. A page token received from a previous `ListDocuments` call. */
513
+ pageToken?: string;
514
+ /** Returns response with indentations and line breaks. */
515
+ prettyPrint?: boolean;
516
+ /** 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. */
517
+ quotaUser?: string;
518
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
519
+ upload_protocol?: string;
520
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
521
+ uploadType?: string;
522
+ }): Request<ListDocumentsResponse>;
523
+ reviews: ReviewsResource;
524
+ }
525
+ interface MediaResource {
526
+ /** Downloads the original document content (PDF binary) via Scotty media streaming (AIP-136 custom method). */
527
+ download(request?: {
528
+ /** V1 error format. */
529
+ '$.xgafv'?: '1' | '2';
530
+ /** OAuth access token. */
531
+ access_token?: string;
532
+ /** Data format for response. */
533
+ alt?: 'json' | 'media' | 'proto';
534
+ /** JSONP */
535
+ callback?: string;
536
+ /** Selector specifying which fields to include in a partial response. */
537
+ fields?: string;
538
+ /** 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. */
539
+ key?: string;
540
+ /** Required. The resource name of the document to download. Format: `documents/{document}` */
541
+ name: string;
542
+ /** OAuth 2.0 token for the current user. */
543
+ oauth_token?: string;
544
+ /** Returns response with indentations and line breaks. */
545
+ prettyPrint?: boolean;
546
+ /** 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. */
547
+ quotaUser?: string;
548
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
549
+ upload_protocol?: string;
550
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
551
+ uploadType?: string;
552
+ }): Request<{}>;
553
+ /** Creates a new Document resource and ingests the manuscript via Scotty or Google Drive. */
554
+ upload(request: {
555
+ /** V1 error format. */
556
+ '$.xgafv'?: '1' | '2';
557
+ /** OAuth access token. */
558
+ access_token?: string;
559
+ /** Data format for response. */
560
+ alt?: 'json' | 'media' | 'proto';
561
+ /** JSONP */
562
+ callback?: string;
563
+ /** Optional. The ID to use for the document, which will become the final component of the document's resource name. If not provided, a unique server-generated UUID will be assigned. */
564
+ documentId?: string;
565
+ /** Selector specifying which fields to include in a partial response. */
566
+ fields?: string;
567
+ /** 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. */
568
+ key?: string;
569
+ /** OAuth 2.0 token for the current user. */
570
+ oauth_token?: string;
571
+ /** Returns response with indentations and line breaks. */
572
+ prettyPrint?: boolean;
573
+ /** 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. */
574
+ quotaUser?: string;
575
+ /** Optional. Idempotency identifier for network retry safety (AIP-155). Must be a valid UUID4 string. */
576
+ requestId?: string;
577
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
578
+ upload_protocol?: string;
579
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
580
+ uploadType?: string;
581
+ /** Request body */
582
+ resource: Document;
583
+ }): Request<Document>;
584
+ upload(
585
+ request: {
586
+ /** V1 error format. */
587
+ '$.xgafv'?: '1' | '2';
588
+ /** OAuth access token. */
589
+ access_token?: string;
590
+ /** Data format for response. */
591
+ alt?: 'json' | 'media' | 'proto';
592
+ /** JSONP */
593
+ callback?: string;
594
+ /** Optional. The ID to use for the document, which will become the final component of the document's resource name. If not provided, a unique server-generated UUID will be assigned. */
595
+ documentId?: string;
596
+ /** Selector specifying which fields to include in a partial response. */
597
+ fields?: string;
598
+ /** 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. */
599
+ key?: string;
600
+ /** OAuth 2.0 token for the current user. */
601
+ oauth_token?: string;
602
+ /** Returns response with indentations and line breaks. */
603
+ prettyPrint?: boolean;
604
+ /** 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. */
605
+ quotaUser?: string;
606
+ /** Optional. Idempotency identifier for network retry safety (AIP-155). Must be a valid UUID4 string. */
607
+ requestId?: string;
608
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
609
+ upload_protocol?: string;
610
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
611
+ uploadType?: string;
612
+ },
613
+ body: Document,
614
+ ): Request<Document>;
615
+ }
616
+ interface ReviewsResource {
617
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
618
+ get(request?: {
619
+ /** V1 error format. */
620
+ '$.xgafv'?: '1' | '2';
621
+ /** OAuth access token. */
622
+ access_token?: string;
623
+ /** Data format for response. */
624
+ alt?: 'json' | 'media' | 'proto';
625
+ /** JSONP */
626
+ callback?: string;
627
+ /** Selector specifying which fields to include in a partial response. */
628
+ fields?: string;
629
+ /** 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. */
630
+ key?: string;
631
+ /** The name of the operation resource. */
632
+ name: string;
633
+ /** OAuth 2.0 token for the current user. */
634
+ oauth_token?: string;
635
+ /** Returns response with indentations and line breaks. */
636
+ prettyPrint?: boolean;
637
+ /** 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. */
638
+ quotaUser?: string;
639
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
640
+ upload_protocol?: string;
641
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
642
+ uploadType?: string;
643
+ }): Request<Operation>;
644
+ }
645
+ interface DocumentsResource {
646
+ reviews: ReviewsResource;
647
+ }
648
+ interface OperationsResource {
649
+ /** Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. */
650
+ cancel(request: {
651
+ /** V1 error format. */
652
+ '$.xgafv'?: '1' | '2';
653
+ /** OAuth access token. */
654
+ access_token?: string;
655
+ /** Data format for response. */
656
+ alt?: 'json' | 'media' | 'proto';
657
+ /** JSONP */
658
+ callback?: string;
659
+ /** Selector specifying which fields to include in a partial response. */
660
+ fields?: string;
661
+ /** 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. */
662
+ key?: string;
663
+ /** The name of the operation resource to be cancelled. */
664
+ name: string;
665
+ /** OAuth 2.0 token for the current user. */
666
+ oauth_token?: string;
667
+ /** Returns response with indentations and line breaks. */
668
+ prettyPrint?: boolean;
669
+ /** 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. */
670
+ quotaUser?: string;
671
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
672
+ upload_protocol?: string;
673
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
674
+ uploadType?: string;
675
+ /** Request body */
676
+ resource: CancelOperationRequest;
677
+ }): Request<{}>;
678
+ cancel(
679
+ request: {
680
+ /** V1 error format. */
681
+ '$.xgafv'?: '1' | '2';
682
+ /** OAuth access token. */
683
+ access_token?: string;
684
+ /** Data format for response. */
685
+ alt?: 'json' | 'media' | 'proto';
686
+ /** JSONP */
687
+ callback?: string;
688
+ /** Selector specifying which fields to include in a partial response. */
689
+ fields?: string;
690
+ /** 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. */
691
+ key?: string;
692
+ /** The name of the operation resource to be cancelled. */
693
+ name: string;
694
+ /** OAuth 2.0 token for the current user. */
695
+ oauth_token?: string;
696
+ /** Returns response with indentations and line breaks. */
697
+ prettyPrint?: boolean;
698
+ /** 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. */
699
+ quotaUser?: string;
700
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
701
+ upload_protocol?: string;
702
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
703
+ uploadType?: string;
704
+ },
705
+ body: CancelOperationRequest,
706
+ ): Request<{}>;
707
+ /** Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. */
708
+ delete(request?: {
709
+ /** V1 error format. */
710
+ '$.xgafv'?: '1' | '2';
711
+ /** OAuth access token. */
712
+ access_token?: string;
713
+ /** Data format for response. */
714
+ alt?: 'json' | 'media' | 'proto';
715
+ /** JSONP */
716
+ callback?: string;
717
+ /** Selector specifying which fields to include in a partial response. */
718
+ fields?: string;
719
+ /** 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. */
720
+ key?: string;
721
+ /** The name of the operation resource to be deleted. */
722
+ name: string;
723
+ /** OAuth 2.0 token for the current user. */
724
+ oauth_token?: string;
725
+ /** Returns response with indentations and line breaks. */
726
+ prettyPrint?: boolean;
727
+ /** 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. */
728
+ quotaUser?: string;
729
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
730
+ upload_protocol?: string;
731
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
732
+ uploadType?: string;
733
+ }): Request<{}>;
734
+ /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
735
+ list(request?: {
736
+ /** V1 error format. */
737
+ '$.xgafv'?: '1' | '2';
738
+ /** OAuth access token. */
739
+ access_token?: string;
740
+ /** Data format for response. */
741
+ alt?: 'json' | 'media' | 'proto';
742
+ /** JSONP */
743
+ callback?: string;
744
+ /** Selector specifying which fields to include in a partial response. */
745
+ fields?: string;
746
+ /** The standard list filter. */
747
+ filter?: string;
748
+ /** 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. */
749
+ key?: string;
750
+ /** The name of the operation's parent resource. */
751
+ name: string;
752
+ /** OAuth 2.0 token for the current user. */
753
+ oauth_token?: string;
754
+ /** The standard list page size. */
755
+ pageSize?: number;
756
+ /** The standard list page token. */
757
+ pageToken?: string;
758
+ /** Returns response with indentations and line breaks. */
759
+ prettyPrint?: boolean;
760
+ /** 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. */
761
+ quotaUser?: string;
762
+ /** When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `"projects/example/locations/-"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation. */
763
+ returnPartialSuccess?: boolean;
764
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
765
+ upload_protocol?: string;
766
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
767
+ uploadType?: string;
768
+ }): Request<ListOperationsResponse>;
769
+ documents: DocumentsResource;
770
+ }
771
+
772
+ const documents: DocumentsResource;
773
+
774
+ const media: MediaResource;
775
+
776
+ const operations: OperationsResource;
777
+ }
778
+ }
package/package.json CHANGED
@@ -1,7 +1,20 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.deepreview-v1",
3
- "version": "0.0.0",
4
- "description": "Initializer package used to configure npm trusted publishing.",
3
+ "version": "0.0.20261016",
4
+ "description": "TypeScript typings for Deep Review API v1",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
8
+ },
5
9
  "license": "MIT",
6
- "types": "index.d.ts"
10
+ "author": {
11
+ "name": "Maxim Mazurok",
12
+ "email": "maxim@mazurok.com",
13
+ "url": "https://maxim.mazurok.com"
14
+ },
15
+ "types": "index.d.ts",
16
+ "dependencies": {
17
+ "@types/gapi.client": "*",
18
+ "@types/gapi.client.discovery-v1": "*"
19
+ }
7
20
  }
package/readme.md ADDED
@@ -0,0 +1,125 @@
1
+ # TypeScript typings for Deep Review API v1
2
+
3
+ Deep Review API for automated conference-quality scientific paper reviews.
4
+ For detailed description please check [documentation](https://research.google/).
5
+
6
+ ## Installing
7
+
8
+ Install typings for Deep Review API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.deepreview-v1 --save-dev
12
+ ```
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.deepreview-v1"]
22
+ }
23
+ }
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ You need to initialize Google API client in your code:
29
+
30
+ ```typescript
31
+ gapi.load('client', () => {
32
+ // now we can use gapi.client
33
+ // ...
34
+ });
35
+ ```
36
+
37
+ Then load api client wrapper:
38
+
39
+ ```typescript
40
+ gapi.client.load(
41
+ 'https://deepreview.googleapis.com/$discovery/rest?version=v1',
42
+ () => {
43
+ // now we can use:
44
+ // gapi.client.deepreview
45
+ },
46
+ );
47
+ ```
48
+
49
+ ```typescript
50
+ // Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
51
+ gapi.client.load('deepreview', 'v1', () => {
52
+ // now we can use:
53
+ // gapi.client.deepreview
54
+ });
55
+ ```
56
+
57
+ Don't forget to authenticate your client before sending any request to resources:
58
+
59
+ ```typescript
60
+ // declare client_id registered in Google Developers Console
61
+ var client_id = '',
62
+ scope = [
63
+ // See, edit, create, and delete only the specific Google Drive files you use with this app
64
+ 'https://www.googleapis.com/auth/drive.file',
65
+ ],
66
+ immediate = true;
67
+ // ...
68
+
69
+ gapi.auth.authorize(
70
+ {client_id: client_id, scope: scope, immediate: immediate},
71
+ authResult => {
72
+ if (authResult && !authResult.error) {
73
+ /* handle successful authorization */
74
+ } else {
75
+ /* handle authorization error */
76
+ }
77
+ },
78
+ );
79
+ ```
80
+
81
+ After that you can use Deep Review API resources: <!-- TODO: make this work for multiple namespaces -->
82
+
83
+ ```typescript
84
+ /*
85
+ Deletes a document and all associated reviews and stored blobs.
86
+ */
87
+ await gapi.client.deepreview.documents.delete({name: 'name'});
88
+
89
+ /*
90
+ Retrieves document metadata and review history.
91
+ */
92
+ await gapi.client.deepreview.documents.get({name: 'name'});
93
+
94
+ /*
95
+ Lists documents for the authenticated caller with cursor pagination.
96
+ */
97
+ await gapi.client.deepreview.documents.list({});
98
+
99
+ /*
100
+ Downloads the original document content (PDF binary) via Scotty media streaming (AIP-136 custom method).
101
+ */
102
+ await gapi.client.deepreview.media.download({name: 'name'});
103
+
104
+ /*
105
+ Creates a new Document resource and ingests the manuscript via Scotty or Google Drive.
106
+ */
107
+ await gapi.client.deepreview.media.upload({});
108
+
109
+ /*
110
+ Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
111
+ */
112
+ await gapi.client.deepreview.operations.cancel({name: 'name'});
113
+
114
+ /*
115
+ Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
116
+ */
117
+ await gapi.client.deepreview.operations.delete({name: 'name'});
118
+
119
+ /*
120
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
121
+ */
122
+ await gapi.client.deepreview.operations.list({name: 'name'});
123
+ ```
124
+
125
+ For provenance information see [Provenance section on NPM](https://www.npmjs.com/package/@maxim_mazurok/gapi.client.deepreview-v1#Provenance:~:text=none-,Provenance,-Built%20and%20signed)
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # @maxim_mazurok/gapi.client.deepreview-v1
2
-
3
- This temporary initializer version exists so npm trusted publishing can be configured for this package.