@ampsec/platform-client 59.5.0 → 59.6.1
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.
- package/build/src/dto/platform/platform.saasAssets.dto.d.ts +61 -0
- package/build/src/dto/platform/platform.saasAssets.dto.js +6 -0
- package/build/src/dto/platform/platform.saasAssets.dto.js.map +1 -1
- package/build/src/dto/platform/platform.saasUsers.dto.d.ts +38 -0
- package/build/src/dto/platform/platform.saasUsers.dto.js +6 -0
- package/build/src/dto/platform/platform.saasUsers.dto.js.map +1 -1
- package/build/src/services/AmpApi.d.ts +2 -0
- package/build/src/services/AmpApi.js +2 -0
- package/build/src/services/AmpApi.js.map +1 -1
- package/package.json +1 -1
- package/src/dto/platform/platform.saasAssets.dto.ts +12 -2
- package/src/dto/platform/platform.saasUsers.dto.ts +11 -2
- package/src/services/AmpApi.ts +3 -0
|
@@ -1,4 +1,65 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { SaasAssetDto, SaasAssetUpsertDto } from '../saasAssets.dto';
|
|
2
3
|
import { TenantBased, UpsertTenantBased } from './tenant.based.dto';
|
|
3
4
|
export type PlatformSaasAssetUpsertDto = SaasAssetUpsertDto & UpsertTenantBased;
|
|
4
5
|
export type PlatformSaasAssetDto = SaasAssetDto & TenantBased;
|
|
6
|
+
export declare const _StagedSaasAssetUpsertDto: z.ZodObject<{
|
|
7
|
+
id: z.ZodOptional<z.ZodString>;
|
|
8
|
+
cid: z.ZodString;
|
|
9
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
10
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
11
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
12
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
etag: z.ZodString;
|
|
14
|
+
displayValue: z.ZodString;
|
|
15
|
+
extKeys: z.ZodObject<{
|
|
16
|
+
extId: z.ZodOptional<z.ZodString>;
|
|
17
|
+
sn: z.ZodOptional<z.ZodString>;
|
|
18
|
+
macs: z.ZodArray<z.ZodString, "many">;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
macs: string[];
|
|
21
|
+
extId?: string | undefined;
|
|
22
|
+
sn?: string | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
macs: string[];
|
|
25
|
+
extId?: string | undefined;
|
|
26
|
+
sn?: string | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
meta: z.ZodUnknown;
|
|
29
|
+
aid: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
cid: string;
|
|
32
|
+
etag: string;
|
|
33
|
+
displayValue: string;
|
|
34
|
+
extKeys: {
|
|
35
|
+
macs: string[];
|
|
36
|
+
extId?: string | undefined;
|
|
37
|
+
sn?: string | undefined;
|
|
38
|
+
};
|
|
39
|
+
id?: string | undefined;
|
|
40
|
+
uid?: string | undefined;
|
|
41
|
+
createdAt?: string | undefined;
|
|
42
|
+
updatedAt?: string | undefined;
|
|
43
|
+
deletedAt?: string | null | undefined;
|
|
44
|
+
meta?: unknown;
|
|
45
|
+
aid?: string | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
cid: string;
|
|
48
|
+
etag: string;
|
|
49
|
+
displayValue: string;
|
|
50
|
+
extKeys: {
|
|
51
|
+
macs: string[];
|
|
52
|
+
extId?: string | undefined;
|
|
53
|
+
sn?: string | undefined;
|
|
54
|
+
};
|
|
55
|
+
id?: string | undefined;
|
|
56
|
+
uid?: string | undefined;
|
|
57
|
+
createdAt?: string | undefined;
|
|
58
|
+
updatedAt?: string | undefined;
|
|
59
|
+
deletedAt?: string | null | undefined;
|
|
60
|
+
meta?: unknown;
|
|
61
|
+
aid?: string | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
export type StagedSaasAssetUpsertDto = z.infer<typeof _StagedSaasAssetUpsertDto>;
|
|
64
|
+
export type PlatformStagedSaasAssetUpsertDto = StagedSaasAssetUpsertDto & UpsertTenantBased;
|
|
65
|
+
export type PlatformStagedSaasAssetDto = StagedSaasAssetUpsertDto & TenantBased;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._StagedSaasAssetUpsertDto = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const saasAssets_dto_1 = require("../saasAssets.dto");
|
|
6
|
+
exports._StagedSaasAssetUpsertDto = saasAssets_dto_1._SaasAssetUpsertDto.extend({
|
|
7
|
+
aid: zod_1.z.string().optional(),
|
|
8
|
+
});
|
|
3
9
|
//# sourceMappingURL=platform.saasAssets.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.saasAssets.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.saasAssets.dto.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"platform.saasAssets.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.saasAssets.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,sDAAwF;AAM3E,QAAA,yBAAyB,GAAG,oCAAmB,CAAC,MAAM,CAAC;IAClE,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3B,CAAC,CAAC"}
|
|
@@ -1,4 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { SaasUserUpsertDto } from '../saasUsers.dto';
|
|
2
3
|
import { TenantBased, UpsertTenantBased } from './tenant.based.dto';
|
|
3
4
|
export type PlatformSaasUserUpsertDto = SaasUserUpsertDto & UpsertTenantBased;
|
|
4
5
|
export type PlatformSaasUserDto = SaasUserUpsertDto & TenantBased;
|
|
6
|
+
export declare const _StagedSaasUserUpsertDto: z.ZodObject<{
|
|
7
|
+
email: z.ZodString;
|
|
8
|
+
id: z.ZodOptional<z.ZodString>;
|
|
9
|
+
cid: z.ZodString;
|
|
10
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
11
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
12
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
etag: z.ZodString;
|
|
14
|
+
extId: z.ZodString;
|
|
15
|
+
meta: z.ZodUnknown;
|
|
16
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
email: string;
|
|
19
|
+
cid: string;
|
|
20
|
+
etag: string;
|
|
21
|
+
extId: string;
|
|
22
|
+
id?: string | undefined;
|
|
23
|
+
createdAt?: string | undefined;
|
|
24
|
+
updatedAt?: string | undefined;
|
|
25
|
+
deletedAt?: string | null | undefined;
|
|
26
|
+
meta?: unknown;
|
|
27
|
+
uid?: string | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
email: string;
|
|
30
|
+
cid: string;
|
|
31
|
+
etag: string;
|
|
32
|
+
extId: string;
|
|
33
|
+
id?: string | undefined;
|
|
34
|
+
createdAt?: string | undefined;
|
|
35
|
+
updatedAt?: string | undefined;
|
|
36
|
+
deletedAt?: string | null | undefined;
|
|
37
|
+
meta?: unknown;
|
|
38
|
+
uid?: string | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
export type StagedSaasUserUpsertDto = z.infer<typeof _StagedSaasUserUpsertDto>;
|
|
41
|
+
export type PlatformStagedSaasUserUpsertDto = StagedSaasUserUpsertDto & UpsertTenantBased;
|
|
42
|
+
export type PlatformStagedSaasUserDto = StagedSaasUserUpsertDto & TenantBased;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._StagedSaasUserUpsertDto = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const saasUsers_dto_1 = require("../saasUsers.dto");
|
|
6
|
+
exports._StagedSaasUserUpsertDto = saasUsers_dto_1._SaasUserUpsertDto.extend({
|
|
7
|
+
uid: zod_1.z.string().optional(),
|
|
8
|
+
});
|
|
3
9
|
//# sourceMappingURL=platform.saasUsers.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.saasUsers.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.saasUsers.dto.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"platform.saasUsers.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.saasUsers.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,oDAAuE;AAM1D,QAAA,wBAAwB,GAAG,kCAAkB,CAAC,MAAM,CAAC;IAChE,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3B,CAAC,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { AgentDto, AgentUpsertDto, AssetDto, ProviderDto, ReportResultDto, SaasA
|
|
|
2
2
|
import { AmpEntityService, AmpDataService, AmpReportService, AmpSettingsService, ConnectorsService, FindingsInsightsService, FindingsService, NotificationService, PredictionService } from '.';
|
|
3
3
|
import { AmpRestClientOptions, AgentIdentityService, ConnectorInstallService, EnumService, RestClient } from './rest';
|
|
4
4
|
import { UsersInsightsService } from './usersInsights.service';
|
|
5
|
+
import { FlowSpecsService } from './flowSpecs.service';
|
|
5
6
|
export type AmpApiOptions = AmpRestClientOptions;
|
|
6
7
|
/**
|
|
7
8
|
* AMP API
|
|
@@ -22,6 +23,7 @@ export declare class AmpApi {
|
|
|
22
23
|
readonly enums: EnumService;
|
|
23
24
|
readonly findings: FindingsService;
|
|
24
25
|
readonly findingsInsights: FindingsInsightsService;
|
|
26
|
+
readonly flowSpecs: FlowSpecsService;
|
|
25
27
|
readonly identity: AgentIdentityService;
|
|
26
28
|
readonly install: ConnectorInstallService;
|
|
27
29
|
readonly notifications: NotificationService;
|
|
@@ -5,6 +5,7 @@ const _1 = require(".");
|
|
|
5
5
|
const constants_1 = require("./constants");
|
|
6
6
|
const rest_1 = require("./rest");
|
|
7
7
|
const usersInsights_service_1 = require("./usersInsights.service");
|
|
8
|
+
const flowSpecs_service_1 = require("./flowSpecs.service");
|
|
8
9
|
/**
|
|
9
10
|
* AMP API
|
|
10
11
|
* This client is a wrapper around the AMP REST API meant to be used by
|
|
@@ -25,6 +26,7 @@ class AmpApi {
|
|
|
25
26
|
this.enums = new rest_1.DefaultEnumService(rest);
|
|
26
27
|
this.findings = new _1.FindingsService(rest);
|
|
27
28
|
this.findingsInsights = new _1.FindingsInsightsService(rest, constants_1.KIND.FINDINGS_INSIGHTS);
|
|
29
|
+
this.flowSpecs = new flowSpecs_service_1.FlowSpecsService(rest);
|
|
28
30
|
this.identity = new rest_1.AgentIdentityService(rest);
|
|
29
31
|
this.install = new rest_1.ConnectorInstallService(rest, constants_1.TARGET_API_AGENT);
|
|
30
32
|
this.notifications = new _1.NotificationService(rest);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmpApi.js","sourceRoot":"","sources":["../../../src/services/AmpApi.ts"],"names":[],"mappings":";;;AACA,wBAaW;AACX,2CAAmD;AACnD,iCAA0J;AAC1J,mEAA6D;
|
|
1
|
+
{"version":3,"file":"AmpApi.js","sourceRoot":"","sources":["../../../src/services/AmpApi.ts"],"names":[],"mappings":";;;AACA,wBAaW;AACX,2CAAmD;AACnD,iCAA0J;AAC1J,mEAA6D;AAC7D,2DAAqD;AAIrD;;;;;;;;;;;GAWG;AACH,MAAa,MAAM;IAuBjB,YAAY,IAAgB;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAoB,CAA2B,IAAI,EAAE,gBAAI,CAAC,MAAM,CAAC,CAAC;QACpF,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAkB,CAAW,IAAI,EAAE,gBAAI,CAAC,MAAM,CAAC,CAAC;QACjE,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAiB,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,KA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I,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;AAnDD,wBAmDC"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import {z} from 'zod';
|
|
2
|
+
import {SaasAssetDto, SaasAssetUpsertDto, _SaasAssetUpsertDto} from '../saasAssets.dto';
|
|
3
|
+
import {TenantBased, UpsertTenantBased, _UpsertTenantBased} from './tenant.based.dto';
|
|
3
4
|
|
|
4
5
|
export type PlatformSaasAssetUpsertDto = SaasAssetUpsertDto & UpsertTenantBased;
|
|
5
6
|
export type PlatformSaasAssetDto = SaasAssetDto & TenantBased;
|
|
7
|
+
|
|
8
|
+
export const _StagedSaasAssetUpsertDto = _SaasAssetUpsertDto.extend({
|
|
9
|
+
aid: z.string().optional(),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type StagedSaasAssetUpsertDto = z.infer<typeof _StagedSaasAssetUpsertDto>;
|
|
13
|
+
|
|
14
|
+
export type PlatformStagedSaasAssetUpsertDto = StagedSaasAssetUpsertDto & UpsertTenantBased;
|
|
15
|
+
export type PlatformStagedSaasAssetDto = StagedSaasAssetUpsertDto & TenantBased;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {z} from 'zod';
|
|
2
|
+
import {SaasUserUpsertDto, _SaasUserUpsertDto} from '../saasUsers.dto';
|
|
2
3
|
import {TenantBased, UpsertTenantBased} from './tenant.based.dto';
|
|
3
4
|
|
|
4
5
|
export type PlatformSaasUserUpsertDto = SaasUserUpsertDto & UpsertTenantBased;
|
|
5
|
-
|
|
6
6
|
export type PlatformSaasUserDto = SaasUserUpsertDto & TenantBased;
|
|
7
|
+
|
|
8
|
+
export const _StagedSaasUserUpsertDto = _SaasUserUpsertDto.extend({
|
|
9
|
+
uid: z.string().optional(),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type StagedSaasUserUpsertDto = z.infer<typeof _StagedSaasUserUpsertDto>;
|
|
13
|
+
|
|
14
|
+
export type PlatformStagedSaasUserUpsertDto = StagedSaasUserUpsertDto & UpsertTenantBased;
|
|
15
|
+
export type PlatformStagedSaasUserDto = StagedSaasUserUpsertDto & TenantBased;
|
package/src/services/AmpApi.ts
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
import {KIND, TARGET_API_AGENT} from './constants';
|
|
17
17
|
import {getAmpRestClient, AmpRestClientOptions, AgentIdentityService, ConnectorInstallService, DefaultEnumService, EnumService, RestClient} from './rest';
|
|
18
18
|
import {UsersInsightsService} from './usersInsights.service';
|
|
19
|
+
import {FlowSpecsService} from './flowSpecs.service';
|
|
19
20
|
|
|
20
21
|
export type AmpApiOptions = AmpRestClientOptions;
|
|
21
22
|
|
|
@@ -38,6 +39,7 @@ export class AmpApi {
|
|
|
38
39
|
readonly enums: EnumService;
|
|
39
40
|
readonly findings: FindingsService;
|
|
40
41
|
readonly findingsInsights: FindingsInsightsService;
|
|
42
|
+
readonly flowSpecs: FlowSpecsService;
|
|
41
43
|
readonly identity: AgentIdentityService;
|
|
42
44
|
readonly install: ConnectorInstallService;
|
|
43
45
|
readonly notifications: NotificationService;
|
|
@@ -60,6 +62,7 @@ export class AmpApi {
|
|
|
60
62
|
this.enums = new DefaultEnumService(rest);
|
|
61
63
|
this.findings = new FindingsService(rest);
|
|
62
64
|
this.findingsInsights = new FindingsInsightsService(rest, KIND.FINDINGS_INSIGHTS);
|
|
65
|
+
this.flowSpecs = new FlowSpecsService(rest);
|
|
63
66
|
this.identity = new AgentIdentityService(rest);
|
|
64
67
|
this.install = new ConnectorInstallService(rest, TARGET_API_AGENT);
|
|
65
68
|
this.notifications = new NotificationService(rest);
|