@mapeo/schema
Version:
JSON schema and flow types for Mapeo
107 lines (106 loc) • 3.62 kB
TypeScript
/// <reference types="node" />
import _m0 from "protobufjs/minimal.js";
import { Common_1 } from "../common/v1.js";
export declare const protobufPackage = "mapeo";
export interface Device_1 {
common?: Common_1;
action: string;
authorId: string;
projectId: string;
signature: string;
authorIndex: number;
deviceIndex: number;
}
export declare const Device_1: {
encode(message: Device_1, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): Device_1;
fromJSON(object: any): Device_1;
toJSON(message: Device_1): unknown;
create<I extends {
common?: {
created_at?: Date;
deviceId?: string;
id?: Buffer;
links?: string[];
timestamp?: Date;
userId?: string;
};
action?: string;
authorId?: string;
projectId?: string;
signature?: string;
authorIndex?: number;
deviceIndex?: number;
} & {
common?: {
created_at?: Date;
deviceId?: string;
id?: Buffer;
links?: string[];
timestamp?: Date;
userId?: string;
} & {
created_at?: Date;
deviceId?: string;
id?: Buffer;
links?: string[] & string[] & { [K in Exclude<keyof I["common"]["links"], keyof string[]>]: never; };
timestamp?: Date;
userId?: string;
} & { [K_1 in Exclude<keyof I["common"], keyof Common_1>]: never; };
action?: string;
authorId?: string;
projectId?: string;
signature?: string;
authorIndex?: number;
deviceIndex?: number;
} & { [K_2 in Exclude<keyof I, keyof Device_1>]: never; }>(base?: I): Device_1;
fromPartial<I_1 extends {
common?: {
created_at?: Date;
deviceId?: string;
id?: Buffer;
links?: string[];
timestamp?: Date;
userId?: string;
};
action?: string;
authorId?: string;
projectId?: string;
signature?: string;
authorIndex?: number;
deviceIndex?: number;
} & {
common?: {
created_at?: Date;
deviceId?: string;
id?: Buffer;
links?: string[];
timestamp?: Date;
userId?: string;
} & {
created_at?: Date;
deviceId?: string;
id?: Buffer;
links?: string[] & string[] & { [K_3 in Exclude<keyof I_1["common"]["links"], keyof string[]>]: never; };
timestamp?: Date;
userId?: string;
} & { [K_4 in Exclude<keyof I_1["common"], keyof Common_1>]: never; };
action?: string;
authorId?: string;
projectId?: string;
signature?: string;
authorIndex?: number;
deviceIndex?: number;
} & { [K_5 in Exclude<keyof I_1, keyof Device_1>]: never; }>(object: I_1): Device_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 {};