UNPKG

@connectrpc/connect-query

Version:

TypeScript-first expansion pack for TanStack Query that gives you Protobuf superpowers.

434 lines 15.3 kB
"use strict"; // Copyright 2021-2023 The Connect Authors // // 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. Object.defineProperty(exports, "__esModule", { value: true }); exports.OperationResponse = exports.OperationRequest = exports.ListResponse = exports.ListRequest = exports.CountResponse = exports.CountRequest = exports.Nothing = exports.IntroduceResponse = exports.IntroduceRequest = exports.ConverseResponse = exports.ConverseRequest = exports.SayResponse = exports.SayRequest = void 0; const protobuf_1 = require("@bufbuild/protobuf"); /** * SayRequest is a single-sentence request. * * @generated from message connectrpc.eliza.v1.SayRequest */ class SayRequest extends protobuf_1.Message { /** * @generated from field: string sentence = 1; */ sentence = ""; constructor(data) { super(); protobuf_1.proto3.util.initPartial(data, this); } static runtime = protobuf_1.proto3; static typeName = "connectrpc.eliza.v1.SayRequest"; static fields = protobuf_1.proto3.util.newFieldList(() => [ { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes, options) { return new SayRequest().fromBinary(bytes, options); } static fromJson(jsonValue, options) { return new SayRequest().fromJson(jsonValue, options); } static fromJsonString(jsonString, options) { return new SayRequest().fromJsonString(jsonString, options); } static equals(a, b) { return protobuf_1.proto3.util.equals(SayRequest, a, b); } } exports.SayRequest = SayRequest; /** * SayResponse is a single-sentence response. * * @generated from message connectrpc.eliza.v1.SayResponse */ class SayResponse extends protobuf_1.Message { /** * @generated from field: string sentence = 1; */ sentence = ""; constructor(data) { super(); protobuf_1.proto3.util.initPartial(data, this); } static runtime = protobuf_1.proto3; static typeName = "connectrpc.eliza.v1.SayResponse"; static fields = protobuf_1.proto3.util.newFieldList(() => [ { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes, options) { return new SayResponse().fromBinary(bytes, options); } static fromJson(jsonValue, options) { return new SayResponse().fromJson(jsonValue, options); } static fromJsonString(jsonString, options) { return new SayResponse().fromJsonString(jsonString, options); } static equals(a, b) { return protobuf_1.proto3.util.equals(SayResponse, a, b); } } exports.SayResponse = SayResponse; /** * ConverseRequest is a single sentence request sent as part of a * back-and-forth conversation. * * @generated from message connectrpc.eliza.v1.ConverseRequest */ class ConverseRequest extends protobuf_1.Message { /** * @generated from field: string sentence = 1; */ sentence = ""; constructor(data) { super(); protobuf_1.proto3.util.initPartial(data, this); } static runtime = protobuf_1.proto3; static typeName = "connectrpc.eliza.v1.ConverseRequest"; static fields = protobuf_1.proto3.util.newFieldList(() => [ { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes, options) { return new ConverseRequest().fromBinary(bytes, options); } static fromJson(jsonValue, options) { return new ConverseRequest().fromJson(jsonValue, options); } static fromJsonString(jsonString, options) { return new ConverseRequest().fromJsonString(jsonString, options); } static equals(a, b) { return protobuf_1.proto3.util.equals(ConverseRequest, a, b); } } exports.ConverseRequest = ConverseRequest; /** * ConverseResponse is a single sentence response sent in answer to a * ConverseRequest. * * @generated from message connectrpc.eliza.v1.ConverseResponse */ class ConverseResponse extends protobuf_1.Message { /** * @generated from field: string sentence = 1; */ sentence = ""; constructor(data) { super(); protobuf_1.proto3.util.initPartial(data, this); } static runtime = protobuf_1.proto3; static typeName = "connectrpc.eliza.v1.ConverseResponse"; static fields = protobuf_1.proto3.util.newFieldList(() => [ { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes, options) { return new ConverseResponse().fromBinary(bytes, options); } static fromJson(jsonValue, options) { return new ConverseResponse().fromJson(jsonValue, options); } static fromJsonString(jsonString, options) { return new ConverseResponse().fromJsonString(jsonString, options); } static equals(a, b) { return protobuf_1.proto3.util.equals(ConverseResponse, a, b); } } exports.ConverseResponse = ConverseResponse; /** * IntroduceRequest asks Eliza to introduce itself to the named user. * * @generated from message connectrpc.eliza.v1.IntroduceRequest */ class IntroduceRequest extends protobuf_1.Message { /** * @generated from field: string name = 1; */ name = ""; constructor(data) { super(); protobuf_1.proto3.util.initPartial(data, this); } static runtime = protobuf_1.proto3; static typeName = "connectrpc.eliza.v1.IntroduceRequest"; static fields = protobuf_1.proto3.util.newFieldList(() => [ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes, options) { return new IntroduceRequest().fromBinary(bytes, options); } static fromJson(jsonValue, options) { return new IntroduceRequest().fromJson(jsonValue, options); } static fromJsonString(jsonString, options) { return new IntroduceRequest().fromJsonString(jsonString, options); } static equals(a, b) { return protobuf_1.proto3.util.equals(IntroduceRequest, a, b); } } exports.IntroduceRequest = IntroduceRequest; /** * IntroduceResponse is one sentence of Eliza's introductory monologue. * * @generated from message connectrpc.eliza.v1.IntroduceResponse */ class IntroduceResponse extends protobuf_1.Message { /** * @generated from field: string sentence = 1; */ sentence = ""; constructor(data) { super(); protobuf_1.proto3.util.initPartial(data, this); } static runtime = protobuf_1.proto3; static typeName = "connectrpc.eliza.v1.IntroduceResponse"; static fields = protobuf_1.proto3.util.newFieldList(() => [ { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes, options) { return new IntroduceResponse().fromBinary(bytes, options); } static fromJson(jsonValue, options) { return new IntroduceResponse().fromJson(jsonValue, options); } static fromJsonString(jsonString, options) { return new IntroduceResponse().fromJsonString(jsonString, options); } static equals(a, b) { return protobuf_1.proto3.util.equals(IntroduceResponse, a, b); } } exports.IntroduceResponse = IntroduceResponse; /** * @generated from message connectrpc.eliza.v1.Nothing */ class Nothing extends protobuf_1.Message { constructor(data) { super(); protobuf_1.proto3.util.initPartial(data, this); } static runtime = protobuf_1.proto3; static typeName = "connectrpc.eliza.v1.Nothing"; static fields = protobuf_1.proto3.util.newFieldList(() => []); static fromBinary(bytes, options) { return new Nothing().fromBinary(bytes, options); } static fromJson(jsonValue, options) { return new Nothing().fromJson(jsonValue, options); } static fromJsonString(jsonString, options) { return new Nothing().fromJsonString(jsonString, options); } static equals(a, b) { return protobuf_1.proto3.util.equals(Nothing, a, b); } } exports.Nothing = Nothing; /** * @generated from message connectrpc.eliza.v1.CountRequest */ class CountRequest extends protobuf_1.Message { /** * @generated from field: int64 add = 1; */ add = protobuf_1.protoInt64.zero; constructor(data) { super(); protobuf_1.proto3.util.initPartial(data, this); } static runtime = protobuf_1.proto3; static typeName = "connectrpc.eliza.v1.CountRequest"; static fields = protobuf_1.proto3.util.newFieldList(() => [ { no: 1, name: "add", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, ]); static fromBinary(bytes, options) { return new CountRequest().fromBinary(bytes, options); } static fromJson(jsonValue, options) { return new CountRequest().fromJson(jsonValue, options); } static fromJsonString(jsonString, options) { return new CountRequest().fromJsonString(jsonString, options); } static equals(a, b) { return protobuf_1.proto3.util.equals(CountRequest, a, b); } } exports.CountRequest = CountRequest; /** * @generated from message connectrpc.eliza.v1.CountResponse */ class CountResponse extends protobuf_1.Message { /** * @generated from field: int64 count = 1; */ count = protobuf_1.protoInt64.zero; constructor(data) { super(); protobuf_1.proto3.util.initPartial(data, this); } static runtime = protobuf_1.proto3; static typeName = "connectrpc.eliza.v1.CountResponse"; static fields = protobuf_1.proto3.util.newFieldList(() => [ { no: 1, name: "count", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, ]); static fromBinary(bytes, options) { return new CountResponse().fromBinary(bytes, options); } static fromJson(jsonValue, options) { return new CountResponse().fromJson(jsonValue, options); } static fromJsonString(jsonString, options) { return new CountResponse().fromJsonString(jsonString, options); } static equals(a, b) { return protobuf_1.proto3.util.equals(CountResponse, a, b); } } exports.CountResponse = CountResponse; /** * @generated from message connectrpc.eliza.v1.ListRequest */ class ListRequest extends protobuf_1.Message { /** * @generated from field: int64 page = 1; */ page = protobuf_1.protoInt64.zero; constructor(data) { super(); protobuf_1.proto3.util.initPartial(data, this); } static runtime = protobuf_1.proto3; static typeName = "connectrpc.eliza.v1.ListRequest"; static fields = protobuf_1.proto3.util.newFieldList(() => [ { no: 1, name: "page", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, ]); static fromBinary(bytes, options) { return new ListRequest().fromBinary(bytes, options); } static fromJson(jsonValue, options) { return new ListRequest().fromJson(jsonValue, options); } static fromJsonString(jsonString, options) { return new ListRequest().fromJsonString(jsonString, options); } static equals(a, b) { return protobuf_1.proto3.util.equals(ListRequest, a, b); } } exports.ListRequest = ListRequest; /** * @generated from message connectrpc.eliza.v1.ListResponse */ class ListResponse extends protobuf_1.Message { /** * @generated from field: int64 page = 1; */ page = protobuf_1.protoInt64.zero; /** * @generated from field: repeated string items = 2; */ items = []; constructor(data) { super(); protobuf_1.proto3.util.initPartial(data, this); } static runtime = protobuf_1.proto3; static typeName = "connectrpc.eliza.v1.ListResponse"; static fields = protobuf_1.proto3.util.newFieldList(() => [ { no: 1, name: "page", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, { no: 2, name: "items", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, ]); static fromBinary(bytes, options) { return new ListResponse().fromBinary(bytes, options); } static fromJson(jsonValue, options) { return new ListResponse().fromJson(jsonValue, options); } static fromJsonString(jsonString, options) { return new ListResponse().fromJsonString(jsonString, options); } static equals(a, b) { return protobuf_1.proto3.util.equals(ListResponse, a, b); } } exports.ListResponse = ListResponse; /** * @generated from message connectrpc.eliza.v1.OperationRequest */ class OperationRequest extends protobuf_1.Message { /** * @generated from field: google.protobuf.Timestamp timestamp = 1; */ timestamp; constructor(data) { super(); protobuf_1.proto3.util.initPartial(data, this); } static runtime = protobuf_1.proto3; static typeName = "connectrpc.eliza.v1.OperationRequest"; static fields = protobuf_1.proto3.util.newFieldList(() => [ { no: 1, name: "timestamp", kind: "message", T: protobuf_1.Timestamp }, ]); static fromBinary(bytes, options) { return new OperationRequest().fromBinary(bytes, options); } static fromJson(jsonValue, options) { return new OperationRequest().fromJson(jsonValue, options); } static fromJsonString(jsonString, options) { return new OperationRequest().fromJsonString(jsonString, options); } static equals(a, b) { return protobuf_1.proto3.util.equals(OperationRequest, a, b); } } exports.OperationRequest = OperationRequest; /** * @generated from message connectrpc.eliza.v1.OperationResponse */ class OperationResponse extends protobuf_1.Message { /** * @generated from field: google.protobuf.Timestamp timestamp = 1; */ timestamp; constructor(data) { super(); protobuf_1.proto3.util.initPartial(data, this); } static runtime = protobuf_1.proto3; static typeName = "connectrpc.eliza.v1.OperationResponse"; static fields = protobuf_1.proto3.util.newFieldList(() => [ { no: 1, name: "timestamp", kind: "message", T: protobuf_1.Timestamp }, ]); static fromBinary(bytes, options) { return new OperationResponse().fromBinary(bytes, options); } static fromJson(jsonValue, options) { return new OperationResponse().fromJson(jsonValue, options); } static fromJsonString(jsonString, options) { return new OperationResponse().fromJsonString(jsonString, options); } static equals(a, b) { return protobuf_1.proto3.util.equals(OperationResponse, a, b); } } exports.OperationResponse = OperationResponse; //# sourceMappingURL=eliza_pb.js.map