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