@ampsec/platform-client 66.0.0 → 66.1.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 +6 -6
- package/build/src/dto/agents.dto.js +1 -1
- package/build/src/dto/agents.dto.js.map +1 -1
- package/build/src/dto/findings.dto.d.ts +2 -0
- package/build/src/dto/findings.dto.js.map +1 -1
- package/build/src/dto/saasComponents.dto.d.ts +1 -0
- package/build/src/services/AgentsService.d.ts +4 -5
- package/build/src/services/AgentsService.js +3 -3
- package/build/src/services/AgentsService.js.map +1 -1
- package/package.json +1 -1
- package/src/dto/agents.dto.ts +1 -1
- package/src/dto/findings.dto.ts +2 -0
- package/src/dto/saasComponents.dto.ts +1 -0
- package/src/services/AgentsService.ts +1 -1
|
@@ -20,7 +20,7 @@ export declare const _AgentSummaryDto: z.ZodObject<{
|
|
|
20
20
|
status: z.ZodNativeEnum<typeof AgentStatus>;
|
|
21
21
|
firstName: z.ZodNullable<z.ZodString>;
|
|
22
22
|
lastName: z.ZodNullable<z.ZodString>;
|
|
23
|
-
pictureUrl: z.ZodOptional<z.
|
|
23
|
+
pictureUrl: z.ZodOptional<z.ZodString>;
|
|
24
24
|
role: z.ZodNativeEnum<typeof AuthRole>;
|
|
25
25
|
lastLoggedIn: z.ZodNullable<z.ZodDate>;
|
|
26
26
|
id: z.ZodString;
|
|
@@ -38,7 +38,7 @@ export declare const _AgentSummaryDto: z.ZodObject<{
|
|
|
38
38
|
lastName: string | null;
|
|
39
39
|
role: AuthRole;
|
|
40
40
|
lastLoggedIn: Date | null;
|
|
41
|
-
pictureUrl?: string |
|
|
41
|
+
pictureUrl?: string | undefined;
|
|
42
42
|
}, {
|
|
43
43
|
email: string;
|
|
44
44
|
status: AgentStatus;
|
|
@@ -50,7 +50,7 @@ export declare const _AgentSummaryDto: z.ZodObject<{
|
|
|
50
50
|
lastName: string | null;
|
|
51
51
|
role: AuthRole;
|
|
52
52
|
lastLoggedIn: Date | null;
|
|
53
|
-
pictureUrl?: string |
|
|
53
|
+
pictureUrl?: string | undefined;
|
|
54
54
|
}>;
|
|
55
55
|
export type AgentSummaryDto = z.infer<typeof _AgentSummaryDto>;
|
|
56
56
|
export declare const _AgentSummaryUpsertDto: z.ZodObject<{
|
|
@@ -58,7 +58,7 @@ export declare const _AgentSummaryUpsertDto: z.ZodObject<{
|
|
|
58
58
|
status: z.ZodOptional<z.ZodNativeEnum<typeof AgentStatus>>;
|
|
59
59
|
firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
60
|
lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
-
pictureUrl: z.ZodOptional<z.ZodOptional<z.
|
|
61
|
+
pictureUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
62
62
|
role: z.ZodOptional<z.ZodNativeEnum<typeof AuthRole>>;
|
|
63
63
|
lastLoggedIn: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
64
64
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -70,7 +70,7 @@ export declare const _AgentSummaryUpsertDto: z.ZodObject<{
|
|
|
70
70
|
status?: AgentStatus | undefined;
|
|
71
71
|
firstName?: string | null | undefined;
|
|
72
72
|
lastName?: string | null | undefined;
|
|
73
|
-
pictureUrl?: string |
|
|
73
|
+
pictureUrl?: string | undefined;
|
|
74
74
|
role?: AuthRole | undefined;
|
|
75
75
|
lastLoggedIn?: Date | null | undefined;
|
|
76
76
|
id?: string | undefined;
|
|
@@ -82,7 +82,7 @@ export declare const _AgentSummaryUpsertDto: z.ZodObject<{
|
|
|
82
82
|
status?: AgentStatus | undefined;
|
|
83
83
|
firstName?: string | null | undefined;
|
|
84
84
|
lastName?: string | null | undefined;
|
|
85
|
-
pictureUrl?: string |
|
|
85
|
+
pictureUrl?: string | undefined;
|
|
86
86
|
role?: AuthRole | undefined;
|
|
87
87
|
lastLoggedIn?: Date | null | undefined;
|
|
88
88
|
id?: string | undefined;
|
|
@@ -10,7 +10,7 @@ exports._AgentSummaryDto = zod_1.z
|
|
|
10
10
|
firstName: zod_1.z.string().nullable(),
|
|
11
11
|
lastName: zod_1.z.string().nullable(),
|
|
12
12
|
email: zod_1.z.string(),
|
|
13
|
-
pictureUrl: zod_1.z.string().
|
|
13
|
+
pictureUrl: zod_1.z.string().optional(),
|
|
14
14
|
status: zod_1.z.nativeEnum(agent_status_1.AgentStatus),
|
|
15
15
|
role: zod_1.z.nativeEnum(enums_1.AuthRole),
|
|
16
16
|
lastLoggedIn: zod_1.z.date().nullable(),
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;IACjC,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"}
|
|
@@ -13,6 +13,8 @@ export type FindingsStatusPathDto = {
|
|
|
13
13
|
status: FindingStatus.PENDING_VERIFICATION | FindingStatus.OPEN;
|
|
14
14
|
};
|
|
15
15
|
export type FindingUpsertDto = BaseUpsertDto & {
|
|
16
|
+
/** Date the finding was discoverd by the integration */
|
|
17
|
+
discoveredAt?: string;
|
|
16
18
|
/** Date the finding was closed */
|
|
17
19
|
closedAt?: string;
|
|
18
20
|
/** Category of finding */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findings.dto.js","sourceRoot":"","sources":["../../../src/dto/findings.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAEtB,yCAA4D;AAC5D,mCAAkF;AAClF,mCAAuE;
|
|
1
|
+
{"version":3,"file":"findings.dto.js","sourceRoot":"","sources":["../../../src/dto/findings.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAEtB,yCAA4D;AAC5D,mCAAkF;AAClF,mCAAuE;AA6DvE,MAAM,uBAAuB,GAAG,OAAC,CAAC,OAAO,EAAE,CAAC;AAC/B,QAAA,eAAe,GAAG,mBAAQ,CAAC,MAAM,CAAC;IAC7C,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,WAAW,EAAE,OAAC,CAAC,KAAK,CAA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CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { AgentDto, AgentUpsertDto, Page } from '../dto';
|
|
3
3
|
import { AmpEntityServiceImpl } from './entity.service';
|
|
4
4
|
import { RestClient } from './rest';
|
|
5
|
-
declare const _AgentSummaryPayload: z.ZodObject<{
|
|
5
|
+
export declare const _AgentSummaryPayload: z.ZodObject<{
|
|
6
6
|
email: z.ZodString;
|
|
7
7
|
status: z.ZodOptional<z.ZodNativeEnum<typeof import("../dto").AgentStatus>>;
|
|
8
8
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -11,7 +11,7 @@ declare const _AgentSummaryPayload: z.ZodObject<{
|
|
|
11
11
|
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
12
|
firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
13
|
lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
-
pictureUrl: z.ZodOptional<z.ZodOptional<z.
|
|
14
|
+
pictureUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
15
15
|
role: z.ZodNativeEnum<typeof import("../dto").AuthRole>;
|
|
16
16
|
lastLoggedIn: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -24,7 +24,7 @@ declare const _AgentSummaryPayload: z.ZodObject<{
|
|
|
24
24
|
deletedAt?: string | null | undefined;
|
|
25
25
|
firstName?: string | null | undefined;
|
|
26
26
|
lastName?: string | null | undefined;
|
|
27
|
-
pictureUrl?: string |
|
|
27
|
+
pictureUrl?: string | undefined;
|
|
28
28
|
lastLoggedIn?: Date | null | undefined;
|
|
29
29
|
}, {
|
|
30
30
|
email: string;
|
|
@@ -36,7 +36,7 @@ declare const _AgentSummaryPayload: z.ZodObject<{
|
|
|
36
36
|
deletedAt?: string | null | undefined;
|
|
37
37
|
firstName?: string | null | undefined;
|
|
38
38
|
lastName?: string | null | undefined;
|
|
39
|
-
pictureUrl?: string |
|
|
39
|
+
pictureUrl?: string | undefined;
|
|
40
40
|
lastLoggedIn?: Date | null | undefined;
|
|
41
41
|
}>;
|
|
42
42
|
export type AgentSummaryPayload = z.infer<typeof _AgentSummaryPayload>;
|
|
@@ -44,4 +44,3 @@ export declare class AgentsService extends AmpEntityServiceImpl<AgentUpsertDto,
|
|
|
44
44
|
constructor(rest: RestClient);
|
|
45
45
|
invite: (agentSavePayload: AgentSummaryPayload) => Promise<Page<AgentDto>>;
|
|
46
46
|
}
|
|
47
|
-
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AgentsService = void 0;
|
|
3
|
+
exports.AgentsService = exports._AgentSummaryPayload = void 0;
|
|
4
4
|
const dto_1 = require("../dto");
|
|
5
5
|
const constants_1 = require("./constants");
|
|
6
6
|
const entity_service_1 = require("./entity.service");
|
|
7
|
-
|
|
7
|
+
exports._AgentSummaryPayload = dto_1._AgentSummaryUpsertDto.required({ email: true, role: true });
|
|
8
8
|
class AgentsService extends entity_service_1.AmpEntityServiceImpl {
|
|
9
9
|
constructor(rest) {
|
|
10
10
|
super(rest, constants_1.KIND.AGENTS);
|
|
11
11
|
this.invite = async (agentSavePayload) => {
|
|
12
|
-
const payload = _AgentSummaryPayload.parse(agentSavePayload);
|
|
12
|
+
const payload = exports._AgentSummaryPayload.parse(agentSavePayload);
|
|
13
13
|
const res = await this.rest.call({
|
|
14
14
|
url: `/${this.targetApi}/v1/${this.kind}/invite`,
|
|
15
15
|
method: 'POST',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentsService.js","sourceRoot":"","sources":["../../../src/services/AgentsService.ts"],"names":[],"mappings":";;;AACA,gCAA8E;AAC9E,2CAAiC;AACjC,qDAAsD;
|
|
1
|
+
{"version":3,"file":"AgentsService.js","sourceRoot":"","sources":["../../../src/services/AgentsService.ts"],"names":[],"mappings":";;;AACA,gCAA8E;AAC9E,2CAAiC;AACjC,qDAAsD;AAGzC,QAAA,oBAAoB,GAAG,4BAAsB,CAAC,QAAQ,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;AAG/F,MAAa,aAAc,SAAQ,qCAA8C;IAC/E,YAAY,IAAgB;QAC1B,KAAK,CAAC,IAAI,EAAE,gBAAI,CAAC,MAAM,CAAC,CAAC;QAE3B,WAAM,GAAG,KAAK,EAAE,gBAAqC,EAA2B,EAAE;YAChF,MAAM,OAAO,GAAG,4BAAoB,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;YAE7D,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC/B,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,SAAS;gBAChD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,OAAO;aACd,CAAC,CAAC;YAEH,OAAO,GAAG,CAAC,IAAsB,CAAC;QACpC,CAAC,CAAC;IAXF,CAAC;CAYF;AAfD,sCAeC"}
|
package/package.json
CHANGED
package/src/dto/agents.dto.ts
CHANGED
|
@@ -26,7 +26,7 @@ export const _AgentSummaryDto = z
|
|
|
26
26
|
firstName: z.string().nullable(),
|
|
27
27
|
lastName: z.string().nullable(),
|
|
28
28
|
email: z.string(),
|
|
29
|
-
pictureUrl: z.string().
|
|
29
|
+
pictureUrl: z.string().optional(),
|
|
30
30
|
status: z.nativeEnum(AgentStatus),
|
|
31
31
|
role: z.nativeEnum(AuthRole),
|
|
32
32
|
lastLoggedIn: z.date().nullable(),
|
package/src/dto/findings.dto.ts
CHANGED
|
@@ -15,6 +15,8 @@ export type FindingsStatusPathDto = {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export type FindingUpsertDto = BaseUpsertDto & {
|
|
18
|
+
/** Date the finding was discoverd by the integration */
|
|
19
|
+
discoveredAt?: string;
|
|
18
20
|
/** Date the finding was closed */
|
|
19
21
|
closedAt?: string;
|
|
20
22
|
/** Category of finding */
|
|
@@ -4,7 +4,7 @@ import {KIND} from './constants';
|
|
|
4
4
|
import {AmpEntityServiceImpl} from './entity.service';
|
|
5
5
|
import {RestClient} from './rest';
|
|
6
6
|
|
|
7
|
-
const _AgentSummaryPayload = _AgentSummaryUpsertDto.required({email: true, role: true});
|
|
7
|
+
export const _AgentSummaryPayload = _AgentSummaryUpsertDto.required({email: true, role: true});
|
|
8
8
|
export type AgentSummaryPayload = z.infer<typeof _AgentSummaryPayload>;
|
|
9
9
|
|
|
10
10
|
export class AgentsService extends AmpEntityServiceImpl<AgentUpsertDto, AgentDto> {
|