@ampsec/platform-client 62.23.0 → 63.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/enums/category.d.ts +2 -1
- package/build/src/dto/enums/category.js +1 -0
- package/build/src/dto/enums/category.js.map +1 -1
- package/build/src/dto/enums/saasComponentKind.d.ts +2 -1
- package/build/src/dto/enums/saasComponentKind.js +2 -0
- package/build/src/dto/enums/saasComponentKind.js.map +1 -1
- package/build/src/dto/findings.dto.d.ts +27 -1
- package/build/src/dto/findings.dto.js +9 -1
- package/build/src/dto/findings.dto.js.map +1 -1
- package/build/src/dto/index.d.ts +1 -0
- package/build/src/dto/index.js +1 -0
- package/build/src/dto/index.js.map +1 -1
- package/build/src/dto/platform/index.d.ts +1 -0
- package/build/src/dto/platform/index.js +1 -0
- package/build/src/dto/platform/index.js.map +1 -1
- package/build/src/dto/platform/platform.findings.dto.d.ts +6 -0
- package/build/src/dto/platform/platform.tokens.dto.d.ts +53 -0
- package/build/src/dto/platform/platform.tokens.dto.js +8 -0
- package/build/src/dto/platform/platform.tokens.dto.js.map +1 -0
- package/build/src/dto/saasComponents.dto.d.ts +1 -1
- package/build/src/dto/tokens.dto.d.ts +47 -0
- package/build/src/dto/tokens.dto.js +11 -0
- package/build/src/dto/tokens.dto.js.map +1 -0
- package/build/src/services/AmpApi.d.ts +2 -1
- package/build/src/services/AmpApi.js +1 -0
- package/build/src/services/AmpApi.js.map +1 -1
- package/build/src/services/AmpSdk.d.ts +2 -1
- package/build/src/services/AmpSdk.js +1 -0
- package/build/src/services/AmpSdk.js.map +1 -1
- package/build/src/services/ContentTemplateService.d.ts +1 -0
- package/build/src/services/ContentTemplateService.js +25 -0
- package/build/src/services/ContentTemplateService.js.map +1 -0
- package/build/src/services/constants.d.ts +1 -0
- package/build/src/services/constants.js +1 -0
- package/build/src/services/constants.js.map +1 -1
- package/build/src/services/contentful.service.d.ts +272 -1
- package/build/src/services/contentful.service.js +197 -2
- package/build/src/services/contentful.service.js.map +1 -1
- package/build/src/services/index.d.ts +1 -0
- package/build/src/services/index.js +1 -0
- package/build/src/services/index.js.map +1 -1
- package/build/src/services/rest/RestClient.d.ts +1 -1
- package/build/src/services/rest/RestClient.js +1 -1
- package/build/src/services/rest/RestClient.js.map +1 -1
- package/package.json +2 -2
- package/src/dto/enums/category.ts +1 -0
- package/src/dto/enums/saasComponentKind.ts +3 -0
- package/src/dto/findings.dto.ts +11 -1
- package/src/dto/index.ts +1 -0
- package/src/dto/platform/index.ts +1 -0
- package/src/dto/platform/platform.tokens.dto.ts +9 -0
- package/src/dto/saasComponents.dto.ts +1 -1
- package/src/dto/tokens.dto.ts +11 -0
- package/src/services/AmpApi.ts +3 -0
- package/src/services/AmpSdk.ts +4 -0
- package/src/services/ContentTemplateService.ts +18 -0
- package/src/services/constants.ts +1 -0
- package/src/services/contentful.service.ts +238 -1
- package/src/services/index.ts +1 -0
- package/src/services/rest/RestClient.ts +2 -2
|
@@ -13,5 +13,6 @@ var Category;
|
|
|
13
13
|
Category["NOTIFICATION"] = "NOTIFICATION";
|
|
14
14
|
Category["TRAINING"] = "TRAINING";
|
|
15
15
|
Category["WEB_GATEWAY"] = "WEB_GATEWAY";
|
|
16
|
+
Category["CUSTOM"] = "CUSTOM";
|
|
16
17
|
})(Category || (exports.Category = Category = {}));
|
|
17
18
|
//# sourceMappingURL=category.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../../../src/dto/enums/category.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../../../src/dto/enums/category.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAYX;AAZD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,2CAA+B,CAAA;IAC/B;;OAEG;IACH,uBAAW,CAAA;IACX,iCAAqB,CAAA;IACrB,yCAA6B,CAAA;IAC7B,iCAAqB,CAAA;IACrB,uCAA2B,CAAA;IAC3B,6BAAiB,CAAA;AACnB,CAAC,EAZW,QAAQ,wBAAR,QAAQ,QAYnB"}
|
|
@@ -15,5 +15,7 @@ var SaasComponentKind;
|
|
|
15
15
|
SaasComponentKind["DEVICE_ASSIGNMENT"] = "DEVICE_ASSIGNMENT";
|
|
16
16
|
// WEB_GATEWAY
|
|
17
17
|
SaasComponentKind["WEB_GATEWAY_SESSION"] = "WEB_GATEWAY_SESSION";
|
|
18
|
+
// CUSTOM (for custom findings)
|
|
19
|
+
SaasComponentKind["CUSTOM"] = "CUSTOM";
|
|
18
20
|
})(SaasComponentKind || (exports.SaasComponentKind = SaasComponentKind = {}));
|
|
19
21
|
//# sourceMappingURL=saasComponentKind.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saasComponentKind.js","sourceRoot":"","sources":["../../../../src/dto/enums/saasComponentKind.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"saasComponentKind.js","sourceRoot":"","sources":["../../../../src/dto/enums/saasComponentKind.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAmBX;AAnBD,WAAY,iBAAiB;IAC3B,WAAW;IACX,8CAAyB,CAAA;IACzB,0DAAqC,CAAA;IAErC,WAAW;IACX,wDAAmC,CAAA;IACnC,gEAA2C,CAAA;IAE3C,MAAM;IACN,8CAAyB,CAAA;IACzB,oDAA+B,CAAA;IAC/B,4DAAuC,CAAA;IAEvC,cAAc;IACd,gEAA2C,CAAA;IAE3C,+BAA+B;IAC/B,sCAAiB,CAAA;AACnB,CAAC,EAnBW,iBAAiB,iCAAjB,iBAAiB,QAmB5B"}
|
|
@@ -18,7 +18,7 @@ export type FindingUpsertDto = BaseUpsertDto & {
|
|
|
18
18
|
/** Category of finding */
|
|
19
19
|
category: Category;
|
|
20
20
|
/** Type of finding */
|
|
21
|
-
kind: FindingKind;
|
|
21
|
+
kind: FindingKind | string;
|
|
22
22
|
/** Status of the finding, e.g. OPEN */
|
|
23
23
|
status: FindingStatus;
|
|
24
24
|
/** Severity of the finding, e.g. CRITICAL, HIGH, etc... */
|
|
@@ -159,6 +159,7 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
159
159
|
} | undefined;
|
|
160
160
|
}>>;
|
|
161
161
|
expireAfterDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
162
|
+
outcome: z.ZodOptional<z.ZodNativeEnum<typeof FindingOutcome>>;
|
|
162
163
|
}, "strip", z.ZodTypeAny, {
|
|
163
164
|
name: string;
|
|
164
165
|
id: string;
|
|
@@ -190,6 +191,7 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
190
191
|
} | undefined;
|
|
191
192
|
} | undefined;
|
|
192
193
|
expireAfterDays?: number | null | undefined;
|
|
194
|
+
outcome?: FindingOutcome | undefined;
|
|
193
195
|
}, {
|
|
194
196
|
name: string;
|
|
195
197
|
id: string;
|
|
@@ -221,6 +223,7 @@ export declare const _FindingSpecDto: z.ZodObject<{
|
|
|
221
223
|
} | undefined;
|
|
222
224
|
} | undefined;
|
|
223
225
|
expireAfterDays?: number | null | undefined;
|
|
226
|
+
outcome?: FindingOutcome | undefined;
|
|
224
227
|
}>;
|
|
225
228
|
export type FindingSpecDto = z.infer<typeof _FindingSpecDto>;
|
|
226
229
|
export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
@@ -328,6 +331,7 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
328
331
|
} | undefined;
|
|
329
332
|
}>>;
|
|
330
333
|
expireAfterDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
334
|
+
outcome: z.ZodOptional<z.ZodNativeEnum<typeof FindingOutcome>>;
|
|
331
335
|
}, "strip", z.ZodTypeAny, {
|
|
332
336
|
name: string;
|
|
333
337
|
displayValue: string;
|
|
@@ -359,6 +363,7 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
359
363
|
} | undefined;
|
|
360
364
|
} | undefined;
|
|
361
365
|
expireAfterDays?: number | null | undefined;
|
|
366
|
+
outcome?: FindingOutcome | undefined;
|
|
362
367
|
}, {
|
|
363
368
|
name: string;
|
|
364
369
|
displayValue: string;
|
|
@@ -390,6 +395,7 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
|
|
|
390
395
|
} | undefined;
|
|
391
396
|
} | undefined;
|
|
392
397
|
expireAfterDays?: number | null | undefined;
|
|
398
|
+
outcome?: FindingOutcome | undefined;
|
|
393
399
|
}>;
|
|
394
400
|
export type FindingSpecUpsertDto = z.infer<typeof _FindingSpecUpsertDto>;
|
|
395
401
|
export declare const _FindingSummaryDto: z.ZodObject<{
|
|
@@ -409,3 +415,23 @@ export declare const _FindingSummaryDto: z.ZodObject<{
|
|
|
409
415
|
cid?: string | undefined;
|
|
410
416
|
}>;
|
|
411
417
|
export type FindingSummaryDto = z.infer<typeof _FindingSummaryDto>;
|
|
418
|
+
export declare const _CustomFindingPayload: z.ZodObject<{
|
|
419
|
+
eventType: z.ZodString;
|
|
420
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
421
|
+
email: z.ZodOptional<z.ZodString>;
|
|
422
|
+
serialNumber: z.ZodOptional<z.ZodString>;
|
|
423
|
+
context: z.ZodOptional<z.ZodUnknown>;
|
|
424
|
+
}, "strip", z.ZodTypeAny, {
|
|
425
|
+
eventType: string;
|
|
426
|
+
correlationId?: string | undefined;
|
|
427
|
+
email?: string | undefined;
|
|
428
|
+
serialNumber?: string | undefined;
|
|
429
|
+
context?: unknown;
|
|
430
|
+
}, {
|
|
431
|
+
eventType: string;
|
|
432
|
+
correlationId?: string | undefined;
|
|
433
|
+
email?: string | undefined;
|
|
434
|
+
serialNumber?: string | undefined;
|
|
435
|
+
context?: unknown;
|
|
436
|
+
}>;
|
|
437
|
+
export type CustomFindingPayload = z.infer<typeof _CustomFindingPayload>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._FindingSummaryDto = exports._FindingSpecUpsertDto = exports._FindingSpecDto = void 0;
|
|
3
|
+
exports._CustomFindingPayload = exports._FindingSummaryDto = exports._FindingSpecUpsertDto = exports._FindingSpecDto = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const base_dto_1 = require("./base.dto");
|
|
6
6
|
const enums_1 = require("./enums");
|
|
@@ -43,6 +43,7 @@ exports._FindingSpecDto = base_dto_1._BaseDto.extend({
|
|
|
43
43
|
})
|
|
44
44
|
.optional(),
|
|
45
45
|
expireAfterDays: zod_1.z.nullable(zod_1.z.number()).optional(),
|
|
46
|
+
outcome: zod_1.z.nativeEnum(enums_2.FindingOutcome).optional(), // TODO add column and form field??? Or just default to REMEDIATION?
|
|
46
47
|
});
|
|
47
48
|
exports._FindingSpecUpsertDto = exports._FindingSpecDto.partial({
|
|
48
49
|
id: true,
|
|
@@ -56,4 +57,11 @@ exports._FindingSummaryDto = zod_1.z.object({
|
|
|
56
57
|
displayValue: zod_1.z.string(),
|
|
57
58
|
eventType: zod_1.z.string(),
|
|
58
59
|
});
|
|
60
|
+
exports._CustomFindingPayload = zod_1.z.object({
|
|
61
|
+
eventType: zod_1.z.string(),
|
|
62
|
+
correlationId: zod_1.z.string().optional(),
|
|
63
|
+
email: zod_1.z.string().optional(),
|
|
64
|
+
serialNumber: zod_1.z.string().optional(),
|
|
65
|
+
context: zod_1.z.unknown().optional(),
|
|
66
|
+
});
|
|
59
67
|
//# sourceMappingURL=findings.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findings.dto.js","sourceRoot":"","sources":["../../../src/dto/findings.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAEtB,yCAA4D;AAC5D,mCAAiE;AACjE,mCAAuE;AAyDvE,MAAM,uBAAuB,GAAG,OAAC,CAAC,OAAO,EAAE,CAAC;AAC/B,QAAA,eAAe,GAAG,mBAAQ,C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CAAC,OAAO,CAAC;IAC3D,EAAE,EAAE,IAAI;IACR,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;CAChB,CAAC,CAAC;AAGU,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAGU,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC"}
|
package/build/src/dto/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export * from './saasComponents.dto';
|
|
|
28
28
|
export * from './saasUsers.dto';
|
|
29
29
|
export * from './ampSetting.dto';
|
|
30
30
|
export * from './tenants.dto';
|
|
31
|
+
export * from './tokens.dto';
|
|
31
32
|
export * from './users.dto';
|
|
32
33
|
export * from './messagingChannels';
|
|
33
34
|
export * from './cohort.dto';
|
package/build/src/dto/index.js
CHANGED
|
@@ -44,6 +44,7 @@ __exportStar(require("./saasComponents.dto"), exports);
|
|
|
44
44
|
__exportStar(require("./saasUsers.dto"), exports);
|
|
45
45
|
__exportStar(require("./ampSetting.dto"), exports);
|
|
46
46
|
__exportStar(require("./tenants.dto"), exports);
|
|
47
|
+
__exportStar(require("./tokens.dto"), exports);
|
|
47
48
|
__exportStar(require("./users.dto"), exports);
|
|
48
49
|
__exportStar(require("./messagingChannels"), exports);
|
|
49
50
|
__exportStar(require("./cohort.dto"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,8CAA4B;AAC5B,6CAA2B;AAC3B,mDAAiC;AACjC,8CAA4B;AAC5B,iDAA+B;AAC/B,sDAAoC;AACpC,qDAAmC;AACnC,yDAAuC;AACvC,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,yDAAuC;AACvC,8CAA4B;AAC5B,wCAAsB;AACtB,gDAA8B;AAC9B,qDAAmC;AACnC,6CAA2B;AAC3B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,gDAA8B;AAC9B,8CAA4B;AAC5B,sDAAoC;AACpC,+CAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,8CAA4B;AAC5B,6CAA2B;AAC3B,mDAAiC;AACjC,8CAA4B;AAC5B,iDAA+B;AAC/B,sDAAoC;AACpC,qDAAmC;AACnC,yDAAuC;AACvC,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,yDAAuC;AACvC,8CAA4B;AAC5B,wCAAsB;AACtB,gDAA8B;AAC9B,qDAAmC;AACnC,6CAA2B;AAC3B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B;AAC5B,sDAAoC;AACpC,+CAA6B"}
|
|
@@ -17,5 +17,6 @@ export * from './platform.saasComponents.dto';
|
|
|
17
17
|
export * from './platform.saasUsers.dto';
|
|
18
18
|
export * from './platform.ampSetting.dto';
|
|
19
19
|
export * from './platform.tenants.dto';
|
|
20
|
+
export * from './platform.tokens.dto';
|
|
20
21
|
export * from './platform.users.dto';
|
|
21
22
|
export * from './tenant.based.dto';
|
|
@@ -33,6 +33,7 @@ __exportStar(require("./platform.saasComponents.dto"), exports);
|
|
|
33
33
|
__exportStar(require("./platform.saasUsers.dto"), exports);
|
|
34
34
|
__exportStar(require("./platform.ampSetting.dto"), exports);
|
|
35
35
|
__exportStar(require("./platform.tenants.dto"), exports);
|
|
36
|
+
__exportStar(require("./platform.tokens.dto"), exports);
|
|
36
37
|
__exportStar(require("./platform.users.dto"), exports);
|
|
37
38
|
__exportStar(require("./tenant.based.dto"), exports);
|
|
38
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,wDAAsC;AACtC,4DAA0C;AAC1C,+DAA6C;AAC7C,8DAA4C;AAC5C,kEAAgD;AAChD,0DAAwC;AACxC,uDAAqC;AACrC,mEAAiD;AACjD,yDAAuC;AACvC,8DAA4C;AAC5C,2DAAyC;AACzC,+DAA6C;AAC7C,iEAA+C;AAC/C,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,uDAAqC;AACrC,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,wDAAsC;AACtC,4DAA0C;AAC1C,+DAA6C;AAC7C,8DAA4C;AAC5C,kEAAgD;AAChD,0DAAwC;AACxC,uDAAqC;AACrC,mEAAiD;AACjD,yDAAuC;AACvC,8DAA4C;AAC5C,2DAAyC;AACzC,+DAA6C;AAC7C,iEAA+C;AAC/C,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,wDAAsC;AACtC,uDAAqC;AACrC,qDAAmC"}
|
|
@@ -108,6 +108,7 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
108
108
|
} | undefined;
|
|
109
109
|
}>>;
|
|
110
110
|
expireAfterDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
111
|
+
outcome: z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingOutcome>>;
|
|
111
112
|
tid: z.ZodString;
|
|
112
113
|
}, "strip", z.ZodTypeAny, {
|
|
113
114
|
name: string;
|
|
@@ -141,6 +142,7 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
141
142
|
} | undefined;
|
|
142
143
|
} | undefined;
|
|
143
144
|
expireAfterDays?: number | null | undefined;
|
|
145
|
+
outcome?: import("..").FindingOutcome | undefined;
|
|
144
146
|
}, {
|
|
145
147
|
name: string;
|
|
146
148
|
id: string;
|
|
@@ -173,6 +175,7 @@ export declare const _PlatformFindingSpecDto: z.ZodObject<{
|
|
|
173
175
|
} | undefined;
|
|
174
176
|
} | undefined;
|
|
175
177
|
expireAfterDays?: number | null | undefined;
|
|
178
|
+
outcome?: import("..").FindingOutcome | undefined;
|
|
176
179
|
}>;
|
|
177
180
|
export type PlatformFindingSpecDto = z.infer<typeof _PlatformFindingSpecDto>;
|
|
178
181
|
export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
@@ -280,6 +283,7 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
280
283
|
} | undefined;
|
|
281
284
|
}>>;
|
|
282
285
|
expireAfterDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
286
|
+
outcome: z.ZodOptional<z.ZodNativeEnum<typeof import("..").FindingOutcome>>;
|
|
283
287
|
tid: z.ZodString;
|
|
284
288
|
}, "strip", z.ZodTypeAny, {
|
|
285
289
|
name: string;
|
|
@@ -313,6 +317,7 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
313
317
|
} | undefined;
|
|
314
318
|
} | undefined;
|
|
315
319
|
expireAfterDays?: number | null | undefined;
|
|
320
|
+
outcome?: import("..").FindingOutcome | undefined;
|
|
316
321
|
}, {
|
|
317
322
|
name: string;
|
|
318
323
|
tid: string;
|
|
@@ -345,5 +350,6 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
|
|
|
345
350
|
} | undefined;
|
|
346
351
|
} | undefined;
|
|
347
352
|
expireAfterDays?: number | null | undefined;
|
|
353
|
+
outcome?: import("..").FindingOutcome | undefined;
|
|
348
354
|
}>;
|
|
349
355
|
export type PlatformFindingSpecUpsertDto = z.infer<typeof _PlatformFindingSpecUpsertDto>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const _PlatformTokenDto: z.ZodObject<{
|
|
3
|
+
displayValue: z.ZodOptional<z.ZodString>;
|
|
4
|
+
key: z.ZodString;
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
createdAt: z.ZodString;
|
|
7
|
+
updatedAt: z.ZodString;
|
|
8
|
+
deletedAt: z.ZodNullable<z.ZodString>;
|
|
9
|
+
tid: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
id: string;
|
|
12
|
+
tid: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
deletedAt: string | null;
|
|
16
|
+
key: string;
|
|
17
|
+
displayValue?: string | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
id: string;
|
|
20
|
+
tid: string;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
deletedAt: string | null;
|
|
24
|
+
key: string;
|
|
25
|
+
displayValue?: string | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
export type PlatformTokenDto = z.infer<typeof _PlatformTokenDto>;
|
|
28
|
+
export declare const _PlatformTokenUpsertDto: z.ZodObject<{
|
|
29
|
+
displayValue: z.ZodOptional<z.ZodString>;
|
|
30
|
+
key: z.ZodString;
|
|
31
|
+
id: z.ZodOptional<z.ZodString>;
|
|
32
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
33
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
34
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
35
|
+
tid: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
key: string;
|
|
38
|
+
displayValue?: string | undefined;
|
|
39
|
+
id?: string | undefined;
|
|
40
|
+
createdAt?: string | undefined;
|
|
41
|
+
updatedAt?: string | undefined;
|
|
42
|
+
deletedAt?: string | null | undefined;
|
|
43
|
+
tid?: string | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
key: string;
|
|
46
|
+
displayValue?: string | undefined;
|
|
47
|
+
id?: string | undefined;
|
|
48
|
+
createdAt?: string | undefined;
|
|
49
|
+
updatedAt?: string | undefined;
|
|
50
|
+
deletedAt?: string | null | undefined;
|
|
51
|
+
tid?: string | undefined;
|
|
52
|
+
}>;
|
|
53
|
+
export type PlatformTokenUpsertDto = z.infer<typeof _PlatformTokenUpsertDto>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._PlatformTokenUpsertDto = exports._PlatformTokenDto = void 0;
|
|
4
|
+
const tenant_based_dto_1 = require("./tenant.based.dto");
|
|
5
|
+
const tokens_dto_1 = require("../tokens.dto");
|
|
6
|
+
exports._PlatformTokenDto = tokens_dto_1._TokenDto.merge(tenant_based_dto_1._TenantBased);
|
|
7
|
+
exports._PlatformTokenUpsertDto = tokens_dto_1._TokenUpsertDto.merge(tenant_based_dto_1._UpsertTenantBased);
|
|
8
|
+
//# sourceMappingURL=platform.tokens.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.tokens.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.tokens.dto.ts"],"names":[],"mappings":";;;AACA,yDAAoE;AACpE,8CAAyD;AAE5C,QAAA,iBAAiB,GAAG,sBAAS,CAAC,KAAK,CAAC,+BAAY,CAAC,CAAC;AAGlD,QAAA,uBAAuB,GAAG,4BAAe,CAAC,KAAK,CAAC,qCAAkB,CAAC,CAAC"}
|
|
@@ -80,7 +80,7 @@ export type SaasComponentUpsertDto = ChangeAwareUpsertDto & {
|
|
|
80
80
|
/** Connector Id */
|
|
81
81
|
cid: string;
|
|
82
82
|
/** */
|
|
83
|
-
kind: SaasComponentKind;
|
|
83
|
+
kind: SaasComponentKind | string;
|
|
84
84
|
/** Context specific information related to the Saas Component */
|
|
85
85
|
meta: SaasComponentMeta;
|
|
86
86
|
/** User Id of the affected user */
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const _TokenDto: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
createdAt: z.ZodString;
|
|
5
|
+
updatedAt: z.ZodString;
|
|
6
|
+
deletedAt: z.ZodNullable<z.ZodString>;
|
|
7
|
+
displayValue: z.ZodOptional<z.ZodString>;
|
|
8
|
+
key: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
id: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
deletedAt: string | null;
|
|
14
|
+
key: string;
|
|
15
|
+
displayValue?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
id: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
updatedAt: string;
|
|
20
|
+
deletedAt: string | null;
|
|
21
|
+
key: string;
|
|
22
|
+
displayValue?: string | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
export type TokenDto = z.infer<typeof _TokenDto>;
|
|
25
|
+
export declare const _TokenUpsertDto: z.ZodObject<{
|
|
26
|
+
id: z.ZodOptional<z.ZodString>;
|
|
27
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
28
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
29
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
30
|
+
displayValue: z.ZodOptional<z.ZodString>;
|
|
31
|
+
key: z.ZodString;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
key: string;
|
|
34
|
+
id?: string | undefined;
|
|
35
|
+
createdAt?: string | undefined;
|
|
36
|
+
updatedAt?: string | undefined;
|
|
37
|
+
deletedAt?: string | null | undefined;
|
|
38
|
+
displayValue?: string | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
key: string;
|
|
41
|
+
id?: string | undefined;
|
|
42
|
+
createdAt?: string | undefined;
|
|
43
|
+
updatedAt?: string | undefined;
|
|
44
|
+
deletedAt?: string | null | undefined;
|
|
45
|
+
displayValue?: string | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
export type TokenUpsertDto = z.infer<typeof _TokenUpsertDto>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._TokenUpsertDto = exports._TokenDto = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const base_dto_1 = require("./base.dto");
|
|
6
|
+
exports._TokenDto = base_dto_1._BaseDto.extend({
|
|
7
|
+
displayValue: zod_1.z.string().optional(),
|
|
8
|
+
key: zod_1.z.string(),
|
|
9
|
+
});
|
|
10
|
+
exports._TokenUpsertDto = exports._TokenDto.partial(base_dto_1.UPSERT_DTO_MASK);
|
|
11
|
+
//# sourceMappingURL=tokens.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.dto.js","sourceRoot":"","sources":["../../../src/dto/tokens.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAAqD;AAExC,QAAA,SAAS,GAAG,mBAAQ,CAAC,MAAM,CAAC;IACvC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAGU,QAAA,eAAe,GAAG,iBAAS,CAAC,OAAO,CAAC,0BAAe,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentDto, AgentUpsertDto, AssetDto, CustomActionDto, CustomActionUpsertDto, CustomScoreCohortDto, CustomScoreCohortUpsertDto, CustomScoreValueDto, CustomScoreValueUpsertDto, FindingSpecDto, FindingSpecUpsertDto, ProviderDto, ReportResultDto, SaasAssetDto, SaasComponentDto, SaasUserDto, TenantDto, TenantUpsertDto, UserDto } from '../dto';
|
|
1
|
+
import { AgentDto, AgentUpsertDto, AssetDto, CustomActionDto, CustomActionUpsertDto, CustomScoreCohortDto, CustomScoreCohortUpsertDto, CustomScoreValueDto, CustomScoreValueUpsertDto, FindingSpecDto, FindingSpecUpsertDto, ProviderDto, ReportResultDto, SaasAssetDto, SaasComponentDto, SaasUserDto, TenantDto, TenantUpsertDto, TokenDto, UserDto } from '../dto';
|
|
2
2
|
import { AmpEntityService, AmpDataService, AmpReportService, AmpSettingsService, ConnectorsService, FindingsInsightsService, FindingsService, NotificationService, PredictionService } from '.';
|
|
3
3
|
import { AmpRestClientOptions, AgentIdentityService, ConnectorInstallService, EnumService, RestClient } from './rest';
|
|
4
4
|
import { UsersInsightsService } from './usersInsights.service';
|
|
@@ -41,6 +41,7 @@ export declare class AmpApi {
|
|
|
41
41
|
readonly saasUsers: AmpDataService<SaasUserDto>;
|
|
42
42
|
readonly settings: AmpSettingsService;
|
|
43
43
|
readonly tenants: AmpEntityService<TenantUpsertDto, TenantDto>;
|
|
44
|
+
readonly tokens: AmpDataService<TokenDto>;
|
|
44
45
|
readonly users: AmpDataService<UserDto>;
|
|
45
46
|
readonly usersInsights: UsersInsightsService;
|
|
46
47
|
readonly prediction: PredictionService;
|
|
@@ -44,6 +44,7 @@ class AmpApi {
|
|
|
44
44
|
this.saasUsers = new _1.AmpDataServiceImpl(rest, constants_1.KIND.SAAS_USERS);
|
|
45
45
|
this.settings = new _1.AmpSettingsService(rest);
|
|
46
46
|
this.tenants = new _1.AmpEntityServiceImpl(rest, constants_1.KIND.TENANTS);
|
|
47
|
+
this.tokens = new _1.AmpDataServiceImpl(rest, constants_1.KIND.TOKENS);
|
|
47
48
|
this.users = new _1.AmpDataServiceImpl(rest, constants_1.KIND.USERS);
|
|
48
49
|
this.usersInsights = new usersInsights_service_1.UsersInsightsService(rest);
|
|
49
50
|
this.prediction = new _1.PredictionService(rest, constants_1.KIND.FINDINGS);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmpApi.js","sourceRoot":"","sources":["../../../src/services/AmpApi.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"AmpApi.js","sourceRoot":"","sources":["../../../src/services/AmpApi.ts"],"names":[],"mappings":";;;AAsBA,wBAaW;AACX,2CAAmD;AACnD,iCAA0J;AAC1J,mEAA6D;AAC7D,2DAAqD;AACrD,wDAAmD;AAInD;;;;;;;;;;;GAWG;AACH,MAAa,MAAM;IA6BjB,YAAY,IAAgB;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAoB,CAA2B,IAAI,EAAE,gBAAI,CAAC,MAAM,CAAC,CAAC;QACpF,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAkB,CAAW,IAAI,EAAE,gBAAI,CAAC,MAAM,CAAC,CAAC;QACjE,IAAI,CAAC,O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ScoreCohortUpsertDto, PlatformCustomScoreValueDto, PlatformCustomScoreValueUpsertDto, PlatformFindingDto, PlatformFindingSpecDto, PlatformFindingSpecUpsertDto, PlatformFindingUpsertDto, PlatformFlowSpecDto, PlatformFlowSpecUpsertDto, PlatformFlowStateDto, PlatformFlowStateUpsertDto, PlatformJobExecutionStateDto, PlatformJobExecutionStateUpsertDto, PlatformJobSpecDto, PlatformJobSpecUpsertDto, PlatformNotificationDto, PlatformNotificationUpsertDto, PlatformProviderUpsertDto, PlatformReportResultDto, PlatformReportResultUpsertDto, PlatformRiskContributorDto, PlatformRiskContributorUpsertDto, PlatformSaasComponentDto, PlatformSaasComponentUpsertDto, PlatformStagedSaasAssetDto, PlatformStagedSaasAssetUpsertDto, PlatformStagedSaasUserDto, PlatformStagedSaasUserUpsertDto, ProviderDto, TenantDto, TenantUpsertDto } from '../dto';
|
|
1
|
+
import { PlatformAgentDto, PlatformAgentUpsertDto, PlatformConnectorDto, PlatformConnectorUpsertDto, PlatformCustomActionDto, PlatformCustomActionUpsertDto, PlatformCustomScoreCohortDto, PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreValueDto, PlatformCustomScoreValueUpsertDto, PlatformFindingDto, PlatformFindingSpecDto, PlatformFindingSpecUpsertDto, PlatformFindingUpsertDto, PlatformFlowSpecDto, PlatformFlowSpecUpsertDto, PlatformFlowStateDto, PlatformFlowStateUpsertDto, PlatformJobExecutionStateDto, PlatformJobExecutionStateUpsertDto, PlatformJobSpecDto, PlatformJobSpecUpsertDto, PlatformNotificationDto, PlatformNotificationUpsertDto, PlatformProviderUpsertDto, PlatformReportResultDto, PlatformReportResultUpsertDto, PlatformRiskContributorDto, PlatformRiskContributorUpsertDto, PlatformSaasComponentDto, PlatformSaasComponentUpsertDto, PlatformStagedSaasAssetDto, PlatformStagedSaasAssetUpsertDto, PlatformStagedSaasUserDto, PlatformStagedSaasUserUpsertDto, PlatformTokenDto, PlatformTokenUpsertDto, ProviderDto, TenantDto, TenantUpsertDto } from '../dto';
|
|
2
2
|
import { AmpEntityService, AmpSdkAssetService, AmpSdkTenantService, AmpSdkUserService, TruncatableAmpEntityService } from './entity.service';
|
|
3
3
|
import { AmpRestClientOptions, RestClient } from './rest';
|
|
4
4
|
import { EnumService } from './rest/EnumService';
|
|
@@ -44,6 +44,7 @@ export declare class AmpSdkServices {
|
|
|
44
44
|
readonly stagedSaaSUsers: TruncatableAmpEntityService<PlatformStagedSaasUserUpsertDto, PlatformStagedSaasUserDto>;
|
|
45
45
|
readonly settings: AmpSdkSettingsService;
|
|
46
46
|
readonly tenants: AmpSdkTenantService<TenantUpsertDto, TenantDto>;
|
|
47
|
+
readonly tokens: AmpSdkTenantService<PlatformTokenUpsertDto, PlatformTokenDto>;
|
|
47
48
|
readonly users: AmpSdkUserService;
|
|
48
49
|
constructor(rest: RestClient);
|
|
49
50
|
static instance(options: AmpSdkOptions): AmpSdkServices;
|
|
@@ -47,6 +47,7 @@ class AmpSdkServices {
|
|
|
47
47
|
this.stagedSaaSUsers = new entity_service_1.TruncatableAmpEntityServiceImpl(rest, constants_1.KIND.STAGED_SAAS_USERS, constants_1.TARGET_API_PLATFORM);
|
|
48
48
|
this.settings = new settings_service_1.AmpSdkSettingsService(rest);
|
|
49
49
|
this.tenants = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.TENANTS, constants_1.TARGET_API_PLATFORM);
|
|
50
|
+
this.tokens = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.TOKENS, constants_1.TARGET_API_PLATFORM);
|
|
50
51
|
this.users = new entity_service_1.AmpSdkUserService(rest, constants_1.TARGET_API_PLATFORM);
|
|
51
52
|
}
|
|
52
53
|
static instance(options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmpSdk.js","sourceRoot":"","sources":["../../../src/services/AmpSdk.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"AmpSdk.js","sourceRoot":"","sources":["../../../src/services/AmpSdk.ts"],"names":[],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AAC,gBAAgB,GAAG,IAAI,gDAA+B,CAA+D,IAAI,EAAE,gBAAI,CAAC,kBAAkB,EAAE,+BAAmB,CAAC,CAAC;QAC9K,IAAI,CAAC,oBAAoB,GAAG,IAAI,gDAA+B,CAC7D,IAAI,EACJ,gBAAI,CAAC,sBAAsB,EAC3B,+BAAmB,CACpB,CAAC;QACF,IAAI,CAAC,eAAe,GAAG,IAAI,gDAA+B,CAA6D,IAAI,EAAE,gBAAI,CAAC,iBAAiB,EAAE,+BAAmB,CAAC,CAAC;QAE1K,IAAI,CAAC,QAAQ,GAAG,IAAI,wCAAqB,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,IAAI,qCAAoB,CAA6B,IAAI,EAAE,gBAAI,CAAC,OAAO,EAAE,+BAAmB,CAAC,CAAC;QAC7G,IAAI,CAAC,MAAM,GAAG,IAAI,qCAAoB,CAA2C,IAAI,EAAE,gBAAI,CAAC,MAAM,EAAE,+BAAmB,CAAC,CAAC;QACzH,IAAI,CAAC,KAAK,GAAG,IAAI,kCAAiB,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;IAChE,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,OAAsB;QACpC,MAAM,IAAI,GAAG,IAAA,uBAAgB,EAAC,OAAO,CAAC,CAAC;QACvC,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AAxED,wCAwEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fillJsonPathTemplate: (raw: string, meta: unknown) => string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.fillJsonPathTemplate = void 0;
|
|
7
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
+
const JSON_PATH_PATTERN = /(\$\.(?:(?:[a-zA-Z0-9_]+)(?:\.[a-zA-Z0-9_]+)*)?)/g;
|
|
9
|
+
const fillJsonPathTemplate = (raw, meta) => {
|
|
10
|
+
const jsonPathMatches = raw.match(JSON_PATH_PATTERN);
|
|
11
|
+
let result = raw;
|
|
12
|
+
if (jsonPathMatches) {
|
|
13
|
+
jsonPathMatches.forEach(jsonPath => {
|
|
14
|
+
const path = jsonPath.replace('$.', '');
|
|
15
|
+
let value = lodash_1.default.get(meta, path, '?');
|
|
16
|
+
if (!lodash_1.default.isString(value)) {
|
|
17
|
+
value = JSON.stringify(value);
|
|
18
|
+
}
|
|
19
|
+
result = result.replace(jsonPath, value);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
};
|
|
24
|
+
exports.fillJsonPathTemplate = fillJsonPathTemplate;
|
|
25
|
+
//# sourceMappingURL=ContentTemplateService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentTemplateService.js","sourceRoot":"","sources":["../../../src/services/ContentTemplateService.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,MAAM,iBAAiB,GAAG,mDAAmD,CAAC;AAEvE,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAE,IAAa,EAAE,EAAE;IACjE,MAAM,eAAe,GAAG,GAAG,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrD,IAAI,MAAM,GAAG,GAAG,CAAC;IACjB,IAAI,eAAe,EAAE,CAAC;QACpB,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YACjC,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACxC,IAAI,KAAK,GAAG,gBAAC,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;YACnC,IAAI,CAAC,gBAAC,CAAC,QAAQ,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