@esb-market-contracts/backend 1.0.20 → 1.0.22
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 +253 -1
- package/enums.d.ts +10 -1
- package/enums.js +10 -1
- package/package.json +1 -1
- package/types.d.ts +228 -1
package/api.d.ts
CHANGED
|
@@ -299,6 +299,258 @@ 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)/product-variants.routes.d.ts
|
|
303
|
+
declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
|
|
304
|
+
Variables: VariablesWithActor;
|
|
305
|
+
}, {
|
|
306
|
+
"/catalog/product-variants/one": {
|
|
307
|
+
$get: {
|
|
308
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
309
|
+
productVariant: {
|
|
310
|
+
id: number;
|
|
311
|
+
productId: number;
|
|
312
|
+
status: "active" | "archived" | "draft";
|
|
313
|
+
sku: string | null;
|
|
314
|
+
barcode: string | null;
|
|
315
|
+
name: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
316
|
+
updatedAt: Date | null;
|
|
317
|
+
createdAt: Date;
|
|
318
|
+
};
|
|
319
|
+
}>;
|
|
320
|
+
outputFormat: "json";
|
|
321
|
+
status: 200;
|
|
322
|
+
input: {
|
|
323
|
+
query: {
|
|
324
|
+
id: string | string[];
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
} & {
|
|
330
|
+
"/catalog/product-variants/create": {
|
|
331
|
+
$post: {
|
|
332
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
333
|
+
productVariant: {
|
|
334
|
+
id: number;
|
|
335
|
+
productId: number;
|
|
336
|
+
status: "active" | "archived" | "draft";
|
|
337
|
+
sku: string | null;
|
|
338
|
+
barcode: string | null;
|
|
339
|
+
name: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
340
|
+
updatedAt: Date | null;
|
|
341
|
+
createdAt: Date;
|
|
342
|
+
};
|
|
343
|
+
}>;
|
|
344
|
+
outputFormat: "json";
|
|
345
|
+
status: 201;
|
|
346
|
+
input: {
|
|
347
|
+
json: {
|
|
348
|
+
productId: number;
|
|
349
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
350
|
+
sku?: string | null | undefined;
|
|
351
|
+
barcode?: string | null | undefined;
|
|
352
|
+
name?: Partial<Record<"en" | "ka" | "ru", string>> | null | undefined;
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
} & {
|
|
358
|
+
"/catalog/product-variants/search": {
|
|
359
|
+
$post: {
|
|
360
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
361
|
+
productVariants: {
|
|
362
|
+
id: number;
|
|
363
|
+
productId: number;
|
|
364
|
+
status: "active" | "archived" | "draft";
|
|
365
|
+
sku: string | null;
|
|
366
|
+
barcode: string | null;
|
|
367
|
+
name: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
368
|
+
updatedAt: Date | null;
|
|
369
|
+
createdAt: Date;
|
|
370
|
+
}[];
|
|
371
|
+
total: number;
|
|
372
|
+
}>;
|
|
373
|
+
outputFormat: "json";
|
|
374
|
+
status: 200;
|
|
375
|
+
input: {
|
|
376
|
+
json: {
|
|
377
|
+
where: {
|
|
378
|
+
productId: number;
|
|
379
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
380
|
+
};
|
|
381
|
+
query?: string | undefined;
|
|
382
|
+
pagination: {
|
|
383
|
+
offset?: unknown;
|
|
384
|
+
limit?: unknown;
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
} & {
|
|
391
|
+
"/catalog/product-variants/update": {
|
|
392
|
+
$post: {
|
|
393
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
394
|
+
outputFormat: "json";
|
|
395
|
+
status: 200;
|
|
396
|
+
input: {
|
|
397
|
+
json: {
|
|
398
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
399
|
+
sku?: string | null | undefined;
|
|
400
|
+
barcode?: string | null | undefined;
|
|
401
|
+
name?: Partial<Record<"en" | "ka" | "ru", string>> | null | undefined;
|
|
402
|
+
productVariantId: number;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
}, "/catalog/product-variants", "/catalog/product-variants/update">;
|
|
408
|
+
type ProductVariantsRouter = typeof productVariantsRouter;
|
|
409
|
+
//#endregion
|
|
410
|
+
//#region src/app/routes/(catalog)/products.routes.d.ts
|
|
411
|
+
declare const productsRouter: import("hono/hono-base").HonoBase<{
|
|
412
|
+
Variables: VariablesWithActor;
|
|
413
|
+
}, {
|
|
414
|
+
"/catalog/products/one": {
|
|
415
|
+
$get: {
|
|
416
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
417
|
+
product: {
|
|
418
|
+
id: number;
|
|
419
|
+
slug: string | null;
|
|
420
|
+
status: "active" | "archived" | "draft";
|
|
421
|
+
name: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
422
|
+
description: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
423
|
+
images: {
|
|
424
|
+
src: string;
|
|
425
|
+
isBanner: boolean;
|
|
426
|
+
}[];
|
|
427
|
+
categoryId: number | null;
|
|
428
|
+
brandId: number | null;
|
|
429
|
+
updatedAt: Date | null;
|
|
430
|
+
createdAt: Date;
|
|
431
|
+
};
|
|
432
|
+
productVariants: {
|
|
433
|
+
id: number;
|
|
434
|
+
productId: number;
|
|
435
|
+
status: "active" | "archived" | "draft";
|
|
436
|
+
sku: string | null;
|
|
437
|
+
barcode: string | null;
|
|
438
|
+
name: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
439
|
+
updatedAt: Date | null;
|
|
440
|
+
createdAt: Date;
|
|
441
|
+
}[];
|
|
442
|
+
}>;
|
|
443
|
+
outputFormat: "json";
|
|
444
|
+
status: 200;
|
|
445
|
+
input: {
|
|
446
|
+
query: {
|
|
447
|
+
id: string | string[];
|
|
448
|
+
slug?: string | undefined;
|
|
449
|
+
} | {
|
|
450
|
+
id?: number | undefined;
|
|
451
|
+
slug: string | string[];
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
} & {
|
|
457
|
+
"/catalog/products/create": {
|
|
458
|
+
$post: {
|
|
459
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
460
|
+
product: {
|
|
461
|
+
id: number;
|
|
462
|
+
slug: string | null;
|
|
463
|
+
status: "active" | "archived" | "draft";
|
|
464
|
+
name: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
465
|
+
description: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
466
|
+
images: {
|
|
467
|
+
src: string;
|
|
468
|
+
isBanner: boolean;
|
|
469
|
+
}[];
|
|
470
|
+
categoryId: number | null;
|
|
471
|
+
brandId: number | null;
|
|
472
|
+
updatedAt: Date | null;
|
|
473
|
+
createdAt: Date;
|
|
474
|
+
};
|
|
475
|
+
}>;
|
|
476
|
+
outputFormat: "json";
|
|
477
|
+
status: 201;
|
|
478
|
+
input: {
|
|
479
|
+
form: {
|
|
480
|
+
slug?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
481
|
+
name?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
482
|
+
description?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
483
|
+
categoryId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
484
|
+
brandId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
485
|
+
images?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
486
|
+
bannerImageIndex?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
};
|
|
490
|
+
};
|
|
491
|
+
} & {
|
|
492
|
+
"/catalog/products/search": {
|
|
493
|
+
$post: {
|
|
494
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
495
|
+
products: {
|
|
496
|
+
id: number;
|
|
497
|
+
slug: string | null;
|
|
498
|
+
status: "active" | "archived" | "draft";
|
|
499
|
+
name: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
500
|
+
description: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
501
|
+
images: {
|
|
502
|
+
src: string;
|
|
503
|
+
isBanner: boolean;
|
|
504
|
+
}[];
|
|
505
|
+
categoryId: number | null;
|
|
506
|
+
brandId: number | null;
|
|
507
|
+
updatedAt: Date | null;
|
|
508
|
+
createdAt: Date;
|
|
509
|
+
}[];
|
|
510
|
+
total: number;
|
|
511
|
+
}>;
|
|
512
|
+
outputFormat: "json";
|
|
513
|
+
status: 200;
|
|
514
|
+
input: {
|
|
515
|
+
json: {
|
|
516
|
+
where?: {
|
|
517
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
518
|
+
categoryId?: number | null | undefined;
|
|
519
|
+
brandId?: number | null | undefined;
|
|
520
|
+
} | undefined;
|
|
521
|
+
query?: string | undefined;
|
|
522
|
+
pagination: {
|
|
523
|
+
offset?: unknown;
|
|
524
|
+
limit?: unknown;
|
|
525
|
+
};
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
};
|
|
530
|
+
} & {
|
|
531
|
+
"/catalog/products/update": {
|
|
532
|
+
$post: {
|
|
533
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
534
|
+
outputFormat: "json";
|
|
535
|
+
status: 200;
|
|
536
|
+
input: {
|
|
537
|
+
form: {
|
|
538
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
539
|
+
slug?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
540
|
+
name?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
541
|
+
description?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
542
|
+
categoryId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
543
|
+
brandId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
544
|
+
images?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
545
|
+
bannerImageIndex?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
546
|
+
productId: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
}, "/catalog/products", "/catalog/products/update">;
|
|
552
|
+
type ProductsRouter = typeof productsRouter;
|
|
553
|
+
//#endregion
|
|
302
554
|
//#region src/app/routes/(finance)/exchange-rates.routes.d.ts
|
|
303
555
|
declare const exchangeRatesRouter: import("hono/hono-base").HonoBase<{
|
|
304
556
|
Variables: VariablesWithActor;
|
|
@@ -616,4 +868,4 @@ declare const customersRouter: import("hono/hono-base").HonoBase<{
|
|
|
616
868
|
}, "/operations/customers", "/operations/customers/update">;
|
|
617
869
|
type CustomersRouter = typeof customersRouter;
|
|
618
870
|
//#endregion
|
|
619
|
-
export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, ExchangeRatesRouter };
|
|
871
|
+
export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, ExchangeRatesRouter, ProductVariantsRouter, 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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import "hono/http-exception";
|
|
3
|
+
import "drizzle-orm";
|
|
3
4
|
//#region src/app/domain/(catalog)/brands/brands.schemas.d.ts
|
|
4
5
|
declare const brandSchema: z.ZodObject<{
|
|
5
6
|
id: z.ZodInt;
|
|
@@ -472,4 +473,230 @@ type CurrencyListResult = {
|
|
|
472
473
|
currencies: Currency[];
|
|
473
474
|
};
|
|
474
475
|
//#endregion
|
|
475
|
-
|
|
476
|
+
//#region src/app/domain/(catalog)/product-variants/product-variants.schemas.d.ts
|
|
477
|
+
declare const productVariantSchema: z.ZodObject<{
|
|
478
|
+
id: z.ZodInt;
|
|
479
|
+
productId: z.ZodInt;
|
|
480
|
+
status: z.ZodEnum<{
|
|
481
|
+
active: "active";
|
|
482
|
+
archived: "archived";
|
|
483
|
+
draft: "draft";
|
|
484
|
+
}>;
|
|
485
|
+
sku: z.ZodNullable<z.ZodString>;
|
|
486
|
+
barcode: z.ZodNullable<z.ZodString>;
|
|
487
|
+
name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
488
|
+
en: "en";
|
|
489
|
+
ka: "ka";
|
|
490
|
+
ru: "ru";
|
|
491
|
+
}> & z.core.$partial, z.ZodString>>;
|
|
492
|
+
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
493
|
+
createdAt: z.ZodDate;
|
|
494
|
+
}, z.core.$strip>;
|
|
495
|
+
type ProductVariant = z.infer<typeof productVariantSchema>;
|
|
496
|
+
//#endregion
|
|
497
|
+
//#region src/app/domain/(catalog)/products/products.fields.d.ts
|
|
498
|
+
declare const productImageSchema: z.ZodObject<{
|
|
499
|
+
src: z.ZodURL;
|
|
500
|
+
isBanner: z.ZodBoolean;
|
|
501
|
+
}, z.core.$strip>;
|
|
502
|
+
declare const productImagesSchema: z.ZodArray<z.ZodObject<{
|
|
503
|
+
src: z.ZodURL;
|
|
504
|
+
isBanner: z.ZodBoolean;
|
|
505
|
+
}, z.core.$strip>>;
|
|
506
|
+
type ProductImage = z.infer<typeof productImageSchema>;
|
|
507
|
+
type ProductImages = z.infer<typeof productImagesSchema>;
|
|
508
|
+
//#endregion
|
|
509
|
+
//#region src/app/domain/(catalog)/products/products.schemas.d.ts
|
|
510
|
+
declare const productSchema: z.ZodObject<{
|
|
511
|
+
id: z.ZodInt;
|
|
512
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
513
|
+
status: z.ZodEnum<{
|
|
514
|
+
active: "active";
|
|
515
|
+
archived: "archived";
|
|
516
|
+
draft: "draft";
|
|
517
|
+
}>;
|
|
518
|
+
name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
519
|
+
en: "en";
|
|
520
|
+
ka: "ka";
|
|
521
|
+
ru: "ru";
|
|
522
|
+
}> & z.core.$partial, z.ZodString>>;
|
|
523
|
+
description: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
524
|
+
en: "en";
|
|
525
|
+
ka: "ka";
|
|
526
|
+
ru: "ru";
|
|
527
|
+
}> & z.core.$partial, z.ZodString>>;
|
|
528
|
+
images: z.ZodArray<z.ZodObject<{
|
|
529
|
+
src: z.ZodURL;
|
|
530
|
+
isBanner: z.ZodBoolean;
|
|
531
|
+
}, z.core.$strip>>;
|
|
532
|
+
categoryId: z.ZodNullable<z.ZodInt>;
|
|
533
|
+
brandId: z.ZodNullable<z.ZodInt>;
|
|
534
|
+
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
535
|
+
createdAt: z.ZodDate;
|
|
536
|
+
}, z.core.$strip>;
|
|
537
|
+
type Product = z.infer<typeof productSchema>;
|
|
538
|
+
//#endregion
|
|
539
|
+
//#region src/app/flows/product/product.schemas.d.ts
|
|
540
|
+
declare const productSearchOptionsSchema: z.ZodObject<{
|
|
541
|
+
where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
542
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
543
|
+
active: "active";
|
|
544
|
+
archived: "archived";
|
|
545
|
+
draft: "draft";
|
|
546
|
+
}>>;
|
|
547
|
+
categoryId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
548
|
+
brandId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
549
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
550
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
551
|
+
categoryId?: number | null | undefined;
|
|
552
|
+
brandId: number | null;
|
|
553
|
+
} | {
|
|
554
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
555
|
+
categoryId: number | null;
|
|
556
|
+
brandId?: number | null | undefined;
|
|
557
|
+
} | {
|
|
558
|
+
status: "active" | "archived" | "draft";
|
|
559
|
+
categoryId?: number | null | undefined;
|
|
560
|
+
brandId?: number | null | undefined;
|
|
561
|
+
}, {
|
|
562
|
+
status?: "active" | "archived" | "draft" | undefined;
|
|
563
|
+
categoryId?: number | null | undefined;
|
|
564
|
+
brandId?: number | null | undefined;
|
|
565
|
+
}>>>;
|
|
566
|
+
query: z.ZodOptional<z.ZodString>;
|
|
567
|
+
pagination: z.ZodObject<{
|
|
568
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
569
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
570
|
+
}, z.core.$strip>;
|
|
571
|
+
}, z.core.$strict>;
|
|
572
|
+
declare const productSelectOneQuerySchema: z.ZodPipe<z.ZodObject<{
|
|
573
|
+
id: z.ZodOptional<z.ZodInt>;
|
|
574
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
575
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
576
|
+
id: number;
|
|
577
|
+
slug?: string | undefined;
|
|
578
|
+
} | {
|
|
579
|
+
id?: number | undefined;
|
|
580
|
+
slug: string;
|
|
581
|
+
}, {
|
|
582
|
+
id?: number | undefined;
|
|
583
|
+
slug?: string | undefined;
|
|
584
|
+
}>>;
|
|
585
|
+
declare const productCreatePayloadSchema: z.ZodObject<{
|
|
586
|
+
slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
587
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
588
|
+
en: "en";
|
|
589
|
+
ka: "ka";
|
|
590
|
+
ru: "ru";
|
|
591
|
+
}> & z.core.$partial, z.ZodString>>>>;
|
|
592
|
+
description: 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
|
+
categoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>>>;
|
|
598
|
+
brandId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>>>;
|
|
599
|
+
images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>>>;
|
|
600
|
+
bannerImageIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
601
|
+
}, z.core.$strip>;
|
|
602
|
+
declare const productUpdatePayloadSchema: z.ZodObject<{
|
|
603
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
604
|
+
active: "active";
|
|
605
|
+
archived: "archived";
|
|
606
|
+
draft: "draft";
|
|
607
|
+
}>>;
|
|
608
|
+
slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
609
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
610
|
+
en: "en";
|
|
611
|
+
ka: "ka";
|
|
612
|
+
ru: "ru";
|
|
613
|
+
}> & z.core.$partial, z.ZodString>>>>;
|
|
614
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
615
|
+
en: "en";
|
|
616
|
+
ka: "ka";
|
|
617
|
+
ru: "ru";
|
|
618
|
+
}> & z.core.$partial, z.ZodString>>>>;
|
|
619
|
+
categoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>>>;
|
|
620
|
+
brandId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>>>;
|
|
621
|
+
images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>>>;
|
|
622
|
+
bannerImageIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
623
|
+
productId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
|
|
624
|
+
}, z.core.$strip>;
|
|
625
|
+
type ProductSearchOptions = z.infer<typeof productSearchOptionsSchema>;
|
|
626
|
+
type ProductSearchResult = {
|
|
627
|
+
products: Product[];
|
|
628
|
+
total: number;
|
|
629
|
+
};
|
|
630
|
+
type ProductSelectOneQuery = z.infer<typeof productSelectOneQuerySchema>;
|
|
631
|
+
type ProductSelectOneResult = {
|
|
632
|
+
product: Product;
|
|
633
|
+
productVariants: ProductVariant[];
|
|
634
|
+
};
|
|
635
|
+
type ProductCreatePayload = z.infer<typeof productCreatePayloadSchema>;
|
|
636
|
+
type ProductCreateResult = {
|
|
637
|
+
product: Product;
|
|
638
|
+
};
|
|
639
|
+
type ProductUpdatePayload = z.infer<typeof productUpdatePayloadSchema>;
|
|
640
|
+
//#endregion
|
|
641
|
+
//#region src/app/flows/product-variant/product-variant.schemas.d.ts
|
|
642
|
+
declare const productVariantSearchOptionsSchema: z.ZodObject<{
|
|
643
|
+
where: z.ZodNonOptional<z.ZodOptional<z.ZodObject<{
|
|
644
|
+
productId: z.ZodInt;
|
|
645
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
646
|
+
active: "active";
|
|
647
|
+
archived: "archived";
|
|
648
|
+
draft: "draft";
|
|
649
|
+
}>>;
|
|
650
|
+
}, z.core.$strip>>>;
|
|
651
|
+
query: z.ZodOptional<z.ZodString>;
|
|
652
|
+
pagination: z.ZodObject<{
|
|
653
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
654
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
655
|
+
}, z.core.$strip>;
|
|
656
|
+
}, z.core.$strict>;
|
|
657
|
+
declare const productVariantSelectOneQuerySchema: z.ZodObject<{
|
|
658
|
+
id: z.ZodInt;
|
|
659
|
+
}, z.core.$strip>;
|
|
660
|
+
declare const productVariantCreatePayloadSchema: z.ZodObject<{
|
|
661
|
+
productId: z.ZodInt;
|
|
662
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
663
|
+
active: "active";
|
|
664
|
+
archived: "archived";
|
|
665
|
+
draft: "draft";
|
|
666
|
+
}>>;
|
|
667
|
+
sku: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
668
|
+
barcode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
669
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
670
|
+
en: "en";
|
|
671
|
+
ka: "ka";
|
|
672
|
+
ru: "ru";
|
|
673
|
+
}> & z.core.$partial, z.ZodString>>>;
|
|
674
|
+
}, z.core.$strip>;
|
|
675
|
+
declare const productVariantUpdatePayloadSchema: z.ZodObject<{
|
|
676
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
677
|
+
active: "active";
|
|
678
|
+
archived: "archived";
|
|
679
|
+
draft: "draft";
|
|
680
|
+
}>>;
|
|
681
|
+
sku: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
682
|
+
barcode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
683
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
684
|
+
en: "en";
|
|
685
|
+
ka: "ka";
|
|
686
|
+
ru: "ru";
|
|
687
|
+
}> & z.core.$partial, z.ZodString>>>;
|
|
688
|
+
productVariantId: z.ZodInt;
|
|
689
|
+
}, z.core.$strip>;
|
|
690
|
+
type ProductVariantSearchOptions = z.infer<typeof productVariantSearchOptionsSchema>;
|
|
691
|
+
type ProductVariantSearchResult = {
|
|
692
|
+
productVariants: ProductVariant[];
|
|
693
|
+
total: number;
|
|
694
|
+
};
|
|
695
|
+
type ProductVariantSelectOneQuery = z.infer<typeof productVariantSelectOneQuerySchema>;
|
|
696
|
+
type ProductVariantCreatePayload = z.infer<typeof productVariantCreatePayloadSchema>;
|
|
697
|
+
type ProductVariantCreateResult = {
|
|
698
|
+
productVariant: ProductVariant;
|
|
699
|
+
};
|
|
700
|
+
type ProductVariantUpdatePayload = z.infer<typeof productVariantUpdatePayloadSchema>;
|
|
701
|
+
//#endregion
|
|
702
|
+
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, ProductSelectOneResult, ProductUpdatePayload, ProductVariant, ProductVariantCreatePayload, ProductVariantCreateResult, ProductVariantSearchOptions, ProductVariantSearchResult, ProductVariantSelectOneQuery, ProductVariantUpdatePayload };
|