vanta-auditor-api-sdk 0.7.1 → 0.7.3
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/docs/sdks/audits/README.md +20 -10
- package/funcs/auditsGetInformationRequestTestSnapshotEvidenceDetail.d.ts +17 -9
- package/funcs/auditsGetInformationRequestTestSnapshotEvidenceDetail.d.ts.map +1 -1
- package/funcs/auditsGetInformationRequestTestSnapshotEvidenceDetail.js +17 -9
- package/funcs/auditsGetInformationRequestTestSnapshotEvidenceDetail.js.map +1 -1
- package/funcs/auditsListAuditIssues.d.ts +2 -0
- package/funcs/auditsListAuditIssues.d.ts.map +1 -1
- package/funcs/auditsListAuditIssues.js +6 -0
- package/funcs/auditsListAuditIssues.js.map +1 -1
- package/funcs/auditsListCodeChanges.d.ts +1 -1
- package/funcs/auditsListCodeChanges.js +3 -3
- package/funcs/auditsListCodeChanges.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/index.d.ts +5 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +5 -0
- package/models/components/index.js.map +1 -1
- package/models/components/issuesnapshotitemorderby.d.ts +1 -0
- package/models/components/issuesnapshotitemorderby.d.ts.map +1 -1
- package/models/components/issuesnapshotitemorderby.js +1 -0
- package/models/components/issuesnapshotitemorderby.js.map +1 -1
- package/models/components/vantatestsnapshotapirequest.d.ts +20 -0
- package/models/components/vantatestsnapshotapirequest.d.ts.map +1 -0
- package/models/components/vantatestsnapshotapirequest.js +57 -0
- package/models/components/vantatestsnapshotapirequest.js.map +1 -0
- package/models/components/vantatestsnapshotevidencedetail.d.ts +19 -0
- package/models/components/vantatestsnapshotevidencedetail.d.ts.map +1 -1
- package/models/components/vantatestsnapshotevidencedetail.js +5 -0
- package/models/components/vantatestsnapshotevidencedetail.js.map +1 -1
- package/models/components/vantatestsnapshotexcludeditem.d.ts +11 -0
- package/models/components/vantatestsnapshotexcludeditem.d.ts.map +1 -0
- package/models/components/vantatestsnapshotexcludeditem.js +51 -0
- package/models/components/vantatestsnapshotexcludeditem.js.map +1 -0
- package/models/components/vantatestsnapshotexcludeditemgroup.d.ts +12 -0
- package/models/components/vantatestsnapshotexcludeditemgroup.d.ts.map +1 -0
- package/models/components/vantatestsnapshotexcludeditemgroup.js +52 -0
- package/models/components/vantatestsnapshotexcludeditemgroup.js.map +1 -0
- package/models/components/vantatestsnapshotframeworkexclusion.d.ts +13 -0
- package/models/components/vantatestsnapshotframeworkexclusion.d.ts.map +1 -0
- package/models/components/vantatestsnapshotframeworkexclusion.js +53 -0
- package/models/components/vantatestsnapshotframeworkexclusion.js.map +1 -0
- package/models/components/vantatestsnapshotoutofscoperesources.d.ts +21 -0
- package/models/components/vantatestsnapshotoutofscoperesources.d.ts.map +1 -0
- package/models/components/vantatestsnapshotoutofscoperesources.js +53 -0
- package/models/components/vantatestsnapshotoutofscoperesources.js.map +1 -0
- package/models/operations/listauditissues.d.ts +21 -1
- package/models/operations/listauditissues.d.ts.map +1 -1
- package/models/operations/listauditissues.js +4 -0
- package/models/operations/listauditissues.js.map +1 -1
- package/models/operations/listcodechanges.d.ts +4 -4
- package/models/operations/listcodechanges.d.ts.map +1 -1
- package/models/operations/listcodechanges.js +2 -2
- package/models/operations/listcodechanges.js.map +1 -1
- package/package.json +1 -1
- package/sdk/audits.d.ts +20 -10
- package/sdk/audits.d.ts.map +1 -1
- package/sdk/audits.js +20 -10
- package/sdk/audits.js.map +1 -1
- package/src/funcs/auditsGetInformationRequestTestSnapshotEvidenceDetail.ts +17 -9
- package/src/funcs/auditsListAuditIssues.ts +6 -0
- package/src/funcs/auditsListCodeChanges.ts +3 -3
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +5 -0
- package/src/models/components/issuesnapshotitemorderby.ts +1 -0
- package/src/models/components/vantatestsnapshotapirequest.ts +48 -0
- package/src/models/components/vantatestsnapshotevidencedetail.ts +28 -0
- package/src/models/components/vantatestsnapshotexcludeditem.ts +33 -0
- package/src/models/components/vantatestsnapshotexcludeditemgroup.ts +38 -0
- package/src/models/components/vantatestsnapshotframeworkexclusion.ts +40 -0
- package/src/models/components/vantatestsnapshotoutofscoperesources.ts +50 -0
- package/src/models/operations/listauditissues.ts +25 -1
- package/src/models/operations/listcodechanges.ts +6 -6
- package/src/sdk/audits.ts +20 -10
|
@@ -32,17 +32,25 @@ import { Result } from "../types/fp.js";
|
|
|
32
32
|
* @remarks
|
|
33
33
|
* Retrieves the rich detail for a single VANTA_TEST_SNAPSHOT evidence row
|
|
34
34
|
* attached to an information request. The response includes test-level
|
|
35
|
-
* metadata (description, integrations, SLA)
|
|
36
|
-
* at snapshot time,
|
|
37
|
-
*
|
|
35
|
+
* metadata (description, integrations, SLA), the raw test data captured
|
|
36
|
+
* at snapshot time, and the resources that were excluded from the test
|
|
37
|
+
* (out-of-scope resources).
|
|
38
38
|
*
|
|
39
|
-
* For structured snapshots, the array contains one row per
|
|
40
|
-
* test ran against; each row carries `resourceId`,
|
|
41
|
-
* raw JSON for that resource.
|
|
39
|
+
* For structured snapshots, the `rawTestData` array contains one row per
|
|
40
|
+
* resource the test ran against; each row carries `resourceId`,
|
|
41
|
+
* `resourceType`, and the raw JSON for that resource.
|
|
42
42
|
*
|
|
43
|
-
* For unstructured snapshots, the array contains a single
|
|
44
|
-
* `resourceId` and `resourceType` set to `null` and `rawJson`
|
|
45
|
-
* the entire test-run JSON blob.
|
|
43
|
+
* For unstructured snapshots, the `rawTestData` array contains a single
|
|
44
|
+
* row with `resourceId` and `resourceType` set to `null` and `rawJson`
|
|
45
|
+
* containing the entire test-run JSON blob.
|
|
46
|
+
*
|
|
47
|
+
* The `outOfScopeResources` field lists resources excluded at the test
|
|
48
|
+
* level (customer-disabled) and the framework level (segment
|
|
49
|
+
* configuration). Empty exclusion groups are filtered out.
|
|
50
|
+
*
|
|
51
|
+
* The `apiRequests` array contains the HTTP requests captured during API
|
|
52
|
+
* introspection tests. Empty when the test does not perform API
|
|
53
|
+
* introspection.
|
|
46
54
|
*/
|
|
47
55
|
export function auditsGetInformationRequestTestSnapshotEvidenceDetail(
|
|
48
56
|
client: VantaCore,
|
|
@@ -39,6 +39,8 @@ import { Result } from "../types/fp.js";
|
|
|
39
39
|
* Supports filtering by:
|
|
40
40
|
* - `search`: full text search across issue title and description
|
|
41
41
|
* - `snapshotId`: filtering to a specific snapshot or snapshots, which represent point-in-time captures of issues. Use the GET /audits/{auditId}/issues/snapshots endpoint to retrieve snapshot IDs and metadata.
|
|
42
|
+
* - `createdAfterDate` / `createdBeforeDate`: filter to issues created within a date range (inclusive)
|
|
43
|
+
* - `detectedAfterDate` / `detectedBeforeDate`: filter to issues detected within a date range (inclusive)
|
|
42
44
|
*
|
|
43
45
|
* Results are sorted by issue creation date in descending order (newest first) by default.
|
|
44
46
|
* Use `orderBy` and `orderDirection` to customize sorting.
|
|
@@ -113,6 +115,10 @@ async function $do(
|
|
|
113
115
|
const path = pathToFunc("/audits/{auditId}/issues/items")(pathParams);
|
|
114
116
|
|
|
115
117
|
const query = encodeFormQuery({
|
|
118
|
+
"createdAfterDate": payload.createdAfterDate,
|
|
119
|
+
"createdBeforeDate": payload.createdBeforeDate,
|
|
120
|
+
"detectedAfterDate": payload.detectedAfterDate,
|
|
121
|
+
"detectedBeforeDate": payload.detectedBeforeDate,
|
|
116
122
|
"orderBy": payload.orderBy,
|
|
117
123
|
"orderDirection": payload.orderDirection,
|
|
118
124
|
"pageCursor": payload.pageCursor,
|
|
@@ -38,7 +38,7 @@ import { Result } from "../types/fp.js";
|
|
|
38
38
|
* Supports filtering by:
|
|
39
39
|
* - `search`: Searches code change titles and repository names (case-insensitive)
|
|
40
40
|
* - `sourcesMatchesAny`: Filters by version control source (accepted values: github, gitlab, bitbucket, azuredevops)
|
|
41
|
-
* - `
|
|
41
|
+
* - `closedAfterDate` / `closedBeforeDate`: Filters by the closed date range
|
|
42
42
|
*
|
|
43
43
|
* Uses cursor-based pagination. To paginate:
|
|
44
44
|
* 1. Make initial request with desired `pageSize`
|
|
@@ -112,12 +112,12 @@ async function $do(
|
|
|
112
112
|
const path = pathToFunc("/audits/{auditId}/assets/code-changes")(pathParams);
|
|
113
113
|
|
|
114
114
|
const query = encodeFormQuery({
|
|
115
|
-
"
|
|
115
|
+
"closedAfterDate": payload.closedAfterDate,
|
|
116
|
+
"closedBeforeDate": payload.closedBeforeDate,
|
|
116
117
|
"pageCursor": payload.pageCursor,
|
|
117
118
|
"pageSize": payload.pageSize,
|
|
118
119
|
"search": payload.search,
|
|
119
120
|
"sourcesMatchesAny": payload.sourcesMatchesAny,
|
|
120
|
-
"startDate": payload.startDate,
|
|
121
121
|
});
|
|
122
122
|
|
|
123
123
|
const headers = new Headers(compactMap({
|
package/src/lib/config.ts
CHANGED
|
@@ -65,8 +65,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.0.0",
|
|
68
|
-
sdkVersion: "0.7.
|
|
69
|
-
genVersion: "2.
|
|
68
|
+
sdkVersion: "0.7.3",
|
|
69
|
+
genVersion: "2.893.0",
|
|
70
70
|
userAgent:
|
|
71
|
-
"speakeasy-sdk/typescript 0.7.
|
|
71
|
+
"speakeasy-sdk/typescript 0.7.3 2.893.0 1.0.0 vanta-auditor-api-sdk",
|
|
72
72
|
} as const;
|
|
@@ -142,9 +142,14 @@ export * from "./vantapolicyevidence.js";
|
|
|
142
142
|
export * from "./vantatestevidence.js";
|
|
143
143
|
export * from "./vantatestfiletype.js";
|
|
144
144
|
export * from "./vantatestrunstatus.js";
|
|
145
|
+
export * from "./vantatestsnapshotapirequest.js";
|
|
145
146
|
export * from "./vantatestsnapshotevidence.js";
|
|
146
147
|
export * from "./vantatestsnapshotevidencedetail.js";
|
|
148
|
+
export * from "./vantatestsnapshotexcludeditem.js";
|
|
149
|
+
export * from "./vantatestsnapshotexcludeditemgroup.js";
|
|
150
|
+
export * from "./vantatestsnapshotframeworkexclusion.js";
|
|
147
151
|
export * from "./vantatestsnapshotintegration.js";
|
|
152
|
+
export * from "./vantatestsnapshotoutofscoperesources.js";
|
|
148
153
|
export * from "./vantatestsnapshotrawtestdatarow.js";
|
|
149
154
|
export * from "./vendor.js";
|
|
150
155
|
export * from "./vendordecisionstatus.js";
|
|
@@ -11,6 +11,7 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
11
11
|
export const IssueSnapshotItemOrderBy = {
|
|
12
12
|
CreatedAt: "createdAt",
|
|
13
13
|
LastModifiedAt: "lastModifiedAt",
|
|
14
|
+
DetectedAt: "detectedAt",
|
|
14
15
|
} as const;
|
|
15
16
|
/**
|
|
16
17
|
* Allowed values for the `orderBy` query parameter on issue snapshot item endpoints.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A single API request captured during an API introspection test run.
|
|
12
|
+
*/
|
|
13
|
+
export type VantaTestSnapshotApiRequest = {
|
|
14
|
+
id: string;
|
|
15
|
+
resourceType: string;
|
|
16
|
+
resourceTypeDisplayName: string;
|
|
17
|
+
requestMethod: string;
|
|
18
|
+
url: string;
|
|
19
|
+
responseCode: number;
|
|
20
|
+
timestamp: Date;
|
|
21
|
+
dataTooLarge: boolean;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const VantaTestSnapshotApiRequest$inboundSchema: z.ZodType<
|
|
26
|
+
VantaTestSnapshotApiRequest,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
id: z.string(),
|
|
31
|
+
resourceType: z.string(),
|
|
32
|
+
resourceTypeDisplayName: z.string(),
|
|
33
|
+
requestMethod: z.string(),
|
|
34
|
+
url: z.string(),
|
|
35
|
+
responseCode: z.number(),
|
|
36
|
+
timestamp: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
37
|
+
dataTooLarge: z.boolean(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export function vantaTestSnapshotApiRequestFromJSON(
|
|
41
|
+
jsonString: string,
|
|
42
|
+
): SafeParseResult<VantaTestSnapshotApiRequest, SDKValidationError> {
|
|
43
|
+
return safeParse(
|
|
44
|
+
jsonString,
|
|
45
|
+
(x) => VantaTestSnapshotApiRequest$inboundSchema.parse(JSON.parse(x)),
|
|
46
|
+
`Failed to parse 'VantaTestSnapshotApiRequest' from JSON`,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -6,10 +6,18 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
VantaTestSnapshotApiRequest,
|
|
11
|
+
VantaTestSnapshotApiRequest$inboundSchema,
|
|
12
|
+
} from "./vantatestsnapshotapirequest.js";
|
|
9
13
|
import {
|
|
10
14
|
VantaTestSnapshotIntegration,
|
|
11
15
|
VantaTestSnapshotIntegration$inboundSchema,
|
|
12
16
|
} from "./vantatestsnapshotintegration.js";
|
|
17
|
+
import {
|
|
18
|
+
VantaTestSnapshotOutOfScopeResources,
|
|
19
|
+
VantaTestSnapshotOutOfScopeResources$inboundSchema,
|
|
20
|
+
} from "./vantatestsnapshotoutofscoperesources.js";
|
|
13
21
|
import {
|
|
14
22
|
VantaTestSnapshotRawTestDataRow,
|
|
15
23
|
VantaTestSnapshotRawTestDataRow$inboundSchema,
|
|
@@ -67,6 +75,23 @@ export type VantaTestSnapshotEvidenceDetail = {
|
|
|
67
75
|
* Raw test data captured at snapshot time.
|
|
68
76
|
*/
|
|
69
77
|
rawTestData: Array<VantaTestSnapshotRawTestDataRow>;
|
|
78
|
+
/**
|
|
79
|
+
* Resources excluded from the test at snapshot time, grouped by exclusion
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* reason. `testLevel` contains resources the customer disabled for the
|
|
83
|
+
* test; `frameworkLevel` contains resources scoped out by the framework's
|
|
84
|
+
* segment configuration.
|
|
85
|
+
*/
|
|
86
|
+
outOfScopeResources?: VantaTestSnapshotOutOfScopeResources | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* API requests captured during the test run. Absent when the snapshot
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* data could not be loaded. Empty array when the test does not perform
|
|
92
|
+
* API introspection.
|
|
93
|
+
*/
|
|
94
|
+
apiRequests?: Array<VantaTestSnapshotApiRequest> | undefined;
|
|
70
95
|
};
|
|
71
96
|
|
|
72
97
|
/** @internal */
|
|
@@ -122,6 +147,9 @@ export const VantaTestSnapshotEvidenceDetail$inboundSchema: z.ZodType<
|
|
|
122
147
|
integrations: z.array(VantaTestSnapshotIntegration$inboundSchema),
|
|
123
148
|
slaRemediation: z.nullable(z.lazy(() => SlaRemediation$inboundSchema)),
|
|
124
149
|
rawTestData: z.array(VantaTestSnapshotRawTestDataRow$inboundSchema),
|
|
150
|
+
outOfScopeResources: VantaTestSnapshotOutOfScopeResources$inboundSchema
|
|
151
|
+
.optional(),
|
|
152
|
+
apiRequests: z.array(VantaTestSnapshotApiRequest$inboundSchema).optional(),
|
|
125
153
|
});
|
|
126
154
|
|
|
127
155
|
export function vantaTestSnapshotEvidenceDetailFromJSON(
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type VantaTestSnapshotExcludedItem = {
|
|
11
|
+
id: string;
|
|
12
|
+
displayName: string | null;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const VantaTestSnapshotExcludedItem$inboundSchema: z.ZodType<
|
|
17
|
+
VantaTestSnapshotExcludedItem,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
id: z.string(),
|
|
22
|
+
displayName: z.nullable(z.string()),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export function vantaTestSnapshotExcludedItemFromJSON(
|
|
26
|
+
jsonString: string,
|
|
27
|
+
): SafeParseResult<VantaTestSnapshotExcludedItem, SDKValidationError> {
|
|
28
|
+
return safeParse(
|
|
29
|
+
jsonString,
|
|
30
|
+
(x) => VantaTestSnapshotExcludedItem$inboundSchema.parse(JSON.parse(x)),
|
|
31
|
+
`Failed to parse 'VantaTestSnapshotExcludedItem' from JSON`,
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
VantaTestSnapshotExcludedItem,
|
|
11
|
+
VantaTestSnapshotExcludedItem$inboundSchema,
|
|
12
|
+
} from "./vantatestsnapshotexcludeditem.js";
|
|
13
|
+
|
|
14
|
+
export type VantaTestSnapshotExcludedItemGroup = {
|
|
15
|
+
reason: string;
|
|
16
|
+
entities: Array<VantaTestSnapshotExcludedItem>;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const VantaTestSnapshotExcludedItemGroup$inboundSchema: z.ZodType<
|
|
21
|
+
VantaTestSnapshotExcludedItemGroup,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.object({
|
|
25
|
+
reason: z.string(),
|
|
26
|
+
entities: z.array(VantaTestSnapshotExcludedItem$inboundSchema),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function vantaTestSnapshotExcludedItemGroupFromJSON(
|
|
30
|
+
jsonString: string,
|
|
31
|
+
): SafeParseResult<VantaTestSnapshotExcludedItemGroup, SDKValidationError> {
|
|
32
|
+
return safeParse(
|
|
33
|
+
jsonString,
|
|
34
|
+
(x) =>
|
|
35
|
+
VantaTestSnapshotExcludedItemGroup$inboundSchema.parse(JSON.parse(x)),
|
|
36
|
+
`Failed to parse 'VantaTestSnapshotExcludedItemGroup' from JSON`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
VantaTestSnapshotExcludedItemGroup,
|
|
11
|
+
VantaTestSnapshotExcludedItemGroup$inboundSchema,
|
|
12
|
+
} from "./vantatestsnapshotexcludeditemgroup.js";
|
|
13
|
+
|
|
14
|
+
export type VantaTestSnapshotFrameworkExclusion = {
|
|
15
|
+
frameworkId: string;
|
|
16
|
+
frameworkName: string;
|
|
17
|
+
groupedByReason: Array<VantaTestSnapshotExcludedItemGroup>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const VantaTestSnapshotFrameworkExclusion$inboundSchema: z.ZodType<
|
|
22
|
+
VantaTestSnapshotFrameworkExclusion,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
frameworkId: z.string(),
|
|
27
|
+
frameworkName: z.string(),
|
|
28
|
+
groupedByReason: z.array(VantaTestSnapshotExcludedItemGroup$inboundSchema),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export function vantaTestSnapshotFrameworkExclusionFromJSON(
|
|
32
|
+
jsonString: string,
|
|
33
|
+
): SafeParseResult<VantaTestSnapshotFrameworkExclusion, SDKValidationError> {
|
|
34
|
+
return safeParse(
|
|
35
|
+
jsonString,
|
|
36
|
+
(x) =>
|
|
37
|
+
VantaTestSnapshotFrameworkExclusion$inboundSchema.parse(JSON.parse(x)),
|
|
38
|
+
`Failed to parse 'VantaTestSnapshotFrameworkExclusion' from JSON`,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
VantaTestSnapshotExcludedItemGroup,
|
|
11
|
+
VantaTestSnapshotExcludedItemGroup$inboundSchema,
|
|
12
|
+
} from "./vantatestsnapshotexcludeditemgroup.js";
|
|
13
|
+
import {
|
|
14
|
+
VantaTestSnapshotFrameworkExclusion,
|
|
15
|
+
VantaTestSnapshotFrameworkExclusion$inboundSchema,
|
|
16
|
+
} from "./vantatestsnapshotframeworkexclusion.js";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Resources excluded from the test at snapshot time, grouped by exclusion
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* reason. `testLevel` contains resources the customer disabled for the
|
|
23
|
+
* test; `frameworkLevel` contains resources scoped out by the framework's
|
|
24
|
+
* segment configuration.
|
|
25
|
+
*/
|
|
26
|
+
export type VantaTestSnapshotOutOfScopeResources = {
|
|
27
|
+
testLevel: Array<VantaTestSnapshotExcludedItemGroup>;
|
|
28
|
+
frameworkLevel: Array<VantaTestSnapshotFrameworkExclusion>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const VantaTestSnapshotOutOfScopeResources$inboundSchema: z.ZodType<
|
|
33
|
+
VantaTestSnapshotOutOfScopeResources,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({
|
|
37
|
+
testLevel: z.array(VantaTestSnapshotExcludedItemGroup$inboundSchema),
|
|
38
|
+
frameworkLevel: z.array(VantaTestSnapshotFrameworkExclusion$inboundSchema),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export function vantaTestSnapshotOutOfScopeResourcesFromJSON(
|
|
42
|
+
jsonString: string,
|
|
43
|
+
): SafeParseResult<VantaTestSnapshotOutOfScopeResources, SDKValidationError> {
|
|
44
|
+
return safeParse(
|
|
45
|
+
jsonString,
|
|
46
|
+
(x) =>
|
|
47
|
+
VantaTestSnapshotOutOfScopeResources$inboundSchema.parse(JSON.parse(x)),
|
|
48
|
+
`Failed to parse 'VantaTestSnapshotOutOfScopeResources' from JSON`,
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -27,7 +27,23 @@ export type ListAuditIssuesRequest = {
|
|
|
27
27
|
*/
|
|
28
28
|
snapshotIdMatchesAny?: Array<string> | undefined;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Filter to issues created on or after this date (ISO 8601)
|
|
31
|
+
*/
|
|
32
|
+
createdAfterDate?: Date | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Filter to issues created on or before this date (ISO 8601)
|
|
35
|
+
*/
|
|
36
|
+
createdBeforeDate?: Date | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Filter to issues detected on or after this date (ISO 8601)
|
|
39
|
+
*/
|
|
40
|
+
detectedAfterDate?: Date | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Filter to issues detected on or before this date (ISO 8601)
|
|
43
|
+
*/
|
|
44
|
+
detectedBeforeDate?: Date | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Field to sort results by. Allowed: "createdAt", "lastModifiedAt", "detectedAt". Default: "createdAt"
|
|
31
47
|
*/
|
|
32
48
|
orderBy?: components.IssueSnapshotItemOrderBy | undefined;
|
|
33
49
|
/**
|
|
@@ -43,6 +59,10 @@ export type ListAuditIssuesRequest$Outbound = {
|
|
|
43
59
|
pageCursor?: string | undefined;
|
|
44
60
|
search?: string | undefined;
|
|
45
61
|
snapshotIdMatchesAny?: Array<string> | undefined;
|
|
62
|
+
createdAfterDate?: string | undefined;
|
|
63
|
+
createdBeforeDate?: string | undefined;
|
|
64
|
+
detectedAfterDate?: string | undefined;
|
|
65
|
+
detectedBeforeDate?: string | undefined;
|
|
46
66
|
orderBy?: string | undefined;
|
|
47
67
|
orderDirection?: string | undefined;
|
|
48
68
|
};
|
|
@@ -58,6 +78,10 @@ export const ListAuditIssuesRequest$outboundSchema: z.ZodType<
|
|
|
58
78
|
pageCursor: z.string().optional(),
|
|
59
79
|
search: z.string().optional(),
|
|
60
80
|
snapshotIdMatchesAny: z.array(z.string()).optional(),
|
|
81
|
+
createdAfterDate: z.date().transform(v => v.toISOString()).optional(),
|
|
82
|
+
createdBeforeDate: z.date().transform(v => v.toISOString()).optional(),
|
|
83
|
+
detectedAfterDate: z.date().transform(v => v.toISOString()).optional(),
|
|
84
|
+
detectedBeforeDate: z.date().transform(v => v.toISOString()).optional(),
|
|
61
85
|
orderBy: components.IssueSnapshotItemOrderBy$outboundSchema.optional(),
|
|
62
86
|
orderDirection: components.OrderDirection$outboundSchema.optional(),
|
|
63
87
|
});
|
|
@@ -29,11 +29,11 @@ export type ListCodeChangesRequest = {
|
|
|
29
29
|
/**
|
|
30
30
|
* Filter code changes closed on or after this date (ISO 8601)
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
closedAfterDate?: Date | undefined;
|
|
33
33
|
/**
|
|
34
34
|
* Filter code changes closed on or before this date (ISO 8601)
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
closedBeforeDate?: Date | undefined;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
/** @internal */
|
|
@@ -43,8 +43,8 @@ export type ListCodeChangesRequest$Outbound = {
|
|
|
43
43
|
pageCursor?: string | undefined;
|
|
44
44
|
search?: string | undefined;
|
|
45
45
|
sourcesMatchesAny?: Array<string> | undefined;
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
closedAfterDate?: string | undefined;
|
|
47
|
+
closedBeforeDate?: string | undefined;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
/** @internal */
|
|
@@ -59,8 +59,8 @@ export const ListCodeChangesRequest$outboundSchema: z.ZodType<
|
|
|
59
59
|
search: z.string().optional(),
|
|
60
60
|
sourcesMatchesAny: z.array(components.ApiCodeChangeSource$outboundSchema)
|
|
61
61
|
.optional(),
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
closedAfterDate: z.date().transform(v => v.toISOString()).optional(),
|
|
63
|
+
closedBeforeDate: z.date().transform(v => v.toISOString()).optional(),
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
export function listCodeChangesRequestToJSON(
|
package/src/sdk/audits.ts
CHANGED
|
@@ -105,7 +105,7 @@ export class Audits extends ClientSDK {
|
|
|
105
105
|
* Supports filtering by:
|
|
106
106
|
* - `search`: Searches code change titles and repository names (case-insensitive)
|
|
107
107
|
* - `sourcesMatchesAny`: Filters by version control source (accepted values: github, gitlab, bitbucket, azuredevops)
|
|
108
|
-
* - `
|
|
108
|
+
* - `closedAfterDate` / `closedBeforeDate`: Filters by the closed date range
|
|
109
109
|
*
|
|
110
110
|
* Uses cursor-based pagination. To paginate:
|
|
111
111
|
* 1. Make initial request with desired `pageSize`
|
|
@@ -661,17 +661,25 @@ export class Audits extends ClientSDK {
|
|
|
661
661
|
* @remarks
|
|
662
662
|
* Retrieves the rich detail for a single VANTA_TEST_SNAPSHOT evidence row
|
|
663
663
|
* attached to an information request. The response includes test-level
|
|
664
|
-
* metadata (description, integrations, SLA)
|
|
665
|
-
* at snapshot time,
|
|
666
|
-
*
|
|
664
|
+
* metadata (description, integrations, SLA), the raw test data captured
|
|
665
|
+
* at snapshot time, and the resources that were excluded from the test
|
|
666
|
+
* (out-of-scope resources).
|
|
667
667
|
*
|
|
668
|
-
* For structured snapshots, the array contains one row per
|
|
669
|
-
* test ran against; each row carries `resourceId`,
|
|
670
|
-
* raw JSON for that resource.
|
|
668
|
+
* For structured snapshots, the `rawTestData` array contains one row per
|
|
669
|
+
* resource the test ran against; each row carries `resourceId`,
|
|
670
|
+
* `resourceType`, and the raw JSON for that resource.
|
|
671
671
|
*
|
|
672
|
-
* For unstructured snapshots, the array contains a single
|
|
673
|
-
* `resourceId` and `resourceType` set to `null` and `rawJson`
|
|
674
|
-
* the entire test-run JSON blob.
|
|
672
|
+
* For unstructured snapshots, the `rawTestData` array contains a single
|
|
673
|
+
* row with `resourceId` and `resourceType` set to `null` and `rawJson`
|
|
674
|
+
* containing the entire test-run JSON blob.
|
|
675
|
+
*
|
|
676
|
+
* The `outOfScopeResources` field lists resources excluded at the test
|
|
677
|
+
* level (customer-disabled) and the framework level (segment
|
|
678
|
+
* configuration). Empty exclusion groups are filtered out.
|
|
679
|
+
*
|
|
680
|
+
* The `apiRequests` array contains the HTTP requests captured during API
|
|
681
|
+
* introspection tests. Empty when the test does not perform API
|
|
682
|
+
* introspection.
|
|
675
683
|
*/
|
|
676
684
|
async getInformationRequestTestSnapshotEvidenceDetail(
|
|
677
685
|
request: operations.GetInformationRequestTestSnapshotEvidenceDetailRequest,
|
|
@@ -729,6 +737,8 @@ export class Audits extends ClientSDK {
|
|
|
729
737
|
* Supports filtering by:
|
|
730
738
|
* - `search`: full text search across issue title and description
|
|
731
739
|
* - `snapshotId`: filtering to a specific snapshot or snapshots, which represent point-in-time captures of issues. Use the GET /audits/{auditId}/issues/snapshots endpoint to retrieve snapshot IDs and metadata.
|
|
740
|
+
* - `createdAfterDate` / `createdBeforeDate`: filter to issues created within a date range (inclusive)
|
|
741
|
+
* - `detectedAfterDate` / `detectedBeforeDate`: filter to issues detected within a date range (inclusive)
|
|
732
742
|
*
|
|
733
743
|
* Results are sorted by issue creation date in descending order (newest first) by default.
|
|
734
744
|
* Use `orderBy` and `orderDirection` to customize sorting.
|