@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.
- package/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/credentials.d.ts +2 -1
- package/lib/credentials.d.ts.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/protocol.d.ts +3 -2
- package/lib/protocol.d.ts.map +1 -1
- package/lib/services/auditor_api.d.ts +252 -214
- package/lib/services/auditor_api.d.ts.map +1 -1
- package/lib/services/auditor_api.js +70 -69
- package/lib/services/auditor_api.js.map +1 -1
- package/lib/services/build_integrations.d.ts +87 -87
- package/lib/services/build_integrations.d.ts.map +1 -1
- package/lib/services/build_integrations.js +46 -45
- package/lib/services/build_integrations.js.map +1 -1
- package/lib/services/manage_vanta.d.ts +1940 -637
- package/lib/services/manage_vanta.d.ts.map +1 -1
- package/lib/services/manage_vanta.js +401 -330
- package/lib/services/manage_vanta.js.map +1 -1
- package/lib/services/webhooks.d.ts +2 -2
- package/lib/services/webhooks.d.ts.map +1 -1
- package/lib/services/webhooks.js +34 -33
- package/lib/services/webhooks.js.map +1 -1
- package/lib/services.lazy/auditor_api.js +1 -1
- package/lib/services.lazy/build_integrations.js +1 -1
- package/lib/services.lazy/manage_vanta.js +3 -2
- package/lib/services.lazy/webhooks.js +1 -1
- package/package.json +7 -6
- package/src/credentials.ts +4 -2
- package/src/index.ts +2 -2
- package/src/protocol.ts +5 -2
- package/src/services/auditor_api.ts +379 -214
- package/src/services/build_integrations.ts +174 -87
- package/src/services/manage_vanta.ts +9092 -4934
- package/src/services/webhooks.ts +66 -1
package/lib/_bundle/sdk.js
CHANGED
|
@@ -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
|
|
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
|
package/lib/_bundle/sdk.js.map
CHANGED
|
@@ -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","
|
|
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"}
|
package/lib/credentials.d.ts
CHANGED
|
@@ -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,
|
|
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. */
|
package/lib/credentials.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"
|
|
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"}
|
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
|
-
*
|
|
6
|
-
*
|
|
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>;
|
package/lib/protocol.d.ts.map
CHANGED
|
@@ -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;
|
|
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,CAiBlD,CAAC"}
|