@distilled.cloud/vanta 1.0.0-rc.20 → 1.0.0-rc.21

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 (48) hide show
  1. package/README.md +2 -2
  2. package/lib/.lazy.json +1 -1
  3. package/lib/_bundle/sdk.js +1 -1
  4. package/lib/_bundle/sdk.js.map +1 -1
  5. package/lib/credentials.d.ts +9 -4
  6. package/lib/credentials.d.ts.map +1 -1
  7. package/lib/errors.d.ts +7 -0
  8. package/lib/errors.d.ts.map +1 -1
  9. package/lib/errors.js +1 -1
  10. package/lib/index.d.ts +2 -3
  11. package/lib/index.d.ts.map +1 -1
  12. package/lib/index.js +0 -1
  13. package/lib/pagination.d.ts.map +1 -1
  14. package/lib/protocol.d.ts +9 -12
  15. package/lib/protocol.d.ts.map +1 -1
  16. package/lib/retry.d.ts.map +1 -1
  17. package/lib/services/auditor_api.d.ts +189 -6
  18. package/lib/services/auditor_api.d.ts.map +1 -1
  19. package/lib/services/auditor_api.js +81 -70
  20. package/lib/services/auditor_api.js.map +1 -1
  21. package/lib/services/build_integrations.d.ts.map +1 -1
  22. package/lib/services/build_integrations.js +45 -45
  23. package/lib/services/build_integrations.js.map +1 -1
  24. package/lib/services/index.d.ts.map +1 -1
  25. package/lib/services/manage_vanta.d.ts +635 -13
  26. package/lib/services/manage_vanta.d.ts.map +1 -1
  27. package/lib/services/manage_vanta.js +422 -401
  28. package/lib/services/manage_vanta.js.map +1 -1
  29. package/lib/services/webhooks.d.ts +39 -0
  30. package/lib/services/webhooks.d.ts.map +1 -1
  31. package/lib/services/webhooks.js +38 -34
  32. package/lib/services/webhooks.js.map +1 -1
  33. package/lib/services.lazy/auditor_api.js +3 -2
  34. package/lib/services.lazy/build_integrations.js +1 -1
  35. package/lib/services.lazy/manage_vanta.js +3 -3
  36. package/lib/services.lazy/webhooks.js +2 -2
  37. package/lib/traits.d.ts.map +1 -1
  38. package/package.json +5 -6
  39. package/src/credentials.ts +26 -20
  40. package/src/errors.ts +9 -1
  41. package/src/index.ts +2 -3
  42. package/src/protocol.ts +13 -23
  43. package/src/services/auditor_api.ts +1134 -625
  44. package/src/services/build_integrations.ts +51 -26
  45. package/src/services/manage_vanta.ts +4895 -3135
  46. package/src/services/webhooks.ts +331 -171
  47. package/lib/index.lazy.js +0 -7
  48. package/lib/index.lazy.js.map +0 -1
package/README.md CHANGED
@@ -14,16 +14,16 @@ npm install @distilled.cloud/vanta effect
14
14
  import { Effect, Layer } from "effect";
15
15
  import * as FetchHttpClient from "effect/http/FetchHttpClient";
16
16
  import * as Vanta from "@distilled.cloud/vanta";
17
+ import * as ManageVanta from "@distilled.cloud/vanta/manage_vanta";
17
18
 
18
19
  const program = Effect.gen(function* () {
19
- const result = yield* Vanta.manageVanta.listComplianceFrameworks({});
20
+ const result = yield* ManageVanta.listComplianceFrameworks({});
20
21
  return result;
21
22
  });
22
23
 
23
24
  const Live = Layer.mergeAll(
24
25
  FetchHttpClient.layer,
25
26
  Vanta.CredentialsFromEnv,
26
- Vanta.VantaProtocol,
27
27
  );
28
28
 
29
29
  program.pipe(Effect.provide(Live), Effect.runPromise);
package/lib/.lazy.json CHANGED
@@ -1 +1 @@
1
- {"serviceDirs":["services"],"twins":["index.js"]}
1
+ {"serviceDirs":["services"],"twins":[]}
@@ -1,2 +1,2 @@
1
- import{errors$API_ERRORS as e,errors$BadGateway as t,errors$BadRequest as n,errors$ConfigError as r,errors$Conflict as i,errors$DEFAULT_ERRORS as a,errors$Forbidden as ee,errors$GatewayTimeout as o,errors$HTTP_STATUS_MAP as te,errors$InternalServerError as ne,errors$Locked as re,errors$NotFound as ie,errors$ServiceUnavailable as s,errors$TooManyRequests as c,errors$Unauthorized as l,errors$UnknownErrorFields as u,errors$UnprocessableEntity as d,protocol_rest$RawResponse as f,protocol_rest$RawResponseRoot as p,protocol_rest$SensitiveValue as m,protocol_rest$makeRestProtocol as h,protocol_rest$rawResponseRootSymbol as g,protocol_rest$rawResponseSymbol as _,protocol_rest$sensitiveValueSymbol as v,protocol_rest$unknownErrorProps as y,schema_lite$Array as b,schema_lite$Boolean as x,schema_lite$NullOr as S,schema_lite$Number as C,schema_lite$Record as w,schema_lite$String as T,schema_lite$Struct as E,schema_lite$TaggedError as D,schema_lite$Unknown as O,schema_lite$at as k,schema_lite$optional as A,schema_lite$suspend as j}from"@distilled.cloud/core/_bundle/rest";import{api$D as M,api$call as N,api$error as P,api$named as F,api$newError as I,api$op as L,category$withBadRequestError as R,category$withParseError as z,retry$capped as B,retry$jittered as V,retry$makeDefault as H,retry$throttlingFactory as U,retry$throttlingOptions as W,retry$transientFactory as G,retry$transientOptions as K,schema_lite_typed$TaggedError as q,schema_lite_typed$Unknown as J,trait$Body as Y,trait$FormDataFile as ae,trait$Header as oe,trait$Http as se,trait$HttpBody as ce,trait$KeyDictionary as le,trait$Label as ue,trait$Query as de,trait$ResponseCode as fe,trait$UnionCases as pe,trait$applyErrorMatchers as me,trait$bodySymbol as he,trait$errorMatchersSymbol as ge,trait$formDataFileSymbol as _e,trait$getErrorMatchers as ve,trait$headerSymbol as ye,trait$httpBodySymbol as be,trait$httpSymbol as xe,trait$keyDictionarySymbol as Se,trait$labelSymbol as Ce,trait$querySymbol as we,trait$responseCodeSymbol as Te,trait$unionCasesSymbol as Ee}from"@distilled.cloud/core/_bundle/base";import*as X from"effect/Context";import*as Z from"effect/Effect";import*as Q from"effect/Layer";import*as $ from"effect/Redacted";const De=`https://api.vanta.com`;const Oe=`https://api.vanta-gov.com`;var Credentials=class extends (/*@__PURE__*/ X.Service()(`VantaCredentials`)){};const fromApiKey=e=>Q.succeed(Credentials,Z.succeed({apiKey:e.apiKey,apiBaseUrl:e.apiBaseUrl??`https://api.vanta.com`}));const ke=/*@__PURE__*/ Q.succeed(Credentials,/*@__PURE__*/ Z.gen(function*(){const e=process.env.VANTA_ACCESS_TOKEN;if(!e)return yield*new r({message:`VANTA_ACCESS_TOKEN environment variable is required`});return{apiKey:$.make(e),apiBaseUrl:process.env.VANTA_API_BASE_URL??`https://api.vanta.com`}}));var UnknownVantaError=class extends (/*@__PURE__*/ q()(`UnknownVantaError`,u)){};var VantaParseError=class extends (/*@__PURE__*/ q()(`VantaParseError`,{body:J,cause:J}).pipe(z)){};const Ae=/*@__PURE__*/ h({credentials:/*@__PURE__*/ Z.flatMap(Credentials,e=>e),baseUrl:e=>e.apiBaseUrl,headers:e=>({Authorization:`Bearer ${$.value(e.apiKey)}`}),unknownError:e=>new UnknownVantaError(y(e)),parseError:({body:e,cause:t})=>new VantaParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ X.Service()(`VantaRetry`)){};const policy=e=>Z.provide(Q.succeed(Retry,e));const je=/*@__PURE__*/ Z.provide(/*@__PURE__*/ Q.succeed(Retry,{while:()=>false}));const Me=/*@__PURE__*/ policy(U);const Ne=/*@__PURE__*/ policy(G);export{b as Ob,x as Pb,S as Wb,C as Xb,w as Yb,T as _b,M as a,E as ac,N as c,D as cc,Credentials as credentials$Credentials,ke as credentials$CredentialsFromEnv,De as credentials$DEFAULT_API_BASE_URL,Oe as credentials$GOV_API_BASE_URL,fromApiKey as credentials$fromApiKey,P as e,e as errors$API_ERRORS,t as errors$BadGateway,n as errors$BadRequest,r as errors$ConfigError,i as errors$Conflict,a as errors$DEFAULT_ERRORS,ee as errors$Forbidden,o as errors$GatewayTimeout,te as errors$HTTP_STATUS_MAP,ne as errors$InternalServerError,re as errors$Locked,ie as errors$NotFound,s as errors$ServiceUnavailable,c as errors$TooManyRequests,l as errors$Unauthorized,UnknownVantaError as errors$UnknownVantaError,d as errors$UnprocessableEntity,VantaParseError as errors$VantaParseError,O as fc,k as hc,F as k,I as l,L as m,A as mc,j as nc,Ae as protocol$VantaProtocol,Retry as retry$Retry,B as retry$capped,V as retry$jittered,H as retry$makeDefault,je as retry$none,policy as retry$policy,Me as retry$throttling,U as retry$throttlingFactory,W as retry$throttlingOptions,Ne as retry$transient,G as retry$transientFactory,K as retry$transientOptions,Y as traits$Body,ae as traits$FormDataFile,oe as traits$Header,se as traits$Http,ce as traits$HttpBody,le as traits$KeyDictionary,ue as traits$Label,de as traits$Query,f as traits$RawResponse,p as traits$RawResponseRoot,fe as traits$ResponseCode,m as traits$SensitiveValue,pe as traits$UnionCases,me as traits$applyErrorMatchers,he as traits$bodySymbol,ge as traits$errorMatchersSymbol,_e as traits$formDataFileSymbol,ve as traits$getErrorMatchers,ye as traits$headerSymbol,be as traits$httpBodySymbol,xe as traits$httpSymbol,Se as traits$keyDictionarySymbol,Ce as traits$labelSymbol,we as traits$querySymbol,g as traits$rawResponseRootSymbol,_ as traits$rawResponseSymbol,Te as traits$responseCodeSymbol,v as traits$sensitiveValueSymbol,Ee as traits$unionCasesSymbol,R as ya};
1
+ import{errors$API_ERRORS as e,errors$BadGateway as t,errors$BadRequest as n,errors$ConfigError as r,errors$Conflict as i,errors$DEFAULT_ERRORS as a,errors$Forbidden as ee,errors$GatewayTimeout as te,errors$HTTP_STATUS_MAP as ne,errors$InternalServerError as re,errors$Locked as ie,errors$NotFound as ae,errors$ServiceUnavailable as oe,errors$TooManyRequests as o,errors$Unauthorized as s,errors$UnknownErrorFields as c,errors$UnprocessableEntity as l,protocol_rest$RawResponse as u,protocol_rest$RawResponseRoot as d,protocol_rest$SensitiveValue as f,protocol_rest$rawResponseRootSymbol as p,protocol_rest$rawResponseSymbol as m,protocol_rest$restProtocol as h,protocol_rest$sensitiveValueSymbol as g,protocol_rest$unknownErrorProps as _,schema_lite$Array as v,schema_lite$Boolean as y,schema_lite$NullOr as b,schema_lite$Number as x,schema_lite$Record as S,schema_lite$String as C,schema_lite$Struct as w,schema_lite$TaggedError as T,schema_lite$Union as E,schema_lite$Unknown as D,schema_lite$at as O,schema_lite$optional as k,schema_lite$suspend as A}from"@distilled.cloud/core/_bundle/rest";import{api$D as j,api$call as M,api$error as N,api$named as P,api$newError as F,api$op as I,category$withAuthError as L,category$withBadRequestError as R,category$withConflictError as z,category$withParseError as B,retry$capped as V,retry$jittered as H,retry$makeDefault as U,retry$throttlingFactory as W,retry$throttlingOptions as G,retry$transientFactory as K,retry$transientOptions as q,schema_lite_typed$TaggedError as J,schema_lite_typed$Unknown as Y,trait$Body as se,trait$FormDataFile as ce,trait$Header as le,trait$Http as ue,trait$HttpBody as de,trait$KeyDictionary as fe,trait$Label as pe,trait$Query as me,trait$ResponseCode as he,trait$UnionCases as ge,trait$applyErrorMatchers as _e,trait$bodySymbol as ve,trait$errorMatchersSymbol as ye,trait$formDataFileSymbol as be,trait$getErrorMatchers as xe,trait$headerSymbol as Se,trait$httpBodySymbol as Ce,trait$httpSymbol as we,trait$keyDictionarySymbol as Te,trait$labelSymbol as Ee,trait$querySymbol as De,trait$responseCodeSymbol as Oe,trait$unionCasesSymbol as ke}from"@distilled.cloud/core/_bundle/base";import*as X from"effect/Context";import*as Z from"effect/Effect";import*as Q from"effect/Layer";import*as $ from"effect/Redacted";const Ae=`https://api.vanta.com`;const je=`https://api.vanta-gov.com`;var Credentials=class extends (/*@__PURE__*/ X.Service()(`VantaCredentials`)){};const fromApiKey=e=>Q.succeed(Credentials,Z.succeed({apiKey:e.apiKey,apiBaseUrl:e.apiBaseUrl??`https://api.vanta.com`}));const Me=/*@__PURE__*/ Q.effect(Credentials,/*@__PURE__*/ Z.map(/*@__PURE__*/ Z.gen(function*(){const e=process.env.VANTA_ACCESS_TOKEN;if(!e)return yield*new r({message:`VANTA_ACCESS_TOKEN environment variable is required`});return{apiKey:$.make(e),apiBaseUrl:process.env.VANTA_API_BASE_URL??`https://api.vanta.com`}}),e=>Z.succeed(e)));var UnknownVantaError=class extends (/*@__PURE__*/ J()(`UnknownVantaError`,c)){};var VantaParseError=class extends (/*@__PURE__*/ J()(`VantaParseError`,{body:Y,cause:Y}).pipe(B)){};const Ne=e;const Pe=/*@__PURE__*/ h({credentials:/*@__PURE__*/ Z.flatten(Credentials),baseUrl:e=>e.apiBaseUrl,headers:e=>({Authorization:`Bearer ${$.value(e.apiKey)}`}),unknownError:e=>new UnknownVantaError(_(e)),parseError:({body:e,cause:t})=>new VantaParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ X.Service()(`VantaRetry`)){};const policy=e=>Z.provide(Q.succeed(Retry,e));const Fe=/*@__PURE__*/ Z.provide(/*@__PURE__*/ Q.succeed(Retry,{while:()=>false}));const Ie=/*@__PURE__*/ policy(W);const Le=/*@__PURE__*/ policy(K);export{z as Ca,v as Zb,y as _b,j as a,M as b,Credentials as credentials$Credentials,Me as credentials$CredentialsFromEnv,Ae as credentials$DEFAULT_API_BASE_URL,je as credentials$GOV_API_BASE_URL,fromApiKey as credentials$fromApiKey,e as errors$API_ERRORS,t as errors$BadGateway,n as errors$BadRequest,r as errors$ConfigError,i as errors$Conflict,a as errors$DEFAULT_ERRORS,ee as errors$Forbidden,te as errors$GatewayTimeout,ne as errors$HTTP_STATUS_MAP,re as errors$InternalServerError,ie as errors$Locked,ae as errors$NotFound,oe as errors$ServiceUnavailable,o as errors$TooManyRequests,s as errors$Unauthorized,UnknownVantaError as errors$UnknownVantaError,l as errors$UnprocessableEntity,VantaParseError as errors$VantaParseError,Ne as errors$VantaServiceErrors,N as f,b as hc,x as ic,S as jc,P as l,C as lc,F as m,w as mc,I as n,T as oc,Pe as protocol$VantaProtocol,E as qc,D as rc,Retry as retry$Retry,V as retry$capped,H as retry$jittered,U as retry$makeDefault,Fe as retry$none,policy as retry$policy,Ie as retry$throttling,W as retry$throttlingFactory,G as retry$throttlingOptions,Le as retry$transient,K as retry$transientFactory,q as retry$transientOptions,O as tc,se as traits$Body,ce as traits$FormDataFile,le as traits$Header,ue as traits$Http,de as traits$HttpBody,fe as traits$KeyDictionary,pe as traits$Label,me as traits$Query,u as traits$RawResponse,d as traits$RawResponseRoot,he as traits$ResponseCode,f as traits$SensitiveValue,ge as traits$UnionCases,_e as traits$applyErrorMatchers,ve as traits$bodySymbol,ye as traits$errorMatchersSymbol,be as traits$formDataFileSymbol,xe as traits$getErrorMatchers,Se as traits$headerSymbol,Ce as traits$httpBodySymbol,we as traits$httpSymbol,Te as traits$keyDictionarySymbol,Ee as traits$labelSymbol,De as traits$querySymbol,p as traits$rawResponseRootSymbol,m as traits$rawResponseSymbol,Oe as traits$responseCodeSymbol,g as traits$sensitiveValueSymbol,ke as traits$unionCasesSymbol,L as ya,k as yc,R as za,A as zc};
2
2
  //# sourceMappingURL=sdk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","names":["Schema.Unknown","Category.withParseError","API_ERRORS","BadGateway","BadRequest","ConfigError","Conflict","DEFAULT_ERRORS","Forbidden","GatewayTimeout","HTTP_STATUS_MAP","InternalServerError","Locked","NotFound","ServiceUnavailable","TooManyRequests","Unauthorized","UnknownErrorFields","UnprocessableEntity","RawResponse","RawResponseRoot","SensitiveValue","makeRestProtocol","rawResponseRootSymbol","rawResponseSymbol","sensitiveValueSymbol","unknownErrorProps","Array","Boolean","NullOr","Number","Record","String","Struct","TaggedError","Unknown","at","optional","suspend","D","call","error","named","newError","op","withBadRequestError","withParseError","capped","jittered","makeDefault","throttlingFactory","throttlingOptions","transientFactory","transientOptions","TaggedError$1","Unknown$1","Body","FormDataFile","Header","Http","HttpBody","KeyDictionary","Label","Query","ResponseCode","UnionCases","applyErrorMatchers","bodySymbol","errorMatchersSymbol","formDataFileSymbol","getErrorMatchers","headerSymbol","httpBodySymbol","httpSymbol","keyDictionarySymbol","labelSymbol","querySymbol","responseCodeSymbol","unionCasesSymbol","Context","Effect","Layer","Redacted","DEFAULT_API_BASE_URL","GOV_API_BASE_URL","config","CredentialsFromEnv","apiKey","VantaProtocol","resolve","creds","info","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"kqEAgBA,MAAamF,GAAuB,wBAGpC,MAAaC,GAAmB,4BAOhC,IAAa,YAAb,eACwB,gBAAQ,QAAyD,CAAC,CACtF,kBACF,EAAA,AAAE,CAAC,EAGL,MAAa,WAAc,GAIzBH,EAAM,QACJ,YACAD,EAAO,QAAQ,CACb,OAAQK,EAAO,OACf,WAAYA,EAAO,YAAA,uBACrB,CAAC,CACH,EAGF,MAAaC,GAA6D,gBAAM,QAC9E,YACc,gBAAO,IAAI,WAAa,CACpC,MAAMC,EAAS,QAAQ,IAAI,mBAE3B,GAAI,CAACA,EACH,OAAO,MAAO,IAAIlF,EAAY,CAC5B,QAAS,qDACX,CAAC,EAGH,MAAO,CACL,OAAQ6E,EAAS,KAAKK,CAAM,EAC5B,WAAY,QAAQ,IAAI,oBAAA,uBAC1B,CACF,CAAC,CACH,EC3BA,IAAa,kBAAb,eACwB,gBAAsC,CAAC,CAC3D,oBACAtE,CACF,EAAA,AAAE,CAAC,EAGL,IAAa,gBAAb,eACwB,gBAAoC,CAAC,CAAC,kBAAmB,CAC7E,KAAMjB,EACN,MAAOA,CACT,CAAC,CAAC,CAAC,KAAKC,CAAuB,EAAA,AAAE,CAAC,ECApC,MAAauF,GAAyD,gBAAyB,CAG7F,YAA2B,gBAAO,QAAQ,YAAc,GAAYC,CAAO,EAC3E,QAAU,GAAUC,EAAM,WAC1B,QAAU,IAAW,CACnB,cAAe,UAAUR,EAAS,MAAMQ,EAAM,MAAM,GACtD,GAGA,aAAe,GAAS,IAAI,kBAAkBhE,EAAkBiE,CAAI,CAAC,EACrE,YAAa,CAAE,OAAM,WAAY,IAAI,gBAAgB,CAAE,OAAM,OAAM,CAAC,CACtE,CAAC,ECvBD,IAAa,MAAb,eAAyC,gBAAQ,QAAuB,CAAC,CAAC,YAAY,EAAA,AAAE,CAAC,EAGzF,MAAa,OAAU,GACrBX,EAAO,QAAQC,EAAM,QAAQ,MAAOW,CAAgB,CAAC,EAGvD,MAAaC,GAAqB,gBAAO,QACzB,gBAAM,QAAQ,MAAO,CAAE,UAAa,KAAM,CAAC,CAC3D,EAGA,MAAaC,GAA2B,qBAAO5C,CAAiB,EAGhE,MAAa6C,GAA0B,qBAAO3C,CAAgB"}
1
+ {"version":3,"file":"sdk.js","names":["Schema.Unknown","Category.withParseError","API_ERRORS","BadGateway","BadRequest","ConfigError","Conflict","DEFAULT_ERRORS","Forbidden","GatewayTimeout","HTTP_STATUS_MAP","InternalServerError","Locked","NotFound","ServiceUnavailable","TooManyRequests","Unauthorized","UnknownErrorFields","UnprocessableEntity","RawResponse","RawResponseRoot","SensitiveValue","rawResponseRootSymbol","rawResponseSymbol","restProtocol","sensitiveValueSymbol","unknownErrorProps","Array","Boolean","NullOr","Number","Record","String","Struct","TaggedError","Union","Unknown","at","optional","suspend","D","call","error","named","newError","op","withAuthError","withBadRequestError","withConflictError","withParseError","capped","jittered","makeDefault","throttlingFactory","throttlingOptions","transientFactory","transientOptions","TaggedError$1","Unknown$1","Body","FormDataFile","Header","Http","HttpBody","KeyDictionary","Label","Query","ResponseCode","UnionCases","applyErrorMatchers","bodySymbol","errorMatchersSymbol","formDataFileSymbol","getErrorMatchers","headerSymbol","httpBodySymbol","httpSymbol","keyDictionarySymbol","labelSymbol","querySymbol","responseCodeSymbol","unionCasesSymbol","Context","Effect","Layer","Redacted","DEFAULT_API_BASE_URL","GOV_API_BASE_URL","config","CredentialsFromEnv","apiKey","VantaServiceErrors","VantaProtocol","creds","info","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"ovEAgBA,MAAasF,GAAuB,wBAGpC,MAAaC,GAAmB,4BAOhC,IAAa,YAAb,eACwB,gBAAQ,QAA4C,CAAC,CAAC,kBAAkB,EAAA,AAAE,CAAC,EAGnG,MAAa,WAAc,GAIzBH,EAAM,QACJ,YACAD,EAAO,QAAQ,CACb,OAAQK,EAAO,OACf,WAAYA,EAAO,YAAA,uBACrB,CAAC,CACH,EAQF,MAAaC,GAA0E,gBAAM,OAC3F,YACc,gBAAO,IACL,gBAAO,IAAI,WAAa,CACpC,MAAMC,EAAS,QAAQ,IAAI,mBAE3B,GAAI,CAACA,EACH,OAAO,MAAO,IAAIrF,EAAY,CAC5B,QAAS,qDACX,CAAC,EAGH,MAAO,CACL,OAAQgF,EAAS,KAAKK,CAAM,EAC5B,WAAY,QAAQ,IAAI,oBAAA,uBAC1B,CACF,CAAC,EACA,GAAWP,EAAO,QAAQK,CAAM,CACnC,CACF,ECjCA,IAAa,kBAAb,eACwB,gBAAsC,CAAC,CAC3D,oBACAvE,CACF,EAAA,AAAE,CAAC,EAGL,IAAa,gBAAb,eACwB,gBAAoC,CAAC,CAAC,kBAAmB,CAC7E,KAAMjB,EACN,MAAOA,CACT,CAAC,CAAC,CAAC,KAAKC,CAAuB,EAAA,AAAE,CAAC,EAOpC,MAAa0F,GAAqBzF,ECjBlC,MAAa0F,GAA8B,gBAAa,CAGtD,YAA2B,gBAAO,QAAQ,WAAW,EACrD,QAAU,GAAUC,EAAM,WAC1B,QAAU,IAAW,CACnB,cAAe,UAAUR,EAAS,MAAMQ,EAAM,MAAM,GACtD,GAGA,aAAe,GAAS,IAAI,kBAAkBnE,EAAkBoE,CAAI,CAAC,EACrE,YAAa,CAAE,OAAM,WAAY,IAAI,gBAAgB,CAAE,OAAM,OAAM,CAAC,CACtE,CAAC,ECbD,IAAa,MAAb,eAAyC,gBAAQ,QAAuB,CAAC,CAAC,YAAY,EAAA,AAAE,CAAC,EAGzF,MAAa,OAAU,GACrBX,EAAO,QAAQC,EAAM,QAAQ,MAAOW,CAAgB,CAAC,EAGvD,MAAaC,GAAqB,gBAAO,QACzB,gBAAM,QAAQ,MAAO,CAAE,UAAa,KAAM,CAAC,CAC3D,EAGA,MAAaC,GAA2B,qBAAO5C,CAAiB,EAGhE,MAAa6C,GAA0B,qBAAO3C,CAAgB"}
@@ -3,7 +3,7 @@ import { ConfigError } from "@distilled.cloud/core/errors";
3
3
  * Vanta credentials -- hand-written.
4
4
  *
5
5
  * The `Credentials` service holds an *effect* that resolves the current
6
- * credentials on every request (the protocol layer resolves it per request
6
+ * credentials on every request (the protocol resolves it per request
7
7
  * on the calling fiber). Vanta authenticates with OAuth 2.0 bearer tokens:
8
8
  * callers hand an already-fetched access token; the protocol sends it as
9
9
  * `Authorization: Bearer <token>`.
@@ -20,7 +20,7 @@ export interface Config {
20
20
  readonly apiKey: Redacted.Redacted<string>;
21
21
  readonly apiBaseUrl: string;
22
22
  }
23
- declare const Credentials_base: Context.ServiceClass<Credentials, "VantaCredentials", Effect.Effect<Config, ConfigError, never>>;
23
+ declare const Credentials_base: Context.ServiceClass<Credentials, "VantaCredentials", Effect.Effect<Config, never, never>>;
24
24
  export declare class Credentials extends /*@__PURE__*/ Credentials_base {
25
25
  }
26
26
  /** Layer from a redacted access token + optional base URL. */
@@ -28,7 +28,12 @@ export declare const fromApiKey: (config: {
28
28
  readonly apiKey: Redacted.Redacted<string>;
29
29
  readonly apiBaseUrl?: string;
30
30
  }) => Layer.Layer<Credentials>;
31
- /** Reads VANTA_ACCESS_TOKEN (required) and VANTA_API_BASE_URL (optional). */
32
- export declare const CredentialsFromEnv: Layer.Layer<Credentials>;
31
+ /**
32
+ * Reads VANTA_ACCESS_TOKEN (required) and VANTA_API_BASE_URL (optional).
33
+ *
34
+ * Its configuration is read and checked once, when the layer is built: a
35
+ * problem there fails the layer with `ConfigError`.
36
+ */
37
+ export declare const CredentialsFromEnv: Layer.Layer<Credentials, ConfigError>;
33
38
  export {};
34
39
  //# sourceMappingURL=credentials.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D;;;;;;;;GAQG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAE5D,oCAAoC;AACpC,eAAO,MAAM,gBAAgB,8BAA8B,CAAC;AAE5D,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;;AAED,qBAAa,WACX,SAAQ,aAAa,CAAC,gBAErB;CAAG;AAEN,8DAA8D;AAC9D,eAAO,MAAM,UAAU,WAAY;IACjC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAOxB,CAAC;AAEJ,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAgBvD,CAAC"}
1
+ {"version":3,"file":"credentials.d.ts","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D;;;;;;;;GAQG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAE5D,oCAAoC;AACpC,eAAO,MAAM,gBAAgB,8BAA8B,CAAC;AAE5D,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;;AAED,qBAAa,WACX,SAAQ,aAAa,CAAC,gBAAyE;CAAG;AAEpG,8DAA8D;AAC9D,eAAO,MAAM,UAAU,WAAY;IACjC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAOxB,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAmBpE,CAAC"}
package/lib/errors.d.ts CHANGED
@@ -30,4 +30,11 @@ declare const VantaParseError_base: Schema.TaggedErrorClass<"VantaParseError", {
30
30
  /** Schema parse error wrapper. */
31
31
  export declare class VantaParseError extends /*@__PURE__*/ VantaParseError_base {
32
32
  }
33
+ /**
34
+ * The errors declared on the Vanta service: any operation can return them, and
35
+ * every generated operation lists them as its `serviceErrors`. Today that is
36
+ * each of core's status classes (401, 403, 404, 429, the 5xx ...).
37
+ */
38
+ export declare const VantaServiceErrors: readonly [typeof import("@distilled.cloud/core/errors").Unauthorized, typeof import("@distilled.cloud/core/errors").Forbidden, typeof import("@distilled.cloud/core/errors").NotFound, typeof import("@distilled.cloud/core/errors").BadRequest, typeof import("@distilled.cloud/core/errors").Conflict, typeof import("@distilled.cloud/core/errors").UnprocessableEntity, typeof import("@distilled.cloud/core/errors").TooManyRequests, typeof import("@distilled.cloud/core/errors").Locked, typeof import("@distilled.cloud/core/errors").InternalServerError, typeof import("@distilled.cloud/core/errors").BadGateway, typeof import("@distilled.cloud/core/errors").ServiceUnavailable, typeof import("@distilled.cloud/core/errors").GatewayTimeout];
39
+ export type VantaServiceError = InstanceType<(typeof VantaServiceErrors)[number]>;
33
40
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAIlE,OAAO,KAAK,MAAM,MAAM,yCAAyC,CAAC;;;;;;;AAElE,6EAA6E;AAC7E,qBAAa,iBACX,SAAQ,aAAa,CAAC,sBAGrB;CAAG;;;;;;;;;AAEN,kCAAkC;AAClC,qBAAa,eACX,SAAQ,aAAa,CAAC,oBAGU;CAAG"}
1
+ {"version":3,"file":"errors.d.ts","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAIlE,OAAO,KAAK,MAAM,MAAM,yCAAyC,CAAC;;;;;;;AAElE,6EAA6E;AAC7E,qBAAa,iBACX,SAAQ,aAAa,CAAC,sBAGrB;CAAG;;;;;;;;;AAEN,kCAAkC;AAClC,qBAAa,eACX,SAAQ,aAAa,CAAC,oBAGU;CAAG;AAErC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,+tBAAa,CAAC;AAC7C,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"}
package/lib/errors.js CHANGED
@@ -1 +1 @@
1
- export { errors$API_ERRORS as API_ERRORS, errors$BadGateway as BadGateway, errors$BadRequest as BadRequest, errors$ConfigError as ConfigError, errors$Conflict as Conflict, errors$DEFAULT_ERRORS as DEFAULT_ERRORS, errors$Forbidden as Forbidden, errors$GatewayTimeout as GatewayTimeout, errors$HTTP_STATUS_MAP as HTTP_STATUS_MAP, errors$InternalServerError as InternalServerError, errors$Locked as Locked, errors$NotFound as NotFound, errors$ServiceUnavailable as ServiceUnavailable, errors$TooManyRequests as TooManyRequests, errors$Unauthorized as Unauthorized, errors$UnknownVantaError as UnknownVantaError, errors$UnprocessableEntity as UnprocessableEntity, errors$VantaParseError as VantaParseError } from "./_bundle/sdk.js";
1
+ export { errors$API_ERRORS as API_ERRORS, errors$BadGateway as BadGateway, errors$BadRequest as BadRequest, errors$ConfigError as ConfigError, errors$Conflict as Conflict, errors$DEFAULT_ERRORS as DEFAULT_ERRORS, errors$Forbidden as Forbidden, errors$GatewayTimeout as GatewayTimeout, errors$HTTP_STATUS_MAP as HTTP_STATUS_MAP, errors$InternalServerError as InternalServerError, errors$Locked as Locked, errors$NotFound as NotFound, errors$ServiceUnavailable as ServiceUnavailable, errors$TooManyRequests as TooManyRequests, errors$Unauthorized as Unauthorized, errors$UnknownVantaError as UnknownVantaError, errors$UnprocessableEntity as UnprocessableEntity, errors$VantaParseError as VantaParseError, errors$VantaServiceErrors as VantaServiceErrors } from "./_bundle/sdk.js";
package/lib/index.d.ts CHANGED
@@ -7,9 +7,9 @@
7
7
  *
8
8
  * @example
9
9
  * ```ts
10
- * import * as Vanta from "@distilled.cloud/vanta";
10
+ * import * as ManageVanta from "@distilled.cloud/vanta/manage_vanta";
11
11
  *
12
- * const frameworks = yield* Vanta.manageVanta.listComplianceFrameworks({});
12
+ * const frameworks = yield* ManageVanta.listComplianceFrameworks({});
13
13
  * ```
14
14
  */
15
15
  export * from "./credentials.ts";
@@ -18,5 +18,4 @@ export * as T from "./traits.ts";
18
18
  export { VantaProtocol, type VantaOpError, type VantaOpContext } from "./protocol.ts";
19
19
  export { paginateCursor } from "./pagination.ts";
20
20
  export * as Retry from "./retry.ts";
21
- export * from "./services/index.ts";
22
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC"}
package/lib/index.js CHANGED
@@ -4,4 +4,3 @@ export * as T from "./traits.js";
4
4
  export { VantaProtocol } from "./protocol.js";
5
5
  export { paginateCursor } from "./pagination.js";
6
6
  export * as Retry from "./retry.js";
7
- export * from "./services/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC"}
1
+ {"version":3,"file":"pagination.d.ts","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC"}
package/lib/protocol.d.ts CHANGED
@@ -1,19 +1,16 @@
1
- import type * as API from "@distilled.cloud/core/api";
2
- import type { API_ERRORS, ConfigError, InvalidInput } from "@distilled.cloud/core/errors";
3
- import type { SdkError } from "@distilled.cloud/core/sdk-error";
1
+ import type { ErrorOf } from "@distilled.cloud/core/protocol";
4
2
  import type * as HttpClient from "effect/http/HttpClient";
5
- import type * as HttpClientError from "effect/http/HttpClientError";
6
- import type * as Layer from "effect/Layer";
7
3
  import { Credentials } from "./credentials.ts";
8
- import { UnknownVantaError, VantaParseError } from "./errors.ts";
4
+ import { UnknownVantaError, VantaParseError, type VantaServiceError } from "./errors.ts";
9
5
  /**
10
- * Error channel shared by every generated Vanta operation. Generated service
11
- * files annotate operations with `API.OperationMethod<I, O, VantaOpError,
12
- * VantaOpContext>` explicitly so the compiler never infers these back out of
13
- * the schema generics.
6
+ * What every generated Vanta operation fails with besides its own errors: the
7
+ * service's errors, the protocol's, and what resolving the credentials fails
8
+ * with. Generated service files annotate operations with
9
+ * `API.OperationMethod<I, O, VantaOpError, VantaOpContext>` explicitly so the
10
+ * compiler never infers these back out of the schema generics.
14
11
  */
15
- export type VantaOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownVantaError | ConfigError | HttpClientError.HttpClientError | VantaParseError | InvalidInput | SdkError;
12
+ export type VantaOpError = VantaServiceError | ErrorOf<typeof VantaProtocol>;
16
13
  /** Context (requirements) shared by every generated Vanta operation. */
17
14
  export type VantaOpContext = Credentials | HttpClient.HttpClient;
18
- export declare const VantaProtocol: Layer.Layer<API.Protocol>;
15
+ export declare const VantaProtocol: import("@distilled.cloud/core/protocol").Protocol<UnknownVantaError | VantaParseError | import("@distilled.cloud/core/protocol-rest").RestProtocolError, Credentials>;
19
16
  //# sourceMappingURL=protocol.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE1F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAiBhE,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,eAAe,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,YAAY,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GACzC,iBAAiB,GACjB,WAAW,GACX,eAAe,CAAC,eAAe,GAC/B,eAAe,GACf,YAAY,GACZ,QAAQ,CAAC;AAEb,wEAAwE;AACxE,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAEjE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAYlD,CAAC"}
1
+ {"version":3,"file":"protocol.d.ts","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAkB9D,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEzF;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,OAAO,CAAC,OAAO,aAAa,CAAC,CAAC;AAE7E,wEAAwE;AACxE,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAEjE,eAAO,MAAM,aAAa,uKAYxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAuC,MAAM,6BAA6B,CAAC;AAC/F;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;;AAErC,qEAAqE;AACrE,qBAAa,KAAM,SAAQ,aAAa,CAAC,UAA8C;CAAG;AAE1F,uEAAuE;AACvE,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD,sCAAsC;AACtC,eAAO,MAAM,IAAI,mFAEhB,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,UAAU,mFAA0C,CAAC;AAElE,oFAAoF;AACpF,eAAO,MAAM,SAAS,mFAAyC,CAAC"}
1
+ {"version":3,"file":"retry.d.ts","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAuC,MAAM,6BAA6B,CAAC;AAC/F;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;;AAErC,qEAAqE;AACrE,qBAAa,KAAM,SAAQ,aAAa,CAAC,UAA8C;CAAG;AAE1F,uEAAuE;AACvE,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD,sCAAsC;AACtC,eAAO,MAAM,IAAI,mFAEhB,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,UAAU,mFAA0C,CAAC;AAElE,oFAAoF;AACpF,eAAO,MAAM,SAAS,mFAAyC,CAAC"}
@@ -1,6 +1,69 @@
1
1
  import * as API from "@distilled.cloud/core/api";
2
+ import * as S from "@distilled.cloud/core/schema-lite";
2
3
  import { type VantaOpError, type VantaOpContext } from "../protocol.ts";
3
4
  export type { VantaOpError, VantaOpContext };
5
+ declare const BadRequest_base: S.TaggedErrorClass<"BadRequest", {
6
+ readonly code: any;
7
+ readonly message: any;
8
+ readonly body: any;
9
+ readonly headers: any;
10
+ }> & (new (...args: any[]) => {
11
+ "@distilled.cloud/error/categories": {
12
+ BadRequestError: true;
13
+ };
14
+ });
15
+ export declare class BadRequest extends /*@__PURE__*/ BadRequest_base {
16
+ }
17
+ declare const Conflict_base: S.TaggedErrorClass<"Conflict", {
18
+ readonly code: any;
19
+ readonly message: any;
20
+ readonly body: any;
21
+ readonly headers: any;
22
+ }> & (new (...args: any[]) => {
23
+ "@distilled.cloud/error/categories": {
24
+ ConflictError: true;
25
+ };
26
+ });
27
+ export declare class Conflict extends /*@__PURE__*/ Conflict_base {
28
+ readonly body?: OutboundError | string;
29
+ }
30
+ declare const Forbidden_base: S.TaggedErrorClass<"Forbidden", {
31
+ readonly code: any;
32
+ readonly message: any;
33
+ readonly body: any;
34
+ readonly headers: any;
35
+ }> & (new (...args: any[]) => {
36
+ "@distilled.cloud/error/categories": {
37
+ AuthError: true;
38
+ };
39
+ });
40
+ export declare class Forbidden extends /*@__PURE__*/ Forbidden_base {
41
+ }
42
+ declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
43
+ readonly code: any;
44
+ readonly message: any;
45
+ readonly body: any;
46
+ readonly headers: any;
47
+ }> & (new (...args: any[]) => {
48
+ "@distilled.cloud/error/categories": {
49
+ BadRequestError: true;
50
+ };
51
+ });
52
+ export declare class NotFound extends /*@__PURE__*/ NotFound_base {
53
+ }
54
+ declare const UnprocessableEntity_base: S.TaggedErrorClass<"UnprocessableEntity", {
55
+ readonly code: any;
56
+ readonly message: any;
57
+ readonly body: any;
58
+ readonly headers: any;
59
+ }> & (new (...args: any[]) => {
60
+ "@distilled.cloud/error/categories": {
61
+ BadRequestError: true;
62
+ };
63
+ });
64
+ export declare class UnprocessableEntity extends /*@__PURE__*/ UnprocessableEntity_base {
65
+ readonly body?: OutboundError | string;
66
+ }
4
67
  export interface AcceptInformationRequestEvidenceRequest {
5
68
  auditId: string;
6
69
  requestId: string;
@@ -334,6 +397,15 @@ export interface DeleteInformationRequestRequest {
334
397
  }
335
398
  export interface DeleteInformationRequestResponse {
336
399
  }
400
+ export interface DeleteInformationRequestAuditorFileRequest {
401
+ auditId: string;
402
+ requestId: string;
403
+ auditorFileId: string;
404
+ /** The email of the auditor deleting the file. They must be an active user in your audit firm and assigned to the audit. */
405
+ email: string;
406
+ }
407
+ export interface DeleteInformationRequestAuditorFileResponse {
408
+ }
337
409
  /** Emails of auditors who may access the new audit. Minimum one entry required. Each email must match an active user in the authenticated audit firm's domain. */
338
410
  export type DuplicateRequestAllowAuditorEmailsList = Array<string>;
339
411
  export interface DuplicateRequest {
@@ -743,7 +815,7 @@ export interface VantaTestSnapshotRawTestDataRow {
743
815
  /** Raw JSON payload as emitted by the test runner. Shape varies by `resourceType` for structured snapshots and matches the full test-run blob for unstructured snapshots. */
744
816
  rawJson: unknown;
745
817
  }
746
- /** Raw test data captured at snapshot time. */
818
+ /** Always empty. Read captured records from `GET /v1/audits/{auditId}/information-requests/{requestId}/evidence/{evidenceId}/test-snapshot/raw-data`. This field will be removed on 2027-01-25. */
747
819
  export type VantaTestSnapshotEvidenceDetailRawTestDataList = Array<VantaTestSnapshotRawTestDataRow>;
748
820
  export interface VantaTestSnapshotExcludedItem {
749
821
  id: string;
@@ -794,7 +866,7 @@ export interface VantaTestSnapshotEvidenceDetail {
794
866
  integrations: VantaTestSnapshotEvidenceDetailIntegrationsList;
795
867
  /** SLA remediation policy attached to the test, or null when no SLA is set. */
796
868
  slaRemediation: VantaTestSnapshotSlaRemediation | null;
797
- /** Raw test data captured at snapshot time. */
869
+ /** Always empty. Read captured records from `GET /v1/audits/{auditId}/information-requests/{requestId}/evidence/{evidenceId}/test-snapshot/raw-data`. This field will be removed on 2027-01-25. */
798
870
  rawTestData: VantaTestSnapshotEvidenceDetailRawTestDataList;
799
871
  /** Resources excluded from the test at snapshot time. Absent when the snapshot data could not be loaded; clients should treat a missing field as "unknown" rather than "nothing excluded". */
800
872
  outOfScopeResources?: VantaTestSnapshotOutOfScopeResources | undefined;
@@ -1164,7 +1236,7 @@ export interface AuditRisk {
1164
1236
  likelihood?: number | null | undefined;
1165
1237
  /** Impact score of the risk, or null if not scored. Full Audit View only - omitted in Controlled Audit View. */
1166
1238
  impact?: number | null | undefined;
1167
- /** Inherent risk score, or null if not scored. Defaults to the likelihood * impact product; when the organization scores risks by factors, this is the rolled-up factor score rounded to two decimals. */
1239
+ /** Inherent risk score, or null if not scored. The score combines the ratings of the dimensions that the risk is scored on, such as likelihood and impact, rounded to two decimals. */
1168
1240
  inherentRisk?: number | null | undefined;
1169
1241
  /** Risk treatment strategy, or null if not set. */
1170
1242
  treatment?: AuditRiskTreatment | null | undefined;
@@ -1368,6 +1440,37 @@ export interface PaginatedResponseInformationRequestActivityLogResults {
1368
1440
  export interface PaginatedResponseInformationRequestActivityLog {
1369
1441
  results: PaginatedResponseInformationRequestActivityLogResults;
1370
1442
  }
1443
+ export interface ListInformationRequestAuditorFilesRequest {
1444
+ auditId: string;
1445
+ requestId: string;
1446
+ /** Maximum number of files to return per page. */
1447
+ pageSize?: number | undefined;
1448
+ /** Pagination cursor from a previous response. Provide to fetch the next page of files. */
1449
+ pageCursor?: string | undefined;
1450
+ }
1451
+ /** The auditor who uploaded the file. */
1452
+ export type InformationRequestAuditorFileUploader = VantaDocumentEvidenceAddedBy;
1453
+ /** A file an auditor shared with the customer on an information request. */
1454
+ export interface InformationRequestAuditorFile {
1455
+ id: string;
1456
+ /** The filename, falling back to the title or document ID when unavailable. */
1457
+ filename: string;
1458
+ /** The stored MIME type, or application/octet-stream when unavailable. */
1459
+ mimeType: string;
1460
+ /** A temporary download link that expires one hour after it is issued. List the files again for a fresh link. Do not use it as a key. Use `filename` when saving the download; the URL does not supply a filename. */
1461
+ url: string;
1462
+ /** Null when the uploader's account no longer exists. */
1463
+ uploadedBy: VantaDocumentEvidenceAddedBy | null;
1464
+ uploadedDate: string;
1465
+ }
1466
+ export type PaginatedResponseInformationRequestAuditorFileResultsDataList = Array<InformationRequestAuditorFile>;
1467
+ export interface PaginatedResponseInformationRequestAuditorFileResults {
1468
+ data: PaginatedResponseInformationRequestAuditorFileResultsDataList;
1469
+ pageInfo: PageInfo;
1470
+ }
1471
+ export interface PaginatedResponseInformationRequestAuditorFile {
1472
+ results: PaginatedResponseInformationRequestAuditorFileResults;
1473
+ }
1371
1474
  export type ListInformationRequestEvidenceRequestEvidenceTypeMatchesAnyList = Array<InformationRequestSupportedEvidenceType | (string & {})>;
1372
1475
  export interface ListInformationRequestEvidenceRequest {
1373
1476
  auditId: string;
@@ -1417,6 +1520,31 @@ export interface ListInformationRequestsForControlRequest {
1417
1520
  /** Pagination cursor from a previous response. Provide to fetch the next page of results. */
1418
1521
  pageCursor?: string | undefined;
1419
1522
  }
1523
+ export interface ListInformationRequestTestSnapshotRawDataRequest {
1524
+ auditId: string;
1525
+ requestId: string;
1526
+ evidenceId: string;
1527
+ pageSize?: number | undefined;
1528
+ pageCursor?: string | undefined;
1529
+ }
1530
+ export interface VantaTestSnapshotRawTestDataPageRow {
1531
+ /** Identifier of the underlying resource the row was captured from. Null for unstructured snapshots, which do not partition by resource. */
1532
+ resourceId: string | null;
1533
+ /** Specific resource kind for the row (e.g. `AwsIamUser`). Null for unstructured snapshots. */
1534
+ resourceType: string | null;
1535
+ /** Raw JSON payload as emitted by the test runner and captured at snapshot time. For structured snapshots, the shape varies by `resourceType`. For unstructured snapshots, this contains one captured record; `resourceId` and `resourceType` are both `null`. Null when `dataTooLarge` is true because the source data was too large to capture. The row remains in the page as a placeholder, with no JSON payload available. */
1536
+ rawJson: unknown;
1537
+ /** True when the record was too large to capture and has no stored JSON. */
1538
+ dataTooLarge: boolean;
1539
+ }
1540
+ export type PaginatedResponseVantaTestSnapshotRawTestDataPageRowResultsDataList = Array<VantaTestSnapshotRawTestDataPageRow>;
1541
+ export interface PaginatedResponseVantaTestSnapshotRawTestDataPageRowResults {
1542
+ data: PaginatedResponseVantaTestSnapshotRawTestDataPageRowResultsDataList;
1543
+ pageInfo: PageInfo;
1544
+ }
1545
+ export interface PaginatedResponseVantaTestSnapshotRawTestDataPageRow {
1546
+ results: PaginatedResponseVantaTestSnapshotRawTestDataPageRowResults;
1547
+ }
1420
1548
  export type AuditIntegrationTag = "ACCESS" | "COMPUTERS" | "CUSTOM_RESOURCE" | "DATA_LOSS_PREVENTION" | "DOCUMENTS" | "DOCUMENT_UPLOAD" | "FRAMEWORK" | "GROUPS" | "INVENTORY" | "NOTIFICATIONS" | "PEOPLE" | "POLICIES" | "SECURITY_AWARENESS_TRAINING" | "SECURITY_SCANNER_ALERTS" | "SSO" | "TASK_CREATION" | "TASK_TRACKING" | "TRUST_CENTER" | "VENDOR_DISCOVERY" | "VENDOR_PROCUREMENT" | "VULNERABILITIES";
1421
1549
  export type ListIntegrationsRequestTagsMatchesAnyList = Array<AuditIntegrationTag | (string & {})>;
1422
1550
  export type AuditIntegrationCategory = "ATS_MERGE_ACCOUNT" | "BACKGROUND_CHECK_SERVICE" | "CLOUD_PROVIDER" | "COMMUNICATION_PLATFORM" | "CRM_MERGE_ACCOUNT" | "CRM_PLATFORM" | "DATASTORE_PROVIDER" | "DATA_LOSS_PREVENTION" | "DATA_WAREHOUSE_PROVIDER" | "DOCUMENT_MANAGEMENT_TOOL" | "ENDPOINT_SECURITY_TOOL" | "HR_PROVIDER" | "IDENTITY_PROVIDER" | "INCIDENT_MANAGEMENT_TOOL" | "MOBILE_DEVICE_MANAGEMENT_TOOL" | "MONITORING_SERVICE" | "OTHER_INTEGRATION" | "SECURITY_AWARENESS_TRAINING_PROVIDER" | "SECURITY_SCANNER_ALERTS" | "TASK_TRACKER" | "VERSION_CONTROL_SYSTEM" | "VULNERABILITY_SCANNER";
@@ -1825,6 +1953,43 @@ export interface UpdateInformationRequestRequest {
1825
1953
  /** The complete desired set of control IDs linked to this request. Send the full list to replace the set, an empty array to clear it, or omit the property to leave links unchanged. Each ID must identify an existing control in the customer's organization and is returned by the audit controls endpoint. The request is rejected if any ID does not match a control. */
1826
1954
  linkedControlIds?: UpdateInformationRequestRequestLinkedControlIdsList | undefined;
1827
1955
  }
1956
+ export interface UploadFinalizeInformationRequestAuditorFileRequest {
1957
+ auditId: string;
1958
+ requestId: string;
1959
+ /** The `uploadId` returned by the start-upload operation for this application, audit and information request. */
1960
+ uploadId: string;
1961
+ }
1962
+ export interface UploadedAuditorFile {
1963
+ /** ID of the attached auditor file. Match it to `id` in the auditor-files list, or use it as `auditorFileId` when deleting the file. */
1964
+ id: string;
1965
+ }
1966
+ export interface UploadInitiateInformationRequestAuditorFileRequest {
1967
+ auditId: string;
1968
+ requestId: string;
1969
+ /** Email of the auditor to credit as the uploader. They must be an active user in your audit firm with access to the audit, including when you finalize. */
1970
+ email: string;
1971
+ /** Filename to display on the attachment. Must be 1-255 characters after trimming surrounding whitespace. */
1972
+ filename: string;
1973
+ /** The file's declared MIME type. Accepted values: - `application/json` - `application/pdf` - `application/postscript` - `application/vnd.openxmlformats-officedocument.wordprocessingml.document` - `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` - `application/x-zip-compressed` - `application/zip` - `image/jpeg` - `image/png` - `image/webp` - `text/csv` - `text/plain` Matching ignores case and MIME parameters, so `TEXT/CSV` and `text/csv; charset=utf-8` are also accepted. Unsupported file types return `422` during finalization. */
1974
+ contentType: string;
1975
+ }
1976
+ /** Form fields to send with the file to `url`. Copy every returned name and value unchanged into a multipart/form-data POST, then append the file under `file` as the final part. These are form fields, not HTTP headers. Field names may vary between uploads; do not hard-code the example fields. */
1977
+ export type AuditorFileUploadFormFields = {
1978
+ [key: string]: string | undefined;
1979
+ };
1980
+ export interface AuditorFileUploadGrant {
1981
+ /** Opaque identifier for this upload. Pass it unchanged to finalize; it is not the attached file's ID. */
1982
+ uploadId: string;
1983
+ /** Temporary URL for the file-transfer request. POST every returned `fields` entry and the file to this URL, without a Vanta Authorization header. This is not a download link. */
1984
+ url: string;
1985
+ fields: AuditorFileUploadFormFields;
1986
+ /** Maximum file size in bytes, inclusive. The limit is 50MB. */
1987
+ maxSizeBytes: number;
1988
+ /** UTC expiration timestamp for `url` and `fields`. Start the file-transfer POST well before this time. */
1989
+ transferExpiresAt: string;
1990
+ /** UTC deadline to complete finalization and attach the file, even if the file transfer has already succeeded. */
1991
+ finalizationExpiresAt: string;
1992
+ }
1828
1993
  export interface UpsertAssessmentForControlRequest {
1829
1994
  auditId: string;
1830
1995
  controlId: string;
@@ -1848,6 +2013,9 @@ export interface AuditorControlAssessment {
1848
2013
  /** The recorded justification. */
1849
2014
  justification: string;
1850
2015
  }
2016
+ export interface OutboundError {
2017
+ message: string;
2018
+ }
1851
2019
  export type AcceptInformationRequestEvidenceError = VantaOpError;
1852
2020
  /** Accept evidence for an information request Accepts evidence for an information request, confirming that all submitted evidence meets audit requirements. This action changes the request's approvalStatus to an approved state and creates an activity log entry. Acceptance workflow: 1. Auditor reviews submitted evidence 2. If evidence is satisfactory, auditor calls this endpoint 3. Request status changes to approved state and is considered complete for this audit cycle Use this endpoint when: - All required evidence has been submitted - Evidence quality meets audit standards - Evidence addresses all specified framework codes - No additional information is needed Rate limit: 50 requests / minute. */
1853
2021
  export declare const acceptInformationRequestEvidence: API.OperationMethod<AcceptInformationRequestEvidenceRequest, InformationRequest, AcceptInformationRequestEvidenceError, VantaOpContext>;
@@ -1879,8 +2047,11 @@ export type DeleteCommentForInformationRequestError = VantaOpError;
1879
2047
  /** Delete a comment for an information request Deletes an existing comment for an information request. Only the original author of the comment can delete it. The author is identified by their email address, which must match the email of the user who created the comment. Rate limit: 25 requests / minute. */
1880
2048
  export declare const deleteCommentForInformationRequest: API.OperationMethod<DeleteCommentForInformationRequestRequest, DeleteCommentForInformationRequestResponse, DeleteCommentForInformationRequestError, VantaOpContext>;
1881
2049
  export type DeleteInformationRequestError = VantaOpError;
1882
- /** Delete an information request for an audit Deletes an information request for an audit. This performs a soft delete, marking the request as deleted (setting `deletionDate`) while preserving it in the system for audit history and compliance tracking. Soft deletion allows: - Maintaining complete audit trail of all requests ever created - Retrieving deleted requests via `changedSinceDate` for synchronization After deletion: - The request remains in list responses with `deletionDate` set, even when `changedSinceDate` is omitted Rate limit: 50 requests / minute. */
2050
+ /** Delete an information request for an audit Deletes an information request for an audit. This performs a soft delete, marking the request as deleted (setting `deletionDate`) while preserving it in the system for audit history and compliance tracking. When information request webhooks are enabled, Vanta can deliver `v1.information-request.deleted` after the deletion succeeds to the subscribed audit firm that had access to the audit before deletion. The payload identifies the deleted request and its audit. Use the information request list to reconcile deletions. The list returns the request with `deletionDate` set, even when `changedSinceDate` is omitted. Rate limit: 50 requests / minute. */
1883
2051
  export declare const deleteInformationRequest: API.OperationMethod<DeleteInformationRequestRequest, DeleteInformationRequestResponse, DeleteInformationRequestError, VantaOpContext>;
2052
+ export type DeleteInformationRequestAuditorFileError = VantaOpError;
2053
+ /** Delete an auditor file from an information request Deletes an auditor file from an information request. Any auditor assigned to the audit may delete any auditor's file, not only their own. Identify the deleting auditor by `email`: they must be an active user in your audit firm and assigned to the audit, otherwise this returns 403. A completed audit returns 409; reopen the audit before deleting files. Approving the request does not lock its files. An unknown or already deleted file returns 404. Lists no longer return the file or new download URLs for it. Download URLs issued before the delete stay valid until they expire, at most one hour. Rate limit: 50 requests / minute. */
2054
+ export declare const deleteInformationRequestAuditorFile: API.OperationMethod<DeleteInformationRequestAuditorFileRequest, DeleteInformationRequestAuditorFileResponse, DeleteInformationRequestAuditorFileError, VantaOpContext>;
1884
2055
  export type DuplicateError = VantaOpError;
1885
2056
  /** Duplicate an IRL audit Duplicates an existing IRL audit into a new audit engagement with the supplied displayName, audit dates, early access date, and auditor roster. Company, audit type, and framework are copied from the source audit and cannot be changed. Each email in `allowAuditorEmails` must match an active user in the authenticated audit firm's domain. Provision auditors via `POST /auditors` before referencing them here, or copy emails from `GET /audits/{sourceAuditId}` -> `allowAuditorEmails` when duplicating with the same roster. Information requests are copied from the source audit. After duplication: - Requests with Vanta evidence will be pre-filled and marked as internal review. Review them before sharing with your customer. - Requests where evidence was not available or was uploaded externally will need evidence added manually. - Evidence capture dates and due dates can be modified after duplication. Audits with generated information requests can be duplicated only after their information requests have been created successfully. Rate limit: 10 requests / minute. */
1886
2057
  export declare const duplicate: API.OperationMethod<DuplicateRequest, Audit, DuplicateError, VantaOpContext>;
@@ -1909,7 +2080,7 @@ export type GetInformationRequestEvidenceError = VantaOpError;
1909
2080
  /** Get information request evidence by ID Retrieves a single evidence item attached to an information request by its ID. This endpoint always includes soft-deleted evidence (where `deletionDate !== null`), so an evidence ID surfaced by a `changedSinceDate` delta sync stays fetchable after the evidence is deleted. Clients should check the `deletionDate` field to identify and handle deleted records appropriately in their systems. Evidence is only resolvable while its information request exists. Once the request itself is deleted, this endpoint returns a 4xx HTTP error instead of the evidence. Check the request's `deletionDate` using `GET /audits/{auditId}/information-requests` before treating its evidence as deleted too. Evidence that the customer has not shared with the auditor is reported as not found, rather than distinguishing it from an ID that does not exist. Rate limit: 250 requests / minute. */
1910
2081
  export declare const getInformationRequestEvidence: API.OperationMethod<GetInformationRequestEvidenceRequest, InformationRequestEvidence, GetInformationRequestEvidenceError, VantaOpContext>;
1911
2082
  export type GetInformationRequestTestSnapshotEvidenceDetailError = VantaOpError;
1912
- /** Get test snapshot detail for an evidence row Retrieves the rich detail for a single VANTA_TEST_SNAPSHOT evidence row attached to an information request. The response includes test-level metadata (description, integrations, SLA), the raw test data captured at snapshot time, and the resources that were excluded from the test (out-of-scope resources). For structured snapshots, the `rawTestData` array contains one row per resource the test ran against; each row carries `resourceId`, `resourceType`, and the raw JSON for that resource. For unstructured snapshots, the `rawTestData` array contains a single row with `resourceId` and `resourceType` set to `null` and `rawJson` containing the entire test-run JSON blob. The `outOfScopeResources` field lists resources excluded at the test level (customer-disabled) and the framework level (segment configuration). Empty exclusion groups are filtered out. The `apiRequests` array contains the HTTP requests captured during API introspection tests. Empty when the test does not perform API introspection. Rate limit: 10 requests / minute. */
2083
+ /** Get test snapshot detail for an evidence row Retrieves the rich detail for a single VANTA_TEST_SNAPSHOT evidence row attached to an information request. The response includes test-level metadata (description, integrations, SLA) and out-of-scope resources. To retrieve captured raw test data, call `GET /v1/audits/{auditId}/information-requests/{requestId}/evidence/{evidenceId}/test-snapshot/raw-data`. The `outOfScopeResources` field lists resources excluded at the test level (customer-disabled) and the framework level (segment configuration). Empty exclusion groups are filtered out. The `apiRequests` array contains the HTTP requests captured during API introspection tests. Empty when the test does not perform API introspection. Rate limit: 50 requests / minute. */
1913
2084
  export declare const getInformationRequestTestSnapshotEvidenceDetail: API.OperationMethod<GetInformationRequestTestSnapshotEvidenceDetailRequest, VantaTestSnapshotEvidenceDetail, GetInformationRequestTestSnapshotEvidenceDetailError, VantaOpContext>;
1914
2085
  export type GetOrganizationInformationError = VantaOpError;
1915
2086
  /** Get organization information for an audit Retrieves organization information for an audit. This endpoint returns a single record containing the organization's business information visible to auditors during an audit engagement. Sorting and pagination are not applicable. Only Controlled Audit View (CAV) audits are supported. Full Audit View audits are rejected with 403. Returns 403 if the customer has not made this population page visible to auditors. Rate limit: 10 requests / minute. */
@@ -1956,15 +2127,21 @@ export declare const listCommentsForInformationRequest: API.OperationMethod<List
1956
2127
  export type ListInformationRequestActivityError = VantaOpError;
1957
2128
  /** List information request activity Retrieves a paginated list of activity logs for an information request, providing an audit trail of the changes and actions taken on it. Activity recording Vanta's automated preparation of a request is never returned by this endpoint, so `fillOutcome` is always null here. Some internal status transitions are also withheld, and those are removed after a page is selected, so a page can contain fewer entries than `pageSize` -- or none at all -- while more pages remain. Follow `results.pageInfo.hasNextPage` rather than treating a short or empty page as the end of the list. If the information request has been deleted, this endpoint returns a 4xx HTTP error instead of its activity. This endpoint supports delta synchronization via the `changedSinceDate` parameter, allowing efficient polling for changes without retrieving the entire dataset. Pagination usage: 1. Make initial request with desired `pageSize` 2. Check `results.pageInfo.hasNextPage` to see if more data exists 3. If true, use `results.pageInfo.endCursor` as `pageCursor` in next request 4. Repeat until `hasNextPage` is false Delta sync usage: 1. Store the timestamp of your last sync 2. Pass that timestamp as `changedSinceDate` 3. Only activity created since that timestamp is returned 4. Process updates to track all changes to the information request 5. Update your last sync timestamp to the current time Rate limit: 50 requests / minute. */
1958
2129
  export declare const listInformationRequestActivity: API.OperationMethod<ListInformationRequestActivityRequest, PaginatedResponseInformationRequestActivityLog, ListInformationRequestActivityError, VantaOpContext>;
2130
+ export type ListInformationRequestAuditorFilesError = VantaOpError;
2131
+ /** List auditor files for an information request Lists the files auditors shared with the customer on an information request, newest upload first, with ties ordered by ID so pages are stable. Deleted files are not returned; list again to see the current set. Each `url` is a download link that expires one hour after it is issued. List the files again to get fresh download URLs. Do not use `url` as a key. Rate limit: 50 requests / minute. */
2132
+ export declare const listInformationRequestAuditorFiles: API.OperationMethod<ListInformationRequestAuditorFilesRequest, PaginatedResponseInformationRequestAuditorFile, ListInformationRequestAuditorFilesError, VantaOpContext>;
1959
2133
  export type ListInformationRequestEvidenceError = VantaOpError;
1960
2134
  /** List evidence for an information request Retrieves a paginated list of all evidence attached to an information request, enabling auditors to review evidence submitted by customers. This endpoint always includes soft-deleted records (where `deletionDate !== null`). Clients should check the `deletionDate` field to identify and handle deleted records appropriately in their systems. If the information request itself has been deleted, this endpoint returns a 4xx HTTP error instead of its evidence. This endpoint supports delta synchronization via the `changedSinceDate` parameter, allowing efficient polling for changes without retrieving the entire dataset. Pagination usage: 1. Make initial request with desired `pageSize` 2. Check `results.pageInfo.hasNextPage` to see if more data exists 3. If true, use `results.pageInfo.endCursor` as `pageCursor` in next request 4. Repeat until `hasNextPage` is false Delta sync usage: 1. Store the timestamp of your last sync 2. Pass that timestamp as `changedSinceDate` 3. Only evidence created, modified, shared, or deleted since that timestamp is returned 4. Process updates, including soft-deletes (deletionDate !== null) 5. Update your last sync timestamp to the current time Identifying evidence and files: - Use `id` as the key for each evidence item, whatever its type. - To recognize the same file across information requests, use the file key for the evidence type. UPLOADED_DOCUMENT uses `evidence.id`. VANTA_DOCUMENT and VANTA_POLICY use `evidence.file.id`, which identifies the source document or policy file. VANTA_TEST uses `evidence.snapshotId` plus `evidence.fileType`. LINK, OBSERVATION, and VANTA_TEST_SNAPSHOT evidence has no file. - Do not use `file.url` as a key. It is a temporary download link. Rate limit: 50 requests / minute. */
1961
2135
  export declare const listInformationRequestEvidence: API.OperationMethod<ListInformationRequestEvidenceRequest, PaginatedResponseInformationRequestEvidence, ListInformationRequestEvidenceError, VantaOpContext>;
1962
2136
  export type ListInformationRequestsError = VantaOpError;
1963
- /** List information requests for an audit Retrieves a paginated list of all information requests for an audit, enabling external audit management systems to display and track evidence requests. This endpoint always includes soft-deleted records (where `deletionDate !== null`). Clients should check the `deletionDate` field to identify and handle deleted records appropriately in their systems. This is the only endpoint that returns a deleted information request. No webhook fires when a request is deleted. Endpoints under `/audits/{auditId}/information-requests/{requestId}` return a 4xx HTTP error for a deleted request. To confirm deletion, check the request's `deletionDate` in this list. Deleting a request does not set `deletionDate` on its comments or evidence or send delete events for them. Once this list confirms the request was deleted, treat its comments and evidence as deleted too. This endpoint supports delta synchronization via the `changedSinceDate` parameter, allowing efficient polling for changes without retrieving the entire dataset. Pagination usage: 1. Make initial request with desired `pageSize` 2. Check `results.pageInfo.hasNextPage` to see if more data exists 3. If true, use `results.pageInfo.endCursor` as `pageCursor` in next request 4. Repeat until `hasNextPage` is false Delta sync usage: 1. Store the timestamp of your last sync 2. Pass that timestamp as `changedSinceDate` 3. Only requests created, modified, or deleted since that timestamp are returned 4. Process updates and soft-deletes by checking the `deletionDate` field 5. Update your last sync timestamp to the current time `segmentIds` on each returned request is resolved against the audit's current scope. A scope-only change (a segment leaving or joining the audit without the request row being written) is not a delta-sync event. Re-fetch without `changedSinceDate`, or GET by id, to see the current projection. Rate limit: 50 requests / minute. */
2137
+ /** List information requests for an audit Retrieves a paginated list of all information requests for an audit, enabling external audit management systems to display and track evidence requests. This list includes soft-deleted requests (`deletionDate !== null`) even when `changedSinceDate` is omitted. When supplied, `changedSinceDate` filters both live and deleted requests. This is the only endpoint that returns a deleted information request. Deletion makes the request and its child endpoints inaccessible by ID. A `403` or `404` can also mean access was lost. Use `deletionDate` or the `v1.information-request.deleted` webhook to confirm deletion. Remove the deleted request and its comments and evidence from your local mirror. Deleting a request produces no separate deletion events or tombstones for its children. To recover from missed request deletion events, paginate this list without `changedSinceDate` or other optional filters. Reconcile missing records only after a successful, complete traversal with access to the audit. This endpoint supports delta synchronization via the `changedSinceDate` parameter, allowing efficient polling for changes without retrieving the entire dataset. Pagination usage: 1. Make initial request with desired `pageSize` 2. Check `results.pageInfo.hasNextPage` to see if more data exists 3. If true, use `results.pageInfo.endCursor` as `pageCursor` in next request 4. Repeat until `hasNextPage` is false Delta sync usage: 1. Capture the timestamp before requesting the first page 2. Pass the previous successful sync's start timestamp as `changedSinceDate` 3. Keep the same filters across pages and use `deletionDate` to process deletes 4. Save the captured start timestamp only after every page succeeds 5. Handle records returned by more than one sync idempotently `segmentIds` on each returned request is resolved against the audit's current scope. A scope-only change (a segment leaving or joining the audit without the request row being written) is not a delta-sync event. Re-fetch without `changedSinceDate`, or GET by id, to see the current projection. Rate limit: 50 requests / minute. */
1964
2138
  export declare const listInformationRequests: API.OperationMethod<ListInformationRequestsRequest, PaginatedResponseInformationRequest, ListInformationRequestsError, VantaOpContext>;
1965
2139
  export type ListInformationRequestsForControlError = VantaOpError;
1966
2140
  /** List information requests linked to a control within an audit Returns a paginated list of active information requests linked to a specific control within an IRL audit. Only links saved on the audit's current control rows are included. Soft-deleted information requests are not included in the response. To synchronize deletions, use `GET /audits/{auditId}/information-requests`, which supports `changedSinceDate` and includes soft-deleted records. Returns 404 when the control is not part of the audit. Returns an empty page when the control is part of the audit but has no active IRLs linked to it. Pagination usage: 1. Make initial request with desired `pageSize` 2. Check `results.pageInfo.hasNextPage` to see if more data exists 3. If true, use `results.pageInfo.endCursor` as `pageCursor` in next request 4. Repeat until `hasNextPage` is false Rate limit: 50 requests / minute. */
1967
2141
  export declare const listInformationRequestsForControl: API.OperationMethod<ListInformationRequestsForControlRequest, PaginatedResponseInformationRequest, ListInformationRequestsForControlError, VantaOpContext>;
2142
+ export type ListInformationRequestTestSnapshotRawDataError = VantaOpError;
2143
+ /** List raw test data for a test snapshot Lists raw test data captured in a test snapshot, in capture order. Structured entries contain the primary resource ID, type, and captured JSON. Unstructured entries contain one captured JSON record, with null resource ID and type. Pass `results.pageInfo.endCursor` as `pageCursor` to continue until `results.pageInfo.hasNextPage` is false. Deleted evidence returns 404. Rate limit: 50 requests / minute. */
2144
+ export declare const listInformationRequestTestSnapshotRawData: API.OperationMethod<ListInformationRequestTestSnapshotRawDataRequest, PaginatedResponseVantaTestSnapshotRawTestDataPageRow, ListInformationRequestTestSnapshotRawDataError, VantaOpContext>;
1968
2145
  export type ListIntegrationsError = VantaOpError;
1969
2146
  /** List integrations for an audit Retrieves integration population data for an audit. This endpoint provides access to integration records visible to auditors during an audit engagement. Integrations represent connected services (e.g., GitHub, AWS, Slack) that provide data for the audit. Supports filtering by: - `search`: Searches integration names (case-insensitive) - `tagsMatchesAny`: Filters by integration tag (ACCESS, COMPUTERS, etc.) - `categoriesMatchesAny`: Filters by category (CLOUD_PROVIDER, HR_PROVIDER, etc.) Uses cursor-based pagination. To paginate: 1. Make initial request with desired `pageSize` 2. Check `results.pageInfo.hasNextPage` 3. Use `results.pageInfo.endCursor` as `pageCursor` for next request Results are sorted by integration display name (ascending). This sort order is fixed and cannot be customized via query parameters. Supports audits with one or more program segments. Audits with system segments are not supported by this endpoint. Only Controlled Audit View (CAV) audits are supported. Full Audit View audits are rejected with 403. Returns 403 if the customer has not made this population page visible to auditors. Rate limit: 10 requests / minute. */
1970
2147
  export declare const listIntegrations: API.OperationMethod<ListIntegrationsRequest, PaginatedResponseAuditIntegration, ListIntegrationsError, VantaOpContext>;
@@ -1998,6 +2175,12 @@ export declare const updateCommentForInformationRequest: API.OperationMethod<Upd
1998
2175
  export type UpdateInformationRequestError = VantaOpError;
1999
2176
  /** Update an information request for an audit Updates an existing information request for an audit, allowing modification of request details as audit requirements evolve. Supports partial updates where only specified fields are changed; omitted fields remain unchanged. Common use cases: - Updating due dates as audit timelines shift - Refining descriptions to clarify requirements - Adjusting request type Note: The `modificationDate` is automatically updated to the current timestamp when any field is changed. Rate limit: 50 requests / minute. */
2000
2177
  export declare const updateInformationRequest: API.OperationMethod<UpdateInformationRequestRequest, InformationRequest, UpdateInformationRequestError, VantaOpContext>;
2178
+ export type UploadFinalizeInformationRequestAuditorFileError = BadRequest | Forbidden | NotFound | Conflict | UnprocessableEntity | VantaOpError;
2179
+ /** Complete an auditor file upload and attach the file Completes an auditor file upload by validating the file and attaching it to the information request. First start an upload with `POST /v1/audits/{auditId}/information-requests/{requestId}/auditor-files/uploads`, then transfer the file to the returned `url` and wait for its 2xx response. Calling finalize before the file arrives ends that upload; start a new one. Send `{ "uploadId": "<returned uploadId>" }` using the same application, audit and information request that started the upload. Vanta uses the auditor identified by `email` at the start; that auditor must still be an active user in your firm with audit access. Unsupported file types return `422` during finalization. A 201 response contains the attached file's `id`, which differs from `uploadId`. Use `GET /v1/audits/{auditId}/information-requests/{requestId}/auditor-files` to find that ID and obtain a temporary download URL. Retry the same upload ID with backoff after a lost response, a 5xx or a 429. Stop retrying at `finalizationExpiresAt`. A 409 means the audit is completed; stop this attempt. For 404, 413 or 422, stop this attempt and correct the input or start a new upload. A 429 can mean too many requests, another finalization of this upload is still running, or too many files are being finalized for this application and customer. After a failed attempt, you may need to wait up to 60 seconds before retrying. Expired uploads, missing files and unsupported files return 422; files over 50MB return 413. Retrying a finalization that already succeeded returns the original auditor file ID, even if the file was later deleted; it does not attach the file again. Current access is still required. Rate limit: 10 requests / minute. */
2180
+ export declare const uploadFinalizeInformationRequestAuditorFile: API.OperationMethod<UploadFinalizeInformationRequestAuditorFileRequest, UploadedAuditorFile, UploadFinalizeInformationRequestAuditorFileError, VantaOpContext>;
2181
+ export type UploadInitiateInformationRequestAuditorFileError = BadRequest | Forbidden | NotFound | Conflict | UnprocessableEntity | VantaOpError;
2182
+ /** Start an auditor file upload Starts an upload of a file an auditor provides for the customer, such as instructions or a template, on an information request. This does not upload customer evidence. Use this three-step flow: 1. Call this endpoint with `email`, `filename` and `contentType` to receive an `uploadId`, a temporary `url` and form `fields`. 2. POST the file to `url` as `multipart/form-data` before `transferExpiresAt`. Copy every returned field name and value unchanged, then append the file under `file` as the final part. Do not hard-code the field names or send your Vanta bearer token to this URL. Let your HTTP client set the multipart Content-Type header and boundary. Wait for a 2xx response; the response body may be empty. 3. POST `{ "uploadId": "<returned uploadId>" }` to `/v1/audits/{auditId}/information-requests/{requestId}/auditor-files/uploads/finalize` and complete finalization before `finalizationExpiresAt`. The file is attached only after finalization succeeds. Each upload accepts one file up to 50MB, inclusive. The auditor identified by `email` is credited as the uploader and must be an active user in your firm with access to the audit. A completed audit returns 409. Each application is limited to 10 unfinished auditor file uploads per customer, across all audits and requests. Uploads count toward this limit until they are finalized, fail, or expire. Starting another upload at this limit returns 429, even if the earlier file transfers have succeeded. Repeating this start operation creates a new upload; it does not recover an earlier upload whose response was lost. Rate limit: 10 requests / minute. */
2183
+ export declare const uploadInitiateInformationRequestAuditorFile: API.OperationMethod<UploadInitiateInformationRequestAuditorFileRequest, AuditorFileUploadGrant, UploadInitiateInformationRequestAuditorFileError, VantaOpContext>;
2001
2184
  export type UpsertAssessmentForControlError = VantaOpError;
2002
2185
  /** Upsert a control's assessment within an audit Records (upserts) an auditor's assessment state and justification for a control within an IRL audit -- the API equivalent of assessing a control in the web app. Overwrites the assessment for this control in the chosen audit segment. `segmentId` may be any segment on the audit, `PROGRAM` or `SYSTEM` (see `segments` on the audit). It may be omitted only when the audit has exactly one segment. The `assessmentState` must be valid for that segment's framework (the request is rejected otherwise). The acting auditor is identified by `auditorEmail`, which must belong to the audit firm making the request. Returns 404 when the control is not part of the audit or the auditor email does not resolve to a firm user. Returns 422 when `segmentId` is omitted on an audit with more than one segment, when `segmentId` is not a segment on this audit, or when the control is not assigned to that segment for this audit. Applies to both Full and Controlled Audit View audits. Rate limit: 10 requests / minute. */
2003
2186
  export declare const upsertAssessmentForControl: API.OperationMethod<UpsertAssessmentForControlRequest, AuditorControlAssessment, UpsertAssessmentForControlError, VantaOpContext>;