@ampsec/platform-client 62.8.0 → 62.9.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.
Files changed (53) hide show
  1. package/build/src/dto/base.dto.d.ts +6 -0
  2. package/build/src/dto/base.dto.js +8 -2
  3. package/build/src/dto/base.dto.js.map +1 -1
  4. package/build/src/dto/customActions.dto.d.ts +365 -0
  5. package/build/src/dto/customActions.dto.js +40 -0
  6. package/build/src/dto/customActions.dto.js.map +1 -0
  7. package/build/src/dto/customScores.dto.d.ts +153 -0
  8. package/build/src/dto/customScores.dto.js +17 -0
  9. package/build/src/dto/customScores.dto.js.map +1 -0
  10. package/build/src/dto/findings.dto.d.ts +88 -0
  11. package/build/src/dto/findings.dto.js +25 -0
  12. package/build/src/dto/findings.dto.js.map +1 -1
  13. package/build/src/dto/flows.dto.d.ts +19 -0
  14. package/build/src/dto/flows.dto.js +9 -10
  15. package/build/src/dto/flows.dto.js.map +1 -1
  16. package/build/src/dto/index.d.ts +2 -0
  17. package/build/src/dto/index.js +2 -0
  18. package/build/src/dto/index.js.map +1 -1
  19. package/build/src/dto/platform/index.d.ts +2 -0
  20. package/build/src/dto/platform/index.js +2 -0
  21. package/build/src/dto/platform/index.js.map +1 -1
  22. package/build/src/dto/platform/platform.customActions.dto.d.ts +303 -0
  23. package/build/src/dto/platform/platform.customActions.dto.js +12 -0
  24. package/build/src/dto/platform/platform.customActions.dto.js.map +1 -0
  25. package/build/src/dto/platform/platform.customScores.dto.d.ts +165 -0
  26. package/build/src/dto/platform/platform.customScores.dto.js +18 -0
  27. package/build/src/dto/platform/platform.customScores.dto.js.map +1 -0
  28. package/build/src/dto/platform/platform.findings.dto.d.ts +77 -0
  29. package/build/src/dto/platform/platform.findings.dto.js +9 -0
  30. package/build/src/dto/platform/platform.findings.dto.js.map +1 -1
  31. package/build/src/services/AmpApi.d.ts +5 -1
  32. package/build/src/services/AmpApi.js +4 -0
  33. package/build/src/services/AmpApi.js.map +1 -1
  34. package/build/src/services/AmpSdk.d.ts +5 -4
  35. package/build/src/services/AmpSdk.js +4 -0
  36. package/build/src/services/AmpSdk.js.map +1 -1
  37. package/build/src/services/constants.d.ts +4 -0
  38. package/build/src/services/constants.js +4 -0
  39. package/build/src/services/constants.js.map +1 -1
  40. package/package.json +1 -1
  41. package/src/dto/base.dto.ts +7 -2
  42. package/src/dto/customActions.dto.ts +44 -0
  43. package/src/dto/customScores.dto.ts +21 -0
  44. package/src/dto/findings.dto.ts +29 -1
  45. package/src/dto/flows.dto.ts +8 -11
  46. package/src/dto/index.ts +2 -0
  47. package/src/dto/platform/index.ts +2 -0
  48. package/src/dto/platform/platform.customActions.dto.ts +12 -0
  49. package/src/dto/platform/platform.customScores.dto.ts +22 -0
  50. package/src/dto/platform/platform.findings.dto.ts +12 -1
  51. package/src/services/AmpApi.ts +29 -1
  52. package/src/services/AmpSdk.ts +24 -3
  53. package/src/services/constants.ts +4 -0
@@ -0,0 +1,165 @@
1
+ import { z } from 'zod';
2
+ export declare const _PlatformCustomScoreValueDto: z.ZodObject<{
3
+ value: z.ZodNumber;
4
+ id: z.ZodString;
5
+ createdAt: z.ZodString;
6
+ updatedAt: z.ZodString;
7
+ deletedAt: z.ZodNullable<z.ZodString>;
8
+ findingSpecId: z.ZodString;
9
+ tid: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ value: number;
12
+ id: string;
13
+ tid: string;
14
+ createdAt: string;
15
+ updatedAt: string;
16
+ deletedAt: string | null;
17
+ findingSpecId: string;
18
+ }, {
19
+ value: number;
20
+ id: string;
21
+ tid: string;
22
+ createdAt: string;
23
+ updatedAt: string;
24
+ deletedAt: string | null;
25
+ findingSpecId: string;
26
+ }>;
27
+ export type PlatformCustomScoreValueDto = z.infer<typeof _PlatformCustomScoreValueDto>;
28
+ export declare const _PlatformCustomScoreValueUpsertDto: z.ZodObject<{
29
+ value: z.ZodNumber;
30
+ id: z.ZodOptional<z.ZodString>;
31
+ createdAt: z.ZodOptional<z.ZodString>;
32
+ updatedAt: z.ZodOptional<z.ZodString>;
33
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ findingSpecId: z.ZodString;
35
+ tid: z.ZodString;
36
+ }, "strip", z.ZodTypeAny, {
37
+ value: number;
38
+ tid: string;
39
+ findingSpecId: string;
40
+ id?: string | undefined;
41
+ createdAt?: string | undefined;
42
+ updatedAt?: string | undefined;
43
+ deletedAt?: string | null | undefined;
44
+ }, {
45
+ value: number;
46
+ tid: string;
47
+ findingSpecId: string;
48
+ id?: string | undefined;
49
+ createdAt?: string | undefined;
50
+ updatedAt?: string | undefined;
51
+ deletedAt?: string | null | undefined;
52
+ }>;
53
+ export type PlatformCustomScoreValueUpsertDto = z.infer<typeof _PlatformCustomScoreValueUpsertDto>;
54
+ export declare const _PlatformCustomScoreCohortDto: z.ZodObject<{
55
+ id: z.ZodString;
56
+ createdAt: z.ZodString;
57
+ updatedAt: z.ZodString;
58
+ deletedAt: z.ZodNullable<z.ZodString>;
59
+ cohort: z.ZodObject<{
60
+ id: z.ZodString;
61
+ kind: z.ZodEnum<["ORGANIZATION", "DEPARTMENT", "USER", "RISK_CONTRIBUTOR"]>;
62
+ displayValue: z.ZodString;
63
+ value: z.ZodString;
64
+ inclusive: z.ZodBoolean;
65
+ }, "strip", z.ZodTypeAny, {
66
+ inclusive: boolean;
67
+ value: string;
68
+ id: string;
69
+ displayValue: string;
70
+ kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
71
+ }, {
72
+ inclusive: boolean;
73
+ value: string;
74
+ id: string;
75
+ displayValue: string;
76
+ kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
77
+ }>;
78
+ multiplier: z.ZodNumber;
79
+ tid: z.ZodString;
80
+ }, "strip", z.ZodTypeAny, {
81
+ id: string;
82
+ tid: string;
83
+ createdAt: string;
84
+ updatedAt: string;
85
+ deletedAt: string | null;
86
+ cohort: {
87
+ inclusive: boolean;
88
+ value: string;
89
+ id: string;
90
+ displayValue: string;
91
+ kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
92
+ };
93
+ multiplier: number;
94
+ }, {
95
+ id: string;
96
+ tid: string;
97
+ createdAt: string;
98
+ updatedAt: string;
99
+ deletedAt: string | null;
100
+ cohort: {
101
+ inclusive: boolean;
102
+ value: string;
103
+ id: string;
104
+ displayValue: string;
105
+ kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
106
+ };
107
+ multiplier: number;
108
+ }>;
109
+ export type PlatformCustomScoreCohortDto = z.infer<typeof _PlatformCustomScoreCohortDto>;
110
+ export declare const _PlatformCustomScoreCohortUpsertDto: z.ZodObject<{
111
+ id: z.ZodString;
112
+ createdAt: z.ZodString;
113
+ updatedAt: z.ZodString;
114
+ deletedAt: z.ZodNullable<z.ZodString>;
115
+ cohort: z.ZodObject<{
116
+ id: z.ZodString;
117
+ kind: z.ZodEnum<["ORGANIZATION", "DEPARTMENT", "USER", "RISK_CONTRIBUTOR"]>;
118
+ displayValue: z.ZodString;
119
+ value: z.ZodString;
120
+ inclusive: z.ZodBoolean;
121
+ }, "strip", z.ZodTypeAny, {
122
+ inclusive: boolean;
123
+ value: string;
124
+ id: string;
125
+ displayValue: string;
126
+ kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
127
+ }, {
128
+ inclusive: boolean;
129
+ value: string;
130
+ id: string;
131
+ displayValue: string;
132
+ kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
133
+ }>;
134
+ multiplier: z.ZodNumber;
135
+ tid: z.ZodString;
136
+ }, "strip", z.ZodTypeAny, {
137
+ id: string;
138
+ tid: string;
139
+ createdAt: string;
140
+ updatedAt: string;
141
+ deletedAt: string | null;
142
+ cohort: {
143
+ inclusive: boolean;
144
+ value: string;
145
+ id: string;
146
+ displayValue: string;
147
+ kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
148
+ };
149
+ multiplier: number;
150
+ }, {
151
+ id: string;
152
+ tid: string;
153
+ createdAt: string;
154
+ updatedAt: string;
155
+ deletedAt: string | null;
156
+ cohort: {
157
+ inclusive: boolean;
158
+ value: string;
159
+ id: string;
160
+ displayValue: string;
161
+ kind: "USER" | "ORGANIZATION" | "DEPARTMENT" | "RISK_CONTRIBUTOR";
162
+ };
163
+ multiplier: number;
164
+ }>;
165
+ export type PlatformCustomScoreCohortUpsertDto = z.infer<typeof _PlatformCustomScoreCohortUpsertDto>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports._PlatformCustomScoreCohortUpsertDto = exports._PlatformCustomScoreCohortDto = exports._PlatformCustomScoreValueUpsertDto = exports._PlatformCustomScoreValueDto = void 0;
4
+ const zod_1 = require("zod");
5
+ const customScores_dto_1 = require("../customScores.dto");
6
+ exports._PlatformCustomScoreValueDto = customScores_dto_1._CustomScoreValueDto.extend({
7
+ tid: zod_1.z.string(),
8
+ });
9
+ exports._PlatformCustomScoreValueUpsertDto = customScores_dto_1._CustomScoreValueUpsertDto.extend({
10
+ tid: zod_1.z.string(),
11
+ });
12
+ exports._PlatformCustomScoreCohortDto = customScores_dto_1._CustomScoreCohortDto.extend({
13
+ tid: zod_1.z.string(),
14
+ });
15
+ exports._PlatformCustomScoreCohortUpsertDto = customScores_dto_1._CustomScoreCohortDto.extend({
16
+ tid: zod_1.z.string(),
17
+ });
18
+ //# sourceMappingURL=platform.customScores.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.customScores.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.customScores.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,0DAAyI;AAE5H,QAAA,4BAA4B,GAAG,uCAAoB,CAAC,MAAM,CAAC;IACtE,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAGU,QAAA,kCAAkC,GAAG,6CAA0B,CAAC,MAAM,CAAC;IAClF,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAGU,QAAA,6BAA6B,GAAG,wCAAqB,CAAC,MAAM,CAAC;IACxE,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAGU,QAAA,mCAAmC,GAAG,wCAAqB,CAAC,MAAM,CAAC;IAC9E,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC"}
@@ -1,4 +1,81 @@
1
+ import { z } from 'zod';
1
2
  import { FindingDto, FindingUpsertDto } from '../findings.dto';
2
3
  import { TenantBased, UpsertTenantBased } from './tenant.based.dto';
3
4
  export type PlatformFindingUpsertDto = FindingUpsertDto & UpsertTenantBased;
4
5
  export type PlatformFindingDto = FindingDto & TenantBased;
6
+ export declare const _PlatformFindingSpecDto: z.ZodObject<{
7
+ name: z.ZodString;
8
+ description: z.ZodUnion<[z.ZodString, z.ZodUnknown]>;
9
+ id: z.ZodString;
10
+ cid: z.ZodOptional<z.ZodString>;
11
+ createdAt: z.ZodString;
12
+ updatedAt: z.ZodString;
13
+ deletedAt: z.ZodNullable<z.ZodString>;
14
+ displayValue: z.ZodString;
15
+ eventType: z.ZodString;
16
+ severity: z.ZodNativeEnum<typeof import("..").FindingSeverity>;
17
+ tid: z.ZodString;
18
+ }, "strip", z.ZodTypeAny, {
19
+ name: string;
20
+ id: string;
21
+ tid: string;
22
+ createdAt: string;
23
+ updatedAt: string;
24
+ deletedAt: string | null;
25
+ displayValue: string;
26
+ eventType: string;
27
+ severity: import("..").FindingSeverity;
28
+ description?: unknown;
29
+ cid?: string | undefined;
30
+ }, {
31
+ name: string;
32
+ id: string;
33
+ tid: string;
34
+ createdAt: string;
35
+ updatedAt: string;
36
+ deletedAt: string | null;
37
+ displayValue: string;
38
+ eventType: string;
39
+ severity: import("..").FindingSeverity;
40
+ description?: unknown;
41
+ cid?: string | undefined;
42
+ }>;
43
+ export type PlatformFindingSpecDto = z.infer<typeof _PlatformFindingSpecDto>;
44
+ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<{
45
+ name: z.ZodString;
46
+ description: z.ZodUnion<[z.ZodString, z.ZodUnknown]>;
47
+ id: z.ZodOptional<z.ZodString>;
48
+ cid: z.ZodOptional<z.ZodString>;
49
+ createdAt: z.ZodOptional<z.ZodString>;
50
+ updatedAt: z.ZodOptional<z.ZodString>;
51
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
+ displayValue: z.ZodString;
53
+ eventType: z.ZodString;
54
+ severity: z.ZodNativeEnum<typeof import("..").FindingSeverity>;
55
+ tid: z.ZodString;
56
+ }, "strip", z.ZodTypeAny, {
57
+ name: string;
58
+ tid: string;
59
+ displayValue: string;
60
+ eventType: string;
61
+ severity: import("..").FindingSeverity;
62
+ description?: unknown;
63
+ id?: string | undefined;
64
+ cid?: string | undefined;
65
+ createdAt?: string | undefined;
66
+ updatedAt?: string | undefined;
67
+ deletedAt?: string | null | undefined;
68
+ }, {
69
+ name: string;
70
+ tid: string;
71
+ displayValue: string;
72
+ eventType: string;
73
+ severity: import("..").FindingSeverity;
74
+ description?: unknown;
75
+ id?: string | undefined;
76
+ cid?: string | undefined;
77
+ createdAt?: string | undefined;
78
+ updatedAt?: string | undefined;
79
+ deletedAt?: string | null | undefined;
80
+ }>;
81
+ export type PlatformFindingSpecUpsertDto = z.infer<typeof _PlatformFindingSpecUpsertDto>;
@@ -1,3 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports._PlatformFindingSpecUpsertDto = exports._PlatformFindingSpecDto = void 0;
4
+ const zod_1 = require("zod");
5
+ const findings_dto_1 = require("../findings.dto");
6
+ exports._PlatformFindingSpecDto = findings_dto_1._FindingSpecDto.extend({
7
+ tid: zod_1.z.string(),
8
+ });
9
+ exports._PlatformFindingSpecUpsertDto = findings_dto_1._FindingSpecUpsertDto.extend({
10
+ tid: zod_1.z.string(),
11
+ });
3
12
  //# sourceMappingURL=platform.findings.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform.findings.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.findings.dto.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"platform.findings.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.findings.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,kDAAqG;AAOxF,QAAA,uBAAuB,GAAG,8BAAe,CAAC,MAAM,CAAC;IAC5D,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAGU,QAAA,6BAA6B,GAAG,oCAAqB,CAAC,MAAM,CAAC;IACxE,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { AgentDto, AgentUpsertDto, AssetDto, 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, 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';
@@ -22,9 +22,13 @@ export declare class AmpApi {
22
22
  readonly asset: AmpDataService<AssetDto>;
23
23
  readonly cohorts: CohortService;
24
24
  readonly connectors: ConnectorsService;
25
+ readonly customActions: AmpEntityService<CustomActionUpsertDto, CustomActionDto>;
26
+ readonly customScoreValues: AmpEntityService<CustomScoreValueUpsertDto, CustomScoreValueDto>;
27
+ readonly customScoreCohorts: AmpEntityService<CustomScoreCohortUpsertDto, CustomScoreCohortDto>;
25
28
  readonly enums: EnumService;
26
29
  readonly findings: FindingsService;
27
30
  readonly findingsInsights: FindingsInsightsService;
31
+ readonly findingSpecs: AmpEntityService<FindingSpecUpsertDto, FindingSpecDto>;
28
32
  readonly flowSpecs: FlowSpecsService;
29
33
  readonly identity: AgentIdentityService;
30
34
  readonly install: ConnectorInstallService;
@@ -25,9 +25,13 @@ class AmpApi {
25
25
  this.asset = new _1.AmpDataServiceImpl(rest, constants_1.KIND.ASSETS);
26
26
  this.cohorts = new CohortService_1.CohortService(rest);
27
27
  this.connectors = new _1.ConnectorsService(rest);
28
+ this.customActions = new _1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_ACTIONS);
29
+ this.customScoreCohorts = new _1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_COHORTS);
30
+ this.customScoreValues = new _1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_VALUES);
28
31
  this.enums = new rest_1.DefaultEnumService(rest);
29
32
  this.findings = new _1.FindingsService(rest);
30
33
  this.findingsInsights = new _1.FindingsInsightsService(rest, constants_1.KIND.FINDINGS_INSIGHTS);
34
+ this.findingSpecs = new _1.AmpEntityServiceImpl(rest, constants_1.KIND.FINDING_SPECS);
31
35
  this.flowSpecs = new flowSpecs_service_1.FlowSpecsService(rest);
32
36
  this.identity = new rest_1.AgentIdentityService(rest);
33
37
  this.install = new rest_1.ConnectorInstallService(rest, constants_1.TARGET_API_AGENT);
@@ -1 +1 @@
1
- {"version":3,"file":"AmpApi.js","sourceRoot":"","sources":["../../../src/services/AmpApi.ts"],"names":[],"mappings":";;;AACA,wBAaW;AACX,2CAAmD;AACnD,iCAA0J;AAC1J,mEAA6D;AAC7D,2DAAqD;AACrD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AG,IAAI,qBAAkB,CAAkB,IAAI,EAAE,gBAAI,CAAC,cAAc,CAAC,CAAC;QACxF,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAoB,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,UAAU,GAAG,IAAI,qBAAkB,CAAe,IAAI,EAAE,gBAAI,CAAC,WAAW,CAAC,CAAC;QAC/E,IAAI,CAAC,cAAc,GAAG,IAAI,qBAAkB,CAAmB,IAAI,EAAE,gBAAI,CAAC,eAAe,CAAC,CAAC;QAC3F,IAAI,CAAC,SAAS,GAAG,IAAI,qBAAkB,CAAc,IAAI,EAAE,gBAAI,CAAC,UAAU,CAAC,CAAC;QAC5E,IAAI,CAAC,QAAQ,GAAG,IAAI,qBAAkB,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAoB,CAA6B,IAAI,EAAE,gBAAI,CAAC,OAAO,CAAC,CAAC;QACxF,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAkB,CAAU,IAAI,EAAE,gBAAI,CAAC,KAAK,CAAC,CAAC;QAC/D,IAAI,CAAC,aAAa,GAAG,IAAI,4CAAoB,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAiB,CAAC,IAAI,EAAE,gBAAI,CAAC,QAAQ,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,OAAsB;QACpC,MAAM,IAAI,GAAG,IAAA,uBAAgB,EAAC,OAAO,CAAC,CAAC;QACvC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF;AA7DD,wBA6DC"}
@@ -1,14 +1,11 @@
1
- import { PlatformAgentDto, PlatformAgentUpsertDto, PlatformConnectorDto, PlatformConnectorUpsertDto, PlatformFindingDto, PlatformFindingUpsertDto, 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, ProviderDto, TenantDto, TenantUpsertDto } from '../dto';
2
2
  import { AmpEntityService, AmpSdkAssetService, AmpSdkTenantService, AmpSdkUserService, TruncatableAmpEntityService } from './entity.service';
3
3
  import { AmpRestClientOptions, RestClient } from './rest';
4
- import { PlatformJobSpecDto, PlatformJobSpecUpsertDto } from '../dto/platform/platform.jobSpec.dto';
5
- import { PlatformJobExecutionStateDto, PlatformJobExecutionStateUpsertDto } from '../dto/platform/platform.jobExecutionState.dto';
6
4
  import { EnumService } from './rest/EnumService';
7
5
  import { AmpSdkSettingsService } from './settings.service';
8
6
  import { AmpSaaSEntityService, AmpSdkSaasAssetService, AmpSdkSaasComponentService, AmpSdkSaasUserService } from './saasEntity.service';
9
7
  import { ContentfulService } from './contentful.service';
10
8
  import { FindingsInsightsService } from './findingsInsights.service';
11
- import { PlatformFlowSpecDto, PlatformFlowSpecUpsertDto, PlatformFlowStateDto, PlatformFlowStateUpsertDto } from '../dto/platform/platform.flows.dto';
12
9
  export type AmpSdkOptions = AmpRestClientOptions;
13
10
  /**
14
11
  * AMP API
@@ -24,8 +21,12 @@ export declare class AmpSdkServices {
24
21
  readonly asset: AmpSdkAssetService;
25
22
  readonly connectors: AmpEntityService<PlatformConnectorUpsertDto, PlatformConnectorDto>;
26
23
  readonly contentful: ContentfulService;
24
+ readonly customActions: AmpEntityService<PlatformCustomActionUpsertDto, PlatformCustomActionDto>;
25
+ readonly customScoreCohorts: AmpEntityService<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>;
26
+ readonly customScoreValues: AmpEntityService<PlatformCustomScoreValueUpsertDto, PlatformCustomScoreValueDto>;
27
27
  readonly enums: EnumService;
28
28
  readonly findings: AmpSaaSEntityService<PlatformFindingUpsertDto, PlatformFindingDto>;
29
+ readonly findingSpecs: AmpSaaSEntityService<PlatformFindingSpecUpsertDto, PlatformFindingSpecDto>;
29
30
  readonly findingsInsights: FindingsInsightsService;
30
31
  readonly flowSpecs: AmpSaaSEntityService<PlatformFlowSpecUpsertDto, PlatformFlowSpecDto>;
31
32
  readonly flowStates: AmpSaaSEntityService<PlatformFlowStateUpsertDto, PlatformFlowStateDto>;
@@ -24,8 +24,12 @@ class AmpSdkServices {
24
24
  this.asset = new entity_service_1.AmpSdkAssetService(rest, constants_1.TARGET_API_PLATFORM);
25
25
  this.connectors = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CONNECTORS, constants_1.TARGET_API_PLATFORM);
26
26
  this.contentful = new contentful_service_1.ContentfulService();
27
+ this.customActions = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_ACTIONS, constants_1.TARGET_API_PLATFORM);
28
+ this.customScoreCohorts = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_COHORTS, constants_1.TARGET_API_PLATFORM);
29
+ this.customScoreValues = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_VALUES, constants_1.TARGET_API_PLATFORM);
27
30
  this.enums = new EnumService_1.DefaultEnumService(rest, constants_1.TARGET_API_PLATFORM);
28
31
  this.findings = new saasEntity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.FINDINGS, constants_1.TARGET_API_PLATFORM);
32
+ this.findingSpecs = new saasEntity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.FINDING_SPECS, constants_1.TARGET_API_PLATFORM);
29
33
  this.findingsInsights = new findingsInsights_service_1.FindingsInsightsService(rest, constants_1.KIND.FINDINGS_INSIGHTS, constants_1.TARGET_API_PLATFORM);
30
34
  this.flowSpecs = new saasEntity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.FLOW_SPECS, constants_1.TARGET_API_PLATFORM);
31
35
  this.flowStates = new saasEntity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.FLOW_STATES, constants_1.TARGET_API_PLATFORM);
@@ -1 +1 @@
1
- {"version":3,"file":"AmpSdk.js","sourceRoot":"","sources":["../../../src/services/AmpSdk.ts"],"names":[],"mappings":";;;AA4BA,qDAQ0B;AAC1B,iCAA0E;AAC1E,2CAAsD;AAGtD,oDAAmE;AACnE,yDAAyD;AACzD,6DAA+J;AAC/J,6DAAuD;AACvD,yEAAmE;AAKnE;;;;;;;;GAQG;AACH,MAAa,cAAc;IA0BzB,YAAY,IAAgB;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,qCAAoB,CAA2C,IAAI,EAAE,gBAAI,CAAC,MAAM,EAAE,+BAAmB,CAAC,CAAC;QACzH,IAAI,CAAC,KAAK,GAAG,IAAI,mCAAkB,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;QAC/D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AC;QACtE,IAAI,CAAC,gBAAgB,GAAG,IAAI,gDAA+B,CAAmD,IAAI,EAAE,gBAAI,CAAC,kBAAkB,EAAE,+BAAmB,CAAC,CAAC;QAClK,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,CAAiD,IAAI,EAAE,gBAAI,CAAC,iBAAiB,EAAE,+BAAmB,CAAC,CAAC;QAE9J,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,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;AAtED,wCAsEC"}
@@ -10,11 +10,15 @@ export declare const KIND: {
10
10
  AGENTS: string;
11
11
  ASSETS: string;
12
12
  CONNECTORS: string;
13
+ CUSTOM_ACTIONS: string;
14
+ CUSTOM_SCORE_COHORTS: string;
15
+ CUSTOM_SCORE_VALUES: string;
13
16
  ENUM_DEPARTMENTS: string;
14
17
  ENUM_ORGANIZATIONS: string;
15
18
  ENUM_TITLES: string;
16
19
  FINDINGS: string;
17
20
  FINDINGS_INSIGHTS: string;
21
+ FINDING_SPECS: string;
18
22
  FLOW_SPECS: string;
19
23
  FLOW_STATES: string;
20
24
  JOB_EXECUTIONS: string;
@@ -9,11 +9,15 @@ exports.KIND = {
9
9
  AGENTS: 'agents',
10
10
  ASSETS: 'assets',
11
11
  CONNECTORS: 'connectors',
12
+ CUSTOM_ACTIONS: 'custom_actions',
13
+ CUSTOM_SCORE_COHORTS: 'custom_score_cohorts',
14
+ CUSTOM_SCORE_VALUES: 'custom_score_values',
12
15
  ENUM_DEPARTMENTS: 'departments',
13
16
  ENUM_ORGANIZATIONS: 'organizations',
14
17
  ENUM_TITLES: 'titles',
15
18
  FINDINGS: 'findings',
16
19
  FINDINGS_INSIGHTS: 'findings_insights',
20
+ FINDING_SPECS: 'findings_specs',
17
21
  FLOW_SPECS: 'flow_specs',
18
22
  FLOW_STATES: 'flow_states',
19
23
  JOB_EXECUTIONS: 'job_executions',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/services/constants.ts"],"names":[],"mappings":";;;AAIa,QAAA,2BAA2B,GAAG,CAAC,CAAC;AAGhC,QAAA,mBAAmB,GAAc,UAAU,CAAC;AAC5C,QAAA,gBAAgB,GAAc,KAAK,CAAC;AACpC,QAAA,iBAAiB,GAAc,KAAK,CAAC;AAErC,QAAA,IAAI,GAAG;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;IACxB,gBAAgB,EAAE,aAAa;IAC/B,kBAAkB,EAAE,eAAe;IACnC,WAAW,EAAE,QAAQ;IACrB,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,mBAAmB;IACtC,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,aAAa;IAC1B,cAAc,EAAE,gBAAgB;IAChC,QAAQ,EAAE,MAAM;IAChB,aAAa,EAAE,eAAe;IAC9B,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;IACtC,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,iBAAiB;IAClC,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,oBAAoB;IACxC,sBAAsB,EAAE,wBAAwB;I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e;IAC9B,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;IACtC,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,iBAAiB;IAClC,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,oBAAoB;IACxC,sBAAsB,EAAE,wBAAwB;IAChD,iBAAiB,EAAE,mBAAmB;IACtC,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,UAAU;IAC1B,iBAAiB,EAAE,mBAAmB;CACvC,CAAC;AAEW,QAAA,OAAO,GAAG;IACrB,YAAY,EAAE,cAAc;IAC5B,yBAAyB,EAAE,qCAAqC;IAChE,yBAAyB,EAAE,qCAAqC;IAChE,gBAAgB,EAAE,kBAAkB;IACpC,iBAAiB,EAAE,mBAAmB;IACtC,qBAAqB,EAAE,uBAAuB;IAC9C,2BAA2B,EAAE,6BAA6B;IAC1D,YAAY,EAAE,0BAA0B;IACxC,qBAAqB,EAAE,uBAAuB;IAC9C,gBAAgB,EAAE,kBAAkB;IACpC,WAAW,EAAE,aAAa;IAC1B,mBAAmB;IACnB,kBAAkB,EAAE,sBAAsB;CAC3C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "62.8.0",
3
+ "version": "62.9.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -6,11 +6,16 @@ export const _BaseDto = z.object({
6
6
  updatedAt: z.string(),
7
7
  deletedAt: z.string().nullable(),
8
8
  });
9
-
10
9
  export type BaseDto = z.infer<typeof _BaseDto>;
11
10
 
12
- export const _BaseUpsertDto = _BaseDto.partial();
11
+ export const UPSERT_DTO_MASK = {
12
+ id: true,
13
+ createdAt: true,
14
+ updatedAt: true,
15
+ deletedAt: true,
16
+ } as const;
13
17
 
18
+ export const _BaseUpsertDto = _BaseDto.partial(UPSERT_DTO_MASK);
14
19
  export type BaseUpsertDto = z.infer<typeof _BaseUpsertDto>;
15
20
 
16
21
  const WithEtag = z.object({etag: z.string()});
@@ -0,0 +1,44 @@
1
+ import {z} from 'zod';
2
+ import {UPSERT_DTO_MASK, _BaseDto} from './base.dto';
3
+
4
+ const _BaseCustomAction = _BaseDto.extend({
5
+ displayValue: z.string(),
6
+ description: z.string(),
7
+ isTemplate: z.boolean(),
8
+ retryStrategy: z
9
+ .object({
10
+ kind: z.literal('CONSTANT_BACKOFF'),
11
+ maxRetries: z.number(),
12
+ delay: z.number(),
13
+ })
14
+ .optional(),
15
+ });
16
+
17
+ export const _CustomRestActionMetaDto = z.object({
18
+ request: z.object({
19
+ url: z.string(),
20
+ method: z.string(),
21
+ payload: z.object({
22
+ kind: z.literal('TEMPLATE'),
23
+ format: z.literal('JSON'),
24
+ value: z.string(),
25
+ }),
26
+ headers: z.record(z.string()),
27
+ params: z.record(z.string()),
28
+ }),
29
+ timeout: z.number().optional(),
30
+ });
31
+ const _CustomRestActionDto = _BaseCustomAction.extend({
32
+ kind: z.literal('REST_ACTION'),
33
+ meta: _CustomRestActionMetaDto,
34
+ });
35
+
36
+ const _CustomRestActionUpsertDto = _CustomRestActionDto.partial(UPSERT_DTO_MASK);
37
+
38
+ export const _CustomActionDto = _CustomRestActionDto;
39
+ export type CustomActionDto = z.infer<typeof _CustomActionDto>;
40
+
41
+ export const _CustomActionUpsertDto = _CustomRestActionUpsertDto;
42
+ export type CustomActionUpsertDto = z.infer<typeof _CustomActionUpsertDto>;
43
+
44
+ // TODO action execution history + errors
@@ -0,0 +1,21 @@
1
+ import {z} from 'zod';
2
+ import {UPSERT_DTO_MASK, _BaseDto} from './base.dto';
3
+ import {_AmplifierCohortDto} from './flows.dto';
4
+
5
+ export const _CustomScoreValueDto = _BaseDto.extend({
6
+ findingSpecId: z.string(),
7
+ value: z.number(),
8
+ });
9
+ export type CustomScoreValueDto = z.infer<typeof _CustomScoreValueDto>;
10
+
11
+ export const _CustomScoreValueUpsertDto = _CustomScoreValueDto.partial(UPSERT_DTO_MASK);
12
+ export type CustomScoreValueUpsertDto = z.infer<typeof _CustomScoreValueUpsertDto>;
13
+
14
+ export const _CustomScoreCohortDto = _BaseDto.extend({
15
+ cohort: _AmplifierCohortDto,
16
+ multiplier: z.number(),
17
+ });
18
+ export type CustomScoreCohortDto = z.infer<typeof _CustomScoreCohortDto>;
19
+
20
+ export const _CustomScoreCohortUpsertDto = _CustomScoreCohortDto.partial(UPSERT_DTO_MASK);
21
+ export type CustomScoreCohortUpsertDto = z.infer<typeof _CustomScoreCohortUpsertDto>;
@@ -1,5 +1,6 @@
1
+ import {z} from 'zod';
1
2
  import {SimpleAssetDto} from './assets.dto';
2
- import {BaseDto, BaseUpsertDto} from './base.dto';
3
+ import {BaseDto, BaseUpsertDto, _BaseDto} from './base.dto';
3
4
  import {Category, FindingKind} from './enums';
4
5
  import {FindingOutcome, FindingSeverity, FindingStatus} from './enums';
5
6
  import {SimpleProviderDto} from './providers.dto';
@@ -57,3 +58,30 @@ export type FindingDto = BaseDto &
57
58
  /** Optionally populated when requested through query param `include=meta`. Comes from `saasComp.meta` */
58
59
  meta?: SaasComponentMeta;
59
60
  };
61
+
62
+ const _FindingSpecDescription = z.unknown();
63
+ export const _FindingSpecDto = _BaseDto.extend({
64
+ cid: z.string().optional(),
65
+ name: z.string(),
66
+ displayValue: z.string(),
67
+ eventType: z.string(),
68
+ description: z.union([z.string(), _FindingSpecDescription]),
69
+ severity: z.nativeEnum(FindingSeverity),
70
+ });
71
+ export type FindingSpecDto = z.infer<typeof _FindingSpecDto>;
72
+
73
+ export const _FindingSpecUpsertDto = _FindingSpecDto.partial({
74
+ id: true,
75
+ createdAt: true,
76
+ updatedAt: true,
77
+ deletedAt: true,
78
+ });
79
+ export type FindingSpecUpsertDto = z.infer<typeof _FindingSpecUpsertDto>;
80
+
81
+ export const _FindingSummaryDto = z.object({
82
+ id: z.string(),
83
+ cid: z.string().optional(),
84
+ displayValue: z.string(),
85
+ eventType: z.string(),
86
+ });
87
+ export type FindingSummaryDto = z.infer<typeof _FindingSummaryDto>;
@@ -108,18 +108,15 @@ const _FlowTriggerFilter = z.object({
108
108
  custom: z.record(z.unknown()).optional(),
109
109
  });
110
110
  export type FlowTriggerFilter = z.infer<typeof _FlowTriggerFilter>;
111
+ export const _AmplifierCohortDto = z.object({
112
+ id: z.string(),
113
+ kind: z.enum(['ORGANIZATION', 'DEPARTMENT', 'USER', 'RISK_CONTRIBUTOR']),
114
+ displayValue: z.string(),
115
+ value: z.string(),
116
+ inclusive: z.boolean(),
117
+ });
111
118
  const _FlowFilter = z.object({
112
- cohorts: z.array(
113
- z
114
- .object({
115
- id: z.string(),
116
- kind: z.enum(['ORGANIZATION', 'DEPARTMENT', 'USER', 'RISK_CONTRIBUTOR']),
117
- displayValue: z.string(),
118
- value: z.string(),
119
- inclusive: z.boolean(),
120
- })
121
- .optional()
122
- ),
119
+ cohorts: z.array(_AmplifierCohortDto.optional()),
123
120
  custom: z.record(z.unknown()).optional(),
124
121
  });
125
122
  const _FlowTone = z.object({
package/src/dto/index.ts CHANGED
@@ -5,6 +5,8 @@ export * from './base.dto';
5
5
  export * from './connectors.dto';
6
6
  export * from './constants';
7
7
  export * from './coverage.dto';
8
+ export * from './customActions.dto';
9
+ export * from './customScores.dto';
8
10
  export * from './defaultConnector.dto';
9
11
  export * from './entityIdSummaries.dto';
10
12
  export * from './enum.dto';
@@ -1,6 +1,8 @@
1
1
  export * from './platform.agents.dto';
2
2
  export * from './platform.assets.dto';
3
3
  export * from './platform.connectors.dto';
4
+ export * from './platform.customActions.dto';
5
+ export * from './platform.customScores.dto';
4
6
  export * from './platform.findingsInsights.dto';
5
7
  export * from './platform.findings.dto';
6
8
  export * from './platform.flows.dto';
@@ -0,0 +1,12 @@
1
+ import {z} from 'zod';
2
+ import {_CustomActionDto, _CustomActionUpsertDto} from '../customActions.dto';
3
+
4
+ export const _PlatformCustomActionDto = _CustomActionDto.extend({
5
+ tid: z.string(),
6
+ });
7
+ export type PlatformCustomActionDto = z.infer<typeof _PlatformCustomActionDto>;
8
+
9
+ export const _PlatformCustomActionUpsertDto = _CustomActionUpsertDto.extend({
10
+ tid: z.string(),
11
+ });
12
+ export type PlatformCustomActionUpsertDto = z.infer<typeof _PlatformCustomActionUpsertDto>;