@esb-market-contracts/admin-backend 1.8.5 → 1.8.7

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 +54 -0
  2. package/package.json +1 -1
  3. package/types.d.ts +27 -0
package/api.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
+ import { z } from 'zod';
4
+
3
5
  declare const authRouter: import("hono/hono-base").HonoBase<{}, {
4
6
  "/iam/authentication/signin": {
5
7
  $post: {
@@ -40,5 +42,57 @@ declare const authRouter: import("hono/hono-base").HonoBase<{}, {
40
42
  };
41
43
  }, "/iam/authentication", "/iam/authentication/logout">;
42
44
  export type AuthRouter = typeof authRouter;
45
+ declare const sessionPayloadSchema: z.ZodObject<{
46
+ employee: z.ZodObject<{
47
+ id: z.ZodInt;
48
+ email: z.ZodString;
49
+ fullName: z.ZodString;
50
+ status: z.ZodEnum<{
51
+ active: "active";
52
+ suspended: "suspended";
53
+ }>;
54
+ updatedAt: z.ZodNullable<z.ZodDate>;
55
+ createdAt: z.ZodDate;
56
+ grants: z.ZodArray<z.ZodEnum<{
57
+ "employee.create": "employee.create";
58
+ "employee.read": "employee.read";
59
+ "employee.update": "employee.update";
60
+ }>>;
61
+ }, {
62
+ out: {};
63
+ in: {};
64
+ }>;
65
+ }, z.core.$strip>;
66
+ export type SessionPayload = z.infer<typeof sessionPayloadSchema>;
67
+ export type VariablesWithActor = {
68
+ actorSession: SessionPayload;
69
+ };
70
+ declare const managementRouter: import("hono/hono-base").HonoBase<{
71
+ Variables: VariablesWithActor;
72
+ }, {
73
+ "/iam/management/employees/many": {
74
+ $get: {
75
+ input: {
76
+ query: {
77
+ status?: "active" | "suspended" | undefined;
78
+ };
79
+ };
80
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
81
+ employees: {
82
+ id: string;
83
+ email: string;
84
+ fullName: string;
85
+ status: string;
86
+ updatedAt: string | null;
87
+ createdAt: string;
88
+ grants: string[];
89
+ }[];
90
+ }>;
91
+ outputFormat: "json";
92
+ status: 200;
93
+ };
94
+ };
95
+ }, "/iam/management", "/iam/management/employees/many">;
96
+ export type ManagementRouter = typeof managementRouter;
43
97
 
44
98
  export {};
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.5",
4
+ "version": "1.8.7",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -29,5 +29,32 @@ declare const sessionPayloadSchema: z.ZodObject<{
29
29
  }, z.core.$strip>;
30
30
  export type SigninPayload = z.infer<typeof signinPayloadSchema>;
31
31
  export type SessionPayload = z.infer<typeof sessionPayloadSchema>;
32
+ declare const employeeSafeSchema: z.ZodObject<{
33
+ id: z.ZodInt;
34
+ email: z.ZodString;
35
+ fullName: z.ZodString;
36
+ status: z.ZodEnum<{
37
+ active: "active";
38
+ suspended: "suspended";
39
+ }>;
40
+ updatedAt: z.ZodNullable<z.ZodDate>;
41
+ createdAt: z.ZodDate;
42
+ grants: z.ZodArray<z.ZodEnum<{
43
+ "employee.create": "employee.create";
44
+ "employee.read": "employee.read";
45
+ "employee.update": "employee.update";
46
+ }>>;
47
+ }, {
48
+ out: {};
49
+ in: {};
50
+ }>;
51
+ declare const employeeListQuerySchema: z.ZodObject<{
52
+ status: z.ZodOptional<z.ZodEnum<{
53
+ active: "active";
54
+ suspended: "suspended";
55
+ }>>;
56
+ }, z.core.$strict>;
57
+ export type EmployeeSafe = z.infer<typeof employeeSafeSchema>;
58
+ export type EmployeeListQuery = z.infer<typeof employeeListQuerySchema>;
32
59
 
33
60
  export {};