@esb-market-contracts/backend 1.0.18 → 1.0.19

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 CHANGED
@@ -1,536 +1,547 @@
1
- // Generated by dts-bundle-generator v9.5.1
2
-
3
- import { SessionPayload } from '@esb-market-contracts/admin-backend';
4
- import { z } from 'zod';
5
-
6
- export type VariablesWithActor = {
7
- actorSession: SessionPayload;
1
+ import { SessionPayload } from "@esb-market-contracts/admin-backend";
2
+ import "hono";
3
+ import "ky";
4
+ import "hono/http-exception";
5
+ import { z } from "zod";
6
+ //#region src/app/flows/authentication/authentication.middleware.d.ts
7
+ type VariablesWithActor = {
8
+ actorSession: SessionPayload;
8
9
  };
10
+ //#endregion
11
+ //#region src/app/routes/(catalog)/brands.routes.d.ts
9
12
  declare const brandsRouter: import("hono/hono-base").HonoBase<{
10
- Variables: VariablesWithActor;
13
+ Variables: VariablesWithActor;
11
14
  }, {
12
- "/catalog/brands/one": {
13
- $get: {
14
- input: {
15
- query: {
16
- id: string | string[];
17
- slug?: string | undefined;
18
- } | {
19
- slug: string | string[];
20
- id?: number | undefined;
21
- };
22
- };
23
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
24
- brand: {
25
- id: number;
26
- slug: string;
27
- name: Partial<Record<"ka" | "en" | "ru", string>>;
28
- websiteUrl: string | null;
29
- notes: string | null;
30
- logotypeUrl: string;
31
- countryId: number;
32
- updatedAt: Date | null;
33
- createdAt: Date;
34
- };
35
- }>;
36
- outputFormat: "json";
37
- status: 200;
38
- };
39
- };
15
+ "/catalog/brands/one": {
16
+ $get: {
17
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
18
+ brand: {
19
+ id: number;
20
+ slug: string;
21
+ name: Partial<Record<"en" | "ka" | "ru", string>>;
22
+ websiteUrl: string | null;
23
+ notes: string | null;
24
+ logotypeUrl: string;
25
+ countryId: number;
26
+ updatedAt: Date | null;
27
+ createdAt: Date;
28
+ };
29
+ }>;
30
+ outputFormat: "json";
31
+ status: 200;
32
+ input: {
33
+ query: {
34
+ id: string | string[];
35
+ slug?: string | undefined;
36
+ } | {
37
+ id?: number | undefined;
38
+ slug: string | string[];
39
+ };
40
+ };
41
+ };
42
+ };
40
43
  } & {
41
- "/catalog/brands/create": {
42
- $post: {
43
- input: {
44
- form: {
45
- slug: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
46
- name: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
47
- countryId: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
48
- logotype: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
49
- websiteUrl?: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined;
50
- notes?: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined;
51
- };
52
- };
53
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
54
- outputFormat: "json";
55
- status: 201;
56
- };
57
- };
44
+ "/catalog/brands/create": {
45
+ $post: {
46
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
47
+ outputFormat: "json";
48
+ status: 201;
49
+ input: {
50
+ form: {
51
+ slug: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
52
+ name: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
53
+ websiteUrl?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
54
+ notes?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
55
+ countryId: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
56
+ logotype: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
57
+ };
58
+ };
59
+ };
60
+ };
58
61
  } & {
59
- "/catalog/brands/search": {
60
- $post: {
61
- input: {
62
- json: {
63
- pagination: {
64
- offset?: unknown;
65
- limit?: unknown;
66
- };
67
- where?: {
68
- countryId?: number | undefined;
69
- } | undefined;
70
- query?: string | undefined;
71
- };
72
- };
73
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
74
- brands: {
75
- id: number;
76
- slug: string;
77
- name: Partial<Record<"ka" | "en" | "ru", string>>;
78
- websiteUrl: string | null;
79
- notes: string | null;
80
- logotypeUrl: string;
81
- countryId: number;
82
- updatedAt: Date | null;
83
- createdAt: Date;
84
- }[];
85
- total: number;
86
- }>;
87
- outputFormat: "json";
88
- status: 200;
89
- };
90
- };
62
+ "/catalog/brands/search": {
63
+ $post: {
64
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
65
+ brands: {
66
+ id: number;
67
+ slug: string;
68
+ name: Partial<Record<"en" | "ka" | "ru", string>>;
69
+ websiteUrl: string | null;
70
+ notes: string | null;
71
+ logotypeUrl: string;
72
+ countryId: number;
73
+ updatedAt: Date | null;
74
+ createdAt: Date;
75
+ }[];
76
+ total: number;
77
+ }>;
78
+ outputFormat: "json";
79
+ status: 200;
80
+ input: {
81
+ json: {
82
+ where?: {
83
+ countryId?: number | undefined;
84
+ } | undefined;
85
+ query?: string | undefined;
86
+ pagination: {
87
+ offset?: unknown;
88
+ limit?: unknown;
89
+ };
90
+ };
91
+ };
92
+ };
93
+ };
91
94
  } & {
92
- "/catalog/brands/update": {
93
- $post: {
94
- input: {
95
- form: {
96
- brandId: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
97
- slug?: string | undefined;
98
- name?: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined;
99
- websiteUrl?: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined;
100
- notes?: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined;
101
- countryId?: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined;
102
- logotype?: import("zod/v4/core").File | undefined;
103
- };
104
- };
105
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
106
- outputFormat: "json";
107
- status: 200;
108
- };
109
- };
95
+ "/catalog/brands/update": {
96
+ $post: {
97
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
98
+ outputFormat: "json";
99
+ status: 200;
100
+ input: {
101
+ form: {
102
+ slug?: string | undefined;
103
+ name?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
104
+ websiteUrl?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
105
+ notes?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
106
+ countryId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
107
+ logotype?: import("zod/v4/core").File | undefined;
108
+ brandId: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
109
+ };
110
+ };
111
+ };
112
+ };
110
113
  }, "/catalog/brands", "/catalog/brands/update">;
111
- export type BrandsRouter = typeof brandsRouter;
114
+ type BrandsRouter = typeof brandsRouter;
115
+ //#endregion
116
+ //#region src/app/routes/(catalog)/categories.routes.d.ts
112
117
  declare const categoriesRouter: import("hono/hono-base").HonoBase<{
113
- Variables: VariablesWithActor;
118
+ Variables: VariablesWithActor;
114
119
  }, {
115
- "/catalog/categories/one": {
116
- $get: {
117
- input: {
118
- query: {
119
- id: string | string[];
120
- slug?: string | undefined;
121
- } | {
122
- slug: string | string[];
123
- id?: number | undefined;
124
- };
125
- };
126
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
127
- category: {
128
- id: number;
129
- slug: string;
130
- parentId: number | null;
131
- status: "active" | "archived";
132
- name: Partial<Record<"ka" | "en" | "ru", string>>;
133
- updatedAt: Date | null;
134
- createdAt: Date;
135
- };
136
- }>;
137
- outputFormat: "json";
138
- status: 200;
139
- };
140
- };
120
+ "/catalog/categories/one": {
121
+ $get: {
122
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
123
+ category: {
124
+ id: number;
125
+ slug: string;
126
+ parentId: number | null;
127
+ status: "active" | "archived";
128
+ name: Partial<Record<"en" | "ka" | "ru", string>>;
129
+ updatedAt: Date | null;
130
+ createdAt: Date;
131
+ };
132
+ }>;
133
+ outputFormat: "json";
134
+ status: 200;
135
+ input: {
136
+ query: {
137
+ id: string | string[];
138
+ slug?: string | undefined;
139
+ } | {
140
+ id?: number | undefined;
141
+ slug: string | string[];
142
+ };
143
+ };
144
+ };
145
+ };
141
146
  } & {
142
- "/catalog/categories/create": {
143
- $post: {
144
- input: {
145
- json: {
146
- name: Partial<Record<"ka" | "en" | "ru", string>>;
147
- slug: string;
148
- parentId?: number | null | undefined;
149
- };
150
- };
151
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
152
- outputFormat: "json";
153
- status: 201;
154
- };
155
- };
147
+ "/catalog/categories/create": {
148
+ $post: {
149
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
150
+ outputFormat: "json";
151
+ status: 201;
152
+ input: {
153
+ json: {
154
+ slug: string;
155
+ parentId?: number | null | undefined;
156
+ name: Partial<Record<"en" | "ka" | "ru", string>>;
157
+ };
158
+ };
159
+ };
160
+ };
156
161
  } & {
157
- "/catalog/categories/search": {
158
- $post: {
159
- input: {
160
- json: {
161
- pagination: {
162
- offset?: unknown;
163
- limit?: unknown;
164
- };
165
- where?: {
166
- parentId?: number | null | undefined;
167
- status?: "active" | "archived" | undefined;
168
- } | undefined;
169
- query?: string | undefined;
170
- };
171
- };
172
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
173
- categories: {
174
- id: number;
175
- slug: string;
176
- parentId: number | null;
177
- status: "active" | "archived";
178
- name: Partial<Record<"ka" | "en" | "ru", string>>;
179
- updatedAt: Date | null;
180
- createdAt: Date;
181
- }[];
182
- total: number;
183
- }>;
184
- outputFormat: "json";
185
- status: 200;
186
- };
187
- };
162
+ "/catalog/categories/search": {
163
+ $post: {
164
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
165
+ categories: {
166
+ id: number;
167
+ slug: string;
168
+ parentId: number | null;
169
+ status: "active" | "archived";
170
+ name: Partial<Record<"en" | "ka" | "ru", string>>;
171
+ updatedAt: Date | null;
172
+ createdAt: Date;
173
+ }[];
174
+ total: number;
175
+ }>;
176
+ outputFormat: "json";
177
+ status: 200;
178
+ input: {
179
+ json: {
180
+ where?: {
181
+ parentId?: number | null | undefined;
182
+ status?: "active" | "archived" | undefined;
183
+ } | undefined;
184
+ query?: string | undefined;
185
+ pagination: {
186
+ offset?: unknown;
187
+ limit?: unknown;
188
+ };
189
+ };
190
+ };
191
+ };
192
+ };
188
193
  } & {
189
- "/catalog/categories/update": {
190
- $post: {
191
- input: {
192
- json: {
193
- categoryId: number;
194
- name?: Partial<Record<"ka" | "en" | "ru", string>> | undefined;
195
- slug?: string | undefined;
196
- parentId?: number | null | undefined;
197
- status?: "active" | "archived" | undefined;
198
- };
199
- };
200
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
201
- outputFormat: "json";
202
- status: 200;
203
- };
204
- };
194
+ "/catalog/categories/update": {
195
+ $post: {
196
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
197
+ outputFormat: "json";
198
+ status: 200;
199
+ input: {
200
+ json: {
201
+ slug?: string | undefined;
202
+ parentId?: number | null | undefined;
203
+ status?: "active" | "archived" | undefined;
204
+ name?: Partial<Record<"en" | "ka" | "ru", string>> | undefined;
205
+ categoryId: number;
206
+ };
207
+ };
208
+ };
209
+ };
205
210
  }, "/catalog/categories", "/catalog/categories/update">;
206
- export type CategoriesRouter = typeof categoriesRouter;
211
+ type CategoriesRouter = typeof categoriesRouter;
212
+ //#endregion
213
+ //#region src/app/routes/(catalog)/countries.routes.d.ts
207
214
  declare const countriesRouter: import("hono/hono-base").HonoBase<{
208
- Variables: VariablesWithActor;
215
+ Variables: VariablesWithActor;
209
216
  }, {
210
- "/catalog/countries/one": {
211
- $get: {
212
- input: {
213
- query: {
214
- id: string | string[];
215
- };
216
- };
217
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
218
- country: {
219
- id: number;
220
- code: string;
221
- name: Partial<Record<"ka" | "en" | "ru", string>>;
222
- flagImageUrl: string;
223
- updatedAt: Date | null;
224
- createdAt: Date;
225
- };
226
- }>;
227
- outputFormat: "json";
228
- status: 200;
229
- };
230
- };
217
+ "/catalog/countries/one": {
218
+ $get: {
219
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
220
+ country: {
221
+ id: number;
222
+ code: string;
223
+ name: Partial<Record<"en" | "ka" | "ru", string>>;
224
+ flagImageUrl: string;
225
+ updatedAt: Date | null;
226
+ createdAt: Date;
227
+ };
228
+ }>;
229
+ outputFormat: "json";
230
+ status: 200;
231
+ input: {
232
+ query: {
233
+ id: string | string[];
234
+ };
235
+ };
236
+ };
237
+ };
231
238
  } & {
232
- "/catalog/countries/create": {
233
- $post: {
234
- input: {
235
- form: {
236
- code: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
237
- name: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
238
- flagImage: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
239
- };
240
- };
241
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
242
- outputFormat: "json";
243
- status: 201;
244
- };
245
- };
239
+ "/catalog/countries/create": {
240
+ $post: {
241
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
242
+ outputFormat: "json";
243
+ status: 201;
244
+ input: {
245
+ form: {
246
+ code: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
247
+ name: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
248
+ flagImage: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
249
+ };
250
+ };
251
+ };
252
+ };
246
253
  } & {
247
- "/catalog/countries/search": {
248
- $post: {
249
- input: {
250
- json: {
251
- pagination: {
252
- offset?: unknown;
253
- limit?: unknown;
254
- };
255
- where?: {
256
- code?: string | undefined;
257
- } | undefined;
258
- query?: string | undefined;
259
- };
260
- };
261
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
262
- countries: {
263
- id: number;
264
- code: string;
265
- name: Partial<Record<"ka" | "en" | "ru", string>>;
266
- flagImageUrl: string;
267
- updatedAt: Date | null;
268
- createdAt: Date;
269
- }[];
270
- total: number;
271
- }>;
272
- outputFormat: "json";
273
- status: 200;
274
- };
275
- };
254
+ "/catalog/countries/search": {
255
+ $post: {
256
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
257
+ countries: {
258
+ id: number;
259
+ code: string;
260
+ name: Partial<Record<"en" | "ka" | "ru", string>>;
261
+ flagImageUrl: string;
262
+ updatedAt: Date | null;
263
+ createdAt: Date;
264
+ }[];
265
+ total: number;
266
+ }>;
267
+ outputFormat: "json";
268
+ status: 200;
269
+ input: {
270
+ json: {
271
+ where?: {
272
+ code?: string | undefined;
273
+ } | undefined;
274
+ query?: string | undefined;
275
+ pagination: {
276
+ offset?: unknown;
277
+ limit?: unknown;
278
+ };
279
+ };
280
+ };
281
+ };
282
+ };
276
283
  } & {
277
- "/catalog/countries/update": {
278
- $post: {
279
- input: {
280
- form: {
281
- countryId: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[];
282
- code?: string | undefined;
283
- name?: import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined;
284
- flagImage?: import("zod/v4/core").File | undefined;
285
- };
286
- };
287
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
288
- outputFormat: "json";
289
- status: 200;
290
- };
291
- };
284
+ "/catalog/countries/update": {
285
+ $post: {
286
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
287
+ outputFormat: "json";
288
+ status: 200;
289
+ input: {
290
+ form: {
291
+ code?: string | undefined;
292
+ name?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
293
+ flagImage?: import("zod/v4/core").File | undefined;
294
+ countryId: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
295
+ };
296
+ };
297
+ };
298
+ };
292
299
  }, "/catalog/countries", "/catalog/countries/update">;
293
- export type CountriesRouter = typeof countriesRouter;
294
- declare const auditLogSourcesArray: readonly [
295
- "admin",
296
- "backend"
297
- ];
298
- export type AuditLogSource = (typeof auditLogSourcesArray)[number];
300
+ type CountriesRouter = typeof countriesRouter;
301
+ //#endregion
302
+ //#region src/app/flows/audit/audit.enums.d.ts
303
+ declare const auditLogSourcesArray: readonly ['admin', 'backend'];
304
+ type AuditLogSource = (typeof auditLogSourcesArray)[number];
305
+ //#endregion
306
+ //#region src/app/domain/(operations)/audit-logs/audit-logs.schemas.d.ts
299
307
  declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
300
- id: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgSerialBuilder>, {
301
- name: string;
302
- tableName: "audit_logs";
303
- dataType: "number int32";
304
- data: number;
305
- driverParam: number;
306
- notNull: true;
307
- hasDefault: true;
308
- isPrimaryKey: false;
309
- isAutoincrement: false;
310
- hasRuntimeDefault: false;
311
- enumValues: undefined;
312
- identity: undefined;
313
- generated: undefined;
314
- }>;
315
- event: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTextBuilder<[
316
- string,
317
- ...string[]
318
- ]>>, "brand.created" | "brand.updated" | "category.created" | "category.updated" | "category.activated" | "category.archived" | "country.created" | "country.updated" | "customer.created" | "customer.updated">, {
319
- name: string;
320
- tableName: "audit_logs";
321
- dataType: "string";
322
- data: "brand.created" | "brand.updated" | "category.created" | "category.updated" | "category.activated" | "category.archived" | "country.created" | "country.updated" | "customer.created" | "customer.updated";
323
- driverParam: string;
324
- notNull: true;
325
- hasDefault: false;
326
- isPrimaryKey: false;
327
- isAutoincrement: false;
328
- hasRuntimeDefault: false;
329
- enumValues: undefined;
330
- identity: undefined;
331
- generated: undefined;
332
- }>;
333
- actorEmployeeId: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").PgIntegerBuilder, {
334
- name: string;
335
- tableName: "audit_logs";
336
- dataType: "number int32";
337
- data: number;
338
- driverParam: string | number;
339
- notNull: false;
340
- hasDefault: false;
341
- isPrimaryKey: false;
342
- isAutoincrement: false;
343
- hasRuntimeDefault: false;
344
- enumValues: undefined;
345
- identity: undefined;
346
- generated: undefined;
347
- }>;
348
- payload: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgJsonbBuilder>, {
349
- name: string;
350
- tableName: "audit_logs";
351
- dataType: "object json";
352
- data: unknown;
353
- driverParam: unknown;
354
- notNull: true;
355
- hasDefault: false;
356
- isPrimaryKey: false;
357
- isAutoincrement: false;
358
- hasRuntimeDefault: false;
359
- enumValues: undefined;
360
- identity: undefined;
361
- generated: undefined;
362
- }>;
363
- createdAt: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTimestampBuilder>>, {
364
- name: string;
365
- tableName: "audit_logs";
366
- dataType: "object date";
367
- data: Date;
368
- driverParam: string;
369
- notNull: true;
370
- hasDefault: true;
371
- isPrimaryKey: false;
372
- isAutoincrement: false;
373
- hasRuntimeDefault: false;
374
- enumValues: undefined;
375
- identity: undefined;
376
- generated: undefined;
377
- }>;
308
+ id: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgSerialBuilder>, {
309
+ name: string;
310
+ tableName: "audit_logs";
311
+ dataType: "number int32";
312
+ data: number;
313
+ driverParam: number;
314
+ notNull: true;
315
+ hasDefault: true;
316
+ isPrimaryKey: false;
317
+ isAutoincrement: false;
318
+ hasRuntimeDefault: false;
319
+ enumValues: undefined;
320
+ identity: undefined;
321
+ generated: undefined;
322
+ }>;
323
+ event: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>>, "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated">, {
324
+ name: string;
325
+ tableName: "audit_logs";
326
+ dataType: "string";
327
+ data: "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated";
328
+ driverParam: string;
329
+ notNull: true;
330
+ hasDefault: false;
331
+ isPrimaryKey: false;
332
+ isAutoincrement: false;
333
+ hasRuntimeDefault: false;
334
+ enumValues: undefined;
335
+ identity: undefined;
336
+ generated: undefined;
337
+ }>;
338
+ actorEmployeeId: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").PgIntegerBuilder, {
339
+ name: string;
340
+ tableName: "audit_logs";
341
+ dataType: "number int32";
342
+ data: number;
343
+ driverParam: string | number;
344
+ notNull: false;
345
+ hasDefault: false;
346
+ isPrimaryKey: false;
347
+ isAutoincrement: false;
348
+ hasRuntimeDefault: false;
349
+ enumValues: undefined;
350
+ identity: undefined;
351
+ generated: undefined;
352
+ }>;
353
+ payload: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgJsonbBuilder>, {
354
+ name: string;
355
+ tableName: "audit_logs";
356
+ dataType: "object json";
357
+ data: unknown;
358
+ driverParam: unknown;
359
+ notNull: true;
360
+ hasDefault: false;
361
+ isPrimaryKey: false;
362
+ isAutoincrement: false;
363
+ hasRuntimeDefault: false;
364
+ enumValues: undefined;
365
+ identity: undefined;
366
+ generated: undefined;
367
+ }>;
368
+ createdAt: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTimestampBuilder>>, {
369
+ name: string;
370
+ tableName: "audit_logs";
371
+ dataType: "object date";
372
+ data: Date;
373
+ driverParam: string;
374
+ notNull: true;
375
+ hasDefault: true;
376
+ isPrimaryKey: false;
377
+ isAutoincrement: false;
378
+ hasRuntimeDefault: false;
379
+ enumValues: undefined;
380
+ identity: undefined;
381
+ generated: undefined;
382
+ }>;
378
383
  }, undefined, undefined>;
379
- export type AuditLogResult = z.infer<typeof auditLogSchema> & {
380
- source: AuditLogSource;
384
+ //#endregion
385
+ //#region src/app/flows/audit/audit.schemas.d.ts
386
+ type AuditLogResult = z.infer<typeof auditLogSchema> & {
387
+ source: AuditLogSource;
381
388
  };
389
+ //#endregion
390
+ //#region src/app/routes/(operations)/audit-logs.routes.d.ts
382
391
  declare const auditLogsRouter: import("hono/hono-base").HonoBase<{
383
- Variables: VariablesWithActor;
392
+ Variables: VariablesWithActor;
384
393
  }, {
385
- "/operations/audit-logs/existing-events": {
386
- $get: {
387
- input: {};
388
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
389
- auditEvents: string[];
390
- }>;
391
- outputFormat: "json";
392
- status: 200;
393
- };
394
- };
394
+ "/operations/audit-logs/existing-events": {
395
+ $get: {
396
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
397
+ auditEvents: string[];
398
+ }>;
399
+ outputFormat: "json";
400
+ status: 200;
401
+ input: {};
402
+ };
403
+ };
395
404
  } & {
396
- "/operations/audit-logs/one": {
397
- $get: {
398
- input: {
399
- query: {
400
- id: string | string[];
401
- source: "admin" | "backend";
402
- };
403
- };
404
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
405
- auditLog: AuditLogResult;
406
- }>;
407
- outputFormat: "json";
408
- status: 200;
409
- };
410
- };
405
+ "/operations/audit-logs/one": {
406
+ $get: {
407
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
408
+ auditLog: AuditLogResult;
409
+ }>;
410
+ outputFormat: "json";
411
+ status: 200;
412
+ input: {
413
+ query: {
414
+ id: string | string[];
415
+ source: "admin" | "backend";
416
+ };
417
+ };
418
+ };
419
+ };
411
420
  } & {
412
- "/operations/audit-logs/search": {
413
- $post: {
414
- input: {
415
- json: {
416
- pagination: {
417
- offset?: unknown;
418
- limit?: unknown;
419
- };
420
- where?: {
421
- event?: string | undefined;
422
- actorEmployeeId?: number | null | undefined;
423
- } | undefined;
424
- query?: string | undefined;
425
- };
426
- };
427
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
428
- auditLogs: AuditLogResult[];
429
- total: number;
430
- }>;
431
- outputFormat: "json";
432
- status: 200;
433
- };
434
- };
421
+ "/operations/audit-logs/search": {
422
+ $post: {
423
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
424
+ auditLogs: AuditLogResult[];
425
+ total: number;
426
+ }>;
427
+ outputFormat: "json";
428
+ status: 200;
429
+ input: {
430
+ json: {
431
+ where?: {
432
+ event?: string | undefined;
433
+ actorEmployeeId?: number | null | undefined;
434
+ } | undefined;
435
+ query?: string | undefined;
436
+ pagination: {
437
+ offset?: unknown;
438
+ limit?: unknown;
439
+ };
440
+ };
441
+ };
442
+ };
443
+ };
435
444
  }, "/operations/audit-logs", "/operations/audit-logs/search">;
436
- export type AuditLogsRouter = typeof auditLogsRouter;
445
+ type AuditLogsRouter = typeof auditLogsRouter;
446
+ //#endregion
447
+ //#region src/app/routes/(operations)/customers.routes.d.ts
437
448
  declare const customersRouter: import("hono/hono-base").HonoBase<{
438
- Variables: VariablesWithActor;
449
+ Variables: VariablesWithActor;
439
450
  }, {
440
- "/operations/customers/one": {
441
- $get: {
442
- input: {
443
- query: {
444
- id: string | string[];
445
- };
446
- };
447
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
448
- customer: {
449
- id: number;
450
- type: "individual" | "individual_entrepreneur" | "legal_entity";
451
- name: string;
452
- identificationNumber: string | null;
453
- emailAddress: string | null;
454
- phoneNumber: string | null;
455
- notes: string | null;
456
- updatedAt: Date | null;
457
- createdAt: Date;
458
- };
459
- }>;
460
- outputFormat: "json";
461
- status: 200;
462
- };
463
- };
451
+ "/operations/customers/one": {
452
+ $get: {
453
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
454
+ customer: {
455
+ id: number;
456
+ type: "individual" | "individual_entrepreneur" | "legal_entity";
457
+ name: string;
458
+ identificationNumber: string | null;
459
+ emailAddress: string | null;
460
+ phoneNumber: string | null;
461
+ notes: string | null;
462
+ updatedAt: Date | null;
463
+ createdAt: Date;
464
+ };
465
+ }>;
466
+ outputFormat: "json";
467
+ status: 200;
468
+ input: {
469
+ query: {
470
+ id: string | string[];
471
+ };
472
+ };
473
+ };
474
+ };
464
475
  } & {
465
- "/operations/customers/create": {
466
- $post: {
467
- input: {
468
- json: {
469
- type: "individual" | "individual_entrepreneur" | "legal_entity";
470
- name: string;
471
- notes?: string | null | undefined;
472
- identificationNumber?: string | null | undefined;
473
- emailAddress?: string | null | undefined;
474
- phoneNumber?: string | null | undefined;
475
- };
476
- };
477
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
478
- outputFormat: "json";
479
- status: 201;
480
- };
481
- };
476
+ "/operations/customers/create": {
477
+ $post: {
478
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
479
+ outputFormat: "json";
480
+ status: 201;
481
+ input: {
482
+ json: {
483
+ type: "individual" | "individual_entrepreneur" | "legal_entity";
484
+ name: string;
485
+ identificationNumber?: string | null | undefined;
486
+ emailAddress?: string | null | undefined;
487
+ phoneNumber?: string | null | undefined;
488
+ notes?: string | null | undefined;
489
+ };
490
+ };
491
+ };
492
+ };
482
493
  } & {
483
- "/operations/customers/search": {
484
- $post: {
485
- input: {
486
- json: {
487
- pagination: {
488
- offset?: unknown;
489
- limit?: unknown;
490
- };
491
- where?: {
492
- type?: "individual" | "individual_entrepreneur" | "legal_entity" | undefined;
493
- } | undefined;
494
- query?: string | undefined;
495
- };
496
- };
497
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
498
- customers: {
499
- id: number;
500
- type: "individual" | "individual_entrepreneur" | "legal_entity";
501
- name: string;
502
- identificationNumber: string | null;
503
- emailAddress: string | null;
504
- phoneNumber: string | null;
505
- notes: string | null;
506
- updatedAt: Date | null;
507
- createdAt: Date;
508
- }[];
509
- total: number;
510
- }>;
511
- outputFormat: "json";
512
- status: 200;
513
- };
514
- };
494
+ "/operations/customers/search": {
495
+ $post: {
496
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
497
+ customers: {
498
+ id: number;
499
+ type: "individual" | "individual_entrepreneur" | "legal_entity";
500
+ name: string;
501
+ identificationNumber: string | null;
502
+ emailAddress: string | null;
503
+ phoneNumber: string | null;
504
+ notes: string | null;
505
+ updatedAt: Date | null;
506
+ createdAt: Date;
507
+ }[];
508
+ total: number;
509
+ }>;
510
+ outputFormat: "json";
511
+ status: 200;
512
+ input: {
513
+ json: {
514
+ where?: {
515
+ type?: "individual" | "individual_entrepreneur" | "legal_entity" | undefined;
516
+ } | undefined;
517
+ query?: string | undefined;
518
+ pagination: {
519
+ offset?: unknown;
520
+ limit?: unknown;
521
+ };
522
+ };
523
+ };
524
+ };
525
+ };
515
526
  } & {
516
- "/operations/customers/update": {
517
- $post: {
518
- input: {
519
- json: {
520
- customerId: number;
521
- name?: string | undefined;
522
- notes?: string | null | undefined;
523
- identificationNumber?: string | null | undefined;
524
- emailAddress?: string | null | undefined;
525
- phoneNumber?: string | null | undefined;
526
- };
527
- };
528
- output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
529
- outputFormat: "json";
530
- status: 200;
531
- };
532
- };
527
+ "/operations/customers/update": {
528
+ $post: {
529
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
530
+ outputFormat: "json";
531
+ status: 200;
532
+ input: {
533
+ json: {
534
+ name?: string | undefined;
535
+ identificationNumber?: string | null | undefined;
536
+ emailAddress?: string | null | undefined;
537
+ phoneNumber?: string | null | undefined;
538
+ notes?: string | null | undefined;
539
+ customerId: number;
540
+ };
541
+ };
542
+ };
543
+ };
533
544
  }, "/operations/customers", "/operations/customers/update">;
534
- export type CustomersRouter = typeof customersRouter;
535
-
536
- export {};
545
+ type CustomersRouter = typeof customersRouter;
546
+ //#endregion
547
+ export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter };