@esb-market-contracts/backend 1.0.4 → 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 +83 -0
- package/package.json +1 -1
- package/types.d.ts +55 -0
package/api.d.ts
CHANGED
|
@@ -113,5 +113,88 @@ declare const categoriesRouter: import("hono/hono-base").HonoBase<{
|
|
|
113
113
|
};
|
|
114
114
|
}, "/catalog/categories", "/catalog/categories/switch-status">;
|
|
115
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;
|
|
116
199
|
|
|
117
200
|
export {};
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -90,5 +90,60 @@ export type CategorySelectOneQuery = z.infer<typeof categorySelectOneQuerySchema
|
|
|
90
90
|
export type CategoryCreatePayload = z.infer<typeof categoryCreatePayloadSchema>;
|
|
91
91
|
export type CategoryUpdatePayload = z.infer<typeof categoryUpdatePayloadSchema>;
|
|
92
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>;
|
|
93
148
|
|
|
94
149
|
export {};
|