@esb-market-contracts/admin-backend 1.8.29 → 1.8.32

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 (3) hide show
  1. package/api.d.ts +21 -11
  2. package/package.json +1 -1
  3. package/types.d.ts +27 -7
package/api.d.ts CHANGED
@@ -41,14 +41,14 @@ export type AuthRouter = typeof authRouter;
41
41
  declare const sessionPayloadSchema: z.ZodObject<{
42
42
  employee: z.ZodObject<{
43
43
  id: z.ZodInt;
44
+ email: z.ZodString;
45
+ fullName: z.ZodString;
44
46
  status: z.ZodEnum<{
45
47
  active: "active";
46
48
  suspended: "suspended";
47
49
  }>;
48
50
  updatedAt: z.ZodNullable<z.ZodDate>;
49
51
  createdAt: z.ZodDate;
50
- email: z.ZodString;
51
- fullName: z.ZodString;
52
52
  grants: z.ZodArray<z.ZodEnum<{
53
53
  "employee.create": "employee.create";
54
54
  "employee.read": "employee.read";
@@ -109,11 +109,11 @@ declare const managementRouter: import("hono/hono-base").HonoBase<{
109
109
  output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
110
110
  employees: {
111
111
  id: number;
112
+ email: string;
113
+ fullName: string;
112
114
  status: "active" | "suspended";
113
115
  updatedAt: Date | null;
114
116
  createdAt: Date;
115
- email: string;
116
- fullName: string;
117
117
  grants: ("employee.create" | "employee.read" | "employee.update" | "inventory.create" | "inventory.read" | "inventory.update" | "inventory.write_off")[];
118
118
  }[];
119
119
  }>;
@@ -220,10 +220,10 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
220
220
  offset?: unknown;
221
221
  limit?: unknown;
222
222
  };
223
- query?: string | undefined;
224
223
  where?: {
225
224
  status?: "active" | "written_off" | undefined;
226
225
  } | undefined;
226
+ query?: string | undefined;
227
227
  };
228
228
  };
229
229
  output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
@@ -249,10 +249,10 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
249
249
  $post: {
250
250
  input: {
251
251
  json: {
252
- name: string;
253
- serialNumber: string | null;
254
- notes: string | null;
255
252
  assetId: number;
253
+ name?: string | undefined;
254
+ serialNumber?: string | null | undefined;
255
+ notes?: string | null | undefined;
256
256
  };
257
257
  };
258
258
  output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
@@ -278,9 +278,19 @@ declare const assetsRouter: import("hono/hono-base").HonoBase<{
278
278
  $post: {
279
279
  input: {
280
280
  json: {
281
- assets: {
282
- assetId: number;
283
- }[];
281
+ selection: {
282
+ mode: "include";
283
+ identifiers: number[];
284
+ } | {
285
+ mode: "exclude";
286
+ excludedIdentifiers: number[];
287
+ };
288
+ filter: {
289
+ where?: {
290
+ status?: "active" | "written_off" | undefined;
291
+ } | undefined;
292
+ query?: string | undefined;
293
+ };
284
294
  };
285
295
  };
286
296
  output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@esb-market-contracts/admin-backend",
3
3
  "description": "Shared TypeScript contract definitions for admin-backend.",
4
- "version": "1.8.29",
4
+ "version": "1.8.32",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -127,7 +127,6 @@ declare const assetSchema: z.ZodObject<{
127
127
  }, z.core.$strip>;
128
128
  export type Asset = z.infer<typeof assetSchema>;
129
129
  declare const assetSearchOptionsSchema: z.ZodObject<{
130
- query: z.ZodOptional<z.ZodString>;
131
130
  where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
132
131
  status: z.ZodOptional<z.ZodEnum<{
133
132
  active: "active";
@@ -138,6 +137,7 @@ declare const assetSearchOptionsSchema: z.ZodObject<{
138
137
  }, {
139
138
  status?: "active" | "written_off" | undefined;
140
139
  }>>>;
140
+ query: z.ZodOptional<z.ZodString>;
141
141
  pagination: z.ZodObject<{
142
142
  offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
143
143
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -162,18 +162,38 @@ declare const assetCreatePayloadSchema: z.ZodObject<{
162
162
  notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
163
163
  }, z.core.$strict>;
164
164
  declare const assetUpdatePayloadSchema: z.ZodObject<{
165
- name: z.ZodString;
166
- serialNumber: z.ZodNullable<z.ZodString>;
167
- notes: z.ZodNullable<z.ZodString>;
165
+ name: z.ZodOptional<z.ZodString>;
166
+ serialNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
167
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
168
168
  assetId: z.ZodInt;
169
169
  }, z.core.$strict>;
170
170
  declare const assetWriteOffPayloadSchema: z.ZodObject<{
171
171
  assetId: z.ZodInt;
172
172
  }, z.core.$strict>;
173
173
  declare const assetBulkWriteOffPayloadSchema: z.ZodObject<{
174
- assets: z.ZodArray<z.ZodObject<{
175
- assetId: z.ZodInt;
176
- }, z.core.$strict>>;
174
+ selection: z.ZodDiscriminatedUnion<[
175
+ z.ZodObject<{
176
+ mode: z.ZodLiteral<"include">;
177
+ identifiers: z.ZodArray<z.ZodInt>;
178
+ }, z.core.$strict>,
179
+ z.ZodObject<{
180
+ mode: z.ZodLiteral<"exclude">;
181
+ excludedIdentifiers: z.ZodArray<z.ZodInt>;
182
+ }, z.core.$strict>
183
+ ], "mode">;
184
+ filter: z.ZodObject<{
185
+ where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
186
+ status: z.ZodOptional<z.ZodEnum<{
187
+ active: "active";
188
+ written_off: "written_off";
189
+ }>>;
190
+ }, z.core.$strip>, z.ZodTransform<{
191
+ status: "active" | "written_off";
192
+ }, {
193
+ status?: "active" | "written_off" | undefined;
194
+ }>>>;
195
+ query: z.ZodOptional<z.ZodString>;
196
+ }, z.core.$strict>;
177
197
  }, z.core.$strict>;
178
198
  export type AssetSearchOptions = z.infer<typeof assetSearchOptionsSchema>;
179
199
  export type AssetSelectOneQuery = z.infer<typeof assetSelectOneQuerySchema>;