@ampsec/platform-client 57.6.0 → 57.7.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.
@@ -39,13 +39,13 @@ export type DateMatcher = {
39
39
  export type SortOptions = {
40
40
  [key: string]: 'ASC' | 'DESC';
41
41
  };
42
- type AllCondition = {
43
- $and: FilterableCriteria[];
42
+ export type FC_AllCondition = {
43
+ $and: FC_FilterableCriteria[];
44
44
  };
45
- type AnyCondition = {
46
- $or: FilterableCriteria[];
45
+ export type FC_AnyCondition = {
46
+ $or: FC_FilterableCriteria[];
47
47
  };
48
- type FilterConstraints = {
48
+ export type FC_FilterConstraints = {
49
49
  /** Entity ID */
50
50
  id?: string | IdMatcher;
51
51
  /** Tenant ID */
@@ -69,8 +69,8 @@ type FilterConstraints = {
69
69
  /** catch all bucket for other fields */
70
70
  [key: string]: string | string[] | StringMatcher | number | NumberMatcher | boolean | null | undefined;
71
71
  };
72
- type FilterableCriteria = FilterConstraints | AllCondition | AnyCondition;
73
- export type FilterCriteria = FilterableCriteria & {
72
+ export type FC_FilterableCriteria = FC_FilterConstraints | FC_AllCondition | FC_AnyCondition;
73
+ export type FilterCriteria = FC_FilterableCriteria & {
74
74
  /** Number of records to return. */
75
75
  limit?: number;
76
76
  /** Number of records to skip before capturing results. */
@@ -1,6 +1,12 @@
1
1
  import { AssetKeys } from './assetKeys';
2
2
  import { ChangeAwareDto, ChangeAwareUpsertDto } from './base.dto';
3
3
  import { GlobalAssetType } from './enums/globalAsset.type';
4
+ export type SimpleAssetDto = {
5
+ /** Id of the asset */
6
+ id?: string;
7
+ /** Human readable name of the asset */
8
+ displayValue?: string;
9
+ };
4
10
  export type AssetUpsertDto = ChangeAwareUpsertDto & {
5
11
  /** External Keys */
6
12
  extKeys: AssetKeys;
@@ -1,3 +1,4 @@
1
+ import { SimpleAssetDto } from './assets.dto';
1
2
  import { BaseDto, BaseUpsertDto } from './base.dto';
2
3
  import { Category, FindingKind } from './enums';
3
4
  import { FindingOutcome, FindingSeverity, FindingStatus } from './enums';
@@ -32,6 +33,8 @@ export type FindingUpsertDto = BaseUpsertDto & {
32
33
  cid: string;
33
34
  /** Id of the provider to which the finding applies */
34
35
  pid: string;
36
+ /** Optionally populated when requested through query param `include=asset` */
37
+ asset?: SimpleAssetDto;
35
38
  /** Id of the asset to which the finding applies */
36
39
  aid?: string | undefined | null;
37
40
  /** Id of the user to which the finding applies */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "57.6.0",
3
+ "version": "57.7.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -42,15 +42,15 @@ export type SortOptions = {
42
42
  [key: string]: 'ASC' | 'DESC';
43
43
  };
44
44
 
45
- type AllCondition = {
46
- $and: FilterableCriteria[];
45
+ export type FC_AllCondition = {
46
+ $and: FC_FilterableCriteria[];
47
47
  };
48
48
 
49
- type AnyCondition = {
50
- $or: FilterableCriteria[];
49
+ export type FC_AnyCondition = {
50
+ $or: FC_FilterableCriteria[];
51
51
  };
52
52
 
53
- type FilterConstraints = {
53
+ export type FC_FilterConstraints = {
54
54
  /** Entity ID */
55
55
  id?: string | IdMatcher;
56
56
  /** Tenant ID */
@@ -75,9 +75,9 @@ type FilterConstraints = {
75
75
  [key: string]: string | string[] | StringMatcher | number | NumberMatcher | boolean | null | undefined;
76
76
  };
77
77
 
78
- type FilterableCriteria = FilterConstraints | AllCondition | AnyCondition;
78
+ export type FC_FilterableCriteria = FC_FilterConstraints | FC_AllCondition | FC_AnyCondition;
79
79
 
80
- export type FilterCriteria = FilterableCriteria & {
80
+ export type FilterCriteria = FC_FilterableCriteria & {
81
81
  /** Number of records to return. */
82
82
  limit?: number;
83
83
  /** Number of records to skip before capturing results. */
@@ -2,6 +2,13 @@ import {AssetKeys} from './assetKeys';
2
2
  import {ChangeAwareDto, ChangeAwareUpsertDto} from './base.dto';
3
3
  import {GlobalAssetType} from './enums/globalAsset.type';
4
4
 
5
+ export type SimpleAssetDto = {
6
+ /** Id of the asset */
7
+ id?: string;
8
+ /** Human readable name of the asset */
9
+ displayValue?: string;
10
+ };
11
+
5
12
  export type AssetUpsertDto = ChangeAwareUpsertDto & {
6
13
  /** External Keys */
7
14
  extKeys: AssetKeys;
@@ -1,3 +1,4 @@
1
+ import {SimpleAssetDto} from './assets.dto';
1
2
  import {BaseDto, BaseUpsertDto} from './base.dto';
2
3
  import {Category, FindingKind} from './enums';
3
4
  import {FindingOutcome, FindingSeverity, FindingStatus} from './enums';
@@ -34,6 +35,8 @@ export type FindingUpsertDto = BaseUpsertDto & {
34
35
  cid: string;
35
36
  /** Id of the provider to which the finding applies */
36
37
  pid: string;
38
+ /** Optionally populated when requested through query param `include=asset` */
39
+ asset?: SimpleAssetDto;
37
40
  /** Id of the asset to which the finding applies */
38
41
  aid?: string | undefined | null;
39
42
  /** Id of the user to which the finding applies */