@distilled.cloud/vanta 1.0.0-rc.17 → 1.0.0-rc.19

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 (35) hide show
  1. package/lib/_bundle/sdk.js +1 -1
  2. package/lib/_bundle/sdk.js.map +1 -1
  3. package/lib/credentials.d.ts +2 -1
  4. package/lib/credentials.d.ts.map +1 -1
  5. package/lib/index.d.ts +2 -2
  6. package/lib/protocol.d.ts +3 -2
  7. package/lib/protocol.d.ts.map +1 -1
  8. package/lib/services/auditor_api.d.ts +252 -214
  9. package/lib/services/auditor_api.d.ts.map +1 -1
  10. package/lib/services/auditor_api.js +70 -69
  11. package/lib/services/auditor_api.js.map +1 -1
  12. package/lib/services/build_integrations.d.ts +87 -87
  13. package/lib/services/build_integrations.d.ts.map +1 -1
  14. package/lib/services/build_integrations.js +46 -45
  15. package/lib/services/build_integrations.js.map +1 -1
  16. package/lib/services/manage_vanta.d.ts +1940 -637
  17. package/lib/services/manage_vanta.d.ts.map +1 -1
  18. package/lib/services/manage_vanta.js +401 -330
  19. package/lib/services/manage_vanta.js.map +1 -1
  20. package/lib/services/webhooks.d.ts +2 -2
  21. package/lib/services/webhooks.d.ts.map +1 -1
  22. package/lib/services/webhooks.js +34 -33
  23. package/lib/services/webhooks.js.map +1 -1
  24. package/lib/services.lazy/auditor_api.js +1 -1
  25. package/lib/services.lazy/build_integrations.js +1 -1
  26. package/lib/services.lazy/manage_vanta.js +3 -2
  27. package/lib/services.lazy/webhooks.js +1 -1
  28. package/package.json +7 -6
  29. package/src/credentials.ts +4 -2
  30. package/src/index.ts +2 -2
  31. package/src/protocol.ts +5 -2
  32. package/src/services/auditor_api.ts +379 -214
  33. package/src/services/build_integrations.ts +174 -87
  34. package/src/services/manage_vanta.ts +9092 -4934
  35. package/src/services/webhooks.ts +66 -1
@@ -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 o,errors$GatewayTimeout as ee,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$UnprocessableEntity as u,protocol_rest$RawResponse as d,protocol_rest$RawResponseRoot as f,protocol_rest$SensitiveValue as p,protocol_rest$makeRestProtocol as m,protocol_rest$rawResponseRootSymbol as h,protocol_rest$rawResponseSymbol as g,protocol_rest$sensitiveValueSymbol 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$Unknown as T,schema_lite$at as E,schema_lite$optional as D,schema_lite$suspend as O}from"@distilled.cloud/core/_bundle/rest";import{api$D as k,api$call as A,api$named as j,api$op as M,category$withParseError as N,category$withServerError as P,retry$capped as F,retry$jittered as I,retry$makeDefault as L,retry$throttlingFactory as R,retry$throttlingOptions as z,retry$transientFactory as B,retry$transientOptions as V,trait$Body as H,trait$FormDataFile as ae,trait$Header as U,trait$Http as W,trait$HttpBody as G,trait$KeyDictionary as K,trait$Label as q,trait$Query as J,trait$ResponseCode as oe,trait$UnionCases as se,trait$applyErrorMatchers as ce,trait$bodySymbol as le,trait$errorMatchersSymbol as ue,trait$formDataFileSymbol as de,trait$getErrorMatchers as fe,trait$headerSymbol as pe,trait$httpBodySymbol as me,trait$httpSymbol as he,trait$keyDictionarySymbol as ge,trait$labelSymbol as _e,trait$querySymbol as ve,trait$responseCodeSymbol as ye,trait$unionCasesSymbol as be}from"@distilled.cloud/core/_bundle/base";import*as Y from"effect/Context";import*as X from"effect/Effect";import*as Z from"effect/Layer";import*as Q from"effect/Redacted";import*as $ from"@distilled.cloud/core/schema-lite-typed";const xe=`https://api.vanta.com`;const Se=`https://api.vanta-gov.com`;var Credentials=class extends (/*@__PURE__*/ Y.Service()(`VantaCredentials`)){};const fromApiKey=e=>Z.succeed(Credentials,X.succeed({apiKey:e.apiKey,apiBaseUrl:e.apiBaseUrl??`https://api.vanta.com`}));const Ce=/*@__PURE__*/ Z.succeed(Credentials,/*@__PURE__*/ X.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:Q.make(e),apiBaseUrl:process.env.VANTA_API_BASE_URL??`https://api.vanta.com`}}).pipe(X.orDie));var UnknownVantaError=class extends (/*@__PURE__*/ $.TaggedError()(`UnknownVantaError`,{code:/*@__PURE__*/ $.optional($.String),message:/*@__PURE__*/ $.optional($.String),body:$.Unknown}).pipe(P)){};var VantaParseError=class extends (/*@__PURE__*/ $.TaggedError()(`VantaParseError`,{body:$.Unknown,cause:$.Unknown}).pipe(N)){};const we=/*@__PURE__*/ m({credentials:/*@__PURE__*/ X.flatMap(Credentials,e=>e),baseUrl:e=>e.apiBaseUrl,headers:e=>({Authorization:`Bearer ${Q.value(e.apiKey)}`}),unknownError:({code:e,message:t,body:n})=>new UnknownVantaError({code:typeof e===`string`?e:e!==void 0?String(e):void 0,message:t,body:n}),parseError:({body:e,cause:t})=>new VantaParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ Y.Service()(`VantaRetry`)){};const policy=e=>X.provide(Z.succeed(Retry,e));const Te=/*@__PURE__*/ X.provide(/*@__PURE__*/ Z.succeed(Retry,{while:()=>false}));const Ee=/*@__PURE__*/ policy(R);const De=/*@__PURE__*/ policy(B);export{S as a,T as c,Credentials as credentials$Credentials,Ce as credentials$CredentialsFromEnv,xe as credentials$DEFAULT_API_BASE_URL,Se as credentials$GOV_API_BASE_URL,fromApiKey as credentials$fromApiKey,O as d,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,o as errors$Forbidden,ee 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,u as errors$UnprocessableEntity,VantaParseError as errors$VantaParseError,k as f,M as h,x as i,E as l,j as m,y as n,C as o,A as p,we as protocol$VantaProtocol,b as r,Retry as retry$Retry,F as retry$capped,I as retry$jittered,L as retry$makeDefault,Te as retry$none,policy as retry$policy,Ee as retry$throttling,R as retry$throttlingFactory,z as retry$throttlingOptions,De as retry$transient,B as retry$transientFactory,V as retry$transientOptions,w as s,v as t,H as traits$Body,ae as traits$FormDataFile,U as traits$Header,W as traits$Http,G as traits$HttpBody,K as traits$KeyDictionary,q as traits$Label,J as traits$Query,d as traits$RawResponse,f as traits$RawResponseRoot,oe as traits$ResponseCode,p as traits$SensitiveValue,se as traits$UnionCases,ce as traits$applyErrorMatchers,le as traits$bodySymbol,ue as traits$errorMatchersSymbol,de as traits$formDataFileSymbol,fe as traits$getErrorMatchers,pe as traits$headerSymbol,me as traits$httpBodySymbol,he as traits$httpSymbol,ge as traits$keyDictionarySymbol,_e as traits$labelSymbol,ve as traits$querySymbol,h as traits$rawResponseRootSymbol,g as traits$rawResponseSymbol,ye as traits$responseCodeSymbol,_ as traits$sensitiveValueSymbol,be as traits$unionCasesSymbol,D as u};
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 o,errors$GatewayTimeout as s,errors$HTTP_STATUS_MAP as c,errors$InternalServerError as l,errors$Locked as u,errors$NotFound as ee,errors$ServiceUnavailable as te,errors$TooManyRequests as ne,errors$Unauthorized as re,errors$UnprocessableEntity as ie,protocol_rest$RawResponse as d,protocol_rest$RawResponseRoot as f,protocol_rest$SensitiveValue as p,protocol_rest$makeRestProtocol as m,protocol_rest$rawResponseRootSymbol as h,protocol_rest$rawResponseSymbol as g,protocol_rest$sensitiveValueSymbol 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$Unknown as E,schema_lite$at as D,schema_lite$optional as O,schema_lite$suspend as k}from"@distilled.cloud/core/_bundle/rest";import{api$D as A,api$call as j,api$error as M,api$named as N,api$newError as P,api$op as F,category$withBadRequestError as I,category$withParseError as L,category$withServerError as R,retry$capped as z,retry$jittered as B,retry$makeDefault as V,retry$throttlingFactory as H,retry$throttlingOptions as U,retry$transientFactory as W,retry$transientOptions as G,schema_lite_typed$String as K,schema_lite_typed$TaggedError as q,schema_lite_typed$Unknown as J,schema_lite_typed$optional as Y,trait$Body as ae,trait$FormDataFile as oe,trait$Header as se,trait$Http as ce,trait$HttpBody as le,trait$KeyDictionary as ue,trait$Label as de,trait$Query as fe,trait$ResponseCode as pe,trait$UnionCases as me,trait$applyErrorMatchers as he,trait$bodySymbol as ge,trait$errorMatchersSymbol as _e,trait$formDataFileSymbol as ve,trait$getErrorMatchers as ye,trait$headerSymbol as be,trait$httpBodySymbol as xe,trait$httpSymbol as Se,trait$keyDictionarySymbol as Ce,trait$labelSymbol as we,trait$querySymbol as Te,trait$responseCodeSymbol as Ee,trait$unionCasesSymbol as De}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 Oe=`https://api.vanta.com`;const ke=`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 Ae=/*@__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`,{code:/*@__PURE__*/ Y(K),message:/*@__PURE__*/ Y(K),body:J}).pipe(R)){};var VantaParseError=class extends (/*@__PURE__*/ q()(`VantaParseError`,{body:J,cause:J}).pipe(L)){};const je=/*@__PURE__*/ m({credentials:/*@__PURE__*/ Z.flatMap(Credentials,e=>e),baseUrl:e=>e.apiBaseUrl,headers:e=>({Authorization:`Bearer ${$.value(e.apiKey)}`}),unknownError:({code:e,message:t,body:n})=>new UnknownVantaError({code:typeof e===`string`?e:e!==void 0?String(e):void 0,message:t,body:n}),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 Me=/*@__PURE__*/ Z.provide(/*@__PURE__*/ Q.succeed(Retry,{while:()=>false}));const Ne=/*@__PURE__*/ policy(H);const Pe=/*@__PURE__*/ policy(W);export{v as Mb,y as Nb,b as Ub,x as Vb,S as Wb,C as Yb,w as Zb,A as a,T as ac,j as c,Credentials as credentials$Credentials,Ae as credentials$CredentialsFromEnv,Oe as credentials$DEFAULT_API_BASE_URL,ke as credentials$GOV_API_BASE_URL,fromApiKey as credentials$fromApiKey,E as dc,M 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,o as errors$Forbidden,s as errors$GatewayTimeout,c as errors$HTTP_STATUS_MAP,l as errors$InternalServerError,u as errors$Locked,ee as errors$NotFound,te as errors$ServiceUnavailable,ne as errors$TooManyRequests,re as errors$Unauthorized,UnknownVantaError as errors$UnknownVantaError,ie as errors$UnprocessableEntity,VantaParseError as errors$VantaParseError,D as fc,N as k,O as kc,P as l,k as lc,F as m,je as protocol$VantaProtocol,Retry as retry$Retry,z as retry$capped,B as retry$jittered,V as retry$makeDefault,Me as retry$none,policy as retry$policy,Ne as retry$throttling,H as retry$throttlingFactory,U as retry$throttlingOptions,Pe as retry$transient,W as retry$transientFactory,G as retry$transientOptions,ae as traits$Body,oe as traits$FormDataFile,se as traits$Header,ce as traits$Http,le as traits$HttpBody,ue as traits$KeyDictionary,de as traits$Label,fe as traits$Query,d as traits$RawResponse,f as traits$RawResponseRoot,pe as traits$ResponseCode,p as traits$SensitiveValue,me as traits$UnionCases,he as traits$applyErrorMatchers,ge as traits$bodySymbol,_e as traits$errorMatchersSymbol,ve as traits$formDataFileSymbol,ye as traits$getErrorMatchers,be as traits$headerSymbol,xe as traits$httpBodySymbol,Se as traits$httpSymbol,Ce as traits$keyDictionarySymbol,we as traits$labelSymbol,Te as traits$querySymbol,h as traits$rawResponseRootSymbol,g as traits$rawResponseSymbol,Ee as traits$responseCodeSymbol,_ as traits$sensitiveValueSymbol,De as traits$unionCasesSymbol,I as ya};
2
2
  //# sourceMappingURL=sdk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","names":["Category.withServerError","Category.withParseError","API_ERRORS","BadGateway","BadRequest","ConfigError","Conflict","DEFAULT_ERRORS","Forbidden","GatewayTimeout","HTTP_STATUS_MAP","InternalServerError","Locked","NotFound","ServiceUnavailable","TooManyRequests","Unauthorized","UnprocessableEntity","RawResponse","RawResponseRoot","SensitiveValue","makeRestProtocol","rawResponseRootSymbol","rawResponseSymbol","sensitiveValueSymbol","Array","Boolean","NullOr","Number","Record","String$1","Struct","Unknown","at","optional","suspend","D","call","named","op","withParseError","withServerError","capped","jittered","makeDefault","throttlingFactory","throttlingOptions","transientFactory","transientOptions","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","Schema","DEFAULT_API_BASE_URL","GOV_API_BASE_URL","config","CredentialsFromEnv","apiKey","VantaProtocol","resolve","creds","code","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"8gEAgBA,MAAa6E,GAAuB,wBAGpC,MAAaC,GAAmB,4BAOhC,IAAa,YAAb,eACwB,gBAAQ,QAA4C,CAAC,CAAC,kBAAkB,EAAA,AAAE,CAAC,EAGnG,MAAa,WAAc,GAIzBJ,EAAM,QACJ,YACAD,EAAO,QAAQ,CACb,OAAQM,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,IAAI5E,EAAY,CAC5B,QAAS,qDACX,CAAC,EAGH,MAAO,CACL,OAAQsE,EAAS,KAAKM,CAAM,EAC5B,WAAY,QAAQ,IAAI,oBAAA,uBAC1B,CACF,CAAC,CAAC,CAAC,KAAKR,EAAO,KAAK,CACtB,EC1BA,IAAa,kBAAb,eACwB,gBAAO,YAA+B,CAAC,CAAC,oBAAqB,CACjF,KAAoB,gBAAO,SAASG,EAAO,MAAM,EACjD,QAAuB,gBAAO,SAASA,EAAO,MAAM,EACpD,KAAMA,EAAO,OACf,CAAC,CAAC,CAAC,KAAK5E,CAAwB,EAAA,AAAE,CAAC,EAGrC,IAAa,gBAAb,eACwB,gBAAO,YAA6B,CAAC,CAAC,kBAAmB,CAC7E,KAAM4E,EAAO,QACb,MAAOA,EAAO,OAChB,CAAC,CAAC,CAAC,KAAK3E,CAAuB,EAAA,AAAE,CAAC,ECHpC,MAAaiF,GAAyD,gBAAyB,CAG7F,YAA2B,gBAAO,QAAQ,YAAc,GAAYC,CAAO,EAC3E,QAAU,GAAUC,EAAM,WAC1B,QAAU,IAAW,CACnB,cAAe,UAAUT,EAAS,MAAMS,EAAM,MAAM,GACtD,GAGA,cAAe,CAAE,OAAM,UAAS,UAC9B,IAAI,kBAAkB,CACpB,KAAM,OAAOC,IAAS,SAAWA,EAAOA,IAAS,IAAA,GAAY,OAAOA,CAAI,EAAI,IAAA,GAC5E,UACA,MACF,CAAC,EACH,YAAa,CAAE,OAAM,WAAY,IAAI,gBAAgB,CAAE,OAAM,OAAM,CAAC,CACtE,CAAC,ECzBD,IAAa,MAAb,eAAyC,gBAAQ,QAAuB,CAAC,CAAC,YAAY,EAAA,AAAE,CAAC,EAGzF,MAAa,OAAU,GACrBZ,EAAO,QAAQC,EAAM,QAAQ,MAAOY,CAAgB,CAAC,EAGvD,MAAaC,GAAqB,gBAAO,QACzB,gBAAM,QAAQ,MAAO,CAAE,UAAa,KAAM,CAAC,CAC3D,EAGA,MAAaC,GAA2B,qBAAO3C,CAAiB,EAGhE,MAAa4C,GAA0B,qBAAO1C,CAAgB"}
1
+ {"version":3,"file":"sdk.js","names":["Schema.String","Schema.Unknown","Category.withServerError","Category.withParseError","API_ERRORS","BadGateway","BadRequest","ConfigError","Conflict","DEFAULT_ERRORS","Forbidden","GatewayTimeout","HTTP_STATUS_MAP","InternalServerError","Locked","NotFound","ServiceUnavailable","TooManyRequests","Unauthorized","UnprocessableEntity","RawResponse","RawResponseRoot","SensitiveValue","makeRestProtocol","rawResponseRootSymbol","rawResponseSymbol","sensitiveValueSymbol","Array","Boolean","NullOr","Number","Record","String$1","Struct","TaggedError","Unknown","at","optional","suspend","D","call","error","named","newError","op","withBadRequestError","withParseError","withServerError","capped","jittered","makeDefault","throttlingFactory","throttlingOptions","transientFactory","transientOptions","String$2","TaggedError$1","Unknown$1","optional$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","code","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"2rEAgBA,MAAasF,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,IAAInF,EAAY,CAC5B,QAAS,qDACX,CAAC,EAGH,MAAO,CACL,OAAQ8E,EAAS,KAAKK,CAAM,EAC5B,WAAY,QAAQ,IAAI,oBAAA,uBAC1B,CACF,CAAC,CACH,EC5BA,IAAa,kBAAb,eACwB,gBAAsC,CAAC,CAAC,oBAAqB,CACjF,KAAoB,gBAAgB1F,CAAa,EACjD,QAAuB,gBAAgBA,CAAa,EACpD,KAAMC,CACR,CAAC,CAAC,CAAC,KAAKC,CAAwB,EAAA,AAAE,CAAC,EAGrC,IAAa,gBAAb,eACwB,gBAAoC,CAAC,CAAC,kBAAmB,CAC7E,KAAMD,EACN,MAAOA,CACT,CAAC,CAAC,CAAC,KAAKE,CAAuB,EAAA,AAAE,CAAC,ECApC,MAAawF,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,cAAe,CAAE,OAAM,UAAS,UAC9B,IAAI,kBAAkB,CACpB,KAAM,OAAOC,IAAS,SAAWA,EAAOA,IAAS,IAAA,GAAY,OAAOA,CAAI,EAAI,IAAA,GAC5E,UACA,MACF,CAAC,EACH,YAAa,CAAE,OAAM,WAAY,IAAI,gBAAgB,CAAE,OAAM,OAAM,CAAC,CACtE,CAAC,EC5BD,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,qBAAO9C,CAAiB,EAGhE,MAAa+C,GAA0B,qBAAO7C,CAAgB"}
@@ -1,3 +1,4 @@
1
+ import { ConfigError } from "@distilled.cloud/core/errors";
1
2
  /**
2
3
  * Vanta credentials -- hand-written.
3
4
  *
@@ -19,7 +20,7 @@ export interface Config {
19
20
  readonly apiKey: Redacted.Redacted<string>;
20
21
  readonly apiBaseUrl: string;
21
22
  }
22
- declare const Credentials_base: Context.ServiceClass<Credentials, "VantaCredentials", Effect.Effect<Config, never, never>>;
23
+ declare const Credentials_base: Context.ServiceClass<Credentials, "VantaCredentials", Effect.Effect<Config, ConfigError, never>>;
23
24
  export declare class Credentials extends /*@__PURE__*/ Credentials_base {
24
25
  }
25
26
  /** Layer from a redacted access token + optional base URL. */
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AACA;;;;;;;;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,eAA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,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"}
package/lib/index.d.ts CHANGED
@@ -2,8 +2,8 @@
2
2
  * @distilled.cloud/vanta -- Vanta SDK for Effect.
3
3
  *
4
4
  * `./services` is generated by `scripts/generate.ts` from the Smithy models
5
- * in `.generated-specs` (written by `scripts/convert.ts` from the OpenAPI
6
- * specs). Everything else in this folder is hand-written.
5
+ * that `scripts/convert.ts` converts from the OpenAPI specs. Everything else in
6
+ * this folder is hand-written.
7
7
  *
8
8
  * @example
9
9
  * ```ts
package/lib/protocol.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type * as API from "@distilled.cloud/core/api";
2
- import type { API_ERRORS, ConfigError } from "@distilled.cloud/core/errors";
2
+ import type { API_ERRORS, ConfigError, InvalidInput } from "@distilled.cloud/core/errors";
3
+ import type { SdkError } from "@distilled.cloud/core/sdk-error";
3
4
  import type * as HttpClient from "effect/http/HttpClient";
4
5
  import type * as HttpClientError from "effect/http/HttpClientError";
5
6
  import type * as Layer from "effect/Layer";
@@ -11,7 +12,7 @@ import { UnknownVantaError, VantaParseError } from "./errors.ts";
11
12
  * VantaOpContext>` explicitly so the compiler never infers these back out of
12
13
  * the schema generics.
13
14
  */
14
- export type VantaOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownVantaError | ConfigError | HttpClientError.HttpClientError | VantaParseError;
15
+ export type VantaOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownVantaError | ConfigError | HttpClientError.HttpClientError | VantaParseError | InvalidInput | SdkError;
15
16
  /** Context (requirements) shared by every generated Vanta operation. */
16
17
  export type VantaOpContext = Credentials | HttpClient.HttpClient;
17
18
  export declare const VantaProtocol: Layer.Layer<API.Protocol>;
@@ -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,MAAM,8BAA8B,CAAC;AAkB5E,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,CAAC;AAEpB,wEAAwE;AACxE,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAEjE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAiBlD,CAAC"}
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,K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