@ampsec/platform-client 64.4.0 → 66.0.0
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/build/src/dto/agents.dto.d.ts +80 -2
- package/build/src/dto/agents.dto.js +17 -0
- package/build/src/dto/agents.dto.js.map +1 -1
- package/build/src/dto/customActions.dto.d.ts +113 -113
- package/build/src/dto/customActions.dto.js +7 -5
- package/build/src/dto/customActions.dto.js.map +1 -1
- package/build/src/dto/customScores.dto.d.ts +12 -120
- package/build/src/dto/customScores.dto.js +1 -1
- package/build/src/dto/customScores.dto.js.map +1 -1
- package/build/src/dto/enums/findingSpecKind.d.ts +4 -0
- package/build/src/dto/enums/findingSpecKind.js +9 -0
- package/build/src/dto/enums/findingSpecKind.js.map +1 -0
- package/build/src/dto/enums/index.d.ts +1 -0
- package/build/src/dto/enums/index.js +1 -0
- package/build/src/dto/enums/index.js.map +1 -1
- package/build/src/dto/findings.dto.d.ts +7 -1
- package/build/src/dto/findings.dto.js +1 -0
- package/build/src/dto/findings.dto.js.map +1 -1
- package/build/src/dto/platform/platform.customActions.dto.d.ts +62 -62
- package/build/src/dto/platform/platform.customScores.dto.d.ts +12 -120
- package/build/src/dto/platform/platform.findings.dto.d.ts +6 -0
- package/build/src/services/AgentsService.d.ts +47 -0
- package/build/src/services/AgentsService.js +23 -0
- package/build/src/services/AgentsService.js.map +1 -0
- package/build/src/services/AmpApi.d.ts +3 -2
- package/build/src/services/AmpApi.js +2 -1
- package/build/src/services/AmpApi.js.map +1 -1
- package/package.json +1 -1
- package/src/dto/agents.dto.ts +22 -3
- package/src/dto/customActions.dto.ts +10 -8
- package/src/dto/customScores.dto.ts +1 -1
- package/src/dto/enums/findingSpecKind.ts +4 -0
- package/src/dto/enums/index.ts +1 -0
- package/src/dto/findings.dto.ts +2 -1
- package/src/services/AgentsService.ts +25 -0
- package/src/services/AmpApi.ts +3 -4
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { AgentStatus } from './enums/agent.status';
|
|
2
2
|
import { BaseDto, BaseUpsertDto } from './base.dto';
|
|
3
|
+
import { AuthRole } from './enums';
|
|
4
|
+
import { z } from 'zod';
|
|
3
5
|
export type AgentUpsertDto = BaseUpsertDto & {
|
|
4
6
|
/** Agent first name */
|
|
5
|
-
firstName: string;
|
|
7
|
+
firstName: string | null;
|
|
6
8
|
/** Agent last name */
|
|
7
|
-
lastName: string;
|
|
9
|
+
lastName: string | null;
|
|
8
10
|
/** Status of the Agent, e.g. ACTIVE */
|
|
9
11
|
status: AgentStatus;
|
|
10
12
|
/** External Id */
|
|
@@ -13,3 +15,79 @@ export type AgentUpsertDto = BaseUpsertDto & {
|
|
|
13
15
|
pictureUrl?: string;
|
|
14
16
|
};
|
|
15
17
|
export type AgentDto = BaseDto & AgentUpsertDto;
|
|
18
|
+
export declare const _AgentSummaryDto: z.ZodObject<{
|
|
19
|
+
email: z.ZodString;
|
|
20
|
+
status: z.ZodNativeEnum<typeof AgentStatus>;
|
|
21
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
22
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
23
|
+
pictureUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
role: z.ZodNativeEnum<typeof AuthRole>;
|
|
25
|
+
lastLoggedIn: z.ZodNullable<z.ZodDate>;
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
createdAt: z.ZodString;
|
|
28
|
+
updatedAt: z.ZodString;
|
|
29
|
+
deletedAt: z.ZodNullable<z.ZodString>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
email: string;
|
|
32
|
+
status: AgentStatus;
|
|
33
|
+
id: string;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
deletedAt: string | null;
|
|
37
|
+
firstName: string | null;
|
|
38
|
+
lastName: string | null;
|
|
39
|
+
role: AuthRole;
|
|
40
|
+
lastLoggedIn: Date | null;
|
|
41
|
+
pictureUrl?: string | null | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
email: string;
|
|
44
|
+
status: AgentStatus;
|
|
45
|
+
id: string;
|
|
46
|
+
createdAt: string;
|
|
47
|
+
updatedAt: string;
|
|
48
|
+
deletedAt: string | null;
|
|
49
|
+
firstName: string | null;
|
|
50
|
+
lastName: string | null;
|
|
51
|
+
role: AuthRole;
|
|
52
|
+
lastLoggedIn: Date | null;
|
|
53
|
+
pictureUrl?: string | null | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
export type AgentSummaryDto = z.infer<typeof _AgentSummaryDto>;
|
|
56
|
+
export declare const _AgentSummaryUpsertDto: z.ZodObject<{
|
|
57
|
+
email: z.ZodOptional<z.ZodString>;
|
|
58
|
+
status: z.ZodOptional<z.ZodNativeEnum<typeof AgentStatus>>;
|
|
59
|
+
firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
|
+
lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
+
pictureUrl: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
62
|
+
role: z.ZodOptional<z.ZodNativeEnum<typeof AuthRole>>;
|
|
63
|
+
lastLoggedIn: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
64
|
+
id: z.ZodOptional<z.ZodString>;
|
|
65
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
66
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
67
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
email?: string | undefined;
|
|
70
|
+
status?: AgentStatus | undefined;
|
|
71
|
+
firstName?: string | null | undefined;
|
|
72
|
+
lastName?: string | null | undefined;
|
|
73
|
+
pictureUrl?: string | null | undefined;
|
|
74
|
+
role?: AuthRole | undefined;
|
|
75
|
+
lastLoggedIn?: Date | null | undefined;
|
|
76
|
+
id?: string | undefined;
|
|
77
|
+
createdAt?: string | undefined;
|
|
78
|
+
updatedAt?: string | undefined;
|
|
79
|
+
deletedAt?: string | null | undefined;
|
|
80
|
+
}, {
|
|
81
|
+
email?: string | undefined;
|
|
82
|
+
status?: AgentStatus | undefined;
|
|
83
|
+
firstName?: string | null | undefined;
|
|
84
|
+
lastName?: string | null | undefined;
|
|
85
|
+
pictureUrl?: string | null | undefined;
|
|
86
|
+
role?: AuthRole | undefined;
|
|
87
|
+
lastLoggedIn?: Date | null | undefined;
|
|
88
|
+
id?: string | undefined;
|
|
89
|
+
createdAt?: string | undefined;
|
|
90
|
+
updatedAt?: string | undefined;
|
|
91
|
+
deletedAt?: string | null | undefined;
|
|
92
|
+
}>;
|
|
93
|
+
export type AgentSummaryUpsertDto = z.infer<typeof _AgentSummaryUpsertDto>;
|
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._AgentSummaryUpsertDto = exports._AgentSummaryDto = void 0;
|
|
4
|
+
const agent_status_1 = require("./enums/agent.status");
|
|
5
|
+
const base_dto_1 = require("./base.dto");
|
|
6
|
+
const enums_1 = require("./enums");
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
exports._AgentSummaryDto = zod_1.z
|
|
9
|
+
.object({
|
|
10
|
+
firstName: zod_1.z.string().nullable(),
|
|
11
|
+
lastName: zod_1.z.string().nullable(),
|
|
12
|
+
email: zod_1.z.string(),
|
|
13
|
+
pictureUrl: zod_1.z.string().nullable().optional(),
|
|
14
|
+
status: zod_1.z.nativeEnum(agent_status_1.AgentStatus),
|
|
15
|
+
role: zod_1.z.nativeEnum(enums_1.AuthRole),
|
|
16
|
+
lastLoggedIn: zod_1.z.date().nullable(),
|
|
17
|
+
})
|
|
18
|
+
.merge(base_dto_1._BaseDto);
|
|
19
|
+
exports._AgentSummaryUpsertDto = exports._AgentSummaryDto.partial();
|
|
3
20
|
//# sourceMappingURL=agents.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.dto.js","sourceRoot":"","sources":["../../../src/dto/agents.dto.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"agents.dto.js","sourceRoot":"","sources":["../../../src/dto/agents.dto.ts"],"names":[],"mappings":";;;AAAA,uDAAiD;AACjD,yCAA4E;AAC5E,mCAAiC;AACjC,6BAAsB;AAoBT,QAAA,gBAAgB,GAAG,OAAC;KAC9B,MAAM,CAAC;IACN,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,0BAAW,CAAC;IACjC,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,gBAAQ,CAAC;IAC5B,YAAY,EAAE,OAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC;KACD,KAAK,CAAC,mBAAQ,CAAC,CAAC;AAIN,QAAA,sBAAsB,GAAG,wBAAgB,CAAC,OAAO,EAAE,CAAC"}
|
|
@@ -3,7 +3,7 @@ export declare const _CustomRestActionMetaDto: z.ZodObject<{
|
|
|
3
3
|
request: z.ZodObject<{
|
|
4
4
|
url: z.ZodString;
|
|
5
5
|
method: z.ZodString;
|
|
6
|
-
payload: z.ZodObject<{
|
|
6
|
+
payload: z.ZodOptional<z.ZodObject<{
|
|
7
7
|
kind: z.ZodLiteral<"TEMPLATE">;
|
|
8
8
|
format: z.ZodLiteral<"JSON">;
|
|
9
9
|
value: z.ZodString;
|
|
@@ -15,60 +15,60 @@ export declare const _CustomRestActionMetaDto: z.ZodObject<{
|
|
|
15
15
|
value: string;
|
|
16
16
|
kind: "TEMPLATE";
|
|
17
17
|
format: "JSON";
|
|
18
|
-
}
|
|
19
|
-
headers: z.ZodRecord<z.ZodString, z.ZodString
|
|
20
|
-
params: z.ZodRecord<z.ZodString, z.ZodString
|
|
18
|
+
}>>;
|
|
19
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
20
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
22
|
method: string;
|
|
23
23
|
url: string;
|
|
24
|
-
|
|
25
|
-
payload: {
|
|
24
|
+
payload?: {
|
|
26
25
|
value: string;
|
|
27
26
|
kind: "TEMPLATE";
|
|
28
27
|
format: "JSON";
|
|
29
|
-
};
|
|
30
|
-
headers
|
|
28
|
+
} | undefined;
|
|
29
|
+
headers?: Record<string, string> | undefined;
|
|
30
|
+
params?: Record<string, string> | undefined;
|
|
31
31
|
}, {
|
|
32
32
|
method: string;
|
|
33
33
|
url: string;
|
|
34
|
-
|
|
35
|
-
payload: {
|
|
34
|
+
payload?: {
|
|
36
35
|
value: string;
|
|
37
36
|
kind: "TEMPLATE";
|
|
38
37
|
format: "JSON";
|
|
39
|
-
};
|
|
40
|
-
headers
|
|
38
|
+
} | undefined;
|
|
39
|
+
headers?: Record<string, string> | undefined;
|
|
40
|
+
params?: Record<string, string> | undefined;
|
|
41
41
|
}>;
|
|
42
42
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
43
43
|
}, "strip", z.ZodTypeAny, {
|
|
44
44
|
request: {
|
|
45
45
|
method: string;
|
|
46
46
|
url: string;
|
|
47
|
-
|
|
48
|
-
payload: {
|
|
47
|
+
payload?: {
|
|
49
48
|
value: string;
|
|
50
49
|
kind: "TEMPLATE";
|
|
51
50
|
format: "JSON";
|
|
52
|
-
};
|
|
53
|
-
headers
|
|
51
|
+
} | undefined;
|
|
52
|
+
headers?: Record<string, string> | undefined;
|
|
53
|
+
params?: Record<string, string> | undefined;
|
|
54
54
|
};
|
|
55
55
|
timeout?: number | undefined;
|
|
56
56
|
}, {
|
|
57
57
|
request: {
|
|
58
58
|
method: string;
|
|
59
59
|
url: string;
|
|
60
|
-
|
|
61
|
-
payload: {
|
|
60
|
+
payload?: {
|
|
62
61
|
value: string;
|
|
63
62
|
kind: "TEMPLATE";
|
|
64
63
|
format: "JSON";
|
|
65
|
-
};
|
|
66
|
-
headers
|
|
64
|
+
} | undefined;
|
|
65
|
+
headers?: Record<string, string> | undefined;
|
|
66
|
+
params?: Record<string, string> | undefined;
|
|
67
67
|
};
|
|
68
68
|
timeout?: number | undefined;
|
|
69
69
|
}>;
|
|
70
70
|
declare const _CustomRestActionDto: z.ZodObject<{
|
|
71
|
-
description: z.ZodString
|
|
71
|
+
description: z.ZodOptional<z.ZodString>;
|
|
72
72
|
id: z.ZodString;
|
|
73
73
|
createdAt: z.ZodString;
|
|
74
74
|
updatedAt: z.ZodString;
|
|
@@ -93,7 +93,7 @@ declare const _CustomRestActionDto: z.ZodObject<{
|
|
|
93
93
|
request: z.ZodObject<{
|
|
94
94
|
url: z.ZodString;
|
|
95
95
|
method: z.ZodString;
|
|
96
|
-
payload: z.ZodObject<{
|
|
96
|
+
payload: z.ZodOptional<z.ZodObject<{
|
|
97
97
|
kind: z.ZodLiteral<"TEMPLATE">;
|
|
98
98
|
format: z.ZodLiteral<"JSON">;
|
|
99
99
|
value: z.ZodString;
|
|
@@ -105,60 +105,59 @@ declare const _CustomRestActionDto: z.ZodObject<{
|
|
|
105
105
|
value: string;
|
|
106
106
|
kind: "TEMPLATE";
|
|
107
107
|
format: "JSON";
|
|
108
|
-
}
|
|
109
|
-
headers: z.ZodRecord<z.ZodString, z.ZodString
|
|
110
|
-
params: z.ZodRecord<z.ZodString, z.ZodString
|
|
108
|
+
}>>;
|
|
109
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
110
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
111
111
|
}, "strip", z.ZodTypeAny, {
|
|
112
112
|
method: string;
|
|
113
113
|
url: string;
|
|
114
|
-
|
|
115
|
-
payload: {
|
|
114
|
+
payload?: {
|
|
116
115
|
value: string;
|
|
117
116
|
kind: "TEMPLATE";
|
|
118
117
|
format: "JSON";
|
|
119
|
-
};
|
|
120
|
-
headers
|
|
118
|
+
} | undefined;
|
|
119
|
+
headers?: Record<string, string> | undefined;
|
|
120
|
+
params?: Record<string, string> | undefined;
|
|
121
121
|
}, {
|
|
122
122
|
method: string;
|
|
123
123
|
url: string;
|
|
124
|
-
|
|
125
|
-
payload: {
|
|
124
|
+
payload?: {
|
|
126
125
|
value: string;
|
|
127
126
|
kind: "TEMPLATE";
|
|
128
127
|
format: "JSON";
|
|
129
|
-
};
|
|
130
|
-
headers
|
|
128
|
+
} | undefined;
|
|
129
|
+
headers?: Record<string, string> | undefined;
|
|
130
|
+
params?: Record<string, string> | undefined;
|
|
131
131
|
}>;
|
|
132
132
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
133
133
|
}, "strip", z.ZodTypeAny, {
|
|
134
134
|
request: {
|
|
135
135
|
method: string;
|
|
136
136
|
url: string;
|
|
137
|
-
|
|
138
|
-
payload: {
|
|
137
|
+
payload?: {
|
|
139
138
|
value: string;
|
|
140
139
|
kind: "TEMPLATE";
|
|
141
140
|
format: "JSON";
|
|
142
|
-
};
|
|
143
|
-
headers
|
|
141
|
+
} | undefined;
|
|
142
|
+
headers?: Record<string, string> | undefined;
|
|
143
|
+
params?: Record<string, string> | undefined;
|
|
144
144
|
};
|
|
145
145
|
timeout?: number | undefined;
|
|
146
146
|
}, {
|
|
147
147
|
request: {
|
|
148
148
|
method: string;
|
|
149
149
|
url: string;
|
|
150
|
-
|
|
151
|
-
payload: {
|
|
150
|
+
payload?: {
|
|
152
151
|
value: string;
|
|
153
152
|
kind: "TEMPLATE";
|
|
154
153
|
format: "JSON";
|
|
155
|
-
};
|
|
156
|
-
headers
|
|
154
|
+
} | undefined;
|
|
155
|
+
headers?: Record<string, string> | undefined;
|
|
156
|
+
params?: Record<string, string> | undefined;
|
|
157
157
|
};
|
|
158
158
|
timeout?: number | undefined;
|
|
159
159
|
}>;
|
|
160
160
|
}, "strip", z.ZodTypeAny, {
|
|
161
|
-
description: string;
|
|
162
161
|
id: string;
|
|
163
162
|
createdAt: string;
|
|
164
163
|
updatedAt: string;
|
|
@@ -168,25 +167,25 @@ declare const _CustomRestActionDto: z.ZodObject<{
|
|
|
168
167
|
request: {
|
|
169
168
|
method: string;
|
|
170
169
|
url: string;
|
|
171
|
-
|
|
172
|
-
payload: {
|
|
170
|
+
payload?: {
|
|
173
171
|
value: string;
|
|
174
172
|
kind: "TEMPLATE";
|
|
175
173
|
format: "JSON";
|
|
176
|
-
};
|
|
177
|
-
headers
|
|
174
|
+
} | undefined;
|
|
175
|
+
headers?: Record<string, string> | undefined;
|
|
176
|
+
params?: Record<string, string> | undefined;
|
|
178
177
|
};
|
|
179
178
|
timeout?: number | undefined;
|
|
180
179
|
};
|
|
181
180
|
isTemplate: boolean;
|
|
182
181
|
kind: "REST_ACTION";
|
|
182
|
+
description?: string | undefined;
|
|
183
183
|
retryStrategy?: {
|
|
184
184
|
kind: "CONSTANT_BACKOFF";
|
|
185
185
|
maxRetries: number;
|
|
186
186
|
delay: number;
|
|
187
187
|
} | undefined;
|
|
188
188
|
}, {
|
|
189
|
-
description: string;
|
|
190
189
|
id: string;
|
|
191
190
|
createdAt: string;
|
|
192
191
|
updatedAt: string;
|
|
@@ -196,18 +195,19 @@ declare const _CustomRestActionDto: z.ZodObject<{
|
|
|
196
195
|
request: {
|
|
197
196
|
method: string;
|
|
198
197
|
url: string;
|
|
199
|
-
|
|
200
|
-
payload: {
|
|
198
|
+
payload?: {
|
|
201
199
|
value: string;
|
|
202
200
|
kind: "TEMPLATE";
|
|
203
201
|
format: "JSON";
|
|
204
|
-
};
|
|
205
|
-
headers
|
|
202
|
+
} | undefined;
|
|
203
|
+
headers?: Record<string, string> | undefined;
|
|
204
|
+
params?: Record<string, string> | undefined;
|
|
206
205
|
};
|
|
207
206
|
timeout?: number | undefined;
|
|
208
207
|
};
|
|
209
208
|
isTemplate: boolean;
|
|
210
209
|
kind: "REST_ACTION";
|
|
210
|
+
description?: string | undefined;
|
|
211
211
|
retryStrategy?: {
|
|
212
212
|
kind: "CONSTANT_BACKOFF";
|
|
213
213
|
maxRetries: number;
|
|
@@ -216,7 +216,7 @@ declare const _CustomRestActionDto: z.ZodObject<{
|
|
|
216
216
|
}>;
|
|
217
217
|
export type CustomRestActionDto = z.infer<typeof _CustomRestActionDto>;
|
|
218
218
|
export declare const _CustomActionDto: z.ZodObject<{
|
|
219
|
-
description: z.ZodString
|
|
219
|
+
description: z.ZodOptional<z.ZodString>;
|
|
220
220
|
id: z.ZodString;
|
|
221
221
|
createdAt: z.ZodString;
|
|
222
222
|
updatedAt: z.ZodString;
|
|
@@ -241,7 +241,7 @@ export declare const _CustomActionDto: z.ZodObject<{
|
|
|
241
241
|
request: z.ZodObject<{
|
|
242
242
|
url: z.ZodString;
|
|
243
243
|
method: z.ZodString;
|
|
244
|
-
payload: z.ZodObject<{
|
|
244
|
+
payload: z.ZodOptional<z.ZodObject<{
|
|
245
245
|
kind: z.ZodLiteral<"TEMPLATE">;
|
|
246
246
|
format: z.ZodLiteral<"JSON">;
|
|
247
247
|
value: z.ZodString;
|
|
@@ -253,60 +253,59 @@ export declare const _CustomActionDto: z.ZodObject<{
|
|
|
253
253
|
value: string;
|
|
254
254
|
kind: "TEMPLATE";
|
|
255
255
|
format: "JSON";
|
|
256
|
-
}
|
|
257
|
-
headers: z.ZodRecord<z.ZodString, z.ZodString
|
|
258
|
-
params: z.ZodRecord<z.ZodString, z.ZodString
|
|
256
|
+
}>>;
|
|
257
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
258
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
259
259
|
}, "strip", z.ZodTypeAny, {
|
|
260
260
|
method: string;
|
|
261
261
|
url: string;
|
|
262
|
-
|
|
263
|
-
payload: {
|
|
262
|
+
payload?: {
|
|
264
263
|
value: string;
|
|
265
264
|
kind: "TEMPLATE";
|
|
266
265
|
format: "JSON";
|
|
267
|
-
};
|
|
268
|
-
headers
|
|
266
|
+
} | undefined;
|
|
267
|
+
headers?: Record<string, string> | undefined;
|
|
268
|
+
params?: Record<string, string> | undefined;
|
|
269
269
|
}, {
|
|
270
270
|
method: string;
|
|
271
271
|
url: string;
|
|
272
|
-
|
|
273
|
-
payload: {
|
|
272
|
+
payload?: {
|
|
274
273
|
value: string;
|
|
275
274
|
kind: "TEMPLATE";
|
|
276
275
|
format: "JSON";
|
|
277
|
-
};
|
|
278
|
-
headers
|
|
276
|
+
} | undefined;
|
|
277
|
+
headers?: Record<string, string> | undefined;
|
|
278
|
+
params?: Record<string, string> | undefined;
|
|
279
279
|
}>;
|
|
280
280
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
281
281
|
}, "strip", z.ZodTypeAny, {
|
|
282
282
|
request: {
|
|
283
283
|
method: string;
|
|
284
284
|
url: string;
|
|
285
|
-
|
|
286
|
-
payload: {
|
|
285
|
+
payload?: {
|
|
287
286
|
value: string;
|
|
288
287
|
kind: "TEMPLATE";
|
|
289
288
|
format: "JSON";
|
|
290
|
-
};
|
|
291
|
-
headers
|
|
289
|
+
} | undefined;
|
|
290
|
+
headers?: Record<string, string> | undefined;
|
|
291
|
+
params?: Record<string, string> | undefined;
|
|
292
292
|
};
|
|
293
293
|
timeout?: number | undefined;
|
|
294
294
|
}, {
|
|
295
295
|
request: {
|
|
296
296
|
method: string;
|
|
297
297
|
url: string;
|
|
298
|
-
|
|
299
|
-
payload: {
|
|
298
|
+
payload?: {
|
|
300
299
|
value: string;
|
|
301
300
|
kind: "TEMPLATE";
|
|
302
301
|
format: "JSON";
|
|
303
|
-
};
|
|
304
|
-
headers
|
|
302
|
+
} | undefined;
|
|
303
|
+
headers?: Record<string, string> | undefined;
|
|
304
|
+
params?: Record<string, string> | undefined;
|
|
305
305
|
};
|
|
306
306
|
timeout?: number | undefined;
|
|
307
307
|
}>;
|
|
308
308
|
}, "strip", z.ZodTypeAny, {
|
|
309
|
-
description: string;
|
|
310
309
|
id: string;
|
|
311
310
|
createdAt: string;
|
|
312
311
|
updatedAt: string;
|
|
@@ -316,25 +315,25 @@ export declare const _CustomActionDto: z.ZodObject<{
|
|
|
316
315
|
request: {
|
|
317
316
|
method: string;
|
|
318
317
|
url: string;
|
|
319
|
-
|
|
320
|
-
payload: {
|
|
318
|
+
payload?: {
|
|
321
319
|
value: string;
|
|
322
320
|
kind: "TEMPLATE";
|
|
323
321
|
format: "JSON";
|
|
324
|
-
};
|
|
325
|
-
headers
|
|
322
|
+
} | undefined;
|
|
323
|
+
headers?: Record<string, string> | undefined;
|
|
324
|
+
params?: Record<string, string> | undefined;
|
|
326
325
|
};
|
|
327
326
|
timeout?: number | undefined;
|
|
328
327
|
};
|
|
329
328
|
isTemplate: boolean;
|
|
330
329
|
kind: "REST_ACTION";
|
|
330
|
+
description?: string | undefined;
|
|
331
331
|
retryStrategy?: {
|
|
332
332
|
kind: "CONSTANT_BACKOFF";
|
|
333
333
|
maxRetries: number;
|
|
334
334
|
delay: number;
|
|
335
335
|
} | undefined;
|
|
336
336
|
}, {
|
|
337
|
-
description: string;
|
|
338
337
|
id: string;
|
|
339
338
|
createdAt: string;
|
|
340
339
|
updatedAt: string;
|
|
@@ -344,18 +343,19 @@ export declare const _CustomActionDto: z.ZodObject<{
|
|
|
344
343
|
request: {
|
|
345
344
|
method: string;
|
|
346
345
|
url: string;
|
|
347
|
-
|
|
348
|
-
payload: {
|
|
346
|
+
payload?: {
|
|
349
347
|
value: string;
|
|
350
348
|
kind: "TEMPLATE";
|
|
351
349
|
format: "JSON";
|
|
352
|
-
};
|
|
353
|
-
headers
|
|
350
|
+
} | undefined;
|
|
351
|
+
headers?: Record<string, string> | undefined;
|
|
352
|
+
params?: Record<string, string> | undefined;
|
|
354
353
|
};
|
|
355
354
|
timeout?: number | undefined;
|
|
356
355
|
};
|
|
357
356
|
isTemplate: boolean;
|
|
358
357
|
kind: "REST_ACTION";
|
|
358
|
+
description?: string | undefined;
|
|
359
359
|
retryStrategy?: {
|
|
360
360
|
kind: "CONSTANT_BACKOFF";
|
|
361
361
|
maxRetries: number;
|
|
@@ -364,7 +364,7 @@ export declare const _CustomActionDto: z.ZodObject<{
|
|
|
364
364
|
}>;
|
|
365
365
|
export type CustomActionDto = z.infer<typeof _CustomActionDto>;
|
|
366
366
|
export declare const _CustomActionUpsertDto: z.ZodObject<{
|
|
367
|
-
description: z.ZodString
|
|
367
|
+
description: z.ZodOptional<z.ZodString>;
|
|
368
368
|
id: z.ZodOptional<z.ZodString>;
|
|
369
369
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
370
370
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -374,7 +374,7 @@ export declare const _CustomActionUpsertDto: z.ZodObject<{
|
|
|
374
374
|
request: z.ZodObject<{
|
|
375
375
|
url: z.ZodString;
|
|
376
376
|
method: z.ZodString;
|
|
377
|
-
payload: z.ZodObject<{
|
|
377
|
+
payload: z.ZodOptional<z.ZodObject<{
|
|
378
378
|
kind: z.ZodLiteral<"TEMPLATE">;
|
|
379
379
|
format: z.ZodLiteral<"JSON">;
|
|
380
380
|
value: z.ZodString;
|
|
@@ -386,55 +386,55 @@ export declare const _CustomActionUpsertDto: z.ZodObject<{
|
|
|
386
386
|
value: string;
|
|
387
387
|
kind: "TEMPLATE";
|
|
388
388
|
format: "JSON";
|
|
389
|
-
}
|
|
390
|
-
headers: z.ZodRecord<z.ZodString, z.ZodString
|
|
391
|
-
params: z.ZodRecord<z.ZodString, z.ZodString
|
|
389
|
+
}>>;
|
|
390
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
391
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
392
392
|
}, "strip", z.ZodTypeAny, {
|
|
393
393
|
method: string;
|
|
394
394
|
url: string;
|
|
395
|
-
|
|
396
|
-
payload: {
|
|
395
|
+
payload?: {
|
|
397
396
|
value: string;
|
|
398
397
|
kind: "TEMPLATE";
|
|
399
398
|
format: "JSON";
|
|
400
|
-
};
|
|
401
|
-
headers
|
|
399
|
+
} | undefined;
|
|
400
|
+
headers?: Record<string, string> | undefined;
|
|
401
|
+
params?: Record<string, string> | undefined;
|
|
402
402
|
}, {
|
|
403
403
|
method: string;
|
|
404
404
|
url: string;
|
|
405
|
-
|
|
406
|
-
payload: {
|
|
405
|
+
payload?: {
|
|
407
406
|
value: string;
|
|
408
407
|
kind: "TEMPLATE";
|
|
409
408
|
format: "JSON";
|
|
410
|
-
};
|
|
411
|
-
headers
|
|
409
|
+
} | undefined;
|
|
410
|
+
headers?: Record<string, string> | undefined;
|
|
411
|
+
params?: Record<string, string> | undefined;
|
|
412
412
|
}>;
|
|
413
413
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
414
414
|
}, "strip", z.ZodTypeAny, {
|
|
415
415
|
request: {
|
|
416
416
|
method: string;
|
|
417
417
|
url: string;
|
|
418
|
-
|
|
419
|
-
payload: {
|
|
418
|
+
payload?: {
|
|
420
419
|
value: string;
|
|
421
420
|
kind: "TEMPLATE";
|
|
422
421
|
format: "JSON";
|
|
423
|
-
};
|
|
424
|
-
headers
|
|
422
|
+
} | undefined;
|
|
423
|
+
headers?: Record<string, string> | undefined;
|
|
424
|
+
params?: Record<string, string> | undefined;
|
|
425
425
|
};
|
|
426
426
|
timeout?: number | undefined;
|
|
427
427
|
}, {
|
|
428
428
|
request: {
|
|
429
429
|
method: string;
|
|
430
430
|
url: string;
|
|
431
|
-
|
|
432
|
-
payload: {
|
|
431
|
+
payload?: {
|
|
433
432
|
value: string;
|
|
434
433
|
kind: "TEMPLATE";
|
|
435
434
|
format: "JSON";
|
|
436
|
-
};
|
|
437
|
-
headers
|
|
435
|
+
} | undefined;
|
|
436
|
+
headers?: Record<string, string> | undefined;
|
|
437
|
+
params?: Record<string, string> | undefined;
|
|
438
438
|
};
|
|
439
439
|
timeout?: number | undefined;
|
|
440
440
|
}>;
|
|
@@ -454,24 +454,24 @@ export declare const _CustomActionUpsertDto: z.ZodObject<{
|
|
|
454
454
|
delay: number;
|
|
455
455
|
}>>;
|
|
456
456
|
}, "strip", z.ZodTypeAny, {
|
|
457
|
-
description: string;
|
|
458
457
|
displayValue: string;
|
|
459
458
|
meta: {
|
|
460
459
|
request: {
|
|
461
460
|
method: string;
|
|
462
461
|
url: string;
|
|
463
|
-
|
|
464
|
-
payload: {
|
|
462
|
+
payload?: {
|
|
465
463
|
value: string;
|
|
466
464
|
kind: "TEMPLATE";
|
|
467
465
|
format: "JSON";
|
|
468
|
-
};
|
|
469
|
-
headers
|
|
466
|
+
} | undefined;
|
|
467
|
+
headers?: Record<string, string> | undefined;
|
|
468
|
+
params?: Record<string, string> | undefined;
|
|
470
469
|
};
|
|
471
470
|
timeout?: number | undefined;
|
|
472
471
|
};
|
|
473
472
|
isTemplate: boolean;
|
|
474
473
|
kind: "REST_ACTION";
|
|
474
|
+
description?: string | undefined;
|
|
475
475
|
id?: string | undefined;
|
|
476
476
|
createdAt?: string | undefined;
|
|
477
477
|
updatedAt?: string | undefined;
|
|
@@ -482,24 +482,24 @@ export declare const _CustomActionUpsertDto: z.ZodObject<{
|
|
|
482
482
|
delay: number;
|
|
483
483
|
} | undefined;
|
|
484
484
|
}, {
|
|
485
|
-
description: string;
|
|
486
485
|
displayValue: string;
|
|
487
486
|
meta: {
|
|
488
487
|
request: {
|
|
489
488
|
method: string;
|
|
490
489
|
url: string;
|
|
491
|
-
|
|
492
|
-
payload: {
|
|
490
|
+
payload?: {
|
|
493
491
|
value: string;
|
|
494
492
|
kind: "TEMPLATE";
|
|
495
493
|
format: "JSON";
|
|
496
|
-
};
|
|
497
|
-
headers
|
|
494
|
+
} | undefined;
|
|
495
|
+
headers?: Record<string, string> | undefined;
|
|
496
|
+
params?: Record<string, string> | undefined;
|
|
498
497
|
};
|
|
499
498
|
timeout?: number | undefined;
|
|
500
499
|
};
|
|
501
500
|
isTemplate: boolean;
|
|
502
501
|
kind: "REST_ACTION";
|
|
502
|
+
description?: string | undefined;
|
|
503
503
|
id?: string | undefined;
|
|
504
504
|
createdAt?: string | undefined;
|
|
505
505
|
updatedAt?: string | undefined;
|
|
@@ -5,7 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const base_dto_1 = require("./base.dto");
|
|
6
6
|
const _BaseCustomAction = base_dto_1._BaseDto.extend({
|
|
7
7
|
displayValue: zod_1.z.string(),
|
|
8
|
-
description: zod_1.z.string(),
|
|
8
|
+
description: zod_1.z.string().optional(),
|
|
9
9
|
isTemplate: zod_1.z.boolean(),
|
|
10
10
|
retryStrategy: zod_1.z
|
|
11
11
|
.object({
|
|
@@ -19,13 +19,15 @@ exports._CustomRestActionMetaDto = zod_1.z.object({
|
|
|
19
19
|
request: zod_1.z.object({
|
|
20
20
|
url: zod_1.z.string(),
|
|
21
21
|
method: zod_1.z.string(),
|
|
22
|
-
payload: zod_1.z
|
|
22
|
+
payload: zod_1.z
|
|
23
|
+
.object({
|
|
23
24
|
kind: zod_1.z.literal('TEMPLATE'),
|
|
24
25
|
format: zod_1.z.literal('JSON'),
|
|
25
26
|
value: zod_1.z.string(),
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
})
|
|
28
|
+
.optional(),
|
|
29
|
+
headers: zod_1.z.record(zod_1.z.string()).optional(),
|
|
30
|
+
params: zod_1.z.record(zod_1.z.string()).optional(),
|
|
29
31
|
}),
|
|
30
32
|
timeout: zod_1.z.number().optional(),
|
|
31
33
|
});
|