You've already forked npm-core-sdk
Latest generation
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// @generated from protobuf file "google/api/http.proto" (package "google.api", syntax proto3)
|
||||
// tslint:disable
|
||||
//
|
||||
// Copyright 2025 Google LLC
|
||||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@@ -54,7 +54,7 @@ export interface Http {
|
||||
fully_decode_reserved_expansion: boolean;
|
||||
}
|
||||
/**
|
||||
* gRPC Transcoding
|
||||
* # gRPC Transcoding
|
||||
*
|
||||
* gRPC Transcoding is a feature for mapping between a gRPC method and one or
|
||||
* more HTTP REST endpoints. It allows developers to build a single API service
|
||||
@@ -95,8 +95,9 @@ export interface Http {
|
||||
*
|
||||
* This enables an HTTP REST to gRPC mapping as below:
|
||||
*
|
||||
* - HTTP: `GET /v1/messages/123456`
|
||||
* - gRPC: `GetMessage(name: "messages/123456")`
|
||||
* HTTP | gRPC
|
||||
* -----|-----
|
||||
* `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
|
||||
*
|
||||
* Any fields in the request message which are not bound by the path template
|
||||
* automatically become HTTP query parameters if there is no HTTP request body.
|
||||
@@ -120,9 +121,11 @@ export interface Http {
|
||||
*
|
||||
* This enables a HTTP JSON to RPC mapping as below:
|
||||
*
|
||||
* - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
|
||||
* - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
|
||||
* SubMessage(subfield: "foo"))`
|
||||
* HTTP | gRPC
|
||||
* -----|-----
|
||||
* `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
|
||||
* `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
|
||||
* "foo"))`
|
||||
*
|
||||
* Note that fields which are mapped to URL query parameters must have a
|
||||
* primitive type or a repeated primitive type or a non-repeated message type.
|
||||
@@ -152,8 +155,10 @@ export interface Http {
|
||||
* representation of the JSON in the request body is determined by
|
||||
* protos JSON encoding:
|
||||
*
|
||||
* - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
|
||||
* - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
|
||||
* HTTP | gRPC
|
||||
* -----|-----
|
||||
* `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
|
||||
* "123456" message { text: "Hi!" })`
|
||||
*
|
||||
* The special name `*` can be used in the body mapping to define that
|
||||
* every field not bound by the path template should be mapped to the
|
||||
@@ -176,8 +181,10 @@ export interface Http {
|
||||
*
|
||||
* The following HTTP JSON to RPC mapping is enabled:
|
||||
*
|
||||
* - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
|
||||
* - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
|
||||
* HTTP | gRPC
|
||||
* -----|-----
|
||||
* `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
|
||||
* "123456" text: "Hi!")`
|
||||
*
|
||||
* Note that when using `*` in the body mapping, it is not possible to
|
||||
* have HTTP parameters, as all fields not bound by the path end in
|
||||
@@ -205,32 +212,29 @@ export interface Http {
|
||||
*
|
||||
* This enables the following two alternative HTTP JSON to RPC mappings:
|
||||
*
|
||||
* - HTTP: `GET /v1/messages/123456`
|
||||
* - gRPC: `GetMessage(message_id: "123456")`
|
||||
* HTTP | gRPC
|
||||
* -----|-----
|
||||
* `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
|
||||
* `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
|
||||
* "123456")`
|
||||
*
|
||||
* - HTTP: `GET /v1/users/me/messages/123456`
|
||||
* - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
|
||||
*
|
||||
* Rules for HTTP mapping
|
||||
* ## Rules for HTTP mapping
|
||||
*
|
||||
* 1. Leaf request fields (recursive expansion nested messages in the request
|
||||
* message) are classified into three categories:
|
||||
* - Fields referred by the path template. They are passed via the URL path.
|
||||
* - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
|
||||
* are passed via the HTTP
|
||||
* - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP
|
||||
* request body.
|
||||
* - All other fields are passed via the URL query parameters, and the
|
||||
* parameter name is the field path in the request message. A repeated
|
||||
* field can be represented as multiple query parameters under the same
|
||||
* name.
|
||||
* 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
|
||||
* query parameter, all fields
|
||||
* 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields
|
||||
* are passed via URL path and HTTP request body.
|
||||
* 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
|
||||
* request body, all
|
||||
* 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all
|
||||
* fields are passed via URL path and URL query parameters.
|
||||
*
|
||||
* Path template syntax
|
||||
* ### Path template syntax
|
||||
*
|
||||
* Template = "/" Segments [ Verb ] ;
|
||||
* Segments = Segment { "/" Segment } ;
|
||||
@@ -269,7 +273,7 @@ export interface Http {
|
||||
* Document](https://developers.google.com/discovery/v1/reference/apis) as
|
||||
* `{+var}`.
|
||||
*
|
||||
* Using gRPC API Service Configuration
|
||||
* ## Using gRPC API Service Configuration
|
||||
*
|
||||
* gRPC API Service Configuration (service config) is a configuration language
|
||||
* for configuring a gRPC service to become a user-facing product. The
|
||||
@@ -284,14 +288,15 @@ export interface Http {
|
||||
* specified in the service config will override any matching transcoding
|
||||
* configuration in the proto.
|
||||
*
|
||||
* The following example selects a gRPC method and applies an `HttpRule` to it:
|
||||
* Example:
|
||||
*
|
||||
* http:
|
||||
* rules:
|
||||
* # Selects a gRPC method and applies HttpRule to it.
|
||||
* - selector: example.v1.Messaging.GetMessage
|
||||
* get: /v1/messages/{message_id}/{sub.subfield}
|
||||
*
|
||||
* Special notes
|
||||
* ## Special notes
|
||||
*
|
||||
* When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
|
||||
* proto to JSON conversion must follow the [proto3
|
||||
@@ -325,8 +330,7 @@ export interface HttpRule {
|
||||
/**
|
||||
* Selects a method to which this rule applies.
|
||||
*
|
||||
* Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
||||
* details.
|
||||
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
|
||||
*
|
||||
* @generated from protobuf field: string selector = 1
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user