@esb-market-contracts/backend 1.0.0 → 1.0.2
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 +6 -6
- package/enums.d.ts +11 -0
- package/enums.js +18 -3
- package/package.json +1 -1
package/api.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type VariablesWithActor = {
|
|
|
8
8
|
declare const categoriesRouter: import("hono/hono-base").HonoBase<{
|
|
9
9
|
Variables: VariablesWithActor;
|
|
10
10
|
}, {
|
|
11
|
-
"/
|
|
11
|
+
"/catalog/categories/one": {
|
|
12
12
|
$get: {
|
|
13
13
|
input: {
|
|
14
14
|
query: {
|
|
@@ -36,7 +36,7 @@ declare const categoriesRouter: import("hono/hono-base").HonoBase<{
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
} & {
|
|
39
|
-
"/
|
|
39
|
+
"/catalog/categories/create": {
|
|
40
40
|
$post: {
|
|
41
41
|
input: {
|
|
42
42
|
form: {
|
|
@@ -52,7 +52,7 @@ declare const categoriesRouter: import("hono/hono-base").HonoBase<{
|
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
} & {
|
|
55
|
-
"/
|
|
55
|
+
"/catalog/categories/search": {
|
|
56
56
|
$post: {
|
|
57
57
|
input: {
|
|
58
58
|
json: {
|
|
@@ -85,7 +85,7 @@ declare const categoriesRouter: import("hono/hono-base").HonoBase<{
|
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
} & {
|
|
88
|
-
"/
|
|
88
|
+
"/catalog/categories/update-metadata": {
|
|
89
89
|
$post: {
|
|
90
90
|
input: {
|
|
91
91
|
form: {
|
|
@@ -102,7 +102,7 @@ declare const categoriesRouter: import("hono/hono-base").HonoBase<{
|
|
|
102
102
|
};
|
|
103
103
|
};
|
|
104
104
|
} & {
|
|
105
|
-
"/
|
|
105
|
+
"/catalog/categories/switch-status": {
|
|
106
106
|
$post: {
|
|
107
107
|
input: {
|
|
108
108
|
json: {
|
|
@@ -115,7 +115,7 @@ declare const categoriesRouter: import("hono/hono-base").HonoBase<{
|
|
|
115
115
|
status: 200;
|
|
116
116
|
};
|
|
117
117
|
};
|
|
118
|
-
}, "/
|
|
118
|
+
}, "/catalog/categories", "/catalog/categories/switch-status">;
|
|
119
119
|
export type CategoriesRouter = typeof categoriesRouter;
|
|
120
120
|
|
|
121
121
|
export {};
|
package/enums.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
+
export declare const localesArray: readonly [
|
|
4
|
+
"ka",
|
|
5
|
+
"en",
|
|
6
|
+
"ru"
|
|
7
|
+
];
|
|
8
|
+
export declare const locale: Readonly<{
|
|
9
|
+
KA: "ka";
|
|
10
|
+
EN: "en";
|
|
11
|
+
RU: "ru";
|
|
12
|
+
}>;
|
|
13
|
+
export type Locale = (typeof localesArray)[number];
|
|
3
14
|
declare const entityStatusesArray: readonly [
|
|
4
15
|
"active",
|
|
5
16
|
"archived"
|
package/enums.js
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/internal/localization/localization.config.ts
|
|
2
2
|
import { createStringEnumRecord } from "@kalutskii/foundation";
|
|
3
|
+
var localesArray = ["ka", "en", "ru"];
|
|
4
|
+
var localesRecord = createStringEnumRecord(localesArray);
|
|
5
|
+
var locale = localesRecord;
|
|
6
|
+
|
|
7
|
+
// src/internal/localization/localization.schemas.ts
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
var AT_LEAST_ONE_LOCALIZED_VALUE_ERROR = "At least one localized value is required";
|
|
10
|
+
var localizedStringSchema = z.partialRecord(z.enum(localesArray), z.string()).refine((value) => Object.values(value).some((localizedValue) => localizedValue.trim().length > 0), {
|
|
11
|
+
message: AT_LEAST_ONE_LOCALIZED_VALUE_ERROR
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// src/app/domain/global/global.enums.ts
|
|
15
|
+
import { createStringEnumRecord as createStringEnumRecord2 } from "@kalutskii/foundation";
|
|
3
16
|
import { pgEnum } from "drizzle-orm/pg-core";
|
|
4
17
|
var entityStatusesArray = ["active", "archived"];
|
|
5
18
|
var entityStatusPGEnum = pgEnum("entity_status", entityStatusesArray);
|
|
6
|
-
var entityStatusesRecord =
|
|
19
|
+
var entityStatusesRecord = createStringEnumRecord2(entityStatusesArray);
|
|
7
20
|
export {
|
|
8
|
-
entityStatusesRecord as entityStatus
|
|
21
|
+
entityStatusesRecord as entityStatus,
|
|
22
|
+
locale,
|
|
23
|
+
localesArray
|
|
9
24
|
};
|