@distilled.cloud/vanta 1.0.0-rc.14 → 1.0.0-rc.16

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 (49) hide show
  1. package/lib/credentials.d.ts +2 -2
  2. package/lib/credentials.d.ts.map +1 -1
  3. package/lib/credentials.js +16 -15
  4. package/lib/credentials.js.map +1 -1
  5. package/lib/errors.d.ts +15 -15
  6. package/lib/errors.d.ts.map +1 -1
  7. package/lib/errors.js +16 -16
  8. package/lib/errors.js.map +1 -1
  9. package/lib/index.d.ts +1 -1
  10. package/lib/index.js +14 -14
  11. package/lib/pagination.d.ts +1 -1
  12. package/lib/pagination.js +6 -6
  13. package/lib/protocol.d.ts.map +1 -1
  14. package/lib/protocol.js +19 -22
  15. package/lib/protocol.js.map +1 -1
  16. package/lib/retry.d.ts +1 -1
  17. package/lib/retry.d.ts.map +1 -1
  18. package/lib/retry.js +25 -24
  19. package/lib/retry.js.map +1 -1
  20. package/lib/services/auditor_api.d.ts +18 -325
  21. package/lib/services/auditor_api.d.ts.map +1 -1
  22. package/lib/services/auditor_api.js +164 -1881
  23. package/lib/services/build_integrations.d.ts +1 -230
  24. package/lib/services/build_integrations.d.ts.map +1 -1
  25. package/lib/services/build_integrations.js +118 -1180
  26. package/lib/services/manage_vanta.d.ts +18 -1088
  27. package/lib/services/manage_vanta.d.ts.map +1 -1
  28. package/lib/services/manage_vanta.js +754 -6922
  29. package/lib/services/webhooks.d.ts +6 -105
  30. package/lib/services/webhooks.d.ts.map +1 -1
  31. package/lib/services/webhooks.js +76 -537
  32. package/lib/traits.d.ts +1 -1
  33. package/lib/traits.js +8 -8
  34. package/package.json +13 -9
  35. package/src/credentials.ts +5 -6
  36. package/src/errors.ts +14 -15
  37. package/src/index.ts +1 -1
  38. package/src/pagination.ts +1 -1
  39. package/src/protocol.ts +6 -9
  40. package/src/retry.ts +6 -4
  41. package/src/services/auditor_api.ts +2040 -2476
  42. package/src/services/build_integrations.ts +937 -1664
  43. package/src/services/manage_vanta.ts +7230 -8522
  44. package/src/services/webhooks.ts +432 -638
  45. package/src/traits.ts +1 -1
  46. package/lib/services/auditor_api.js.map +0 -1
  47. package/lib/services/build_integrations.js.map +0 -1
  48. package/lib/services/manage_vanta.js.map +0 -1
  49. package/lib/services/webhooks.js.map +0 -1
package/lib/traits.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Vanta SDK trait surface — hand-written.
2
+ * Vanta SDK trait surface -- hand-written.
3
3
  *
4
4
  * Re-exports the generic protocol traits from core (so generated operations
5
5
  * import everything from one place). Vanta has no envelope of its own; the
package/lib/traits.js CHANGED
@@ -1,11 +1,11 @@
1
- /**
2
- * Vanta SDK trait surface — hand-written.
3
- *
4
- * Re-exports the generic protocol traits from core (so generated operations
5
- * import everything from one place). Vanta has no envelope of its own; the
6
- * REST-protocol traits (SensitiveValue / RawResponse) come from
7
- * `core/protocol-rest`.
8
- */
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
9
  export { Body, Header, Query, Label, Http, ResponseCode, HttpBody, FormDataFile, KeyDictionary, UnionCases, applyErrorMatchers, getErrorMatchers, bodySymbol, headerSymbol, querySymbol, labelSymbol, httpSymbol, responseCodeSymbol, httpBodySymbol, formDataFileSymbol, keyDictionarySymbol, unionCasesSymbol, errorMatchersSymbol, } from "@distilled.cloud/core/trait";
10
10
  export { SensitiveValue, RawResponse, RawResponseRoot, sensitiveValueSymbol, rawResponseSymbol, rawResponseRootSymbol, } from "@distilled.cloud/core/protocol-rest";
11
11
  //# sourceMappingURL=traits.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distilled.cloud/vanta",
3
- "version": "1.0.0-rc.14",
3
+ "version": "1.0.0-rc.16",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,9 @@
18
18
  "types": "./lib/index.d.ts",
19
19
  "bun": "./src/index.ts",
20
20
  "worker": "./src/index.ts",
21
- "default": "./lib/index.js"
21
+ "module": "./lib/index.full.js",
22
+ "module-sync": "./lib/index.js",
23
+ "default": "./lib/index.full.js"
22
24
  },
23
25
  "./Credentials": {
24
26
  "types": "./lib/credentials.d.ts",
@@ -60,27 +62,29 @@
60
62
  "types": "./lib/services/*.d.ts",
61
63
  "bun": "./src/services/*.ts",
62
64
  "worker": "./src/services/*.ts",
63
- "default": "./lib/services/*.js"
65
+ "module": "./lib/services.full/*.js",
66
+ "module-sync": "./lib/services/*.js",
67
+ "default": "./lib/services.full/*.js"
64
68
  }
65
69
  },
66
70
  "dependencies": {
67
- "@distilled.cloud/core": "1.0.0-rc.14"
71
+ "@distilled.cloud/core": "1.0.0-rc.16"
68
72
  },
69
73
  "devDependencies": {
70
- "@types/node": "26.2.0"
74
+ "@types/node": "26.6.5"
71
75
  },
72
76
  "peerDependencies": {
73
- "effect": "^4.0.0"
77
+ "effect": "^4.0.5"
74
78
  },
75
79
  "distilled": {
76
- "generatedAt": "2026-10-06",
80
+ "generatedAt": "2026-10-09",
77
81
  "specUpdatedAt": "2026-10-06"
78
82
  },
79
83
  "scripts": {
80
- "build": "tsc -b",
84
+ "build": "tsrs -b",
81
85
  "convert": "node --conditions=bun scripts/convert.ts",
82
86
  "generate": "node --conditions=bun scripts/convert.ts && node --conditions=bun scripts/generate.ts",
83
- "typecheck": "tsc -p tsconfig.json",
87
+ "typecheck": "tsrs -p tsconfig.json",
84
88
  "specs:fetch": "git submodule update --force --init --depth=1 specs/spec-mirror-vanta",
85
89
  "specs:update": "git submodule update --remote --force --depth=1 specs/spec-mirror-vanta"
86
90
  }
@@ -1,6 +1,6 @@
1
1
  import { ConfigError } from "@distilled.cloud/core/errors";
2
2
  /**
3
- * Vanta credentials — hand-written.
3
+ * Vanta credentials -- hand-written.
4
4
  *
5
5
  * The `Credentials` service holds an *effect* that resolves the current
6
6
  * credentials on every request (the protocol layer resolves it per request
@@ -24,9 +24,8 @@ export interface Config {
24
24
  readonly apiBaseUrl: string;
25
25
  }
26
26
 
27
- export class Credentials extends Context.Service<Credentials, Effect.Effect<Config>>()(
28
- "VantaCredentials",
29
- ) {}
27
+ export class Credentials
28
+ extends /*@__PURE__*/ Context.Service<Credentials, Effect.Effect<Config>>()("VantaCredentials") {}
30
29
 
31
30
  /** Layer from a redacted access token + optional base URL. */
32
31
  export const fromApiKey = (config: {
@@ -42,9 +41,9 @@ export const fromApiKey = (config: {
42
41
  );
43
42
 
44
43
  /** Reads VANTA_ACCESS_TOKEN (required) and VANTA_API_BASE_URL (optional). */
45
- export const CredentialsFromEnv: Layer.Layer<Credentials> = Layer.succeed(
44
+ export const CredentialsFromEnv: Layer.Layer<Credentials> = /*@__PURE__*/ Layer.succeed(
46
45
  Credentials,
47
- Effect.gen(function* () {
46
+ /*@__PURE__*/ Effect.gen(function* () {
48
47
  const apiKey = process.env.VANTA_ACCESS_TOKEN;
49
48
 
50
49
  if (!apiKey) {
package/src/errors.ts CHANGED
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * Re-exports the common HTTP errors from core and adds the Vanta fallback
5
5
  * errors. Note the generated service modules additionally define their own
6
- * per-status matcher classes (BadRequest/NotFound/…) for the statuses each
7
- * operation declares — those share `_tag`s with the core classes here, so
6
+ * per-status matcher classes (BadRequest/NotFound/...) for the statuses each
7
+ * operation declares -- those share `_tag`s with the core classes here, so
8
8
  * `catchTag` works against either.
9
9
  */
10
10
  export {
@@ -28,20 +28,19 @@ export {
28
28
  export type { DefaultErrors } from "@distilled.cloud/core/errors";
29
29
 
30
30
  import * as Category from "@distilled.cloud/core/category";
31
- import * as Schema from "effect/Schema";
31
+ import * as Schema from "@distilled.cloud/core/schema-lite-typed";
32
32
 
33
- /** Unknown Vanta error — returned when nothing else matches the failure. */
34
- export class UnknownVantaError extends Schema.TaggedError<UnknownVantaError>()(
35
- "UnknownVantaError",
36
- {
37
- code: Schema.optional(Schema.String),
38
- message: Schema.optional(Schema.String),
33
+ /** Unknown Vanta error -- returned when nothing else matches the failure. */
34
+ export class UnknownVantaError
35
+ extends /*@__PURE__*/ Schema.TaggedError<UnknownVantaError>()("UnknownVantaError", {
36
+ code: /*@__PURE__*/ Schema.optional(Schema.String),
37
+ message: /*@__PURE__*/ Schema.optional(Schema.String),
39
38
  body: Schema.Unknown,
40
- },
41
- ).pipe(Category.withServerError) {}
39
+ }).pipe(Category.withServerError) {}
42
40
 
43
41
  /** Schema parse error wrapper. */
44
- export class VantaParseError extends Schema.TaggedError<VantaParseError>()("VantaParseError", {
45
- body: Schema.Unknown,
46
- cause: Schema.Unknown,
47
- }).pipe(Category.withParseError) {}
42
+ export class VantaParseError
43
+ extends /*@__PURE__*/ Schema.TaggedError<VantaParseError>()("VantaParseError", {
44
+ body: Schema.Unknown,
45
+ cause: Schema.Unknown,
46
+ }).pipe(Category.withParseError) {}
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @distilled.cloud/vanta — Vanta SDK for Effect.
2
+ * @distilled.cloud/vanta -- Vanta SDK for Effect.
3
3
  *
4
4
  * `./services` is generated by `scripts/generate.ts` from the Smithy models
5
5
  * in `.generated-specs` (written by `scripts/convert.ts` from the OpenAPI
package/src/pagination.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Vanta pagination — hand-written.
2
+ * Vanta pagination -- hand-written.
3
3
  *
4
4
  * Generated operations that the converter stamps as cursor-paginated pass
5
5
  * core's {@link paginateCursor} strategy to `API.makePaginated`.
package/src/protocol.ts CHANGED
@@ -2,12 +2,12 @@ import type * as API from "@distilled.cloud/core/api";
2
2
  import type { API_ERRORS, ConfigError } from "@distilled.cloud/core/errors";
3
3
  import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest";
4
4
  /**
5
- * VantaProtocol — hand-written.
5
+ * VantaProtocol -- hand-written.
6
6
  *
7
7
  * Vanta speaks bearer-authenticated JSON REST (no response envelope), so the
8
8
  * whole protocol is one `makeRestProtocol` call from `core/protocol-rest`:
9
9
  *
10
- * request: credentials → `Authorization: Bearer <access_token>` + base URL
10
+ * request: credentials -> `Authorization: Bearer <access_token>` + base URL
11
11
  * (default https://api.vanta.com), resolved from the calling
12
12
  * fiber on every request
13
13
  *
@@ -40,18 +40,15 @@ export type VantaOpError =
40
40
  /** Context (requirements) shared by every generated Vanta operation. */
41
41
  export type VantaOpContext = Credentials | HttpClient.HttpClient;
42
42
 
43
- export const VantaProtocol: Layer.Layer<API.Protocol> = makeRestProtocol<Config>({
44
- // The Credentials service holds an effect — resolving it here (per
43
+ export const VantaProtocol: Layer.Layer<API.Protocol> = /*@__PURE__*/ makeRestProtocol<Config>({
44
+ // The Credentials service holds an effect -- resolving it here (per
45
45
  // request, on the calling fiber) picks up context-provided credentials.
46
- credentials: Effect.gen(function* () {
47
- const resolve = yield* Credentials;
48
- return yield* resolve;
49
- }),
46
+ credentials: /*@__PURE__*/ Effect.flatMap(Credentials, (resolve) => resolve),
50
47
  baseUrl: (creds) => creds.apiBaseUrl,
51
48
  headers: (creds) => ({
52
49
  Authorization: `Bearer ${Redacted.value(creds.apiKey)}`,
53
50
  }),
54
- // Vanta's error body is `{ code?: string, message?: string }` — the
51
+ // Vanta's error body is `{ code?: string, message?: string }` -- the
55
52
  // factory's default lenient envelope covers it.
56
53
  unknownError: ({ code, message, body }) =>
57
54
  new UnknownVantaError({
package/src/retry.ts CHANGED
@@ -32,17 +32,19 @@ export {
32
32
  } from "@distilled.cloud/core/retry";
33
33
 
34
34
  /** Context tag for configuring retry behavior of Vanta API calls. */
35
- export class Retry extends Context.Service<Retry, Policy>()("VantaRetry") {}
35
+ export class Retry extends /*@__PURE__*/ Context.Service<Retry, Policy>()("VantaRetry") {}
36
36
 
37
37
  /** Provides a custom retry policy to every Vanta API call below it. */
38
38
  export const policy = (optionsOrFactory: Policy) =>
39
39
  Effect.provide(Layer.succeed(Retry, optionsOrFactory));
40
40
 
41
41
  /** Disables all automatic retries. */
42
- export const none = Effect.provide(Layer.succeed(Retry, { while: () => false }));
42
+ export const none = /*@__PURE__*/ Effect.provide(
43
+ /*@__PURE__*/ Layer.succeed(Retry, { while: () => false }),
44
+ );
43
45
 
44
46
  /** Apply the throttling retry policy (retries throttling errors indefinitely). */
45
- export const throttling = policy(throttlingFactory);
47
+ export const throttling = /*@__PURE__*/ policy(throttlingFactory);
46
48
 
47
49
  /** Apply the transient retry policy (retries all transient errors indefinitely). */
48
- export const transient = policy(transientFactory);
50
+ export const transient = /*@__PURE__*/ policy(transientFactory);