@locusai/shared 0.4.6 → 0.4.9

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.
Files changed (52) hide show
  1. package/dist/common.d.ts +200 -0
  2. package/dist/common.d.ts.map +1 -0
  3. package/dist/enums.d.ts +51 -0
  4. package/dist/enums.d.ts.map +1 -0
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +884 -3
  8. package/dist/models/activity.d.ts +947 -0
  9. package/dist/models/activity.d.ts.map +1 -0
  10. package/dist/models/agent.d.ts +21 -0
  11. package/dist/models/agent.d.ts.map +1 -0
  12. package/dist/models/auth.d.ts +374 -0
  13. package/dist/models/auth.d.ts.map +1 -0
  14. package/dist/models/ci.d.ts +76 -0
  15. package/dist/models/ci.d.ts.map +1 -0
  16. package/dist/models/doc-group.d.ts +144 -0
  17. package/dist/models/doc-group.d.ts.map +1 -0
  18. package/dist/models/doc.d.ts +251 -0
  19. package/dist/models/doc.d.ts.map +1 -0
  20. package/{src/models/index.ts → dist/models/index.d.ts} +1 -0
  21. package/dist/models/index.d.ts.map +1 -0
  22. package/dist/models/invitation.d.ts +257 -0
  23. package/dist/models/invitation.d.ts.map +1 -0
  24. package/dist/models/organization.d.ts +357 -0
  25. package/dist/models/organization.d.ts.map +1 -0
  26. package/dist/models/sprint.d.ts +218 -0
  27. package/dist/models/sprint.d.ts.map +1 -0
  28. package/dist/models/task.d.ts +1208 -0
  29. package/dist/models/task.d.ts.map +1 -0
  30. package/dist/models/user.d.ts +101 -0
  31. package/dist/models/user.d.ts.map +1 -0
  32. package/dist/models/workspace.d.ts +319 -0
  33. package/dist/models/workspace.d.ts.map +1 -0
  34. package/package.json +3 -20
  35. package/dist/schemas.d.ts +0 -297
  36. package/dist/schemas.d.ts.map +0 -1
  37. package/dist/schemas.js +0 -129
  38. package/src/common.ts +0 -106
  39. package/src/enums.ts +0 -56
  40. package/src/index.ts +0 -3
  41. package/src/models/activity.ts +0 -237
  42. package/src/models/agent.ts +0 -13
  43. package/src/models/auth.ts +0 -188
  44. package/src/models/ci.ts +0 -21
  45. package/src/models/doc-group.ts +0 -42
  46. package/src/models/doc.ts +0 -66
  47. package/src/models/invitation.ts +0 -83
  48. package/src/models/organization.ts +0 -105
  49. package/src/models/sprint.ts +0 -71
  50. package/src/models/task.ts +0 -110
  51. package/src/models/user.ts +0 -35
  52. package/src/models/workspace.ts +0 -99
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../src/models/activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE/D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;EAIxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAMtD,eAAO,MAAM,wBAAwB;;;;;;EAEnC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;EAEnC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;EAIrC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;EAIpC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;EAExC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;EAGnC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;EAErC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;EAGrC,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;EAK3C,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;;;;;EAY/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ export declare const LockSchema: z.ZodObject<{
3
+ agentId: z.ZodString;
4
+ ttlSeconds: z.ZodNumber;
5
+ }, "strip", z.ZodTypeAny, {
6
+ agentId: string;
7
+ ttlSeconds: number;
8
+ }, {
9
+ agentId: string;
10
+ ttlSeconds: number;
11
+ }>;
12
+ export declare const UnlockSchema: z.ZodObject<{
13
+ agentId: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ agentId: string;
16
+ }, {
17
+ agentId: string;
18
+ }>;
19
+ export type Lock = z.infer<typeof LockSchema>;
20
+ export type Unlock = z.infer<typeof UnlockSchema>;
21
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/models/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU;;;;;;;;;EAGrB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;EAEvB,CAAC;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAC9C,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
@@ -0,0 +1,374 @@
1
+ /**
2
+ * Authentication Models and Schemas
3
+ */
4
+ import { z } from "zod";
5
+ import { UserRole } from "../enums";
6
+ /**
7
+ * User authenticated via JWT (web dashboard)
8
+ */
9
+ export declare const JwtAuthUserSchema: z.ZodObject<{
10
+ authType: z.ZodLiteral<"jwt">;
11
+ id: z.ZodString;
12
+ email: z.ZodString;
13
+ name: z.ZodString;
14
+ role: z.ZodNativeEnum<typeof UserRole>;
15
+ orgId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ id: string;
19
+ name: string;
20
+ role: UserRole;
21
+ email: string;
22
+ authType: "jwt";
23
+ workspaceId?: string | null | undefined;
24
+ orgId?: string | null | undefined;
25
+ }, {
26
+ id: string;
27
+ name: string;
28
+ role: UserRole;
29
+ email: string;
30
+ authType: "jwt";
31
+ workspaceId?: string | null | undefined;
32
+ orgId?: string | null | undefined;
33
+ }>;
34
+ export type JwtAuthUser = z.infer<typeof JwtAuthUserSchema>;
35
+ /**
36
+ * User authenticated via API Key (CLI/agents)
37
+ * Note: API keys don't have a real user ID - they represent organization-level access
38
+ */
39
+ export declare const ApiKeyAuthUserSchema: z.ZodObject<{
40
+ authType: z.ZodLiteral<"api_key">;
41
+ apiKeyId: z.ZodString;
42
+ apiKeyName: z.ZodString;
43
+ orgId: z.ZodString;
44
+ }, "strip", z.ZodTypeAny, {
45
+ orgId: string;
46
+ authType: "api_key";
47
+ apiKeyId: string;
48
+ apiKeyName: string;
49
+ }, {
50
+ orgId: string;
51
+ authType: "api_key";
52
+ apiKeyId: string;
53
+ apiKeyName: string;
54
+ }>;
55
+ export type ApiKeyAuthUser = z.infer<typeof ApiKeyAuthUserSchema>;
56
+ /**
57
+ * Union type for any authenticated request
58
+ */
59
+ export declare const AuthenticatedUserSchema: z.ZodDiscriminatedUnion<"authType", [z.ZodObject<{
60
+ authType: z.ZodLiteral<"jwt">;
61
+ id: z.ZodString;
62
+ email: z.ZodString;
63
+ name: z.ZodString;
64
+ role: z.ZodNativeEnum<typeof UserRole>;
65
+ orgId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
+ workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
67
+ }, "strip", z.ZodTypeAny, {
68
+ id: string;
69
+ name: string;
70
+ role: UserRole;
71
+ email: string;
72
+ authType: "jwt";
73
+ workspaceId?: string | null | undefined;
74
+ orgId?: string | null | undefined;
75
+ }, {
76
+ id: string;
77
+ name: string;
78
+ role: UserRole;
79
+ email: string;
80
+ authType: "jwt";
81
+ workspaceId?: string | null | undefined;
82
+ orgId?: string | null | undefined;
83
+ }>, z.ZodObject<{
84
+ authType: z.ZodLiteral<"api_key">;
85
+ apiKeyId: z.ZodString;
86
+ apiKeyName: z.ZodString;
87
+ orgId: z.ZodString;
88
+ }, "strip", z.ZodTypeAny, {
89
+ orgId: string;
90
+ authType: "api_key";
91
+ apiKeyId: string;
92
+ apiKeyName: string;
93
+ }, {
94
+ orgId: string;
95
+ authType: "api_key";
96
+ apiKeyId: string;
97
+ apiKeyName: string;
98
+ }>]>;
99
+ export type AuthenticatedUser = z.infer<typeof AuthenticatedUserSchema>;
100
+ /**
101
+ * Type guard to check if user is JWT authenticated
102
+ */
103
+ export declare function isJwtUser(user: AuthenticatedUser): user is JwtAuthUser;
104
+ /**
105
+ * Type guard to check if user is API key authenticated
106
+ */
107
+ export declare function isApiKeyUser(user: AuthenticatedUser): user is ApiKeyAuthUser;
108
+ /**
109
+ * Get the user ID for event logging. Returns null for API key users.
110
+ * Use this when you need to store a reference to the user in the database.
111
+ */
112
+ export declare function getAuthUserId(user: AuthenticatedUser): string | null;
113
+ export declare const AuthResponseSchema: z.ZodObject<{
114
+ token: z.ZodString;
115
+ user: z.ZodObject<{
116
+ id: z.ZodString;
117
+ createdAt: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
118
+ updatedAt: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
119
+ } & {
120
+ email: z.ZodString;
121
+ name: z.ZodString;
122
+ avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
+ role: z.ZodNativeEnum<typeof UserRole>;
124
+ orgId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
125
+ workspaceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
126
+ companyName: z.ZodOptional<z.ZodString>;
127
+ userRole: z.ZodOptional<z.ZodString>;
128
+ teamSize: z.ZodOptional<z.ZodString>;
129
+ onboardingCompleted: z.ZodDefault<z.ZodBoolean>;
130
+ emailVerified: z.ZodDefault<z.ZodBoolean>;
131
+ }, "strip", z.ZodTypeAny, {
132
+ id: string;
133
+ createdAt: number | Date;
134
+ updatedAt: number | Date;
135
+ name: string;
136
+ role: UserRole;
137
+ email: string;
138
+ onboardingCompleted: boolean;
139
+ emailVerified: boolean;
140
+ workspaceId?: string | null | undefined;
141
+ avatarUrl?: string | null | undefined;
142
+ orgId?: string | null | undefined;
143
+ companyName?: string | undefined;
144
+ userRole?: string | undefined;
145
+ teamSize?: string | undefined;
146
+ }, {
147
+ id: string;
148
+ createdAt: number | Date;
149
+ updatedAt: number | Date;
150
+ name: string;
151
+ role: UserRole;
152
+ email: string;
153
+ workspaceId?: string | null | undefined;
154
+ avatarUrl?: string | null | undefined;
155
+ orgId?: string | null | undefined;
156
+ companyName?: string | undefined;
157
+ userRole?: string | undefined;
158
+ teamSize?: string | undefined;
159
+ onboardingCompleted?: boolean | undefined;
160
+ emailVerified?: boolean | undefined;
161
+ }>;
162
+ }, "strip", z.ZodTypeAny, {
163
+ token: string;
164
+ user: {
165
+ id: string;
166
+ createdAt: number | Date;
167
+ updatedAt: number | Date;
168
+ name: string;
169
+ role: UserRole;
170
+ email: string;
171
+ onboardingCompleted: boolean;
172
+ emailVerified: boolean;
173
+ workspaceId?: string | null | undefined;
174
+ avatarUrl?: string | null | undefined;
175
+ orgId?: string | null | undefined;
176
+ companyName?: string | undefined;
177
+ userRole?: string | undefined;
178
+ teamSize?: string | undefined;
179
+ };
180
+ }, {
181
+ token: string;
182
+ user: {
183
+ id: string;
184
+ createdAt: number | Date;
185
+ updatedAt: number | Date;
186
+ name: string;
187
+ role: UserRole;
188
+ email: string;
189
+ workspaceId?: string | null | undefined;
190
+ avatarUrl?: string | null | undefined;
191
+ orgId?: string | null | undefined;
192
+ companyName?: string | undefined;
193
+ userRole?: string | undefined;
194
+ teamSize?: string | undefined;
195
+ onboardingCompleted?: boolean | undefined;
196
+ emailVerified?: boolean | undefined;
197
+ };
198
+ }>;
199
+ export type AuthResponse = z.infer<typeof AuthResponseSchema>;
200
+ export type LoginResponse = AuthResponse;
201
+ export declare const OtpRequestSchema: z.ZodObject<{
202
+ email: z.ZodString;
203
+ }, "strip", z.ZodTypeAny, {
204
+ email: string;
205
+ }, {
206
+ email: string;
207
+ }>;
208
+ export type OtpRequest = z.infer<typeof OtpRequestSchema>;
209
+ export declare const VerifyOtpSchema: z.ZodObject<{
210
+ email: z.ZodString;
211
+ otp: z.ZodString;
212
+ }, "strip", z.ZodTypeAny, {
213
+ email: string;
214
+ otp: string;
215
+ }, {
216
+ email: string;
217
+ otp: string;
218
+ }>;
219
+ export type VerifyOtp = z.infer<typeof VerifyOtpSchema>;
220
+ export declare const CompleteRegistrationSchema: z.ZodObject<{
221
+ email: z.ZodString;
222
+ otp: z.ZodString;
223
+ name: z.ZodString;
224
+ companyName: z.ZodOptional<z.ZodString>;
225
+ teamSize: z.ZodOptional<z.ZodEnum<["solo", "2-10", "11-50", "51-200", "200+"]>>;
226
+ userRole: z.ZodOptional<z.ZodEnum<["developer", "designer", "product_manager", "other"]>>;
227
+ workspaceName: z.ZodOptional<z.ZodString>;
228
+ invitedEmails: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
229
+ }, "strip", z.ZodTypeAny, {
230
+ name: string;
231
+ email: string;
232
+ otp: string;
233
+ companyName?: string | undefined;
234
+ userRole?: "developer" | "designer" | "product_manager" | "other" | undefined;
235
+ teamSize?: "solo" | "2-10" | "11-50" | "51-200" | "200+" | undefined;
236
+ workspaceName?: string | undefined;
237
+ invitedEmails?: string[] | undefined;
238
+ }, {
239
+ name: string;
240
+ email: string;
241
+ otp: string;
242
+ companyName?: string | undefined;
243
+ userRole?: "developer" | "designer" | "product_manager" | "other" | undefined;
244
+ teamSize?: "solo" | "2-10" | "11-50" | "51-200" | "200+" | undefined;
245
+ workspaceName?: string | undefined;
246
+ invitedEmails?: string[] | undefined;
247
+ }>;
248
+ export type CompleteRegistration = z.infer<typeof CompleteRegistrationSchema>;
249
+ export declare const JWTPayloadSchema: z.ZodObject<{
250
+ sub: z.ZodString;
251
+ email: z.ZodString;
252
+ name: z.ZodString;
253
+ role: z.ZodString;
254
+ orgId: z.ZodOptional<z.ZodString>;
255
+ iat: z.ZodNumber;
256
+ exp: z.ZodNumber;
257
+ }, "strip", z.ZodTypeAny, {
258
+ name: string;
259
+ role: string;
260
+ email: string;
261
+ sub: string;
262
+ iat: number;
263
+ exp: number;
264
+ orgId?: string | undefined;
265
+ }, {
266
+ name: string;
267
+ role: string;
268
+ email: string;
269
+ sub: string;
270
+ iat: number;
271
+ exp: number;
272
+ orgId?: string | undefined;
273
+ }>;
274
+ export type JWTPayload = z.infer<typeof JWTPayloadSchema>;
275
+ export declare const AuthContextSchema: z.ZodObject<{
276
+ userId: z.ZodString;
277
+ email: z.ZodString;
278
+ name: z.ZodString;
279
+ role: z.ZodString;
280
+ orgId: z.ZodOptional<z.ZodString>;
281
+ workspaceId: z.ZodOptional<z.ZodString>;
282
+ authType: z.ZodEnum<["jwt", "api_key", "local"]>;
283
+ }, "strip", z.ZodTypeAny, {
284
+ name: string;
285
+ userId: string;
286
+ role: string;
287
+ email: string;
288
+ authType: "jwt" | "api_key" | "local";
289
+ workspaceId?: string | undefined;
290
+ orgId?: string | undefined;
291
+ }, {
292
+ name: string;
293
+ userId: string;
294
+ role: string;
295
+ email: string;
296
+ authType: "jwt" | "api_key" | "local";
297
+ workspaceId?: string | undefined;
298
+ orgId?: string | undefined;
299
+ }>;
300
+ export type AuthContext = z.infer<typeof AuthContextSchema>;
301
+ export declare const APIKeySchema: z.ZodObject<{
302
+ id: z.ZodString;
303
+ name: z.ZodString;
304
+ keyPrefix: z.ZodString;
305
+ workspaceId: z.ZodString;
306
+ lastUsedAt: z.ZodNullable<z.ZodNumber>;
307
+ createdAt: z.ZodNumber;
308
+ }, "strip", z.ZodTypeAny, {
309
+ id: string;
310
+ createdAt: number;
311
+ name: string;
312
+ workspaceId: string;
313
+ keyPrefix: string;
314
+ lastUsedAt: number | null;
315
+ }, {
316
+ id: string;
317
+ createdAt: number;
318
+ name: string;
319
+ workspaceId: string;
320
+ keyPrefix: string;
321
+ lastUsedAt: number | null;
322
+ }>;
323
+ export type APIKey = z.infer<typeof APIKeySchema>;
324
+ export declare const APIKeyCreateResponseSchema: z.ZodObject<{
325
+ id: z.ZodString;
326
+ name: z.ZodString;
327
+ keyPrefix: z.ZodString;
328
+ key: z.ZodString;
329
+ createdAt: z.ZodNumber;
330
+ }, "strip", z.ZodTypeAny, {
331
+ id: string;
332
+ createdAt: number;
333
+ name: string;
334
+ keyPrefix: string;
335
+ key: string;
336
+ }, {
337
+ id: string;
338
+ createdAt: number;
339
+ name: string;
340
+ keyPrefix: string;
341
+ key: string;
342
+ }>;
343
+ export type APIKeyCreateResponse = z.infer<typeof APIKeyCreateResponseSchema>;
344
+ export declare const ApiKeyIdParamSchema: z.ZodObject<{
345
+ id: z.ZodString;
346
+ }, "strip", z.ZodTypeAny, {
347
+ id: string;
348
+ }, {
349
+ id: string;
350
+ }>;
351
+ export type ApiKeyIdParam = z.infer<typeof ApiKeyIdParamSchema>;
352
+ export declare const ApiKeyQuerySchema: z.ZodObject<{
353
+ workspaceId: z.ZodOptional<z.ZodString>;
354
+ }, "strip", z.ZodTypeAny, {
355
+ workspaceId?: string | undefined;
356
+ }, {
357
+ workspaceId?: string | undefined;
358
+ }>;
359
+ export type ApiKeyQuery = z.infer<typeof ApiKeyQuerySchema>;
360
+ export declare const CreateApiKeySchema: z.ZodObject<{
361
+ workspaceId: z.ZodOptional<z.ZodString>;
362
+ name: z.ZodString;
363
+ expiresInDays: z.ZodOptional<z.ZodNumber>;
364
+ }, "strip", z.ZodTypeAny, {
365
+ name: string;
366
+ workspaceId?: string | undefined;
367
+ expiresInDays?: number | undefined;
368
+ }, {
369
+ name: string;
370
+ workspaceId?: string | undefined;
371
+ expiresInDays?: number | undefined;
372
+ }>;
373
+ export type CreateApiKey = z.infer<typeof CreateApiKeySchema>;
374
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/models/auth.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAOpC;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;EAQ5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;EAK/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,IAAI,WAAW,CAEtE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,IAAI,cAAc,CAE5E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAEpE;AAMD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KA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;EAE5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAI7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { z } from "zod";
2
+ export declare const RecordCiSchema: z.ZodObject<{
3
+ taskId: z.ZodString;
4
+ workspaceId: z.ZodString;
5
+ result: z.ZodObject<{
6
+ ok: z.ZodBoolean;
7
+ summary: z.ZodString;
8
+ commands: z.ZodArray<z.ZodObject<{
9
+ cmd: z.ZodString;
10
+ exitCode: z.ZodNumber;
11
+ durationMs: z.ZodOptional<z.ZodNumber>;
12
+ error: z.ZodOptional<z.ZodString>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ cmd: string;
15
+ exitCode: number;
16
+ error?: string | undefined;
17
+ durationMs?: number | undefined;
18
+ }, {
19
+ cmd: string;
20
+ exitCode: number;
21
+ error?: string | undefined;
22
+ durationMs?: number | undefined;
23
+ }>, "many">;
24
+ preset: z.ZodString;
25
+ }, "strip", z.ZodTypeAny, {
26
+ preset: string;
27
+ ok: boolean;
28
+ summary: string;
29
+ commands: {
30
+ cmd: string;
31
+ exitCode: number;
32
+ error?: string | undefined;
33
+ durationMs?: number | undefined;
34
+ }[];
35
+ }, {
36
+ preset: string;
37
+ ok: boolean;
38
+ summary: string;
39
+ commands: {
40
+ cmd: string;
41
+ exitCode: number;
42
+ error?: string | undefined;
43
+ durationMs?: number | undefined;
44
+ }[];
45
+ }>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ taskId: string;
48
+ workspaceId: string;
49
+ result: {
50
+ preset: string;
51
+ ok: boolean;
52
+ summary: string;
53
+ commands: {
54
+ cmd: string;
55
+ exitCode: number;
56
+ error?: string | undefined;
57
+ durationMs?: number | undefined;
58
+ }[];
59
+ };
60
+ }, {
61
+ taskId: string;
62
+ workspaceId: string;
63
+ result: {
64
+ preset: string;
65
+ ok: boolean;
66
+ summary: string;
67
+ commands: {
68
+ cmd: string;
69
+ exitCode: number;
70
+ error?: string | undefined;
71
+ durationMs?: number | undefined;
72
+ }[];
73
+ };
74
+ }>;
75
+ export type RecordCi = z.infer<typeof RecordCiSchema>;
76
+ //# sourceMappingURL=ci.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci.d.ts","sourceRoot":"","sources":["../../src/models/ci.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,144 @@
1
+ import { z } from "zod";
2
+ export declare const DocGroupSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ createdAt: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
5
+ updatedAt: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
6
+ } & {
7
+ workspaceId: z.ZodString;
8
+ name: z.ZodString;
9
+ order: z.ZodDefault<z.ZodNumber>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ id: string;
12
+ createdAt: number | Date;
13
+ updatedAt: number | Date;
14
+ name: string;
15
+ workspaceId: string;
16
+ order: number;
17
+ }, {
18
+ id: string;
19
+ createdAt: number | Date;
20
+ updatedAt: number | Date;
21
+ name: string;
22
+ workspaceId: string;
23
+ order?: number | undefined;
24
+ }>;
25
+ export type DocGroup = z.infer<typeof DocGroupSchema>;
26
+ export declare const CreateDocGroupSchema: z.ZodObject<{
27
+ name: z.ZodString;
28
+ order: z.ZodOptional<z.ZodNumber>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ name: string;
31
+ order?: number | undefined;
32
+ }, {
33
+ name: string;
34
+ order?: number | undefined;
35
+ }>;
36
+ export type CreateDocGroup = z.infer<typeof CreateDocGroupSchema>;
37
+ export declare const UpdateDocGroupSchema: z.ZodObject<{
38
+ name: z.ZodOptional<z.ZodString>;
39
+ order: z.ZodOptional<z.ZodNumber>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ name?: string | undefined;
42
+ order?: number | undefined;
43
+ }, {
44
+ name?: string | undefined;
45
+ order?: number | undefined;
46
+ }>;
47
+ export type UpdateDocGroup = z.infer<typeof UpdateDocGroupSchema>;
48
+ export declare const DocGroupResponseSchema: z.ZodObject<{
49
+ group: z.ZodObject<{
50
+ id: z.ZodString;
51
+ createdAt: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
52
+ updatedAt: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
53
+ } & {
54
+ workspaceId: z.ZodString;
55
+ name: z.ZodString;
56
+ order: z.ZodDefault<z.ZodNumber>;
57
+ }, "strip", z.ZodTypeAny, {
58
+ id: string;
59
+ createdAt: number | Date;
60
+ updatedAt: number | Date;
61
+ name: string;
62
+ workspaceId: string;
63
+ order: number;
64
+ }, {
65
+ id: string;
66
+ createdAt: number | Date;
67
+ updatedAt: number | Date;
68
+ name: string;
69
+ workspaceId: string;
70
+ order?: number | undefined;
71
+ }>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ group: {
74
+ id: string;
75
+ createdAt: number | Date;
76
+ updatedAt: number | Date;
77
+ name: string;
78
+ workspaceId: string;
79
+ order: number;
80
+ };
81
+ }, {
82
+ group: {
83
+ id: string;
84
+ createdAt: number | Date;
85
+ updatedAt: number | Date;
86
+ name: string;
87
+ workspaceId: string;
88
+ order?: number | undefined;
89
+ };
90
+ }>;
91
+ export type DocGroupResponse = z.infer<typeof DocGroupResponseSchema>;
92
+ export declare const DocGroupsResponseSchema: z.ZodObject<{
93
+ groups: z.ZodArray<z.ZodObject<{
94
+ id: z.ZodString;
95
+ createdAt: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
96
+ updatedAt: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
97
+ } & {
98
+ workspaceId: z.ZodString;
99
+ name: z.ZodString;
100
+ order: z.ZodDefault<z.ZodNumber>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ id: string;
103
+ createdAt: number | Date;
104
+ updatedAt: number | Date;
105
+ name: string;
106
+ workspaceId: string;
107
+ order: number;
108
+ }, {
109
+ id: string;
110
+ createdAt: number | Date;
111
+ updatedAt: number | Date;
112
+ name: string;
113
+ workspaceId: string;
114
+ order?: number | undefined;
115
+ }>, "many">;
116
+ }, "strip", z.ZodTypeAny, {
117
+ groups: {
118
+ id: string;
119
+ createdAt: number | Date;
120
+ updatedAt: number | Date;
121
+ name: string;
122
+ workspaceId: string;
123
+ order: number;
124
+ }[];
125
+ }, {
126
+ groups: {
127
+ id: string;
128
+ createdAt: number | Date;
129
+ updatedAt: number | Date;
130
+ name: string;
131
+ workspaceId: string;
132
+ order?: number | undefined;
133
+ }[];
134
+ }>;
135
+ export type DocGroupsResponse = z.infer<typeof DocGroupsResponseSchema>;
136
+ export declare const DocGroupIdParamSchema: z.ZodObject<{
137
+ id: z.ZodString;
138
+ }, "strip", z.ZodTypeAny, {
139
+ id: string;
140
+ }, {
141
+ id: string;
142
+ }>;
143
+ export type DocGroupIdParam = z.infer<typeof DocGroupIdParamSchema>;
144
+ //# sourceMappingURL=doc-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-group.d.ts","sourceRoot":"","sources":["../../src/models/doc-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;EAIzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,oBAAoB;;;;;;;;;EAG/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,oBAAoB;;;;;;;;;EAG/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAElC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}