@ampsec/platform-client 87.3.0 → 87.5.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.
@@ -1,51 +1,212 @@
1
1
  import { z } from 'zod';
2
+ /**
3
+ * Flat condition format (backward compatible)
4
+ * Used when submitting simple or flat conditions
5
+ */
6
+ export declare const _FlatConditionSchema: z.ZodObject<{
7
+ type: z.ZodEnum<["bool", "numeric", "string", "array", "datetime"]>;
8
+ name: z.ZodString;
9
+ operator: z.ZodString;
10
+ value: z.ZodOptional<z.ZodAny>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ name: string;
13
+ type: "string" | "numeric" | "array" | "datetime" | "bool";
14
+ operator: string;
15
+ value?: any;
16
+ }, {
17
+ name: string;
18
+ type: "string" | "numeric" | "array" | "datetime" | "bool";
19
+ operator: string;
20
+ value?: any;
21
+ }>;
22
+ /**
23
+ * Hierarchical condition group format (new)
24
+ * Supports nested AND/OR logic with unlimited depth
25
+ */
26
+ export declare const _ConditionGroupSchema: z.ZodType<any>;
27
+ /**
28
+ * Action format
29
+ * Each action has a type and associated data
30
+ */
31
+ export declare const _ActionSchema: z.ZodObject<{
32
+ action_type: z.ZodEnum<["then", "else"]>;
33
+ action_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ action_type: "then" | "else";
36
+ action_data?: Record<string, any> | undefined;
37
+ }, {
38
+ action_type: "then" | "else";
39
+ action_data?: Record<string, any> | undefined;
40
+ }>;
41
+ /**
42
+ * Create rule schema - supports both flat and hierarchical conditions
43
+ */
2
44
  export declare const _CreateRuleSchema: z.ZodObject<{
3
- cid: z.ZodString;
45
+ rule_set_id: z.ZodString;
46
+ cid: z.ZodOptional<z.ZodString>;
47
+ tid: z.ZodOptional<z.ZodString>;
4
48
  priority: z.ZodDefault<z.ZodNumber>;
5
- conditions: z.ZodOptional<z.ZodAny>;
6
- actions: z.ZodOptional<z.ZodAny>;
49
+ conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
50
+ type: z.ZodEnum<["bool", "numeric", "string", "array", "datetime"]>;
51
+ name: z.ZodString;
52
+ operator: z.ZodString;
53
+ value: z.ZodOptional<z.ZodAny>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ name: string;
56
+ type: "string" | "numeric" | "array" | "datetime" | "bool";
57
+ operator: string;
58
+ value?: any;
59
+ }, {
60
+ name: string;
61
+ type: "string" | "numeric" | "array" | "datetime" | "bool";
62
+ operator: string;
63
+ value?: any;
64
+ }>, "many">>;
65
+ conditionGroups: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
66
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
67
+ action_type: z.ZodEnum<["then", "else"]>;
68
+ action_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
69
+ }, "strip", z.ZodTypeAny, {
70
+ action_type: "then" | "else";
71
+ action_data?: Record<string, any> | undefined;
72
+ }, {
73
+ action_type: "then" | "else";
74
+ action_data?: Record<string, any> | undefined;
75
+ }>, "many">>;
7
76
  }, "strip", z.ZodTypeAny, {
8
- cid: string;
77
+ rule_set_id: string;
9
78
  priority: number;
10
- actions?: any;
11
- conditions?: any;
79
+ tid?: string | undefined;
80
+ cid?: string | undefined;
81
+ actions?: {
82
+ action_type: "then" | "else";
83
+ action_data?: Record<string, any> | undefined;
84
+ }[] | undefined;
85
+ conditions?: {
86
+ name: string;
87
+ type: "string" | "numeric" | "array" | "datetime" | "bool";
88
+ operator: string;
89
+ value?: any;
90
+ }[] | undefined;
91
+ conditionGroups?: any[] | undefined;
12
92
  }, {
13
- cid: string;
14
- actions?: any;
93
+ rule_set_id: string;
94
+ tid?: string | undefined;
95
+ cid?: string | undefined;
96
+ actions?: {
97
+ action_type: "then" | "else";
98
+ action_data?: Record<string, any> | undefined;
99
+ }[] | undefined;
100
+ conditions?: {
101
+ name: string;
102
+ type: "string" | "numeric" | "array" | "datetime" | "bool";
103
+ operator: string;
104
+ value?: any;
105
+ }[] | undefined;
15
106
  priority?: number | undefined;
16
- conditions?: any;
107
+ conditionGroups?: any[] | undefined;
17
108
  }>;
109
+ /**
110
+ * Upsert rule schema - for updates
111
+ */
18
112
  export declare const _RuleUpsertSchema: z.ZodObject<{
19
113
  id: z.ZodString;
20
114
  priority: z.ZodOptional<z.ZodNumber>;
21
- conditions: z.ZodOptional<z.ZodAny>;
22
- actions: z.ZodOptional<z.ZodAny>;
115
+ conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
116
+ type: z.ZodEnum<["bool", "numeric", "string", "array", "datetime"]>;
117
+ name: z.ZodString;
118
+ operator: z.ZodString;
119
+ value: z.ZodOptional<z.ZodAny>;
120
+ }, "strip", z.ZodTypeAny, {
121
+ name: string;
122
+ type: "string" | "numeric" | "array" | "datetime" | "bool";
123
+ operator: string;
124
+ value?: any;
125
+ }, {
126
+ name: string;
127
+ type: "string" | "numeric" | "array" | "datetime" | "bool";
128
+ operator: string;
129
+ value?: any;
130
+ }>, "many">>;
131
+ conditionGroups: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
132
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
133
+ action_type: z.ZodEnum<["then", "else"]>;
134
+ action_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ action_type: "then" | "else";
137
+ action_data?: Record<string, any> | undefined;
138
+ }, {
139
+ action_type: "then" | "else";
140
+ action_data?: Record<string, any> | undefined;
141
+ }>, "many">>;
142
+ rule_set_id: z.ZodOptional<z.ZodString>;
23
143
  }, "strip", z.ZodTypeAny, {
24
144
  id: string;
25
- actions?: any;
145
+ actions?: {
146
+ action_type: "then" | "else";
147
+ action_data?: Record<string, any> | undefined;
148
+ }[] | undefined;
149
+ conditions?: {
150
+ name: string;
151
+ type: "string" | "numeric" | "array" | "datetime" | "bool";
152
+ operator: string;
153
+ value?: any;
154
+ }[] | undefined;
155
+ rule_set_id?: string | undefined;
26
156
  priority?: number | undefined;
27
- conditions?: any;
157
+ conditionGroups?: any[] | undefined;
28
158
  }, {
29
159
  id: string;
30
- actions?: any;
160
+ actions?: {
161
+ action_type: "then" | "else";
162
+ action_data?: Record<string, any> | undefined;
163
+ }[] | undefined;
164
+ conditions?: {
165
+ name: string;
166
+ type: "string" | "numeric" | "array" | "datetime" | "bool";
167
+ operator: string;
168
+ value?: any;
169
+ }[] | undefined;
170
+ rule_set_id?: string | undefined;
31
171
  priority?: number | undefined;
32
- conditions?: any;
172
+ conditionGroups?: any[] | undefined;
33
173
  }>;
34
174
  export type CreateRuleDtoSchema = z.infer<typeof _CreateRuleSchema> & {
35
175
  tid: string;
176
+ rule_set_id: string;
36
177
  };
37
178
  export type RuleUpsertDtoSchema = z.infer<typeof _RuleUpsertSchema>;
179
+ export type FlatConditionSchema = z.infer<typeof _FlatConditionSchema>;
180
+ export type ConditionGroupSchema = z.infer<typeof _ConditionGroupSchema>;
181
+ export type ActionSchema = z.infer<typeof _ActionSchema>;
182
+ /**
183
+ * Leaf condition (single condition)
184
+ * e.g. { type: "string", name: "severity", operator: "equal_to", value: "CRITICAL" }
185
+ */
38
186
  export type CompiledLeafCondition = {
39
187
  type: string;
40
188
  name: string;
41
189
  operator: string;
42
190
  value: unknown;
43
191
  };
192
+ /**
193
+ * Composite condition (AND/OR grouping)
194
+ * e.g. { any: [...], all: [...] }
195
+ * Supports unlimited nesting
196
+ */
44
197
  export type CompiledCompositeCondition = {
45
198
  any?: CompiledConditionNode[];
46
199
  all?: CompiledConditionNode[];
47
200
  };
201
+ /**
202
+ * A condition node is either a leaf condition or composite group
203
+ * Recursive type supporting arbitrary nesting depth
204
+ */
48
205
  export type CompiledConditionNode = CompiledLeafCondition | CompiledCompositeCondition;
206
+ /**
207
+ * Action payload structure
208
+ * Each action has a type and arbitrary metadata
209
+ */
49
210
  export type CompiledActionData = {
50
211
  type: string;
51
212
  [key: string]: unknown;
@@ -57,13 +218,69 @@ export type CompiledActionData = {
57
218
  export type CompiledActions = {
58
219
  [action_type: string]: CompiledActionData[];
59
220
  };
60
- /** Compiled rule as produced by compileRulesToJson */
221
+ /**
222
+ * Compiled rule as produced by compileRulesToJson()
223
+ * This is what RulesEngine.execute() receives
224
+ */
61
225
  export type CompiledRule = {
226
+ id: string;
62
227
  priority: number;
63
228
  conditions: CompiledConditionNode | null;
64
229
  actions: CompiledActions;
65
230
  };
231
+ /**
232
+ * Result type for getRuleSetByRuleIds()
233
+ * Maps rule ID to its compiled ruleset
234
+ */
66
235
  export type RuleSetByIdResult = {
67
236
  ruleId: string;
68
237
  ruleSet: CompiledRule[];
69
238
  };
239
+ /**
240
+ * Database representation of a condition group (hierarchical storage)
241
+ * NOT used by RulesEngine - only internal storage
242
+ */
243
+ export type ConditionGroupEntity = {
244
+ id: string;
245
+ rule_id: string;
246
+ parent_group_id: string | null;
247
+ behavior: 'any' | 'all';
248
+ sort_order: number;
249
+ conditions?: FlatConditionSchema[];
250
+ childGroups?: ConditionGroupEntity[];
251
+ };
252
+ /**
253
+ * Database representation of a condition (flat storage)
254
+ * Can be used standalone (legacy) or within a ConditionGroup (new)
255
+ */
256
+ export type ConditionEntity = {
257
+ id: string;
258
+ rule_id: string;
259
+ condition_group_id?: string | null;
260
+ type: string;
261
+ name: string;
262
+ operator: string;
263
+ value: unknown;
264
+ };
265
+ /**
266
+ * Compilation flow:
267
+ *
268
+ * Database Layer:
269
+ * Rule.conditionGroups: ConditionGroupEntity[] (hierarchical)
270
+ * Rule.conditions: ConditionEntity[] (flat - legacy fallback)
271
+ *
272
+ * ↓ RuleService.compileRulesToJson()
273
+ *
274
+ * Compilation Layer:
275
+ * buildConditionsFromGroups(conditionGroups, conditions)
276
+ * - If conditionGroups exist: recursively build tree via buildGroupNode()
277
+ * - If empty: fallback to flat conditions
278
+ * buildActions() wraps in array-of-arrays
279
+ *
280
+ * ↓ Returns CompiledRule[]
281
+ *
282
+ * RulesEngine Layer:
283
+ * RulesEngine.execute(compiledRules, input)
284
+ * - Processes CompiledConditionNode (any/all nested structure)
285
+ * - Actions are array of arrays: `response.then.push(...rule.actions.then)`
286
+ */
@@ -1,18 +1,80 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._RuleUpsertSchema = exports._CreateRuleSchema = void 0;
3
+ exports._RuleUpsertSchema = exports._CreateRuleSchema = exports._ActionSchema = exports._ConditionGroupSchema = exports._FlatConditionSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- /* ─── Create / Upsert Schemas ──── */
5
+ /* ─── Database Input Schemas (Create / Upsert) ──── */
6
+ /**
7
+ * Flat condition format (backward compatible)
8
+ * Used when submitting simple or flat conditions
9
+ */
10
+ exports._FlatConditionSchema = zod_1.z.object({
11
+ type: zod_1.z.enum(['bool', 'numeric', 'string', 'array', 'datetime']),
12
+ name: zod_1.z.string(),
13
+ operator: zod_1.z.string(),
14
+ value: zod_1.z.any().optional(),
15
+ });
16
+ /**
17
+ * Hierarchical condition group format (new)
18
+ * Supports nested AND/OR logic with unlimited depth
19
+ */
20
+ exports._ConditionGroupSchema = zod_1.z.lazy(() => zod_1.z.object({
21
+ id: zod_1.z.string().optional(),
22
+ behavior: zod_1.z.enum(['any', 'all']),
23
+ sort_order: zod_1.z.number().default(0),
24
+ conditions: zod_1.z.array(exports._FlatConditionSchema).optional(),
25
+ childGroups: zod_1.z.array(exports._ConditionGroupSchema).optional(),
26
+ }));
27
+ /**
28
+ * Action format
29
+ * Each action has a type and associated data
30
+ */
31
+ exports._ActionSchema = zod_1.z.object({
32
+ action_type: zod_1.z.enum(['then', 'else']),
33
+ action_data: zod_1.z.record(zod_1.z.any()).optional(),
34
+ });
35
+ /**
36
+ * Create rule schema - supports both flat and hierarchical conditions
37
+ */
6
38
  exports._CreateRuleSchema = zod_1.z.object({
7
- cid: zod_1.z.string(),
39
+ rule_set_id: zod_1.z.string(),
40
+ cid: zod_1.z.string().optional(),
41
+ tid: zod_1.z.string().optional(),
8
42
  priority: zod_1.z.number().default(0),
9
- conditions: zod_1.z.any().optional(),
10
- actions: zod_1.z.any().optional(),
43
+ conditions: zod_1.z.array(exports._FlatConditionSchema).optional(),
44
+ conditionGroups: zod_1.z.array(exports._ConditionGroupSchema).optional(),
45
+ actions: zod_1.z.array(exports._ActionSchema).optional(),
11
46
  });
47
+ /**
48
+ * Upsert rule schema - for updates
49
+ */
12
50
  exports._RuleUpsertSchema = zod_1.z.object({
13
51
  id: zod_1.z.string(),
14
52
  priority: zod_1.z.number().optional(),
15
- conditions: zod_1.z.any().optional(),
16
- actions: zod_1.z.any().optional(),
53
+ conditions: zod_1.z.array(exports._FlatConditionSchema).optional(),
54
+ conditionGroups: zod_1.z.array(exports._ConditionGroupSchema).optional(),
55
+ actions: zod_1.z.array(exports._ActionSchema).optional(),
56
+ rule_set_id: zod_1.z.string().optional(),
17
57
  });
58
+ /**
59
+ * Compilation flow:
60
+ *
61
+ * Database Layer:
62
+ * Rule.conditionGroups: ConditionGroupEntity[] (hierarchical)
63
+ * Rule.conditions: ConditionEntity[] (flat - legacy fallback)
64
+ *
65
+ * ↓ RuleService.compileRulesToJson()
66
+ *
67
+ * Compilation Layer:
68
+ * buildConditionsFromGroups(conditionGroups, conditions)
69
+ * - If conditionGroups exist: recursively build tree via buildGroupNode()
70
+ * - If empty: fallback to flat conditions
71
+ * buildActions() wraps in array-of-arrays
72
+ *
73
+ * ↓ Returns CompiledRule[]
74
+ *
75
+ * RulesEngine Layer:
76
+ * RulesEngine.execute(compiledRules, input)
77
+ * - Processes CompiledConditionNode (any/all nested structure)
78
+ * - Actions are array of arrays: `response.then.push(...rule.actions.then)`
79
+ */
18
80
  //# sourceMappingURL=rules.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rules.dto.js","sourceRoot":"","sources":["../../../src/dto/rules.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAEtB,sCAAsC;AACzB,QAAA,iBA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EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,4BAAoB,CAAC,CAAC,QAAQ,EAAE;IACpD,eAAe,EAAE,OAAC,CAAC,KAAK,CAAC,6BAAqB,CAAC,CAAC,QAAQ,EAAE;IAC1D,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,qBAAa,CAAC,CAAC,QAAQ,EAAE;IAC1C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC;AAoHH;;;;;;;;;;;;;;;;;;;;;GAqBG"}
@@ -1,5 +1,5 @@
1
1
  import { ActionExecutionDto, AssetDto, CustomScoreCohortDto, CustomScoreCohortUpsertDto, CustomScoreValueDto, CustomScoreValueUpsertDto, FindingSpecDto, FindingSpecUpsertDto, ProviderDto, ReportResultDto, SaasAssetDto, SaasComponentDto, SaasUserDto, TenantDto, TenantUpsertDto, TokenDto, UserDto } from '../dto';
2
- import { AmpEntityService, AmpDataService, AmpReportService, AmpSettingsService, ConnectorsService, FindingsInsightsService, FindingsService, NotificationService, PredictionService, CustomActionsService } from '.';
2
+ import { AmpEntityService, AmpDataService, AmpReportService, AmpSettingsService, ConnectorsService, FindingsInsightsService, FindingsService, NotificationService, PredictionService, CustomActionsService, RulesService } from '.';
3
3
  import { AmpRestClientOptions, AgentIdentityService, ConnectorInstallService, EnumService, RestClient } from './rest';
4
4
  import { UsersInsightsService } from './usersInsights.service';
5
5
  import { FlowSpecsService } from './flowSpecs.service';
@@ -10,6 +10,7 @@ import { TrainingsService } from './trainings.service';
10
10
  import { AnalyticsService } from './analytics.service';
11
11
  import { EngagementLogsService } from './engagementLogs.service';
12
12
  import { ConnectorReadinessService } from './connectorReadiness.service';
13
+ import { AmpSdkTagSpecsService } from './tagSpecs.service';
13
14
  export type AmpApiOptions = AmpRestClientOptions;
14
15
  /**
15
16
  * AMP API
@@ -45,9 +46,11 @@ export declare class AmpApi {
45
46
  readonly providers: AmpDataService<ProviderDto>;
46
47
  readonly reportResults: AmpDataService<ReportResultDto>;
47
48
  readonly reports: AmpReportService;
49
+ readonly rules: RulesService;
48
50
  readonly saasAssets: AmpDataService<SaasAssetDto>;
49
51
  readonly saasComponents: AmpDataService<SaasComponentDto>;
50
52
  readonly saasUsers: AmpDataService<SaasUserDto>;
53
+ readonly tagSpecsService: AmpSdkTagSpecsService;
51
54
  readonly settings: AmpSettingsService;
52
55
  readonly tenants: AmpEntityService<TenantUpsertDto, TenantDto>;
53
56
  readonly tokens: AmpDataService<TokenDto>;
@@ -13,6 +13,7 @@ const trainings_service_1 = require("./trainings.service");
13
13
  const analytics_service_1 = require("./analytics.service");
14
14
  const engagementLogs_service_1 = require("./engagementLogs.service");
15
15
  const connectorReadiness_service_1 = require("./connectorReadiness.service");
16
+ const tagSpecs_service_1 = require("./tagSpecs.service");
16
17
  /**
17
18
  * AMP API
18
19
  * This client is a wrapper around the AMP REST API meant to be used by
@@ -50,9 +51,12 @@ class AmpApi {
50
51
  this.providers = new _1.AmpDataServiceImpl(rest, constants_1.KIND.PROVIDERS);
51
52
  this.reportResults = new _1.AmpDataServiceImpl(rest, constants_1.KIND.REPORT_RESULTS);
52
53
  this.reports = new _1.AmpReportServiceImpl(rest);
54
+ this.rules = new _1.RulesService(rest, constants_1.KIND.RULES, constants_1.TARGET_API_AGENT);
53
55
  this.saasAssets = new _1.AmpDataServiceImpl(rest, constants_1.KIND.SAAS_ASSETS);
54
56
  this.saasComponents = new _1.AmpDataServiceImpl(rest, constants_1.KIND.SAAS_COMPONENTS);
55
57
  this.saasUsers = new _1.AmpDataServiceImpl(rest, constants_1.KIND.SAAS_USERS);
58
+ //this.tagSpecsService = new TagSpecsService(rest, KIND.TAG_SPECS, TARGET_API_AGENT);
59
+ this.tagSpecsService = new tagSpecs_service_1.AmpSdkTagSpecsService(rest, constants_1.KIND.TAG_SPECS, constants_1.TARGET_API_AGENT);
56
60
  this.settings = new _1.AmpSettingsService(rest);
57
61
  this.tenants = new _1.AmpEntityServiceImpl(rest, constants_1.KIND.TENANTS);
58
62
  this.tokens = new _1.AmpDataServiceImpl(rest, constants_1.KIND.TOKENS);
@@ -1 +1 @@
1
- {"version":3,"file":"AmpApi.js","sourceRoot":"","sources":["../../../src/services/AmpApi.ts"],"names":[],"mappings":";;;AAmBA,wBAcW;AACX,2CAAmD;AACnD,iCAA0J;AAC1J,mEAA6D;AAC7D,2DAAqD;AACrD,wDAAmD;AACnD,mDAA8C;AAC9C,+DAAwD;AACxD,2DAAqD;AACrD,2DAAqD;AACrD,qEAA+D;AAC/D,6EAAuE;AAIvE;;;;;;;;;;;GAWG;AACH,MAAa,MAAM;IAmCjB,YAAY,IAAgB;QAC1B,IAAI,CAAC,gBAAgB,GAAG,IAAI,qBAAkB,CAAqB,IAAI,EAAE,gBAAI,CAAC,gBAAgB,CAAC,CAAC;QAChG,IAAI,CAAC,MAAM,GAAG,IAAI,6BAAa,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAkB,CAAW,IAAI,EAAE,gBAAI,CAAC,MAAM,CAAC,CAAC;QACjE,IAAI,CAAC,OAAO,GAAG,IAAI,6BAAa,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAiB,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,kBAAkB,GAAG,IAAI,sDAAyB,CAAC,IAAI,CAAC,CAAC;QAC9D,IAAI,CAAC,aAAa,GAAG,IAAI,uBAAoB,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,kBAAkB,GAAG,IAAI,uBAAoB,CAAmD,IAAI,EAAE,gBAAI,CAAC,oBAAoB,CAAC,CAAC;QACtI,IAAI,CAAC,iBAAiB,GAAG,IAAI,uBAAoB,CAAiD,IAAI,EAAE,gBAAI,CAAC,mBAAmB,CAAC,CAAC;QAClI,IAAI,CAAC,WAAW,GAAG,IAAI,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OAAO,GAAG,IAAI,uBAAoB,CAA6B,IAAI,EAAE,gBAAI,CAAC,OAAO,CAAC,CAAC;QACxF,IAAI,CAAC,MAAM,GAAG,IAAI,qBAAkB,CAAW,IAAI,EAAE,gBAAI,CAAC,MAAM,CAAC,CAAC;QAClE,IAAI,CAAC,SAAS,GAAG,IAAI,oCAAgB,CAAC,IAAI,EAAE,gBAAI,CAAC,SAAS,CAAC,CAAC;QAC5D,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;AAhFD,wBAgFC"}
@@ -64,7 +64,7 @@ class AmpSdkServices {
64
64
  this.stagedSaaSComponents = new entity_service_1.TruncatableAmpEntityServiceImpl(rest, constants_1.KIND.STAGED_SAAS_COMPONENTS, constants_1.TARGET_API_PLATFORM);
65
65
  this.stagedSaaSUsers = new entity_service_1.TruncatableAmpEntityServiceImpl(rest, constants_1.KIND.STAGED_SAAS_USERS, constants_1.TARGET_API_PLATFORM);
66
66
  this.settings = new settings_service_1.AmpSdkSettingsService(rest);
67
- this.tagSpecs = new tagSpecs_service_1.AmpSdkTagSpecsService(rest);
67
+ this.tagSpecs = new tagSpecs_service_1.AmpSdkTagSpecsService(rest, constants_1.KIND.TAG_SPECS, constants_1.TARGET_API_AGENT);
68
68
  this.tenants = new TenantsService_1.TenantsService(rest, constants_1.TARGET_API_PLATFORM);
69
69
  this.tenantNotes = new entity_service_1.TenantNotesService(rest, constants_1.TARGET_API_PLATFORM);
70
70
  this.tokens = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.TOKENS, constants_1.TARGET_API_PLATFORM);
@@ -1 +1 @@
1
- {"version":3,"file":"AmpSdk.js","sourceRoot":"","sources":["../../../src/services/AmpSdk.ts"],"names":[],"mappings":";;;AAkDA,qDAS0B;AAC1B,qFAA4E;AAC5E,iCAA0E;AAC1E,2CAAsD;AACtD,oDAAmE;AACnE,yDAAyD;AACzD,6DAA+J;AAC/J,6DAAuD;AACvD,yEAAmE;AACnE,6EAAsE;AACtE,mDAAqD;AACrD,0DAAqD;AACrD,yDAAmD;AACnD,+DAAwD;AACxD,yDAAyD;AACzD,iEAAiE;AACjE,mDAA6C;AAI7C;;;;;;;;GAQG;AACH,MAAa,cAAc;IA4CzB,YAAY,IAAgB;QAC1B,IAAI,CAAC,gBAAgB,GAAG,IAAI,qCAAoB,CAA+D,IAAI,EAAE,gBAAI,CAAC,gBAAgB,EAAE,+BAAmB,CAAC,CAAC;QACjK,IAAI,CAAC,MAAM,GAAG,IAAI,oCAAoB,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,KAAK,GAAG,IAAI,mCAAkB,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;QAC/D,IAAI,CAAC,UAAU,GAAG,IAAI,qDAAwB,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,cAAc,GAAG,IAAI,qCAAoB,CAA2D,IAAI,EAAE,gBAAI,CAAC,eAAe,EAAE,+BAAmB,CAAC,CAAC;QAC1J,IAAI,CAAC,UAAU,GAAG,IAAI,sCAAiB,EAAE,CAAC;QAC1C,IAAI,CAAC,aAAa,GAAG,IAAI,2DAA0B,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAI,CAAC,aAAa,GAAG,IAAI,qCAAoB,CAAyD,IAAI,EAAE,gBAAI,CAAC,YAAY,EAAE,+BAAmB,CAAC,CAAC;QACpJ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E1K,IAAI,CAAC,QAAQ,GAAG,IAAI,wCAAqB,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,QAAQ,GAAG,IAAI,wCAAqB,CAAC,IAAI,EAAE,gBAAI,CAAC,SAAS,EAAE,4BAAgB,CAAC,CAAC;QAClF,IAAI,CAAC,OAAO,GAAG,IAAI,+BAAc,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;QAC7D,IAAI,CAAC,WAAW,GAAG,IAAI,mCAAkB,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;QACrE,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;QAC9D,IAAI,CAAC,gBAAgB,GAAG,IAAI,qCAAoB,CAA+D,IAAI,EAAE,gBAAI,CAAC,iBAAiB,EAAE,+BAAmB,CAAC,CAAC;QAClK,IAAI,CAAC,oBAAoB,GAAG,IAAI,qCAAoB,CAClD,IAAI,EACJ,gBAAI,CAAC,qBAAqB,EAC1B,+BAAmB,CACpB,CAAC;IACJ,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;AA3GD,wCA2GC"}
@@ -1,8 +1,22 @@
1
- import { RestClient } from './rest';
2
- import { TagSpecDto, TagSpecWithRuleSetDto } from '../dto/tagSpecs.dto';
1
+ import { RestClient, RestResponse } from './rest';
2
+ import { TagSpecDto, TagSpecUpsertDto, TagSpecWithRuleSetDto } from '../dto/tagSpecs.dto';
3
+ import { TargetApi } from './constants';
4
+ import { FilterCriteria } from '../FilterCriteria';
3
5
  export declare class AmpSdkTagSpecsService {
4
6
  protected readonly rest: RestClient;
5
- constructor(rest: RestClient);
7
+ protected readonly targetApi: string;
8
+ protected readonly kind: string;
9
+ constructor(rest: RestClient, kind?: string, targetApi?: TargetApi);
6
10
  listByTenant(tid: string): Promise<TagSpecWithRuleSetDto[]>;
7
11
  getById(id: string): Promise<TagSpecDto>;
12
+ create(dto: TagSpecUpsertDto): Promise<RestResponse>;
13
+ update(id: string, dto: TagSpecUpsertDto): Promise<RestResponse>;
14
+ get(id: string): Promise<RestResponse>;
15
+ listWithRules(params: {
16
+ tid?: string;
17
+ limit?: number;
18
+ offset?: number;
19
+ }): Promise<RestResponse>;
20
+ list(params: FilterCriteria): Promise<RestResponse>;
21
+ delete(id: string): Promise<RestResponse>;
8
22
  }
@@ -4,8 +4,10 @@ exports.AmpSdkTagSpecsService = void 0;
4
4
  const constants_1 = require("./constants");
5
5
  const TAG_SPECS_PAGE_SIZE = 250;
6
6
  class AmpSdkTagSpecsService {
7
- constructor(rest) {
7
+ constructor(rest, kind, targetApi) {
8
8
  this.rest = rest;
9
+ this.kind = kind || constants_1.KIND.TAG_SPECS;
10
+ this.targetApi = targetApi || 'platform';
9
11
  }
10
12
  async listByTenant(tid) {
11
13
  var _a, _b;
@@ -37,6 +39,50 @@ class AmpSdkTagSpecsService {
37
39
  });
38
40
  return res.data;
39
41
  }
42
+ async create(dto) {
43
+ return await this.rest.call({
44
+ url: `/${this.targetApi}/v1/${this.kind}`,
45
+ method: 'POST',
46
+ data: dto,
47
+ });
48
+ }
49
+ async update(id, dto) {
50
+ return await this.rest.call({
51
+ url: `/${this.targetApi}/v1/${this.kind}/${id}`,
52
+ method: 'PUT',
53
+ data: dto,
54
+ });
55
+ }
56
+ async get(id) {
57
+ return await this.rest.call({
58
+ url: `/${this.targetApi}/v1/${this.kind}/${id}`,
59
+ method: 'GET',
60
+ });
61
+ }
62
+ async listWithRules(params) {
63
+ const queryParams = {
64
+ limit: 200,
65
+ ...params,
66
+ };
67
+ return await this.rest.call({
68
+ url: `/${this.targetApi}/v1/${this.kind}/with-rules`,
69
+ method: 'GET',
70
+ params: queryParams,
71
+ });
72
+ }
73
+ async list(params) {
74
+ return await this.rest.call({
75
+ url: `/${this.targetApi}/v1/${this.kind}`,
76
+ method: 'GET',
77
+ params,
78
+ });
79
+ }
80
+ async delete(id) {
81
+ return await this.rest.call({
82
+ url: `/${this.targetApi}/v1/${this.kind}/${id}`,
83
+ method: 'DELETE',
84
+ });
85
+ }
40
86
  }
41
87
  exports.AmpSdkTagSpecsService = AmpSdkTagSpecsService;
42
88
  //# sourceMappingURL=tagSpecs.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tagSpecs.service.js","sourceRoot":"","sources":["../../../src/services/tagSpecs.service.ts"],"names":[],"mappings":";;;AAGA,2CAAiC;AAGjC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,MAAa,qBAAqB;IAGhC,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,GAAW;;QAC5B,MAAM,WAAW,GAA4B,EAAE,CAAC;QAEhD,IAAI,MAAM,GAAG,CAAC,CAAC;QACf,MAAM,KAAK,GAAG,mBAAmB,CAAC;QAClC,IAAI,OAAO,GAAG,IAAI,CAAC;QAEnB,OAAO,OAAO,EAAE,CAAC;YACf,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC/B,GAAG,EAAE,gBAAgB,gBAAI,CAAC,SAAS,EAAE;gBACrC,MAAM,EAAE,KAAK;gBACb,MAAM,EAAE;oBACN,GAAG;oBACH,KAAK;oBACL,MAAM;iBACP;aACF,CAAC,CAAC;YAEH,MAAM,IAAI,GAAG,GAAG,CAAC,IAAmC,CAAC;YAErD,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;YAE/B,MAAM,IAAI,KAAK,CAAC;YAChB,OAAO,GAAG,MAAA,MAA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IAED,KAAK,CAAC,aAAa,CAAC,MAAuD;QACzE,MAAM,WAAW,GAA4B;YAC3C,KAAK,EAAE,GAAG;YACV,GAAG,MAAM;SACV,CAAC;QAEF,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1B,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,aAAa;YACpD,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,WAAW;SACpB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,MAAsB;QAC/B,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1B,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,EAAE;YACzC,MAAM,EAAE,KAAK;YACb,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1B,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE;YAC/C,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;IACL,CAAC;CACF;AAnGD,sDAmGC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "87.3.0",
3
+ "version": "87.5.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -92,6 +92,8 @@ export const _FlowStateDto = _BaseDto.extend({
92
92
  .object({
93
93
  overrideWorkingHours: z.boolean().default(false).optional(),
94
94
  engagementTriggerSource: z.nativeEnum(ENGAGEMENT_TRIGGER_SOURCE).optional(),
95
+ /** Temporal workflow id for the schedule-resolution manager workflow (reminder suppression). */
96
+ scheduleResolutionWorkflowId: z.string().optional(),
95
97
  })
96
98
  .nullish(),
97
99
  });
@@ -192,6 +194,7 @@ const _FlowActionDetails = z.object({
192
194
  actionId: z.string().nullable(),
193
195
  findingStatus: z.nativeEnum(FindingStatus).optional().nullable(),
194
196
  responseMessage: z.string().optional(),
197
+ actionDescriptionContext: z.string().optional(),
195
198
  });
196
199
 
197
200
  export const _FlowActions = z.object({
package/src/dto/index.ts CHANGED
@@ -33,6 +33,7 @@ export * from './providers.dto';
33
33
  export * from './reportResults.dto';
34
34
  export * from './riskContributors.dto';
35
35
  export * from './rules.dto';
36
+ export * from './ruleSet.dto';
36
37
  export * from './saasAssets.dto';
37
38
  export * from './saasComponents.dto';
38
39
  export * from './saasUsers.dto';
@@ -0,0 +1,19 @@
1
+ import {z} from 'zod';
2
+
3
+ export const RULESET_CREATE_SCHEMA = z.object({
4
+ tid: z.string().optional(),
5
+ cid: z.string().optional().nullable(),
6
+ name: z.string(),
7
+ description: z.string().optional().nullable(),
8
+ is_default: z.boolean().default(false),
9
+ });
10
+
11
+ export const RULESET_UPDATE_SCHEMA = z.object({
12
+ name: z.string().optional(),
13
+ description: z.string().optional().nullable(),
14
+ is_default: z.boolean().optional(),
15
+ cid: z.string().optional().nullable(),
16
+ });
17
+
18
+ export type RuleSetCreateDto = z.infer<typeof RULESET_CREATE_SCHEMA>;
19
+ export type RuleSetUpdateDto = z.infer<typeof RULESET_UPDATE_SCHEMA>;