@unchainedshop/api 4.8.0 → 4.8.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/lib/chat/generateImageHandler.js +5 -6
- package/lib/express/createBulkImportMiddleware.js +3 -2
- package/lib/express/createMCPMiddleware.js +1 -1
- package/lib/fastify/bulkImportHandler.js +3 -2
- package/lib/fastify/mcpHandler.js +1 -1
- package/lib/loaders/buildTextMap.js +13 -15
- package/lib/mcp/tools/assortment/assortmentManagement.d.ts +2 -2
- package/lib/mcp/tools/assortment/assortmentManagement.js +2 -2
- package/lib/mcp/tools/assortment/handlers/getAssortment.js +1 -1
- package/lib/mcp/tools/assortment/schemas.d.ts +141 -322
- package/lib/mcp/tools/assortment/schemas.js +96 -179
- package/lib/mcp/tools/filter/filterManagement.d.ts +2 -2
- package/lib/mcp/tools/filter/filterManagement.js +2 -2
- package/lib/mcp/tools/filter/schemas.d.ts +75 -184
- package/lib/mcp/tools/filter/schemas.js +51 -87
- package/lib/mcp/tools/localization/localizationManagement.d.ts +2 -2
- package/lib/mcp/tools/localization/localizationManagement.js +2 -2
- package/lib/mcp/tools/localization/schemas.d.ts +47 -110
- package/lib/mcp/tools/localization/schemas.js +36 -51
- package/lib/mcp/tools/order/orderManagement.d.ts +2 -2
- package/lib/mcp/tools/order/orderManagement.js +2 -2
- package/lib/mcp/tools/order/schemas.d.ts +75 -184
- package/lib/mcp/tools/order/schemas.js +51 -113
- package/lib/mcp/tools/product/handlers/getProduct.js +1 -1
- package/lib/mcp/tools/product/productManagement.d.ts +2 -2
- package/lib/mcp/tools/product/productManagement.js +2 -2
- package/lib/mcp/tools/product/schemas.d.ts +317 -642
- package/lib/mcp/tools/product/schemas.js +191 -287
- package/lib/mcp/tools/provider/providerManagement.d.ts +2 -2
- package/lib/mcp/tools/provider/providerManagement.js +2 -2
- package/lib/mcp/tools/provider/schemas.d.ts +47 -142
- package/lib/mcp/tools/provider/schemas.js +32 -67
- package/lib/mcp/tools/quotation/quotationManagement.d.ts +2 -2
- package/lib/mcp/tools/quotation/quotationManagement.js +2 -2
- package/lib/mcp/tools/quotation/schemas.d.ts +40 -111
- package/lib/mcp/tools/quotation/schemas.js +29 -54
- package/lib/mcp/tools/system/schemas.d.ts +84 -179
- package/lib/mcp/tools/system/schemas.js +67 -188
- package/lib/mcp/tools/system/systemManagement.d.ts +1 -1
- package/lib/mcp/tools/system/systemManagement.js +1 -1
- package/lib/mcp/tools/users/schemas.d.ts +163 -296
- package/lib/mcp/tools/users/schemas.js +71 -152
- package/lib/mcp/tools/users/usersManagement.d.ts +2 -2
- package/lib/mcp/tools/users/usersManagement.js +2 -2
- package/lib/mcp/utils/sharedSchemas.d.ts +39 -28
- package/lib/mcp/utils/sharedSchemas.js +47 -28
- package/lib/resolvers/mutations/accounts/changePassword.js +1 -4
- package/lib/resolvers/mutations/worker/addWork.js +2 -2
- package/lib/resolvers/queries/events/registeredEventTypes.d.ts +1 -0
- package/lib/resolvers/queries/events/registeredEventTypes.js +4 -0
- package/lib/resolvers/queries/index.d.ts +1 -0
- package/lib/resolvers/queries/index.js +2 -0
- package/lib/schema/query.js +5 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { PaginationSchema, SortingSchema, SearchSchema, DateRangeSchema, } from "../../utils/sharedSchemas.js";
|
|
1
|
+
import { z } from 'zod/v4-mini';
|
|
2
|
+
import { PaginationSchema, SortingSchema, SearchSchema, DateRangeSchema, createManagementSchemaFromValidators, } from "../../utils/sharedSchemas.js";
|
|
3
3
|
export const QuotationStatusEnum = z.enum([
|
|
4
4
|
'REQUESTED',
|
|
5
5
|
'PROCESSING',
|
|
@@ -8,8 +8,8 @@ export const QuotationStatusEnum = z.enum([
|
|
|
8
8
|
'REJECTED',
|
|
9
9
|
]);
|
|
10
10
|
export const ProductConfigurationInput = z.object({
|
|
11
|
-
key: z.string().describe('Configuration key'),
|
|
12
|
-
value: z.string().describe('Configuration value'),
|
|
11
|
+
key: z.string().check(z.describe('Configuration key')),
|
|
12
|
+
value: z.string().check(z.describe('Configuration value')),
|
|
13
13
|
});
|
|
14
14
|
export const actionValidators = {
|
|
15
15
|
LIST: z
|
|
@@ -18,81 +18,56 @@ export const actionValidators = {
|
|
|
18
18
|
...SortingSchema,
|
|
19
19
|
...SearchSchema,
|
|
20
20
|
...DateRangeSchema,
|
|
21
|
-
status:
|
|
22
|
-
userId: z.string().
|
|
23
|
-
productId: z.string().
|
|
21
|
+
status: z.optional(QuotationStatusEnum).check(z.describe('Filter by quotation status')),
|
|
22
|
+
userId: z.optional(z.string()).check(z.describe('Filter by user ID')),
|
|
23
|
+
productId: z.optional(z.string()).check(z.describe('Filter by product ID')),
|
|
24
24
|
})
|
|
25
|
-
.describe('Retrieves a list of quotations with optional filters. Supports pagination (limit/offset), sorting, text search (queryString), status filtering, and filtering by userId or productId.'),
|
|
25
|
+
.check(z.describe('Retrieves a list of quotations with optional filters. Supports pagination (limit/offset), sorting, text search (queryString), status filtering, and filtering by userId or productId.')),
|
|
26
26
|
GET: z
|
|
27
27
|
.object({
|
|
28
|
-
quotationId: z
|
|
28
|
+
quotationId: z
|
|
29
|
+
.string()
|
|
30
|
+
.check(z.minLength(1, 'quotationId is required'), z.describe('Quotation ID to retrieve')),
|
|
29
31
|
})
|
|
30
|
-
.describe('Retrieves a single quotation by ID. Requirements: quotationId must be provided.'),
|
|
32
|
+
.check(z.describe('Retrieves a single quotation by ID. Requirements: quotationId must be provided.')),
|
|
31
33
|
COUNT: z
|
|
32
34
|
.object({
|
|
33
35
|
...SearchSchema,
|
|
34
36
|
...DateRangeSchema,
|
|
35
|
-
status:
|
|
36
|
-
userId: z.string().
|
|
37
|
-
productId: z.string().
|
|
37
|
+
status: z.optional(QuotationStatusEnum).check(z.describe('Filter by quotation status')),
|
|
38
|
+
userId: z.optional(z.string()).check(z.describe('Filter by user ID')),
|
|
39
|
+
productId: z.optional(z.string()).check(z.describe('Filter by product ID')),
|
|
38
40
|
})
|
|
39
|
-
.describe('Returns the total count of quotations matching the provided filters. Useful for pagination. Accepts same filter parameters as LIST.'),
|
|
41
|
+
.check(z.describe('Returns the total count of quotations matching the provided filters. Useful for pagination. Accepts same filter parameters as LIST.')),
|
|
40
42
|
VERIFY: z
|
|
41
43
|
.object({
|
|
42
44
|
quotationId: z
|
|
43
45
|
.string()
|
|
44
|
-
.
|
|
45
|
-
.describe('Quotation ID to verify. Must be in REQUESTED status.'),
|
|
46
|
+
.check(z.minLength(1, 'quotationId is required'), z.describe('Quotation ID to verify. Must be in REQUESTED status.')),
|
|
46
47
|
quotationContext: z
|
|
47
|
-
.record(z.any(), z.any())
|
|
48
|
-
.
|
|
49
|
-
.describe('Optional context for verification (e.g., verification notes, approval details)'),
|
|
48
|
+
.optional(z.record(z.any(), z.any()))
|
|
49
|
+
.check(z.describe('Optional context for verification (e.g., verification notes, approval details)')),
|
|
50
50
|
})
|
|
51
|
-
.describe('Verifies a quotation and transitions it from REQUESTED to PROCESSING status. Requirements: quotation must exist AND current status must be REQUESTED.'),
|
|
51
|
+
.check(z.describe('Verifies a quotation and transitions it from REQUESTED to PROCESSING status. Requirements: quotation must exist AND current status must be REQUESTED.')),
|
|
52
52
|
MAKE_PROPOSAL: z
|
|
53
53
|
.object({
|
|
54
54
|
quotationId: z
|
|
55
55
|
.string()
|
|
56
|
-
.
|
|
57
|
-
.describe('Quotation ID to create proposal for. Must be in PROCESSING status.'),
|
|
56
|
+
.check(z.minLength(1, 'quotationId is required'), z.describe('Quotation ID to create proposal for. Must be in PROCESSING status.')),
|
|
58
57
|
quotationContext: z
|
|
59
|
-
.record(z.any(), z.any())
|
|
60
|
-
.
|
|
61
|
-
.describe('Optional context for the proposal (e.g., pricing details, terms, delivery estimates)'),
|
|
58
|
+
.optional(z.record(z.any(), z.any()))
|
|
59
|
+
.check(z.describe('Optional context for the proposal (e.g., pricing details, terms, delivery estimates)')),
|
|
62
60
|
})
|
|
63
|
-
.describe('Creates a proposal for a quotation and transitions it from PROCESSING to PROPOSED status. Requirements: quotation must exist AND current status must be PROCESSING.'),
|
|
61
|
+
.check(z.describe('Creates a proposal for a quotation and transitions it from PROCESSING to PROPOSED status. Requirements: quotation must exist AND current status must be PROCESSING.')),
|
|
64
62
|
REJECT: z
|
|
65
63
|
.object({
|
|
66
64
|
quotationId: z
|
|
67
65
|
.string()
|
|
68
|
-
.
|
|
69
|
-
.describe('Quotation ID to reject. Cannot be FULFILLED.'),
|
|
66
|
+
.check(z.minLength(1, 'quotationId is required'), z.describe('Quotation ID to reject. Cannot be FULFILLED.')),
|
|
70
67
|
quotationContext: z
|
|
71
|
-
.record(z.any(), z.any())
|
|
72
|
-
.
|
|
73
|
-
.describe('Optional context for rejection (e.g., reason for rejection, alternative suggestions)'),
|
|
68
|
+
.optional(z.record(z.any(), z.any()))
|
|
69
|
+
.check(z.describe('Optional context for rejection (e.g., reason for rejection, alternative suggestions)')),
|
|
74
70
|
})
|
|
75
|
-
.describe('Rejects a quotation and transitions it to REJECTED status. Requirements: quotation must exist AND current status must NOT be FULFILLED (cannot reject completed quotations). Sets rejected timestamp.'),
|
|
76
|
-
};
|
|
77
|
-
export const QuotationManagementSchema = {
|
|
78
|
-
action: z
|
|
79
|
-
.enum(['LIST', 'GET', 'COUNT', 'VERIFY', 'MAKE_PROPOSAL', 'REJECT'])
|
|
80
|
-
.describe('Quotation action: LIST (get quotations with filters), GET (single quotation by ID), COUNT (count quotations), VERIFY (verify a REQUESTED quotation), MAKE_PROPOSAL (create proposal for PROCESSING quotation), REJECT (reject a quotation)'),
|
|
81
|
-
...PaginationSchema,
|
|
82
|
-
...SortingSchema,
|
|
83
|
-
...SearchSchema,
|
|
84
|
-
...DateRangeSchema,
|
|
85
|
-
status: QuotationStatusEnum.optional().describe('Filter by quotation status (LIST & COUNT only)'),
|
|
86
|
-
userId: z.string().optional().describe('Filter by user ID (LIST & COUNT only)'),
|
|
87
|
-
productId: z.string().optional().describe('Product ID (LIST, COUNT only)'),
|
|
88
|
-
quotationId: z.string().optional().describe('Quotation ID (GET, VERIFY, MAKE_PROPOSAL, REJECT only)'),
|
|
89
|
-
configuration: z
|
|
90
|
-
.array(ProductConfigurationInput)
|
|
91
|
-
.optional()
|
|
92
|
-
.describe('Use this to add any additional information for the quotation, it can be how many for when or price or anything a user might want to add'),
|
|
93
|
-
quotationContext: z
|
|
94
|
-
.record(z.any(), z.any())
|
|
95
|
-
.optional()
|
|
96
|
-
.describe('Context object (VERIFY, MAKE_PROPOSAL, REJECT only)'),
|
|
71
|
+
.check(z.describe('Rejects a quotation and transitions it to REJECTED status. Requirements: quotation must exist AND current status must NOT be FULFILLED (cannot reject completed quotations). Sets rejected timestamp.')),
|
|
97
72
|
};
|
|
98
|
-
export const
|
|
73
|
+
export const QuotationManagementSchema = createManagementSchemaFromValidators(actionValidators);
|
|
@@ -1,215 +1,120 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod/v4-mini';
|
|
2
2
|
export declare const WorkStatusKeys: [string, ...string[]];
|
|
3
|
-
export declare const ActiveWorkTypesSchema: z.
|
|
3
|
+
export declare const ActiveWorkTypesSchema: z.ZodMiniObject<{}, z.core.$strip>;
|
|
4
4
|
export declare const actionValidators: {
|
|
5
|
-
readonly SHOP_INFO: z.
|
|
6
|
-
readonly WORKER_ADD: z.
|
|
7
|
-
type: z.
|
|
8
|
-
priority: z.
|
|
9
|
-
input: z.
|
|
10
|
-
originalWorkId: z.
|
|
11
|
-
scheduled: z.
|
|
12
|
-
retries: z.
|
|
13
|
-
worker: z.
|
|
5
|
+
readonly SHOP_INFO: z.ZodMiniObject<{}, z.core.$strip>;
|
|
6
|
+
readonly WORKER_ADD: z.ZodMiniObject<{
|
|
7
|
+
type: z.ZodMiniString<string>;
|
|
8
|
+
priority: z.ZodMiniDefault<z.ZodMiniNumberFormat>;
|
|
9
|
+
input: z.ZodMiniOptional<z.ZodMiniAny>;
|
|
10
|
+
originalWorkId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
11
|
+
scheduled: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
12
|
+
retries: z.ZodMiniDefault<z.ZodMiniNumberFormat>;
|
|
13
|
+
worker: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
14
14
|
}, z.core.$strip>;
|
|
15
|
-
readonly WORKER_ACTIVE_WORK_TYPES: z.
|
|
16
|
-
readonly WORKER_ALLOCATE: z.
|
|
17
|
-
types: z.
|
|
18
|
-
worker: z.
|
|
15
|
+
readonly WORKER_ACTIVE_WORK_TYPES: z.ZodMiniObject<{}, z.core.$strip>;
|
|
16
|
+
readonly WORKER_ALLOCATE: z.ZodMiniObject<{
|
|
17
|
+
types: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
18
|
+
worker: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
|
-
readonly WORKER_REMOVE: z.
|
|
21
|
-
workId: z.
|
|
20
|
+
readonly WORKER_REMOVE: z.ZodMiniObject<{
|
|
21
|
+
workId: z.ZodMiniString<string>;
|
|
22
22
|
}, z.core.$strip>;
|
|
23
|
-
readonly WORKER_GET: z.
|
|
24
|
-
workId: z.
|
|
23
|
+
readonly WORKER_GET: z.ZodMiniObject<{
|
|
24
|
+
workId: z.ZodMiniString<string>;
|
|
25
25
|
}, z.core.$strip>;
|
|
26
|
-
readonly WORKER_LIST: z.
|
|
27
|
-
created: z.
|
|
28
|
-
from: z.
|
|
29
|
-
to: z.
|
|
26
|
+
readonly WORKER_LIST: z.ZodMiniObject<{
|
|
27
|
+
created: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
28
|
+
from: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
29
|
+
to: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
30
30
|
}, z.core.$strip>>;
|
|
31
|
-
status: z.
|
|
31
|
+
status: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniEnum<{
|
|
32
32
|
[x: string]: string;
|
|
33
33
|
}>>>;
|
|
34
|
-
types: z.
|
|
35
|
-
queryString: z.
|
|
36
|
-
includeInactive: z.
|
|
37
|
-
sort: z.
|
|
38
|
-
key: z.
|
|
39
|
-
value: z.
|
|
34
|
+
types: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
35
|
+
queryString: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
36
|
+
includeInactive: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
37
|
+
sort: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
38
|
+
key: z.ZodMiniString<string>;
|
|
39
|
+
value: z.ZodMiniEnum<{
|
|
40
40
|
[x: string]: string;
|
|
41
41
|
}>;
|
|
42
42
|
}, z.core.$strip>>>;
|
|
43
|
-
limit: z.
|
|
44
|
-
offset: z.
|
|
43
|
+
limit: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
44
|
+
offset: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
45
45
|
}, z.core.$strip>;
|
|
46
|
-
readonly WORKER_COUNT: z.
|
|
47
|
-
created: z.
|
|
48
|
-
from: z.
|
|
49
|
-
to: z.
|
|
46
|
+
readonly WORKER_COUNT: z.ZodMiniObject<{
|
|
47
|
+
created: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
48
|
+
from: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
49
|
+
to: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
50
50
|
}, z.core.$strip>>;
|
|
51
|
-
status: z.
|
|
51
|
+
status: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniEnum<{
|
|
52
52
|
[x: string]: string;
|
|
53
53
|
}>>>;
|
|
54
|
-
types: z.
|
|
55
|
-
queryString: z.
|
|
56
|
-
includeInactive: z.
|
|
54
|
+
types: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
55
|
+
queryString: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
56
|
+
includeInactive: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
57
57
|
}, z.core.$strip>;
|
|
58
|
-
readonly WORKER_FINISH_WORK: z.
|
|
59
|
-
workId: z.
|
|
60
|
-
result: z.
|
|
61
|
-
error: z.
|
|
62
|
-
success: z.
|
|
63
|
-
worker: z.
|
|
64
|
-
started: z.
|
|
65
|
-
finished: z.
|
|
58
|
+
readonly WORKER_FINISH_WORK: z.ZodMiniObject<{
|
|
59
|
+
workId: z.ZodMiniString<string>;
|
|
60
|
+
result: z.ZodMiniOptional<z.ZodMiniAny>;
|
|
61
|
+
error: z.ZodMiniOptional<z.ZodMiniAny>;
|
|
62
|
+
success: z.ZodMiniBoolean<boolean>;
|
|
63
|
+
worker: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
64
|
+
started: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
65
|
+
finished: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
66
66
|
}, z.core.$strip>;
|
|
67
|
-
readonly WORKER_PROCESS_NEXT: z.
|
|
68
|
-
worker: z.
|
|
67
|
+
readonly WORKER_PROCESS_NEXT: z.ZodMiniObject<{
|
|
68
|
+
worker: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
69
69
|
}, z.core.$strip>;
|
|
70
|
-
readonly WORKER_STATISTICS: z.
|
|
71
|
-
types: z.
|
|
72
|
-
dateRange: z.
|
|
73
|
-
from: z.
|
|
74
|
-
to: z.
|
|
70
|
+
readonly WORKER_STATISTICS: z.ZodMiniObject<{
|
|
71
|
+
types: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
72
|
+
dateRange: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
73
|
+
from: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
74
|
+
to: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
75
75
|
}, z.core.$strip>>;
|
|
76
76
|
}, z.core.$strip>;
|
|
77
|
-
readonly EVENT_GET: z.
|
|
78
|
-
eventId: z.
|
|
77
|
+
readonly EVENT_GET: z.ZodMiniObject<{
|
|
78
|
+
eventId: z.ZodMiniString<string>;
|
|
79
79
|
}, z.core.$strip>;
|
|
80
|
-
readonly EVENT_LIST: z.
|
|
81
|
-
types: z.
|
|
82
|
-
created: z.
|
|
83
|
-
from: z.
|
|
84
|
-
to: z.
|
|
80
|
+
readonly EVENT_LIST: z.ZodMiniObject<{
|
|
81
|
+
types: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
82
|
+
created: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
83
|
+
from: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
84
|
+
to: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
85
85
|
}, z.core.$strip>>;
|
|
86
|
-
queryString: z.
|
|
87
|
-
includeInactive: z.
|
|
88
|
-
sort: z.
|
|
89
|
-
key: z.
|
|
90
|
-
value: z.
|
|
86
|
+
queryString: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
87
|
+
includeInactive: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
88
|
+
sort: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
89
|
+
key: z.ZodMiniString<string>;
|
|
90
|
+
value: z.ZodMiniEnum<{
|
|
91
91
|
[x: string]: string;
|
|
92
92
|
}>;
|
|
93
93
|
}, z.core.$strip>>>;
|
|
94
|
-
limit: z.
|
|
95
|
-
offset: z.
|
|
94
|
+
limit: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
95
|
+
offset: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
96
96
|
}, z.core.$strip>;
|
|
97
|
-
readonly EVENT_COUNT: z.
|
|
98
|
-
types: z.
|
|
99
|
-
created: z.
|
|
100
|
-
from: z.
|
|
101
|
-
to: z.
|
|
97
|
+
readonly EVENT_COUNT: z.ZodMiniObject<{
|
|
98
|
+
types: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
99
|
+
created: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
100
|
+
from: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
101
|
+
to: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
102
102
|
}, z.core.$strip>>;
|
|
103
|
-
queryString: z.
|
|
104
|
-
includeInactive: z.
|
|
103
|
+
queryString: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
104
|
+
includeInactive: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
105
105
|
}, z.core.$strip>;
|
|
106
|
-
readonly EVENT_STATISTICS: z.
|
|
107
|
-
types: z.
|
|
108
|
-
dateRange: z.
|
|
109
|
-
from: z.
|
|
110
|
-
to: z.
|
|
106
|
+
readonly EVENT_STATISTICS: z.ZodMiniObject<{
|
|
107
|
+
types: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
108
|
+
dateRange: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
109
|
+
from: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
110
|
+
to: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
|
|
111
111
|
}, z.core.$strip>>;
|
|
112
112
|
}, z.core.$strip>;
|
|
113
113
|
};
|
|
114
114
|
export declare const SystemManagementSchema: {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}, z.core.$strip>>;
|
|
119
|
-
queryString: z.ZodOptional<z.ZodString>;
|
|
120
|
-
includeInactive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
121
|
-
sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
122
|
-
key: z.ZodString;
|
|
123
|
-
value: z.ZodEnum<{
|
|
124
|
-
[x: string]: string;
|
|
125
|
-
}>;
|
|
126
|
-
}, z.core.$strip>>>;
|
|
127
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
128
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
129
|
-
action: z.ZodEnum<{
|
|
130
|
-
SHOP_INFO: "SHOP_INFO";
|
|
131
|
-
WORKER_ADD: "WORKER_ADD";
|
|
132
|
-
WORKER_REMOVE: "WORKER_REMOVE";
|
|
133
|
-
WORKER_COUNT: "WORKER_COUNT";
|
|
134
|
-
WORKER_GET: "WORKER_GET";
|
|
135
|
-
WORKER_LIST: "WORKER_LIST";
|
|
136
|
-
WORKER_STATISTICS: "WORKER_STATISTICS";
|
|
137
|
-
WORKER_PROCESS_NEXT: "WORKER_PROCESS_NEXT";
|
|
138
|
-
WORKER_ALLOCATE: "WORKER_ALLOCATE";
|
|
139
|
-
WORKER_FINISH_WORK: "WORKER_FINISH_WORK";
|
|
140
|
-
WORKER_ACTIVE_WORK_TYPES: "WORKER_ACTIVE_WORK_TYPES";
|
|
141
|
-
EVENT_GET: "EVENT_GET";
|
|
142
|
-
EVENT_LIST: "EVENT_LIST";
|
|
143
|
-
EVENT_COUNT: "EVENT_COUNT";
|
|
144
|
-
EVENT_STATISTICS: "EVENT_STATISTICS";
|
|
145
|
-
}>;
|
|
146
|
-
type: z.ZodOptional<z.ZodString>;
|
|
147
|
-
priority: z.ZodOptional<z.ZodNumber>;
|
|
148
|
-
originalWorkId: z.ZodOptional<z.ZodString>;
|
|
149
|
-
scheduled: z.ZodOptional<z.ZodString>;
|
|
150
|
-
retries: z.ZodOptional<z.ZodNumber>;
|
|
151
|
-
worker: z.ZodOptional<z.ZodString>;
|
|
152
|
-
workId: z.ZodOptional<z.ZodString>;
|
|
153
|
-
success: z.ZodOptional<z.ZodBoolean>;
|
|
154
|
-
started: z.ZodOptional<z.ZodString>;
|
|
155
|
-
finished: z.ZodOptional<z.ZodString>;
|
|
156
|
-
status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
157
|
-
[x: string]: string;
|
|
158
|
-
}>>>;
|
|
159
|
-
eventId: z.ZodOptional<z.ZodString>;
|
|
160
|
-
created: z.ZodOptional<z.ZodString>;
|
|
161
|
-
types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
162
|
-
};
|
|
163
|
-
export declare const SystemManagementZodSchema: z.ZodObject<{
|
|
164
|
-
dateRange: z.ZodOptional<z.ZodObject<{
|
|
165
|
-
from: z.ZodOptional<z.ZodString>;
|
|
166
|
-
to: z.ZodOptional<z.ZodString>;
|
|
167
|
-
}, z.core.$strip>>;
|
|
168
|
-
queryString: z.ZodOptional<z.ZodString>;
|
|
169
|
-
includeInactive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
170
|
-
sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
171
|
-
key: z.ZodString;
|
|
172
|
-
value: z.ZodEnum<{
|
|
173
|
-
[x: string]: string;
|
|
174
|
-
}>;
|
|
175
|
-
}, z.core.$strip>>>;
|
|
176
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
177
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
178
|
-
action: z.ZodEnum<{
|
|
179
|
-
SHOP_INFO: "SHOP_INFO";
|
|
180
|
-
WORKER_ADD: "WORKER_ADD";
|
|
181
|
-
WORKER_REMOVE: "WORKER_REMOVE";
|
|
182
|
-
WORKER_COUNT: "WORKER_COUNT";
|
|
183
|
-
WORKER_GET: "WORKER_GET";
|
|
184
|
-
WORKER_LIST: "WORKER_LIST";
|
|
185
|
-
WORKER_STATISTICS: "WORKER_STATISTICS";
|
|
186
|
-
WORKER_PROCESS_NEXT: "WORKER_PROCESS_NEXT";
|
|
187
|
-
WORKER_ALLOCATE: "WORKER_ALLOCATE";
|
|
188
|
-
WORKER_FINISH_WORK: "WORKER_FINISH_WORK";
|
|
189
|
-
WORKER_ACTIVE_WORK_TYPES: "WORKER_ACTIVE_WORK_TYPES";
|
|
190
|
-
EVENT_GET: "EVENT_GET";
|
|
191
|
-
EVENT_LIST: "EVENT_LIST";
|
|
192
|
-
EVENT_COUNT: "EVENT_COUNT";
|
|
193
|
-
EVENT_STATISTICS: "EVENT_STATISTICS";
|
|
194
|
-
}>;
|
|
195
|
-
type: z.ZodOptional<z.ZodString>;
|
|
196
|
-
priority: z.ZodOptional<z.ZodNumber>;
|
|
197
|
-
originalWorkId: z.ZodOptional<z.ZodString>;
|
|
198
|
-
scheduled: z.ZodOptional<z.ZodString>;
|
|
199
|
-
retries: z.ZodOptional<z.ZodNumber>;
|
|
200
|
-
worker: z.ZodOptional<z.ZodString>;
|
|
201
|
-
workId: z.ZodOptional<z.ZodString>;
|
|
202
|
-
success: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
-
started: z.ZodOptional<z.ZodString>;
|
|
204
|
-
finished: z.ZodOptional<z.ZodString>;
|
|
205
|
-
status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
206
|
-
[x: string]: string;
|
|
207
|
-
}>>>;
|
|
208
|
-
eventId: z.ZodOptional<z.ZodString>;
|
|
209
|
-
created: z.ZodOptional<z.ZodString>;
|
|
210
|
-
types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
211
|
-
}, z.core.$strip>;
|
|
212
|
-
export type SystemManagementParams = z.infer<typeof SystemManagementZodSchema>;
|
|
115
|
+
action: z.core.$ZodType<string>;
|
|
116
|
+
} & Record<string, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
117
|
+
export type { ManagementParams as SystemManagementParams } from '../../utils/sharedSchemas.ts';
|
|
213
118
|
export type ActionName = keyof typeof actionValidators;
|
|
214
119
|
export type Params<T extends ActionName> = z.infer<(typeof actionValidators)[T]>;
|
|
215
120
|
export type Handler<T extends ActionName> = (modules: any, params: Params<T>) => Promise<unknown>;
|