@okutrade/account-api
Version:
TypeScript client for OKU Account API using Connect-ES
181 lines (180 loc) • 5 kB
TypeScript
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import type { Timestamp } from "@bufbuild/protobuf/wkt";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file gfxcafe/oku/account/v1/common.proto.
*/
export declare const file_gfxcafe_oku_account_v1_common: GenFile;
/**
* Common error details
*
* @generated from message gfxcafe.oku.account.v1.ErrorDetail
*/
export type ErrorDetail = Message<"gfxcafe.oku.account.v1.ErrorDetail"> & {
/**
* @generated from field: string code = 1;
*/
code: string;
/**
* @generated from field: string message = 2;
*/
message: string;
/**
* @generated from field: map<string, string> metadata = 3;
*/
metadata: {
[key: string]: string;
};
};
/**
* Describes the message gfxcafe.oku.account.v1.ErrorDetail.
* Use `create(ErrorDetailSchema)` to create a new message.
*/
export declare const ErrorDetailSchema: GenMessage<ErrorDetail>;
/**
* Pagination request
*
* @generated from message gfxcafe.oku.account.v1.PaginationRequest
*/
export type PaginationRequest = Message<"gfxcafe.oku.account.v1.PaginationRequest"> & {
/**
* @generated from field: int32 limit = 1;
*/
limit: number;
/**
* @generated from field: string cursor = 2;
*/
cursor: string;
};
/**
* Describes the message gfxcafe.oku.account.v1.PaginationRequest.
* Use `create(PaginationRequestSchema)` to create a new message.
*/
export declare const PaginationRequestSchema: GenMessage<PaginationRequest>;
/**
* Pagination response
*
* @generated from message gfxcafe.oku.account.v1.PaginationResponse
*/
export type PaginationResponse = Message<"gfxcafe.oku.account.v1.PaginationResponse"> & {
/**
* @generated from field: string next_cursor = 1;
*/
nextCursor: string;
/**
* @generated from field: bool has_more = 2;
*/
hasMore: boolean;
};
/**
* Describes the message gfxcafe.oku.account.v1.PaginationResponse.
* Use `create(PaginationResponseSchema)` to create a new message.
*/
export declare const PaginationResponseSchema: GenMessage<PaginationResponse>;
/**
* Ethereum address as hex string with 0x prefix
* Example: "0x742d35Cc6634C0532925a3b844Bc9e7595f2BD89"
*
* @generated from message gfxcafe.oku.account.v1.Address
*/
export type Address = Message<"gfxcafe.oku.account.v1.Address"> & {
/**
* @generated from field: string address = 1;
*/
address: string;
};
/**
* Describes the message gfxcafe.oku.account.v1.Address.
* Use `create(AddressSchema)` to create a new message.
*/
export declare const AddressSchema: GenMessage<Address>;
/**
* Common amount with token
*
* @generated from message gfxcafe.oku.account.v1.TokenAmount
*/
export type TokenAmount = Message<"gfxcafe.oku.account.v1.TokenAmount"> & {
/**
* @generated from field: string token_address = 1;
*/
tokenAddress: string;
/**
* Using string for big numbers
*
* @generated from field: string amount = 2;
*/
amount: string;
/**
* @generated from field: int32 decimals = 3;
*/
decimals: number;
};
/**
* Describes the message gfxcafe.oku.account.v1.TokenAmount.
* Use `create(TokenAmountSchema)` to create a new message.
*/
export declare const TokenAmountSchema: GenMessage<TokenAmount>;
/**
* Session information
*
* @generated from message gfxcafe.oku.account.v1.Session
*/
export type Session = Message<"gfxcafe.oku.account.v1.Session"> & {
/**
* @generated from field: string session_id = 1;
*/
sessionId: string;
/**
* @generated from field: string user_id = 2;
*/
userId: string;
/**
* @generated from field: string token = 3;
*/
token: string;
/**
* @generated from field: google.protobuf.Timestamp expires_at = 4;
*/
expiresAt?: Timestamp;
/**
* @generated from field: google.protobuf.Timestamp created_at = 5;
*/
createdAt?: Timestamp;
};
/**
* Describes the message gfxcafe.oku.account.v1.Session.
* Use `create(SessionSchema)` to create a new message.
*/
export declare const SessionSchema: GenMessage<Session>;
/**
* User information
*
* @generated from message gfxcafe.oku.account.v1.User
*/
export type User = Message<"gfxcafe.oku.account.v1.User"> & {
/**
* @generated from field: string user_id = 1;
*/
userId: string;
/**
* @generated from field: string address = 2;
*/
address: string;
/**
* @generated from field: string email = 3;
*/
email: string;
/**
* @generated from field: google.protobuf.Timestamp created_at = 4;
*/
createdAt?: Timestamp;
/**
* @generated from field: google.protobuf.Timestamp updated_at = 5;
*/
updatedAt?: Timestamp;
};
/**
* Describes the message gfxcafe.oku.account.v1.User.
* Use `create(UserSchema)` to create a new message.
*/
export declare const UserSchema: GenMessage<User>;