@esb-market-contracts/backend 1.0.2 → 1.0.4

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 +11 -15
  2. package/package.json +1 -1
  3. package/types.d.ts +11 -14
package/api.d.ts CHANGED
@@ -22,11 +22,10 @@ declare const categoriesRouter: import("hono/hono-base").HonoBase<{
22
22
  output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
23
23
  category: {
24
24
  id: number;
25
- parentId: number | null;
26
25
  slug: string;
26
+ parentId: number | null;
27
27
  status: "active" | "archived";
28
28
  name: Partial<Record<"ka" | "en" | "ru", string>>;
29
- logotypeImageSource: string;
30
29
  updatedAt: Date | null;
31
30
  createdAt: Date;
32
31
  };
@@ -39,11 +38,10 @@ declare const categoriesRouter: import("hono/hono-base").HonoBase<{
39
38
  "/catalog/categories/create": {
40
39
  $post: {
41
40
  input: {
42
- form: {
43
- slug: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
44
- name: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
45
- logotype: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
46
- parentId?: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined;
41
+ json: {
42
+ name: Partial<Record<"ka" | "en" | "ru", string>>;
43
+ slug: string;
44
+ parentId?: number | null | undefined;
47
45
  };
48
46
  };
49
47
  output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
@@ -70,11 +68,10 @@ declare const categoriesRouter: import("hono/hono-base").HonoBase<{
70
68
  output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
71
69
  categories: {
72
70
  id: number;
73
- parentId: number | null;
74
71
  slug: string;
72
+ parentId: number | null;
75
73
  status: "active" | "archived";
76
74
  name: Partial<Record<"ka" | "en" | "ru", string>>;
77
- logotypeImageSource: string;
78
75
  updatedAt: Date | null;
79
76
  createdAt: Date;
80
77
  }[];
@@ -88,12 +85,11 @@ declare const categoriesRouter: import("hono/hono-base").HonoBase<{
88
85
  "/catalog/categories/update-metadata": {
89
86
  $post: {
90
87
  input: {
91
- form: {
92
- slug: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
93
- name: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
94
- categoryId: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
95
- parentId?: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined;
96
- logotype?: import("zod/v4/core").File | undefined;
88
+ json: {
89
+ name: Partial<Record<"ka" | "en" | "ru", string>>;
90
+ slug: string;
91
+ categoryId: number;
92
+ parentId?: number | null | undefined;
97
93
  };
98
94
  };
99
95
  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/backend",
3
3
  "description": "Shared TypeScript contract definitions for backend.",
4
- "version": "1.0.2",
4
+ "version": "1.0.4",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -4,8 +4,8 @@ import { z } from 'zod';
4
4
 
5
5
  declare const categorySchema: z.ZodObject<{
6
6
  id: z.ZodInt;
7
- parentId: z.ZodNullable<z.ZodInt>;
8
7
  slug: z.ZodString;
8
+ parentId: z.ZodNullable<z.ZodInt>;
9
9
  status: z.ZodEnum<{
10
10
  active: "active";
11
11
  archived: "archived";
@@ -15,7 +15,6 @@ declare const categorySchema: z.ZodObject<{
15
15
  en: "en";
16
16
  ru: "ru";
17
17
  }> & z.core.$partial, z.ZodString>;
18
- logotypeImageSource: z.ZodString;
19
18
  updatedAt: z.ZodNullable<z.ZodDate>;
20
19
  createdAt: z.ZodDate;
21
20
  }, z.core.$strip>;
@@ -57,25 +56,23 @@ declare const categorySelectOneQuerySchema: z.ZodPipe<z.ZodObject<{
57
56
  slug?: string | undefined;
58
57
  }>>;
59
58
  declare const categoryCreatePayloadSchema: z.ZodObject<{
60
- slug: z.ZodString;
61
- name: z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
59
+ name: z.ZodRecord<z.ZodEnum<{
62
60
  ka: "ka";
63
61
  en: "en";
64
62
  ru: "ru";
65
- }> & z.core.$partial, z.ZodString>>;
66
- parentId: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>>>>;
67
- logotype: z.ZodFile;
63
+ }> & z.core.$partial, z.ZodString>;
64
+ slug: z.ZodString;
65
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
68
66
  }, z.core.$strict>;
69
67
  declare const categoryUpdatePayloadSchema: z.ZodObject<{
70
- slug: z.ZodString;
71
- name: z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
68
+ name: z.ZodRecord<z.ZodEnum<{
72
69
  ka: "ka";
73
70
  en: "en";
74
71
  ru: "ru";
75
- }> & z.core.$partial, z.ZodString>>;
76
- parentId: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>>>>;
77
- logotype: z.ZodOptional<z.ZodFile>;
78
- categoryId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
72
+ }> & z.core.$partial, z.ZodString>;
73
+ slug: z.ZodString;
74
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
75
+ categoryId: z.ZodInt;
79
76
  }, z.core.$strict>;
80
77
  declare const categorySwitchStatusPayloadSchema: z.ZodObject<{
81
78
  categoryId: z.ZodInt;
@@ -85,11 +82,11 @@ declare const categorySwitchStatusPayloadSchema: z.ZodObject<{
85
82
  }>;
86
83
  }, z.core.$strict>;
87
84
  export type CategorySearchOptions = z.infer<typeof categorySearchOptionsSchema>;
88
- export type CategorySelectOneQuery = z.infer<typeof categorySelectOneQuerySchema>;
89
85
  export type CategorySearchResult = {
90
86
  categories: Category[];
91
87
  total: number;
92
88
  };
89
+ export type CategorySelectOneQuery = z.infer<typeof categorySelectOneQuerySchema>;
93
90
  export type CategoryCreatePayload = z.infer<typeof categoryCreatePayloadSchema>;
94
91
  export type CategoryUpdatePayload = z.infer<typeof categoryUpdatePayloadSchema>;
95
92
  export type CategorySwitchStatusPayload = z.infer<typeof categorySwitchStatusPayloadSchema>;