@ninedeploy/schemas 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 NineDeploy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/auth.d.ts ADDED
@@ -0,0 +1,153 @@
1
+ import { z } from 'zod';
2
+ export declare const register: z.ZodObject<{
3
+ email: z.ZodEmail;
4
+ password: z.ZodString;
5
+ name: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>;
7
+ export type Register = z.infer<typeof register>;
8
+ /** Initial bootstrap — same shape as register, only works when no users exist. */
9
+ export declare const setup: z.ZodObject<{
10
+ email: z.ZodEmail;
11
+ password: z.ZodString;
12
+ name: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strip>;
14
+ export type Setup = Register;
15
+ export declare const login: z.ZodObject<{
16
+ email: z.ZodEmail;
17
+ password: z.ZodString;
18
+ totpCode: z.ZodOptional<z.ZodString>;
19
+ }, z.core.$strip>;
20
+ export type Login = z.infer<typeof login>;
21
+ /** Verifying a two-factor action (enable / disable companion). */
22
+ export declare const twoFactorCode: z.ZodObject<{
23
+ code: z.ZodString;
24
+ }, z.core.$strip>;
25
+ export type TwoFactorCode = z.infer<typeof twoFactorCode>;
26
+ /** Regenerating the 2FA secret: password required when 2FA is already enabled. */
27
+ export declare const twoFactorSetup: z.ZodObject<{
28
+ password: z.ZodString;
29
+ }, z.core.$strip>;
30
+ export type TwoFactorSetup = z.infer<typeof twoFactorSetup>;
31
+ export declare const twoFactorDisable: z.ZodObject<{
32
+ password: z.ZodString;
33
+ code: z.ZodString;
34
+ }, z.core.$strip>;
35
+ export type TwoFactorDisable = z.infer<typeof twoFactorDisable>;
36
+ /** Self-service password change: requires the current password. */
37
+ export declare const passwordChange: z.ZodObject<{
38
+ currentPassword: z.ZodString;
39
+ newPassword: z.ZodString;
40
+ }, z.core.$strip>;
41
+ export type PasswordChange = z.infer<typeof passwordChange>;
42
+ /** Admin-initiated password reset for another user. */
43
+ /** Admin-created user — same shape as register plus the starting role. */
44
+ export declare const userCreate: z.ZodObject<{
45
+ email: z.ZodEmail;
46
+ password: z.ZodString;
47
+ name: z.ZodOptional<z.ZodString>;
48
+ role: z.ZodDefault<z.ZodEnum<{
49
+ admin: "admin";
50
+ member: "member";
51
+ }>>;
52
+ }, z.core.$strip>;
53
+ export type UserCreate = z.infer<typeof userCreate>;
54
+ export declare const passwordReset: z.ZodObject<{
55
+ newPassword: z.ZodString;
56
+ }, z.core.$strip>;
57
+ export type PasswordReset = z.infer<typeof passwordReset>;
58
+ /** Forgot-password request. Always answers 200 (no user enumeration). */
59
+ export declare const forgotPassword: z.ZodObject<{
60
+ email: z.ZodEmail;
61
+ }, z.core.$strip>;
62
+ export type ForgotPassword = z.infer<typeof forgotPassword>;
63
+ /** Complete a reset with the token from the email / admin-issued link. */
64
+ export declare const passwordResetWithToken: z.ZodObject<{
65
+ token: z.ZodString;
66
+ newPassword: z.ZodString;
67
+ }, z.core.$strip>;
68
+ export type PasswordResetWithToken = z.infer<typeof passwordResetWithToken>;
69
+ /** Tokens issued after a successful login/refresh. */
70
+ export declare const tokenPair: z.ZodObject<{
71
+ accessToken: z.ZodString;
72
+ refreshToken: z.ZodString;
73
+ expiresIn: z.ZodNumber;
74
+ }, z.core.$strip>;
75
+ export type TokenPair = z.infer<typeof tokenPair>;
76
+ export declare const refresh: z.ZodObject<{
77
+ refreshToken: z.ZodString;
78
+ }, z.core.$strip>;
79
+ export type Refresh = z.infer<typeof refresh>;
80
+ /** Public user representation (never includes passwordHash). */
81
+ export declare const publicUser: z.ZodObject<{
82
+ id: z.ZodNumber;
83
+ email: z.ZodEmail;
84
+ name: z.ZodNullable<z.ZodString>;
85
+ role: z.ZodEnum<{
86
+ admin: "admin";
87
+ member: "member";
88
+ }>;
89
+ }, z.core.$strip>;
90
+ export type PublicUser = z.infer<typeof publicUser>;
91
+ export declare const session: z.ZodObject<{
92
+ user: z.ZodObject<{
93
+ id: z.ZodNumber;
94
+ email: z.ZodEmail;
95
+ name: z.ZodNullable<z.ZodString>;
96
+ role: z.ZodEnum<{
97
+ admin: "admin";
98
+ member: "member";
99
+ }>;
100
+ }, z.core.$strip>;
101
+ tokens: z.ZodObject<{
102
+ accessToken: z.ZodString;
103
+ refreshToken: z.ZodString;
104
+ expiresIn: z.ZodNumber;
105
+ }, z.core.$strip>;
106
+ }, z.core.$strip>;
107
+ export type Session = z.infer<typeof session>;
108
+ export declare const createApiToken: z.ZodObject<{
109
+ name: z.ZodOptional<z.ZodString>;
110
+ }, z.core.$strip>;
111
+ export type CreateApiToken = z.infer<typeof createApiToken>;
112
+ export declare const apiToken: z.ZodObject<{
113
+ id: z.ZodNumber;
114
+ name: z.ZodString;
115
+ lastUsedAt: z.ZodNullable<z.ZodString>;
116
+ createdAt: z.ZodString;
117
+ }, z.core.$strip>;
118
+ export type ApiToken = z.infer<typeof apiToken>;
119
+ /** Returned once at creation time — the raw token is never retrievable again. */
120
+ export declare const createdApiToken: z.ZodObject<{
121
+ id: z.ZodNumber;
122
+ name: z.ZodString;
123
+ token: z.ZodString;
124
+ createdAt: z.ZodString;
125
+ }, z.core.$strip>;
126
+ export type CreatedApiToken = z.infer<typeof createdApiToken>;
127
+ /** Registration verification: label for the new credential + the browser's response payload. */
128
+ export declare const passkeyRegisterVerify: z.ZodObject<{
129
+ name: z.ZodString;
130
+ response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
131
+ }, z.core.$strip>;
132
+ export type PasskeyRegisterVerify = z.infer<typeof passkeyRegisterVerify>;
133
+ /** Login verification: just the browser's authentication response (discoverable credentials). */
134
+ export declare const passkeyLoginVerify: z.ZodObject<{
135
+ response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
136
+ }, z.core.$strip>;
137
+ export type PasskeyLoginVerify = z.infer<typeof passkeyLoginVerify>;
138
+ export declare const passkeyCredential: z.ZodObject<{
139
+ id: z.ZodNumber;
140
+ name: z.ZodString;
141
+ createdAt: z.ZodString;
142
+ }, z.core.$strip>;
143
+ export type PasskeyCredential = z.infer<typeof passkeyCredential>;
144
+ export declare const activeSession: z.ZodObject<{
145
+ id: z.ZodNumber;
146
+ ip: z.ZodNullable<z.ZodString>;
147
+ userAgent: z.ZodNullable<z.ZodString>;
148
+ createdAt: z.ZodString;
149
+ lastUsedAt: z.ZodNullable<z.ZodString>;
150
+ current: z.ZodBoolean;
151
+ }, z.core.$strip>;
152
+ export type ActiveSession = z.infer<typeof activeSession>;
153
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,QAAQ;;;;iBAInB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CA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AAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAGlE,eAAO,MAAM,aAAa;;;;;;;iBAOxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
package/dist/auth.js ADDED
@@ -0,0 +1,109 @@
1
+ import { z } from 'zod';
2
+ export const register = z.object({
3
+ email: z.email().max(255),
4
+ password: z.string().min(8).max(128),
5
+ name: z.string().min(1).max(100).optional(),
6
+ });
7
+ /** Initial bootstrap — same shape as register, only works when no users exist. */
8
+ export const setup = register;
9
+ export const login = z.object({
10
+ email: z.email(),
11
+ password: z.string().min(1),
12
+ /** Required when the account has 2FA enabled. */
13
+ totpCode: z.string().regex(/^\d{6}$/).optional(),
14
+ });
15
+ /** Verifying a two-factor action (enable / disable companion). */
16
+ export const twoFactorCode = z.object({ code: z.string().regex(/^\d{6}$/) });
17
+ /** Regenerating the 2FA secret: password required when 2FA is already enabled. */
18
+ export const twoFactorSetup = z.object({ password: z.string().min(1) });
19
+ export const twoFactorDisable = z.object({
20
+ password: z.string().min(1),
21
+ code: z.string().regex(/^\d{6}$/),
22
+ });
23
+ /** Self-service password change: requires the current password. */
24
+ export const passwordChange = z.object({
25
+ currentPassword: z.string().min(1),
26
+ newPassword: z.string().min(8).max(128),
27
+ });
28
+ /** Admin-initiated password reset for another user. */
29
+ /** Admin-created user — same shape as register plus the starting role. */
30
+ export const userCreate = z.object({
31
+ email: z.email().max(255),
32
+ password: z.string().min(8).max(128),
33
+ name: z.string().min(1).max(100).optional(),
34
+ role: z.enum(['admin', 'member']).default('member'),
35
+ });
36
+ export const passwordReset = z.object({
37
+ newPassword: z.string().min(8).max(128),
38
+ });
39
+ /** Forgot-password request. Always answers 200 (no user enumeration). */
40
+ export const forgotPassword = z.object({
41
+ email: z.email(),
42
+ });
43
+ /** Complete a reset with the token from the email / admin-issued link. */
44
+ export const passwordResetWithToken = z.object({
45
+ token: z.string().min(20).max(128),
46
+ newPassword: z.string().min(8).max(128),
47
+ });
48
+ /** Tokens issued after a successful login/refresh. */
49
+ export const tokenPair = z.object({
50
+ accessToken: z.string(),
51
+ refreshToken: z.string(),
52
+ expiresIn: z.number().int().positive(),
53
+ });
54
+ export const refresh = z.object({
55
+ refreshToken: z.string().min(1),
56
+ });
57
+ /** Public user representation (never includes passwordHash). */
58
+ export const publicUser = z.object({
59
+ id: z.number().int(),
60
+ email: z.email(),
61
+ name: z.string().nullable(),
62
+ role: z.enum(['admin', 'member']),
63
+ });
64
+ export const session = z.object({
65
+ user: publicUser,
66
+ tokens: tokenPair,
67
+ });
68
+ // ── API tokens (for the CLI / CI) ─────────────────────────────────────────
69
+ export const createApiToken = z.object({
70
+ name: z.string().min(1).max(100).optional(),
71
+ });
72
+ export const apiToken = z.object({
73
+ id: z.number().int(),
74
+ name: z.string(),
75
+ lastUsedAt: z.string().datetime().nullable(),
76
+ createdAt: z.string().datetime(),
77
+ });
78
+ /** Returned once at creation time — the raw token is never retrievable again. */
79
+ export const createdApiToken = z.object({
80
+ id: z.number().int(),
81
+ name: z.string(),
82
+ token: z.string(),
83
+ createdAt: z.string().datetime(),
84
+ });
85
+ // ── passkeys (WebAuthn) ────────────────────────────────────────────────────
86
+ /** Registration verification: label for the new credential + the browser's response payload. */
87
+ export const passkeyRegisterVerify = z.object({
88
+ name: z.string().min(1).max(100),
89
+ response: z.record(z.string(), z.unknown()),
90
+ });
91
+ /** Login verification: just the browser's authentication response (discoverable credentials). */
92
+ export const passkeyLoginVerify = z.object({
93
+ response: z.record(z.string(), z.unknown()),
94
+ });
95
+ export const passkeyCredential = z.object({
96
+ id: z.number().int(),
97
+ name: z.string(),
98
+ createdAt: z.string().datetime(),
99
+ });
100
+ // ── sessions (refresh-token backing store) ─────────────────────────────────
101
+ export const activeSession = z.object({
102
+ id: z.number().int(),
103
+ ip: z.string().nullable(),
104
+ userAgent: z.string().nullable(),
105
+ createdAt: z.string().datetime(),
106
+ lastUsedAt: z.string().datetime().nullable(),
107
+ current: z.boolean(),
108
+ });
109
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;IACzB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAGH,kFAAkF;AAClF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC;AAG9B,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,iDAAiD;IACjD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC;AAGH,kEAAkE;AAClE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,C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AC,GAAG,CAAC;IAChC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;CAC5C,CAAC,CAAC;AAGH,iGAAiG;AACjG,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;CAC5C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAGH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACpB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { z } from 'zod';
2
+ /** URL-safe slug used for projects, services, routes. */
3
+ export declare const slug: z.ZodString;
4
+ /**
5
+ * POSIX environment-variable name, as accepted by `docker run --env-file` and
6
+ * shells: letters, digits and underscores, starting with a letter or
7
+ * underscore. Surrounding whitespace is trimmed so sloppy input is normalized;
8
+ * anything else (e.g. `MY VAR`) is rejected — such a key would otherwise break
9
+ * the deploy at `docker run --env-file` time.
10
+ */
11
+ export declare const envVarName: z.ZodString;
12
+ export declare const id: z.ZodNumber;
13
+ /** Cursor-style pagination params. */
14
+ export declare const pagination: z.ZodObject<{
15
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
16
+ cursor: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
17
+ }, z.core.$strip>;
18
+ export type Pagination = z.infer<typeof pagination>;
19
+ /** Standard error envelope returned by the API. */
20
+ export declare const errorResponse: z.ZodObject<{
21
+ error: z.ZodObject<{
22
+ code: z.ZodString;
23
+ message: z.ZodString;
24
+ details: z.ZodOptional<z.ZodUnknown>;
25
+ }, z.core.$strip>;
26
+ }, z.core.$strip>;
27
+ export type ErrorResponse = z.infer<typeof errorResponse>;
28
+ /** A page of results. */
29
+ export declare function page<T extends z.ZodTypeAny>(item: T): z.ZodObject<{
30
+ items: z.ZodArray<T>;
31
+ nextCursor: z.ZodNullable<z.ZodNumber>;
32
+ total: z.ZodOptional<z.ZodNumber>;
33
+ }, z.core.$strip>;
34
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yDAAyD;AACzD,eAAO,MAAM,IAAI,aAIqE,CAAC;AAEvF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,aAMpB,CAAC;AAEJ,eAAO,MAAM,EAAE,aAA8B,CAAC;AAE9C,sCAAsC;AACtC,eAAO,MAAM,UAAU;;;iBAGrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,mDAAmD;AACnD,eAAO,MAAM,aAAa;;;;;;iBAMxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,yBAAyB;AACzB,wBAAgB,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC;;;;kBAMnD"}
package/dist/common.js ADDED
@@ -0,0 +1,41 @@
1
+ import { z } from 'zod';
2
+ /** URL-safe slug used for projects, services, routes. */
3
+ export const slug = z
4
+ .string()
5
+ .min(2)
6
+ .max(63)
7
+ .regex(/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/, 'lowercase letters, digits and hyphens');
8
+ /**
9
+ * POSIX environment-variable name, as accepted by `docker run --env-file` and
10
+ * shells: letters, digits and underscores, starting with a letter or
11
+ * underscore. Surrounding whitespace is trimmed so sloppy input is normalized;
12
+ * anything else (e.g. `MY VAR`) is rejected — such a key would otherwise break
13
+ * the deploy at `docker run --env-file` time.
14
+ */
15
+ export const envVarName = z
16
+ .string()
17
+ .trim()
18
+ .regex(/^[A-Za-z_][A-Za-z0-9_]*$/, 'must be a valid environment variable name (letters, digits, underscore; cannot start with a digit)');
19
+ export const id = z.number().int().positive();
20
+ /** Cursor-style pagination params. */
21
+ export const pagination = z.object({
22
+ limit: z.coerce.number().int().min(1).max(100).default(25),
23
+ cursor: z.coerce.number().int().positive().optional(),
24
+ });
25
+ /** Standard error envelope returned by the API. */
26
+ export const errorResponse = z.object({
27
+ error: z.object({
28
+ code: z.string(),
29
+ message: z.string(),
30
+ details: z.unknown().optional(),
31
+ }),
32
+ });
33
+ /** A page of results. */
34
+ export function page(item) {
35
+ return z.object({
36
+ items: z.array(item),
37
+ nextCursor: z.number().int().positive().nullable(),
38
+ total: z.number().int().nonnegative().optional(),
39
+ });
40
+ }
41
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,C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I,CAAC;QACpB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;QAClD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;KACjD,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from './common.js';
2
+ export * from './auth.js';
3
+ export * from './management.js';
4
+ export * from './project.js';
5
+ export * from './service.js';
6
+ export * from './kernel.js';
7
+ export * from './workspaces.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ export * from './common.js';
2
+ export * from './auth.js';
3
+ export * from './management.js';
4
+ export * from './project.js';
5
+ export * from './service.js';
6
+ export * from './kernel.js';
7
+ export * from './workspaces.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,232 @@
1
+ import { z } from 'zod';
2
+ export declare const configItemSchema: z.ZodObject<{
3
+ key: z.ZodString;
4
+ pluginId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ type: z.ZodDefault<z.ZodEnum<{
6
+ boolean: "boolean";
7
+ enum: "enum";
8
+ json: "json";
9
+ number: "number";
10
+ string: "string";
11
+ }>>;
12
+ isSecret: z.ZodBoolean;
13
+ label: z.ZodString;
14
+ category: z.ZodString;
15
+ description: z.ZodOptional<z.ZodString>;
16
+ tags: z.ZodArray<z.ZodString>;
17
+ options: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
+ value: z.ZodUnknown;
19
+ isConfigured: z.ZodBoolean;
20
+ updatedAt: z.ZodOptional<z.ZodString>;
21
+ }, z.core.$strip>;
22
+ export type ConfigItem = z.infer<typeof configItemSchema>;
23
+ export declare const configListSchema: z.ZodObject<{
24
+ entries: z.ZodArray<z.ZodObject<{
25
+ key: z.ZodString;
26
+ pluginId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ type: z.ZodDefault<z.ZodEnum<{
28
+ boolean: "boolean";
29
+ enum: "enum";
30
+ json: "json";
31
+ number: "number";
32
+ string: "string";
33
+ }>>;
34
+ isSecret: z.ZodBoolean;
35
+ label: z.ZodString;
36
+ category: z.ZodString;
37
+ description: z.ZodOptional<z.ZodString>;
38
+ tags: z.ZodArray<z.ZodString>;
39
+ options: z.ZodOptional<z.ZodArray<z.ZodString>>;
40
+ value: z.ZodUnknown;
41
+ isConfigured: z.ZodBoolean;
42
+ updatedAt: z.ZodOptional<z.ZodString>;
43
+ }, z.core.$strip>>;
44
+ }, z.core.$strip>;
45
+ export type ConfigListResponse = z.infer<typeof configListSchema>;
46
+ export declare const setConfigSchema: z.ZodObject<{
47
+ value: z.ZodUnknown;
48
+ isSecret: z.ZodOptional<z.ZodBoolean>;
49
+ description: z.ZodOptional<z.ZodString>;
50
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
51
+ }, z.core.$strip>;
52
+ export type SetConfigInput = z.infer<typeof setConfigSchema>;
53
+ export declare const pluginItemSchema: z.ZodObject<{
54
+ id: z.ZodString;
55
+ name: z.ZodString;
56
+ version: z.ZodString;
57
+ description: z.ZodOptional<z.ZodString>;
58
+ author: z.ZodOptional<z.ZodString>;
59
+ icon: z.ZodOptional<z.ZodString>;
60
+ isOfficial: z.ZodBoolean;
61
+ enabled: z.ZodBoolean;
62
+ status: z.ZodEnum<{
63
+ active: "active";
64
+ disabled: "disabled";
65
+ errored: "errored";
66
+ installing: "installing";
67
+ }>;
68
+ configSchema: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
69
+ menuItems: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
70
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
71
+ error: z.ZodOptional<z.ZodString>;
72
+ installedAt: z.ZodOptional<z.ZodString>;
73
+ }, z.core.$strip>;
74
+ export type PluginItem = z.infer<typeof pluginItemSchema>;
75
+ export declare const pluginListSchema: z.ZodObject<{
76
+ plugins: z.ZodArray<z.ZodObject<{
77
+ id: z.ZodString;
78
+ name: z.ZodString;
79
+ version: z.ZodString;
80
+ description: z.ZodOptional<z.ZodString>;
81
+ author: z.ZodOptional<z.ZodString>;
82
+ icon: z.ZodOptional<z.ZodString>;
83
+ isOfficial: z.ZodBoolean;
84
+ enabled: z.ZodBoolean;
85
+ status: z.ZodEnum<{
86
+ active: "active";
87
+ disabled: "disabled";
88
+ errored: "errored";
89
+ installing: "installing";
90
+ }>;
91
+ configSchema: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
92
+ menuItems: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
93
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
94
+ error: z.ZodOptional<z.ZodString>;
95
+ installedAt: z.ZodOptional<z.ZodString>;
96
+ }, z.core.$strip>>;
97
+ }, z.core.$strip>;
98
+ export type PluginListResponse = z.infer<typeof pluginListSchema>;
99
+ export declare const installPluginSchema: z.ZodObject<{
100
+ source: z.ZodDefault<z.ZodEnum<{
101
+ git: "git";
102
+ local: "local";
103
+ marketplace: "marketplace";
104
+ npm: "npm";
105
+ }>>;
106
+ target: z.ZodString;
107
+ name: z.ZodOptional<z.ZodString>;
108
+ version: z.ZodOptional<z.ZodString>;
109
+ description: z.ZodOptional<z.ZodString>;
110
+ author: z.ZodOptional<z.ZodString>;
111
+ icon: z.ZodOptional<z.ZodString>;
112
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
113
+ configSchema: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
114
+ menuItems: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
115
+ }, z.core.$strip>;
116
+ export type InstallPluginInput = z.infer<typeof installPluginSchema>;
117
+ export declare const marketplacePluginItemSchema: z.ZodObject<{
118
+ id: z.ZodString;
119
+ name: z.ZodString;
120
+ version: z.ZodString;
121
+ description: z.ZodString;
122
+ author: z.ZodString;
123
+ icon: z.ZodOptional<z.ZodString>;
124
+ category: z.ZodString;
125
+ isOfficial: z.ZodBoolean;
126
+ isInstalled: z.ZodDefault<z.ZodBoolean>;
127
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
128
+ configSchema: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
129
+ menuItems: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
130
+ }, z.core.$strip>;
131
+ export type MarketplacePluginItem = z.infer<typeof marketplacePluginItemSchema>;
132
+ export declare const marketplaceCatalogSchema: z.ZodObject<{
133
+ catalog: z.ZodArray<z.ZodObject<{
134
+ id: z.ZodString;
135
+ name: z.ZodString;
136
+ version: z.ZodString;
137
+ description: z.ZodString;
138
+ author: z.ZodString;
139
+ icon: z.ZodOptional<z.ZodString>;
140
+ category: z.ZodString;
141
+ isOfficial: z.ZodBoolean;
142
+ isInstalled: z.ZodDefault<z.ZodBoolean>;
143
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
144
+ configSchema: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
145
+ menuItems: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
146
+ }, z.core.$strip>>;
147
+ }, z.core.$strip>;
148
+ export type MarketplaceCatalogResponse = z.infer<typeof marketplaceCatalogSchema>;
149
+ export declare const menuItemSchema: z.ZodObject<{
150
+ id: z.ZodString;
151
+ pluginId: z.ZodOptional<z.ZodString>;
152
+ slot: z.ZodString;
153
+ label: z.ZodString;
154
+ route: z.ZodString;
155
+ icon: z.ZodOptional<z.ZodString>;
156
+ order: z.ZodOptional<z.ZodNumber>;
157
+ permission: z.ZodOptional<z.ZodEnum<{
158
+ admin: "admin";
159
+ member: "member";
160
+ }>>;
161
+ }, z.core.$strip>;
162
+ export type MenuItem = z.infer<typeof menuItemSchema>;
163
+ export declare const menuListSchema: z.ZodObject<{
164
+ slots: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
165
+ id: z.ZodString;
166
+ pluginId: z.ZodOptional<z.ZodString>;
167
+ slot: z.ZodString;
168
+ label: z.ZodString;
169
+ route: z.ZodString;
170
+ icon: z.ZodOptional<z.ZodString>;
171
+ order: z.ZodOptional<z.ZodNumber>;
172
+ permission: z.ZodOptional<z.ZodEnum<{
173
+ admin: "admin";
174
+ member: "member";
175
+ }>>;
176
+ }, z.core.$strip>>>;
177
+ items: z.ZodArray<z.ZodObject<{
178
+ id: z.ZodString;
179
+ pluginId: z.ZodOptional<z.ZodString>;
180
+ slot: z.ZodString;
181
+ label: z.ZodString;
182
+ route: z.ZodString;
183
+ icon: z.ZodOptional<z.ZodString>;
184
+ order: z.ZodOptional<z.ZodNumber>;
185
+ permission: z.ZodOptional<z.ZodEnum<{
186
+ admin: "admin";
187
+ member: "member";
188
+ }>>;
189
+ }, z.core.$strip>>;
190
+ }, z.core.$strip>;
191
+ export type MenuListResponse = z.infer<typeof menuListSchema>;
192
+ export declare const pluginInspectSchema: z.ZodObject<{
193
+ id: z.ZodString;
194
+ name: z.ZodString;
195
+ version: z.ZodString;
196
+ description: z.ZodOptional<z.ZodString>;
197
+ author: z.ZodOptional<z.ZodString>;
198
+ isOfficial: z.ZodBoolean;
199
+ enabled: z.ZodBoolean;
200
+ status: z.ZodEnum<{
201
+ active: "active";
202
+ disabled: "disabled";
203
+ errored: "errored";
204
+ installing: "installing";
205
+ }>;
206
+ dependencies: z.ZodArray<z.ZodString>;
207
+ hooks: z.ZodArray<z.ZodString>;
208
+ services: z.ZodArray<z.ZodString>;
209
+ menus: z.ZodArray<z.ZodObject<{
210
+ id: z.ZodString;
211
+ pluginId: z.ZodOptional<z.ZodString>;
212
+ slot: z.ZodString;
213
+ label: z.ZodString;
214
+ route: z.ZodString;
215
+ icon: z.ZodOptional<z.ZodString>;
216
+ order: z.ZodOptional<z.ZodNumber>;
217
+ permission: z.ZodOptional<z.ZodEnum<{
218
+ admin: "admin";
219
+ member: "member";
220
+ }>>;
221
+ }, z.core.$strip>>;
222
+ configSchema: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
223
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
224
+ installedAt: z.ZodOptional<z.ZodString>;
225
+ runtimeStats: z.ZodObject<{
226
+ eventsHandled: z.ZodNumber;
227
+ uptimeSeconds: z.ZodNumber;
228
+ loadedAt: z.ZodOptional<z.ZodString>;
229
+ }, z.core.$strip>;
230
+ }, z.core.$strip>;
231
+ export type PluginInspectResponse = z.infer<typeof pluginInspectSchema>;
232
+ //# sourceMappingURL=kernel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kernel.d.ts","sourceRoot":"","sources":["../src/kernel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;iBAa3B,CAAC;AACH,MAAM,MAAM,U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