@esb-market-contracts/backend 1.0.10 → 1.0.11

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 +18 -27
  2. package/package.json +1 -1
  3. package/types.d.ts +25 -26
package/api.d.ts CHANGED
@@ -24,6 +24,7 @@ declare const brandsRouter: import("hono/hono-base").HonoBase<{
24
24
  id: number;
25
25
  slug: string;
26
26
  name: Partial<Record<"ka" | "en" | "ru", string>>;
27
+ notes: string | null;
27
28
  logotypeUrl: string;
28
29
  countryId: number;
29
30
  updatedAt: Date | null;
@@ -43,6 +44,7 @@ declare const brandsRouter: import("hono/hono-base").HonoBase<{
43
44
  name: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
44
45
  countryId: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
45
46
  logotype: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
47
+ notes?: string | null | undefined;
46
48
  };
47
49
  };
48
50
  output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
@@ -70,6 +72,7 @@ declare const brandsRouter: import("hono/hono-base").HonoBase<{
70
72
  id: number;
71
73
  slug: string;
72
74
  name: Partial<Record<"ka" | "en" | "ru", string>>;
75
+ notes: string | null;
73
76
  logotypeUrl: string;
74
77
  countryId: number;
75
78
  updatedAt: Date | null;
@@ -82,14 +85,15 @@ declare const brandsRouter: import("hono/hono-base").HonoBase<{
82
85
  };
83
86
  };
84
87
  } & {
85
- "/catalog/brands/update-metadata": {
88
+ "/catalog/brands/update": {
86
89
  $post: {
87
90
  input: {
88
91
  form: {
89
- slug: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
90
- name: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
91
- countryId: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
92
92
  brandId: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
93
+ slug?: string | undefined;
94
+ notes?: string | null | undefined;
95
+ name?: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined;
96
+ countryId?: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined;
93
97
  logotype?: import("zod/v4/core").File | undefined;
94
98
  };
95
99
  };
@@ -98,7 +102,7 @@ declare const brandsRouter: import("hono/hono-base").HonoBase<{
98
102
  status: 200;
99
103
  };
100
104
  };
101
- }, "/catalog/brands", "/catalog/brands/update-metadata">;
105
+ }, "/catalog/brands", "/catalog/brands/update">;
102
106
  export type BrandsRouter = typeof brandsRouter;
103
107
  declare const categoriesRouter: import("hono/hono-base").HonoBase<{
104
108
  Variables: VariablesWithActor;
@@ -177,14 +181,15 @@ declare const categoriesRouter: import("hono/hono-base").HonoBase<{
177
181
  };
178
182
  };
179
183
  } & {
180
- "/catalog/categories/update-metadata": {
184
+ "/catalog/categories/update": {
181
185
  $post: {
182
186
  input: {
183
187
  json: {
184
- name: Partial<Record<"ka" | "en" | "ru", string>>;
185
- slug: string;
186
188
  categoryId: number;
189
+ name?: Partial<Record<"ka" | "en" | "ru", string>> | undefined;
190
+ slug?: string | undefined;
187
191
  parentId?: number | null | undefined;
192
+ status?: "active" | "archived" | undefined;
188
193
  };
189
194
  };
190
195
  output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
@@ -192,21 +197,7 @@ declare const categoriesRouter: import("hono/hono-base").HonoBase<{
192
197
  status: 200;
193
198
  };
194
199
  };
195
- } & {
196
- "/catalog/categories/switch-status": {
197
- $post: {
198
- input: {
199
- json: {
200
- categoryId: number;
201
- status: "active" | "archived";
202
- };
203
- };
204
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
205
- outputFormat: "json";
206
- status: 200;
207
- };
208
- };
209
- }, "/catalog/categories", "/catalog/categories/switch-status">;
200
+ }, "/catalog/categories", "/catalog/categories/update">;
210
201
  export type CategoriesRouter = typeof categoriesRouter;
211
202
  declare const countriesRouter: import("hono/hono-base").HonoBase<{
212
203
  Variables: VariablesWithActor;
@@ -278,13 +269,13 @@ declare const countriesRouter: import("hono/hono-base").HonoBase<{
278
269
  };
279
270
  };
280
271
  } & {
281
- "/catalog/countries/update-metadata": {
272
+ "/catalog/countries/update": {
282
273
  $post: {
283
274
  input: {
284
275
  form: {
285
- code: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
286
- name: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
287
276
  countryId: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
277
+ code?: string | undefined;
278
+ name?: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined;
288
279
  flagImage?: import("zod/v4/core").File | undefined;
289
280
  };
290
281
  };
@@ -293,7 +284,7 @@ declare const countriesRouter: import("hono/hono-base").HonoBase<{
293
284
  status: 200;
294
285
  };
295
286
  };
296
- }, "/catalog/countries", "/catalog/countries/update-metadata">;
287
+ }, "/catalog/countries", "/catalog/countries/update">;
297
288
  export type CountriesRouter = typeof countriesRouter;
298
289
 
299
290
  export {};
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.10",
4
+ "version": "1.0.11",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -10,6 +10,7 @@ declare const brandSchema: z.ZodObject<{
10
10
  en: "en";
11
11
  ru: "ru";
12
12
  }> & z.core.$partial, z.ZodString>;
13
+ notes: z.ZodNullable<z.ZodString>;
13
14
  logotypeUrl: z.ZodString;
14
15
  countryId: z.ZodInt;
15
16
  updatedAt: z.ZodNullable<z.ZodDate>;
@@ -33,7 +34,7 @@ declare const brandSearchOptionsSchema: z.ZodObject<{
33
34
  declare const brandSelectOneQuerySchema: z.ZodPipe<z.ZodObject<{
34
35
  id: z.ZodOptional<z.ZodInt>;
35
36
  slug: z.ZodOptional<z.ZodString>;
36
- }, z.core.$strict>, z.ZodTransform<{
37
+ }, z.core.$strip>, z.ZodTransform<{
37
38
  id: number;
38
39
  slug?: string | undefined;
39
40
  } | {
@@ -45,6 +46,7 @@ declare const brandSelectOneQuerySchema: z.ZodPipe<z.ZodObject<{
45
46
  }>>;
46
47
  declare const brandCreatePayloadSchema: z.ZodObject<{
47
48
  slug: z.ZodString;
49
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
50
  name: z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
49
51
  ka: "ka";
50
52
  en: "en";
@@ -52,18 +54,19 @@ declare const brandCreatePayloadSchema: z.ZodObject<{
52
54
  }> & z.core.$partial, z.ZodString>>;
53
55
  countryId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
54
56
  logotype: z.ZodFile;
55
- }, z.core.$strict>;
57
+ }, z.core.$strip>;
56
58
  declare const brandUpdatePayloadSchema: z.ZodObject<{
57
- slug: z.ZodString;
58
- name: z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
59
+ slug: z.ZodOptional<z.ZodString>;
60
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
+ name: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
59
62
  ka: "ka";
60
63
  en: "en";
61
64
  ru: "ru";
62
- }> & z.core.$partial, z.ZodString>>;
63
- countryId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
65
+ }> & z.core.$partial, z.ZodString>>>;
66
+ countryId: z.ZodOptional<z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>>;
64
67
  logotype: z.ZodOptional<z.ZodFile>;
65
68
  brandId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
66
- }, z.core.$strict>;
69
+ }, z.core.$strip>;
67
70
  export type BrandSearchOptions = z.infer<typeof brandSearchOptionsSchema>;
68
71
  export type BrandSearchResult = {
69
72
  brands: Brand[];
@@ -115,7 +118,7 @@ declare const categorySearchOptionsSchema: z.ZodObject<{
115
118
  declare const categorySelectOneQuerySchema: z.ZodPipe<z.ZodObject<{
116
119
  id: z.ZodOptional<z.ZodInt>;
117
120
  slug: z.ZodOptional<z.ZodString>;
118
- }, z.core.$strict>, z.ZodTransform<{
121
+ }, z.core.$strip>, z.ZodTransform<{
119
122
  id: number;
120
123
  slug?: string | undefined;
121
124
  } | {
@@ -133,24 +136,21 @@ declare const categoryCreatePayloadSchema: z.ZodObject<{
133
136
  }> & z.core.$partial, z.ZodString>;
134
137
  slug: z.ZodString;
135
138
  parentId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
136
- }, z.core.$strict>;
139
+ }, z.core.$strip>;
137
140
  declare const categoryUpdatePayloadSchema: z.ZodObject<{
138
- name: z.ZodRecord<z.ZodEnum<{
141
+ name: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
139
142
  ka: "ka";
140
143
  en: "en";
141
144
  ru: "ru";
142
- }> & z.core.$partial, z.ZodString>;
143
- slug: z.ZodString;
145
+ }> & z.core.$partial, z.ZodString>>;
146
+ slug: z.ZodOptional<z.ZodString>;
144
147
  parentId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
145
- categoryId: z.ZodInt;
146
- }, z.core.$strict>;
147
- declare const categorySwitchStatusPayloadSchema: z.ZodObject<{
148
- categoryId: z.ZodInt;
149
- status: z.ZodEnum<{
148
+ status: z.ZodOptional<z.ZodEnum<{
150
149
  active: "active";
151
150
  archived: "archived";
152
- }>;
153
- }, z.core.$strict>;
151
+ }>>;
152
+ categoryId: z.ZodInt;
153
+ }, z.core.$strip>;
154
154
  export type CategorySearchOptions = z.infer<typeof categorySearchOptionsSchema>;
155
155
  export type CategorySearchResult = {
156
156
  categories: Category[];
@@ -159,7 +159,6 @@ export type CategorySearchResult = {
159
159
  export type CategorySelectOneQuery = z.infer<typeof categorySelectOneQuerySchema>;
160
160
  export type CategoryCreatePayload = z.infer<typeof categoryCreatePayloadSchema>;
161
161
  export type CategoryUpdatePayload = z.infer<typeof categoryUpdatePayloadSchema>;
162
- export type CategorySwitchStatusPayload = z.infer<typeof categorySwitchStatusPayloadSchema>;
163
162
  declare const countrySchema: z.ZodObject<{
164
163
  id: z.ZodInt;
165
164
  code: z.ZodString;
@@ -189,7 +188,7 @@ declare const countrySearchOptionsSchema: z.ZodObject<{
189
188
  }, z.core.$strict>;
190
189
  declare const countrySelectOneQuerySchema: z.ZodObject<{
191
190
  id: z.ZodInt;
192
- }, z.core.$strict>;
191
+ }, z.core.$strip>;
193
192
  declare const countryCreatePayloadSchema: z.ZodObject<{
194
193
  code: z.ZodString;
195
194
  name: z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
@@ -198,17 +197,17 @@ declare const countryCreatePayloadSchema: z.ZodObject<{
198
197
  ru: "ru";
199
198
  }> & z.core.$partial, z.ZodString>>;
200
199
  flagImage: z.ZodFile;
201
- }, z.core.$strict>;
200
+ }, z.core.$strip>;
202
201
  declare const countryUpdatePayloadSchema: z.ZodObject<{
203
- code: z.ZodString;
204
- name: z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
202
+ code: z.ZodOptional<z.ZodString>;
203
+ name: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
205
204
  ka: "ka";
206
205
  en: "en";
207
206
  ru: "ru";
208
- }> & z.core.$partial, z.ZodString>>;
207
+ }> & z.core.$partial, z.ZodString>>>;
209
208
  flagImage: z.ZodOptional<z.ZodFile>;
210
209
  countryId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
211
- }, z.core.$strict>;
210
+ }, z.core.$strip>;
212
211
  export type CountrySearchOptions = z.infer<typeof countrySearchOptionsSchema>;
213
212
  export type CountrySearchResult = {
214
213
  countries: Country[];