@esb-market-contracts/backend 1.0.18 → 1.0.20

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,619 @@
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/routes/(finance)/exchange-rates.routes.d.ts
303
+ declare const exchangeRatesRouter: import("hono/hono-base").HonoBase<{
304
+ Variables: VariablesWithActor;
305
+ }, {
306
+ "/finance/exchange-rates/currencies": {
307
+ $get: {
308
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
309
+ currencies: {
310
+ id: number;
311
+ code: string;
312
+ name: string;
313
+ }[];
314
+ }>;
315
+ outputFormat: "json";
316
+ status: 200;
317
+ input: {};
318
+ };
319
+ };
320
+ } & {
321
+ "/finance/exchange-rates/dates/search": {
322
+ $post: {
323
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
324
+ dates: Date[];
325
+ total: number;
326
+ }>;
327
+ outputFormat: "json";
328
+ status: 200;
329
+ input: {
330
+ json: {
331
+ where?: {
332
+ currencyId?: number | undefined;
333
+ validFromDate?: unknown;
334
+ } | undefined;
335
+ pagination: {
336
+ offset?: unknown;
337
+ limit?: unknown;
338
+ };
339
+ };
340
+ };
341
+ };
342
+ };
343
+ } & {
344
+ "/finance/exchange-rates/search": {
345
+ $post: {
346
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
347
+ exchangeRates: {
348
+ id: number;
349
+ currencyId: number;
350
+ rate: number;
351
+ validFromDate: Date;
352
+ }[];
353
+ total: number;
354
+ }>;
355
+ outputFormat: "json";
356
+ status: 200;
357
+ input: {
358
+ json: {
359
+ where?: {
360
+ currencyId?: number | undefined;
361
+ validFromDate?: unknown;
362
+ } | undefined;
363
+ pagination: {
364
+ offset?: unknown;
365
+ limit?: unknown;
366
+ };
367
+ };
368
+ };
369
+ };
370
+ };
371
+ }, "/finance/exchange-rates", "/finance/exchange-rates/search">;
372
+ type ExchangeRatesRouter = typeof exchangeRatesRouter;
373
+ //#endregion
374
+ //#region src/app/flows/audit/audit.enums.d.ts
375
+ declare const auditLogSourcesArray: readonly ['admin', 'backend'];
376
+ type AuditLogSource = (typeof auditLogSourcesArray)[number];
377
+ //#endregion
378
+ //#region src/app/domain/(operations)/audit-logs/audit-logs.schemas.d.ts
299
379
  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
- }>;
380
+ id: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgSerialBuilder>, {
381
+ name: string;
382
+ tableName: "audit_logs";
383
+ dataType: "number int32";
384
+ data: number;
385
+ driverParam: number;
386
+ notNull: true;
387
+ hasDefault: true;
388
+ isPrimaryKey: false;
389
+ isAutoincrement: false;
390
+ hasRuntimeDefault: false;
391
+ enumValues: undefined;
392
+ identity: undefined;
393
+ generated: undefined;
394
+ }>;
395
+ 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" | "product.created" | "product.updated" | "productVariant.created" | "productVariant.updated">, {
396
+ name: string;
397
+ tableName: "audit_logs";
398
+ dataType: "string";
399
+ data: "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated" | "product.created" | "product.updated" | "productVariant.created" | "productVariant.updated";
400
+ driverParam: string;
401
+ notNull: true;
402
+ hasDefault: false;
403
+ isPrimaryKey: false;
404
+ isAutoincrement: false;
405
+ hasRuntimeDefault: false;
406
+ enumValues: undefined;
407
+ identity: undefined;
408
+ generated: undefined;
409
+ }>;
410
+ actorEmployeeId: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").PgIntegerBuilder, {
411
+ name: string;
412
+ tableName: "audit_logs";
413
+ dataType: "number int32";
414
+ data: number;
415
+ driverParam: string | number;
416
+ notNull: false;
417
+ hasDefault: false;
418
+ isPrimaryKey: false;
419
+ isAutoincrement: false;
420
+ hasRuntimeDefault: false;
421
+ enumValues: undefined;
422
+ identity: undefined;
423
+ generated: undefined;
424
+ }>;
425
+ payload: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgJsonbBuilder>, {
426
+ name: string;
427
+ tableName: "audit_logs";
428
+ dataType: "object json";
429
+ data: unknown;
430
+ driverParam: unknown;
431
+ notNull: true;
432
+ hasDefault: false;
433
+ isPrimaryKey: false;
434
+ isAutoincrement: false;
435
+ hasRuntimeDefault: false;
436
+ enumValues: undefined;
437
+ identity: undefined;
438
+ generated: undefined;
439
+ }>;
440
+ 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>>, {
441
+ name: string;
442
+ tableName: "audit_logs";
443
+ dataType: "object date";
444
+ data: Date;
445
+ driverParam: string;
446
+ notNull: true;
447
+ hasDefault: true;
448
+ isPrimaryKey: false;
449
+ isAutoincrement: false;
450
+ hasRuntimeDefault: false;
451
+ enumValues: undefined;
452
+ identity: undefined;
453
+ generated: undefined;
454
+ }>;
378
455
  }, undefined, undefined>;
379
- export type AuditLogResult = z.infer<typeof auditLogSchema> & {
380
- source: AuditLogSource;
456
+ //#endregion
457
+ //#region src/app/flows/audit/audit.schemas.d.ts
458
+ type AuditLogResult = z.infer<typeof auditLogSchema> & {
459
+ source: AuditLogSource;
381
460
  };
461
+ //#endregion
462
+ //#region src/app/routes/(operations)/audit-logs.routes.d.ts
382
463
  declare const auditLogsRouter: import("hono/hono-base").HonoBase<{
383
- Variables: VariablesWithActor;
464
+ Variables: VariablesWithActor;
384
465
  }, {
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
- };
466
+ "/operations/audit-logs/existing-events": {
467
+ $get: {
468
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
469
+ auditEvents: string[];
470
+ }>;
471
+ outputFormat: "json";
472
+ status: 200;
473
+ input: {};
474
+ };
475
+ };
395
476
  } & {
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
- };
477
+ "/operations/audit-logs/one": {
478
+ $get: {
479
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
480
+ auditLog: AuditLogResult;
481
+ }>;
482
+ outputFormat: "json";
483
+ status: 200;
484
+ input: {
485
+ query: {
486
+ id: string | string[];
487
+ source: "admin" | "backend";
488
+ };
489
+ };
490
+ };
491
+ };
411
492
  } & {
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
- };
493
+ "/operations/audit-logs/search": {
494
+ $post: {
495
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
496
+ auditLogs: AuditLogResult[];
497
+ total: number;
498
+ }>;
499
+ outputFormat: "json";
500
+ status: 200;
501
+ input: {
502
+ json: {
503
+ where?: {
504
+ event?: string | undefined;
505
+ actorEmployeeId?: number | null | undefined;
506
+ } | undefined;
507
+ query?: string | undefined;
508
+ pagination: {
509
+ offset?: unknown;
510
+ limit?: unknown;
511
+ };
512
+ };
513
+ };
514
+ };
515
+ };
435
516
  }, "/operations/audit-logs", "/operations/audit-logs/search">;
436
- export type AuditLogsRouter = typeof auditLogsRouter;
517
+ type AuditLogsRouter = typeof auditLogsRouter;
518
+ //#endregion
519
+ //#region src/app/routes/(operations)/customers.routes.d.ts
437
520
  declare const customersRouter: import("hono/hono-base").HonoBase<{
438
- Variables: VariablesWithActor;
521
+ Variables: VariablesWithActor;
439
522
  }, {
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
- };
523
+ "/operations/customers/one": {
524
+ $get: {
525
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
526
+ customer: {
527
+ id: number;
528
+ type: "individual" | "individual_entrepreneur" | "legal_entity";
529
+ name: string;
530
+ identificationNumber: string | null;
531
+ emailAddress: string | null;
532
+ phoneNumber: string | null;
533
+ notes: string | null;
534
+ updatedAt: Date | null;
535
+ createdAt: Date;
536
+ };
537
+ }>;
538
+ outputFormat: "json";
539
+ status: 200;
540
+ input: {
541
+ query: {
542
+ id: string | string[];
543
+ };
544
+ };
545
+ };
546
+ };
464
547
  } & {
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
- };
548
+ "/operations/customers/create": {
549
+ $post: {
550
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
551
+ outputFormat: "json";
552
+ status: 201;
553
+ input: {
554
+ json: {
555
+ type: "individual" | "individual_entrepreneur" | "legal_entity";
556
+ name: string;
557
+ identificationNumber?: string | null | undefined;
558
+ emailAddress?: string | null | undefined;
559
+ phoneNumber?: string | null | undefined;
560
+ notes?: string | null | undefined;
561
+ };
562
+ };
563
+ };
564
+ };
482
565
  } & {
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
- };
566
+ "/operations/customers/search": {
567
+ $post: {
568
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
569
+ customers: {
570
+ id: number;
571
+ type: "individual" | "individual_entrepreneur" | "legal_entity";
572
+ name: string;
573
+ identificationNumber: string | null;
574
+ emailAddress: string | null;
575
+ phoneNumber: string | null;
576
+ notes: string | null;
577
+ updatedAt: Date | null;
578
+ createdAt: Date;
579
+ }[];
580
+ total: number;
581
+ }>;
582
+ outputFormat: "json";
583
+ status: 200;
584
+ input: {
585
+ json: {
586
+ where?: {
587
+ type?: "individual" | "individual_entrepreneur" | "legal_entity" | undefined;
588
+ } | undefined;
589
+ query?: string | undefined;
590
+ pagination: {
591
+ offset?: unknown;
592
+ limit?: unknown;
593
+ };
594
+ };
595
+ };
596
+ };
597
+ };
515
598
  } & {
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
- };
599
+ "/operations/customers/update": {
600
+ $post: {
601
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
602
+ outputFormat: "json";
603
+ status: 200;
604
+ input: {
605
+ json: {
606
+ name?: string | undefined;
607
+ identificationNumber?: string | null | undefined;
608
+ emailAddress?: string | null | undefined;
609
+ phoneNumber?: string | null | undefined;
610
+ notes?: string | null | undefined;
611
+ customerId: number;
612
+ };
613
+ };
614
+ };
615
+ };
533
616
  }, "/operations/customers", "/operations/customers/update">;
534
- export type CustomersRouter = typeof customersRouter;
535
-
536
- export {};
617
+ type CustomersRouter = typeof customersRouter;
618
+ //#endregion
619
+ export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, ExchangeRatesRouter };