@mapeo/schema
Version:
JSON schema and flow types for Mapeo
60 lines (59 loc) • 2.34 kB
TypeScript
/// <reference types="node" />
import _m0 from "protobufjs/minimal.js";
export declare const protobufPackage = "mapeo";
export interface Common_1 {
created_at?: Date;
deviceId?: string | undefined;
/** 32-byte random generated number */
id: Buffer;
links: string[];
timestamp?: Date | undefined;
userId?: string | undefined;
}
export declare const Common_1: {
encode(message: Common_1, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): Common_1;
fromJSON(object: any): Common_1;
toJSON(message: Common_1): unknown;
create<I extends {
created_at?: Date;
deviceId?: string | undefined;
id?: Buffer;
links?: string[];
timestamp?: Date | undefined;
userId?: string | undefined;
} & {
created_at?: Date;
deviceId?: string | undefined;
id?: Buffer;
links?: string[] & string[] & { [K in Exclude<keyof I["links"], keyof string[]>]: never; };
timestamp?: Date | undefined;
userId?: string | undefined;
} & { [K_1 in Exclude<keyof I, keyof Common_1>]: never; }>(base?: I): Common_1;
fromPartial<I_1 extends {
created_at?: Date;
deviceId?: string | undefined;
id?: Buffer;
links?: string[];
timestamp?: Date | undefined;
userId?: string | undefined;
} & {
created_at?: Date;
deviceId?: string | undefined;
id?: Buffer;
links?: string[] & string[] & { [K_2 in Exclude<keyof I_1["links"], keyof string[]>]: never; };
timestamp?: Date | undefined;
userId?: string | undefined;
} & { [K_3 in Exclude<keyof I_1, keyof Common_1>]: never; }>(object: I_1): Common_1;
};
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
[K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
declare type KeysOfUnion<T> = T extends T ? keyof T : never;
export declare type Exact<P, I extends P> = P extends Builtin ? P : P & {
[K in keyof P]: Exact<P[K], I[K]>;
} & {
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
};
export {};