@ampsec/platform-client 0.1.3 → 1.0.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 (63) hide show
  1. package/build/src/dto/agents.dto.d.ts +13 -0
  2. package/build/src/dto/{devices.dto.js → agents.dto.js} +1 -1
  3. package/build/src/dto/agents.dto.js.map +1 -0
  4. package/build/src/dto/assets.dto.d.ts +8 -0
  5. package/build/src/dto/{components.dto.js → assets.dto.js} +1 -1
  6. package/build/src/dto/assets.dto.js.map +1 -0
  7. package/build/src/dto/base.dto.d.ts +8 -4
  8. package/build/src/dto/connectors.dto.d.ts +11 -0
  9. package/build/src/dto/connectors.dto.js +3 -0
  10. package/build/src/dto/connectors.dto.js.map +1 -0
  11. package/build/src/dto/enums/agent.status.d.ts +5 -0
  12. package/build/src/dto/enums/agent.status.js +10 -0
  13. package/build/src/dto/enums/agent.status.js.map +1 -0
  14. package/build/src/dto/enums/connector.status.d.ts +6 -0
  15. package/build/src/dto/enums/connector.status.js +11 -0
  16. package/build/src/dto/enums/connector.status.js.map +1 -0
  17. package/build/src/dto/enums/finding.severity.d.ts +6 -0
  18. package/build/src/dto/enums/finding.severity.js +11 -0
  19. package/build/src/dto/enums/finding.severity.js.map +1 -0
  20. package/build/src/dto/enums/finding.status.d.ts +4 -0
  21. package/build/src/dto/enums/finding.status.js +9 -0
  22. package/build/src/dto/enums/finding.status.js.map +1 -0
  23. package/build/src/dto/enums/index.d.ts +4 -0
  24. package/build/src/dto/enums/index.js +21 -0
  25. package/build/src/dto/enums/index.js.map +1 -0
  26. package/build/src/dto/findings.dto.d.ts +24 -0
  27. package/build/src/dto/findings.dto.js +3 -0
  28. package/build/src/dto/findings.dto.js.map +1 -0
  29. package/build/src/dto/index.d.ts +13 -0
  30. package/build/src/dto/index.js +13 -0
  31. package/build/src/dto/index.js.map +1 -1
  32. package/build/src/dto/metrics.dto.d.ts +7 -0
  33. package/build/src/dto/metrics.dto.js +3 -0
  34. package/build/src/dto/metrics.dto.js.map +1 -0
  35. package/build/src/dto/providers.dto.d.ts +6 -0
  36. package/build/src/dto/providers.dto.js +3 -0
  37. package/build/src/dto/providers.dto.js.map +1 -0
  38. package/build/src/dto/reportResults.dto.d.ts +10 -0
  39. package/build/src/dto/reportResults.dto.js +3 -0
  40. package/build/src/dto/reportResults.dto.js.map +1 -0
  41. package/build/src/dto/riskContributors.dto.d.ts +8 -0
  42. package/build/src/dto/riskContributors.dto.js +3 -0
  43. package/build/src/dto/riskContributors.dto.js.map +1 -0
  44. package/build/src/dto/saasAssets.dto.d.ts +14 -0
  45. package/build/src/dto/saasAssets.dto.js +3 -0
  46. package/build/src/dto/saasAssets.dto.js.map +1 -0
  47. package/build/src/dto/saasComponents.dto.d.ts +16 -0
  48. package/build/src/dto/saasComponents.dto.js +3 -0
  49. package/build/src/dto/saasComponents.dto.js.map +1 -0
  50. package/build/src/dto/saasUsers.dto.d.ts +12 -0
  51. package/build/src/dto/saasUsers.dto.js +3 -0
  52. package/build/src/dto/saasUsers.dto.js.map +1 -0
  53. package/build/src/dto/tenants.dto.d.ts +6 -0
  54. package/build/src/dto/tenants.dto.js +3 -0
  55. package/build/src/dto/tenants.dto.js.map +1 -0
  56. package/build/src/dto/users.dto.d.ts +18 -18
  57. package/build/src/etag.d.ts +2 -2
  58. package/build/src/etag.js.map +1 -1
  59. package/package.json +1 -1
  60. package/build/src/dto/components.dto.d.ts +0 -14
  61. package/build/src/dto/components.dto.js.map +0 -1
  62. package/build/src/dto/devices.dto.d.ts +0 -23
  63. package/build/src/dto/devices.dto.js.map +0 -1
@@ -0,0 +1,13 @@
1
+ import { AgentStatus } from './enums/agent.status';
2
+ import { BaseDto, BaseUpsertDto } from './base.dto';
3
+ export type AgentUpsertDto = BaseUpsertDto & {
4
+ /** Agent first name */
5
+ firstName: string;
6
+ /** Agent last name */
7
+ lastName: string;
8
+ /** Status of the Agent, e.g. ACTIVE */
9
+ status: AgentStatus;
10
+ /** External Id */
11
+ email: string;
12
+ };
13
+ export type AgentDto = BaseDto & AgentUpsertDto;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=devices.dto.js.map
3
+ //# sourceMappingURL=agents.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.dto.js","sourceRoot":"","sources":["../../../src/dto/agents.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { ChangeAwareDto, ChangeAwareUpsertDto } from './base.dto';
2
+ export type AssetUpsertDto = ChangeAwareUpsertDto & {
3
+ /** External Id */
4
+ sn: string;
5
+ /** User Id of the asset owner */
6
+ uid?: number | undefined;
7
+ };
8
+ export type AssetDto = ChangeAwareDto & AssetUpsertDto;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=components.dto.js.map
3
+ //# sourceMappingURL=assets.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.dto.js","sourceRoot":"","sources":["../../../src/dto/assets.dto.ts"],"names":[],"mappings":""}
@@ -1,14 +1,10 @@
1
1
  export type BaseUpsertDto = {
2
2
  /** Unique Row Identifier. Populated for entity updates. */
3
3
  id?: number;
4
- /** MD5 hash of a subset of properties to deted field level changes. */
5
- etag: string;
6
4
  };
7
5
  export type BaseDto = {
8
6
  /** Unique Row Identifier */
9
7
  id: number;
10
- /** MD5 hash of a subset of properties to deted field level changes. */
11
- etag: string;
12
8
  /** Record creation date in database. */
13
9
  createdAt: string;
14
10
  /** Last record update date in database. */
@@ -16,3 +12,11 @@ export type BaseDto = {
16
12
  /** Record creation date in database. Only present on soft deleted, i.e. `null => active` */
17
13
  deletedAt: string | null;
18
14
  };
15
+ export type ChangeAwareUpsertDto = BaseUpsertDto & {
16
+ /** MD5 hash of a subset of properties to detect field level changes. */
17
+ etag: string;
18
+ };
19
+ export type ChangeAwareDto = BaseDto & {
20
+ /** MD5 hash of a subset of properties to deted field level changes. */
21
+ etag: string;
22
+ };
@@ -0,0 +1,11 @@
1
+ import { BaseDto, BaseUpsertDto } from './base.dto';
2
+ import { ConnectorStatus } from './enums/connector.status';
3
+ export type ConnectorUpsertDto = BaseUpsertDto & {
4
+ /** Human readable name of the connector */
5
+ displayValue: string;
6
+ /** Status of the connector, e.g. ACTIVE */
7
+ status: ConnectorStatus;
8
+ /** Provider Id */
9
+ pid?: number | undefined;
10
+ };
11
+ export type ConnectorDto = BaseDto & ConnectorUpsertDto;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=connectors.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectors.dto.js","sourceRoot":"","sources":["../../../src/dto/connectors.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export declare enum AgentStatus {
2
+ ACTIVE = "ACTIVE",
3
+ INVITED = "INVITED",
4
+ SUSPENDED = "SUSPENDED"
5
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentStatus = void 0;
4
+ var AgentStatus;
5
+ (function (AgentStatus) {
6
+ AgentStatus["ACTIVE"] = "ACTIVE";
7
+ AgentStatus["INVITED"] = "INVITED";
8
+ AgentStatus["SUSPENDED"] = "SUSPENDED";
9
+ })(AgentStatus = exports.AgentStatus || (exports.AgentStatus = {}));
10
+ //# sourceMappingURL=agent.status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.status.js","sourceRoot":"","sources":["../../../../src/dto/enums/agent.status.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,sCAAuB,CAAA;AACzB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB"}
@@ -0,0 +1,6 @@
1
+ export declare enum ConnectorStatus {
2
+ ACTIVE = "ACTIVE",
3
+ DELETED = "DELETED",
4
+ FAILED = "FAILED",
5
+ DISABLED = "DISABLED"
6
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConnectorStatus = void 0;
4
+ var ConnectorStatus;
5
+ (function (ConnectorStatus) {
6
+ ConnectorStatus["ACTIVE"] = "ACTIVE";
7
+ ConnectorStatus["DELETED"] = "DELETED";
8
+ ConnectorStatus["FAILED"] = "FAILED";
9
+ ConnectorStatus["DISABLED"] = "DISABLED";
10
+ })(ConnectorStatus = exports.ConnectorStatus || (exports.ConnectorStatus = {}));
11
+ //# sourceMappingURL=connector.status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connector.status.js","sourceRoot":"","sources":["../../../../src/dto/enums/connector.status.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;AACvB,CAAC,EALW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAK1B"}
@@ -0,0 +1,6 @@
1
+ export declare enum FindingSeverity {
2
+ LOW = "LOW",
3
+ MEDIUM = "MEDIUM",
4
+ HIGH = "HIGH",
5
+ CRITICAL = "CRITICAL"
6
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindingSeverity = void 0;
4
+ var FindingSeverity;
5
+ (function (FindingSeverity) {
6
+ FindingSeverity["LOW"] = "LOW";
7
+ FindingSeverity["MEDIUM"] = "MEDIUM";
8
+ FindingSeverity["HIGH"] = "HIGH";
9
+ FindingSeverity["CRITICAL"] = "CRITICAL";
10
+ })(FindingSeverity = exports.FindingSeverity || (exports.FindingSeverity = {}));
11
+ //# sourceMappingURL=finding.severity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"finding.severity.js","sourceRoot":"","sources":["../../../../src/dto/enums/finding.severity.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,oCAAiB,CAAA;IACjB,gCAAa,CAAA;IACb,wCAAqB,CAAA;AACvB,CAAC,EALW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAK1B"}
@@ -0,0 +1,4 @@
1
+ export declare enum FindingStatus {
2
+ OPEN = "OPEN",
3
+ CLOSED = "CLOSED"
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindingStatus = void 0;
4
+ var FindingStatus;
5
+ (function (FindingStatus) {
6
+ FindingStatus["OPEN"] = "OPEN";
7
+ FindingStatus["CLOSED"] = "CLOSED";
8
+ })(FindingStatus = exports.FindingStatus || (exports.FindingStatus = {}));
9
+ //# sourceMappingURL=finding.status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"finding.status.js","sourceRoot":"","sources":["../../../../src/dto/enums/finding.status.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,kCAAiB,CAAA;AACnB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"}
@@ -0,0 +1,4 @@
1
+ export * from './agent.status';
2
+ export * from './connector.status';
3
+ export * from './finding.severity';
4
+ export * from './finding.status';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./agent.status"), exports);
18
+ __exportStar(require("./connector.status"), exports);
19
+ __exportStar(require("./finding.severity"), exports);
20
+ __exportStar(require("./finding.status"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,qDAAmC;AACnC,qDAAmC;AACnC,mDAAiC"}
@@ -0,0 +1,24 @@
1
+ import { BaseDto, BaseUpsertDto } from './base.dto';
2
+ import { FindingSeverity } from './enums/finding.severity';
3
+ import { FindingStatus } from './enums/finding.status';
4
+ export type FindingUpsertDto = BaseUpsertDto & {
5
+ /** Date the finding was closed */
6
+ closedAt?: string;
7
+ /** Type of finding */
8
+ kind: string;
9
+ /** Status of the finding, e.g. OPEN */
10
+ status: FindingStatus;
11
+ /** Severity of the finding, e.g. CRITICAL, HIGH, etc... */
12
+ severity: FindingSeverity;
13
+ /** Number of times the user has been engaged to resolve the finding */
14
+ numberOfEngagements: number;
15
+ /** Human readable name of the finding */
16
+ displayValue: string;
17
+ /** Description of the finding */
18
+ description?: string;
19
+ /** Id of the user to which the finding applies */
20
+ uid?: number | undefined;
21
+ /** Id of the SaasComponent related to the given finding */
22
+ scid: number;
23
+ };
24
+ export type FindingDto = BaseDto & FindingUpsertDto;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=findings.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findings.dto.js","sourceRoot":"","sources":["../../../src/dto/findings.dto.ts"],"names":[],"mappings":""}
@@ -1,3 +1,16 @@
1
+ export * from './agents.dto';
2
+ export * from './assets.dto';
1
3
  export * from './base.dto';
4
+ export * from './connectors.dto';
5
+ export * from './enums';
6
+ export * from './findings.dto';
7
+ export * from './metrics.dto';
2
8
  export * from './page.dto';
9
+ export * from './providers.dto';
10
+ export * from './reportResults.dto';
11
+ export * from './riskContributors.dto';
12
+ export * from './saasAssets.dto';
13
+ export * from './saasComponents.dto';
14
+ export * from './saasUsers.dto';
15
+ export * from './tenants.dto';
3
16
  export * from './users.dto';
@@ -14,7 +14,20 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./agents.dto"), exports);
18
+ __exportStar(require("./assets.dto"), exports);
17
19
  __exportStar(require("./base.dto"), exports);
20
+ __exportStar(require("./connectors.dto"), exports);
21
+ __exportStar(require("./enums"), exports);
22
+ __exportStar(require("./findings.dto"), exports);
23
+ __exportStar(require("./metrics.dto"), exports);
18
24
  __exportStar(require("./page.dto"), exports);
25
+ __exportStar(require("./providers.dto"), exports);
26
+ __exportStar(require("./reportResults.dto"), exports);
27
+ __exportStar(require("./riskContributors.dto"), exports);
28
+ __exportStar(require("./saasAssets.dto"), exports);
29
+ __exportStar(require("./saasComponents.dto"), exports);
30
+ __exportStar(require("./saasUsers.dto"), exports);
31
+ __exportStar(require("./tenants.dto"), exports);
19
32
  __exportStar(require("./users.dto"), exports);
20
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,6CAA2B;AAC3B,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,6CAA2B;AAC3B,mDAAiC;AACjC,0CAAwB;AACxB,iDAA+B;AAC/B,gDAA8B;AAC9B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B"}
@@ -0,0 +1,7 @@
1
+ import { BaseDto, BaseUpsertDto } from './base.dto';
2
+ export type MetricUpsertDto = BaseUpsertDto & {
3
+ score: number;
4
+ scoreDelta: number;
5
+ rank: number;
6
+ };
7
+ export type MetricDto = BaseDto & MetricUpsertDto;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=metrics.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.dto.js","sourceRoot":"","sources":["../../../src/dto/metrics.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { BaseDto, BaseUpsertDto } from './base.dto';
2
+ export type ProviderUpsertDto = BaseUpsertDto & {
3
+ /** Human readable name of the provider */
4
+ displayValue: string;
5
+ };
6
+ export type ProviderDto = BaseDto & ProviderUpsertDto;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=providers.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providers.dto.js","sourceRoot":"","sources":["../../../src/dto/providers.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { BaseDto, BaseUpsertDto } from './base.dto';
2
+ export type ReportResultUpsertDto = BaseUpsertDto & {
3
+ /** External Id */
4
+ extKey: string;
5
+ /** Timestamp the report result was generated in ISO8601 format */
6
+ ts: string;
7
+ /** The results generated for the given report */
8
+ results: unknown;
9
+ };
10
+ export type ReportResultDto = BaseDto & ReportResultUpsertDto;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=reportResults.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reportResults.dto.js","sourceRoot":"","sources":["../../../src/dto/reportResults.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { BaseDto, BaseUpsertDto } from './base.dto';
2
+ export type RiskContributorUpsertDto = BaseUpsertDto & {
3
+ /** Short descriptor of the risk contributor, e.g. V, P, etc... */
4
+ displayValue: string;
5
+ /** Description of the risk contributor */
6
+ description: string;
7
+ };
8
+ export type RiskContributorDto = BaseDto & RiskContributorUpsertDto;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=riskContributors.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"riskContributors.dto.js","sourceRoot":"","sources":["../../../src/dto/riskContributors.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { ChangeAwareDto, ChangeAwareUpsertDto } from './base.dto';
2
+ export type SaasAssetUpsertDto = ChangeAwareUpsertDto & {
3
+ /** External Id */
4
+ sn: string;
5
+ /** Connector Id */
6
+ cid: number;
7
+ /** Asset Id */
8
+ aid: number;
9
+ /** User Id */
10
+ uid?: number | undefined;
11
+ /** Information specific to this asset */
12
+ meta: unknown;
13
+ };
14
+ export type SaasAssetDto = ChangeAwareDto & SaasAssetUpsertDto;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=saasAssets.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"saasAssets.dto.js","sourceRoot":"","sources":["../../../src/dto/saasAssets.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import { ChangeAwareDto, ChangeAwareUpsertDto } from './base.dto';
2
+ export type SaasComponentUpsertDto = ChangeAwareUpsertDto & {
3
+ /** Asset Id */
4
+ aid?: number | undefined;
5
+ /** Connector Id */
6
+ cid: number;
7
+ /** */
8
+ kind: string;
9
+ /** Context specific information related to the Saas Component */
10
+ meta: unknown;
11
+ /** User Id of the affected user */
12
+ uid?: number | undefined;
13
+ /** External Id */
14
+ extKey: string;
15
+ };
16
+ export type SaasComponentDto = ChangeAwareDto & SaasComponentUpsertDto;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=saasComponents.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"saasComponents.dto.js","sourceRoot":"","sources":["../../../src/dto/saasComponents.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import { ChangeAwareDto, ChangeAwareUpsertDto } from './base.dto';
2
+ export type SaasUserUpsertDto = ChangeAwareUpsertDto & {
3
+ /** User Id */
4
+ uid: number;
5
+ /** Connector Id */
6
+ cid: number;
7
+ /** External Id */
8
+ email: string;
9
+ /** Additional information specific to this Saas User */
10
+ meta: unknown;
11
+ };
12
+ export type SaasUserDto = ChangeAwareDto & SaasUserUpsertDto;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=saasUsers.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"saasUsers.dto.js","sourceRoot":"","sources":["../../../src/dto/saasUsers.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { BaseDto, BaseUpsertDto } from './base.dto';
2
+ export type TenantUpsertDto = BaseUpsertDto & {
3
+ /** Human readable name of the tenant */
4
+ displayValue: string;
5
+ };
6
+ export type TenantDto = BaseDto & TenantUpsertDto;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=tenants.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenants.dto.js","sourceRoot":"","sources":["../../../src/dto/tenants.dto.ts"],"names":[],"mappings":""}
@@ -1,26 +1,26 @@
1
- import { BaseDto, BaseUpsertDto } from './base.dto';
2
- export type UpsertUserDto = BaseUpsertDto & {
3
- /** Organization ID */
4
- oid: number;
1
+ import { ChangeAwareDto, ChangeAwareUpsertDto } from './base.dto';
2
+ import { MetricDto } from './metrics.dto';
3
+ import { RiskContributorDto } from './riskContributors.dto';
4
+ export type UserUpsertDto = ChangeAwareUpsertDto & {
5
+ /** Tenant ID */
6
+ tid: number;
5
7
  /** External ID: list of emails, allows or merging users across email aliases */
6
8
  emails: string[];
9
+ /** User first name */
7
10
  firstName: string;
11
+ /** User last name */
8
12
  lastName: string;
13
+ /** Department to which the user is assigned */
9
14
  department?: string;
15
+ /** User title */
16
+ title?: string;
17
+ /** Human readable name of the user's tenant, e.g. tenant.displayName */
18
+ organization?: string;
10
19
  /** Employment start date used for calculating tenure */
11
20
  startDate?: string;
21
+ /** Risk Contributors associated with the user */
22
+ riskContributors: RiskContributorDto[];
23
+ /** Metrics associated with the user */
24
+ metrics: MetricDto[];
12
25
  };
13
- export type UserDto = BaseDto & UpsertUserDto;
14
- export type UpsertSaaSUserDto = BaseUpsertDto & {
15
- /** Organization ID */
16
- oid: number;
17
- /** Connector ID */
18
- cid: number;
19
- /** Global User ID */
20
- uid: number;
21
- /** External ID */
22
- email: string;
23
- /** Provider Specific Data */
24
- meta: unknown;
25
- };
26
- export type SaaSUserDto = BaseDto & UpsertSaaSUserDto;
26
+ export type UserDto = ChangeAwareDto & UserUpsertDto;
@@ -1,3 +1,3 @@
1
- import { BaseDto, BaseUpsertDto } from './';
1
+ import { ChangeAwareDto, ChangeAwareUpsertDto } from './';
2
2
  export declare function calculateEtag(model: unknown): string;
3
- export declare function withEtag(model: BaseDto | BaseUpsertDto): void;
3
+ export declare function withEtag(model: ChangeAwareDto | ChangeAwareUpsertDto): void;
@@ -1 +1 @@
1
- {"version":3,"file":"etag.js","sourceRoot":"","sources":["../../src/etag.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA8B;AAG9B,SAAgB,aAAa,CAAC,KAAc;IAC1C,MAAM,UAAU,GAAoB,EAAC,GAAI,KAAgB,EAAC,CAAC;IAC3D,OAAO,UAAU,CAAC,IAAI,CAAC;IACvB,OAAO,IAAA,qBAAG,EAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AACzC,CAAC;AAJD,sCAIC;AAED,SAAgB,QAAQ,CAAC,KAA8B;IACrD,KAAK,CAAC,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAFD,4BAEC"}
1
+ {"version":3,"file":"etag.js","sourceRoot":"","sources":["../../src/etag.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA8B;AAG9B,SAAgB,aAAa,CAAC,KAAc;IAC1C,MAAM,UAAU,GAAoB,EAAC,GAAI,KAAgB,EAAC,CAAC;IAC3D,OAAO,UAAU,CAAC,IAAI,CAAC;IACvB,OAAO,IAAA,qBAAG,EAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AACzC,CAAC;AAJD,sCAIC;AAED,SAAgB,QAAQ,CAAC,KAA4C;IACnE,KAAK,CAAC,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAFD,4BAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "0.1.3",
3
+ "version": "1.0.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "scripts": {
@@ -1,14 +0,0 @@
1
- import { BaseDto, BaseUpsertDto } from './base.dto';
2
- export type UpsertSaaSComponentDto = BaseUpsertDto & {
3
- /** Organization ID */
4
- oid: number;
5
- /** Connector ID */
6
- cid: number;
7
- /** External ID */
8
- extKey: string;
9
- /** Owner ID */
10
- uid: number | null;
11
- /** Provider Specific Data */
12
- meta: unknown;
13
- };
14
- export type SaaSComponentDto = BaseDto & UpsertSaaSComponentDto;
@@ -1 +0,0 @@
1
- {"version":3,"file":"components.dto.js","sourceRoot":"","sources":["../../../src/dto/components.dto.ts"],"names":[],"mappings":""}
@@ -1,23 +0,0 @@
1
- import { BaseDto, BaseUpsertDto } from './base.dto';
2
- export type UpsertDeviceDto = BaseUpsertDto & {
3
- /** Organization ID */
4
- oid: number;
5
- /** External ID: Serial Number */
6
- sn: string;
7
- /** Owner ID */
8
- uid: number | null;
9
- };
10
- export type DeviceDto = BaseDto & UpsertDeviceDto;
11
- export type UpsertSaaSDeviceDto = BaseUpsertDto & {
12
- /** Organization ID */
13
- oid: number;
14
- /** External ID: Serial Number */
15
- sn: string;
16
- /** Owner ID */
17
- uid: number | null;
18
- /** Connector ID */
19
- cid: number;
20
- /** Provider Specific Data */
21
- meta: unknown;
22
- };
23
- export type SaaSDeviceDto = BaseDto & UpsertSaaSDeviceDto;
@@ -1 +0,0 @@
1
- {"version":3,"file":"devices.dto.js","sourceRoot":"","sources":["../../../src/dto/devices.dto.ts"],"names":[],"mappings":""}