vanta-auditor-api-sdk 0.2.0 → 0.3.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.
- package/FUNCTIONS.md +5 -22
- package/README.md +36 -51
- package/bin/mcp-server.js +1159 -1023
- package/bin/mcp-server.js.map +39 -29
- package/docs/sdks/auditors/README.md +7 -11
- package/docs/sdks/audits/README.md +67 -101
- package/examples/README.md +31 -0
- package/examples/auditsList.example.ts +26 -0
- package/examples/package-lock.json +626 -0
- package/examples/package.json +18 -0
- package/funcs/auditorsCreate.d.ts +3 -2
- package/funcs/auditorsCreate.d.ts.map +1 -1
- package/funcs/auditorsCreate.js +3 -1
- package/funcs/auditorsCreate.js.map +1 -1
- package/funcs/auditsCreateCommentForEvidence.d.ts +3 -2
- package/funcs/auditsCreateCommentForEvidence.d.ts.map +1 -1
- package/funcs/auditsCreateCommentForEvidence.js +3 -1
- package/funcs/auditsCreateCommentForEvidence.js.map +1 -1
- package/funcs/auditsCreateCustomControl.d.ts +3 -2
- package/funcs/auditsCreateCustomControl.d.ts.map +1 -1
- package/funcs/auditsCreateCustomControl.js +3 -1
- package/funcs/auditsCreateCustomControl.js.map +1 -1
- package/funcs/auditsCreateCustomEvidenceRequest.d.ts +3 -2
- package/funcs/auditsCreateCustomEvidenceRequest.d.ts.map +1 -1
- package/funcs/auditsCreateCustomEvidenceRequest.js +3 -1
- package/funcs/auditsCreateCustomEvidenceRequest.js.map +1 -1
- package/funcs/auditsGetEvidenceUrls.d.ts +3 -2
- package/funcs/auditsGetEvidenceUrls.d.ts.map +1 -1
- package/funcs/auditsGetEvidenceUrls.js +3 -1
- package/funcs/auditsGetEvidenceUrls.js.map +1 -1
- package/funcs/auditsList.d.ts +3 -2
- package/funcs/auditsList.d.ts.map +1 -1
- package/funcs/auditsList.js +4 -1
- package/funcs/auditsList.js.map +1 -1
- package/funcs/auditsListComments.d.ts +3 -2
- package/funcs/auditsListComments.d.ts.map +1 -1
- package/funcs/auditsListComments.js +3 -1
- package/funcs/auditsListComments.js.map +1 -1
- package/funcs/auditsListControls.d.ts +3 -2
- package/funcs/auditsListControls.d.ts.map +1 -1
- package/funcs/auditsListControls.js +3 -1
- package/funcs/auditsListControls.js.map +1 -1
- package/funcs/auditsListEvidence.d.ts +3 -2
- package/funcs/auditsListEvidence.d.ts.map +1 -1
- package/funcs/auditsListEvidence.js +3 -1
- package/funcs/auditsListEvidence.js.map +1 -1
- package/funcs/auditsUpdateEvidence.d.ts +3 -2
- package/funcs/auditsUpdateEvidence.d.ts.map +1 -1
- package/funcs/auditsUpdateEvidence.js +3 -1
- package/funcs/auditsUpdateEvidence.js.map +1 -1
- package/hooks/types.d.ts +2 -0
- package/hooks/types.d.ts.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +7 -3
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/files.d.ts +5 -0
- package/lib/files.d.ts.map +1 -1
- package/lib/files.js +41 -0
- package/lib/files.js.map +1 -1
- package/lib/matchers.d.ts +3 -10
- package/lib/matchers.d.ts.map +1 -1
- package/lib/matchers.js +33 -31
- package/lib/matchers.js.map +1 -1
- package/lib/sdks.d.ts +4 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +9 -14
- package/lib/sdks.js.map +1 -1
- package/lib/security.d.ts +2 -2
- package/lib/security.d.ts.map +1 -1
- package/mcp-server/cli/start/command.d.ts.map +1 -1
- package/mcp-server/cli/start/command.js +0 -12
- package/mcp-server/cli/start/command.js.map +1 -1
- package/mcp-server/cli/start/impl.d.ts +0 -2
- package/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/mcp-server/cli/start/impl.js +2 -4
- package/mcp-server/cli/start/impl.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/audit.d.ts +5 -2
- package/models/components/audit.d.ts.map +1 -1
- package/models/components/audit.js +5 -2
- package/models/components/audit.js.map +1 -1
- package/models/components/auditfocus.d.ts +28 -0
- package/models/components/auditfocus.d.ts.map +1 -0
- package/models/components/auditfocus.js +61 -0
- package/models/components/auditfocus.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/errors/apierror.d.ts +8 -6
- package/models/errors/apierror.d.ts.map +1 -1
- package/models/errors/apierror.js +23 -10
- package/models/errors/apierror.js.map +1 -1
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/responsevalidationerror.d.ts +26 -0
- package/models/errors/responsevalidationerror.d.ts.map +1 -0
- package/models/errors/responsevalidationerror.js +66 -0
- package/models/errors/responsevalidationerror.js.map +1 -0
- package/models/errors/sdkvalidationerror.d.ts +1 -0
- package/models/errors/sdkvalidationerror.d.ts.map +1 -1
- package/models/errors/sdkvalidationerror.js +14 -0
- package/models/errors/sdkvalidationerror.js.map +1 -1
- package/models/errors/vantaerror.d.ts +19 -0
- package/models/errors/vantaerror.d.ts.map +1 -0
- package/models/errors/vantaerror.js +20 -0
- package/models/errors/vantaerror.js.map +1 -0
- package/models/operations/listaudits.d.ts +5 -0
- package/models/operations/listaudits.d.ts.map +1 -1
- package/models/operations/listaudits.js +2 -0
- package/models/operations/listaudits.js.map +1 -1
- package/package.json +7 -7
- package/src/funcs/auditorsCreate.ts +23 -17
- package/src/funcs/auditsCreateCommentForEvidence.ts +23 -17
- package/src/funcs/auditsCreateCustomControl.ts +23 -17
- package/src/funcs/auditsCreateCustomEvidenceRequest.ts +23 -17
- package/src/funcs/auditsGetEvidenceUrls.ts +23 -17
- package/src/funcs/auditsList.ts +24 -17
- package/src/funcs/auditsListComments.ts +23 -17
- package/src/funcs/auditsListControls.ts +23 -17
- package/src/funcs/auditsListEvidence.ts +23 -17
- package/src/funcs/auditsUpdateEvidence.ts +23 -17
- package/src/hooks/types.ts +2 -0
- package/src/index.ts +2 -0
- package/src/lib/config.ts +7 -3
- package/src/lib/files.ts +42 -0
- package/src/lib/matchers.ts +44 -41
- package/src/lib/sdks.ts +21 -15
- package/src/lib/security.ts +2 -2
- package/src/mcp-server/cli/start/command.ts +0 -13
- package/src/mcp-server/cli/start/impl.ts +2 -6
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/audit.ts +13 -4
- package/src/models/components/auditfocus.ts +31 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/errors/apierror.ts +29 -16
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/responsevalidationerror.ts +50 -0
- package/src/models/errors/sdkvalidationerror.ts +12 -0
- package/src/models/errors/vantaerror.ts +35 -0
- package/src/models/operations/listaudits.ts +7 -0
- package/src/types/constdatetime.ts +1 -1
- package/types/constdatetime.js +1 -1
|
@@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js";
|
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
13
|
import * as components from "../models/components/index.js";
|
|
14
|
-
import { APIError } from "../models/errors/apierror.js";
|
|
15
14
|
import {
|
|
16
15
|
ConnectionError,
|
|
17
16
|
InvalidRequestError,
|
|
@@ -19,7 +18,9 @@ import {
|
|
|
19
18
|
RequestTimeoutError,
|
|
20
19
|
UnexpectedClientError,
|
|
21
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import { VantaError } from "../models/errors/vantaerror.js";
|
|
23
24
|
import * as operations from "../models/operations/index.js";
|
|
24
25
|
import { APICall, APIPromise } from "../types/async.js";
|
|
25
26
|
import { Result } from "../types/fp.js";
|
|
@@ -37,13 +38,14 @@ export function auditsCreateCustomEvidenceRequest(
|
|
|
37
38
|
): APIPromise<
|
|
38
39
|
Result<
|
|
39
40
|
components.CustomEvidenceRequest,
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
| InvalidRequestError
|
|
41
|
+
| VantaError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
44
|
| RequestAbortedError
|
|
45
45
|
| RequestTimeoutError
|
|
46
|
-
|
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
47
49
|
>
|
|
48
50
|
> {
|
|
49
51
|
return new APIPromise($do(
|
|
@@ -61,13 +63,14 @@ async function $do(
|
|
|
61
63
|
[
|
|
62
64
|
Result<
|
|
63
65
|
components.CustomEvidenceRequest,
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
| InvalidRequestError
|
|
66
|
+
| VantaError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
68
69
|
| RequestAbortedError
|
|
69
70
|
| RequestTimeoutError
|
|
70
|
-
|
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
71
74
|
>,
|
|
72
75
|
APICall,
|
|
73
76
|
]
|
|
@@ -107,6 +110,7 @@ async function $do(
|
|
|
107
110
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
108
111
|
|
|
109
112
|
const context = {
|
|
113
|
+
options: client._options,
|
|
110
114
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
111
115
|
operationID: "CreateCustomEvidenceRequest",
|
|
112
116
|
oAuth2Scopes: [],
|
|
@@ -127,6 +131,7 @@ async function $do(
|
|
|
127
131
|
path: path,
|
|
128
132
|
headers: headers,
|
|
129
133
|
body: body,
|
|
134
|
+
userAgent: client._options.userAgent,
|
|
130
135
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
131
136
|
}, options);
|
|
132
137
|
if (!requestRes.ok) {
|
|
@@ -147,18 +152,19 @@ async function $do(
|
|
|
147
152
|
|
|
148
153
|
const [result] = await M.match<
|
|
149
154
|
components.CustomEvidenceRequest,
|
|
150
|
-
|
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
| InvalidRequestError
|
|
155
|
+
| VantaError
|
|
156
|
+
| ResponseValidationError
|
|
157
|
+
| ConnectionError
|
|
154
158
|
| RequestAbortedError
|
|
155
159
|
| RequestTimeoutError
|
|
156
|
-
|
|
|
160
|
+
| InvalidRequestError
|
|
161
|
+
| UnexpectedClientError
|
|
162
|
+
| SDKValidationError
|
|
157
163
|
>(
|
|
158
164
|
M.json(200, components.CustomEvidenceRequest$inboundSchema),
|
|
159
165
|
M.fail("4XX"),
|
|
160
166
|
M.fail("5XX"),
|
|
161
|
-
)(response);
|
|
167
|
+
)(response, req);
|
|
162
168
|
if (!result.ok) {
|
|
163
169
|
return [result, { status: "complete", request: req, response }];
|
|
164
170
|
}
|
|
@@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js";
|
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
13
|
import * as components from "../models/components/index.js";
|
|
14
|
-
import { APIError } from "../models/errors/apierror.js";
|
|
15
14
|
import {
|
|
16
15
|
ConnectionError,
|
|
17
16
|
InvalidRequestError,
|
|
@@ -19,7 +18,9 @@ import {
|
|
|
19
18
|
RequestTimeoutError,
|
|
20
19
|
UnexpectedClientError,
|
|
21
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import { VantaError } from "../models/errors/vantaerror.js";
|
|
23
24
|
import * as operations from "../models/operations/index.js";
|
|
24
25
|
import { APICall, APIPromise } from "../types/async.js";
|
|
25
26
|
import { Result } from "../types/fp.js";
|
|
@@ -38,13 +39,14 @@ export function auditsGetEvidenceUrls(
|
|
|
38
39
|
): APIPromise<
|
|
39
40
|
Result<
|
|
40
41
|
components.PaginatedResponseEvidenceUrl,
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
| InvalidRequestError
|
|
42
|
+
| VantaError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
45
|
| RequestAbortedError
|
|
46
46
|
| RequestTimeoutError
|
|
47
|
-
|
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError
|
|
48
50
|
>
|
|
49
51
|
> {
|
|
50
52
|
return new APIPromise($do(
|
|
@@ -62,13 +64,14 @@ async function $do(
|
|
|
62
64
|
[
|
|
63
65
|
Result<
|
|
64
66
|
components.PaginatedResponseEvidenceUrl,
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
| InvalidRequestError
|
|
67
|
+
| VantaError
|
|
68
|
+
| ResponseValidationError
|
|
69
|
+
| ConnectionError
|
|
69
70
|
| RequestAbortedError
|
|
70
71
|
| RequestTimeoutError
|
|
71
|
-
|
|
|
72
|
+
| InvalidRequestError
|
|
73
|
+
| UnexpectedClientError
|
|
74
|
+
| SDKValidationError
|
|
72
75
|
>,
|
|
73
76
|
APICall,
|
|
74
77
|
]
|
|
@@ -114,6 +117,7 @@ async function $do(
|
|
|
114
117
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
115
118
|
|
|
116
119
|
const context = {
|
|
120
|
+
options: client._options,
|
|
117
121
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
118
122
|
operationID: "ListAuditEvidenceUrls",
|
|
119
123
|
oAuth2Scopes: [],
|
|
@@ -135,6 +139,7 @@ async function $do(
|
|
|
135
139
|
headers: headers,
|
|
136
140
|
query: query,
|
|
137
141
|
body: body,
|
|
142
|
+
userAgent: client._options.userAgent,
|
|
138
143
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
139
144
|
}, options);
|
|
140
145
|
if (!requestRes.ok) {
|
|
@@ -155,18 +160,19 @@ async function $do(
|
|
|
155
160
|
|
|
156
161
|
const [result] = await M.match<
|
|
157
162
|
components.PaginatedResponseEvidenceUrl,
|
|
158
|
-
|
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
| InvalidRequestError
|
|
163
|
+
| VantaError
|
|
164
|
+
| ResponseValidationError
|
|
165
|
+
| ConnectionError
|
|
162
166
|
| RequestAbortedError
|
|
163
167
|
| RequestTimeoutError
|
|
164
|
-
|
|
|
168
|
+
| InvalidRequestError
|
|
169
|
+
| UnexpectedClientError
|
|
170
|
+
| SDKValidationError
|
|
165
171
|
>(
|
|
166
172
|
M.json(200, components.PaginatedResponseEvidenceUrl$inboundSchema),
|
|
167
173
|
M.fail("4XX"),
|
|
168
174
|
M.fail("5XX"),
|
|
169
|
-
)(response);
|
|
175
|
+
)(response, req);
|
|
170
176
|
if (!result.ok) {
|
|
171
177
|
return [result, { status: "complete", request: req, response }];
|
|
172
178
|
}
|
package/src/funcs/auditsList.ts
CHANGED
|
@@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js";
|
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
13
|
import * as components from "../models/components/index.js";
|
|
14
|
-
import { APIError } from "../models/errors/apierror.js";
|
|
15
14
|
import {
|
|
16
15
|
ConnectionError,
|
|
17
16
|
InvalidRequestError,
|
|
@@ -19,7 +18,9 @@ import {
|
|
|
19
18
|
RequestTimeoutError,
|
|
20
19
|
UnexpectedClientError,
|
|
21
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import { VantaError } from "../models/errors/vantaerror.js";
|
|
23
24
|
import * as operations from "../models/operations/index.js";
|
|
24
25
|
import { APICall, APIPromise } from "../types/async.js";
|
|
25
26
|
import { Result } from "../types/fp.js";
|
|
@@ -37,13 +38,14 @@ export function auditsList(
|
|
|
37
38
|
): APIPromise<
|
|
38
39
|
Result<
|
|
39
40
|
components.PaginatedResponseAudit,
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
| InvalidRequestError
|
|
41
|
+
| VantaError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
44
|
| RequestAbortedError
|
|
45
45
|
| RequestTimeoutError
|
|
46
|
-
|
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
47
49
|
>
|
|
48
50
|
> {
|
|
49
51
|
return new APIPromise($do(
|
|
@@ -61,13 +63,14 @@ async function $do(
|
|
|
61
63
|
[
|
|
62
64
|
Result<
|
|
63
65
|
components.PaginatedResponseAudit,
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
| InvalidRequestError
|
|
66
|
+
| VantaError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
68
69
|
| RequestAbortedError
|
|
69
70
|
| RequestTimeoutError
|
|
70
|
-
|
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
71
74
|
>,
|
|
72
75
|
APICall,
|
|
73
76
|
]
|
|
@@ -87,6 +90,7 @@ async function $do(
|
|
|
87
90
|
|
|
88
91
|
const query = encodeFormQuery({
|
|
89
92
|
"changedSinceDate": payload.changedSinceDate,
|
|
93
|
+
"isActiveAudit": payload.isActiveAudit,
|
|
90
94
|
"pageCursor": payload.pageCursor,
|
|
91
95
|
"pageSize": payload.pageSize,
|
|
92
96
|
});
|
|
@@ -100,6 +104,7 @@ async function $do(
|
|
|
100
104
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
101
105
|
|
|
102
106
|
const context = {
|
|
107
|
+
options: client._options,
|
|
103
108
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
104
109
|
operationID: "ListAudits",
|
|
105
110
|
oAuth2Scopes: [],
|
|
@@ -121,6 +126,7 @@ async function $do(
|
|
|
121
126
|
headers: headers,
|
|
122
127
|
query: query,
|
|
123
128
|
body: body,
|
|
129
|
+
userAgent: client._options.userAgent,
|
|
124
130
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
125
131
|
}, options);
|
|
126
132
|
if (!requestRes.ok) {
|
|
@@ -141,18 +147,19 @@ async function $do(
|
|
|
141
147
|
|
|
142
148
|
const [result] = await M.match<
|
|
143
149
|
components.PaginatedResponseAudit,
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
|
147
|
-
| InvalidRequestError
|
|
150
|
+
| VantaError
|
|
151
|
+
| ResponseValidationError
|
|
152
|
+
| ConnectionError
|
|
148
153
|
| RequestAbortedError
|
|
149
154
|
| RequestTimeoutError
|
|
150
|
-
|
|
|
155
|
+
| InvalidRequestError
|
|
156
|
+
| UnexpectedClientError
|
|
157
|
+
| SDKValidationError
|
|
151
158
|
>(
|
|
152
159
|
M.json(200, components.PaginatedResponseAudit$inboundSchema),
|
|
153
160
|
M.fail("4XX"),
|
|
154
161
|
M.fail("5XX"),
|
|
155
|
-
)(response);
|
|
162
|
+
)(response, req);
|
|
156
163
|
if (!result.ok) {
|
|
157
164
|
return [result, { status: "complete", request: req, response }];
|
|
158
165
|
}
|
|
@@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js";
|
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
13
|
import * as components from "../models/components/index.js";
|
|
14
|
-
import { APIError } from "../models/errors/apierror.js";
|
|
15
14
|
import {
|
|
16
15
|
ConnectionError,
|
|
17
16
|
InvalidRequestError,
|
|
@@ -19,7 +18,9 @@ import {
|
|
|
19
18
|
RequestTimeoutError,
|
|
20
19
|
UnexpectedClientError,
|
|
21
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import { VantaError } from "../models/errors/vantaerror.js";
|
|
23
24
|
import * as operations from "../models/operations/index.js";
|
|
24
25
|
import { APICall, APIPromise } from "../types/async.js";
|
|
25
26
|
import { Result } from "../types/fp.js";
|
|
@@ -37,13 +38,14 @@ export function auditsListComments(
|
|
|
37
38
|
): APIPromise<
|
|
38
39
|
Result<
|
|
39
40
|
components.PaginatedResponseComment,
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
| InvalidRequestError
|
|
41
|
+
| VantaError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
44
|
| RequestAbortedError
|
|
45
45
|
| RequestTimeoutError
|
|
46
|
-
|
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
47
49
|
>
|
|
48
50
|
> {
|
|
49
51
|
return new APIPromise($do(
|
|
@@ -61,13 +63,14 @@ async function $do(
|
|
|
61
63
|
[
|
|
62
64
|
Result<
|
|
63
65
|
components.PaginatedResponseComment,
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
| InvalidRequestError
|
|
66
|
+
| VantaError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
68
69
|
| RequestAbortedError
|
|
69
70
|
| RequestTimeoutError
|
|
70
|
-
|
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
71
74
|
>,
|
|
72
75
|
APICall,
|
|
73
76
|
]
|
|
@@ -107,6 +110,7 @@ async function $do(
|
|
|
107
110
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
108
111
|
|
|
109
112
|
const context = {
|
|
113
|
+
options: client._options,
|
|
110
114
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
111
115
|
operationID: "ListAuditComments",
|
|
112
116
|
oAuth2Scopes: [],
|
|
@@ -128,6 +132,7 @@ async function $do(
|
|
|
128
132
|
headers: headers,
|
|
129
133
|
query: query,
|
|
130
134
|
body: body,
|
|
135
|
+
userAgent: client._options.userAgent,
|
|
131
136
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
132
137
|
}, options);
|
|
133
138
|
if (!requestRes.ok) {
|
|
@@ -148,18 +153,19 @@ async function $do(
|
|
|
148
153
|
|
|
149
154
|
const [result] = await M.match<
|
|
150
155
|
components.PaginatedResponseComment,
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
| InvalidRequestError
|
|
156
|
+
| VantaError
|
|
157
|
+
| ResponseValidationError
|
|
158
|
+
| ConnectionError
|
|
155
159
|
| RequestAbortedError
|
|
156
160
|
| RequestTimeoutError
|
|
157
|
-
|
|
|
161
|
+
| InvalidRequestError
|
|
162
|
+
| UnexpectedClientError
|
|
163
|
+
| SDKValidationError
|
|
158
164
|
>(
|
|
159
165
|
M.json(200, components.PaginatedResponseComment$inboundSchema),
|
|
160
166
|
M.fail("4XX"),
|
|
161
167
|
M.fail("5XX"),
|
|
162
|
-
)(response);
|
|
168
|
+
)(response, req);
|
|
163
169
|
if (!result.ok) {
|
|
164
170
|
return [result, { status: "complete", request: req, response }];
|
|
165
171
|
}
|
|
@@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js";
|
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
13
|
import * as components from "../models/components/index.js";
|
|
14
|
-
import { APIError } from "../models/errors/apierror.js";
|
|
15
14
|
import {
|
|
16
15
|
ConnectionError,
|
|
17
16
|
InvalidRequestError,
|
|
@@ -19,7 +18,9 @@ import {
|
|
|
19
18
|
RequestTimeoutError,
|
|
20
19
|
UnexpectedClientError,
|
|
21
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import { VantaError } from "../models/errors/vantaerror.js";
|
|
23
24
|
import * as operations from "../models/operations/index.js";
|
|
24
25
|
import { APICall, APIPromise } from "../types/async.js";
|
|
25
26
|
import { Result } from "../types/fp.js";
|
|
@@ -37,13 +38,14 @@ export function auditsListControls(
|
|
|
37
38
|
): APIPromise<
|
|
38
39
|
Result<
|
|
39
40
|
components.PaginatedResponseAuditorControl,
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
| InvalidRequestError
|
|
41
|
+
| VantaError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
44
|
| RequestAbortedError
|
|
45
45
|
| RequestTimeoutError
|
|
46
|
-
|
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
47
49
|
>
|
|
48
50
|
> {
|
|
49
51
|
return new APIPromise($do(
|
|
@@ -61,13 +63,14 @@ async function $do(
|
|
|
61
63
|
[
|
|
62
64
|
Result<
|
|
63
65
|
components.PaginatedResponseAuditorControl,
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
| InvalidRequestError
|
|
66
|
+
| VantaError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
68
69
|
| RequestAbortedError
|
|
69
70
|
| RequestTimeoutError
|
|
70
|
-
|
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
71
74
|
>,
|
|
72
75
|
APICall,
|
|
73
76
|
]
|
|
@@ -106,6 +109,7 @@ async function $do(
|
|
|
106
109
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
107
110
|
|
|
108
111
|
const context = {
|
|
112
|
+
options: client._options,
|
|
109
113
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
110
114
|
operationID: "ListAuditControls",
|
|
111
115
|
oAuth2Scopes: [],
|
|
@@ -127,6 +131,7 @@ async function $do(
|
|
|
127
131
|
headers: headers,
|
|
128
132
|
query: query,
|
|
129
133
|
body: body,
|
|
134
|
+
userAgent: client._options.userAgent,
|
|
130
135
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
131
136
|
}, options);
|
|
132
137
|
if (!requestRes.ok) {
|
|
@@ -147,18 +152,19 @@ async function $do(
|
|
|
147
152
|
|
|
148
153
|
const [result] = await M.match<
|
|
149
154
|
components.PaginatedResponseAuditorControl,
|
|
150
|
-
|
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
| InvalidRequestError
|
|
155
|
+
| VantaError
|
|
156
|
+
| ResponseValidationError
|
|
157
|
+
| ConnectionError
|
|
154
158
|
| RequestAbortedError
|
|
155
159
|
| RequestTimeoutError
|
|
156
|
-
|
|
|
160
|
+
| InvalidRequestError
|
|
161
|
+
| UnexpectedClientError
|
|
162
|
+
| SDKValidationError
|
|
157
163
|
>(
|
|
158
164
|
M.json(200, components.PaginatedResponseAuditorControl$inboundSchema),
|
|
159
165
|
M.fail("4XX"),
|
|
160
166
|
M.fail("5XX"),
|
|
161
|
-
)(response);
|
|
167
|
+
)(response, req);
|
|
162
168
|
if (!result.ok) {
|
|
163
169
|
return [result, { status: "complete", request: req, response }];
|
|
164
170
|
}
|
|
@@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js";
|
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
13
|
import * as components from "../models/components/index.js";
|
|
14
|
-
import { APIError } from "../models/errors/apierror.js";
|
|
15
14
|
import {
|
|
16
15
|
ConnectionError,
|
|
17
16
|
InvalidRequestError,
|
|
@@ -19,7 +18,9 @@ import {
|
|
|
19
18
|
RequestTimeoutError,
|
|
20
19
|
UnexpectedClientError,
|
|
21
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import { VantaError } from "../models/errors/vantaerror.js";
|
|
23
24
|
import * as operations from "../models/operations/index.js";
|
|
24
25
|
import { APICall, APIPromise } from "../types/async.js";
|
|
25
26
|
import { Result } from "../types/fp.js";
|
|
@@ -37,13 +38,14 @@ export function auditsListEvidence(
|
|
|
37
38
|
): APIPromise<
|
|
38
39
|
Result<
|
|
39
40
|
components.PaginatedResponseEvidence,
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
| InvalidRequestError
|
|
41
|
+
| VantaError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
44
|
| RequestAbortedError
|
|
45
45
|
| RequestTimeoutError
|
|
46
|
-
|
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
47
49
|
>
|
|
48
50
|
> {
|
|
49
51
|
return new APIPromise($do(
|
|
@@ -61,13 +63,14 @@ async function $do(
|
|
|
61
63
|
[
|
|
62
64
|
Result<
|
|
63
65
|
components.PaginatedResponseEvidence,
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
| InvalidRequestError
|
|
66
|
+
| VantaError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
68
69
|
| RequestAbortedError
|
|
69
70
|
| RequestTimeoutError
|
|
70
|
-
|
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
71
74
|
>,
|
|
72
75
|
APICall,
|
|
73
76
|
]
|
|
@@ -107,6 +110,7 @@ async function $do(
|
|
|
107
110
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
108
111
|
|
|
109
112
|
const context = {
|
|
113
|
+
options: client._options,
|
|
110
114
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
111
115
|
operationID: "ListAuditEvidence",
|
|
112
116
|
oAuth2Scopes: [],
|
|
@@ -128,6 +132,7 @@ async function $do(
|
|
|
128
132
|
headers: headers,
|
|
129
133
|
query: query,
|
|
130
134
|
body: body,
|
|
135
|
+
userAgent: client._options.userAgent,
|
|
131
136
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
132
137
|
}, options);
|
|
133
138
|
if (!requestRes.ok) {
|
|
@@ -148,18 +153,19 @@ async function $do(
|
|
|
148
153
|
|
|
149
154
|
const [result] = await M.match<
|
|
150
155
|
components.PaginatedResponseEvidence,
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
| InvalidRequestError
|
|
156
|
+
| VantaError
|
|
157
|
+
| ResponseValidationError
|
|
158
|
+
| ConnectionError
|
|
155
159
|
| RequestAbortedError
|
|
156
160
|
| RequestTimeoutError
|
|
157
|
-
|
|
|
161
|
+
| InvalidRequestError
|
|
162
|
+
| UnexpectedClientError
|
|
163
|
+
| SDKValidationError
|
|
158
164
|
>(
|
|
159
165
|
M.json(200, components.PaginatedResponseEvidence$inboundSchema),
|
|
160
166
|
M.fail("4XX"),
|
|
161
167
|
M.fail("5XX"),
|
|
162
|
-
)(response);
|
|
168
|
+
)(response, req);
|
|
163
169
|
if (!result.ok) {
|
|
164
170
|
return [result, { status: "complete", request: req, response }];
|
|
165
171
|
}
|
|
@@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js";
|
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
13
|
import * as components from "../models/components/index.js";
|
|
14
|
-
import { APIError } from "../models/errors/apierror.js";
|
|
15
14
|
import {
|
|
16
15
|
ConnectionError,
|
|
17
16
|
InvalidRequestError,
|
|
@@ -19,7 +18,9 @@ import {
|
|
|
19
18
|
RequestTimeoutError,
|
|
20
19
|
UnexpectedClientError,
|
|
21
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import { VantaError } from "../models/errors/vantaerror.js";
|
|
23
24
|
import * as operations from "../models/operations/index.js";
|
|
24
25
|
import { APICall, APIPromise } from "../types/async.js";
|
|
25
26
|
import { Result } from "../types/fp.js";
|
|
@@ -37,13 +38,14 @@ export function auditsUpdateEvidence(
|
|
|
37
38
|
): APIPromise<
|
|
38
39
|
Result<
|
|
39
40
|
components.Evidence,
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
| InvalidRequestError
|
|
41
|
+
| VantaError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
44
|
| RequestAbortedError
|
|
45
45
|
| RequestTimeoutError
|
|
46
|
-
|
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
47
49
|
>
|
|
48
50
|
> {
|
|
49
51
|
return new APIPromise($do(
|
|
@@ -61,13 +63,14 @@ async function $do(
|
|
|
61
63
|
[
|
|
62
64
|
Result<
|
|
63
65
|
components.Evidence,
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
| InvalidRequestError
|
|
66
|
+
| VantaError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
68
69
|
| RequestAbortedError
|
|
69
70
|
| RequestTimeoutError
|
|
70
|
-
|
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
71
74
|
>,
|
|
72
75
|
APICall,
|
|
73
76
|
]
|
|
@@ -111,6 +114,7 @@ async function $do(
|
|
|
111
114
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
112
115
|
|
|
113
116
|
const context = {
|
|
117
|
+
options: client._options,
|
|
114
118
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
115
119
|
operationID: "UpdateAuditEvidence",
|
|
116
120
|
oAuth2Scopes: [],
|
|
@@ -131,6 +135,7 @@ async function $do(
|
|
|
131
135
|
path: path,
|
|
132
136
|
headers: headers,
|
|
133
137
|
body: body,
|
|
138
|
+
userAgent: client._options.userAgent,
|
|
134
139
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
135
140
|
}, options);
|
|
136
141
|
if (!requestRes.ok) {
|
|
@@ -151,18 +156,19 @@ async function $do(
|
|
|
151
156
|
|
|
152
157
|
const [result] = await M.match<
|
|
153
158
|
components.Evidence,
|
|
154
|
-
|
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
| InvalidRequestError
|
|
159
|
+
| VantaError
|
|
160
|
+
| ResponseValidationError
|
|
161
|
+
| ConnectionError
|
|
158
162
|
| RequestAbortedError
|
|
159
163
|
| RequestTimeoutError
|
|
160
|
-
|
|
|
164
|
+
| InvalidRequestError
|
|
165
|
+
| UnexpectedClientError
|
|
166
|
+
| SDKValidationError
|
|
161
167
|
>(
|
|
162
168
|
M.json(200, components.Evidence$inboundSchema),
|
|
163
169
|
M.fail("4XX"),
|
|
164
170
|
M.fail("5XX"),
|
|
165
|
-
)(response);
|
|
171
|
+
)(response, req);
|
|
166
172
|
if (!result.ok) {
|
|
167
173
|
return [result, { status: "complete", request: req, response }];
|
|
168
174
|
}
|