@esb-market-contracts/backend 1.0.59 → 1.0.60
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 +1663 -1429
- package/config.d.ts +5 -5
- package/config.js +9 -10
- package/constants.d.ts +2 -2
- package/constants.js +2 -4
- package/enums.d.ts +30 -17
- package/enums.js +23 -23
- package/package.json +1 -1
- package/types.d.ts +2181 -1261
package/config.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'zod';
|
|
2
2
|
//#region src/internal/localization/localization.config.d.ts
|
|
3
3
|
export declare const contentLocalesArray: readonly ['ka', 'en', 'ru'];
|
|
4
4
|
export declare const contentLocale: Readonly<{
|
|
5
|
-
EN:
|
|
6
|
-
KA:
|
|
7
|
-
RU:
|
|
5
|
+
EN: 'en';
|
|
6
|
+
KA: 'ka';
|
|
7
|
+
RU: 'ru';
|
|
8
8
|
}>;
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/internal/localization/localization.types.d.ts
|
|
11
11
|
type ContentLocale = (typeof contentLocalesArray)[number];
|
|
12
12
|
//#endregion
|
|
13
|
-
export type { ContentLocale };
|
|
13
|
+
export type { ContentLocale };
|
package/config.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
// src/internal/localization/localization.config.ts
|
|
2
|
-
import { createStringEnumRecord } from
|
|
3
|
-
var contentLocalesArray = [
|
|
2
|
+
import { createStringEnumRecord } from '@kalutskii/foundation';
|
|
3
|
+
var contentLocalesArray = ['ka', 'en', 'ru'];
|
|
4
4
|
var contentLocalesRecord = createStringEnumRecord(contentLocalesArray);
|
|
5
5
|
var contentLocale = contentLocalesRecord;
|
|
6
6
|
|
|
7
7
|
// src/internal/localization/localization.schemas.ts
|
|
8
|
-
import { z } from
|
|
9
|
-
var localizedStringSchema = z
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
var localizedStringSchema = z
|
|
10
|
+
.partialRecord(z.enum(contentLocalesArray), z.string())
|
|
11
|
+
.refine((value) => Object.values(value).some((localizedValue) => localizedValue.trim().length > 0), {
|
|
12
|
+
message: 'localizedValueRequired',
|
|
13
|
+
});
|
|
14
|
+
export { contentLocale, contentLocalesArray };
|
package/constants.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
//#region src/app/routes/routes.constants.d.ts
|
|
2
|
-
export declare const API_VERSION_PATH =
|
|
3
|
-
//#endregion
|
|
2
|
+
export declare const API_VERSION_PATH = '/v1';
|
|
3
|
+
//#endregion
|
package/constants.js
CHANGED
package/enums.d.ts
CHANGED
|
@@ -1,53 +1,66 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'zod';
|
|
2
2
|
//#region src/app/domain/global/global.enums.d.ts
|
|
3
3
|
declare const entityStatusesArray: readonly ['active', 'archived'];
|
|
4
4
|
declare const entityStatusesRecord: Readonly<{
|
|
5
|
-
ACTIVE:
|
|
6
|
-
ARCHIVED:
|
|
5
|
+
ACTIVE: 'active';
|
|
6
|
+
ARCHIVED: 'archived';
|
|
7
7
|
}>;
|
|
8
8
|
type EntityStatus = (typeof entityStatusesArray)[number];
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/app/domain/(procurement)/deliveries/deliveries.enums.d.ts
|
|
11
11
|
declare const deliveryStatusesArray: readonly ['draft', 'posted'];
|
|
12
12
|
declare const deliveryStatusesRecord: Readonly<{
|
|
13
|
-
DRAFT:
|
|
14
|
-
POSTED:
|
|
13
|
+
DRAFT: 'draft';
|
|
14
|
+
POSTED: 'posted';
|
|
15
15
|
}>;
|
|
16
16
|
type DeliveryStatus = (typeof deliveryStatusesArray)[number];
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/app/flows/(procurement)/delivery/delivery.enums.d.ts
|
|
19
19
|
export declare const deliveryItemScanOutcomesArray: readonly ['added', 'unchanged', 'product-variant-not-found'];
|
|
20
20
|
declare const deliveryItemScanOutcomesRecord: Readonly<{
|
|
21
|
-
ADDED:
|
|
22
|
-
PRODUCT_VARIANT_NOT_FOUND:
|
|
23
|
-
UNCHANGED:
|
|
21
|
+
ADDED: 'added';
|
|
22
|
+
PRODUCT_VARIANT_NOT_FOUND: 'product-variant-not-found';
|
|
23
|
+
UNCHANGED: 'unchanged';
|
|
24
24
|
}>;
|
|
25
25
|
type DeliveryItemScanOutcome = (typeof deliveryItemScanOutcomesArray)[number];
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/app/flows/(audit)/audit/audit.enums.d.ts
|
|
28
28
|
export declare const auditLogSourcesArray: readonly ['admin', 'backend'];
|
|
29
29
|
declare const auditLogSourcesRecord: Readonly<{
|
|
30
|
-
ADMIN:
|
|
31
|
-
BACKEND:
|
|
30
|
+
ADMIN: 'admin';
|
|
31
|
+
BACKEND: 'backend';
|
|
32
32
|
}>;
|
|
33
33
|
type AuditLogSource = (typeof auditLogSourcesArray)[number];
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/app/domain/(sales)/customers/customers.enums.d.ts
|
|
36
36
|
export declare const customerTypesArray: readonly ['individual', 'individual_entrepreneur', 'legal_entity'];
|
|
37
37
|
declare const customerTypesRecord: Readonly<{
|
|
38
|
-
INDIVIDUAL:
|
|
39
|
-
INDIVIDUAL_ENTREPRENEUR:
|
|
40
|
-
LEGAL_ENTITY:
|
|
38
|
+
INDIVIDUAL: 'individual';
|
|
39
|
+
INDIVIDUAL_ENTREPRENEUR: 'individual_entrepreneur';
|
|
40
|
+
LEGAL_ENTITY: 'legal_entity';
|
|
41
41
|
}>;
|
|
42
42
|
type CustomerType = (typeof customerTypesArray)[number];
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region src/app/domain/(catalog)/products/products.enums.d.ts
|
|
45
45
|
export declare const productStatusesArray: readonly ['draft', 'active', 'archived'];
|
|
46
46
|
declare const productStatusesRecord: Readonly<{
|
|
47
|
-
ACTIVE:
|
|
48
|
-
ARCHIVED:
|
|
49
|
-
DRAFT:
|
|
47
|
+
ACTIVE: 'active';
|
|
48
|
+
ARCHIVED: 'archived';
|
|
49
|
+
DRAFT: 'draft';
|
|
50
50
|
}>;
|
|
51
51
|
type ProductStatus = (typeof productStatusesArray)[number];
|
|
52
52
|
//#endregion
|
|
53
|
-
export {
|
|
53
|
+
export {
|
|
54
|
+
type AuditLogSource,
|
|
55
|
+
type CustomerType,
|
|
56
|
+
type DeliveryItemScanOutcome,
|
|
57
|
+
type DeliveryStatus,
|
|
58
|
+
type EntityStatus,
|
|
59
|
+
type ProductStatus,
|
|
60
|
+
auditLogSourcesRecord as auditLogSource,
|
|
61
|
+
customerTypesRecord as customerType,
|
|
62
|
+
deliveryItemScanOutcomesRecord as deliveryItemScanOutcome,
|
|
63
|
+
deliveryStatusesRecord as deliveryStatus,
|
|
64
|
+
entityStatusesRecord as entityStatus,
|
|
65
|
+
productStatusesRecord as productStatus,
|
|
66
|
+
};
|
package/enums.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
// src/app/domain/global/global.enums.ts
|
|
2
|
-
import { createStringEnumRecord } from
|
|
3
|
-
import { pgEnum } from
|
|
4
|
-
var entityStatusesArray = [
|
|
5
|
-
var entityStatusPGEnum = pgEnum(
|
|
2
|
+
import { createStringEnumRecord } from '@kalutskii/foundation';
|
|
3
|
+
import { pgEnum } from 'drizzle-orm/pg-core';
|
|
4
|
+
var entityStatusesArray = ['active', 'archived'];
|
|
5
|
+
var entityStatusPGEnum = pgEnum('entity_status', entityStatusesArray);
|
|
6
6
|
var entityStatusesRecord = createStringEnumRecord(entityStatusesArray);
|
|
7
7
|
|
|
8
8
|
// src/app/domain/(procurement)/deliveries/deliveries.enums.ts
|
|
9
|
-
import { createStringEnumRecord as createStringEnumRecord2 } from
|
|
10
|
-
import { pgEnum as pgEnum2 } from
|
|
11
|
-
var deliveryStatusesArray = [
|
|
12
|
-
var deliveryStatusPGEnum = pgEnum2(
|
|
9
|
+
import { createStringEnumRecord as createStringEnumRecord2 } from '@kalutskii/foundation';
|
|
10
|
+
import { pgEnum as pgEnum2 } from 'drizzle-orm/pg-core';
|
|
11
|
+
var deliveryStatusesArray = ['draft', 'posted'];
|
|
12
|
+
var deliveryStatusPGEnum = pgEnum2('delivery_status', deliveryStatusesArray);
|
|
13
13
|
var deliveryStatusesRecord = createStringEnumRecord2(deliveryStatusesArray);
|
|
14
14
|
|
|
15
15
|
// src/app/flows/(procurement)/delivery/delivery.enums.ts
|
|
16
|
-
import { createStringEnumRecord as createStringEnumRecord3 } from
|
|
17
|
-
import { z } from
|
|
18
|
-
var deliveryItemScanOutcomesArray = [
|
|
16
|
+
import { createStringEnumRecord as createStringEnumRecord3 } from '@kalutskii/foundation';
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
var deliveryItemScanOutcomesArray = ['added', 'unchanged', 'product-variant-not-found'];
|
|
19
19
|
var deliveryItemScanOutcomesRecord = createStringEnumRecord3(deliveryItemScanOutcomesArray);
|
|
20
20
|
var deliveryItemScanOutcomeSchema = z.enum(deliveryItemScanOutcomesArray);
|
|
21
21
|
|
|
22
22
|
// src/app/flows/(audit)/audit/audit.enums.ts
|
|
23
|
-
import { createStringEnumRecord as createStringEnumRecord4 } from
|
|
24
|
-
import { z as z2 } from
|
|
25
|
-
var auditLogSourcesArray = [
|
|
23
|
+
import { createStringEnumRecord as createStringEnumRecord4 } from '@kalutskii/foundation';
|
|
24
|
+
import { z as z2 } from 'zod';
|
|
25
|
+
var auditLogSourcesArray = ['admin', 'backend'];
|
|
26
26
|
var auditLogSourcesRecord = createStringEnumRecord4(auditLogSourcesArray);
|
|
27
27
|
var auditLogSourceSchema = z2.enum(auditLogSourcesArray);
|
|
28
28
|
|
|
29
29
|
// src/app/domain/(sales)/customers/customers.enums.ts
|
|
30
|
-
import { createStringEnumRecord as createStringEnumRecord5 } from
|
|
31
|
-
import { pgEnum as pgEnum3 } from
|
|
32
|
-
var customerTypesArray = [
|
|
33
|
-
var customerTypePGEnum = pgEnum3(
|
|
30
|
+
import { createStringEnumRecord as createStringEnumRecord5 } from '@kalutskii/foundation';
|
|
31
|
+
import { pgEnum as pgEnum3 } from 'drizzle-orm/pg-core';
|
|
32
|
+
var customerTypesArray = ['individual', 'individual_entrepreneur', 'legal_entity'];
|
|
33
|
+
var customerTypePGEnum = pgEnum3('customer_type', customerTypesArray);
|
|
34
34
|
var customerTypesRecord = createStringEnumRecord5(customerTypesArray);
|
|
35
35
|
|
|
36
36
|
// src/app/domain/(catalog)/products/products.enums.ts
|
|
37
|
-
import { createStringEnumRecord as createStringEnumRecord6 } from
|
|
38
|
-
import { pgEnum as pgEnum4 } from
|
|
39
|
-
var productStatusesArray = [
|
|
40
|
-
var productStatusPGEnum = pgEnum4(
|
|
37
|
+
import { createStringEnumRecord as createStringEnumRecord6 } from '@kalutskii/foundation';
|
|
38
|
+
import { pgEnum as pgEnum4 } from 'drizzle-orm/pg-core';
|
|
39
|
+
var productStatusesArray = ['draft', 'active', 'archived'];
|
|
40
|
+
var productStatusPGEnum = pgEnum4('product_status', productStatusesArray);
|
|
41
41
|
var productStatusesRecord = createStringEnumRecord6(productStatusesArray);
|
|
42
42
|
export {
|
|
43
43
|
auditLogSourcesRecord as auditLogSource,
|
|
@@ -49,5 +49,5 @@ export {
|
|
|
49
49
|
deliveryStatusesRecord as deliveryStatus,
|
|
50
50
|
entityStatusesRecord as entityStatus,
|
|
51
51
|
productStatusesRecord as productStatus,
|
|
52
|
-
productStatusesArray
|
|
52
|
+
productStatusesArray,
|
|
53
53
|
};
|