mirror of
https://github.com/foomo/gotsrpc.git
synced 2026-08-13 05:10:23 +00:00
35 lines
3.4 KiB
TypeScript
35 lines
3.4 KiB
TypeScript
/* eslint:disable */
|
|
// Code generated by gotsrpc https://github.com/foomo/gotsrpc/v2 - DO NOT EDIT.
|
|
import * as github_com_foomo_gotsrpc_v2_tests_nullable_server from './vo'; // ./client/client.ts to ./client/vo.ts
|
|
|
|
export class ServiceClient {
|
|
public static defaultEndpoint = "/service";
|
|
constructor(
|
|
public transport:<T>(method: string, data?: any[]) => Promise<T>
|
|
) {}
|
|
async variantA(i1:github_com_foomo_gotsrpc_v2_tests_nullable_server.Base):Promise<github_com_foomo_gotsrpc_v2_tests_nullable_server.Base> {
|
|
return (await this.transport<{0:github_com_foomo_gotsrpc_v2_tests_nullable_server.Base}>("VariantA", [i1]))[0]
|
|
}
|
|
async variantB(i1:github_com_foomo_gotsrpc_v2_tests_nullable_server.BCustomType):Promise<github_com_foomo_gotsrpc_v2_tests_nullable_server.BCustomType> {
|
|
return (await this.transport<{0:github_com_foomo_gotsrpc_v2_tests_nullable_server.BCustomType}>("VariantB", [i1]))[0]
|
|
}
|
|
async variantC(i1:github_com_foomo_gotsrpc_v2_tests_nullable_server.BCustomTypes|null):Promise<github_com_foomo_gotsrpc_v2_tests_nullable_server.BCustomTypes|null> {
|
|
return (await this.transport<{0:github_com_foomo_gotsrpc_v2_tests_nullable_server.BCustomTypes|null}>("VariantC", [i1]))[0]
|
|
}
|
|
async variantD(i1:github_com_foomo_gotsrpc_v2_tests_nullable_server.BCustomTypesMap|null):Promise<github_com_foomo_gotsrpc_v2_tests_nullable_server.BCustomTypesMap|null> {
|
|
return (await this.transport<{0:github_com_foomo_gotsrpc_v2_tests_nullable_server.BCustomTypesMap|null}>("VariantD", [i1]))[0]
|
|
}
|
|
async variantE(i1:github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null):Promise<github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null> {
|
|
return (await this.transport<{0:github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null}>("VariantE", [i1]))[0]
|
|
}
|
|
async variantF(i1:Array<github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null>|null):Promise<Array<github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null>|null> {
|
|
return (await this.transport<{0:Array<github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null>|null}>("VariantF", [i1]))[0]
|
|
}
|
|
async variantG(i1:Record<string,github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null>|null):Promise<Record<string,github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null>|null> {
|
|
return (await this.transport<{0:Record<string,github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null>|null}>("VariantG", [i1]))[0]
|
|
}
|
|
async variantH(i1:github_com_foomo_gotsrpc_v2_tests_nullable_server.Base, i2:github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null, i3:Array<github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null>|null, i4:Record<string,github_com_foomo_gotsrpc_v2_tests_nullable_server.Base>|null):Promise<{r1:github_com_foomo_gotsrpc_v2_tests_nullable_server.Base; r2:github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null; r3:Array<github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null>|null; r4:Record<string,github_com_foomo_gotsrpc_v2_tests_nullable_server.Base>|null}> {
|
|
const response = await this.transport<{0:github_com_foomo_gotsrpc_v2_tests_nullable_server.Base; 1:github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null; 2:Array<github_com_foomo_gotsrpc_v2_tests_nullable_server.Base|null>|null; 3:Record<string,github_com_foomo_gotsrpc_v2_tests_nullable_server.Base>|null}>("VariantH", [i1, i2, i3, i4])
|
|
return {r1 : response[0], r2 : response[1], r3 : response[2], r4 : response[3]};
|
|
}
|
|
} |