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
|
@@ -22,12 +22,11 @@ const vanta = new Vanta({
|
|
|
22
22
|
|
|
23
23
|
async function run() {
|
|
24
24
|
const result = await vanta.auditors.create({
|
|
25
|
-
email: "
|
|
25
|
+
email: "Genesis_Kunze87@yahoo.com",
|
|
26
26
|
givenName: "<value>",
|
|
27
27
|
familyName: "<value>",
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
-
// Handle the result
|
|
31
30
|
console.log(result);
|
|
32
31
|
}
|
|
33
32
|
|
|
@@ -50,19 +49,16 @@ const vanta = new VantaCore({
|
|
|
50
49
|
|
|
51
50
|
async function run() {
|
|
52
51
|
const res = await auditorsCreate(vanta, {
|
|
53
|
-
email: "
|
|
52
|
+
email: "Genesis_Kunze87@yahoo.com",
|
|
54
53
|
givenName: "<value>",
|
|
55
54
|
familyName: "<value>",
|
|
56
55
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
if (res.ok) {
|
|
57
|
+
const { value: result } = res;
|
|
58
|
+
console.log(result);
|
|
59
|
+
} else {
|
|
60
|
+
console.log("auditorsCreate failed:", res.error);
|
|
60
61
|
}
|
|
61
|
-
|
|
62
|
-
const { value: result } = res;
|
|
63
|
-
|
|
64
|
-
// Handle the result
|
|
65
|
-
console.log(result);
|
|
66
62
|
}
|
|
67
63
|
|
|
68
64
|
run();
|
|
@@ -31,7 +31,6 @@ const vanta = new Vanta({
|
|
|
31
31
|
async function run() {
|
|
32
32
|
const result = await vanta.audits.list({});
|
|
33
33
|
|
|
34
|
-
// Handle the result
|
|
35
34
|
console.log(result);
|
|
36
35
|
}
|
|
37
36
|
|
|
@@ -54,15 +53,12 @@ const vanta = new VantaCore({
|
|
|
54
53
|
|
|
55
54
|
async function run() {
|
|
56
55
|
const res = await auditsList(vanta, {});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
if (res.ok) {
|
|
57
|
+
const { value: result } = res;
|
|
58
|
+
console.log(result);
|
|
59
|
+
} else {
|
|
60
|
+
console.log("auditsList failed:", res.error);
|
|
60
61
|
}
|
|
61
|
-
|
|
62
|
-
const { value: result } = res;
|
|
63
|
-
|
|
64
|
-
// Handle the result
|
|
65
|
-
console.log(result);
|
|
66
62
|
}
|
|
67
63
|
|
|
68
64
|
run();
|
|
@@ -107,7 +103,6 @@ async function run() {
|
|
|
107
103
|
auditEvidenceId: "<id>",
|
|
108
104
|
});
|
|
109
105
|
|
|
110
|
-
// Handle the result
|
|
111
106
|
console.log(result);
|
|
112
107
|
}
|
|
113
108
|
|
|
@@ -133,15 +128,12 @@ async function run() {
|
|
|
133
128
|
auditId: "<id>",
|
|
134
129
|
auditEvidenceId: "<id>",
|
|
135
130
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
131
|
+
if (res.ok) {
|
|
132
|
+
const { value: result } = res;
|
|
133
|
+
console.log(result);
|
|
134
|
+
} else {
|
|
135
|
+
console.log("auditsGetEvidenceUrls failed:", res.error);
|
|
139
136
|
}
|
|
140
|
-
|
|
141
|
-
const { value: result } = res;
|
|
142
|
-
|
|
143
|
-
// Handle the result
|
|
144
|
-
console.log(result);
|
|
145
137
|
}
|
|
146
138
|
|
|
147
139
|
run();
|
|
@@ -184,7 +176,6 @@ async function run() {
|
|
|
184
176
|
auditId: "<id>",
|
|
185
177
|
});
|
|
186
178
|
|
|
187
|
-
// Handle the result
|
|
188
179
|
console.log(result);
|
|
189
180
|
}
|
|
190
181
|
|
|
@@ -209,15 +200,12 @@ async function run() {
|
|
|
209
200
|
const res = await auditsListEvidence(vanta, {
|
|
210
201
|
auditId: "<id>",
|
|
211
202
|
});
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
203
|
+
if (res.ok) {
|
|
204
|
+
const { value: result } = res;
|
|
205
|
+
console.log(result);
|
|
206
|
+
} else {
|
|
207
|
+
console.log("auditsListEvidence failed:", res.error);
|
|
215
208
|
}
|
|
216
|
-
|
|
217
|
-
const { value: result } = res;
|
|
218
|
-
|
|
219
|
-
// Handle the result
|
|
220
|
-
console.log(result);
|
|
221
209
|
}
|
|
222
210
|
|
|
223
211
|
run();
|
|
@@ -260,7 +248,6 @@ async function run() {
|
|
|
260
248
|
auditId: "<id>",
|
|
261
249
|
});
|
|
262
250
|
|
|
263
|
-
// Handle the result
|
|
264
251
|
console.log(result);
|
|
265
252
|
}
|
|
266
253
|
|
|
@@ -285,15 +272,12 @@ async function run() {
|
|
|
285
272
|
const res = await auditsListComments(vanta, {
|
|
286
273
|
auditId: "<id>",
|
|
287
274
|
});
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
275
|
+
if (res.ok) {
|
|
276
|
+
const { value: result } = res;
|
|
277
|
+
console.log(result);
|
|
278
|
+
} else {
|
|
279
|
+
console.log("auditsListComments failed:", res.error);
|
|
291
280
|
}
|
|
292
|
-
|
|
293
|
-
const { value: result } = res;
|
|
294
|
-
|
|
295
|
-
// Handle the result
|
|
296
|
-
console.log(result);
|
|
297
281
|
}
|
|
298
282
|
|
|
299
283
|
run();
|
|
@@ -336,7 +320,6 @@ async function run() {
|
|
|
336
320
|
auditId: "<id>",
|
|
337
321
|
});
|
|
338
322
|
|
|
339
|
-
// Handle the result
|
|
340
323
|
console.log(result);
|
|
341
324
|
}
|
|
342
325
|
|
|
@@ -361,15 +344,12 @@ async function run() {
|
|
|
361
344
|
const res = await auditsListControls(vanta, {
|
|
362
345
|
auditId: "<id>",
|
|
363
346
|
});
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
347
|
+
if (res.ok) {
|
|
348
|
+
const { value: result } = res;
|
|
349
|
+
console.log(result);
|
|
350
|
+
} else {
|
|
351
|
+
console.log("auditsListControls failed:", res.error);
|
|
367
352
|
}
|
|
368
|
-
|
|
369
|
-
const { value: result } = res;
|
|
370
|
-
|
|
371
|
-
// Handle the result
|
|
372
|
-
console.log(result);
|
|
373
353
|
}
|
|
374
354
|
|
|
375
355
|
run();
|
|
@@ -413,12 +393,11 @@ async function run() {
|
|
|
413
393
|
auditEvidenceId: "<id>",
|
|
414
394
|
addCommentInput: {
|
|
415
395
|
text: "<value>",
|
|
416
|
-
email: "
|
|
417
|
-
creationDate: new Date("2024-
|
|
396
|
+
email: "Carmen.Bogan@yahoo.com",
|
|
397
|
+
creationDate: new Date("2024-05-28T11:04:29.369Z"),
|
|
418
398
|
},
|
|
419
399
|
});
|
|
420
400
|
|
|
421
|
-
// Handle the result
|
|
422
401
|
console.log(result);
|
|
423
402
|
}
|
|
424
403
|
|
|
@@ -445,19 +424,16 @@ async function run() {
|
|
|
445
424
|
auditEvidenceId: "<id>",
|
|
446
425
|
addCommentInput: {
|
|
447
426
|
text: "<value>",
|
|
448
|
-
email: "
|
|
449
|
-
creationDate: new Date("2024-
|
|
427
|
+
email: "Carmen.Bogan@yahoo.com",
|
|
428
|
+
creationDate: new Date("2024-05-28T11:04:29.369Z"),
|
|
450
429
|
},
|
|
451
430
|
});
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
431
|
+
if (res.ok) {
|
|
432
|
+
const { value: result } = res;
|
|
433
|
+
console.log(result);
|
|
434
|
+
} else {
|
|
435
|
+
console.log("auditsCreateCommentForEvidence failed:", res.error);
|
|
455
436
|
}
|
|
456
|
-
|
|
457
|
-
const { value: result } = res;
|
|
458
|
-
|
|
459
|
-
// Handle the result
|
|
460
|
-
console.log(result);
|
|
461
437
|
}
|
|
462
438
|
|
|
463
439
|
run();
|
|
@@ -502,7 +478,6 @@ async function run() {
|
|
|
502
478
|
auditEvidenceUpdateInput: {},
|
|
503
479
|
});
|
|
504
480
|
|
|
505
|
-
// Handle the result
|
|
506
481
|
console.log(result);
|
|
507
482
|
}
|
|
508
483
|
|
|
@@ -529,15 +504,12 @@ async function run() {
|
|
|
529
504
|
auditEvidenceId: "<id>",
|
|
530
505
|
auditEvidenceUpdateInput: {},
|
|
531
506
|
});
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
507
|
+
if (res.ok) {
|
|
508
|
+
const { value: result } = res;
|
|
509
|
+
console.log(result);
|
|
510
|
+
} else {
|
|
511
|
+
console.log("auditsUpdateEvidence failed:", res.error);
|
|
535
512
|
}
|
|
536
|
-
|
|
537
|
-
const { value: result } = res;
|
|
538
|
-
|
|
539
|
-
// Handle the result
|
|
540
|
-
console.log(result);
|
|
541
513
|
}
|
|
542
514
|
|
|
543
515
|
run();
|
|
@@ -580,18 +552,18 @@ async function run() {
|
|
|
580
552
|
auditId: "<id>",
|
|
581
553
|
createCustomEvidenceRequestInput: {
|
|
582
554
|
controlIds: [
|
|
583
|
-
"<value>",
|
|
555
|
+
"<value 1>",
|
|
556
|
+
"<value 2>",
|
|
584
557
|
],
|
|
585
558
|
title: "<value>",
|
|
586
|
-
description: "
|
|
587
|
-
cadence: "
|
|
559
|
+
description: "pure bludgeon deliberately question although",
|
|
560
|
+
cadence: "P1D",
|
|
588
561
|
reminderWindow: "P0D",
|
|
589
|
-
isRestricted:
|
|
562
|
+
isRestricted: false,
|
|
590
563
|
auditorEmail: "<value>",
|
|
591
564
|
},
|
|
592
565
|
});
|
|
593
566
|
|
|
594
|
-
// Handle the result
|
|
595
567
|
console.log(result);
|
|
596
568
|
}
|
|
597
569
|
|
|
@@ -617,25 +589,23 @@ async function run() {
|
|
|
617
589
|
auditId: "<id>",
|
|
618
590
|
createCustomEvidenceRequestInput: {
|
|
619
591
|
controlIds: [
|
|
620
|
-
"<value>",
|
|
592
|
+
"<value 1>",
|
|
593
|
+
"<value 2>",
|
|
621
594
|
],
|
|
622
595
|
title: "<value>",
|
|
623
|
-
description: "
|
|
624
|
-
cadence: "
|
|
596
|
+
description: "pure bludgeon deliberately question although",
|
|
597
|
+
cadence: "P1D",
|
|
625
598
|
reminderWindow: "P0D",
|
|
626
|
-
isRestricted:
|
|
599
|
+
isRestricted: false,
|
|
627
600
|
auditorEmail: "<value>",
|
|
628
601
|
},
|
|
629
602
|
});
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
603
|
+
if (res.ok) {
|
|
604
|
+
const { value: result } = res;
|
|
605
|
+
console.log(result);
|
|
606
|
+
} else {
|
|
607
|
+
console.log("auditsCreateCustomEvidenceRequest failed:", res.error);
|
|
633
608
|
}
|
|
634
|
-
|
|
635
|
-
const { value: result } = res;
|
|
636
|
-
|
|
637
|
-
// Handle the result
|
|
638
|
-
console.log(result);
|
|
639
609
|
}
|
|
640
610
|
|
|
641
611
|
run();
|
|
@@ -678,14 +648,13 @@ async function run() {
|
|
|
678
648
|
auditId: "<id>",
|
|
679
649
|
createCustomControlInput: {
|
|
680
650
|
externalId: "<id>",
|
|
681
|
-
name:
|
|
682
|
-
description: "
|
|
683
|
-
effectiveDate: new Date("2024-
|
|
684
|
-
category: "
|
|
651
|
+
name: null,
|
|
652
|
+
description: "yet plus utter queasily what juvenile wound",
|
|
653
|
+
effectiveDate: new Date("2024-11-10T13:58:54.564Z"),
|
|
654
|
+
category: "CLOUD_SECURITY",
|
|
685
655
|
},
|
|
686
656
|
});
|
|
687
657
|
|
|
688
|
-
// Handle the result
|
|
689
658
|
console.log(result);
|
|
690
659
|
}
|
|
691
660
|
|
|
@@ -711,21 +680,18 @@ async function run() {
|
|
|
711
680
|
auditId: "<id>",
|
|
712
681
|
createCustomControlInput: {
|
|
713
682
|
externalId: "<id>",
|
|
714
|
-
name:
|
|
715
|
-
description: "
|
|
716
|
-
effectiveDate: new Date("2024-
|
|
717
|
-
category: "
|
|
683
|
+
name: null,
|
|
684
|
+
description: "yet plus utter queasily what juvenile wound",
|
|
685
|
+
effectiveDate: new Date("2024-11-10T13:58:54.564Z"),
|
|
686
|
+
category: "CLOUD_SECURITY",
|
|
718
687
|
},
|
|
719
688
|
});
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
689
|
+
if (res.ok) {
|
|
690
|
+
const { value: result } = res;
|
|
691
|
+
console.log(result);
|
|
692
|
+
} else {
|
|
693
|
+
console.log("auditsCreateCustomControl failed:", res.error);
|
|
723
694
|
}
|
|
724
|
-
|
|
725
|
-
const { value: result } = res;
|
|
726
|
-
|
|
727
|
-
// Handle the result
|
|
728
|
-
console.log(result);
|
|
729
695
|
}
|
|
730
696
|
|
|
731
697
|
run();
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# vanta-auditor-api-sdk Examples
|
|
2
|
+
|
|
3
|
+
This directory contains example scripts demonstrating how to use the vanta-auditor-api-sdk SDK.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Node.js (v18 or higher)
|
|
8
|
+
- npm
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
1. Copy `.env.template` to `.env`:
|
|
13
|
+
```bash
|
|
14
|
+
cp .env.template .env
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
2. Edit `.env` and add your actual credentials (API keys, tokens, etc.)
|
|
18
|
+
|
|
19
|
+
## Running the Examples
|
|
20
|
+
|
|
21
|
+
To run an example file from the examples directory:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run build && npx tsx example.ts
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Creating new examples
|
|
28
|
+
|
|
29
|
+
Duplicate an existing example file, they won't be overwritten by the generation process.
|
|
30
|
+
|
|
31
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import dotenv from "dotenv";
|
|
6
|
+
dotenv.config();
|
|
7
|
+
/**
|
|
8
|
+
* Example usage of the vanta-auditor-api-sdk SDK
|
|
9
|
+
*
|
|
10
|
+
* To run this example from the examples directory:
|
|
11
|
+
* npm run build && npx tsx auditsList.ts
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { Vanta } from "vanta-auditor-api-sdk";
|
|
15
|
+
|
|
16
|
+
const vanta = new Vanta({
|
|
17
|
+
bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
async function main() {
|
|
21
|
+
const result = await vanta.list({});
|
|
22
|
+
|
|
23
|
+
console.log(result);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
main().catch(console.error);
|