-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
4,954 additions
and
3,016 deletions.
There are no files selected for viewing
196 changes: 196 additions & 0 deletions
196
js/packages/proto/src/generated/quary/service/v1/dashboard.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT. | ||
// versions: | ||
// protoc-gen-ts_proto v1.178.0 | ||
// protoc unknown | ||
// source: quary/service/v1/dashboard.proto | ||
|
||
/* eslint-disable */ | ||
import * as _m0 from "protobufjs/minimal"; | ||
import { DashboardItem } from "./dashboard_file"; | ||
|
||
export const protobufPackage = "quary.service.v1"; | ||
|
||
export interface Dashboard { | ||
name: string; | ||
title?: string | undefined; | ||
description?: | ||
| string | ||
| undefined; | ||
/** | ||
* Tags are used to group different parts of the project together. For example, you could tag all models that are | ||
* related to a specific department with the same tag. | ||
*/ | ||
tags: string[]; | ||
items: DashboardItem[]; | ||
filePath: string; | ||
} | ||
|
||
function createBaseDashboard(): Dashboard { | ||
return { name: "", title: undefined, description: undefined, tags: [], items: [], filePath: "" }; | ||
} | ||
|
||
export const Dashboard = { | ||
encode(message: Dashboard, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.name !== "") { | ||
writer.uint32(10).string(message.name); | ||
} | ||
if (message.title !== undefined) { | ||
writer.uint32(18).string(message.title); | ||
} | ||
if (message.description !== undefined) { | ||
writer.uint32(26).string(message.description); | ||
} | ||
for (const v of message.tags) { | ||
writer.uint32(34).string(v!); | ||
} | ||
for (const v of message.items) { | ||
DashboardItem.encode(v!, writer.uint32(42).fork()).ldelim(); | ||
} | ||
if (message.filePath !== "") { | ||
writer.uint32(50).string(message.filePath); | ||
} | ||
return writer; | ||
}, | ||
|
||
decode(input: _m0.Reader | Uint8Array, length?: number): Dashboard { | ||
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseDashboard(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
if (tag !== 10) { | ||
break; | ||
} | ||
|
||
message.name = reader.string(); | ||
continue; | ||
case 2: | ||
if (tag !== 18) { | ||
break; | ||
} | ||
|
||
message.title = reader.string(); | ||
continue; | ||
case 3: | ||
if (tag !== 26) { | ||
break; | ||
} | ||
|
||
message.description = reader.string(); | ||
continue; | ||
case 4: | ||
if (tag !== 34) { | ||
break; | ||
} | ||
|
||
message.tags.push(reader.string()); | ||
continue; | ||
case 5: | ||
if (tag !== 42) { | ||
break; | ||
} | ||
|
||
message.items.push(DashboardItem.decode(reader, reader.uint32())); | ||
continue; | ||
case 6: | ||
if (tag !== 50) { | ||
break; | ||
} | ||
|
||
message.filePath = reader.string(); | ||
continue; | ||
} | ||
if ((tag & 7) === 4 || tag === 0) { | ||
break; | ||
} | ||
reader.skipType(tag & 7); | ||
} | ||
return message; | ||
}, | ||
|
||
fromJSON(object: any): Dashboard { | ||
return { | ||
name: isSet(object.name) ? gt.String(object.name) : "", | ||
title: isSet(object.title) ? gt.String(object.title) : undefined, | ||
description: isSet(object.description) ? gt.String(object.description) : undefined, | ||
tags: gt.Array.isArray(object?.tags) ? object.tags.map((e: any) => gt.String(e)) : [], | ||
items: gt.Array.isArray(object?.items) ? object.items.map((e: any) => DashboardItem.fromJSON(e)) : [], | ||
filePath: isSet(object.filePath) ? gt.String(object.filePath) : "", | ||
}; | ||
}, | ||
|
||
toJSON(message: Dashboard): unknown { | ||
const obj: any = {}; | ||
if (message.name !== "") { | ||
obj.name = message.name; | ||
} | ||
if (message.title !== undefined) { | ||
obj.title = message.title; | ||
} | ||
if (message.description !== undefined) { | ||
obj.description = message.description; | ||
} | ||
if (message.tags?.length) { | ||
obj.tags = message.tags; | ||
} | ||
if (message.items?.length) { | ||
obj.items = message.items.map((e) => DashboardItem.toJSON(e)); | ||
} | ||
if (message.filePath !== "") { | ||
obj.filePath = message.filePath; | ||
} | ||
return obj; | ||
}, | ||
|
||
create<I extends Exact<DeepPartial<Dashboard>, I>>(base?: I): Dashboard { | ||
return Dashboard.fromPartial(base ?? ({} as any)); | ||
}, | ||
fromPartial<I extends Exact<DeepPartial<Dashboard>, I>>(object: I): Dashboard { | ||
const message = createBaseDashboard(); | ||
message.name = object.name ?? ""; | ||
message.title = object.title ?? undefined; | ||
message.description = object.description ?? undefined; | ||
message.tags = object.tags?.map((e) => e) || []; | ||
message.items = object.items?.map((e) => DashboardItem.fromPartial(e)) || []; | ||
message.filePath = object.filePath ?? ""; | ||
return message; | ||
}, | ||
}; | ||
|
||
declare const self: any | undefined; | ||
declare const window: any | undefined; | ||
declare const global: any | undefined; | ||
const gt: any = (() => { | ||
if (typeof globalThis !== "undefined") { | ||
return globalThis; | ||
} | ||
if (typeof self !== "undefined") { | ||
return self; | ||
} | ||
if (typeof window !== "undefined") { | ||
return window; | ||
} | ||
if (typeof global !== "undefined") { | ||
return global; | ||
} | ||
throw "Unable to locate global object"; | ||
})(); | ||
|
||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
|
||
export type DeepPartial<T> = T extends Builtin ? T | ||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> | ||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> | ||
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] } | ||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> } | ||
: Partial<T>; | ||
|
||
type KeysOfUnion<T> = T extends T ? keyof T : never; | ||
export 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 }; | ||
|
||
function isSet(value: any): boolean { | ||
return value !== null && value !== undefined; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.