@esb-market-contracts/admin-backend 1.2.7 → 1.2.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 (3) hide show
  1. package/api.d.ts +3 -3
  2. package/package.json +1 -1
  3. package/types.d.ts +3 -11
package/api.d.ts CHANGED
@@ -4,7 +4,7 @@ declare const authenticationRouter: import("hono/hono-base").HonoBase<import("ho
4
4
  "/iam/authentication/session": {
5
5
  $get: {
6
6
  input: {};
7
- output: import("@esb-market-contracts/core").APIError | import("@esb-market-contracts/core").APISuccess<{
7
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
8
8
  session: {
9
9
  expiresAt: string;
10
10
  user: {
@@ -30,7 +30,7 @@ declare const authenticationRouter: import("hono/hono-base").HonoBase<import("ho
30
30
  password: string;
31
31
  };
32
32
  };
33
- output: import("@esb-market-contracts/core").APIError | import("@esb-market-contracts/core").APISuccess<{
33
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
34
34
  [x: string]: never;
35
35
  }>;
36
36
  outputFormat: "json";
@@ -41,7 +41,7 @@ declare const authenticationRouter: import("hono/hono-base").HonoBase<import("ho
41
41
  "/iam/authentication/logout": {
42
42
  $post: {
43
43
  input: {};
44
- output: import("@esb-market-contracts/core").APIError | import("@esb-market-contracts/core").APISuccess<{
44
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
45
45
  [x: string]: never;
46
46
  }>;
47
47
  outputFormat: "json";
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.2.7",
4
+ "version": "1.2.9",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
+ import { SerializeDates } from '@kalutskii/foundation';
3
4
  import { z } from 'zod';
4
5
 
5
6
  declare const AuthenticationLoginSchema: z.ZodObject<{
@@ -29,19 +30,10 @@ declare const AuthenticationSessionSchema: z.ZodObject<{
29
30
  in: {};
30
31
  }>;
31
32
  export type AuthenticationSession = z.infer<typeof AuthenticationSessionSchema>;
32
- /**
33
- * Type utility that recursively transforms all Date fields to string, as well as handling arrays and objects.
34
- * This is necessary for proper typing when working with RPC, as JSON does not support the Date type directly.
35
- * Example: SerializeDates<{ createdAt: Date; nested: { updatedAt: Date }; tags: Date[] }> \
36
- * = { createdAt: string; nested: { updatedAt: string }; tags: string[] }
37
- */
38
- export type SerializeDates<T> = T extends Date ? string : T extends (infer U)[] ? SerializeDates<U>[] : T extends readonly (infer U)[] ? readonly SerializeDates<U>[] : T extends object ? {
39
- [K in keyof T]: SerializeDates<T[K]>;
40
- } : T;
41
33
  export type AuthenticationLoginRequest = AuthenticationLogin;
42
34
  export type AuthenticationSessionRequest = Record<string, never>;
43
- export type AuthenticationClientSession = SerializeDates<AuthenticationSession>;
44
- export type AuthenticationSessionResponse = AuthenticationClientSession;
35
+ export type AuthenticationSessionResponse = SerializeDates<AuthenticationSession>;
36
+ export type AuthenticationClientSession = AuthenticationSession;
45
37
  export type AuthenticationLogoutRequest = Record<string, never>;
46
38
  export type AuthenticationLogoutResponse = Record<string, never>;
47
39