diff --git a/.eslintignore b/.eslintignore index a3808443..79f5a61c 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,5 @@ dist/ node_modules -src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/proto -src/modules/adempiere-api/api/extensions/adempiere/grpc-api/utils/valueUtils.js \ No newline at end of file +src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc +src/modules/adempiere-api/api/extensions/adempiere/grpc-api/google +src/modules/adempiere-api/api/extensions/adempiere/grpc-api/utils/valueUtils.js diff --git a/src/modules/adempiere-api/api/extensions/adempiere/common/api.ts b/src/modules/adempiere-api/api/extensions/adempiere/common/api.ts index 353a4636..c2f34970 100644 --- a/src/modules/adempiere-api/api/extensions/adempiere/common/api.ts +++ b/src/modules/adempiere-api/api/extensions/adempiere/common/api.ts @@ -259,17 +259,20 @@ module.exports = ({ config }: ExtensionAPIFunctionParameter) => { // Running parameters id: req.body.id, uuid: req.body.uuid, - tableName: req.body.table_name, - recordId: req.body.record_id, - recordUuid: req.body.record_uuid, - tableSelectedId: req.body.table_selected_id, + parametersList: req.body.parameters, + // report reportType: req.body.report_type, printFormatId: req.body.print_format_id, printFormatUuid: req.body.print_format_uuid, reportViewId: req.body.report_view_id, reportViewUuid: req.body.report_view_uuid, isSummary: req.body.is_summary, - parametersList: req.body.parameters, + // window + tableName: req.body.table_name, + recordId: req.body.record_id, + recordUuid: req.body.record_uuid, + // browser + browserId: req.body.browser_id, selectionsList: req.body.selections }, (err, response) => { if (response) { diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/google/api/annotations.proto b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/google/api/annotations.proto new file mode 100644 index 00000000..85c361b4 --- /dev/null +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/google/api/annotations.proto @@ -0,0 +1,31 @@ +// Copyright (c) 2015, Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/api/http.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationsProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // See `HttpRule`. + HttpRule http = 72295728; +} diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/google/api/http.proto b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/google/api/http.proto new file mode 100644 index 00000000..2bd3a19b --- /dev/null +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/google/api/http.proto @@ -0,0 +1,318 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "HttpProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + + +// Defines the HTTP configuration for an API service. It contains a list of +// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +// to one or more HTTP REST API methods. +message Http { + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated HttpRule rules = 1; + + // When set to true, URL path parmeters will be fully URI-decoded except in + // cases of single segment matches in reserved expansion, where "%2F" will be + // left encoded. + // + // The default behavior is to not decode RFC 6570 reserved characters in multi + // segment matches. + bool fully_decode_reserved_expansion = 2; +} + +// `HttpRule` defines the mapping of an RPC method to one or more HTTP +// REST API methods. The mapping specifies how different portions of the RPC +// request message are mapped to URL path, URL query parameters, and +// HTTP request body. The mapping is typically specified as an +// `google.api.http` annotation on the RPC method, +// see "google/api/annotations.proto" for details. +// +// The mapping consists of a field specifying the path template and +// method kind. The path template can refer to fields in the request +// message, as in the example below which describes a REST GET +// operation on a resource collection of messages: +// +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // mapped to the URL +// SubMessage sub = 2; // `sub.subfield` is url-mapped +// } +// message Message { +// string text = 1; // content of the resource +// } +// +// The same http annotation can alternatively be expressed inside the +// `GRPC API Configuration` YAML file. +// +// http: +// rules: +// - selector: .Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// This definition enables an automatic, bidrectional mapping of HTTP +// JSON to RPC. Example: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` +// +// In general, not only fields but also field paths can be referenced +// from a path pattern. Fields mapped to the path pattern cannot be +// repeated and must have a primitive (non-message) type. +// +// Any fields in the request message which are not bound by the path +// pattern automatically become (optional) HTTP query +// parameters. Assume the following definition of the request message: +// +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http).get = "/v1/messages/{message_id}"; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // mapped to the URL +// int64 revision = 2; // becomes a parameter +// SubMessage sub = 3; // `sub.subfield` becomes a parameter +// } +// +// +// This enables a HTTP JSON to RPC mapping as below: +// +// HTTP | RPC +// -----|----- +// `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 HTTP parameters must have a +// primitive type or a repeated primitive type. Message types are not +// allowed. In the case of a repeated type, the parameter can be +// repeated in the URL, as in `...?param=A¶m=B`. +// +// For HTTP method kinds which allow a request body, the `body` field +// specifies the mapping. Consider a REST update method on the +// message resource collection: +// +// +// service Messaging { +// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +// option (google.api.http) = { +// put: "/v1/messages/{message_id}" +// body: "message" +// }; +// } +// } +// message UpdateMessageRequest { +// string message_id = 1; // mapped to the URL +// Message message = 2; // mapped to the body +// } +// +// +// The following HTTP JSON to RPC mapping is enabled, where the +// representation of the JSON in the request body is determined by +// protos JSON encoding: +// +// HTTP | RPC +// -----|----- +// `PUT /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 +// request body. This enables the following alternative definition of +// the update method: +// +// service Messaging { +// rpc UpdateMessage(Message) returns (Message) { +// option (google.api.http) = { +// put: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// +// The following HTTP JSON to RPC mapping is enabled: +// +// HTTP | RPC +// -----|----- +// `PUT /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 +// the body. This makes this option more rarely used in practice of +// defining REST APIs. The common usage of `*` is in custom methods +// which don't use the URL at all for transferring data. +// +// It is possible to define multiple HTTP methods for one RPC by using +// the `additional_bindings` option. Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/messages/{message_id}" +// additional_bindings { +// get: "/v1/users/{user_id}/messages/{message_id}" +// } +// }; +// } +// } +// message GetMessageRequest { +// string message_id = 1; +// string user_id = 2; +// } +// +// +// This enables the following two alternative HTTP JSON to RPC +// mappings: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` +// +// # Rules for HTTP mapping +// +// The rules for mapping HTTP path, query parameters, and body fields +// to the request message are as follows: +// +// 1. The `body` field specifies either `*` or a field path, or is +// omitted. If omitted, it indicates there is no HTTP request body. +// 2. Leaf fields (recursive expansion of nested messages in the +// request) can be classified into three types: +// (a) Matched in the URL template. +// (b) Covered by body (if body is `*`, everything except (a) fields; +// else everything under the body field) +// (c) All other fields. +// 3. URL query parameters found in the HTTP request are mapped to (c) fields. +// 4. Any body sent with an HTTP request can contain only (b) fields. +// +// The syntax of the path template is as follows: +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single path segment. The syntax `**` matches zero +// or more path segments, which must be the last part of the path except the +// `Verb`. The syntax `LITERAL` matches literal text in the path. +// +// The syntax `Variable` matches part of the URL path as specified by its +// template. A variable template must not contain other variables. If a variable +// matches a single path segment, its template may be omitted, e.g. `{var}` +// is equivalent to `{var=*}`. +// +// If a variable contains exactly one path segment, such as `"{var}"` or +// `"{var=*}"`, when such a variable is expanded into a URL path, all characters +// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the +// Discovery Document as `{var}`. +// +// If a variable contains one or more path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path, all +// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables +// show up in the Discovery Document as `{+var}`. +// +// NOTE: While the single segment variable matches the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 +// Simple String Expansion, the multi segment variable **does not** match +// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion +// does not expand special characters like `?` and `#`, which would lead +// to invalid URLs. +// +// NOTE: the field paths in variables and in the `body` must not refer to +// repeated fields or map fields. +message HttpRule { + // Selects methods to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + string selector = 1; + + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + oneof pattern { + // Used for listing and getting information about resources. + string get = 2; + + // Used for updating a resource. + string put = 3; + + // Used for creating a resource. + string post = 4; + + // Used for deleting a resource. + string delete = 5; + + // Used for updating a resource. + string patch = 6; + + // The custom pattern is used for specifying an HTTP method that is not + // included in the `pattern` field, such as HEAD, or "*" to leave the + // HTTP method unspecified for this rule. The wild-card rule is useful + // for services that provide content to Web (HTML) clients. + CustomHttpPattern custom = 8; + } + + // The name of the request field whose value is mapped to the HTTP body, or + // `*` for mapping all fields not captured by the path pattern to the HTTP + // body. NOTE: the referred field must not be a repeated field and must be + // present at the top-level of request message type. + string body = 7; + + // Optional. The name of the response field whose value is mapped to the HTTP + // body of response. Other response fields are ignored. When + // not set, the response message will be used as HTTP body of response. + string response_body = 12; + + // Additional HTTP bindings for the selector. Nested bindings must + // not contain an `additional_bindings` field themselves (that is, + // the nesting may only be one level deep). + repeated HttpRule additional_bindings = 11; +} + +// A custom pattern is used for defining custom HTTP verb. +message CustomHttpPattern { + // The name of this custom HTTP verb. + string kind = 1; + + // The path matched by this custom verb. + string path = 2; +} diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/google/api/httpbody.proto b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/google/api/httpbody.proto new file mode 100644 index 00000000..4428515c --- /dev/null +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/google/api/httpbody.proto @@ -0,0 +1,78 @@ +// Copyright 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.api; + +import "google/protobuf/any.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; +option java_multiple_files = true; +option java_outer_classname = "HttpBodyProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Message that represents an arbitrary HTTP body. It should only be used for +// payload formats that can't be represented as JSON, such as raw binary or +// an HTML page. +// +// +// This message can be used both in streaming and non-streaming API methods in +// the request as well as the response. +// +// It can be used as a top-level request field, which is convenient if one +// wants to extract parameters from either the URL or HTTP template into the +// request fields and also want access to the raw HTTP body. +// +// Example: +// +// message GetResourceRequest { +// // A unique request id. +// string request_id = 1; +// +// // The raw HTTP body is bound to this field. +// google.api.HttpBody http_body = 2; +// } +// +// service ResourceService { +// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); +// rpc UpdateResource(google.api.HttpBody) returns +// (google.protobuf.Empty); +// } +// +// Example with streaming methods: +// +// service CaldavService { +// rpc GetCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); +// rpc UpdateCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); +// } +// +// Use of this type only changes how the request and response bodies are +// handled, all other features will continue to work unchanged. +message HttpBody { + // The HTTP Content-Type header value specifying the content type of the body. + string content_type = 1; + + // The HTTP request/response body as raw binary. + bytes data = 2; + + // Application specific response metadata. Must be set in the first response + // for streaming APIs. + repeated google.protobuf.Any extensions = 3; +} \ No newline at end of file diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/annotations_grpc_pb.js b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/annotations_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/annotations_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/annotations_pb.js b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/annotations_pb.js new file mode 100644 index 00000000..288b39dc --- /dev/null +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/annotations_pb.js @@ -0,0 +1,54 @@ +// source: google/api/annotations.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var google_api_http_pb = require('../../google/api/http_pb.js'); +goog.object.extend(proto, google_api_http_pb); +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.http', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `http`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.http = new jspb.ExtensionFieldInfo( + 72295728, + {http: 0}, + google_api_http_pb.HttpRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + google_api_http_pb.HttpRule.toObject), + 0); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295728] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.http, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + google_api_http_pb.HttpRule.serializeBinaryToWriter, + google_api_http_pb.HttpRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[72295728] = proto.google.api.http; + +goog.object.extend(exports, proto.google.api); diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/http_grpc_pb.js b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/http_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/http_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/http_pb.js b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/http_pb.js new file mode 100644 index 00000000..5b083126 --- /dev/null +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/http_pb.js @@ -0,0 +1,1012 @@ +// source: google/api/http.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +goog.exportSymbol('proto.google.api.CustomHttpPattern', null, global); +goog.exportSymbol('proto.google.api.Http', null, global); +goog.exportSymbol('proto.google.api.HttpRule', null, global); +goog.exportSymbol('proto.google.api.HttpRule.PatternCase', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.Http = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Http.repeatedFields_, null); +}; +goog.inherits(proto.google.api.Http, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.Http.displayName = 'proto.google.api.Http'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.HttpRule = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpRule.repeatedFields_, proto.google.api.HttpRule.oneofGroups_); +}; +goog.inherits(proto.google.api.HttpRule, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.HttpRule.displayName = 'proto.google.api.HttpRule'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.CustomHttpPattern = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.CustomHttpPattern, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.CustomHttpPattern.displayName = 'proto.google.api.CustomHttpPattern'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.Http.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.Http.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.Http.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.Http} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Http.toObject = function(includeInstance, msg) { + var f, obj = { + rulesList: jspb.Message.toObjectList(msg.getRulesList(), + proto.google.api.HttpRule.toObject, includeInstance), + fullyDecodeReservedExpansion: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.Http} + */ +proto.google.api.Http.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.Http; + return proto.google.api.Http.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.Http} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.Http} + */ +proto.google.api.Http.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.HttpRule; + reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); + msg.addRules(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFullyDecodeReservedExpansion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.Http.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.Http.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.Http} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Http.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRulesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.HttpRule.serializeBinaryToWriter + ); + } + f = message.getFullyDecodeReservedExpansion(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * repeated HttpRule rules = 1; + * @return {!Array} + */ +proto.google.api.Http.prototype.getRulesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.Http} returns this +*/ +proto.google.api.Http.prototype.setRulesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.HttpRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.Http.prototype.addRules = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.HttpRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.Http} returns this + */ +proto.google.api.Http.prototype.clearRulesList = function() { + return this.setRulesList([]); +}; + + +/** + * optional bool fully_decode_reserved_expansion = 2; + * @return {boolean} + */ +proto.google.api.Http.prototype.getFullyDecodeReservedExpansion = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.Http} returns this + */ +proto.google.api.Http.prototype.setFullyDecodeReservedExpansion = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.HttpRule.repeatedFields_ = [11]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.HttpRule.oneofGroups_ = [[2,3,4,5,6,8]]; + +/** + * @enum {number} + */ +proto.google.api.HttpRule.PatternCase = { + PATTERN_NOT_SET: 0, + GET: 2, + PUT: 3, + POST: 4, + DELETE: 5, + PATCH: 6, + CUSTOM: 8 +}; + +/** + * @return {proto.google.api.HttpRule.PatternCase} + */ +proto.google.api.HttpRule.prototype.getPatternCase = function() { + return /** @type {proto.google.api.HttpRule.PatternCase} */(jspb.Message.computeOneofCase(this, proto.google.api.HttpRule.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.HttpRule.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.HttpRule.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.HttpRule} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpRule.toObject = function(includeInstance, msg) { + var f, obj = { + selector: jspb.Message.getFieldWithDefault(msg, 1, ""), + get: jspb.Message.getFieldWithDefault(msg, 2, ""), + put: jspb.Message.getFieldWithDefault(msg, 3, ""), + post: jspb.Message.getFieldWithDefault(msg, 4, ""), + pb_delete: jspb.Message.getFieldWithDefault(msg, 5, ""), + patch: jspb.Message.getFieldWithDefault(msg, 6, ""), + custom: (f = msg.getCustom()) && proto.google.api.CustomHttpPattern.toObject(includeInstance, f), + body: jspb.Message.getFieldWithDefault(msg, 7, ""), + responseBody: jspb.Message.getFieldWithDefault(msg, 12, ""), + additionalBindingsList: jspb.Message.toObjectList(msg.getAdditionalBindingsList(), + proto.google.api.HttpRule.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.HttpRule; + return proto.google.api.HttpRule.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.HttpRule} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSelector(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setGet(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPut(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPost(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDelete(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setPatch(value); + break; + case 8: + var value = new proto.google.api.CustomHttpPattern; + reader.readMessage(value,proto.google.api.CustomHttpPattern.deserializeBinaryFromReader); + msg.setCustom(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setBody(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setResponseBody(value); + break; + case 11: + var value = new proto.google.api.HttpRule; + reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); + msg.addAdditionalBindings(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.HttpRule.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.HttpRule.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.HttpRule} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpRule.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSelector(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = message.getCustom(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.api.CustomHttpPattern.serializeBinaryToWriter + ); + } + f = message.getBody(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getResponseBody(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getAdditionalBindingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.google.api.HttpRule.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string selector = 1; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getSelector = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setSelector = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string get = 2; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getGet = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setGet = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearGet = function() { + return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasGet = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string put = 3; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPut = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPut = function(value) { + return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPut = function() { + return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPut = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string post = 4; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPost = function(value) { + return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPost = function() { + return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPost = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string delete = 5; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getDelete = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setDelete = function(value) { + return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearDelete = function() { + return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasDelete = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string patch = 6; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPatch = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPatch = function(value) { + return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPatch = function() { + return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPatch = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional CustomHttpPattern custom = 8; + * @return {?proto.google.api.CustomHttpPattern} + */ +proto.google.api.HttpRule.prototype.getCustom = function() { + return /** @type{?proto.google.api.CustomHttpPattern} */ ( + jspb.Message.getWrapperField(this, proto.google.api.CustomHttpPattern, 8)); +}; + + +/** + * @param {?proto.google.api.CustomHttpPattern|undefined} value + * @return {!proto.google.api.HttpRule} returns this +*/ +proto.google.api.HttpRule.prototype.setCustom = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearCustom = function() { + return this.setCustom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasCustom = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string body = 7; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string response_body = 12; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getResponseBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setResponseBody = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * repeated HttpRule additional_bindings = 11; + * @return {!Array} + */ +proto.google.api.HttpRule.prototype.getAdditionalBindingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.HttpRule} returns this +*/ +proto.google.api.HttpRule.prototype.setAdditionalBindingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.google.api.HttpRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.prototype.addAdditionalBindings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.google.api.HttpRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearAdditionalBindingsList = function() { + return this.setAdditionalBindingsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.CustomHttpPattern.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.CustomHttpPattern.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.CustomHttpPattern} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.CustomHttpPattern.toObject = function(includeInstance, msg) { + var f, obj = { + kind: jspb.Message.getFieldWithDefault(msg, 1, ""), + path: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.CustomHttpPattern} + */ +proto.google.api.CustomHttpPattern.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.CustomHttpPattern; + return proto.google.api.CustomHttpPattern.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.CustomHttpPattern} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.CustomHttpPattern} + */ +proto.google.api.CustomHttpPattern.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKind(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.CustomHttpPattern.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.CustomHttpPattern.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.CustomHttpPattern} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.CustomHttpPattern.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string kind = 1; + * @return {string} + */ +proto.google.api.CustomHttpPattern.prototype.getKind = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.CustomHttpPattern} returns this + */ +proto.google.api.CustomHttpPattern.prototype.setKind = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string path = 2; + * @return {string} + */ +proto.google.api.CustomHttpPattern.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.CustomHttpPattern} returns this + */ +proto.google.api.CustomHttpPattern.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.api); diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/httpbody_grpc_pb.js b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/httpbody_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/httpbody_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/httpbody_pb.js b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/httpbody_pb.js new file mode 100644 index 00000000..1478215c --- /dev/null +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/google/api/httpbody_pb.js @@ -0,0 +1,292 @@ +// source: google/api/httpbody.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.google.api.HttpBody', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.HttpBody = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpBody.repeatedFields_, null); +}; +goog.inherits(proto.google.api.HttpBody, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.HttpBody.displayName = 'proto.google.api.HttpBody'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.HttpBody.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.HttpBody.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.HttpBody.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.HttpBody} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpBody.toObject = function(includeInstance, msg) { + var f, obj = { + contentType: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: msg.getData_asB64(), + extensionsList: jspb.Message.toObjectList(msg.getExtensionsList(), + google_protobuf_any_pb.Any.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.HttpBody} + */ +proto.google.api.HttpBody.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.HttpBody; + return proto.google.api.HttpBody.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.HttpBody} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.HttpBody} + */ +proto.google.api.HttpBody.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setContentType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addExtensions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.HttpBody.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.HttpBody.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.HttpBody} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpBody.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContentType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getExtensionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string content_type = 1; + * @return {string} + */ +proto.google.api.HttpBody.prototype.getContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpBody} returns this + */ +proto.google.api.HttpBody.prototype.setContentType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.google.api.HttpBody.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.google.api.HttpBody.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.google.api.HttpBody.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.api.HttpBody} returns this + */ +proto.google.api.HttpBody.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated google.protobuf.Any extensions = 3; + * @return {!Array} + */ +proto.google.api.HttpBody.prototype.getExtensionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.HttpBody} returns this +*/ +proto.google.api.HttpBody.prototype.setExtensionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.google.api.HttpBody.prototype.addExtensions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.HttpBody} returns this + */ +proto.google.api.HttpBody.prototype.clearExtensionsList = function() { + return this.setExtensionsList([]); +}; + + +goog.object.extend(exports, proto.google.api); diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/proto/business_grpc_pb.js b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/proto/business_grpc_pb.js index 6dcc1813..1ba119fc 100644 --- a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/proto/business_grpc_pb.js +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/proto/business_grpc_pb.js @@ -19,6 +19,7 @@ var grpc = require('@grpc/grpc-js'); var proto_business_pb = require('../proto/business_pb.js'); var proto_base_data_type_pb = require('../proto/base_data_type_pb.js'); +var google_api_annotations_pb = require('../google/api/annotations_pb.js'); function serialize_data_Callout(arg) { if (!(arg instanceof proto_business_pb.Callout)) { diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/proto/business_pb.js b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/proto/business_pb.js index 05c8a2ef..88dfeaa2 100644 --- a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/proto/business_pb.js +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/grpc/proto/business_pb.js @@ -23,6 +23,8 @@ var global = (function() { var proto_base_data_type_pb = require('../proto/base_data_type_pb.js'); goog.object.extend(proto, proto_base_data_type_pb); +var google_api_annotations_pb = require('../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); goog.exportSymbol('proto.data.Callout', null, global); goog.exportSymbol('proto.data.ChatEntry', null, global); goog.exportSymbol('proto.data.ChatEntry.ChatEntryType', null, global); @@ -11496,7 +11498,8 @@ proto.data.RunBusinessProcessRequest.toObject = function(includeInstance, msg) { parametersList: jspb.Message.toObjectList(msg.getParametersList(), proto_base_data_type_pb.KeyValue.toObject, includeInstance), selectionsList: jspb.Message.toObjectList(msg.getSelectionsList(), - proto_base_data_type_pb.KeyValueSelection.toObject, includeInstance) + proto_base_data_type_pb.KeyValueSelection.toObject, includeInstance), + browserId: jspb.Message.getFieldWithDefault(msg, 15, 0) }; if (includeInstance) { @@ -11591,6 +11594,10 @@ proto.data.RunBusinessProcessRequest.deserializeBinaryFromReader = function(msg, reader.readMessage(value,proto_base_data_type_pb.KeyValueSelection.deserializeBinaryFromReader); msg.addSelections(value); break; + case 15: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBrowserId(value); + break; default: reader.skipField(); break; @@ -11720,6 +11727,13 @@ proto.data.RunBusinessProcessRequest.serializeBinaryToWriter = function(message, proto_base_data_type_pb.KeyValueSelection.serializeBinaryToWriter ); } + f = message.getBrowserId(); + if (f !== 0) { + writer.writeInt32( + 15, + f + ); + } }; @@ -12015,6 +12029,24 @@ proto.data.RunBusinessProcessRequest.prototype.clearSelectionsList = function() }; +/** + * optional int32 browser_id = 15; + * @return {number} + */ +proto.data.RunBusinessProcessRequest.prototype.getBrowserId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.data.RunBusinessProcessRequest} returns this + */ +proto.data.RunBusinessProcessRequest.prototype.setBrowserId = function(value) { + return jspb.Message.setProto3IntField(this, 15, value); +}; + + diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/package.json b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/package.json index b354899c..f3a48438 100644 --- a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/package.json +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/package.json @@ -26,8 +26,8 @@ }, "scripts": { "ci": "yarn install --frozen-lockfile", - "stub": "npm run stub:bank_statement_match && npm run stub:base_data_type && npm run stub:business && npm run stub:business_partner && npm run stub:core_functionality && npm run stub:dashboarding && npm run stub:dictionary && npm run stub:enrollment && npm run stub:express_movement && npm run stub:express_receipt && npm run stub:express_shipment && npm run stub:file_management && npm run stub:general_ledger && npm run stub:import_file_loader && npm run stub:in_out && npm run stub:invoice && npm run stub:issue_management && npm run stub:logs && npm run stub:material_management && npm run stub:match_po_receipt_invoice && npm run stub:order && npm run stub:payment && npm run stub:payment_allocation && npm run stub:payment_print_export && npm run stub:payroll_action_notice && npm run stub:point_of_sales && npm run stub:product && npm run stub:record_management && npm run stub:security && npm run stub:time_control && npm run stub:time_record && npm run stub:user_customization && npm run stub:workflow", - "stub:all": "grpc_tools_node_protoc --js_out=import_style=commonjs,binary:grpc/ --grpc_out=grpc_js:grpc/ proto/base_data_type.proto proto/business.proto proto/business_partner.proto proto/core_functionality.proto proto/dashboarding.proto proto/dictionary.proto proto/enrollment.proto proto/express_movement.proto proto/express_receipt.proto proto/express_shipment.proto proto/file_management.proto proto/general_ledger.proto proto/import_file_loader.proto proto/in_out.proto proto/invoice.proto proto/issue_management.proto proto/logs.proto proto/material_management.proto proto/match_po_receipt_invoice.proto proto/order.proto proto/payment.proto proto/payment_allocation.proto proto/payment_print_export.proto proto/payroll_action_notice.proto proto/point_of_sales.proto proto/product.proto proto/record_management.proto proto/security.proto proto/time_control.proto proto/time_record.proto proto/user_customization.proto proto/workflow.proto", + "stub": "npm run stub:bank_statement_match && npm run stub:base_data_type && npm run stub:business && npm run stub:business_partner && npm run stub:core_functionality && npm run stub:dashboarding && npm run stub:dictionary && npm run stub:enrollment && npm run stub:express_movement && npm run stub:express_receipt && npm run stub:express_shipment && npm run stub:file_management && npm run stub:general_ledger && npm run stub:import_file_loader && npm run stub:in_out && npm run stub:invoice && npm run stub:issue_management && npm run stub:logs && npm run stub:material_management && npm run stub:match_po_receipt_invoice && npm run stub:order && npm run stub:payment && npm run stub:payment_allocation && npm run stub:payment_print_export && npm run stub:payroll_action_notice && npm run stub:point_of_sales && npm run stub:product && npm run stub:record_management && npm run stub:security && npm run stub:time_control && npm run stub:time_record && npm run stub:user_customization && npm run stub:workflow && npm run stub:google", + "stub:all": "grpc_tools_node_protoc --js_out=import_style=commonjs,binary:grpc/ --grpc_out=grpc_js:grpc/ proto/base_data_type.proto proto/business.proto proto/business_partner.proto proto/core_functionality.proto proto/dashboarding.proto proto/dictionary.proto proto/enrollment.proto proto/express_movement.proto proto/express_receipt.proto proto/express_shipment.proto proto/file_management.proto proto/general_ledger.proto proto/import_file_loader.proto proto/in_out.proto proto/invoice.proto proto/issue_management.proto proto/logs.proto proto/material_management.proto proto/match_po_receipt_invoice.proto proto/order.proto proto/payment.proto proto/payment_allocation.proto proto/payment_print_export.proto proto/payroll_action_notice.proto proto/point_of_sales.proto proto/product.proto proto/record_management.proto proto/security.proto proto/time_control.proto proto/time_record.proto proto/user_customization.proto proto/workflow.proto google/api/annotations.proto google/api/http.proto google/api/httpbody.proto", "stub:bank_statement_match": "grpc_tools_node_protoc proto/bank_statement_match.proto --js_out=import_style=commonjs,binary:grpc/ --grpc_out=grpc_js:grpc/", "stub:base_data_type": "grpc_tools_node_protoc proto/base_data_type.proto --js_out=import_style=commonjs,binary:grpc/ --grpc_out=grpc_js:grpc/", "stub:business": "grpc_tools_node_protoc proto/business.proto --js_out=import_style=commonjs,binary:grpc/ --grpc_out=grpc_js:grpc/", @@ -60,7 +60,8 @@ "stub:time_control": "grpc_tools_node_protoc proto/time_control.proto --js_out=import_style=commonjs,binary:grpc/ --grpc_out=grpc_js:grpc/", "stub:time_record": "grpc_tools_node_protoc proto/time_record.proto --js_out=import_style=commonjs,binary:grpc/ --grpc_out=grpc_js:grpc/", "stub:user_customization": "grpc_tools_node_protoc proto/user_customization.proto --js_out=import_style=commonjs,binary:grpc/ --grpc_out=grpc_js:grpc/", - "stub:workflow": "grpc_tools_node_protoc proto/workflow.proto --js_out=import_style=commonjs,binary:grpc/ --grpc_out=grpc_js:grpc/" + "stub:workflow": "grpc_tools_node_protoc proto/workflow.proto --js_out=import_style=commonjs,binary:grpc/ --grpc_out=grpc_js:grpc/", + "stub:google": "grpc_tools_node_protoc --js_out=import_style=commonjs,binary:grpc/ --grpc_out=grpc_js:grpc/ google/api/annotations.proto google/api/http.proto google/api/httpbody.proto" }, "repository": { "type": "git", diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/proto/business.proto b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/proto/business.proto index a22332a3..6844b59e 100644 --- a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/proto/business.proto +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/proto/business.proto @@ -19,91 +19,210 @@ option java_package = "org.spin.backend.grpc.common"; option java_outer_classname = "ADempiereData"; import "proto/base_data_type.proto"; +import "google/api/annotations.proto"; package data; // The greeting service definition. service BusinessData { // Get a Entity - rpc GetEntity(GetEntityRequest) returns (Entity) {} + rpc GetEntity(GetEntityRequest) returns (Entity) { + option (google.api.http) = { get: "/business-data/entities/{id}" }; + } // Create Entity Request - rpc CreateEntity(CreateEntityRequest) returns (Entity) {} + rpc CreateEntity(CreateEntityRequest) returns (Entity) { + option (google.api.http) = { + post: "/business-data/entities", + body: "*" + }; + } // Update Entity Request - rpc UpdateEntity(UpdateEntityRequest) returns (Entity) {} + rpc UpdateEntity(UpdateEntityRequest) returns (Entity) { + option (google.api.http) = { + put: "/business-data/entities/{id}", + body: "*" + }; + } // Delete Entity Request - rpc DeleteEntity(DeleteEntityRequest) returns (Empty) {} + rpc DeleteEntity(DeleteEntityRequest) returns (Empty) { + option (google.api.http) = { delete: "/business-data/entities/{id}" }; + } // List a Entities - rpc ListEntities(ListEntitiesRequest) returns (ListEntitiesResponse) {} + rpc ListEntities(ListEntitiesRequest) returns (ListEntitiesResponse) { + option (google.api.http) = { get: "/business-data/entities" }; + } // Request a BusinessProcess / Report - rpc RunBusinessProcess(RunBusinessProcessRequest) returns (ProcessLog) {} + rpc RunBusinessProcess(RunBusinessProcessRequest) returns (ProcessLog) { + option (google.api.http) = { + post: "/business-data/process", + body: "*" + }; + } } // User Interface service UserInterface { // Get a Tab Entity - rpc GetTabEntity(GetTabEntityRequest) returns (Entity) {} + rpc GetTabEntity(GetTabEntityRequest) returns (Entity) { + option (google.api.http) = { get: "/user-interface/entities/{id}" }; + } // Create Tab Entity - rpc CreateTabEntity(CreateTabEntityRequest) returns (Entity) {} + rpc CreateTabEntity(CreateTabEntityRequest) returns (Entity) { + option (google.api.http) = { + post: "/user-interface/entities", + body: "*" + }; + } // Update Tab Entity - rpc UpdateTabEntity(UpdateTabEntityRequest) returns (Entity) {} + rpc UpdateTabEntity(UpdateTabEntityRequest) returns (Entity) { + option (google.api.http) = { + put: "/user-interface/entities/{id}", + body: "*" + }; + } // List tab Entities - rpc ListTabEntities(ListTabEntitiesRequest) returns (ListEntitiesResponse) {} + rpc ListTabEntities(ListTabEntitiesRequest) returns (ListEntitiesResponse) { + option (google.api.http) = { get: "/user-interface/entities" }; + } // Rollback Entity Request - rpc RollbackEntity(RollbackEntityRequest) returns (Entity) {} + rpc RollbackEntity(RollbackEntityRequest) returns (Entity) { + option (google.api.http) = { + put: "/user-interface/entities/{id}/rollback", + body: "*" + }; + } // Run a Callout - rpc RunCallout(RunCalloutRequest) returns (Callout) {} + rpc RunCallout(RunCalloutRequest) returns (Callout) { + option (google.api.http) = { + post: "/user-interface/run-callout", + body: "*" + }; + } // Request Translations List - rpc ListTranslations(ListTranslationsRequest) returns (ListTranslationsResponse) {} + rpc ListTranslations(ListTranslationsRequest) returns (ListTranslationsResponse) { + option (google.api.http) = { get: "/user-interface/translations" }; + } // Get Default Value - rpc GetDefaultValue(GetDefaultValueRequest) returns (DefaultValue) {} + rpc GetDefaultValue(GetDefaultValueRequest) returns (DefaultValue) { + option (google.api.http) = { get: "/user-interface/default-value/{id}" }; + } // Get Lookup Item - rpc GetLookupItem(GetLookupItemRequest) returns (LookupItem) {} + rpc GetLookupItem(GetLookupItemRequest) returns (LookupItem) { + option (google.api.http) = { get: "/user-interface/lookups/{id}" }; + } // List Lookup Item - rpc ListLookupItems(ListLookupItemsRequest) returns (ListLookupItemsResponse) {} + rpc ListLookupItems(ListLookupItemsRequest) returns (ListLookupItemsResponse) { + option (google.api.http) = { get: "/user-interface/lookups" }; + } // Request Browser Data - rpc ListBrowserItems(ListBrowserItemsRequest) returns (ListBrowserItemsResponse) {} + rpc ListBrowserItems(ListBrowserItemsRequest) returns (ListBrowserItemsResponse) { + option (google.api.http) = { get: "/user-interface/browser-items" }; + } // Update Browser Entity - rpc UpdateBrowserEntity(UpdateBrowserEntityRequest) returns (Entity) {} + rpc UpdateBrowserEntity(UpdateBrowserEntityRequest) returns (Entity) { + option (google.api.http) = { + put: "/user-interface/browser-items/{id}", + body: "*" + }; + } // Exists References on Record - rpc ExistsReferences(ExistsReferencesRequest) returns (ExistsReferencesResponse) {} + rpc ExistsReferences(ExistsReferencesRequest) returns (ExistsReferencesResponse) { + option (google.api.http) = { get: "/user-interface/references/{record_id}/exists" }; + } // List a References - rpc ListReferences(ListReferencesRequest) returns (ListReferencesResponse) {} + rpc ListReferences(ListReferencesRequest) returns (ListReferencesResponse) { + option (google.api.http) = { get: "/user-interface/references" }; + } // Get context Info - rpc GetContextInfoValue(GetContextInfoValueRequest) returns (ContextInfoValue) {} + rpc GetContextInfoValue(GetContextInfoValueRequest) returns (ContextInfoValue) { + option (google.api.http) = { get: "/user-interface/context-info/{id}" }; + } // Get Private Access - rpc GetPrivateAccess(GetPrivateAccessRequest) returns (PrivateAccess) {} + rpc GetPrivateAccess(GetPrivateAccessRequest) returns (PrivateAccess) { + option (google.api.http) = { get: "/user-interface/private-access/{id}" }; + } // Create Private Access - rpc LockPrivateAccess(LockPrivateAccessRequest) returns (PrivateAccess) {} + rpc LockPrivateAccess(LockPrivateAccessRequest) returns (PrivateAccess) { + option (google.api.http) = { + put: "/user-interface/private-access/{id}/lock", + body: "*" + }; + } // Change Private Access - rpc UnlockPrivateAccess(UnlockPrivateAccessRequest) returns (PrivateAccess) {} + rpc UnlockPrivateAccess(UnlockPrivateAccessRequest) returns (PrivateAccess) { + option (google.api.http) = { + put: "/user-interface/private-access/{id}/unlock", + body: "*" + }; + } // Get Record Access - rpc GetRecordAccess(GetRecordAccessRequest) returns (RecordAccess) {} + rpc GetRecordAccess(GetRecordAccessRequest) returns (RecordAccess) { + option (google.api.http) = { get: "/user-interface/record-access/{id}" }; + } // Set Record Access - rpc SetRecordAccess(SetRecordAccessRequest) returns (RecordAccess) {} + rpc SetRecordAccess(SetRecordAccessRequest) returns (RecordAccess) { + option (google.api.http) = { + put: "/user-interface/record-access/{id}", + body: "*" + }; + } // Request Print Format List - rpc ListPrintFormats(ListPrintFormatsRequest) returns (ListPrintFormatsResponse) {} + rpc ListPrintFormats(ListPrintFormatsRequest) returns (ListPrintFormatsResponse) { + option (google.api.http) = { get: "/user-interface/print-formats" }; + } // Request Report View List - rpc ListReportViews(ListReportViewsRequest) returns (ListReportViewsResponse) {} + rpc ListReportViews(ListReportViewsRequest) returns (ListReportViewsResponse) { + option (google.api.http) = { get: "/user-interface/report-views" }; + } // Request Drill Tables List - rpc ListDrillTables(ListDrillTablesRequest) returns (ListDrillTablesResponse) {} + rpc ListDrillTables(ListDrillTablesRequest) returns (ListDrillTablesResponse) { + option (google.api.http) = { get: "/user-interface/drill-tables" }; + } // Request Report Output - rpc GetReportOutput(GetReportOutputRequest) returns (ReportOutput) {} + rpc GetReportOutput(GetReportOutputRequest) returns (ReportOutput) { + option (google.api.http) = { get: "/user-interface/report-output/{process_id}" }; + } // Add Chat Entry - rpc CreateChatEntry(CreateChatEntryRequest) returns (ChatEntry) {} + rpc CreateChatEntry(CreateChatEntryRequest) returns (ChatEntry) { + option (google.api.http) = { + post: "/user-interface/chat-entry", + body: "*" + }; + } // Set Preference from field - rpc SetPreference(SetPreferenceRequest) returns (Preference) {} + rpc SetPreference(SetPreferenceRequest) returns (Preference) { + option (google.api.http) = { + post: "/user-interface/preference", + body: "*" + }; + } // Delete Preference from field - rpc DeletePreference(DeletePreferenceRequest) returns (Empty) {} + rpc DeletePreference(DeletePreferenceRequest) returns (Empty) { + option (google.api.http) = { delete: "/user-interface/preference/{id}" }; + } // List General Info - rpc ListGeneralInfo(ListGeneralInfoRequest) returns (ListEntitiesResponse) {} + rpc ListGeneralInfo(ListGeneralInfoRequest) returns (ListEntitiesResponse) { + option (google.api.http) = { get: "/user-interface/general-info" }; + } // List Tab Sequences - rpc ListTabSequences(ListTabSequencesRequest) returns (ListEntitiesResponse) {} + rpc ListTabSequences(ListTabSequencesRequest) returns (ListEntitiesResponse) { + option (google.api.http) = { get: "/user-interface/tab-sequences" }; + } // Save Tab Sequences - rpc SaveTabSequences(SaveTabSequencesRequest) returns (ListEntitiesResponse) {} + rpc SaveTabSequences(SaveTabSequencesRequest) returns (ListEntitiesResponse) { + option (google.api.http) = { + post: "/user-interface/tab-sequences", + body: "*" + }; + } // List Tree Nodes Request - rpc ListTreeNodes(ListTreeNodesRequest) returns (ListTreeNodesResponse) {} + rpc ListTreeNodes(ListTreeNodesRequest) returns (ListTreeNodesResponse) { + option (google.api.http) = { get: "/user-interface/tree-nodes" }; + } // List Mail Templates - rpc ListMailTemplates(ListMailTemplatesRequest) returns (ListMailTemplatesResponse) {} + rpc ListMailTemplates(ListMailTemplatesRequest) returns (ListMailTemplatesResponse) { + option (google.api.http) = { get: "/user-interface/mail-templates" }; + } } // Role Access Request @@ -475,6 +594,7 @@ message RunBusinessProcessRequest { bool is_summary = 12; repeated KeyValue parameters = 13; repeated KeyValueSelection selections = 14; + int32 browser_id = 15; } // Translations Request diff --git a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/services/businessData.js b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/services/businessData.js index 5a77bc69..c558e0df 100644 --- a/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/services/businessData.js +++ b/src/modules/adempiere-api/api/extensions/adempiere/grpc-api/services/businessData.js @@ -74,7 +74,8 @@ class BusinessData { reportViewUuid, isSummary, parametersList, - tableSelectedId, + // + browserId, selectionsList }, callback) { const { RunBusinessProcessRequest } = this.stubFile; @@ -127,10 +128,10 @@ class BusinessData { }); } - request.setTableSelectedId( - getValidInteger(tableSelectedId) + // process of browser + request.setBrowserId( + getValidInteger(browserId) ); - // browser records selections list if (!isEmptyValue(selectionsList)) { const { getKeyValueSelectionToGRPC } = require('../utils/baseDataTypeToGRPC.js');