Init
Build and Push Telemt Panel Docker Image / build-and-push (push) Failing after 38s
Build and Push Telemt Panel Docker Image / create-release (push) Skipped

This commit is contained in:
Denozordec
2026-08-04 18:33:48 +07:00
commit b5f31c1083
227 changed files with 31375 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
{
"name": "@telemt/shared",
"version": "0.0.0",
"private": true,
"type": "module",
"files": ["dist", "package.json"],
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup src/index.ts --format esm --dts",
"dev": "tsup src/index.ts --format esm --dts --watch"
},
"dependencies": {
"zod": "^3.25.0"
},
"devDependencies": {
"tsup": "^8.5.0",
"typescript": "^5.9.2"
}
}
+31
View File
@@ -0,0 +1,31 @@
import { z } from 'zod'
export const PANEL_MODES = ['standalone', 'fleet'] as const
export type PanelMode = (typeof PANEL_MODES)[number]
export const loginRequestSchema = z.object({
username: z.string().min(1),
password: z.string().min(1),
})
export const loginResponseSchema = z.object({
accessToken: z.string(),
operator: z.object({
id: z.string(),
username: z.string(),
role: z.string(),
}),
panelMode: z.enum(PANEL_MODES),
})
export type LoginRequest = z.infer<typeof loginRequestSchema>
export type LoginResponse = z.infer<typeof loginResponseSchema>
export const telemtProxyRequestSchema = z.object({
method: z.enum(['GET', 'POST', 'PATCH', 'DELETE']).default('GET'),
path: z.string().min(1),
body: z.unknown().optional(),
ifMatch: z.string().optional(),
})
export type TelemtProxyRequest = z.infer<typeof telemtProxyRequestSchema>
+13
View File
@@ -0,0 +1,13 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"noEmit": false,
"declaration": true,
"emitDeclarationOnly": false,
"module": "ESNext",
"moduleResolution": "bundler"
},
"include": ["src"]
}