LilyServiceClientPb.ts 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. /**
  2. * @fileoverview gRPC-Web generated client stub for palm.lily.v1
  3. * @enhanceable
  4. * @public
  5. */
  6. // Code generated by protoc-gen-grpc-web. DO NOT EDIT.
  7. // versions:
  8. // protoc-gen-grpc-web v1.4.2
  9. // protoc v4.24.3
  10. // source: lily.proto
  11. /* eslint-disable */
  12. // @ts-nocheck
  13. import * as grpcWeb from 'grpc-web';
  14. import * as lily_pb from './lily_pb';
  15. export class ExcelClient {
  16. client_: grpcWeb.AbstractClientBase;
  17. hostname_: string;
  18. credentials_: null | { [index: string]: string; };
  19. options_: null | { [index: string]: any; };
  20. constructor (hostname: string,
  21. credentials?: null | { [index: string]: string; },
  22. options?: null | { [index: string]: any; }) {
  23. if (!options) options = {};
  24. if (!credentials) credentials = {};
  25. options['format'] = 'binary';
  26. this.client_ = new grpcWeb.GrpcWebClientBase(options);
  27. this.hostname_ = hostname.replace(/\/+$/, '');
  28. this.credentials_ = credentials;
  29. this.options_ = options;
  30. }
  31. methodDescriptorParse = new grpcWeb.MethodDescriptor(
  32. '/palm.lily.v1.Excel/Parse',
  33. grpcWeb.MethodType.UNARY,
  34. lily_pb.S3File,
  35. lily_pb.ExcelModel,
  36. (request: lily_pb.S3File) => {
  37. return request.serializeBinary();
  38. },
  39. lily_pb.ExcelModel.deserializeBinary
  40. );
  41. parse(
  42. request: lily_pb.S3File,
  43. metadata: grpcWeb.Metadata | null): Promise<lily_pb.ExcelModel>;
  44. parse(
  45. request: lily_pb.S3File,
  46. metadata: grpcWeb.Metadata | null,
  47. callback: (err: grpcWeb.RpcError,
  48. response: lily_pb.ExcelModel) => void): grpcWeb.ClientReadableStream<lily_pb.ExcelModel>;
  49. parse(
  50. request: lily_pb.S3File,
  51. metadata: grpcWeb.Metadata | null,
  52. callback?: (err: grpcWeb.RpcError,
  53. response: lily_pb.ExcelModel) => void) {
  54. if (callback !== undefined) {
  55. return this.client_.rpcCall(
  56. this.hostname_ +
  57. '/palm.lily.v1.Excel/Parse',
  58. request,
  59. metadata || {},
  60. this.methodDescriptorParse,
  61. callback);
  62. }
  63. return this.client_.unaryCall(
  64. this.hostname_ +
  65. '/palm.lily.v1.Excel/Parse',
  66. request,
  67. metadata || {},
  68. this.methodDescriptorParse);
  69. }
  70. methodDescriptorGenerate = new grpcWeb.MethodDescriptor(
  71. '/palm.lily.v1.Excel/Generate',
  72. grpcWeb.MethodType.UNARY,
  73. lily_pb.ExcelModel,
  74. lily_pb.S3File,
  75. (request: lily_pb.ExcelModel) => {
  76. return request.serializeBinary();
  77. },
  78. lily_pb.S3File.deserializeBinary
  79. );
  80. generate(
  81. request: lily_pb.ExcelModel,
  82. metadata: grpcWeb.Metadata | null): Promise<lily_pb.S3File>;
  83. generate(
  84. request: lily_pb.ExcelModel,
  85. metadata: grpcWeb.Metadata | null,
  86. callback: (err: grpcWeb.RpcError,
  87. response: lily_pb.S3File) => void): grpcWeb.ClientReadableStream<lily_pb.S3File>;
  88. generate(
  89. request: lily_pb.ExcelModel,
  90. metadata: grpcWeb.Metadata | null,
  91. callback?: (err: grpcWeb.RpcError,
  92. response: lily_pb.S3File) => void) {
  93. if (callback !== undefined) {
  94. return this.client_.rpcCall(
  95. this.hostname_ +
  96. '/palm.lily.v1.Excel/Generate',
  97. request,
  98. metadata || {},
  99. this.methodDescriptorGenerate,
  100. callback);
  101. }
  102. return this.client_.unaryCall(
  103. this.hostname_ +
  104. '/palm.lily.v1.Excel/Generate',
  105. request,
  106. metadata || {},
  107. this.methodDescriptorGenerate);
  108. }
  109. }
  110. export class S3Client {
  111. client_: grpcWeb.AbstractClientBase;
  112. hostname_: string;
  113. credentials_: null | { [index: string]: string; };
  114. options_: null | { [index: string]: any; };
  115. constructor (hostname: string,
  116. credentials?: null | { [index: string]: string; },
  117. options?: null | { [index: string]: any; }) {
  118. if (!options) options = {};
  119. if (!credentials) credentials = {};
  120. options['format'] = 'binary';
  121. this.client_ = new grpcWeb.GrpcWebClientBase(options);
  122. this.hostname_ = hostname.replace(/\/+$/, '');
  123. this.credentials_ = credentials;
  124. this.options_ = options;
  125. }
  126. methodDescriptorGetFile = new grpcWeb.MethodDescriptor(
  127. '/palm.lily.v1.S3/GetFile',
  128. grpcWeb.MethodType.UNARY,
  129. lily_pb.S3GetFileRequest,
  130. lily_pb.S3GetFileResponse,
  131. (request: lily_pb.S3GetFileRequest) => {
  132. return request.serializeBinary();
  133. },
  134. lily_pb.S3GetFileResponse.deserializeBinary
  135. );
  136. getFile(
  137. request: lily_pb.S3GetFileRequest,
  138. metadata: grpcWeb.Metadata | null): Promise<lily_pb.S3GetFileResponse>;
  139. getFile(
  140. request: lily_pb.S3GetFileRequest,
  141. metadata: grpcWeb.Metadata | null,
  142. callback: (err: grpcWeb.RpcError,
  143. response: lily_pb.S3GetFileResponse) => void): grpcWeb.ClientReadableStream<lily_pb.S3GetFileResponse>;
  144. getFile(
  145. request: lily_pb.S3GetFileRequest,
  146. metadata: grpcWeb.Metadata | null,
  147. callback?: (err: grpcWeb.RpcError,
  148. response: lily_pb.S3GetFileResponse) => void) {
  149. if (callback !== undefined) {
  150. return this.client_.rpcCall(
  151. this.hostname_ +
  152. '/palm.lily.v1.S3/GetFile',
  153. request,
  154. metadata || {},
  155. this.methodDescriptorGetFile,
  156. callback);
  157. }
  158. return this.client_.unaryCall(
  159. this.hostname_ +
  160. '/palm.lily.v1.S3/GetFile',
  161. request,
  162. metadata || {},
  163. this.methodDescriptorGetFile);
  164. }
  165. }
  166. export class TexClient {
  167. client_: grpcWeb.AbstractClientBase;
  168. hostname_: string;
  169. credentials_: null | { [index: string]: string; };
  170. options_: null | { [index: string]: any; };
  171. constructor (hostname: string,
  172. credentials?: null | { [index: string]: string; },
  173. options?: null | { [index: string]: any; }) {
  174. if (!options) options = {};
  175. if (!credentials) credentials = {};
  176. options['format'] = 'binary';
  177. this.client_ = new grpcWeb.GrpcWebClientBase(options);
  178. this.hostname_ = hostname.replace(/\/+$/, '');
  179. this.credentials_ = credentials;
  180. this.options_ = options;
  181. }
  182. methodDescriptorToPdf = new grpcWeb.MethodDescriptor(
  183. '/palm.lily.v1.Tex/ToPdf',
  184. grpcWeb.MethodType.UNARY,
  185. lily_pb.TexToRequest,
  186. lily_pb.S3File,
  187. (request: lily_pb.TexToRequest) => {
  188. return request.serializeBinary();
  189. },
  190. lily_pb.S3File.deserializeBinary
  191. );
  192. toPdf(
  193. request: lily_pb.TexToRequest,
  194. metadata: grpcWeb.Metadata | null): Promise<lily_pb.S3File>;
  195. toPdf(
  196. request: lily_pb.TexToRequest,
  197. metadata: grpcWeb.Metadata | null,
  198. callback: (err: grpcWeb.RpcError,
  199. response: lily_pb.S3File) => void): grpcWeb.ClientReadableStream<lily_pb.S3File>;
  200. toPdf(
  201. request: lily_pb.TexToRequest,
  202. metadata: grpcWeb.Metadata | null,
  203. callback?: (err: grpcWeb.RpcError,
  204. response: lily_pb.S3File) => void) {
  205. if (callback !== undefined) {
  206. return this.client_.rpcCall(
  207. this.hostname_ +
  208. '/palm.lily.v1.Tex/ToPdf',
  209. request,
  210. metadata || {},
  211. this.methodDescriptorToPdf,
  212. callback);
  213. }
  214. return this.client_.unaryCall(
  215. this.hostname_ +
  216. '/palm.lily.v1.Tex/ToPdf',
  217. request,
  218. metadata || {},
  219. this.methodDescriptorToPdf);
  220. }
  221. methodDescriptorToWord = new grpcWeb.MethodDescriptor(
  222. '/palm.lily.v1.Tex/ToWord',
  223. grpcWeb.MethodType.UNARY,
  224. lily_pb.TexToRequest,
  225. lily_pb.S3File,
  226. (request: lily_pb.TexToRequest) => {
  227. return request.serializeBinary();
  228. },
  229. lily_pb.S3File.deserializeBinary
  230. );
  231. toWord(
  232. request: lily_pb.TexToRequest,
  233. metadata: grpcWeb.Metadata | null): Promise<lily_pb.S3File>;
  234. toWord(
  235. request: lily_pb.TexToRequest,
  236. metadata: grpcWeb.Metadata | null,
  237. callback: (err: grpcWeb.RpcError,
  238. response: lily_pb.S3File) => void): grpcWeb.ClientReadableStream<lily_pb.S3File>;
  239. toWord(
  240. request: lily_pb.TexToRequest,
  241. metadata: grpcWeb.Metadata | null,
  242. callback?: (err: grpcWeb.RpcError,
  243. response: lily_pb.S3File) => void) {
  244. if (callback !== undefined) {
  245. return this.client_.rpcCall(
  246. this.hostname_ +
  247. '/palm.lily.v1.Tex/ToWord',
  248. request,
  249. metadata || {},
  250. this.methodDescriptorToWord,
  251. callback);
  252. }
  253. return this.client_.unaryCall(
  254. this.hostname_ +
  255. '/palm.lily.v1.Tex/ToWord',
  256. request,
  257. metadata || {},
  258. this.methodDescriptorToWord);
  259. }
  260. }
  261. export class EpubClient {
  262. client_: grpcWeb.AbstractClientBase;
  263. hostname_: string;
  264. credentials_: null | { [index: string]: string; };
  265. options_: null | { [index: string]: any; };
  266. constructor (hostname: string,
  267. credentials?: null | { [index: string]: string; },
  268. options?: null | { [index: string]: any; }) {
  269. if (!options) options = {};
  270. if (!credentials) credentials = {};
  271. options['format'] = 'binary';
  272. this.client_ = new grpcWeb.GrpcWebClientBase(options);
  273. this.hostname_ = hostname.replace(/\/+$/, '');
  274. this.credentials_ = credentials;
  275. this.options_ = options;
  276. }
  277. methodDescriptorBuild = new grpcWeb.MethodDescriptor(
  278. '/palm.lily.v1.Epub/Build',
  279. grpcWeb.MethodType.UNARY,
  280. lily_pb.EpubBuildRequest,
  281. lily_pb.S3File,
  282. (request: lily_pb.EpubBuildRequest) => {
  283. return request.serializeBinary();
  284. },
  285. lily_pb.S3File.deserializeBinary
  286. );
  287. build(
  288. request: lily_pb.EpubBuildRequest,
  289. metadata: grpcWeb.Metadata | null): Promise<lily_pb.S3File>;
  290. build(
  291. request: lily_pb.EpubBuildRequest,
  292. metadata: grpcWeb.Metadata | null,
  293. callback: (err: grpcWeb.RpcError,
  294. response: lily_pb.S3File) => void): grpcWeb.ClientReadableStream<lily_pb.S3File>;
  295. build(
  296. request: lily_pb.EpubBuildRequest,
  297. metadata: grpcWeb.Metadata | null,
  298. callback?: (err: grpcWeb.RpcError,
  299. response: lily_pb.S3File) => void) {
  300. if (callback !== undefined) {
  301. return this.client_.rpcCall(
  302. this.hostname_ +
  303. '/palm.lily.v1.Epub/Build',
  304. request,
  305. metadata || {},
  306. this.methodDescriptorBuild,
  307. callback);
  308. }
  309. return this.client_.unaryCall(
  310. this.hostname_ +
  311. '/palm.lily.v1.Epub/Build',
  312. request,
  313. metadata || {},
  314. this.methodDescriptorBuild);
  315. }
  316. }