@draftt-io/draftt-mcp 1.0.1 → 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/dist/api/drafttClient.js +1 -9
- package/dist/api/drafttClient.js.map +1 -1
- package/dist/handlers/drafttHandler.js +0 -3
- package/dist/handlers/drafttHandler.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/models/component.d.ts +28 -24
- package/dist/models/draftt.d.ts +0 -1
- package/dist/schemas/componentSchema.d.ts +254 -126
- package/dist/schemas/componentSchema.js +14 -8
- package/dist/schemas/componentSchema.js.map +1 -1
- package/dist/schemas/drafttSchema.d.ts +1 -4
- package/dist/schemas/drafttSchema.js +1 -4
- package/dist/schemas/drafttSchema.js.map +1 -1
- package/package.json +1 -1
package/dist/api/drafttClient.js
CHANGED
|
@@ -35,12 +35,7 @@ class DrafttClient extends client_1.ApiClient {
|
|
|
35
35
|
}
|
|
36
36
|
async policySearch(args) {
|
|
37
37
|
this.logger.debug("Policy search with args:", args);
|
|
38
|
-
const requestBody =
|
|
39
|
-
...(args.filter ? { filter: args.filter } : {}),
|
|
40
|
-
...(args.sort ? { sort: args.sort } : {}),
|
|
41
|
-
...(args.nextToken ? { nextToken: args.nextToken } : {}),
|
|
42
|
-
...(args.pageSize ? { pageSize: args.pageSize } : {}),
|
|
43
|
-
};
|
|
38
|
+
const requestBody = this.buildSearchBody(args);
|
|
44
39
|
return this.post("/policy/search", requestBody);
|
|
45
40
|
}
|
|
46
41
|
async policyGet(args) {
|
|
@@ -70,9 +65,6 @@ class DrafttClient extends client_1.ApiClient {
|
|
|
70
65
|
}
|
|
71
66
|
async drafttGet(args) {
|
|
72
67
|
this.logger.debug("Draftt get with args:", args);
|
|
73
|
-
if (!args.componentId) {
|
|
74
|
-
throw new client_2.ApiError("MISSING_PARAM", "Missing required parameter: componentId");
|
|
75
|
-
}
|
|
76
68
|
return this.post(`/draftt/search`, {});
|
|
77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I,CAAC,QAAQ,EAAE,CAAC;YACjB,MAAM,IAAI,iBAAQ,CAAC,eAAe,EAAE,sCAAsC,CAAC,CAAC;QAChF,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACpB,MAAM,IAAI,iBAAQ,CAAC,eAAe,EAAE,yCAAyC,CAAC,CAAC;QACnF,CAAC;QACD,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,QAAQ,cAAc,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,IAAmB;QAC/B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAClC,CAAC,CAAC;IACP,CAAC;IAEO,eAAe,CAAC,IAAS;QAC7B,MAAM,UAAU,GAAwB,EAAE,CAAC;QAE3C,0DAA0D;QAC1D,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC1C,IAAI,KAAK,KAAK,SAAS,IAAI,GAAG,KAAK,UAAU,EAAE,CAAC,CAAC,2DAA2D;gBACxG,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YAC5B,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AA3FD,oCA2FC"}
|
|
@@ -12,9 +12,6 @@ class DrafttHandler {
|
|
|
12
12
|
const logger = (0, logger_1.getLogger)();
|
|
13
13
|
try {
|
|
14
14
|
logger.debug("Processing draftt get with args:", args);
|
|
15
|
-
if (!args.componentId) {
|
|
16
|
-
return (0, responseFormatter_1.formatErrorResponse)("MISSING_PARAM", "Missing required parameter: componentId");
|
|
17
|
-
}
|
|
18
15
|
const result = await this.client.drafttGet(args);
|
|
19
16
|
return (0, responseFormatter_1.formatSuccessResponse)(result);
|
|
20
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drafttHandler.js","sourceRoot":"","sources":["../../src/handlers/drafttHandler.ts"],"names":[],"mappings":";;;AACA,0CAAyC;AACzC,gEAAsF;AAEtF,4CAA4C;AAE5C,MAAa,aAAa;IACtB,YAAoB,MAAoB;QAApB,WAAM,GAAN,MAAM,CAAc;IAAG,CAAC;IAE5C,KAAK,CAAC,GAAG,CAAC,IAAmB;QACzB,MAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAC;QAE3B,IAAI,CAAC;YACD,MAAM,CAAC,KAAK,CAAC,kCAAkC,EAAE,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"drafttHandler.js","sourceRoot":"","sources":["../../src/handlers/drafttHandler.ts"],"names":[],"mappings":";;;AACA,0CAAyC;AACzC,gEAAsF;AAEtF,4CAA4C;AAE5C,MAAa,aAAa;IACtB,YAAoB,MAAoB;QAApB,WAAM,GAAN,MAAM,CAAc;IAAG,CAAC;IAE5C,KAAK,CAAC,GAAG,CAAC,IAAmB;QACzB,MAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAC;QAE3B,IAAI,CAAC;YACD,MAAM,CAAC,KAAK,CAAC,kCAAkC,EAAE,IAAI,CAAC,CAAC;YAGvD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACjD,OAAO,IAAA,yCAAqB,EAAC,MAAM,CAAC,CAAC;QACzC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,MAAM,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;YAC5C,IAAI,KAAK,YAAY,iBAAQ,EAAE,CAAC;gBAC5B,OAAO,IAAA,uCAAmB,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;YACzE,CAAC;YACD,OAAO,IAAA,uCAAmB,EACtB,gBAAgB,EAChB,uCAAuC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAClG,CAAC;QACN,CAAC;IACL,CAAC;CACJ;AAvBD,sCAuBC"}
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ async function main() {
|
|
|
38
38
|
version: "1.0.0",
|
|
39
39
|
});
|
|
40
40
|
// Register tools
|
|
41
|
-
server.tool("draftt_component_search", "Search
|
|
41
|
+
server.tool("draftt_component_search", "Search and filter components in Draftt, component is a cloud asset with version, technology, type, etc.", componentSchema_1.componentSearchSchema, async (args) => {
|
|
42
42
|
const result = await componentHandler.search(args);
|
|
43
43
|
return {
|
|
44
44
|
content: result.content.map(item => ({
|
|
@@ -47,7 +47,7 @@ async function main() {
|
|
|
47
47
|
}))
|
|
48
48
|
};
|
|
49
49
|
});
|
|
50
|
-
server.tool("draftt_component_get", "Get a detailed information about a component in Draftt", componentSchema_1.componentGetSchema, async (args) => {
|
|
50
|
+
server.tool("draftt_component_get", "Get a detailed information about a component in Draftt where you can get all the data about a component", componentSchema_1.componentGetSchema, async (args) => {
|
|
51
51
|
const result = await componentHandler.get(args);
|
|
52
52
|
return {
|
|
53
53
|
content: result.content.map(item => ({
|
|
@@ -56,7 +56,7 @@ async function main() {
|
|
|
56
56
|
}))
|
|
57
57
|
};
|
|
58
58
|
});
|
|
59
|
-
server.tool("draftt_policy_search", "Search for policies in Draftt", policySchema_1.policySearchSchema, async (args) => {
|
|
59
|
+
server.tool("draftt_policy_search", "Search for policies in Draftt(currently: EOL and Latest and Greatest), were using policies for indecating specific logic for components, for example, a policy might indicate that a component reached end of life and needs to be updated.", policySchema_1.policySearchSchema, async (args) => {
|
|
60
60
|
const result = await policyHandler.search(args);
|
|
61
61
|
return {
|
|
62
62
|
content: result.content.map(item => ({
|
|
@@ -74,7 +74,7 @@ async function main() {
|
|
|
74
74
|
}))
|
|
75
75
|
};
|
|
76
76
|
});
|
|
77
|
-
server.tool("
|
|
77
|
+
server.tool("draftt_policy_component_search", "Search for policy components in Draftt, policy component is an object that describes how a component matches the policy logic (for example, k8s component with version 1.24, matches the EOL policy because version 1.24 reached end of life)", componentSchema_1.policyComponentSearchSchema, async (args) => {
|
|
78
78
|
const result = await policyHandler.componentSearch(args);
|
|
79
79
|
return {
|
|
80
80
|
content: result.content.map(item => ({
|
|
@@ -83,7 +83,7 @@ async function main() {
|
|
|
83
83
|
}))
|
|
84
84
|
};
|
|
85
85
|
});
|
|
86
|
-
server.tool("
|
|
86
|
+
server.tool("draftt_policy_component_get", "Get a specific information about a component policy in Draftt, where you can get all the data about a policy component (for example, when the policy component reached end of life, what is the recommended version etc.)", componentSchema_1.policyComponentGetSchema, async (args) => {
|
|
87
87
|
const result = await policyHandler.componentGet(args);
|
|
88
88
|
return {
|
|
89
89
|
content: result.content.map(item => ({
|
|
@@ -92,7 +92,7 @@ async function main() {
|
|
|
92
92
|
}))
|
|
93
93
|
};
|
|
94
94
|
});
|
|
95
|
-
server.tool("draftt_get", "Get
|
|
95
|
+
server.tool("draftt_get", "Get all draftts (k8s upgrade guide). currently for a k8s components only, draftt is a step by step guide for upgrading a k8s component from one version to another, it includes couple of sections (nodes,images, API, etc.)", drafttSchema_1.drafttGetSchema, async (args) => {
|
|
96
96
|
const result = await drafttHandler.get(args);
|
|
97
97
|
return {
|
|
98
98
|
content: result.content.map(item => ({
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AACA,oEAAoE;AACpE,wEAAiF;AACjF,wDAAgC;AAEhC,qDAAkD;AAClD,kEAA+D;AAC/D,4DAAyD;AACzD,4DAAyD;AACzD,2CAAwD;AAExD,+DAA6I;AAC7I,yDAA6E;AAC7E,yDAAyD;AAGzD,KAAK,UA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ACN,CAAC,CACJ,CAAC;IAEF,uBAAuB;IACvB,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;IAEjD,IAAI,CAAC;QACD,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAChC,MAAM,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;IACjD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,CAAC,KAAK,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;QACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACnB,MAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAC;IAC3B,MAAM,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;IAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { SortParams, DateRangeFilter, TagFilter, ComponentType, Technology, Region, SortDirection } from "../utils/constants";
|
|
2
2
|
export interface ComponentSearchArgs {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
filter?: {
|
|
4
|
+
integrationId?: string;
|
|
5
|
+
uniqueIdentifier?: string;
|
|
6
|
+
region?: Region[];
|
|
7
|
+
technology?: Technology;
|
|
8
|
+
type?: ComponentType[];
|
|
9
|
+
version?: string;
|
|
10
|
+
tags?: TagFilter[];
|
|
11
|
+
createdAt?: DateRangeFilter;
|
|
12
|
+
updatedAt?: DateRangeFilter;
|
|
13
|
+
};
|
|
12
14
|
sort?: SortParams;
|
|
13
15
|
nextToken?: string;
|
|
14
16
|
pageSize?: number;
|
|
@@ -35,21 +37,23 @@ export interface PolicyComponentSortParams {
|
|
|
35
37
|
}
|
|
36
38
|
export interface PolicyComponentSearchArgs {
|
|
37
39
|
policyId: string;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
40
|
+
filter?: {
|
|
41
|
+
componentId?: number;
|
|
42
|
+
integrationId?: number;
|
|
43
|
+
name?: string;
|
|
44
|
+
technology?: Technology;
|
|
45
|
+
type?: ComponentType[];
|
|
46
|
+
urgency?: number;
|
|
47
|
+
priority?: number;
|
|
48
|
+
isCompliant?: boolean;
|
|
49
|
+
requiredVersion?: string;
|
|
50
|
+
desiredVersion?: string;
|
|
51
|
+
recommendedVersion?: string;
|
|
52
|
+
dueDate?: DateRangeFilter;
|
|
53
|
+
tags?: TagFilter[];
|
|
54
|
+
createdAt?: DateRangeFilter;
|
|
55
|
+
updatedAt?: DateRangeFilter;
|
|
56
|
+
};
|
|
53
57
|
sort?: PolicyComponentSortParams;
|
|
54
58
|
nextToken?: string;
|
|
55
59
|
pageSize?: number;
|
package/dist/models/draftt.d.ts
CHANGED
|
@@ -1,58 +1,110 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const componentSearchSchema: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
4
|
+
integrationId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
5
|
+
uniqueIdentifier: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
6
|
+
region: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
7
|
+
technology: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
8
|
+
type: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
9
|
+
version: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
10
|
+
tags: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11
|
+
key: z.ZodString;
|
|
12
|
+
value: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
key: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}, {
|
|
17
|
+
key: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}>, "many">>>;
|
|
20
|
+
createdAt: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
21
|
+
eq: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
22
|
+
gt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
23
|
+
gte: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
24
|
+
lt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
25
|
+
lte: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
eq?: string | undefined;
|
|
28
|
+
gt?: string | undefined;
|
|
29
|
+
gte?: string | undefined;
|
|
30
|
+
lt?: string | undefined;
|
|
31
|
+
lte?: string | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
eq?: string | undefined;
|
|
34
|
+
gt?: string | undefined;
|
|
35
|
+
gte?: string | undefined;
|
|
36
|
+
lt?: string | undefined;
|
|
37
|
+
lte?: string | undefined;
|
|
38
|
+
}>>>;
|
|
39
|
+
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
40
|
+
eq: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
41
|
+
gt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
42
|
+
gte: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
43
|
+
lt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
44
|
+
lte: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
eq?: string | undefined;
|
|
47
|
+
gt?: string | undefined;
|
|
48
|
+
gte?: string | undefined;
|
|
49
|
+
lt?: string | undefined;
|
|
50
|
+
lte?: string | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
eq?: string | undefined;
|
|
53
|
+
gt?: string | undefined;
|
|
54
|
+
gte?: string | undefined;
|
|
55
|
+
lt?: string | undefined;
|
|
56
|
+
lte?: string | undefined;
|
|
57
|
+
}>>>;
|
|
12
58
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
|
|
14
|
-
|
|
59
|
+
type?: string | undefined;
|
|
60
|
+
integrationId?: string | undefined;
|
|
61
|
+
uniqueIdentifier?: string | undefined;
|
|
62
|
+
region?: string | undefined;
|
|
63
|
+
technology?: string | undefined;
|
|
64
|
+
version?: string | undefined;
|
|
65
|
+
tags?: {
|
|
66
|
+
key: string;
|
|
67
|
+
value: string;
|
|
68
|
+
}[] | undefined;
|
|
69
|
+
createdAt?: {
|
|
70
|
+
eq?: string | undefined;
|
|
71
|
+
gt?: string | undefined;
|
|
72
|
+
gte?: string | undefined;
|
|
73
|
+
lt?: string | undefined;
|
|
74
|
+
lte?: string | undefined;
|
|
75
|
+
} | undefined;
|
|
76
|
+
updatedAt?: {
|
|
77
|
+
eq?: string | undefined;
|
|
78
|
+
gt?: string | undefined;
|
|
79
|
+
gte?: string | undefined;
|
|
80
|
+
lt?: string | undefined;
|
|
81
|
+
lte?: string | undefined;
|
|
82
|
+
} | undefined;
|
|
15
83
|
}, {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
gt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
41
|
-
gte: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
42
|
-
lt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
43
|
-
lte: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
44
|
-
}, "strip", z.ZodTypeAny, {
|
|
45
|
-
eq?: string | undefined;
|
|
46
|
-
gt?: string | undefined;
|
|
47
|
-
gte?: string | undefined;
|
|
48
|
-
lt?: string | undefined;
|
|
49
|
-
lte?: string | undefined;
|
|
50
|
-
}, {
|
|
51
|
-
eq?: string | undefined;
|
|
52
|
-
gt?: string | undefined;
|
|
53
|
-
gte?: string | undefined;
|
|
54
|
-
lt?: string | undefined;
|
|
55
|
-
lte?: string | undefined;
|
|
84
|
+
type?: string | undefined;
|
|
85
|
+
integrationId?: string | undefined;
|
|
86
|
+
uniqueIdentifier?: string | undefined;
|
|
87
|
+
region?: string | undefined;
|
|
88
|
+
technology?: string | undefined;
|
|
89
|
+
version?: string | undefined;
|
|
90
|
+
tags?: {
|
|
91
|
+
key: string;
|
|
92
|
+
value: string;
|
|
93
|
+
}[] | undefined;
|
|
94
|
+
createdAt?: {
|
|
95
|
+
eq?: string | undefined;
|
|
96
|
+
gt?: string | undefined;
|
|
97
|
+
gte?: string | undefined;
|
|
98
|
+
lt?: string | undefined;
|
|
99
|
+
lte?: string | undefined;
|
|
100
|
+
} | undefined;
|
|
101
|
+
updatedAt?: {
|
|
102
|
+
eq?: string | undefined;
|
|
103
|
+
gt?: string | undefined;
|
|
104
|
+
gte?: string | undefined;
|
|
105
|
+
lt?: string | undefined;
|
|
106
|
+
lte?: string | undefined;
|
|
107
|
+
} | undefined;
|
|
56
108
|
}>>;
|
|
57
109
|
sort: z.ZodOptional<z.ZodObject<{
|
|
58
110
|
integrationId: z.ZodOptional<z.ZodOptional<z.ZodEnum<["asc", "desc"]>>>;
|
|
@@ -142,83 +194,159 @@ export declare const policyComponentSortSchema: z.ZodObject<{
|
|
|
142
194
|
}>;
|
|
143
195
|
export declare const policyComponentSearchSchema: {
|
|
144
196
|
policyId: z.ZodString;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
197
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
198
|
+
componentId: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
199
|
+
integrationId: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
200
|
+
name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
201
|
+
technology: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
202
|
+
type: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
203
|
+
urgency: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
204
|
+
priority: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
205
|
+
isCompliant: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
206
|
+
requiredVersion: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
207
|
+
desiredVersion: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
208
|
+
recommendedVersion: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
209
|
+
dueDate: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
210
|
+
eq: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
211
|
+
gt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
212
|
+
gte: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
213
|
+
lt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
214
|
+
lte: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
215
|
+
}, "strip", z.ZodTypeAny, {
|
|
216
|
+
eq?: string | undefined;
|
|
217
|
+
gt?: string | undefined;
|
|
218
|
+
gte?: string | undefined;
|
|
219
|
+
lt?: string | undefined;
|
|
220
|
+
lte?: string | undefined;
|
|
221
|
+
}, {
|
|
222
|
+
eq?: string | undefined;
|
|
223
|
+
gt?: string | undefined;
|
|
224
|
+
gte?: string | undefined;
|
|
225
|
+
lt?: string | undefined;
|
|
226
|
+
lte?: string | undefined;
|
|
227
|
+
}>>>;
|
|
228
|
+
tags: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
229
|
+
key: z.ZodString;
|
|
230
|
+
value: z.ZodString;
|
|
231
|
+
}, "strip", z.ZodTypeAny, {
|
|
232
|
+
key: string;
|
|
233
|
+
value: string;
|
|
234
|
+
}, {
|
|
235
|
+
key: string;
|
|
236
|
+
value: string;
|
|
237
|
+
}>, "many">>>;
|
|
238
|
+
createdAt: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
239
|
+
eq: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
240
|
+
gt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
241
|
+
gte: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
242
|
+
lt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
243
|
+
lte: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
244
|
+
}, "strip", z.ZodTypeAny, {
|
|
245
|
+
eq?: string | undefined;
|
|
246
|
+
gt?: string | undefined;
|
|
247
|
+
gte?: string | undefined;
|
|
248
|
+
lt?: string | undefined;
|
|
249
|
+
lte?: string | undefined;
|
|
250
|
+
}, {
|
|
251
|
+
eq?: string | undefined;
|
|
252
|
+
gt?: string | undefined;
|
|
253
|
+
gte?: string | undefined;
|
|
254
|
+
lt?: string | undefined;
|
|
255
|
+
lte?: string | undefined;
|
|
256
|
+
}>>>;
|
|
257
|
+
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
258
|
+
eq: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
259
|
+
gt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
260
|
+
gte: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
261
|
+
lt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
262
|
+
lte: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
263
|
+
}, "strip", z.ZodTypeAny, {
|
|
264
|
+
eq?: string | undefined;
|
|
265
|
+
gt?: string | undefined;
|
|
266
|
+
gte?: string | undefined;
|
|
267
|
+
lt?: string | undefined;
|
|
268
|
+
lte?: string | undefined;
|
|
269
|
+
}, {
|
|
270
|
+
eq?: string | undefined;
|
|
271
|
+
gt?: string | undefined;
|
|
272
|
+
gte?: string | undefined;
|
|
273
|
+
lt?: string | undefined;
|
|
274
|
+
lte?: string | undefined;
|
|
275
|
+
}>>>;
|
|
210
276
|
}, "strip", z.ZodTypeAny, {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
277
|
+
name?: string | undefined;
|
|
278
|
+
type?: string | undefined;
|
|
279
|
+
integrationId?: number | undefined;
|
|
280
|
+
technology?: string | undefined;
|
|
281
|
+
tags?: {
|
|
282
|
+
key: string;
|
|
283
|
+
value: string;
|
|
284
|
+
}[] | undefined;
|
|
285
|
+
createdAt?: {
|
|
286
|
+
eq?: string | undefined;
|
|
287
|
+
gt?: string | undefined;
|
|
288
|
+
gte?: string | undefined;
|
|
289
|
+
lt?: string | undefined;
|
|
290
|
+
lte?: string | undefined;
|
|
291
|
+
} | undefined;
|
|
292
|
+
updatedAt?: {
|
|
293
|
+
eq?: string | undefined;
|
|
294
|
+
gt?: string | undefined;
|
|
295
|
+
gte?: string | undefined;
|
|
296
|
+
lt?: string | undefined;
|
|
297
|
+
lte?: string | undefined;
|
|
298
|
+
} | undefined;
|
|
299
|
+
componentId?: number | undefined;
|
|
300
|
+
urgency?: number | undefined;
|
|
301
|
+
priority?: number | undefined;
|
|
302
|
+
isCompliant?: boolean | undefined;
|
|
303
|
+
requiredVersion?: string | undefined;
|
|
304
|
+
desiredVersion?: string | undefined;
|
|
305
|
+
recommendedVersion?: string | undefined;
|
|
306
|
+
dueDate?: {
|
|
307
|
+
eq?: string | undefined;
|
|
308
|
+
gt?: string | undefined;
|
|
309
|
+
gte?: string | undefined;
|
|
310
|
+
lt?: string | undefined;
|
|
311
|
+
lte?: string | undefined;
|
|
312
|
+
} | undefined;
|
|
216
313
|
}, {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
314
|
+
name?: string | undefined;
|
|
315
|
+
type?: string | undefined;
|
|
316
|
+
integrationId?: number | undefined;
|
|
317
|
+
technology?: string | undefined;
|
|
318
|
+
tags?: {
|
|
319
|
+
key: string;
|
|
320
|
+
value: string;
|
|
321
|
+
}[] | undefined;
|
|
322
|
+
createdAt?: {
|
|
323
|
+
eq?: string | undefined;
|
|
324
|
+
gt?: string | undefined;
|
|
325
|
+
gte?: string | undefined;
|
|
326
|
+
lt?: string | undefined;
|
|
327
|
+
lte?: string | undefined;
|
|
328
|
+
} | undefined;
|
|
329
|
+
updatedAt?: {
|
|
330
|
+
eq?: string | undefined;
|
|
331
|
+
gt?: string | undefined;
|
|
332
|
+
gte?: string | undefined;
|
|
333
|
+
lt?: string | undefined;
|
|
334
|
+
lte?: string | undefined;
|
|
335
|
+
} | undefined;
|
|
336
|
+
componentId?: number | undefined;
|
|
337
|
+
urgency?: number | undefined;
|
|
338
|
+
priority?: number | undefined;
|
|
339
|
+
isCompliant?: boolean | undefined;
|
|
340
|
+
requiredVersion?: string | undefined;
|
|
341
|
+
desiredVersion?: string | undefined;
|
|
342
|
+
recommendedVersion?: string | undefined;
|
|
343
|
+
dueDate?: {
|
|
344
|
+
eq?: string | undefined;
|
|
345
|
+
gt?: string | undefined;
|
|
346
|
+
gte?: string | undefined;
|
|
347
|
+
lt?: string | undefined;
|
|
348
|
+
lte?: string | undefined;
|
|
349
|
+
} | undefined;
|
|
222
350
|
}>>;
|
|
223
351
|
sort: z.ZodOptional<z.ZodObject<{
|
|
224
352
|
componentId: z.ZodOptional<z.ZodOptional<z.ZodEnum<["asc", "desc"]>>>;
|
|
@@ -25,16 +25,19 @@ const componentSortSchema = zod_1.z.object({
|
|
|
25
25
|
createdAt: zod_1.z.enum(["asc", "desc"]).optional(),
|
|
26
26
|
updatedAt: zod_1.z.enum(["asc", "desc"]).optional(),
|
|
27
27
|
}).partial();
|
|
28
|
-
|
|
28
|
+
const componentFilterSchema = zod_1.z.object({
|
|
29
29
|
integrationId: zod_1.z.string().optional(),
|
|
30
30
|
uniqueIdentifier: zod_1.z.string().optional(),
|
|
31
|
-
region: zod_1.z.
|
|
32
|
-
technology: zod_1.z.
|
|
33
|
-
type: zod_1.z.
|
|
31
|
+
region: zod_1.z.string(zod_1.z.enum(constants_1.AllRegions)).optional(),
|
|
32
|
+
technology: zod_1.z.string(zod_1.z.enum(constants_1.Technologies)).optional(),
|
|
33
|
+
type: zod_1.z.string(zod_1.z.enum(constants_1.ComponentTypes)).optional(),
|
|
34
34
|
version: zod_1.z.string().optional(),
|
|
35
35
|
tags: zod_1.z.array(tagFilterSchema).optional(),
|
|
36
36
|
createdAt: dateRangeFilterSchema.optional(),
|
|
37
37
|
updatedAt: dateRangeFilterSchema.optional(),
|
|
38
|
+
}).partial();
|
|
39
|
+
exports.componentSearchSchema = {
|
|
40
|
+
filter: componentFilterSchema.optional(),
|
|
38
41
|
sort: componentSortSchema.optional(),
|
|
39
42
|
nextToken: zod_1.z.string().optional(),
|
|
40
43
|
pageSize: zod_1.z.number().int().min(1).max(100).default(10).optional(),
|
|
@@ -59,13 +62,12 @@ exports.policyComponentSortSchema = zod_1.z.object({
|
|
|
59
62
|
createdAt: zod_1.z.enum(["asc", "desc"]).optional(),
|
|
60
63
|
updatedAt: zod_1.z.enum(["asc", "desc"]).optional(),
|
|
61
64
|
}).partial();
|
|
62
|
-
|
|
63
|
-
policyId: zod_1.z.string(),
|
|
65
|
+
const policyComponentFilterSchema = zod_1.z.object({
|
|
64
66
|
componentId: zod_1.z.number().optional(),
|
|
65
67
|
integrationId: zod_1.z.number().optional(),
|
|
66
68
|
name: zod_1.z.string().optional(),
|
|
67
|
-
technology: zod_1.z.
|
|
68
|
-
type: zod_1.z.
|
|
69
|
+
technology: zod_1.z.string(zod_1.z.enum(constants_1.Technologies)).optional(),
|
|
70
|
+
type: zod_1.z.string(zod_1.z.enum(constants_1.ComponentTypes)).optional(),
|
|
69
71
|
urgency: zod_1.z.number().optional(),
|
|
70
72
|
priority: zod_1.z.number().optional(),
|
|
71
73
|
isCompliant: zod_1.z.boolean().optional(),
|
|
@@ -76,6 +78,10 @@ exports.policyComponentSearchSchema = {
|
|
|
76
78
|
tags: zod_1.z.array(tagFilterSchema).optional(),
|
|
77
79
|
createdAt: dateRangeFilterSchema.optional(),
|
|
78
80
|
updatedAt: dateRangeFilterSchema.optional(),
|
|
81
|
+
}).partial();
|
|
82
|
+
exports.policyComponentSearchSchema = {
|
|
83
|
+
policyId: zod_1.z.string(),
|
|
84
|
+
filter: policyComponentFilterSchema.optional(),
|
|
79
85
|
sort: exports.policyComponentSortSchema.optional(),
|
|
80
86
|
nextToken: zod_1.z.string().optional(),
|
|
81
87
|
pageSize: zod_1.z.number().int().min(1).max(100).default(10).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentSchema.js","sourceRoot":"","sources":["../../src/schemas/componentSchema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAA8E;AAE9E,MAAM,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC,OAAO,EAAE,CAAC;AAEb,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IACjC,aAAa,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;IACjD,gBAAgB,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,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E,qBAAqB,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC,OAAO,EAAE,CAAC;AAEA,QAAA,2BAA2B,GAAG;IACvC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,2BAA2B,CAAC,QAAQ,EAAE;IAC9C,IAAI,EAAE,iCAAyB,CAAC,QAAQ,EAAE;IAC1C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CACpE,CAAC;AAEW,QAAA,wBAAwB,GAAG;IACpC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;CAC1B,CAAC"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.drafttGetSchema = void 0;
|
|
4
|
-
|
|
5
|
-
exports.drafttGetSchema = {
|
|
6
|
-
componentId: zod_1.z.string(),
|
|
7
|
-
};
|
|
4
|
+
exports.drafttGetSchema = {};
|
|
8
5
|
//# sourceMappingURL=drafttSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drafttSchema.js","sourceRoot":"","sources":["../../src/schemas/drafttSchema.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"drafttSchema.js","sourceRoot":"","sources":["../../src/schemas/drafttSchema.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAG,EAC9B,CAAC"}
|