@ampsec/platform-client 60.0.0 → 61.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.
@@ -47,13 +47,13 @@ export declare const _SaasUserMeta: z.ZodObject<{
47
47
  name?: string | undefined;
48
48
  email?: string | undefined;
49
49
  }>>;
50
- /** User's status */
51
- status: z.ZodNativeEnum<typeof GlobalUserType>;
50
+ /** User's type */
51
+ userType: z.ZodNativeEnum<typeof GlobalUserType>;
52
52
  }, "strip", z.ZodTypeAny, {
53
53
  email: string;
54
- status: GlobalUserType;
55
54
  firstName: string;
56
55
  lastName: string;
56
+ userType: GlobalUserType;
57
57
  title?: string | undefined;
58
58
  department?: string | undefined;
59
59
  organization?: string | undefined;
@@ -66,9 +66,9 @@ export declare const _SaasUserMeta: z.ZodObject<{
66
66
  } | undefined;
67
67
  }, {
68
68
  email: string;
69
- status: GlobalUserType;
70
69
  firstName: string;
71
70
  lastName: string;
71
+ userType: GlobalUserType;
72
72
  title?: string | undefined;
73
73
  department?: string | undefined;
74
74
  organization?: string | undefined;
@@ -83,9 +83,9 @@ export declare const _SaasUserMeta: z.ZodObject<{
83
83
  }, "strip", z.ZodTypeAny, {
84
84
  profile: {
85
85
  email: string;
86
- status: GlobalUserType;
87
86
  firstName: string;
88
87
  lastName: string;
88
+ userType: GlobalUserType;
89
89
  title?: string | undefined;
90
90
  department?: string | undefined;
91
91
  organization?: string | undefined;
@@ -105,9 +105,9 @@ export declare const _SaasUserMeta: z.ZodObject<{
105
105
  }, {
106
106
  profile: {
107
107
  email: string;
108
- status: GlobalUserType;
109
108
  firstName: string;
110
109
  lastName: string;
110
+ userType: GlobalUserType;
111
111
  title?: string | undefined;
112
112
  department?: string | undefined;
113
113
  organization?: string | undefined;
@@ -130,9 +130,9 @@ export declare const _SaasUserMeta: z.ZodObject<{
130
130
  _user: {
131
131
  profile: {
132
132
  email: string;
133
- status: GlobalUserType;
134
133
  firstName: string;
135
134
  lastName: string;
135
+ userType: GlobalUserType;
136
136
  title?: string | undefined;
137
137
  department?: string | undefined;
138
138
  organization?: string | undefined;
@@ -155,9 +155,9 @@ export declare const _SaasUserMeta: z.ZodObject<{
155
155
  _user: {
156
156
  profile: {
157
157
  email: string;
158
- status: GlobalUserType;
159
158
  firstName: string;
160
159
  lastName: string;
160
+ userType: GlobalUserType;
161
161
  title?: string | undefined;
162
162
  department?: string | undefined;
163
163
  organization?: string | undefined;
@@ -235,13 +235,13 @@ export declare const _SaasUserUpsertDto: z.ZodObject<{
235
235
  name?: string | undefined;
236
236
  email?: string | undefined;
237
237
  }>>;
238
- /** User's status */
239
- status: z.ZodNativeEnum<typeof GlobalUserType>;
238
+ /** User's type */
239
+ userType: z.ZodNativeEnum<typeof GlobalUserType>;
240
240
  }, "strip", z.ZodTypeAny, {
241
241
  email: string;
242
- status: GlobalUserType;
243
242
  firstName: string;
244
243
  lastName: string;
244
+ userType: GlobalUserType;
245
245
  title?: string | undefined;
246
246
  department?: string | undefined;
247
247
  organization?: string | undefined;
@@ -254,9 +254,9 @@ export declare const _SaasUserUpsertDto: z.ZodObject<{
254
254
  } | undefined;
255
255
  }, {
256
256
  email: string;
257
- status: GlobalUserType;
258
257
  firstName: string;
259
258
  lastName: string;
259
+ userType: GlobalUserType;
260
260
  title?: string | undefined;
261
261
  department?: string | undefined;
262
262
  organization?: string | undefined;
@@ -271,9 +271,9 @@ export declare const _SaasUserUpsertDto: z.ZodObject<{
271
271
  }, "strip", z.ZodTypeAny, {
272
272
  profile: {
273
273
  email: string;
274
- status: GlobalUserType;
275
274
  firstName: string;
276
275
  lastName: string;
276
+ userType: GlobalUserType;
277
277
  title?: string | undefined;
278
278
  department?: string | undefined;
279
279
  organization?: string | undefined;
@@ -293,9 +293,9 @@ export declare const _SaasUserUpsertDto: z.ZodObject<{
293
293
  }, {
294
294
  profile: {
295
295
  email: string;
296
- status: GlobalUserType;
297
296
  firstName: string;
298
297
  lastName: string;
298
+ userType: GlobalUserType;
299
299
  title?: string | undefined;
300
300
  department?: string | undefined;
301
301
  organization?: string | undefined;
@@ -318,9 +318,9 @@ export declare const _SaasUserUpsertDto: z.ZodObject<{
318
318
  _user: {
319
319
  profile: {
320
320
  email: string;
321
- status: GlobalUserType;
322
321
  firstName: string;
323
322
  lastName: string;
323
+ userType: GlobalUserType;
324
324
  title?: string | undefined;
325
325
  department?: string | undefined;
326
326
  organization?: string | undefined;
@@ -343,9 +343,9 @@ export declare const _SaasUserUpsertDto: z.ZodObject<{
343
343
  _user: {
344
344
  profile: {
345
345
  email: string;
346
- status: GlobalUserType;
347
346
  firstName: string;
348
347
  lastName: string;
348
+ userType: GlobalUserType;
349
349
  title?: string | undefined;
350
350
  department?: string | undefined;
351
351
  organization?: string | undefined;
@@ -375,9 +375,9 @@ export declare const _SaasUserUpsertDto: z.ZodObject<{
375
375
  _user: {
376
376
  profile: {
377
377
  email: string;
378
- status: GlobalUserType;
379
378
  firstName: string;
380
379
  lastName: string;
380
+ userType: GlobalUserType;
381
381
  title?: string | undefined;
382
382
  department?: string | undefined;
383
383
  organization?: string | undefined;
@@ -411,9 +411,9 @@ export declare const _SaasUserUpsertDto: z.ZodObject<{
411
411
  _user: {
412
412
  profile: {
413
413
  email: string;
414
- status: GlobalUserType;
415
414
  firstName: string;
416
415
  lastName: string;
416
+ userType: GlobalUserType;
417
417
  title?: string | undefined;
418
418
  department?: string | undefined;
419
419
  organization?: string | undefined;
@@ -491,13 +491,13 @@ export declare const _SaasUserDto: z.ZodObject<{
491
491
  name?: string | undefined;
492
492
  email?: string | undefined;
493
493
  }>>;
494
- /** User's status */
495
- status: z.ZodNativeEnum<typeof GlobalUserType>;
494
+ /** User's type */
495
+ userType: z.ZodNativeEnum<typeof GlobalUserType>;
496
496
  }, "strip", z.ZodTypeAny, {
497
497
  email: string;
498
- status: GlobalUserType;
499
498
  firstName: string;
500
499
  lastName: string;
500
+ userType: GlobalUserType;
501
501
  title?: string | undefined;
502
502
  department?: string | undefined;
503
503
  organization?: string | undefined;
@@ -510,9 +510,9 @@ export declare const _SaasUserDto: z.ZodObject<{
510
510
  } | undefined;
511
511
  }, {
512
512
  email: string;
513
- status: GlobalUserType;
514
513
  firstName: string;
515
514
  lastName: string;
515
+ userType: GlobalUserType;
516
516
  title?: string | undefined;
517
517
  department?: string | undefined;
518
518
  organization?: string | undefined;
@@ -527,9 +527,9 @@ export declare const _SaasUserDto: z.ZodObject<{
527
527
  }, "strip", z.ZodTypeAny, {
528
528
  profile: {
529
529
  email: string;
530
- status: GlobalUserType;
531
530
  firstName: string;
532
531
  lastName: string;
532
+ userType: GlobalUserType;
533
533
  title?: string | undefined;
534
534
  department?: string | undefined;
535
535
  organization?: string | undefined;
@@ -549,9 +549,9 @@ export declare const _SaasUserDto: z.ZodObject<{
549
549
  }, {
550
550
  profile: {
551
551
  email: string;
552
- status: GlobalUserType;
553
552
  firstName: string;
554
553
  lastName: string;
554
+ userType: GlobalUserType;
555
555
  title?: string | undefined;
556
556
  department?: string | undefined;
557
557
  organization?: string | undefined;
@@ -574,9 +574,9 @@ export declare const _SaasUserDto: z.ZodObject<{
574
574
  _user: {
575
575
  profile: {
576
576
  email: string;
577
- status: GlobalUserType;
578
577
  firstName: string;
579
578
  lastName: string;
579
+ userType: GlobalUserType;
580
580
  title?: string | undefined;
581
581
  department?: string | undefined;
582
582
  organization?: string | undefined;
@@ -599,9 +599,9 @@ export declare const _SaasUserDto: z.ZodObject<{
599
599
  _user: {
600
600
  profile: {
601
601
  email: string;
602
- status: GlobalUserType;
603
602
  firstName: string;
604
603
  lastName: string;
604
+ userType: GlobalUserType;
605
605
  title?: string | undefined;
606
606
  department?: string | undefined;
607
607
  organization?: string | undefined;
@@ -640,9 +640,9 @@ export declare const _SaasUserDto: z.ZodObject<{
640
640
  _user: {
641
641
  profile: {
642
642
  email: string;
643
- status: GlobalUserType;
644
643
  firstName: string;
645
644
  lastName: string;
645
+ userType: GlobalUserType;
646
646
  title?: string | undefined;
647
647
  department?: string | undefined;
648
648
  organization?: string | undefined;
@@ -676,9 +676,9 @@ export declare const _SaasUserDto: z.ZodObject<{
676
676
  _user: {
677
677
  profile: {
678
678
  email: string;
679
- status: GlobalUserType;
680
679
  firstName: string;
681
680
  lastName: string;
681
+ userType: GlobalUserType;
682
682
  title?: string | undefined;
683
683
  department?: string | undefined;
684
684
  organization?: string | undefined;
@@ -45,8 +45,8 @@ exports._SaasUserMeta = zod_1.z.object({
45
45
  email: zod_1.z.string().optional(),
46
46
  })
47
47
  .optional(),
48
- /** User's status */
49
- status: zod_1.z.nativeEnum(enums_1.GlobalUserType),
48
+ /** User's type */
49
+ userType: zod_1.z.nativeEnum(enums_1.GlobalUserType),
50
50
  }),
51
51
  }),
52
52
  _raw: zod_1.z.unknown(),
@@ -1 +1 @@
1
- {"version":3,"file":"saasUsers.dto.js","sourceRoot":"","sources":["../../../src/dto/saasUsers.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAAkE;AAClE,mCAAuC;AAE1B,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC;QACd,4BAA4B;QAC5B,KAAK,EAAE,OAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;QAC7B,+BAA+B;QAC/B,MAAM,EAAE,OAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QACpD,yBAAyB;QACzB,OAAO,EAAE,OAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;QAC/B,gCAAgC;QAChC,gBAAgB,EAAE,OAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;QACxC,qBAAqB;QACrB,OAAO,EAAE,OAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAA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d,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,mBAAmB;IACnB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,qBAAqB;IACrB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,kBAAkB;IAClB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,wDAAwD;IACxD,IAAI,EAAE,qBAAa;CACpB,CAAC,CACH,CAAC;AAIW,QAAA,YAAY,GAAG,0BAAkB,CAAC,KAAK,CAAC,0BAAe,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "60.0.0",
3
+ "version": "61.1.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -94,9 +94,12 @@ export enum FlowSpecStatusKind {
94
94
  }
95
95
 
96
96
  const _FlowTrigger = z.object({
97
- key: z.string(),
98
- displayValue: z.string().optional(),
97
+ id: z.string(),
98
+ displayValue: z.string(),
99
+ cid: z.string().optional(),
100
+ eventType: z.string(),
99
101
  });
102
+
100
103
  export type FlowTrigger = z.infer<typeof _FlowTrigger>;
101
104
 
102
105
  const _FlowTriggerFilter = z.object({
@@ -105,7 +108,15 @@ const _FlowTriggerFilter = z.object({
105
108
  });
106
109
  export type FlowTriggerFilter = z.infer<typeof _FlowTriggerFilter>;
107
110
  const _FlowFilter = z.object({
108
- cohorts: z.array(z.unknown()),
111
+ cohorts: z.array(
112
+ z.object({
113
+ id: z.string(),
114
+ kind: z.enum(['ORGANIZATION', 'DEPARTMENT', 'USER', 'RISK_CONTRIBUTOR']),
115
+ displayValue: z.string(),
116
+ value: z.string(),
117
+ inclusive: z.boolean(),
118
+ })
119
+ ),
109
120
  custom: z.record(z.unknown()).optional(),
110
121
  });
111
122
  const _FlowTone = z.object({
@@ -122,6 +133,9 @@ export const _FlowActions = z.object({
122
133
  includeInstructions: z.boolean().optional(),
123
134
  // TODO instructions contact address???
124
135
  expirationActionId: z.string().optional(),
136
+ simpleTriageYesActId: z.string().optional(),
137
+ simpleTriageNoActId: z.string().optional(),
138
+ resolveNowActionId: z.string().optional(),
125
139
  });
126
140
  export type FlowActions = z.infer<typeof _FlowActions>;
127
141
  export const _FlowRewardsConfig = z.object({
@@ -150,6 +164,8 @@ export const _FlowSpecDto = _BaseDto.merge(
150
164
  reminderInterval: _FlowInterval.optional(),
151
165
  actions: _FlowActions.optional(),
152
166
  rewards: z.array(_FlowRewardsConfig).optional(),
167
+ customMessage: z.object({template: z.string(), append: z.boolean()}).optional(),
168
+ scheduleConfig: z.object({required: z.boolean()}).optional(),
153
169
  activity: z
154
170
  .object({
155
171
  lastTriggered: z.string().optional(),
@@ -28,11 +28,15 @@ export const _NotificationAddress = z.object({
28
28
  webhooks: z.array(z.string()).optional(),
29
29
  });
30
30
 
31
+ export const _FlowContextKey = z.enum(['TONE', 'ACTION_GET_INSTRUCTIONS_ENABLED']);
32
+ export const _FlowContext = z.record(_FlowContextKey, z.any());
33
+
31
34
  export const _RawContentStrategy = z.object({
32
35
  kind: z.literal(ContentStrategyKind.RAW),
33
36
  content: z.string(),
34
37
  subject: z.string().optional(),
35
38
  context: z.record(z.string()).optional(),
39
+ flowContext: _FlowContext.optional(),
36
40
  // TODO context: z.record(z.union([z.string(), z.number(), z.boolean(), z.null(), z.undefined()])).optional(),
37
41
  });
38
42
  export type RawContentStrategy = z.infer<typeof _RawContentStrategy>;
@@ -41,12 +45,14 @@ export const _TemplateContentStrategy = z.object({
41
45
  kind: z.literal(ContentStrategyKind.TEMPLATE),
42
46
  templateId: z.string(),
43
47
  context: z.record(z.string()),
48
+ flowContext: _FlowContext.optional(),
44
49
  });
45
50
  export type TemplateContentStrategy = z.infer<typeof _TemplateContentStrategy>;
46
51
 
47
52
  export const _FindingContentStrategy = z.object({
48
53
  kind: z.literal(ContentStrategyKind.FINDING),
49
54
  fid: z.string(),
55
+ flowContext: _FlowContext.optional(),
50
56
  });
51
57
  export type FindingContentStrategy = z.infer<typeof _FindingContentStrategy>;
52
58
 
@@ -36,7 +36,7 @@ export const NOOP_FLOW_SPEC: PlatformFlowSpecDto = {
36
36
  description: 'Used internally to drop trigger events',
37
37
  fslStrategy: 'STANDARD',
38
38
  triggerFilter: {
39
- trigger: [{key: 'noop', displayValue: 'NOOP'}],
39
+ trigger: [{id: '000000000000', displayValue: 'NOOP', eventType: ''}],
40
40
  },
41
41
  filter: {
42
42
  cohorts: [],
@@ -1,6 +1,39 @@
1
1
  import {z} from 'zod';
2
2
  import {_AssetKeys} from './assetKeys';
3
3
  import {_ChangeAwareDto, _ChangeAwareUpsertDto} from './base.dto';
4
+ import {GlobalAssetType} from './enums';
5
+
6
+ export const _SaasAssetMeta = z.object({
7
+ _asset: z.object({
8
+ /** Asset ID from provider */
9
+ extId: z.string(),
10
+ /** Asset type */
11
+ assetType: z.nativeEnum(GlobalAssetType),
12
+ /** Asset name */
13
+ deviceName: z.string().optional(),
14
+ /** Asset host name */
15
+ hostNames: z.array(z.string()),
16
+ // TODO: define kind values in enum when needed
17
+ // kind: z.string()
18
+ /** Last activity time of asset */
19
+ lastActivityTime: z.string().optional(),
20
+ /** Operating system of asset */
21
+ operatingSystems: z.array(
22
+ z.object({
23
+ displayValue: z.string(),
24
+ // TODO: define this when needed
25
+ // kind: enum,
26
+ })
27
+ ),
28
+ /** Asset serial number */
29
+ serialNumber: z.string().optional(),
30
+ /** Asset mac addresses */
31
+ macAddresses: z.array(z.string()).optional(),
32
+ }),
33
+ _raw: z.unknown(),
34
+ });
35
+
36
+ export type SaasAssetMeta = z.infer<typeof _SaasAssetMeta>;
4
37
 
5
38
  export const _SaasAssetUpsertDto = _ChangeAwareUpsertDto.merge(
6
39
  z.object({
@@ -15,7 +48,7 @@ export const _SaasAssetUpsertDto = _ChangeAwareUpsertDto.merge(
15
48
  /** Asset display value */
16
49
  displayValue: z.string(),
17
50
  /** Information specific to this asset */
18
- meta: z.unknown(),
51
+ meta: _SaasAssetMeta,
19
52
  })
20
53
  );
21
54
 
@@ -43,8 +43,8 @@ export const _SaasUserMeta = z.object({
43
43
  email: z.string().optional(),
44
44
  })
45
45
  .optional(),
46
- /** User's status */
47
- status: z.nativeEnum(GlobalUserType),
46
+ /** User's type */
47
+ userType: z.nativeEnum(GlobalUserType),
48
48
  }),
49
49
  }),
50
50
  _raw: z.unknown(),