@ampsec/platform-client 62.18.0 → 62.19.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/customActions.dto.d.ts +191 -0
- package/build/src/dto/customActions.dto.js +12 -1
- package/build/src/dto/customActions.dto.js.map +1 -1
- package/build/src/dto/flows.dto.d.ts +4 -4
- package/build/src/dto/platform/platform.flows.dto.d.ts +2 -2
- package/package.json +1 -1
- package/src/dto/customActions.dto.ts +14 -0
|
@@ -67,6 +67,154 @@ export declare const _CustomRestActionMetaDto: z.ZodObject<{
|
|
|
67
67
|
};
|
|
68
68
|
timeout?: number | undefined;
|
|
69
69
|
}>;
|
|
70
|
+
declare const _CustomRestActionDto: z.ZodObject<{
|
|
71
|
+
description: z.ZodString;
|
|
72
|
+
id: z.ZodString;
|
|
73
|
+
createdAt: z.ZodString;
|
|
74
|
+
updatedAt: z.ZodString;
|
|
75
|
+
deletedAt: z.ZodNullable<z.ZodString>;
|
|
76
|
+
displayValue: z.ZodString;
|
|
77
|
+
isTemplate: z.ZodBoolean;
|
|
78
|
+
retryStrategy: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
kind: z.ZodLiteral<"CONSTANT_BACKOFF">;
|
|
80
|
+
maxRetries: z.ZodNumber;
|
|
81
|
+
delay: z.ZodNumber;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
kind: "CONSTANT_BACKOFF";
|
|
84
|
+
maxRetries: number;
|
|
85
|
+
delay: number;
|
|
86
|
+
}, {
|
|
87
|
+
kind: "CONSTANT_BACKOFF";
|
|
88
|
+
maxRetries: number;
|
|
89
|
+
delay: number;
|
|
90
|
+
}>>;
|
|
91
|
+
kind: z.ZodLiteral<"REST_ACTION">;
|
|
92
|
+
meta: z.ZodObject<{
|
|
93
|
+
request: z.ZodObject<{
|
|
94
|
+
url: z.ZodString;
|
|
95
|
+
method: z.ZodString;
|
|
96
|
+
payload: z.ZodObject<{
|
|
97
|
+
kind: z.ZodLiteral<"TEMPLATE">;
|
|
98
|
+
format: z.ZodLiteral<"JSON">;
|
|
99
|
+
value: z.ZodString;
|
|
100
|
+
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
value: string;
|
|
102
|
+
kind: "TEMPLATE";
|
|
103
|
+
format: "JSON";
|
|
104
|
+
}, {
|
|
105
|
+
value: string;
|
|
106
|
+
kind: "TEMPLATE";
|
|
107
|
+
format: "JSON";
|
|
108
|
+
}>;
|
|
109
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
110
|
+
params: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
method: string;
|
|
113
|
+
url: string;
|
|
114
|
+
params: Record<string, string>;
|
|
115
|
+
payload: {
|
|
116
|
+
value: string;
|
|
117
|
+
kind: "TEMPLATE";
|
|
118
|
+
format: "JSON";
|
|
119
|
+
};
|
|
120
|
+
headers: Record<string, string>;
|
|
121
|
+
}, {
|
|
122
|
+
method: string;
|
|
123
|
+
url: string;
|
|
124
|
+
params: Record<string, string>;
|
|
125
|
+
payload: {
|
|
126
|
+
value: string;
|
|
127
|
+
kind: "TEMPLATE";
|
|
128
|
+
format: "JSON";
|
|
129
|
+
};
|
|
130
|
+
headers: Record<string, string>;
|
|
131
|
+
}>;
|
|
132
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
}, "strip", z.ZodTypeAny, {
|
|
134
|
+
request: {
|
|
135
|
+
method: string;
|
|
136
|
+
url: string;
|
|
137
|
+
params: Record<string, string>;
|
|
138
|
+
payload: {
|
|
139
|
+
value: string;
|
|
140
|
+
kind: "TEMPLATE";
|
|
141
|
+
format: "JSON";
|
|
142
|
+
};
|
|
143
|
+
headers: Record<string, string>;
|
|
144
|
+
};
|
|
145
|
+
timeout?: number | undefined;
|
|
146
|
+
}, {
|
|
147
|
+
request: {
|
|
148
|
+
method: string;
|
|
149
|
+
url: string;
|
|
150
|
+
params: Record<string, string>;
|
|
151
|
+
payload: {
|
|
152
|
+
value: string;
|
|
153
|
+
kind: "TEMPLATE";
|
|
154
|
+
format: "JSON";
|
|
155
|
+
};
|
|
156
|
+
headers: Record<string, string>;
|
|
157
|
+
};
|
|
158
|
+
timeout?: number | undefined;
|
|
159
|
+
}>;
|
|
160
|
+
}, "strip", z.ZodTypeAny, {
|
|
161
|
+
description: string;
|
|
162
|
+
id: string;
|
|
163
|
+
createdAt: string;
|
|
164
|
+
updatedAt: string;
|
|
165
|
+
deletedAt: string | null;
|
|
166
|
+
displayValue: string;
|
|
167
|
+
meta: {
|
|
168
|
+
request: {
|
|
169
|
+
method: string;
|
|
170
|
+
url: string;
|
|
171
|
+
params: Record<string, string>;
|
|
172
|
+
payload: {
|
|
173
|
+
value: string;
|
|
174
|
+
kind: "TEMPLATE";
|
|
175
|
+
format: "JSON";
|
|
176
|
+
};
|
|
177
|
+
headers: Record<string, string>;
|
|
178
|
+
};
|
|
179
|
+
timeout?: number | undefined;
|
|
180
|
+
};
|
|
181
|
+
isTemplate: boolean;
|
|
182
|
+
kind: "REST_ACTION";
|
|
183
|
+
retryStrategy?: {
|
|
184
|
+
kind: "CONSTANT_BACKOFF";
|
|
185
|
+
maxRetries: number;
|
|
186
|
+
delay: number;
|
|
187
|
+
} | undefined;
|
|
188
|
+
}, {
|
|
189
|
+
description: string;
|
|
190
|
+
id: string;
|
|
191
|
+
createdAt: string;
|
|
192
|
+
updatedAt: string;
|
|
193
|
+
deletedAt: string | null;
|
|
194
|
+
displayValue: string;
|
|
195
|
+
meta: {
|
|
196
|
+
request: {
|
|
197
|
+
method: string;
|
|
198
|
+
url: string;
|
|
199
|
+
params: Record<string, string>;
|
|
200
|
+
payload: {
|
|
201
|
+
value: string;
|
|
202
|
+
kind: "TEMPLATE";
|
|
203
|
+
format: "JSON";
|
|
204
|
+
};
|
|
205
|
+
headers: Record<string, string>;
|
|
206
|
+
};
|
|
207
|
+
timeout?: number | undefined;
|
|
208
|
+
};
|
|
209
|
+
isTemplate: boolean;
|
|
210
|
+
kind: "REST_ACTION";
|
|
211
|
+
retryStrategy?: {
|
|
212
|
+
kind: "CONSTANT_BACKOFF";
|
|
213
|
+
maxRetries: number;
|
|
214
|
+
delay: number;
|
|
215
|
+
} | undefined;
|
|
216
|
+
}>;
|
|
217
|
+
export type CustomRestActionDto = z.infer<typeof _CustomRestActionDto>;
|
|
70
218
|
export declare const _CustomActionDto: z.ZodObject<{
|
|
71
219
|
description: z.ZodString;
|
|
72
220
|
id: z.ZodString;
|
|
@@ -363,3 +511,46 @@ export declare const _CustomActionUpsertDto: z.ZodObject<{
|
|
|
363
511
|
} | undefined;
|
|
364
512
|
}>;
|
|
365
513
|
export type CustomActionUpsertDto = z.infer<typeof _CustomActionUpsertDto>;
|
|
514
|
+
export declare const _CustomerActionSummaryDto: z.ZodObject<{
|
|
515
|
+
id: z.ZodString;
|
|
516
|
+
displayValue: z.ZodString;
|
|
517
|
+
serviceKey: z.ZodString;
|
|
518
|
+
recentActivity: z.ZodObject<{
|
|
519
|
+
lastExecutionTime: z.ZodOptional<z.ZodString>;
|
|
520
|
+
lastExecutionSuccess: z.ZodOptional<z.ZodBoolean>;
|
|
521
|
+
totalCount: z.ZodNumber;
|
|
522
|
+
failureCount: z.ZodNumber;
|
|
523
|
+
}, "strip", z.ZodTypeAny, {
|
|
524
|
+
totalCount: number;
|
|
525
|
+
failureCount: number;
|
|
526
|
+
lastExecutionTime?: string | undefined;
|
|
527
|
+
lastExecutionSuccess?: boolean | undefined;
|
|
528
|
+
}, {
|
|
529
|
+
totalCount: number;
|
|
530
|
+
failureCount: number;
|
|
531
|
+
lastExecutionTime?: string | undefined;
|
|
532
|
+
lastExecutionSuccess?: boolean | undefined;
|
|
533
|
+
}>;
|
|
534
|
+
}, "strip", z.ZodTypeAny, {
|
|
535
|
+
id: string;
|
|
536
|
+
displayValue: string;
|
|
537
|
+
serviceKey: string;
|
|
538
|
+
recentActivity: {
|
|
539
|
+
totalCount: number;
|
|
540
|
+
failureCount: number;
|
|
541
|
+
lastExecutionTime?: string | undefined;
|
|
542
|
+
lastExecutionSuccess?: boolean | undefined;
|
|
543
|
+
};
|
|
544
|
+
}, {
|
|
545
|
+
id: string;
|
|
546
|
+
displayValue: string;
|
|
547
|
+
serviceKey: string;
|
|
548
|
+
recentActivity: {
|
|
549
|
+
totalCount: number;
|
|
550
|
+
failureCount: number;
|
|
551
|
+
lastExecutionTime?: string | undefined;
|
|
552
|
+
lastExecutionSuccess?: boolean | undefined;
|
|
553
|
+
};
|
|
554
|
+
}>;
|
|
555
|
+
export type CustomerActionSummaryDto = z.infer<typeof _CustomerActionSummaryDto>;
|
|
556
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._CustomActionUpsertDto = exports._CustomActionDto = exports._CustomRestActionMetaDto = void 0;
|
|
3
|
+
exports._CustomerActionSummaryDto = exports._CustomActionUpsertDto = exports._CustomActionDto = exports._CustomRestActionMetaDto = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const base_dto_1 = require("./base.dto");
|
|
6
6
|
const _BaseCustomAction = base_dto_1._BaseDto.extend({
|
|
@@ -36,5 +36,16 @@ const _CustomRestActionDto = _BaseCustomAction.extend({
|
|
|
36
36
|
const _CustomRestActionUpsertDto = _CustomRestActionDto.partial(base_dto_1.UPSERT_DTO_MASK);
|
|
37
37
|
exports._CustomActionDto = _CustomRestActionDto;
|
|
38
38
|
exports._CustomActionUpsertDto = _CustomRestActionUpsertDto;
|
|
39
|
+
exports._CustomerActionSummaryDto = zod_1.z.object({
|
|
40
|
+
id: zod_1.z.string(),
|
|
41
|
+
displayValue: zod_1.z.string(),
|
|
42
|
+
serviceKey: zod_1.z.string(),
|
|
43
|
+
recentActivity: zod_1.z.object({
|
|
44
|
+
lastExecutionTime: zod_1.z.string().optional(),
|
|
45
|
+
lastExecutionSuccess: zod_1.z.boolean().optional(),
|
|
46
|
+
totalCount: zod_1.z.number(),
|
|
47
|
+
failureCount: zod_1.z.number(),
|
|
48
|
+
}),
|
|
49
|
+
});
|
|
39
50
|
// TODO action execution history + errors
|
|
40
51
|
//# sourceMappingURL=customActions.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customActions.dto.js","sourceRoot":"","sources":["../../../src/dto/customActions.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAAqD;AAErD,MAAM,iBAAiB,GAAG,mBAAQ,CAAC,MAAM,CAAC;IACxC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE;IACvB,aAAa,EAAE,OAAC;SACb,MAAM,CAAC;QACN,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;QACnC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;QACtB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;KAClB,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;QACf,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;QAClB,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YAChB,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,UAAU,CAAC;YAC3B,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;YACzB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;SAClB,CAAC;QACF,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;QAC7B,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC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EAAE,CAAC;QAC7B,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;KAC7B,CAAC;IACF,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AACH,MAAM,oBAAoB,GAAG,iBAAiB,CAAC,MAAM,CAAC;IACpD,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IAC9B,IAAI,EAAE,gCAAwB;CAC/B,CAAC,CAAC;AAGH,MAAM,0BAA0B,GAAG,oBAAoB,CAAC,OAAO,CAAC,0BAAe,CAAC,CAAC;AAEpE,QAAA,gBAAgB,GAAG,oBAAoB,CAAC;AAGxC,QAAA,sBAAsB,GAAG,0BAA0B,CAAC;AAGpD,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,cAAc,EAAE,OAAC,CAAC,MAAM,CAAC;QACvB,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACxC,oBAAoB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAC5C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;QACtB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;KACzB,CAAC;CACH,CAAC,CAAC;AAGH,yCAAyC"}
|
|
@@ -980,8 +980,8 @@ export declare const _FlowSpecDto: z.ZodObject<{
|
|
|
980
980
|
activeCount: z.ZodDefault<z.ZodNumber>;
|
|
981
981
|
totalCount: z.ZodDefault<z.ZodNumber>;
|
|
982
982
|
}, "strip", z.ZodTypeAny, {
|
|
983
|
-
activeCount: number;
|
|
984
983
|
totalCount: number;
|
|
984
|
+
activeCount: number;
|
|
985
985
|
lastTriggered?: string | undefined;
|
|
986
986
|
}, {
|
|
987
987
|
lastTriggered?: string | undefined;
|
|
@@ -1053,8 +1053,8 @@ export declare const _FlowSpecDto: z.ZodObject<{
|
|
|
1053
1053
|
required: boolean;
|
|
1054
1054
|
} | undefined;
|
|
1055
1055
|
activity?: {
|
|
1056
|
-
activeCount: number;
|
|
1057
1056
|
totalCount: number;
|
|
1057
|
+
activeCount: number;
|
|
1058
1058
|
lastTriggered?: string | undefined;
|
|
1059
1059
|
} | undefined;
|
|
1060
1060
|
}, {
|
|
@@ -1538,8 +1538,8 @@ export declare const _FlowSpecFilter: z.ZodObject<{
|
|
|
1538
1538
|
activeCount: z.ZodDefault<z.ZodNumber>;
|
|
1539
1539
|
totalCount: z.ZodDefault<z.ZodNumber>;
|
|
1540
1540
|
}, "strip", z.ZodTypeAny, {
|
|
1541
|
-
activeCount: number;
|
|
1542
1541
|
totalCount: number;
|
|
1542
|
+
activeCount: number;
|
|
1543
1543
|
lastTriggered?: string | undefined;
|
|
1544
1544
|
}, {
|
|
1545
1545
|
lastTriggered?: string | undefined;
|
|
@@ -1595,8 +1595,8 @@ export declare const _FlowSpecFilter: z.ZodObject<{
|
|
|
1595
1595
|
required: boolean;
|
|
1596
1596
|
} | undefined;
|
|
1597
1597
|
activity?: {
|
|
1598
|
-
activeCount: number;
|
|
1599
1598
|
totalCount: number;
|
|
1599
|
+
activeCount: number;
|
|
1600
1600
|
lastTriggered?: string | undefined;
|
|
1601
1601
|
} | undefined;
|
|
1602
1602
|
sort?: Record<string, "ASC" | "DESC"> | undefined;
|
|
@@ -483,8 +483,8 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
483
483
|
activeCount: z.ZodDefault<z.ZodNumber>;
|
|
484
484
|
totalCount: z.ZodDefault<z.ZodNumber>;
|
|
485
485
|
}, "strip", z.ZodTypeAny, {
|
|
486
|
-
activeCount: number;
|
|
487
486
|
totalCount: number;
|
|
487
|
+
activeCount: number;
|
|
488
488
|
lastTriggered?: string | undefined;
|
|
489
489
|
}, {
|
|
490
490
|
lastTriggered?: string | undefined;
|
|
@@ -556,8 +556,8 @@ export declare const _PlatformFlowSpecDto: z.ZodObject<{
|
|
|
556
556
|
required: boolean;
|
|
557
557
|
} | undefined;
|
|
558
558
|
activity?: {
|
|
559
|
-
activeCount: number;
|
|
560
559
|
totalCount: number;
|
|
560
|
+
activeCount: number;
|
|
561
561
|
lastTriggered?: string | undefined;
|
|
562
562
|
} | undefined;
|
|
563
563
|
}, {
|
package/package.json
CHANGED
|
@@ -32,6 +32,7 @@ const _CustomRestActionDto = _BaseCustomAction.extend({
|
|
|
32
32
|
kind: z.literal('REST_ACTION'),
|
|
33
33
|
meta: _CustomRestActionMetaDto,
|
|
34
34
|
});
|
|
35
|
+
export type CustomRestActionDto = z.infer<typeof _CustomRestActionDto>;
|
|
35
36
|
|
|
36
37
|
const _CustomRestActionUpsertDto = _CustomRestActionDto.partial(UPSERT_DTO_MASK);
|
|
37
38
|
|
|
@@ -41,4 +42,17 @@ export type CustomActionDto = z.infer<typeof _CustomActionDto>;
|
|
|
41
42
|
export const _CustomActionUpsertDto = _CustomRestActionUpsertDto;
|
|
42
43
|
export type CustomActionUpsertDto = z.infer<typeof _CustomActionUpsertDto>;
|
|
43
44
|
|
|
45
|
+
export const _CustomerActionSummaryDto = z.object({
|
|
46
|
+
id: z.string(),
|
|
47
|
+
displayValue: z.string(),
|
|
48
|
+
serviceKey: z.string(),
|
|
49
|
+
recentActivity: z.object({
|
|
50
|
+
lastExecutionTime: z.string().optional(),
|
|
51
|
+
lastExecutionSuccess: z.boolean().optional(),
|
|
52
|
+
totalCount: z.number(),
|
|
53
|
+
failureCount: z.number(),
|
|
54
|
+
}),
|
|
55
|
+
});
|
|
56
|
+
export type CustomerActionSummaryDto = z.infer<typeof _CustomerActionSummaryDto>;
|
|
57
|
+
|
|
44
58
|
// TODO action execution history + errors
|