@esb-market-contracts/backend 1.0.2 → 1.0.5
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.
- package/api.d.ts +94 -15
- package/package.json +1 -1
- package/types.d.ts +66 -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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
categoryId:
|
|
95
|
-
parentId?:
|
|
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>>;
|
|
@@ -117,5 +113,88 @@ declare const categoriesRouter: import("hono/hono-base").HonoBase<{
|
|
|
117
113
|
};
|
|
118
114
|
}, "/catalog/categories", "/catalog/categories/switch-status">;
|
|
119
115
|
export type CategoriesRouter = typeof categoriesRouter;
|
|
116
|
+
declare const countriesRouter: import("hono/hono-base").HonoBase<{
|
|
117
|
+
Variables: VariablesWithActor;
|
|
118
|
+
}, {
|
|
119
|
+
"/catalog/countries/one": {
|
|
120
|
+
$get: {
|
|
121
|
+
input: {
|
|
122
|
+
query: {
|
|
123
|
+
id: string | string[];
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
127
|
+
country: {
|
|
128
|
+
id: number;
|
|
129
|
+
code: string;
|
|
130
|
+
name: Partial<Record<"ka" | "en" | "ru", string>>;
|
|
131
|
+
flagImageUrl: string;
|
|
132
|
+
};
|
|
133
|
+
}>;
|
|
134
|
+
outputFormat: "json";
|
|
135
|
+
status: 200;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
} & {
|
|
139
|
+
"/catalog/countries/create": {
|
|
140
|
+
$post: {
|
|
141
|
+
input: {
|
|
142
|
+
json: {
|
|
143
|
+
code: string;
|
|
144
|
+
name: Partial<Record<"ka" | "en" | "ru", string>>;
|
|
145
|
+
flagImageUrl: string;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
149
|
+
outputFormat: "json";
|
|
150
|
+
status: 201;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
} & {
|
|
154
|
+
"/catalog/countries/search": {
|
|
155
|
+
$post: {
|
|
156
|
+
input: {
|
|
157
|
+
json: {
|
|
158
|
+
pagination: {
|
|
159
|
+
offset?: unknown;
|
|
160
|
+
limit?: unknown;
|
|
161
|
+
};
|
|
162
|
+
where?: {
|
|
163
|
+
code?: string | undefined;
|
|
164
|
+
} | undefined;
|
|
165
|
+
query?: string | undefined;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
169
|
+
countries: {
|
|
170
|
+
id: number;
|
|
171
|
+
code: string;
|
|
172
|
+
name: Partial<Record<"ka" | "en" | "ru", string>>;
|
|
173
|
+
flagImageUrl: string;
|
|
174
|
+
}[];
|
|
175
|
+
total: number;
|
|
176
|
+
}>;
|
|
177
|
+
outputFormat: "json";
|
|
178
|
+
status: 200;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
} & {
|
|
182
|
+
"/catalog/countries/update-metadata": {
|
|
183
|
+
$post: {
|
|
184
|
+
input: {
|
|
185
|
+
json: {
|
|
186
|
+
code: string;
|
|
187
|
+
name: Partial<Record<"ka" | "en" | "ru", string>>;
|
|
188
|
+
flagImageUrl: string;
|
|
189
|
+
countryId: number;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
193
|
+
outputFormat: "json";
|
|
194
|
+
status: 200;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
}, "/catalog/countries", "/catalog/countries/update-metadata">;
|
|
198
|
+
export type CountriesRouter = typeof countriesRouter;
|
|
120
199
|
|
|
121
200
|
export {};
|
package/package.json
CHANGED
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
|
-
|
|
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
|
-
|
|
67
|
-
|
|
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
|
-
|
|
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
|
-
|
|
77
|
-
|
|
78
|
-
categoryId: z.
|
|
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,13 +82,68 @@ 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>;
|
|
93
|
+
declare const countrySchema: z.ZodObject<{
|
|
94
|
+
id: z.ZodInt;
|
|
95
|
+
code: z.ZodString;
|
|
96
|
+
name: z.ZodRecord<z.ZodEnum<{
|
|
97
|
+
ka: "ka";
|
|
98
|
+
en: "en";
|
|
99
|
+
ru: "ru";
|
|
100
|
+
}> & z.core.$partial, z.ZodString>;
|
|
101
|
+
flagImageUrl: z.ZodString;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export type Country = z.infer<typeof countrySchema>;
|
|
104
|
+
declare const countrySearchOptionsSchema: z.ZodObject<{
|
|
105
|
+
where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
106
|
+
code: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
108
|
+
code: string;
|
|
109
|
+
}, {
|
|
110
|
+
code?: string | undefined;
|
|
111
|
+
}>>>;
|
|
112
|
+
query: z.ZodOptional<z.ZodString>;
|
|
113
|
+
pagination: z.ZodObject<{
|
|
114
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
115
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
}, z.core.$strict>;
|
|
118
|
+
declare const countrySelectOneQuerySchema: z.ZodObject<{
|
|
119
|
+
id: z.ZodInt;
|
|
120
|
+
}, z.core.$strict>;
|
|
121
|
+
declare const countryCreatePayloadSchema: z.ZodObject<{
|
|
122
|
+
code: z.ZodString;
|
|
123
|
+
name: z.ZodRecord<z.ZodEnum<{
|
|
124
|
+
ka: "ka";
|
|
125
|
+
en: "en";
|
|
126
|
+
ru: "ru";
|
|
127
|
+
}> & z.core.$partial, z.ZodString>;
|
|
128
|
+
flagImageUrl: z.ZodString;
|
|
129
|
+
}, z.core.$strict>;
|
|
130
|
+
declare const countryUpdatePayloadSchema: z.ZodObject<{
|
|
131
|
+
code: z.ZodString;
|
|
132
|
+
name: z.ZodRecord<z.ZodEnum<{
|
|
133
|
+
ka: "ka";
|
|
134
|
+
en: "en";
|
|
135
|
+
ru: "ru";
|
|
136
|
+
}> & z.core.$partial, z.ZodString>;
|
|
137
|
+
flagImageUrl: z.ZodString;
|
|
138
|
+
countryId: z.ZodInt;
|
|
139
|
+
}, z.core.$strict>;
|
|
140
|
+
export type CountrySearchOptions = z.infer<typeof countrySearchOptionsSchema>;
|
|
141
|
+
export type CountrySearchResult = {
|
|
142
|
+
countries: Country[];
|
|
143
|
+
total: number;
|
|
144
|
+
};
|
|
145
|
+
export type CountrySelectOneQuery = z.infer<typeof countrySelectOneQuerySchema>;
|
|
146
|
+
export type CountryCreatePayload = z.infer<typeof countryCreatePayloadSchema>;
|
|
147
|
+
export type CountryUpdatePayload = z.infer<typeof countryUpdatePayloadSchema>;
|
|
96
148
|
|
|
97
149
|
export {};
|