@esb-market-contracts/backend 1.0.23 → 1.0.25
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 +35 -4
- package/package.json +1 -1
- package/types.d.ts +36 -24
package/api.d.ts
CHANGED
|
@@ -404,7 +404,20 @@ declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
|
|
|
404
404
|
};
|
|
405
405
|
};
|
|
406
406
|
};
|
|
407
|
-
}
|
|
407
|
+
} & {
|
|
408
|
+
"/catalog/product-variants/delete": {
|
|
409
|
+
$post: {
|
|
410
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
411
|
+
outputFormat: "json";
|
|
412
|
+
status: 200;
|
|
413
|
+
input: {
|
|
414
|
+
json: {
|
|
415
|
+
productVariantId: number;
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
}, "/catalog/product-variants", "/catalog/product-variants/delete">;
|
|
408
421
|
type ProductVariantsRouter = typeof productVariantsRouter;
|
|
409
422
|
//#endregion
|
|
410
423
|
//#region src/app/routes/(catalog)/products.routes.d.ts
|
|
@@ -417,6 +430,7 @@ declare const productsRouter: import("hono/hono-base").HonoBase<{
|
|
|
417
430
|
product: {
|
|
418
431
|
id: number;
|
|
419
432
|
slug: string | null;
|
|
433
|
+
model: string | null;
|
|
420
434
|
status: "active" | "archived" | "draft";
|
|
421
435
|
name: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
422
436
|
description: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
@@ -450,6 +464,7 @@ declare const productsRouter: import("hono/hono-base").HonoBase<{
|
|
|
450
464
|
product: {
|
|
451
465
|
id: number;
|
|
452
466
|
slug: string | null;
|
|
467
|
+
model: string | null;
|
|
453
468
|
status: "active" | "archived" | "draft";
|
|
454
469
|
name: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
455
470
|
description: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
@@ -468,6 +483,7 @@ declare const productsRouter: import("hono/hono-base").HonoBase<{
|
|
|
468
483
|
input: {
|
|
469
484
|
form: {
|
|
470
485
|
slug?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
486
|
+
model: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
|
|
471
487
|
name?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
472
488
|
description?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
473
489
|
categoryId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
@@ -485,6 +501,7 @@ declare const productsRouter: import("hono/hono-base").HonoBase<{
|
|
|
485
501
|
products: {
|
|
486
502
|
id: number;
|
|
487
503
|
slug: string | null;
|
|
504
|
+
model: string | null;
|
|
488
505
|
status: "active" | "archived" | "draft";
|
|
489
506
|
name: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
490
507
|
description: Partial<Record<"en" | "ka" | "ru", string>> | null;
|
|
@@ -527,6 +544,7 @@ declare const productsRouter: import("hono/hono-base").HonoBase<{
|
|
|
527
544
|
form: {
|
|
528
545
|
status?: "active" | "archived" | "draft" | undefined;
|
|
529
546
|
slug?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
547
|
+
model?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
530
548
|
name?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
531
549
|
description?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
532
550
|
categoryId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
|
|
@@ -538,7 +556,20 @@ declare const productsRouter: import("hono/hono-base").HonoBase<{
|
|
|
538
556
|
};
|
|
539
557
|
};
|
|
540
558
|
};
|
|
541
|
-
}
|
|
559
|
+
} & {
|
|
560
|
+
"/catalog/products/delete": {
|
|
561
|
+
$post: {
|
|
562
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
563
|
+
outputFormat: "json";
|
|
564
|
+
status: 200;
|
|
565
|
+
input: {
|
|
566
|
+
json: {
|
|
567
|
+
productId: number;
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
}, "/catalog/products", "/catalog/products/delete">;
|
|
542
573
|
type ProductsRouter = typeof productsRouter;
|
|
543
574
|
//#endregion
|
|
544
575
|
//#region src/app/routes/(finance)/exchange-rates.routes.d.ts
|
|
@@ -634,11 +665,11 @@ declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
|
|
|
634
665
|
identity: undefined;
|
|
635
666
|
generated: undefined;
|
|
636
667
|
}>;
|
|
637
|
-
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">, {
|
|
668
|
+
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.deleted" | "product.updated" | "productVariant.created" | "productVariant.deleted" | "productVariant.updated">, {
|
|
638
669
|
name: string;
|
|
639
670
|
tableName: "audit_logs";
|
|
640
671
|
dataType: "string";
|
|
641
|
-
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";
|
|
672
|
+
data: "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated" | "product.created" | "product.deleted" | "product.updated" | "productVariant.created" | "productVariant.deleted" | "productVariant.updated";
|
|
642
673
|
driverParam: string;
|
|
643
674
|
notNull: true;
|
|
644
675
|
hasDefault: false;
|
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 "postgres";
|
|
3
4
|
import "drizzle-orm";
|
|
4
5
|
//#region src/app/domain/(catalog)/brands/brands.schemas.d.ts
|
|
5
6
|
declare const brandSchema: z.ZodObject<{
|
|
@@ -247,11 +248,11 @@ declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
|
|
|
247
248
|
identity: undefined;
|
|
248
249
|
generated: undefined;
|
|
249
250
|
}>;
|
|
250
|
-
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">, {
|
|
251
|
+
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.deleted" | "product.updated" | "productVariant.created" | "productVariant.deleted" | "productVariant.updated">, {
|
|
251
252
|
name: string;
|
|
252
253
|
tableName: "audit_logs";
|
|
253
254
|
dataType: "string";
|
|
254
|
-
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";
|
|
255
|
+
data: "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated" | "product.created" | "product.deleted" | "product.updated" | "productVariant.created" | "productVariant.deleted" | "productVariant.updated";
|
|
255
256
|
driverParam: string;
|
|
256
257
|
notNull: true;
|
|
257
258
|
hasDefault: false;
|
|
@@ -485,10 +486,32 @@ declare const productImagesSchema: z.ZodArray<z.ZodObject<{
|
|
|
485
486
|
type ProductImage = z.infer<typeof productImageSchema>;
|
|
486
487
|
type ProductImages = z.infer<typeof productImagesSchema>;
|
|
487
488
|
//#endregion
|
|
489
|
+
//#region src/app/domain/(catalog)/product-variants/product-variants.schemas.d.ts
|
|
490
|
+
declare const productVariantSchema: z.ZodObject<{
|
|
491
|
+
id: z.ZodInt;
|
|
492
|
+
productId: z.ZodInt;
|
|
493
|
+
status: z.ZodEnum<{
|
|
494
|
+
active: "active";
|
|
495
|
+
archived: "archived";
|
|
496
|
+
draft: "draft";
|
|
497
|
+
}>;
|
|
498
|
+
sku: z.ZodNullable<z.ZodString>;
|
|
499
|
+
barcode: z.ZodNullable<z.ZodString>;
|
|
500
|
+
name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
501
|
+
en: "en";
|
|
502
|
+
ka: "ka";
|
|
503
|
+
ru: "ru";
|
|
504
|
+
}> & z.core.$partial, z.ZodString>>;
|
|
505
|
+
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
506
|
+
createdAt: z.ZodDate;
|
|
507
|
+
}, z.core.$strip>;
|
|
508
|
+
type ProductVariant = z.infer<typeof productVariantSchema>;
|
|
509
|
+
//#endregion
|
|
488
510
|
//#region src/app/domain/(catalog)/products/products.schemas.d.ts
|
|
489
511
|
declare const productSchema: z.ZodObject<{
|
|
490
512
|
id: z.ZodInt;
|
|
491
513
|
slug: z.ZodNullable<z.ZodString>;
|
|
514
|
+
model: z.ZodNullable<z.ZodString>;
|
|
492
515
|
status: z.ZodEnum<{
|
|
493
516
|
active: "active";
|
|
494
517
|
archived: "archived";
|
|
@@ -561,8 +584,12 @@ declare const productSelectOneQuerySchema: z.ZodPipe<z.ZodObject<{
|
|
|
561
584
|
id?: number | undefined;
|
|
562
585
|
slug?: string | undefined;
|
|
563
586
|
}>>;
|
|
587
|
+
declare const productDeletePayloadSchema: z.ZodObject<{
|
|
588
|
+
productId: z.ZodInt;
|
|
589
|
+
}, z.core.$strip>;
|
|
564
590
|
declare const productCreatePayloadSchema: z.ZodObject<{
|
|
565
591
|
slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
592
|
+
model: z.ZodPreprocess<z.ZodNullable<z.ZodString>>;
|
|
566
593
|
name: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
567
594
|
en: "en";
|
|
568
595
|
ka: "ka";
|
|
@@ -585,6 +612,7 @@ declare const productUpdatePayloadSchema: z.ZodObject<{
|
|
|
585
612
|
draft: "draft";
|
|
586
613
|
}>>;
|
|
587
614
|
slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
615
|
+
model: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
|
|
588
616
|
name: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
589
617
|
en: "en";
|
|
590
618
|
ka: "ka";
|
|
@@ -607,33 +635,13 @@ type ProductSearchResult = {
|
|
|
607
635
|
total: number;
|
|
608
636
|
};
|
|
609
637
|
type ProductSelectOneQuery = z.infer<typeof productSelectOneQuerySchema>;
|
|
638
|
+
type ProductDeletePayload = z.infer<typeof productDeletePayloadSchema>;
|
|
610
639
|
type ProductCreatePayload = z.infer<typeof productCreatePayloadSchema>;
|
|
611
640
|
type ProductCreateResult = {
|
|
612
641
|
product: Product;
|
|
613
642
|
};
|
|
614
643
|
type ProductUpdatePayload = z.infer<typeof productUpdatePayloadSchema>;
|
|
615
644
|
//#endregion
|
|
616
|
-
//#region src/app/domain/(catalog)/product-variants/product-variants.schemas.d.ts
|
|
617
|
-
declare const productVariantSchema: z.ZodObject<{
|
|
618
|
-
id: z.ZodInt;
|
|
619
|
-
productId: z.ZodInt;
|
|
620
|
-
status: z.ZodEnum<{
|
|
621
|
-
active: "active";
|
|
622
|
-
archived: "archived";
|
|
623
|
-
draft: "draft";
|
|
624
|
-
}>;
|
|
625
|
-
sku: z.ZodNullable<z.ZodString>;
|
|
626
|
-
barcode: z.ZodNullable<z.ZodString>;
|
|
627
|
-
name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
628
|
-
en: "en";
|
|
629
|
-
ka: "ka";
|
|
630
|
-
ru: "ru";
|
|
631
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
632
|
-
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
633
|
-
createdAt: z.ZodDate;
|
|
634
|
-
}, z.core.$strip>;
|
|
635
|
-
type ProductVariant = z.infer<typeof productVariantSchema>;
|
|
636
|
-
//#endregion
|
|
637
645
|
//#region src/app/flows/product-variant/product-variant.schemas.d.ts
|
|
638
646
|
declare const productVariantSearchOptionsSchema: z.ZodObject<{
|
|
639
647
|
where: z.ZodNonOptional<z.ZodOptional<z.ZodObject<{
|
|
@@ -653,6 +661,9 @@ declare const productVariantSearchOptionsSchema: z.ZodObject<{
|
|
|
653
661
|
declare const productVariantSelectOneQuerySchema: z.ZodObject<{
|
|
654
662
|
id: z.ZodInt;
|
|
655
663
|
}, z.core.$strip>;
|
|
664
|
+
declare const productVariantDeletePayloadSchema: z.ZodObject<{
|
|
665
|
+
productVariantId: z.ZodInt;
|
|
666
|
+
}, z.core.$strip>;
|
|
656
667
|
declare const productVariantCreatePayloadSchema: z.ZodObject<{
|
|
657
668
|
productId: z.ZodInt;
|
|
658
669
|
status: z.ZodOptional<z.ZodEnum<{
|
|
@@ -689,10 +700,11 @@ type ProductVariantSearchResult = {
|
|
|
689
700
|
total: number;
|
|
690
701
|
};
|
|
691
702
|
type ProductVariantSelectOneQuery = z.infer<typeof productVariantSelectOneQuerySchema>;
|
|
703
|
+
type ProductVariantDeletePayload = z.infer<typeof productVariantDeletePayloadSchema>;
|
|
692
704
|
type ProductVariantCreatePayload = z.infer<typeof productVariantCreatePayloadSchema>;
|
|
693
705
|
type ProductVariantCreateResult = {
|
|
694
706
|
productVariant: ProductVariant;
|
|
695
707
|
};
|
|
696
708
|
type ProductVariantUpdatePayload = z.infer<typeof productVariantUpdatePayloadSchema>;
|
|
697
709
|
//#endregion
|
|
698
|
-
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, ProductVariant, ProductVariantCreatePayload, ProductVariantCreateResult, ProductVariantSearchOptions, ProductVariantSearchResult, ProductVariantSelectOneQuery, ProductVariantUpdatePayload };
|
|
710
|
+
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, ProductDeletePayload, ProductImage, ProductImages, ProductSearchOptions, ProductSearchResult, ProductSelectOneQuery, ProductUpdatePayload, ProductVariant, ProductVariantCreatePayload, ProductVariantCreateResult, ProductVariantDeletePayload, ProductVariantSearchOptions, ProductVariantSearchResult, ProductVariantSelectOneQuery, ProductVariantUpdatePayload };
|