@esb-market-contracts/backend 1.0.19 → 1.0.21
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 +210 -3
- package/enums.d.ts +10 -1
- package/enums.js +10 -1
- package/package.json +1 -1
- package/types.d.ts +198 -3
package/api.d.ts
CHANGED
|
@@ -299,6 +299,213 @@ declare const countriesRouter: import("hono/hono-base").HonoBase<{
|
|
|
299
299
|
}, "/catalog/countries", "/catalog/countries/update">;
|
|
300
300
|
type CountriesRouter = typeof countriesRouter;
|
|
301
301
|
//#endregion
|
|
302
|
+
//#region src/app/routes/(catalog)/products.routes.d.ts
|
|
303
|
+
declare const productsRouter: import("hono/hono-base").HonoBase<{
|
|
304
|
+
Variables: VariablesWithActor;
|
|
305
|
+
}, {
|
|
306
|
+
"/catalog/products/one": {
|
|
307
|
+
$get: {
|
|
308
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
309
|
+
product: {
|
|
310
|
+
id: number;
|
|
311
|
+
slug: string | null;
|
|
312
|
+
status: "active" | "archived" | "draft";
|
|
313
|
+
name: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
314
|
+
description: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
315
|
+
images: {
|
|
316
|
+
src: string;
|
|
317
|
+
isBanner: boolean;
|
|
318
|
+
}[];
|
|
319
|
+
categoryId: number | null;
|
|
320
|
+
brandId: number | null;
|
|
321
|
+
updatedAt: Date | null;
|
|
322
|
+
createdAt: Date;
|
|
323
|
+
};
|
|
324
|
+
}>;
|
|
325
|
+
outputFormat: "json";
|
|
326
|
+
status: 200;
|
|
327
|
+
input: {
|
|
328
|
+
query: {
|
|
329
|
+
id: string | string[];
|
|
330
|
+
slug?: string | undefined;
|
|
331
|
+
} | {
|
|
332
|
+
id?: number | undefined;
|
|
333
|
+
slug: string | string[];
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
} & {
|
|
339
|
+
"/catalog/products/create": {
|
|
340
|
+
$post: {
|
|
341
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
342
|
+
product: {
|
|
343
|
+
id: number;
|
|
344
|
+
slug: string | null;
|
|
345
|
+
status: "active" | "archived" | "draft";
|
|
346
|
+
name: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
347
|
+
description: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
348
|
+
images: {
|
|
349
|
+
src: string;
|
|
350
|
+
isBanner: boolean;
|
|
351
|
+
}[];
|
|
352
|
+
categoryId: number | null;
|
|
353
|
+
brandId: number | null;
|
|
354
|
+
updatedAt: Date | null;
|
|
355
|
+
createdAt: Date;
|
|
356
|
+
};
|
|
357
|
+
}>;
|
|
358
|
+
outputFormat: "json";
|
|
359
|
+
status: 201;
|
|
360
|
+
input: {
|
|
361
|
+
form: {
|
|
362
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
363
|
+
slug?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
364
|
+
name?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
365
|
+
description?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
366
|
+
categoryId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
367
|
+
brandId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
368
|
+
images?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
369
|
+
bannerImageIndex?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
} & {
|
|
375
|
+
"/catalog/products/search": {
|
|
376
|
+
$post: {
|
|
377
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
378
|
+
products: {
|
|
379
|
+
id: number;
|
|
380
|
+
slug: string | null;
|
|
381
|
+
status: "active" | "archived" | "draft";
|
|
382
|
+
name: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
383
|
+
description: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
384
|
+
images: {
|
|
385
|
+
src: string;
|
|
386
|
+
isBanner: boolean;
|
|
387
|
+
}[];
|
|
388
|
+
categoryId: number | null;
|
|
389
|
+
brandId: number | null;
|
|
390
|
+
updatedAt: Date | null;
|
|
391
|
+
createdAt: Date;
|
|
392
|
+
}[];
|
|
393
|
+
total: number;
|
|
394
|
+
}>;
|
|
395
|
+
outputFormat: "json";
|
|
396
|
+
status: 200;
|
|
397
|
+
input: {
|
|
398
|
+
json: {
|
|
399
|
+
where?: {
|
|
400
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
401
|
+
categoryId?: number | null | undefined;
|
|
402
|
+
brandId?: number | null | undefined;
|
|
403
|
+
} | undefined;
|
|
404
|
+
query?: string | undefined;
|
|
405
|
+
pagination: {
|
|
406
|
+
offset?: unknown;
|
|
407
|
+
limit?: unknown;
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
} & {
|
|
414
|
+
"/catalog/products/update": {
|
|
415
|
+
$post: {
|
|
416
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
417
|
+
outputFormat: "json";
|
|
418
|
+
status: 200;
|
|
419
|
+
input: {
|
|
420
|
+
form: {
|
|
421
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
422
|
+
slug?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
423
|
+
name?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
424
|
+
description?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
425
|
+
categoryId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
426
|
+
brandId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
427
|
+
images?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
428
|
+
bannerImageIndex?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
429
|
+
productId: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
}, "/catalog/products", "/catalog/products/update">;
|
|
435
|
+
type ProductsRouter = typeof productsRouter;
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region src/app/routes/(finance)/exchange-rates.routes.d.ts
|
|
438
|
+
declare const exchangeRatesRouter: import("hono/hono-base").HonoBase<{
|
|
439
|
+
Variables: VariablesWithActor;
|
|
440
|
+
}, {
|
|
441
|
+
"/finance/exchange-rates/currencies": {
|
|
442
|
+
$get: {
|
|
443
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
444
|
+
currencies: {
|
|
445
|
+
id: number;
|
|
446
|
+
code: string;
|
|
447
|
+
name: string;
|
|
448
|
+
}[];
|
|
449
|
+
}>;
|
|
450
|
+
outputFormat: "json";
|
|
451
|
+
status: 200;
|
|
452
|
+
input: {};
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
} & {
|
|
456
|
+
"/finance/exchange-rates/dates/search": {
|
|
457
|
+
$post: {
|
|
458
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
459
|
+
dates: Date[];
|
|
460
|
+
total: number;
|
|
461
|
+
}>;
|
|
462
|
+
outputFormat: "json";
|
|
463
|
+
status: 200;
|
|
464
|
+
input: {
|
|
465
|
+
json: {
|
|
466
|
+
where?: {
|
|
467
|
+
currencyId?: number | undefined;
|
|
468
|
+
validFromDate?: unknown;
|
|
469
|
+
} | undefined;
|
|
470
|
+
pagination: {
|
|
471
|
+
offset?: unknown;
|
|
472
|
+
limit?: unknown;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
} & {
|
|
479
|
+
"/finance/exchange-rates/search": {
|
|
480
|
+
$post: {
|
|
481
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
482
|
+
exchangeRates: {
|
|
483
|
+
id: number;
|
|
484
|
+
currencyId: number;
|
|
485
|
+
rate: number;
|
|
486
|
+
validFromDate: Date;
|
|
487
|
+
}[];
|
|
488
|
+
total: number;
|
|
489
|
+
}>;
|
|
490
|
+
outputFormat: "json";
|
|
491
|
+
status: 200;
|
|
492
|
+
input: {
|
|
493
|
+
json: {
|
|
494
|
+
where?: {
|
|
495
|
+
currencyId?: number | undefined;
|
|
496
|
+
validFromDate?: unknown;
|
|
497
|
+
} | undefined;
|
|
498
|
+
pagination: {
|
|
499
|
+
offset?: unknown;
|
|
500
|
+
limit?: unknown;
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
};
|
|
506
|
+
}, "/finance/exchange-rates", "/finance/exchange-rates/search">;
|
|
507
|
+
type ExchangeRatesRouter = typeof exchangeRatesRouter;
|
|
508
|
+
//#endregion
|
|
302
509
|
//#region src/app/flows/audit/audit.enums.d.ts
|
|
303
510
|
declare const auditLogSourcesArray: readonly ['admin', 'backend'];
|
|
304
511
|
type AuditLogSource = (typeof auditLogSourcesArray)[number];
|
|
@@ -320,11 +527,11 @@ declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
|
|
|
320
527
|
identity: undefined;
|
|
321
528
|
generated: undefined;
|
|
322
529
|
}>;
|
|
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">, {
|
|
530
|
+
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">, {
|
|
324
531
|
name: string;
|
|
325
532
|
tableName: "audit_logs";
|
|
326
533
|
dataType: "string";
|
|
327
|
-
data: "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated";
|
|
534
|
+
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";
|
|
328
535
|
driverParam: string;
|
|
329
536
|
notNull: true;
|
|
330
537
|
hasDefault: false;
|
|
@@ -544,4 +751,4 @@ declare const customersRouter: import("hono/hono-base").HonoBase<{
|
|
|
544
751
|
}, "/operations/customers", "/operations/customers/update">;
|
|
545
752
|
type CustomersRouter = typeof customersRouter;
|
|
546
753
|
//#endregion
|
|
547
|
-
export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter };
|
|
754
|
+
export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, ExchangeRatesRouter, ProductsRouter };
|
package/enums.d.ts
CHANGED
|
@@ -35,4 +35,13 @@ declare const customerTypesRecord: Readonly<{
|
|
|
35
35
|
}>;
|
|
36
36
|
type CustomerType = (typeof customerTypesArray)[number];
|
|
37
37
|
//#endregion
|
|
38
|
-
|
|
38
|
+
//#region src/app/domain/(catalog)/products/products.enums.d.ts
|
|
39
|
+
export declare const productStatusesArray: readonly ['draft', 'active', 'archived'];
|
|
40
|
+
declare const productStatusesRecord: Readonly<{
|
|
41
|
+
ACTIVE: "active";
|
|
42
|
+
ARCHIVED: "archived";
|
|
43
|
+
DRAFT: "draft";
|
|
44
|
+
}>;
|
|
45
|
+
type ProductStatus = (typeof productStatusesArray)[number];
|
|
46
|
+
//#endregion
|
|
47
|
+
export { type AuditLogSource, type CustomerType, type EntityStatus, type Locale, type ProductStatus, auditLogSourcesRecord as auditLogSource, customerTypesRecord as customerType, entityStatusesRecord as entityStatus, productStatusesRecord as productStatus };
|
package/enums.js
CHANGED
|
@@ -31,6 +31,13 @@ import { pgEnum as pgEnum2 } from "drizzle-orm/pg-core";
|
|
|
31
31
|
var customerTypesArray = ["individual", "individual_entrepreneur", "legal_entity"];
|
|
32
32
|
var customerTypePGEnum = pgEnum2("customer_type", customerTypesArray);
|
|
33
33
|
var customerTypesRecord = createStringEnumRecord4(customerTypesArray);
|
|
34
|
+
|
|
35
|
+
// src/app/domain/(catalog)/products/products.enums.ts
|
|
36
|
+
import { createStringEnumRecord as createStringEnumRecord5 } from "@kalutskii/foundation";
|
|
37
|
+
import { pgEnum as pgEnum3 } from "drizzle-orm/pg-core";
|
|
38
|
+
var productStatusesArray = ["draft", "active", "archived"];
|
|
39
|
+
var productStatusPGEnum = pgEnum3("product_status", productStatusesArray);
|
|
40
|
+
var productStatusesRecord = createStringEnumRecord5(productStatusesArray);
|
|
34
41
|
export {
|
|
35
42
|
auditLogSourcesRecord as auditLogSource,
|
|
36
43
|
auditLogSourcesArray,
|
|
@@ -38,5 +45,7 @@ export {
|
|
|
38
45
|
customerTypesArray,
|
|
39
46
|
entityStatusesRecord as entityStatus,
|
|
40
47
|
locale,
|
|
41
|
-
localesArray
|
|
48
|
+
localesArray,
|
|
49
|
+
productStatusesRecord as productStatus,
|
|
50
|
+
productStatusesArray
|
|
42
51
|
};
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -246,11 +246,11 @@ declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
|
|
|
246
246
|
identity: undefined;
|
|
247
247
|
generated: undefined;
|
|
248
248
|
}>;
|
|
249
|
-
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">, {
|
|
249
|
+
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">, {
|
|
250
250
|
name: string;
|
|
251
251
|
tableName: "audit_logs";
|
|
252
252
|
dataType: "string";
|
|
253
|
-
data: "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated";
|
|
253
|
+
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";
|
|
254
254
|
driverParam: string;
|
|
255
255
|
notNull: true;
|
|
256
256
|
hasDefault: false;
|
|
@@ -422,4 +422,199 @@ type CustomerSelectOneQuery = z.infer<typeof customerSelectOneQuerySchema>;
|
|
|
422
422
|
type CustomerCreatePayload = z.infer<typeof customerCreatePayloadSchema>;
|
|
423
423
|
type CustomerUpdatePayload = z.infer<typeof customerUpdatePayloadSchema>;
|
|
424
424
|
//#endregion
|
|
425
|
-
|
|
425
|
+
//#region src/app/domain/(finance)/currencies/currencies.schemas.d.ts
|
|
426
|
+
declare const currencySchema: z.ZodObject<{
|
|
427
|
+
id: z.ZodInt;
|
|
428
|
+
code: z.ZodString;
|
|
429
|
+
name: z.ZodString;
|
|
430
|
+
}, z.core.$strip>;
|
|
431
|
+
type Currency = z.infer<typeof currencySchema>;
|
|
432
|
+
//#endregion
|
|
433
|
+
//#region src/app/domain/(finance)/exchange-rates/exchange-rates.schemas.d.ts
|
|
434
|
+
declare const exchangeRateSchema: z.ZodObject<{
|
|
435
|
+
id: z.ZodInt;
|
|
436
|
+
currencyId: z.ZodInt;
|
|
437
|
+
rate: z.ZodNumber;
|
|
438
|
+
validFromDate: z.ZodDate;
|
|
439
|
+
}, z.core.$strip>;
|
|
440
|
+
type ExchangeRate = z.infer<typeof exchangeRateSchema>;
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region src/app/flows/exchange-rate/exchange-rate.schemas.d.ts
|
|
443
|
+
declare const exchangeRateSearchOptionsSchema: z.ZodObject<{
|
|
444
|
+
where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
445
|
+
currencyId: z.ZodOptional<z.ZodInt>;
|
|
446
|
+
validFromDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
447
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
448
|
+
currencyId: number;
|
|
449
|
+
validFromDate?: Date | undefined;
|
|
450
|
+
} | {
|
|
451
|
+
currencyId?: number | undefined;
|
|
452
|
+
validFromDate: Date;
|
|
453
|
+
}, {
|
|
454
|
+
currencyId?: number | undefined;
|
|
455
|
+
validFromDate?: Date | undefined;
|
|
456
|
+
}>>>;
|
|
457
|
+
pagination: z.ZodObject<{
|
|
458
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
459
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
460
|
+
}, z.core.$strip>;
|
|
461
|
+
}, z.core.$strict>;
|
|
462
|
+
type ExchangeRateSearchOptions = z.infer<typeof exchangeRateSearchOptionsSchema>;
|
|
463
|
+
type ExchangeRateSearchResult = {
|
|
464
|
+
exchangeRates: ExchangeRate[];
|
|
465
|
+
total: number;
|
|
466
|
+
};
|
|
467
|
+
type ExchangeRateDateSearchResult = {
|
|
468
|
+
dates: Date[];
|
|
469
|
+
total: number;
|
|
470
|
+
};
|
|
471
|
+
type CurrencyListResult = {
|
|
472
|
+
currencies: Currency[];
|
|
473
|
+
};
|
|
474
|
+
//#endregion
|
|
475
|
+
//#region src/app/domain/(catalog)/products/products.fields.d.ts
|
|
476
|
+
declare const productImageSchema: z.ZodObject<{
|
|
477
|
+
src: z.ZodURL;
|
|
478
|
+
isBanner: z.ZodBoolean;
|
|
479
|
+
}, z.core.$strip>;
|
|
480
|
+
declare const productImagesSchema: z.ZodArray<z.ZodObject<{
|
|
481
|
+
src: z.ZodURL;
|
|
482
|
+
isBanner: z.ZodBoolean;
|
|
483
|
+
}, z.core.$strip>>;
|
|
484
|
+
type ProductImage = z.infer<typeof productImageSchema>;
|
|
485
|
+
type ProductImages = z.infer<typeof productImagesSchema>;
|
|
486
|
+
//#endregion
|
|
487
|
+
//#region src/app/domain/(catalog)/products/products.schemas.d.ts
|
|
488
|
+
declare const productSchema: z.ZodObject<{
|
|
489
|
+
id: z.ZodInt;
|
|
490
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
491
|
+
status: z.ZodEnum<{
|
|
492
|
+
active: "active";
|
|
493
|
+
archived: "archived";
|
|
494
|
+
draft: "draft";
|
|
495
|
+
}>;
|
|
496
|
+
name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
497
|
+
en: "en";
|
|
498
|
+
ka: "ka";
|
|
499
|
+
ru: "ru";
|
|
500
|
+
}> & z.core.$partial, z.ZodString>>;
|
|
501
|
+
description: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
502
|
+
en: "en";
|
|
503
|
+
ka: "ka";
|
|
504
|
+
ru: "ru";
|
|
505
|
+
}> & z.core.$partial, z.ZodString>>;
|
|
506
|
+
images: z.ZodArray<z.ZodObject<{
|
|
507
|
+
src: z.ZodURL;
|
|
508
|
+
isBanner: z.ZodBoolean;
|
|
509
|
+
}, z.core.$strip>>;
|
|
510
|
+
categoryId: z.ZodNullable<z.ZodInt>;
|
|
511
|
+
brandId: z.ZodNullable<z.ZodInt>;
|
|
512
|
+
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
513
|
+
createdAt: z.ZodDate;
|
|
514
|
+
}, z.core.$strip>;
|
|
515
|
+
type Product = z.infer<typeof productSchema>;
|
|
516
|
+
//#endregion
|
|
517
|
+
//#region src/app/flows/product/product.schemas.d.ts
|
|
518
|
+
declare const productSearchOptionsSchema: z.ZodObject<{
|
|
519
|
+
where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
520
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
521
|
+
active: "active";
|
|
522
|
+
archived: "archived";
|
|
523
|
+
draft: "draft";
|
|
524
|
+
}>>;
|
|
525
|
+
categoryId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
526
|
+
brandId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
527
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
528
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
529
|
+
categoryId?: number | null | undefined;
|
|
530
|
+
brandId: number | null;
|
|
531
|
+
} | {
|
|
532
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
533
|
+
categoryId: number | null;
|
|
534
|
+
brandId?: number | null | undefined;
|
|
535
|
+
} | {
|
|
536
|
+
status: "active" | "archived" | "draft";
|
|
537
|
+
categoryId?: number | null | undefined;
|
|
538
|
+
brandId?: number | null | undefined;
|
|
539
|
+
}, {
|
|
540
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
541
|
+
categoryId?: number | null | undefined;
|
|
542
|
+
brandId?: number | null | undefined;
|
|
543
|
+
}>>>;
|
|
544
|
+
query: z.ZodOptional<z.ZodString>;
|
|
545
|
+
pagination: z.ZodObject<{
|
|
546
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
547
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
548
|
+
}, z.core.$strip>;
|
|
549
|
+
}, z.core.$strict>;
|
|
550
|
+
declare const productSelectOneQuerySchema: z.ZodPipe<z.ZodObject<{
|
|
551
|
+
id: z.ZodOptional<z.ZodInt>;
|
|
552
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
553
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
554
|
+
id: number;
|
|
555
|
+
slug?: string | undefined;
|
|
556
|
+
} | {
|
|
557
|
+
id?: number | undefined;
|
|
558
|
+
slug: string;
|
|
559
|
+
}, {
|
|
560
|
+
id?: number | undefined;
|
|
561
|
+
slug?: string | undefined;
|
|
562
|
+
}>>;
|
|
563
|
+
declare const productCreatePayloadSchema: z.ZodObject<{
|
|
564
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
565
|
+
active: "active";
|
|
566
|
+
archived: "archived";
|
|
567
|
+
draft: "draft";
|
|
568
|
+
}>>;
|
|
569
|
+
slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
570
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
571
|
+
en: "en";
|
|
572
|
+
ka: "ka";
|
|
573
|
+
ru: "ru";
|
|
574
|
+
}> & z.core.$partial, z.ZodString>>>>;
|
|
575
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
576
|
+
en: "en";
|
|
577
|
+
ka: "ka";
|
|
578
|
+
ru: "ru";
|
|
579
|
+
}> & z.core.$partial, z.ZodString>>>>;
|
|
580
|
+
categoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>>>;
|
|
581
|
+
brandId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>>>;
|
|
582
|
+
images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>>>;
|
|
583
|
+
bannerImageIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
584
|
+
}, z.core.$strip>;
|
|
585
|
+
declare const productUpdatePayloadSchema: z.ZodObject<{
|
|
586
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
587
|
+
active: "active";
|
|
588
|
+
archived: "archived";
|
|
589
|
+
draft: "draft";
|
|
590
|
+
}>>;
|
|
591
|
+
slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
592
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
593
|
+
en: "en";
|
|
594
|
+
ka: "ka";
|
|
595
|
+
ru: "ru";
|
|
596
|
+
}> & z.core.$partial, z.ZodString>>>>;
|
|
597
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
598
|
+
en: "en";
|
|
599
|
+
ka: "ka";
|
|
600
|
+
ru: "ru";
|
|
601
|
+
}> & z.core.$partial, z.ZodString>>>>;
|
|
602
|
+
categoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>>>;
|
|
603
|
+
brandId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>>>;
|
|
604
|
+
images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>>>;
|
|
605
|
+
bannerImageIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
606
|
+
productId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
|
|
607
|
+
}, z.core.$strip>;
|
|
608
|
+
type ProductSearchOptions = z.infer<typeof productSearchOptionsSchema>;
|
|
609
|
+
type ProductSearchResult = {
|
|
610
|
+
products: Product[];
|
|
611
|
+
total: number;
|
|
612
|
+
};
|
|
613
|
+
type ProductSelectOneQuery = z.infer<typeof productSelectOneQuerySchema>;
|
|
614
|
+
type ProductCreatePayload = z.infer<typeof productCreatePayloadSchema>;
|
|
615
|
+
type ProductCreateResult = {
|
|
616
|
+
product: Product;
|
|
617
|
+
};
|
|
618
|
+
type ProductUpdatePayload = z.infer<typeof productUpdatePayloadSchema>;
|
|
619
|
+
//#endregion
|
|
620
|
+
export type { AuditLogResult, AuditLogSearchPayload, AuditLogSearchResult, AuditLogSelectOneQuery, Brand, BrandCreatePayload, BrandSearchOptions, BrandSearchResult, BrandSelectOneQuery, BrandUpdatePayload, Category, CategoryCreatePayload, CategorySearchOptions, CategorySearchResult, CategorySelectOneQuery, CategoryUpdatePayload, Country, CountryCreatePayload, CountrySearchOptions, CountrySearchResult, CountrySelectOneQuery, CountryUpdatePayload, Currency, CurrencyListResult, Customer, CustomerCreatePayload, CustomerSearchOptions, CustomerSearchResult, CustomerSelectOneQuery, CustomerUpdatePayload, ExchangeRate, ExchangeRateDateSearchResult, ExchangeRateSearchOptions, ExchangeRateSearchResult, Product, ProductCreatePayload, ProductCreateResult, ProductImage, ProductImages, ProductSearchOptions, ProductSearchResult, ProductSelectOneQuery, ProductUpdatePayload };
|