@ampsec/platform-client 74.10.0 → 74.11.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 (39) hide show
  1. package/build/src/dto/connectorSyncs.dto.d.ts +90 -0
  2. package/build/src/dto/connectorSyncs.dto.js +21 -0
  3. package/build/src/dto/connectorSyncs.dto.js.map +1 -0
  4. package/build/src/dto/enums/connectorSync.d.ts +9 -0
  5. package/build/src/dto/enums/connectorSync.js +15 -0
  6. package/build/src/dto/enums/connectorSync.js.map +1 -0
  7. package/build/src/dto/enums/index.d.ts +1 -0
  8. package/build/src/dto/enums/index.js +1 -0
  9. package/build/src/dto/enums/index.js.map +1 -1
  10. package/build/src/dto/findings.dto.d.ts +3 -3
  11. package/build/src/dto/flows.dto.d.ts +6 -6
  12. package/build/src/dto/index.d.ts +1 -0
  13. package/build/src/dto/index.js +1 -0
  14. package/build/src/dto/index.js.map +1 -1
  15. package/build/src/dto/platform/index.d.ts +1 -0
  16. package/build/src/dto/platform/index.js +1 -0
  17. package/build/src/dto/platform/index.js.map +1 -1
  18. package/build/src/dto/platform/platform.connectorSyncs.dto.d.ts +4 -0
  19. package/build/src/dto/platform/platform.connectorSyncs.dto.js +3 -0
  20. package/build/src/dto/platform/platform.connectorSyncs.dto.js.map +1 -0
  21. package/build/src/dto/platform/platform.findings.dto.d.ts +1 -1
  22. package/build/src/dto/platform/platform.flows.dto.d.ts +4 -4
  23. package/build/src/dto/providers.dto.d.ts +3 -0
  24. package/build/src/services/connectorSyncs.platform.service.d.ts +6 -0
  25. package/build/src/services/connectorSyncs.platform.service.js +12 -0
  26. package/build/src/services/connectorSyncs.platform.service.js.map +1 -0
  27. package/build/src/services/constants.d.ts +1 -0
  28. package/build/src/services/constants.js +1 -0
  29. package/build/src/services/constants.js.map +1 -1
  30. package/package.json +1 -1
  31. package/src/dto/connectorSyncs.dto.ts +28 -0
  32. package/src/dto/enums/connectorSync.ts +10 -0
  33. package/src/dto/enums/index.ts +1 -0
  34. package/src/dto/index.ts +1 -0
  35. package/src/dto/platform/index.ts +1 -0
  36. package/src/dto/platform/platform.connectorSyncs.dto.ts +6 -0
  37. package/src/dto/providers.dto.ts +3 -0
  38. package/src/services/connectorSyncs.platform.service.ts +10 -0
  39. package/src/services/constants.ts +1 -0
@@ -0,0 +1,90 @@
1
+ import { z } from 'zod';
2
+ import { ConnectorSyncKind, ConnectorSyncStatus } from './enums';
3
+ export declare const _ConnectorSyncUpsertDto: z.ZodObject<z.objectUtil.extendShape<{
4
+ id: z.ZodOptional<z.ZodString>;
5
+ createdAt: z.ZodOptional<z.ZodString>;
6
+ updatedAt: z.ZodOptional<z.ZodString>;
7
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
+ }, {
9
+ cid: z.ZodString;
10
+ kind: z.ZodNativeEnum<typeof ConnectorSyncKind>;
11
+ syncInterval: z.ZodString;
12
+ status: z.ZodOptional<z.ZodNativeEnum<typeof ConnectorSyncStatus>>;
13
+ lastSyncAt: z.ZodOptional<z.ZodString>;
14
+ syncResumeContext: z.ZodOptional<z.ZodUnknown>;
15
+ }>, "strip", z.ZodTypeAny, {
16
+ cid: string;
17
+ kind: ConnectorSyncKind;
18
+ syncInterval: string;
19
+ status?: ConnectorSyncStatus | undefined;
20
+ id?: string | undefined;
21
+ createdAt?: string | undefined;
22
+ updatedAt?: string | undefined;
23
+ deletedAt?: string | null | undefined;
24
+ lastSyncAt?: string | undefined;
25
+ syncResumeContext?: unknown;
26
+ }, {
27
+ cid: string;
28
+ kind: ConnectorSyncKind;
29
+ syncInterval: string;
30
+ status?: ConnectorSyncStatus | undefined;
31
+ id?: string | undefined;
32
+ createdAt?: string | undefined;
33
+ updatedAt?: string | undefined;
34
+ deletedAt?: string | null | undefined;
35
+ lastSyncAt?: string | undefined;
36
+ syncResumeContext?: unknown;
37
+ }>;
38
+ export type ConnectorSyncUpsertDto = z.infer<typeof _ConnectorSyncUpsertDto>;
39
+ export declare const _ConnectorSyncDto: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
40
+ id: z.ZodOptional<z.ZodString>;
41
+ createdAt: z.ZodOptional<z.ZodString>;
42
+ updatedAt: z.ZodOptional<z.ZodString>;
43
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ }, {
45
+ cid: z.ZodString;
46
+ kind: z.ZodNativeEnum<typeof ConnectorSyncKind>;
47
+ syncInterval: z.ZodString;
48
+ status: z.ZodOptional<z.ZodNativeEnum<typeof ConnectorSyncStatus>>;
49
+ lastSyncAt: z.ZodOptional<z.ZodString>;
50
+ syncResumeContext: z.ZodOptional<z.ZodUnknown>;
51
+ }>, {
52
+ id: z.ZodString;
53
+ createdAt: z.ZodString;
54
+ updatedAt: z.ZodString;
55
+ deletedAt: z.ZodNullable<z.ZodString>;
56
+ }>, "strip", z.ZodTypeAny, {
57
+ id: string;
58
+ cid: string;
59
+ createdAt: string;
60
+ updatedAt: string;
61
+ deletedAt: string | null;
62
+ kind: ConnectorSyncKind;
63
+ syncInterval: string;
64
+ status?: ConnectorSyncStatus | undefined;
65
+ lastSyncAt?: string | undefined;
66
+ syncResumeContext?: unknown;
67
+ }, {
68
+ id: string;
69
+ cid: string;
70
+ createdAt: string;
71
+ updatedAt: string;
72
+ deletedAt: string | null;
73
+ kind: ConnectorSyncKind;
74
+ syncInterval: string;
75
+ status?: ConnectorSyncStatus | undefined;
76
+ lastSyncAt?: string | undefined;
77
+ syncResumeContext?: unknown;
78
+ }>;
79
+ export type ConnectorSyncDto = z.infer<typeof _ConnectorSyncDto>;
80
+ export declare const _SyncConfig: z.ZodObject<{
81
+ kind: z.ZodNativeEnum<typeof ConnectorSyncKind>;
82
+ syncInterval: z.ZodString;
83
+ }, "strip", z.ZodTypeAny, {
84
+ kind: ConnectorSyncKind;
85
+ syncInterval: string;
86
+ }, {
87
+ kind: ConnectorSyncKind;
88
+ syncInterval: string;
89
+ }>;
90
+ export type SyncConfig = z.infer<typeof _SyncConfig>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports._SyncConfig = exports._ConnectorSyncDto = exports._ConnectorSyncUpsertDto = void 0;
4
+ const zod_1 = require("zod");
5
+ const base_dto_1 = require("./base.dto");
6
+ const enums_1 = require("./enums");
7
+ exports._ConnectorSyncUpsertDto = base_dto_1._BaseUpsertDto.merge(zod_1.z.object({
8
+ cid: zod_1.z.string(),
9
+ kind: zod_1.z.nativeEnum(enums_1.ConnectorSyncKind),
10
+ syncInterval: zod_1.z.string(),
11
+ status: zod_1.z.nativeEnum(enums_1.ConnectorSyncStatus).optional(),
12
+ lastSyncAt: zod_1.z.string().optional(),
13
+ // state/data required for next sync
14
+ syncResumeContext: zod_1.z.unknown().optional(),
15
+ }));
16
+ exports._ConnectorSyncDto = exports._ConnectorSyncUpsertDto.merge(base_dto_1._BaseDto);
17
+ exports._SyncConfig = zod_1.z.object({
18
+ kind: zod_1.z.nativeEnum(enums_1.ConnectorSyncKind),
19
+ syncInterval: zod_1.z.string(),
20
+ });
21
+ //# sourceMappingURL=connectorSyncs.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorSyncs.dto.js","sourceRoot":"","sources":["../../../src/dto/connectorSyncs.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAAoD;AACpD,mCAA+D;AAElD,QAAA,uBAAuB,GAAG,yBAAc,CAAC,KAAK,CACzD,OAAC,CAAC,MAAM,CAAC;IACP,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,yBAAiB,CAAC;IACrC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,2BAAmB,CAAC,CAAC,QAAQ,EAAE;IACpD,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,oCAAoC;IACpC,iBAAiB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC1C,CAAC,CACH,CAAC;AAIW,QAAA,iBAAiB,GAAG,+BAAuB,CAAC,KAAK,CAAC,mBAAQ,CAAC,CAAC;AAI5D,QAAA,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,yBAAiB,CAAC;IACrC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare enum ConnectorSyncKind {
2
+ PARTIAL = "PARTIAL",
3
+ FULL = "FULL"
4
+ }
5
+ export declare enum ConnectorSyncStatus {
6
+ SYNCING = "SYNCING",
7
+ SUCCESS = "SUCCESS",
8
+ FAILED = "FAILED"
9
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConnectorSyncStatus = exports.ConnectorSyncKind = void 0;
4
+ var ConnectorSyncKind;
5
+ (function (ConnectorSyncKind) {
6
+ ConnectorSyncKind["PARTIAL"] = "PARTIAL";
7
+ ConnectorSyncKind["FULL"] = "FULL";
8
+ })(ConnectorSyncKind || (exports.ConnectorSyncKind = ConnectorSyncKind = {}));
9
+ var ConnectorSyncStatus;
10
+ (function (ConnectorSyncStatus) {
11
+ ConnectorSyncStatus["SYNCING"] = "SYNCING";
12
+ ConnectorSyncStatus["SUCCESS"] = "SUCCESS";
13
+ ConnectorSyncStatus["FAILED"] = "FAILED";
14
+ })(ConnectorSyncStatus || (exports.ConnectorSyncStatus = ConnectorSyncStatus = {}));
15
+ //# sourceMappingURL=connectorSync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorSync.js","sourceRoot":"","sources":["../../../../src/dto/enums/connectorSync.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,kCAAa,CAAA;AACf,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAED,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,wCAAiB,CAAA;AACnB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B"}
@@ -5,6 +5,7 @@ export * from './callToAction.enum';
5
5
  export * from './category';
6
6
  export * from './computer.os.enum';
7
7
  export * from './connector.status';
8
+ export * from './connectorSync';
8
9
  export * from './contact.type';
9
10
  export * from './engagementChannelKind';
10
11
  export * from './findingBuckets';
@@ -21,6 +21,7 @@ __exportStar(require("./callToAction.enum"), exports);
21
21
  __exportStar(require("./category"), exports);
22
22
  __exportStar(require("./computer.os.enum"), exports);
23
23
  __exportStar(require("./connector.status"), exports);
24
+ __exportStar(require("./connectorSync"), exports);
24
25
  __exportStar(require("./contact.type"), exports);
25
26
  __exportStar(require("./engagementChannelKind"), exports);
26
27
  __exportStar(require("./findingBuckets"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,wDAAsC;AACtC,sDAAoC;AACpC,6CAA2B;AAC3B,qDAAmC;AACnC,qDAAmC;AACnC,iDAA+B;AAC/B,0DAAwC;AACxC,mDAAiC;AACjC,gDAA8B;AAC9B,oDAAkC;AAClC,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC;AAClC,qDAAmC;AACnC,oDAAkC;AAClC,wDAAsC;AACtC,mDAAiC;AACjC,8DAA4C;AAC5C,yDAAuC;AACvC,sDAAoC;AACpC,uDAAqC;AACrC,2DAAyC;AACzC,sDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,wDAAsC;AACtC,sDAAoC;AACpC,6CAA2B;AAC3B,qDAAmC;AACnC,qDAAmC;AACnC,kDAAgC;AAChC,iDAA+B;AAC/B,0DAAwC;AACxC,mDAAiC;AACjC,gDAA8B;AAC9B,oDAAkC;AAClC,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC;AAClC,qDAAmC;AACnC,oDAAkC;AAClC,wDAAsC;AACtC,mDAAiC;AACjC,8DAA4C;AAC5C,yDAAuC;AACvC,sDAAoC;AACpC,uDAAqC;AACrC,2DAAyC;AACzC,sDAAoC"}
@@ -83,17 +83,17 @@ export declare const _FindingBucketSummaryDto: z.ZodObject<{
83
83
  }, "strip", z.ZodTypeAny, {
84
84
  id: string;
85
85
  uid: string;
86
+ kind: string;
86
87
  score: number;
87
88
  key: string;
88
- kind: string;
89
89
  flowStateId: string | null;
90
90
  flowStateCreatedAt: string | null;
91
91
  }, {
92
92
  id: string;
93
93
  uid: string;
94
+ kind: string;
94
95
  score: number;
95
96
  key: string;
96
- kind: string;
97
97
  flowStateId: string | null;
98
98
  flowStateCreatedAt: string | null;
99
99
  }>;
@@ -392,8 +392,8 @@ export declare const _FindingSpecUpsertDto: z.ZodObject<{
392
392
  updatedAt: z.ZodOptional<z.ZodString>;
393
393
  deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
394
394
  displayValue: z.ZodString;
395
- score: z.ZodOptional<z.ZodNumber>;
396
395
  kind: z.ZodNativeEnum<typeof FindingSpecKind>;
396
+ score: z.ZodOptional<z.ZodNumber>;
397
397
  severity: z.ZodNativeEnum<typeof FindingSeverity>;
398
398
  eventType: z.ZodString;
399
399
  insights: z.ZodOptional<z.ZodObject<{
@@ -342,7 +342,7 @@ export declare const _FlowStateDto: z.ZodObject<z.objectUtil.extendShape<{
342
342
  }>, "many">;
343
343
  bucketKey: z.ZodOptional<z.ZodString>;
344
344
  }>, "strip", z.ZodTypeAny, {
345
- status: "RUNNING" | "SUCCESS" | "ERROR" | "CANCELLED" | "EXPIRED";
345
+ status: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED";
346
346
  id: string;
347
347
  createdAt: string;
348
348
  updatedAt: string;
@@ -380,7 +380,7 @@ export declare const _FlowStateDto: z.ZodObject<z.objectUtil.extendShape<{
380
380
  specStatus?: FlowSpecStatusKind | undefined;
381
381
  bucketKey?: string | undefined;
382
382
  }, {
383
- status: "RUNNING" | "SUCCESS" | "ERROR" | "CANCELLED" | "EXPIRED";
383
+ status: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED";
384
384
  id: string;
385
385
  createdAt: string;
386
386
  updatedAt: string;
@@ -559,7 +559,7 @@ export declare const _FlowStateUpsertDto: z.ZodObject<z.objectUtil.extendShape<z
559
559
  updatedAt: z.ZodOptional<z.ZodString>;
560
560
  deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
561
561
  }>, "strip", z.ZodTypeAny, {
562
- status: "RUNNING" | "SUCCESS" | "ERROR" | "CANCELLED" | "EXPIRED";
562
+ status: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED";
563
563
  nodeName: string;
564
564
  totalSteps: number;
565
565
  currentStep: number;
@@ -597,7 +597,7 @@ export declare const _FlowStateUpsertDto: z.ZodObject<z.objectUtil.extendShape<z
597
597
  specStatus?: FlowSpecStatusKind | undefined;
598
598
  bucketKey?: string | undefined;
599
599
  }, {
600
- status: "RUNNING" | "SUCCESS" | "ERROR" | "CANCELLED" | "EXPIRED";
600
+ status: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED";
601
601
  nodeName: string;
602
602
  totalSteps: number;
603
603
  currentStep: number;
@@ -658,7 +658,7 @@ export declare const _FlowStateFilter: z.ZodObject<z.objectUtil.extendShape<z.ob
658
658
  sort: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["ASC", "DESC"]>>>;
659
659
  }>, "strip", z.ZodTypeAny, {
660
660
  sort?: Record<string, "ASC" | "DESC"> | undefined;
661
- status?: "RUNNING" | "SUCCESS" | "ERROR" | "CANCELLED" | "EXPIRED" | undefined;
661
+ status?: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED" | undefined;
662
662
  limit?: number | undefined;
663
663
  offset?: number | undefined;
664
664
  id?: string | undefined;
@@ -676,7 +676,7 @@ export declare const _FlowStateFilter: z.ZodObject<z.objectUtil.extendShape<z.ob
676
676
  bucketKey?: string | undefined;
677
677
  }, {
678
678
  sort?: Record<string, "ASC" | "DESC"> | undefined;
679
- status?: "RUNNING" | "SUCCESS" | "ERROR" | "CANCELLED" | "EXPIRED" | undefined;
679
+ status?: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED" | undefined;
680
680
  limit?: number | undefined;
681
681
  offset?: number | undefined;
682
682
  id?: string | undefined;
@@ -3,6 +3,7 @@ export * from './assets.dto';
3
3
  export * from './assetKeys';
4
4
  export * from './base.dto';
5
5
  export * from './connectors.dto';
6
+ export * from './connectorSyncs.dto';
6
7
  export * from './constants';
7
8
  export * from './coverage.dto';
8
9
  export * from './customActions.dto';
@@ -19,6 +19,7 @@ __exportStar(require("./assets.dto"), exports);
19
19
  __exportStar(require("./assetKeys"), exports);
20
20
  __exportStar(require("./base.dto"), exports);
21
21
  __exportStar(require("./connectors.dto"), exports);
22
+ __exportStar(require("./connectorSyncs.dto"), exports);
22
23
  __exportStar(require("./constants"), exports);
23
24
  __exportStar(require("./coverage.dto"), exports);
24
25
  __exportStar(require("./customActions.dto"), exports);
@@ -1 +1 @@
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,8CAA4B;AAC5B,iDAA+B;AAC/B,sDAAoC;AACpC,qDAAmC;AACnC,yDAAuC;AACvC,wCAAsB;AACtB,2DAAyC;AACzC,gEAA8C;AAC9C,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,yDAAuC;AACvC,8CAA4B;AAC5B,wCAAsB;AACtB,gDAA8B;AAC9B,qDAAmC;AACnC,6CAA2B;AAC3B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,gDAA8B;AAC9B,oDAAkC;AAClC,+CAA6B;AAC7B,8CAA4B;AAC5B,sDAAoC;AACpC,+CAA6B;AAC7B,wDAAsC"}
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,uDAAqC;AACrC,8CAA4B;AAC5B,iDAA+B;AAC/B,sDAAoC;AACpC,qDAAmC;AACnC,yDAAuC;AACvC,wCAAsB;AACtB,2DAAyC;AACzC,gEAA8C;AAC9C,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,yDAAuC;AACvC,8CAA4B;AAC5B,wCAAsB;AACtB,gDAA8B;AAC9B,qDAAmC;AACnC,6CAA2B;AAC3B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC;AAChC,mDAAiC;AACjC,gDAA8B;AAC9B,oDAAkC;AAClC,+CAA6B;AAC7B,8CAA4B;AAC5B,sDAAoC;AACpC,+CAA6B;AAC7B,wDAAsC"}
@@ -1,6 +1,7 @@
1
1
  export * from './platform.agents.dto';
2
2
  export * from './platform.assets.dto';
3
3
  export * from './platform.connectors.dto';
4
+ export * from './platform.connectorSyncs.dto';
4
5
  export * from './platform.customActions.dto';
5
6
  export * from './platform.customScores.dto';
6
7
  export * from './platform.engagementContexts.dto';
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./platform.agents.dto"), exports);
18
18
  __exportStar(require("./platform.assets.dto"), exports);
19
19
  __exportStar(require("./platform.connectors.dto"), exports);
20
+ __exportStar(require("./platform.connectorSyncs.dto"), exports);
20
21
  __exportStar(require("./platform.customActions.dto"), exports);
21
22
  __exportStar(require("./platform.customScores.dto"), exports);
22
23
  __exportStar(require("./platform.engagementContexts.dto"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,wDAAsC;AACtC,4DAA0C;AAC1C,+DAA6C;AAC7C,8DAA4C;AAC5C,oEAAkD;AAClD,yEAAuD;AACvD,kEAAgD;AAChD,0DAAwC;AACxC,uDAAqC;AACrC,mEAAiD;AACjD,yDAAuC;AACvC,8DAA4C;AAC5C,2DAAyC;AACzC,+DAA6C;AAC7C,iEAA+C;AAC/C,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,6DAA2C;AAC3C,wDAAsC;AACtC,uDAAqC;AACrC,qDAAmC;AACnC,iEAA+C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,wDAAsC;AACtC,4DAA0C;AAC1C,gEAA8C;AAC9C,+DAA6C;AAC7C,8DAA4C;AAC5C,oEAAkD;AAClD,yEAAuD;AACvD,kEAAgD;AAChD,0DAAwC;AACxC,uDAAqC;AACrC,mEAAiD;AACjD,yDAAuC;AACvC,8DAA4C;AAC5C,2DAAyC;AACzC,+DAA6C;AAC7C,iEAA+C;AAC/C,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,6DAA2C;AAC3C,wDAAsC;AACtC,uDAAqC;AACrC,qDAAmC;AACnC,iEAA+C"}
@@ -0,0 +1,4 @@
1
+ import { ConnectorSyncDto, ConnectorSyncUpsertDto } from '../connectorSyncs.dto';
2
+ import { TenantBased, UpsertTenantBased } from './tenant.based.dto';
3
+ export type PlatformConnectorSyncUpsertDto = ConnectorSyncUpsertDto & UpsertTenantBased;
4
+ export type PlatformConnectorSyncDto = ConnectorSyncDto & TenantBased;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=platform.connectorSyncs.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.connectorSyncs.dto.js","sourceRoot":"","sources":["../../../../src/dto/platform/platform.connectorSyncs.dto.ts"],"names":[],"mappings":""}
@@ -202,8 +202,8 @@ export declare const _PlatformFindingSpecUpsertDto: z.ZodObject<z.objectUtil.ext
202
202
  updatedAt: z.ZodOptional<z.ZodString>;
203
203
  deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
204
204
  displayValue: z.ZodString;
205
- score: z.ZodOptional<z.ZodNumber>;
206
205
  kind: z.ZodNativeEnum<typeof import("..").FindingSpecKind>;
206
+ score: z.ZodOptional<z.ZodNumber>;
207
207
  severity: z.ZodNativeEnum<typeof import("..").FindingSeverity>;
208
208
  eventType: z.ZodString;
209
209
  insights: z.ZodOptional<z.ZodObject<{
@@ -1110,7 +1110,7 @@ export declare const _PlatformFlowStateUpsertDto: z.ZodObject<z.objectUtil.exten
1110
1110
  updatedAt: z.ZodOptional<z.ZodString>;
1111
1111
  deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1112
1112
  }>, "strip", z.ZodTypeAny, {
1113
- status: "RUNNING" | "SUCCESS" | "ERROR" | "CANCELLED" | "EXPIRED";
1113
+ status: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED";
1114
1114
  nodeName: string;
1115
1115
  totalSteps: number;
1116
1116
  currentStep: number;
@@ -1149,7 +1149,7 @@ export declare const _PlatformFlowStateUpsertDto: z.ZodObject<z.objectUtil.exten
1149
1149
  specStatus?: FlowSpecStatusKind | undefined;
1150
1150
  bucketKey?: string | undefined;
1151
1151
  }, {
1152
- status: "RUNNING" | "SUCCESS" | "ERROR" | "CANCELLED" | "EXPIRED";
1152
+ status: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED";
1153
1153
  nodeName: string;
1154
1154
  totalSteps: number;
1155
1155
  currentStep: number;
@@ -1330,7 +1330,7 @@ export declare const _PlatformFlowStateDto: z.ZodObject<z.objectUtil.extendShape
1330
1330
  }, {
1331
1331
  tid: z.ZodString;
1332
1332
  }>>, "strip", z.ZodTypeAny, {
1333
- status: "RUNNING" | "SUCCESS" | "ERROR" | "CANCELLED" | "EXPIRED";
1333
+ status: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED";
1334
1334
  id: string;
1335
1335
  tid: string;
1336
1336
  createdAt: string;
@@ -1369,7 +1369,7 @@ export declare const _PlatformFlowStateDto: z.ZodObject<z.objectUtil.extendShape
1369
1369
  specStatus?: FlowSpecStatusKind | undefined;
1370
1370
  bucketKey?: string | undefined;
1371
1371
  }, {
1372
- status: "RUNNING" | "SUCCESS" | "ERROR" | "CANCELLED" | "EXPIRED";
1372
+ status: "SUCCESS" | "RUNNING" | "ERROR" | "CANCELLED" | "EXPIRED";
1373
1373
  id: string;
1374
1374
  tid: string;
1375
1375
  createdAt: string;
@@ -1,4 +1,5 @@
1
1
  import { BaseDto, BaseUpsertDto } from './base.dto';
2
+ import { SyncConfig } from './connectorSyncs.dto';
2
3
  import { Category } from './enums';
3
4
  export type SimpleProviderDto = {
4
5
  id?: string;
@@ -10,5 +11,7 @@ export type ProviderUpsertDto = BaseUpsertDto & {
10
11
  displayValue: string;
11
12
  /** Categories for this provider */
12
13
  categories: Category[];
14
+ /** Syncs supported by provider */
15
+ supportedSyncConfigs?: SyncConfig[];
13
16
  };
14
17
  export type ProviderDto = BaseDto & ProviderUpsertDto;
@@ -0,0 +1,6 @@
1
+ import { PlatformConnectorSyncDto, PlatformConnectorSyncUpsertDto } from '../dto';
2
+ import { AmpEntityServiceImpl } from './entity.service';
3
+ import { RestClient } from './rest';
4
+ export declare class PlatformConnectorSyncService extends AmpEntityServiceImpl<PlatformConnectorSyncUpsertDto, PlatformConnectorSyncDto> {
5
+ constructor(rest: RestClient);
6
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlatformConnectorSyncService = void 0;
4
+ const constants_1 = require("./constants");
5
+ const entity_service_1 = require("./entity.service");
6
+ class PlatformConnectorSyncService extends entity_service_1.AmpEntityServiceImpl {
7
+ constructor(rest) {
8
+ super(rest, constants_1.KIND.CONNECTOR_SYNCS, constants_1.TARGET_API_PLATFORM);
9
+ }
10
+ }
11
+ exports.PlatformConnectorSyncService = PlatformConnectorSyncService;
12
+ //# sourceMappingURL=connectorSyncs.platform.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorSyncs.platform.service.js","sourceRoot":"","sources":["../../../src/services/connectorSyncs.platform.service.ts"],"names":[],"mappings":";;;AACA,2CAAsD;AACtD,qDAAsD;AAGtD,MAAa,4BAA6B,SAAQ,qCAA8E;IAC9H,YAAY,IAAgB;QAC1B,KAAK,CAAC,IAAI,EAAE,gBAAI,CAAC,eAAe,EAAE,+BAAmB,CAAC,CAAC;IACzD,CAAC;CACF;AAJD,oEAIC"}
@@ -10,6 +10,7 @@ export declare const KIND: {
10
10
  AGENTS: string;
11
11
  ASSETS: string;
12
12
  CONNECTORS: string;
13
+ CONNECTOR_SYNCS: string;
13
14
  CUSTOM_ACTIONS: string;
14
15
  CUSTOM_SCORE_COHORTS: string;
15
16
  CUSTOM_SCORE_VALUES: string;
@@ -9,6 +9,7 @@ exports.KIND = {
9
9
  AGENTS: 'agents',
10
10
  ASSETS: 'assets',
11
11
  CONNECTORS: 'connectors',
12
+ CONNECTOR_SYNCS: 'connector_syncs',
12
13
  CUSTOM_ACTIONS: 'custom_actions',
13
14
  CUSTOM_SCORE_COHORTS: 'custom_score_cohorts',
14
15
  CUSTOM_SCORE_VALUES: 'custom_score_values',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/services/constants.ts"],"names":[],"mappings":";;;AAIa,QAAA,2BAA2B,GAAG,CAAC,CAAC;AAGhC,QAAA,mBAAmB,GAAc,UAAU,CAAC;AAC5C,QAAA,gBAAgB,GAAc,KAAK,CAAC;AACpC,QAAA,iBAAiB,GAAc,KAAK,CAAC;AAErC,QAAA,IAAI,GAAG;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;IACxB,cAAc,EAAE,gBAAgB;IAChC,oBAAoB,EAAE,sBAAsB;IAC5C,mBAAmB,EAAE,qBAAqB;IAC1C,wBAAwB,EAAE,0BAA0B;IACpD,gBAAgB,EAAE,aAAa;IAC/B,kBAAkB,EAAE,eAAe;IACnC,WAAW,EAAE,QAAQ;IACrB,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,mBAAmB;IACtC,aAAa,EAAE,gBAAgB;IAC/B,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,UAAU;IACpB,cAAc,EAAE,gBAAgB;IAChC,QAAQ,EAAE,MAAM;IAChB,aAAa,EAAE,eAAe;IAC9B,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;IACtC,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,iBAAiB;IAClC,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,oBAAoB;IACxC,sBAAsB,EAAE,wBAAwB;IAChD,iBAAiB,EAAE,mBAAmB;IACtC,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,UAAU;IAC1B,iBAAiB,EAAE,mBAAmB;IACtC,gBAAgB,EAAE,mBAAmB;CACtC,CAAC;AAEW,QAAA,OAAO,GAAG;IACrB,YAAY,EAAE,cAAc;IAC5B,yBAAyB,EAAE,qCAAqC;IAChE,yBAAyB,EAAE,qCAAqC;IAChE,gBAAgB,EAAE,kBAAkB;IACpC,iBAAiB,EAAE,mBAAmB;IACtC,qBAAqB,EAAE,uBAAuB;IAC9C,2BAA2B,EAAE,6BAA6B;IAC1D,YAAY,EAAE,0BAA0B;IACxC,qBAAqB,EAAE,uBAAuB;IAC9C,gBAAgB,EAAE,kBAAkB;IACpC,WAAW,EAAE,aAAa;IAC1B,mBAAmB;IACnB,kBAAkB,EAAE,sBAAsB;CAC3C,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/services/constants.ts"],"names":[],"mappings":";;;AAIa,QAAA,2BAA2B,GAAG,CAAC,CAAC;AAGhC,QAAA,mBAAmB,GAAc,UAAU,CAAC;AAC5C,QAAA,gBAAgB,GAAc,KAAK,CAAC;AACpC,QAAA,iBAAiB,GAAc,KAAK,CAAC;AAErC,QAAA,IAAI,GAAG;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;IACxB,eAAe,EAAE,iBAAiB;IAClC,cAAc,EAAE,gBAAgB;IAChC,oBAAoB,EAAE,sBAAsB;IAC5C,mBAAmB,EAAE,qBAAqB;IAC1C,wBAAwB,EAAE,0BAA0B;IACpD,gBAAgB,EAAE,aAAa;IAC/B,kBAAkB,EAAE,eAAe;IACnC,WAAW,EAAE,QAAQ;IACrB,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,mBAAmB;IACtC,aAAa,EAAE,gBAAgB;IAC/B,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,UAAU;IACpB,cAAc,EAAE,gBAAgB;IAChC,QAAQ,EAAE,MAAM;IAChB,aAAa,EAAE,eAAe;IAC9B,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;IACtC,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,iBAAiB;IAClC,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,oBAAoB;IACxC,sBAAsB,EAAE,wBAAwB;IAChD,iBAAiB,EAAE,mBAAmB;IACtC,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,UAAU;IAC1B,iBAAiB,EAAE,mBAAmB;IACtC,gBAAgB,EAAE,mBAAmB;CACtC,CAAC;AAEW,QAAA,OAAO,GAAG;IACrB,YAAY,EAAE,cAAc;IAC5B,yBAAyB,EAAE,qCAAqC;IAChE,yBAAyB,EAAE,qCAAqC;IAChE,gBAAgB,EAAE,kBAAkB;IACpC,iBAAiB,EAAE,mBAAmB;IACtC,qBAAqB,EAAE,uBAAuB;IAC9C,2BAA2B,EAAE,6BAA6B;IAC1D,YAAY,EAAE,0BAA0B;IACxC,qBAAqB,EAAE,uBAAuB;IAC9C,gBAAgB,EAAE,kBAAkB;IACpC,WAAW,EAAE,aAAa;IAC1B,mBAAmB;IACnB,kBAAkB,EAAE,sBAAsB;CAC3C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "74.10.0",
3
+ "version": "74.11.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -0,0 +1,28 @@
1
+ import {z} from 'zod';
2
+ import {_BaseDto, _BaseUpsertDto} from './base.dto';
3
+ import {ConnectorSyncKind, ConnectorSyncStatus} from './enums';
4
+
5
+ export const _ConnectorSyncUpsertDto = _BaseUpsertDto.merge(
6
+ z.object({
7
+ cid: z.string(),
8
+ kind: z.nativeEnum(ConnectorSyncKind),
9
+ syncInterval: z.string(),
10
+ status: z.nativeEnum(ConnectorSyncStatus).optional(),
11
+ lastSyncAt: z.string().optional(),
12
+ // state/data required for next sync
13
+ syncResumeContext: z.unknown().optional(),
14
+ })
15
+ );
16
+
17
+ export type ConnectorSyncUpsertDto = z.infer<typeof _ConnectorSyncUpsertDto>;
18
+
19
+ export const _ConnectorSyncDto = _ConnectorSyncUpsertDto.merge(_BaseDto);
20
+
21
+ export type ConnectorSyncDto = z.infer<typeof _ConnectorSyncDto>;
22
+
23
+ export const _SyncConfig = z.object({
24
+ kind: z.nativeEnum(ConnectorSyncKind),
25
+ syncInterval: z.string(),
26
+ });
27
+
28
+ export type SyncConfig = z.infer<typeof _SyncConfig>;
@@ -0,0 +1,10 @@
1
+ export enum ConnectorSyncKind {
2
+ PARTIAL = 'PARTIAL',
3
+ FULL = 'FULL',
4
+ }
5
+
6
+ export enum ConnectorSyncStatus {
7
+ SYNCING = 'SYNCING',
8
+ SUCCESS = 'SUCCESS',
9
+ FAILED = 'FAILED',
10
+ }
@@ -5,6 +5,7 @@ export * from './callToAction.enum';
5
5
  export * from './category';
6
6
  export * from './computer.os.enum';
7
7
  export * from './connector.status';
8
+ export * from './connectorSync';
8
9
  export * from './contact.type';
9
10
  export * from './engagementChannelKind';
10
11
  export * from './findingBuckets';
package/src/dto/index.ts CHANGED
@@ -3,6 +3,7 @@ export * from './assets.dto';
3
3
  export * from './assetKeys';
4
4
  export * from './base.dto';
5
5
  export * from './connectors.dto';
6
+ export * from './connectorSyncs.dto';
6
7
  export * from './constants';
7
8
  export * from './coverage.dto';
8
9
  export * from './customActions.dto';
@@ -1,6 +1,7 @@
1
1
  export * from './platform.agents.dto';
2
2
  export * from './platform.assets.dto';
3
3
  export * from './platform.connectors.dto';
4
+ export * from './platform.connectorSyncs.dto';
4
5
  export * from './platform.customActions.dto';
5
6
  export * from './platform.customScores.dto';
6
7
  export * from './platform.engagementContexts.dto';
@@ -0,0 +1,6 @@
1
+ import {ConnectorSyncDto, ConnectorSyncUpsertDto} from '../connectorSyncs.dto';
2
+ import {TenantBased, UpsertTenantBased} from './tenant.based.dto';
3
+
4
+ export type PlatformConnectorSyncUpsertDto = ConnectorSyncUpsertDto & UpsertTenantBased;
5
+
6
+ export type PlatformConnectorSyncDto = ConnectorSyncDto & TenantBased;
@@ -1,4 +1,5 @@
1
1
  import {BaseDto, BaseUpsertDto} from './base.dto';
2
+ import {SyncConfig} from './connectorSyncs.dto';
2
3
  import {Category} from './enums';
3
4
 
4
5
  export type SimpleProviderDto = {
@@ -12,6 +13,8 @@ export type ProviderUpsertDto = BaseUpsertDto & {
12
13
  displayValue: string;
13
14
  /** Categories for this provider */
14
15
  categories: Category[];
16
+ /** Syncs supported by provider */
17
+ supportedSyncConfigs?: SyncConfig[];
15
18
  };
16
19
 
17
20
  export type ProviderDto = BaseDto & ProviderUpsertDto;
@@ -0,0 +1,10 @@
1
+ import {PlatformConnectorSyncDto, PlatformConnectorSyncUpsertDto} from '../dto';
2
+ import {KIND, TARGET_API_PLATFORM} from './constants';
3
+ import {AmpEntityServiceImpl} from './entity.service';
4
+ import {RestClient} from './rest';
5
+
6
+ export class PlatformConnectorSyncService extends AmpEntityServiceImpl<PlatformConnectorSyncUpsertDto, PlatformConnectorSyncDto> {
7
+ constructor(rest: RestClient) {
8
+ super(rest, KIND.CONNECTOR_SYNCS, TARGET_API_PLATFORM);
9
+ }
10
+ }
@@ -13,6 +13,7 @@ export const KIND = {
13
13
  AGENTS: 'agents',
14
14
  ASSETS: 'assets',
15
15
  CONNECTORS: 'connectors',
16
+ CONNECTOR_SYNCS: 'connector_syncs',
16
17
  CUSTOM_ACTIONS: 'custom_actions',
17
18
  CUSTOM_SCORE_COHORTS: 'custom_score_cohorts',
18
19
  CUSTOM_SCORE_VALUES: 'custom_score_values',