@locusai/shared 0.4.16 → 0.5.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/README.md CHANGED
@@ -38,7 +38,7 @@ const task = TaskSchema.parse(data);
38
38
 
39
39
  ## Part of Locus
40
40
 
41
- This package is part of the [Locus](https://github.com/asgarovf/locusai) platform — a local-first AI development platform for task management, documentation, and CI coordination.
41
+ This package is part of the [Locus](https://github.com/asgarovf/locusai) platform — an AI-native project management platform for engineering teams.
42
42
 
43
43
  ## License
44
44
 
package/dist/common.d.ts CHANGED
@@ -1,45 +1,21 @@
1
1
  import { z } from "zod";
2
2
  export declare const BaseEntitySchema: z.ZodObject<{
3
3
  id: z.ZodString;
4
- createdAt: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
5
- updatedAt: z.ZodUnion<[z.ZodDate, z.ZodNumber]>;
6
- }, "strip", z.ZodTypeAny, {
7
- id: string;
8
- createdAt: number | Date;
9
- updatedAt: number | Date;
10
- }, {
11
- id: string;
12
- createdAt: number | Date;
13
- updatedAt: number | Date;
14
- }>;
4
+ createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodNumber]>;
5
+ updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodNumber]>;
6
+ }, z.core.$strip>;
15
7
  export type BaseEntity = z.infer<typeof BaseEntitySchema>;
16
8
  export declare const PaginationMetaSchema: z.ZodObject<{
17
9
  page: z.ZodNumber;
18
10
  limit: z.ZodNumber;
19
11
  total: z.ZodNumber;
20
12
  totalPages: z.ZodNumber;
21
- }, "strip", z.ZodTypeAny, {
22
- page: number;
23
- limit: number;
24
- total: number;
25
- totalPages: number;
26
- }, {
27
- page: number;
28
- limit: number;
29
- total: number;
30
- totalPages: number;
31
- }>;
13
+ }, z.core.$strip>;
32
14
  export type PaginationMeta = z.infer<typeof PaginationMetaSchema>;
33
15
  export declare const PaginationRequestSchema: z.ZodObject<{
34
- page: z.ZodDefault<z.ZodNumber>;
35
- limit: z.ZodDefault<z.ZodNumber>;
36
- }, "strip", z.ZodTypeAny, {
37
- page: number;
38
- limit: number;
39
- }, {
40
- page?: number | undefined;
41
- limit?: number | undefined;
42
- }>;
16
+ page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
17
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
18
+ }, z.core.$strip>;
43
19
  export type PaginationRequest = z.infer<typeof PaginationRequestSchema>;
44
20
  /**
45
21
  * Special type for cases where 'any' is absolutely necessary.
@@ -53,90 +29,18 @@ export declare const ApiResponseSchema: z.ZodObject<{
53
29
  code: z.ZodString;
54
30
  message: z.ZodString;
55
31
  details: z.ZodOptional<z.ZodUnknown>;
56
- }, "strip", z.ZodTypeAny, {
57
- code: string;
58
- message: string;
59
- details?: unknown;
60
- }, {
61
- code: string;
62
- message: string;
63
- details?: unknown;
64
- }>>;
32
+ }, z.core.$strip>>;
65
33
  meta: z.ZodOptional<z.ZodObject<{
66
34
  pagination: z.ZodOptional<z.ZodObject<{
67
35
  page: z.ZodNumber;
68
36
  limit: z.ZodNumber;
69
37
  total: z.ZodNumber;
70
38
  totalPages: z.ZodNumber;
71
- }, "strip", z.ZodTypeAny, {
72
- page: number;
73
- limit: number;
74
- total: number;
75
- totalPages: number;
76
- }, {
77
- page: number;
78
- limit: number;
79
- total: number;
80
- totalPages: number;
81
- }>>;
39
+ }, z.core.$strip>>;
82
40
  timestamp: z.ZodString;
83
41
  path: z.ZodString;
84
- }, "strip", z.ZodTypeAny, {
85
- path: string;
86
- timestamp: string;
87
- pagination?: {
88
- page: number;
89
- limit: number;
90
- total: number;
91
- totalPages: number;
92
- } | undefined;
93
- }, {
94
- path: string;
95
- timestamp: string;
96
- pagination?: {
97
- page: number;
98
- limit: number;
99
- total: number;
100
- totalPages: number;
101
- } | undefined;
102
- }>>;
103
- }, "strip", z.ZodTypeAny, {
104
- success: boolean;
105
- data?: unknown;
106
- error?: {
107
- code: string;
108
- message: string;
109
- details?: unknown;
110
- } | undefined;
111
- meta?: {
112
- path: string;
113
- timestamp: string;
114
- pagination?: {
115
- page: number;
116
- limit: number;
117
- total: number;
118
- totalPages: number;
119
- } | undefined;
120
- } | undefined;
121
- }, {
122
- success: boolean;
123
- data?: unknown;
124
- error?: {
125
- code: string;
126
- message: string;
127
- details?: unknown;
128
- } | undefined;
129
- meta?: {
130
- path: string;
131
- timestamp: string;
132
- pagination?: {
133
- page: number;
134
- limit: number;
135
- total: number;
136
- totalPages: number;
137
- } | undefined;
138
- } | undefined;
139
- }>;
42
+ }, z.core.$strip>>;
43
+ }, z.core.$strip>;
140
44
  export type ApiResponse<T = unknown> = {
141
45
  success: boolean;
142
46
  data?: T;
@@ -154,43 +58,15 @@ export type ApiResponse<T = unknown> = {
154
58
  export declare const SuccessResponseSchema: z.ZodObject<{
155
59
  success: z.ZodLiteral<true>;
156
60
  message: z.ZodOptional<z.ZodString>;
157
- }, "strip", z.ZodTypeAny, {
158
- success: true;
159
- message?: string | undefined;
160
- }, {
161
- success: true;
162
- message?: string | undefined;
163
- }>;
61
+ }, z.core.$strip>;
164
62
  export declare const ErrorResponseSchema: z.ZodObject<{
165
63
  success: z.ZodLiteral<false>;
166
64
  error: z.ZodObject<{
167
65
  code: z.ZodString;
168
66
  message: z.ZodString;
169
67
  details: z.ZodOptional<z.ZodUnknown>;
170
- }, "strip", z.ZodTypeAny, {
171
- code: string;
172
- message: string;
173
- details?: unknown;
174
- }, {
175
- code: string;
176
- message: string;
177
- details?: unknown;
178
- }>;
179
- }, "strip", z.ZodTypeAny, {
180
- success: false;
181
- error: {
182
- code: string;
183
- message: string;
184
- details?: unknown;
185
- };
186
- }, {
187
- success: false;
188
- error: {
189
- code: string;
190
- message: string;
191
- details?: unknown;
192
- };
193
- }>;
68
+ }, z.core.$strip>;
69
+ }, z.core.$strip>;
194
70
  export type SuccessResponse = z.infer<typeof SuccessResponseSchema>;
195
71
  export type ErrorResponse = z.infer<typeof ErrorResponseSchema>;
196
72
  /**
@@ -1 +1 @@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AAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;iBAO9B,CAAC;AAMH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAMrC"}
package/dist/index.js CHANGED
@@ -790,8 +790,8 @@ var TaskSchema = BaseEntitySchema.extend({
790
790
  parentId: import_zod12.z.string().uuid().nullable().optional(),
791
791
  dueDate: import_zod12.z.union([import_zod12.z.date(), import_zod12.z.number()]).nullable().optional(),
792
792
  acceptanceChecklist: import_zod12.z.array(AcceptanceItemSchema).default([]),
793
- comments: import_zod12.z.array(CommentSchema).default([]),
794
- activityLog: import_zod12.z.array(EventSchema).default([]),
793
+ comments: import_zod12.z.array(CommentSchema).optional(),
794
+ activityLog: import_zod12.z.array(EventSchema).optional(),
795
795
  docs: import_zod12.z.array(DocSchema).default([])
796
796
  });
797
797
  var CreateTaskSchema = import_zod12.z.object({