@ampsec/platform-client 20.1.1 → 21.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.
@@ -0,0 +1,6 @@
1
+ export type AssetKeys = {
2
+ /** Serial Number */
3
+ sn?: string;
4
+ /** MAC Addresses. Note: could be empty */
5
+ macs: string[];
6
+ };
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=assetKey.js.map
3
+ //# sourceMappingURL=assetKeys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assetKeys.js","sourceRoot":"","sources":["../../../src/dto/assetKeys.ts"],"names":[],"mappings":""}
@@ -1,7 +1,8 @@
1
+ import { AssetKeys } from './assetKeys';
1
2
  import { ChangeAwareDto, ChangeAwareUpsertDto } from './base.dto';
2
3
  export type AssetUpsertDto = ChangeAwareUpsertDto & {
3
- /** External Id */
4
- sn: string;
4
+ /** External Keys */
5
+ extKeys: AssetKeys;
5
6
  /** User Id of the asset owner */
6
7
  uid?: string | undefined;
7
8
  };
@@ -1,6 +1,5 @@
1
1
  export * from './agent.role';
2
2
  export * from './agent.status';
3
- export * from './assetKeyKind';
4
3
  export * from './category';
5
4
  export * from './connector.status';
6
5
  export * from './findingKind';
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./agent.role"), exports);
18
18
  __exportStar(require("./agent.status"), exports);
19
- __exportStar(require("./assetKeyKind"), exports);
20
19
  __exportStar(require("./category"), exports);
21
20
  __exportStar(require("./connector.status"), exports);
22
21
  __exportStar(require("./findingKind"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,iDAA+B;AAC/B,6CAA2B;AAC3B,qDAAmC;AACnC,gDAA8B;AAC9B,qDAAmC;AACnC,mDAAiC;AACjC,wDAAsC;AACtC,yDAAuC;AACvC,sDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,6CAA2B;AAC3B,qDAAmC;AACnC,gDAA8B;AAC9B,qDAAmC;AACnC,mDAAiC;AACjC,wDAAsC;AACtC,yDAAuC;AACvC,sDAAoC"}
@@ -1,6 +1,6 @@
1
1
  export * from './agents.dto';
2
2
  export * from './assets.dto';
3
- export * from './assetKey';
3
+ export * from './assetKeys';
4
4
  export * from './base.dto';
5
5
  export * from './connectors.dto';
6
6
  export * from './enum.dto';
@@ -16,7 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./agents.dto"), exports);
18
18
  __exportStar(require("./assets.dto"), exports);
19
- __exportStar(require("./assetKey"), exports);
19
+ __exportStar(require("./assetKeys"), exports);
20
20
  __exportStar(require("./base.dto"), exports);
21
21
  __exportStar(require("./connectors.dto"), exports);
22
22
  __exportStar(require("./enum.dto"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,6CAA2B;AAC3B,6CAA2B;AAC3B,mDAAiC;AACjC,6CAA2B;AAC3B,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,wCAAsB;AACtB,gDAA8B;AAC9B,6CAA2B;AAC3B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,gDAA8B;AAC9B,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,8CAA4B;AAC5B,6CAA2B;AAC3B,mDAAiC;AACjC,6CAA2B;AAC3B,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,wCAAsB;AACtB,gDAA8B;AAC9B,6CAA2B;AAC3B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,gDAA8B;AAC9B,8CAA4B"}
@@ -1,7 +1,8 @@
1
+ import { AssetKeys } from './assetKeys';
1
2
  import { ChangeAwareDto, ChangeAwareUpsertDto } from './base.dto';
2
3
  export type SaasAssetUpsertDto = ChangeAwareUpsertDto & {
3
- /** External Id */
4
- sn: string;
4
+ /** External Ids */
5
+ extKeys: AssetKeys;
5
6
  /** Connector Id */
6
7
  cid: string;
7
8
  /** Asset Id */
@@ -2,6 +2,13 @@ import { ChangeAwareDto, ChangeAwareUpsertDto } from './base.dto';
2
2
  import { Category, FindingSeverity, SaasComponentKind } from './enums';
3
3
  export type SaasComponentMeta = {
4
4
  _findings: {
5
+ /**
6
+ * Uses styling to display the finding in the UI
7
+ * - `+` is used to denote success, e.g. `+ACTIVE`
8
+ * - `-` is used to denote failure, e.g. `-FAILED`
9
+ * - `?` is used to denote unknown, e.g. `?ASSIGNED` for a pending not-out-of-sla training
10
+ */
11
+ displayValue?: string;
5
12
  active?: boolean;
6
13
  enabled?: boolean;
7
14
  failedPhishing?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "20.1.1",
3
+ "version": "21.1.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -0,0 +1,6 @@
1
+ export type AssetKeys = {
2
+ /** Serial Number */
3
+ sn?: string;
4
+ /** MAC Addresses. Note: could be empty */
5
+ macs: string[];
6
+ };
@@ -1,8 +1,9 @@
1
+ import {AssetKeys} from './assetKeys';
1
2
  import {ChangeAwareDto, ChangeAwareUpsertDto} from './base.dto';
2
3
 
3
4
  export type AssetUpsertDto = ChangeAwareUpsertDto & {
4
- /** External Id */
5
- sn: string;
5
+ /** External Keys */
6
+ extKeys: AssetKeys;
6
7
  /** User Id of the asset owner */
7
8
  uid?: string | undefined;
8
9
  };
@@ -1,6 +1,5 @@
1
1
  export * from './agent.role';
2
2
  export * from './agent.status';
3
- export * from './assetKeyKind';
4
3
  export * from './category';
5
4
  export * from './connector.status';
6
5
  export * from './findingKind';
package/src/dto/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export * from './agents.dto';
2
2
  export * from './assets.dto';
3
- export * from './assetKey';
3
+ export * from './assetKeys';
4
4
  export * from './base.dto';
5
5
  export * from './connectors.dto';
6
6
  export * from './enum.dto';
@@ -1,8 +1,9 @@
1
+ import {AssetKeys} from './assetKeys';
1
2
  import {ChangeAwareDto, ChangeAwareUpsertDto} from './base.dto';
2
3
 
3
4
  export type SaasAssetUpsertDto = ChangeAwareUpsertDto & {
4
- /** External Id */
5
- sn: string;
5
+ /** External Ids */
6
+ extKeys: AssetKeys;
6
7
  /** Connector Id */
7
8
  cid: string;
8
9
  /** Asset Id */
@@ -3,6 +3,13 @@ import {Category, FindingSeverity, SaasComponentKind} from './enums';
3
3
 
4
4
  export type SaasComponentMeta = {
5
5
  _findings: {
6
+ /**
7
+ * Uses styling to display the finding in the UI
8
+ * - `+` is used to denote success, e.g. `+ACTIVE`
9
+ * - `-` is used to denote failure, e.g. `-FAILED`
10
+ * - `?` is used to denote unknown, e.g. `?ASSIGNED` for a pending not-out-of-sla training
11
+ */
12
+ displayValue?: string;
6
13
  active?: boolean;
7
14
  enabled?: boolean;
8
15
  failedPhishing?: boolean;
@@ -1,5 +0,0 @@
1
- import { AssetKeyKind } from './enums/assetKeyKind';
2
- export type AssetKey = {
3
- value: string;
4
- kind: AssetKeyKind;
5
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"assetKey.js","sourceRoot":"","sources":["../../../src/dto/assetKey.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export declare enum AssetKeyKind {
2
- SERIAL_NUMBER = "SERIAL_NUMBER",
3
- MAC_ADDRESS = "MAC_ADDRESS"
4
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AssetKeyKind = void 0;
4
- /* eslint-disable no-unused-vars */
5
- var AssetKeyKind;
6
- (function (AssetKeyKind) {
7
- AssetKeyKind["SERIAL_NUMBER"] = "SERIAL_NUMBER";
8
- AssetKeyKind["MAC_ADDRESS"] = "MAC_ADDRESS";
9
- })(AssetKeyKind || (exports.AssetKeyKind = AssetKeyKind = {}));
10
- //# sourceMappingURL=assetKeyKind.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assetKeyKind.js","sourceRoot":"","sources":["../../../../src/dto/enums/assetKeyKind.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,+CAA+B,CAAA;IAC/B,2CAA2B,CAAA;AAC7B,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
@@ -1,6 +0,0 @@
1
- import {AssetKeyKind} from './enums/assetKeyKind';
2
-
3
- export type AssetKey = {
4
- value: string;
5
- kind: AssetKeyKind;
6
- };
@@ -1,5 +0,0 @@
1
- /* eslint-disable no-unused-vars */
2
- export enum AssetKeyKind {
3
- SERIAL_NUMBER = 'SERIAL_NUMBER',
4
- MAC_ADDRESS = 'MAC_ADDRESS',
5
- }