Skip to content

Commit

Permalink
[2.0.1] Generate Protobuf Language Bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 24, 2024
1 parent a1f8fe5 commit 69c80dc
Show file tree
Hide file tree
Showing 271 changed files with 32,576 additions and 13,893 deletions.
9 changes: 9 additions & 0 deletions javascript/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
# gRPC Protobufs

[![NPM Version](https://img.shields.io/npm/v/%40pretendonetwork%2Fgrpc)](https://www.npmjs.com/package/@pretendonetwork/grpc)

gRPC protobuf definitions for Pretendo micro-services

## Structure

Each folder contains the protobuf definitions for the _server_ intended on receiving the requests. Meaning, for example, `account` contains protobuf files intended for requests to the account server

## Install Language Bindings

To install

- Go: `github.com/PretendoNetwork/grpc/go` - `go get github.com/PretendoNetwork/grpc/go`
- JavaScript: [`@pretendnetwork/grpc`](https://www.npmjs.com/package/@pretendonetwork/grpc) - `npm i @pretendonetwork/grpc`

## Build

- Install the protobuf compiler (protoc) from [here](https://grpc.io/docs/protoc-installation/#install-pre-compiled-binaries-any-os) (Use the pre-compiled binaries, the `protoc` package in the package manager is outdated)
Expand Down
73 changes: 0 additions & 73 deletions javascript/account/account_service.client.d.ts

This file was deleted.

57 changes: 0 additions & 57 deletions javascript/account/account_service.client.js

This file was deleted.

83 changes: 74 additions & 9 deletions javascript/account/account_service.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,74 @@
/* eslint-disable */
// @generated by protobuf-ts 2.9.4 with parameter eslint_disable,output_javascript,output_legacy_commonjs,ts_nocheck
// @generated from protobuf file "account/account_service.proto" (package "account", syntax proto3)
// tslint:disable
// @ts-nocheck
/**
* @generated ServiceType for protobuf service account.Account
*/
export declare const Account: any;
import { type CallContext, type CallOptions } from "nice-grpc-common";
import { Empty } from "../google/protobuf/empty";
import { ExchangeTokenForUserDataRequest } from "./exchange_token_for_user_data";
import { GetNEXDataRequest, GetNEXDataResponse } from "./get_nex_data_rpc";
import { GetNEXPasswordRequest, GetNEXPasswordResponse } from "./get_nex_password_rpc";
import { GetUserDataRequest, GetUserDataResponse } from "./get_user_data_rpc";
import { UpdatePNIDPermissionsRequest } from "./update_pnid_permissions";
export declare const protobufPackage = "account";
export type AccountDefinition = typeof AccountDefinition;
export declare const AccountDefinition: {
readonly name: "Account";
readonly fullName: "account.Account";
readonly methods: {
readonly getUserData: {
readonly name: "GetUserData";
readonly requestType: import("./get_user_data_rpc").MessageFns<GetUserDataRequest>;
readonly requestStream: false;
readonly responseType: import("./get_user_data_rpc").MessageFns<GetUserDataResponse>;
readonly responseStream: false;
readonly options: {};
};
readonly getNEXPassword: {
readonly name: "GetNEXPassword";
readonly requestType: import("./get_nex_password_rpc").MessageFns<GetNEXPasswordRequest>;
readonly requestStream: false;
readonly responseType: import("./get_nex_password_rpc").MessageFns<GetNEXPasswordResponse>;
readonly responseStream: false;
readonly options: {};
};
readonly getNEXData: {
readonly name: "GetNEXData";
readonly requestType: import("./get_nex_data_rpc").MessageFns<GetNEXDataRequest>;
readonly requestStream: false;
readonly responseType: import("./get_nex_data_rpc").MessageFns<GetNEXDataResponse>;
readonly responseStream: false;
readonly options: {};
};
readonly updatePNIDPermissions: {
readonly name: "UpdatePNIDPermissions";
readonly requestType: import("./update_pnid_permissions").MessageFns<UpdatePNIDPermissionsRequest>;
readonly requestStream: false;
readonly responseType: import("../google/protobuf/empty").MessageFns<Empty>;
readonly responseStream: false;
readonly options: {};
};
readonly exchangeTokenForUserData: {
readonly name: "ExchangeTokenForUserData";
readonly requestType: import("./exchange_token_for_user_data").MessageFns<ExchangeTokenForUserDataRequest>;
readonly requestStream: false;
readonly responseType: import("./get_user_data_rpc").MessageFns<GetUserDataResponse>;
readonly responseStream: false;
readonly options: {};
};
};
};
export interface AccountServiceImplementation<CallContextExt = {}> {
getUserData(request: GetUserDataRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetUserDataResponse>>;
getNEXPassword(request: GetNEXPasswordRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetNEXPasswordResponse>>;
getNEXData(request: GetNEXDataRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetNEXDataResponse>>;
updatePNIDPermissions(request: UpdatePNIDPermissionsRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Empty>>;
exchangeTokenForUserData(request: ExchangeTokenForUserDataRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetUserDataResponse>>;
}
export interface AccountClient<CallOptionsExt = {}> {
getUserData(request: DeepPartial<GetUserDataRequest>, options?: CallOptions & CallOptionsExt): Promise<GetUserDataResponse>;
getNEXPassword(request: DeepPartial<GetNEXPasswordRequest>, options?: CallOptions & CallOptionsExt): Promise<GetNEXPasswordResponse>;
getNEXData(request: DeepPartial<GetNEXDataRequest>, options?: CallOptions & CallOptionsExt): Promise<GetNEXDataResponse>;
updatePNIDPermissions(request: DeepPartial<UpdatePNIDPermissionsRequest>, options?: CallOptions & CallOptionsExt): Promise<Empty>;
exchangeTokenForUserData(request: DeepPartial<ExchangeTokenForUserDataRequest>, options?: CallOptions & CallOptionsExt): Promise<GetUserDataResponse>;
}
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
[K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
export {};
82 changes: 55 additions & 27 deletions javascript/account/account_service.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,61 @@
/* eslint-disable */
// @generated by protobuf-ts 2.9.4 with parameter eslint_disable,output_javascript,output_legacy_commonjs,ts_nocheck
// @generated from protobuf file "account/account_service.proto" (package "account", syntax proto3)
// tslint:disable
// @ts-nocheck
"use strict";
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.3.0
// protoc unknown
// source: account/account_service.proto
Object.defineProperty(exports, "__esModule", { value: true });
exports.Account = void 0;
/* eslint-disable */
// @generated by protobuf-ts 2.9.4 with parameter eslint_disable,output_javascript,output_legacy_commonjs,ts_nocheck
// @generated from protobuf file "account/account_service.proto" (package "account", syntax proto3)
// tslint:disable
// @ts-nocheck
const exchange_token_for_user_data_1 = require("./exchange_token_for_user_data");
exports.AccountDefinition = exports.protobufPackage = void 0;
const empty_1 = require("../google/protobuf/empty");
const update_pnid_permissions_1 = require("./update_pnid_permissions");
const exchange_token_for_user_data_1 = require("./exchange_token_for_user_data");
const get_nex_data_rpc_1 = require("./get_nex_data_rpc");
const get_nex_data_rpc_2 = require("./get_nex_data_rpc");
const get_nex_password_rpc_1 = require("./get_nex_password_rpc");
const get_nex_password_rpc_2 = require("./get_nex_password_rpc");
const get_user_data_rpc_1 = require("./get_user_data_rpc");
const get_user_data_rpc_2 = require("./get_user_data_rpc");
const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc");
/**
* @generated ServiceType for protobuf service account.Account
*/
exports.Account = new runtime_rpc_1.ServiceType("account.Account", [
{ name: "GetUserData", options: {}, I: get_user_data_rpc_2.GetUserDataRequest, O: get_user_data_rpc_1.GetUserDataResponse },
{ name: "GetNEXPassword", options: {}, I: get_nex_password_rpc_2.GetNEXPasswordRequest, O: get_nex_password_rpc_1.GetNEXPasswordResponse },
{ name: "GetNEXData", options: {}, I: get_nex_data_rpc_2.GetNEXDataRequest, O: get_nex_data_rpc_1.GetNEXDataResponse },
{ name: "UpdatePNIDPermissions", options: {}, I: update_pnid_permissions_1.UpdatePNIDPermissionsRequest, O: empty_1.Empty },
{ name: "ExchangeTokenForUserData", options: {}, I: exchange_token_for_user_data_1.ExchangeTokenForUserDataRequest, O: get_user_data_rpc_1.GetUserDataResponse }
]);
const update_pnid_permissions_1 = require("./update_pnid_permissions");
exports.protobufPackage = "account";
exports.AccountDefinition = {
name: "Account",
fullName: "account.Account",
methods: {
getUserData: {
name: "GetUserData",
requestType: get_user_data_rpc_1.GetUserDataRequest,
requestStream: false,
responseType: get_user_data_rpc_1.GetUserDataResponse,
responseStream: false,
options: {},
},
getNEXPassword: {
name: "GetNEXPassword",
requestType: get_nex_password_rpc_1.GetNEXPasswordRequest,
requestStream: false,
responseType: get_nex_password_rpc_1.GetNEXPasswordResponse,
responseStream: false,
options: {},
},
getNEXData: {
name: "GetNEXData",
requestType: get_nex_data_rpc_1.GetNEXDataRequest,
requestStream: false,
responseType: get_nex_data_rpc_1.GetNEXDataResponse,
responseStream: false,
options: {},
},
updatePNIDPermissions: {
name: "UpdatePNIDPermissions",
requestType: update_pnid_permissions_1.UpdatePNIDPermissionsRequest,
requestStream: false,
responseType: empty_1.Empty,
responseStream: false,
options: {},
},
exchangeTokenForUserData: {
name: "ExchangeTokenForUserData",
requestType: exchange_token_for_user_data_1.ExchangeTokenForUserDataRequest,
requestStream: false,
responseType: get_user_data_rpc_1.GetUserDataResponse,
responseStream: false,
options: {},
},
},
};
Loading

0 comments on commit 69c80dc

Please sign in to comment.