@veltrosecurity/sdk 0.35.3 → 0.37.4
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/README.md +9 -7
- package/dist/index.cjs +23 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -5
- package/dist/index.d.ts +15 -5
- package/dist/index.js +22 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -625,6 +625,8 @@ declare class ChadHealth extends Resource {
|
|
|
625
625
|
getSecretsBackend<T = unknown>(options?: RequestOptions): Promise<T>;
|
|
626
626
|
/** GET /api/health/indices — List Index Health. */
|
|
627
627
|
listIndex<T = unknown>(options?: RequestOptions): Promise<T>;
|
|
628
|
+
/** GET /api/health/ready — Strict dependency readiness. */
|
|
629
|
+
readiness<T = unknown>(options?: RequestOptions): Promise<T>;
|
|
628
630
|
/** POST /api/health/test/{service_type} — Test Service Health. */
|
|
629
631
|
testService<T = unknown>(serviceType: string, options?: RequestOptions): Promise<T>;
|
|
630
632
|
/** PUT /api/health/intervals — Update Health Intervals. */
|
|
@@ -1507,8 +1509,8 @@ declare class WardenDiagnostics extends Resource {
|
|
|
1507
1509
|
}
|
|
1508
1510
|
/** `warden` resource `events`. */
|
|
1509
1511
|
declare class WardenEvents extends Resource {
|
|
1510
|
-
/** POST /api/events/
|
|
1511
|
-
|
|
1512
|
+
/** POST /api/events/sigmatic — Accept one Sigmatic alert-delivery envelope. */
|
|
1513
|
+
sigmatic<T = unknown>(options?: RequestOptions): Promise<T>;
|
|
1512
1514
|
}
|
|
1513
1515
|
/** `warden` resource `intake_rules`. */
|
|
1514
1516
|
declare class WardenIntakeRules extends Resource {
|
|
@@ -1849,7 +1851,7 @@ declare class WardenResources {
|
|
|
1849
1851
|
* accept.
|
|
1850
1852
|
*/
|
|
1851
1853
|
|
|
1852
|
-
declare const SUITE_PREFIXES: Record<"chad" | "warden" | "vectorflow", string>;
|
|
1854
|
+
declare const SUITE_PREFIXES: Record<"chad" | "sigmatic" | "warden" | "vectorflow", string>;
|
|
1853
1855
|
interface ProductClientOptions {
|
|
1854
1856
|
auth?: Auth;
|
|
1855
1857
|
timeoutMs?: number;
|
|
@@ -1866,6 +1868,12 @@ declare class ChadClient extends ChadResources {
|
|
|
1866
1868
|
readonly baseUrl: string;
|
|
1867
1869
|
constructor(baseUrl: string, options?: ProductClientOptions);
|
|
1868
1870
|
}
|
|
1871
|
+
/**
|
|
1872
|
+
* Sigmatic, CHAD's new name: the same API at the `/sigmatic` prefix. A suite
|
|
1873
|
+
* runs CHAD or Sigmatic, so use the client for the one it runs.
|
|
1874
|
+
*/
|
|
1875
|
+
declare class SigmaticClient extends ChadClient {
|
|
1876
|
+
}
|
|
1869
1877
|
/** Warden: cases, runbooks, runs, approvals, connections. */
|
|
1870
1878
|
declare class WardenClient extends WardenResources {
|
|
1871
1879
|
readonly baseUrl: string;
|
|
@@ -1879,6 +1887,7 @@ declare class VectorFlowClient extends VectorflowResources {
|
|
|
1879
1887
|
interface VeltroClientOptions {
|
|
1880
1888
|
session?: SuiteSession;
|
|
1881
1889
|
chadAuth?: Auth;
|
|
1890
|
+
sigmaticAuth?: Auth;
|
|
1882
1891
|
wardenAuth?: Auth;
|
|
1883
1892
|
vectorflowKey?: string;
|
|
1884
1893
|
vectorflowAuth?: Auth;
|
|
@@ -1894,6 +1903,7 @@ declare class VeltroClient {
|
|
|
1894
1903
|
readonly baseUrl: string;
|
|
1895
1904
|
readonly session?: SuiteSession;
|
|
1896
1905
|
readonly chad: ChadResources;
|
|
1906
|
+
readonly sigmatic: ChadResources;
|
|
1897
1907
|
readonly warden: WardenResources;
|
|
1898
1908
|
readonly vectorflow: VectorflowResources;
|
|
1899
1909
|
constructor(baseUrl: string, options?: VeltroClientOptions);
|
|
@@ -1912,6 +1922,6 @@ declare class VeltroClient {
|
|
|
1912
1922
|
* No runtime dependencies: the transport is `fetch`.
|
|
1913
1923
|
*/
|
|
1914
1924
|
|
|
1915
|
-
declare const VERSION = "0.
|
|
1925
|
+
declare const VERSION = "0.37.4";
|
|
1916
1926
|
|
|
1917
|
-
export { type Auth, BearerToken, ChadClient, ChadResources, DEFAULT_MAX_RESPONSE_BYTES, DEFAULT_RETRIES, DEFAULT_TIMEOUT_MS, MissingCredentialError, NoAuth, type ProductClientOptions, type QueryValue, type RequestOptions, Resource, SESSION_COOKIE_PREFIX, SUITE_PREFIXES, SuiteSession, type SuiteSessionOptions, Transport, type TransportOptions, VERSION, VectorFlowClient, VectorflowResources, VeltroApiError, VeltroClient, type VeltroClientOptions, VeltroError, type VeltroLoginOptions, VeltroResponseTooLargeError, VeltroTransportError, WardenClient, WardenResources, quoteSegment };
|
|
1927
|
+
export { type Auth, BearerToken, ChadClient, ChadResources, DEFAULT_MAX_RESPONSE_BYTES, DEFAULT_RETRIES, DEFAULT_TIMEOUT_MS, MissingCredentialError, NoAuth, type ProductClientOptions, type QueryValue, type RequestOptions, Resource, SESSION_COOKIE_PREFIX, SUITE_PREFIXES, SigmaticClient, SuiteSession, type SuiteSessionOptions, Transport, type TransportOptions, VERSION, VectorFlowClient, VectorflowResources, VeltroApiError, VeltroClient, type VeltroClientOptions, VeltroError, type VeltroLoginOptions, VeltroResponseTooLargeError, VeltroTransportError, WardenClient, WardenResources, quoteSegment };
|
package/dist/index.d.ts
CHANGED
|
@@ -625,6 +625,8 @@ declare class ChadHealth extends Resource {
|
|
|
625
625
|
getSecretsBackend<T = unknown>(options?: RequestOptions): Promise<T>;
|
|
626
626
|
/** GET /api/health/indices — List Index Health. */
|
|
627
627
|
listIndex<T = unknown>(options?: RequestOptions): Promise<T>;
|
|
628
|
+
/** GET /api/health/ready — Strict dependency readiness. */
|
|
629
|
+
readiness<T = unknown>(options?: RequestOptions): Promise<T>;
|
|
628
630
|
/** POST /api/health/test/{service_type} — Test Service Health. */
|
|
629
631
|
testService<T = unknown>(serviceType: string, options?: RequestOptions): Promise<T>;
|
|
630
632
|
/** PUT /api/health/intervals — Update Health Intervals. */
|
|
@@ -1507,8 +1509,8 @@ declare class WardenDiagnostics extends Resource {
|
|
|
1507
1509
|
}
|
|
1508
1510
|
/** `warden` resource `events`. */
|
|
1509
1511
|
declare class WardenEvents extends Resource {
|
|
1510
|
-
/** POST /api/events/
|
|
1511
|
-
|
|
1512
|
+
/** POST /api/events/sigmatic — Accept one Sigmatic alert-delivery envelope. */
|
|
1513
|
+
sigmatic<T = unknown>(options?: RequestOptions): Promise<T>;
|
|
1512
1514
|
}
|
|
1513
1515
|
/** `warden` resource `intake_rules`. */
|
|
1514
1516
|
declare class WardenIntakeRules extends Resource {
|
|
@@ -1849,7 +1851,7 @@ declare class WardenResources {
|
|
|
1849
1851
|
* accept.
|
|
1850
1852
|
*/
|
|
1851
1853
|
|
|
1852
|
-
declare const SUITE_PREFIXES: Record<"chad" | "warden" | "vectorflow", string>;
|
|
1854
|
+
declare const SUITE_PREFIXES: Record<"chad" | "sigmatic" | "warden" | "vectorflow", string>;
|
|
1853
1855
|
interface ProductClientOptions {
|
|
1854
1856
|
auth?: Auth;
|
|
1855
1857
|
timeoutMs?: number;
|
|
@@ -1866,6 +1868,12 @@ declare class ChadClient extends ChadResources {
|
|
|
1866
1868
|
readonly baseUrl: string;
|
|
1867
1869
|
constructor(baseUrl: string, options?: ProductClientOptions);
|
|
1868
1870
|
}
|
|
1871
|
+
/**
|
|
1872
|
+
* Sigmatic, CHAD's new name: the same API at the `/sigmatic` prefix. A suite
|
|
1873
|
+
* runs CHAD or Sigmatic, so use the client for the one it runs.
|
|
1874
|
+
*/
|
|
1875
|
+
declare class SigmaticClient extends ChadClient {
|
|
1876
|
+
}
|
|
1869
1877
|
/** Warden: cases, runbooks, runs, approvals, connections. */
|
|
1870
1878
|
declare class WardenClient extends WardenResources {
|
|
1871
1879
|
readonly baseUrl: string;
|
|
@@ -1879,6 +1887,7 @@ declare class VectorFlowClient extends VectorflowResources {
|
|
|
1879
1887
|
interface VeltroClientOptions {
|
|
1880
1888
|
session?: SuiteSession;
|
|
1881
1889
|
chadAuth?: Auth;
|
|
1890
|
+
sigmaticAuth?: Auth;
|
|
1882
1891
|
wardenAuth?: Auth;
|
|
1883
1892
|
vectorflowKey?: string;
|
|
1884
1893
|
vectorflowAuth?: Auth;
|
|
@@ -1894,6 +1903,7 @@ declare class VeltroClient {
|
|
|
1894
1903
|
readonly baseUrl: string;
|
|
1895
1904
|
readonly session?: SuiteSession;
|
|
1896
1905
|
readonly chad: ChadResources;
|
|
1906
|
+
readonly sigmatic: ChadResources;
|
|
1897
1907
|
readonly warden: WardenResources;
|
|
1898
1908
|
readonly vectorflow: VectorflowResources;
|
|
1899
1909
|
constructor(baseUrl: string, options?: VeltroClientOptions);
|
|
@@ -1912,6 +1922,6 @@ declare class VeltroClient {
|
|
|
1912
1922
|
* No runtime dependencies: the transport is `fetch`.
|
|
1913
1923
|
*/
|
|
1914
1924
|
|
|
1915
|
-
declare const VERSION = "0.
|
|
1925
|
+
declare const VERSION = "0.37.4";
|
|
1916
1926
|
|
|
1917
|
-
export { type Auth, BearerToken, ChadClient, ChadResources, DEFAULT_MAX_RESPONSE_BYTES, DEFAULT_RETRIES, DEFAULT_TIMEOUT_MS, MissingCredentialError, NoAuth, type ProductClientOptions, type QueryValue, type RequestOptions, Resource, SESSION_COOKIE_PREFIX, SUITE_PREFIXES, SuiteSession, type SuiteSessionOptions, Transport, type TransportOptions, VERSION, VectorFlowClient, VectorflowResources, VeltroApiError, VeltroClient, type VeltroClientOptions, VeltroError, type VeltroLoginOptions, VeltroResponseTooLargeError, VeltroTransportError, WardenClient, WardenResources, quoteSegment };
|
|
1927
|
+
export { type Auth, BearerToken, ChadClient, ChadResources, DEFAULT_MAX_RESPONSE_BYTES, DEFAULT_RETRIES, DEFAULT_TIMEOUT_MS, MissingCredentialError, NoAuth, type ProductClientOptions, type QueryValue, type RequestOptions, Resource, SESSION_COOKIE_PREFIX, SUITE_PREFIXES, SigmaticClient, SuiteSession, type SuiteSessionOptions, Transport, type TransportOptions, VERSION, VectorFlowClient, VectorflowResources, VeltroApiError, VeltroClient, type VeltroClientOptions, VeltroError, type VeltroLoginOptions, VeltroResponseTooLargeError, VeltroTransportError, WardenClient, WardenResources, quoteSegment };
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var DEFAULT_MAX_RESPONSE_BYTES = 32 * 1024 * 1024;
|
|
|
4
4
|
var DEFAULT_RETRIES = 2;
|
|
5
5
|
var RETRY_STATUSES = /* @__PURE__ */ new Set([429, 502, 503, 504]);
|
|
6
6
|
var RETRY_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS", "PUT", "DELETE"]);
|
|
7
|
-
var USER_AGENT = "veltro-sdk/0.
|
|
7
|
+
var USER_AGENT = "veltro-sdk/0.37.4 (+https://github.com/veltrosecurity/veltro)";
|
|
8
8
|
var VeltroError = class extends Error {
|
|
9
9
|
constructor(message) {
|
|
10
10
|
super(message);
|
|
@@ -1291,6 +1291,10 @@ var ChadHealth = class extends Resource {
|
|
|
1291
1291
|
listIndex(options = {}) {
|
|
1292
1292
|
return this.request("GET", "/api/health/indices", options);
|
|
1293
1293
|
}
|
|
1294
|
+
/** GET /api/health/ready — Strict dependency readiness. */
|
|
1295
|
+
readiness(options = {}) {
|
|
1296
|
+
return this.request("GET", "/api/health/ready", options);
|
|
1297
|
+
}
|
|
1294
1298
|
/** POST /api/health/test/{service_type} — Test Service Health. */
|
|
1295
1299
|
testService(serviceType, options = {}) {
|
|
1296
1300
|
return this.request("POST", `/api/health/test/${quoteSegment(serviceType)}`, options);
|
|
@@ -2823,9 +2827,9 @@ var WardenDiagnostics = class extends Resource {
|
|
|
2823
2827
|
}
|
|
2824
2828
|
};
|
|
2825
2829
|
var WardenEvents = class extends Resource {
|
|
2826
|
-
/** POST /api/events/
|
|
2827
|
-
|
|
2828
|
-
return this.request("POST", "/api/events/
|
|
2830
|
+
/** POST /api/events/sigmatic — Accept one Sigmatic alert-delivery envelope. */
|
|
2831
|
+
sigmatic(options = {}) {
|
|
2832
|
+
return this.request("POST", "/api/events/sigmatic", options);
|
|
2829
2833
|
}
|
|
2830
2834
|
};
|
|
2831
2835
|
var WardenIntakeRules = class extends Resource {
|
|
@@ -3370,6 +3374,7 @@ var WardenResources = class {
|
|
|
3370
3374
|
// src/client.ts
|
|
3371
3375
|
var SUITE_PREFIXES = {
|
|
3372
3376
|
chad: "/chad",
|
|
3377
|
+
sigmatic: "/sigmatic",
|
|
3373
3378
|
warden: "/warden",
|
|
3374
3379
|
vectorflow: "/vectorflow"
|
|
3375
3380
|
};
|
|
@@ -3393,6 +3398,8 @@ var ChadClient = class extends ChadResources {
|
|
|
3393
3398
|
this.baseUrl = transport.baseUrl;
|
|
3394
3399
|
}
|
|
3395
3400
|
};
|
|
3401
|
+
var SigmaticClient = class extends ChadClient {
|
|
3402
|
+
};
|
|
3396
3403
|
var WardenClient = class extends WardenResources {
|
|
3397
3404
|
baseUrl;
|
|
3398
3405
|
constructor(baseUrl, options = {}) {
|
|
@@ -3438,6 +3445,7 @@ var VeltroClient = class _VeltroClient {
|
|
|
3438
3445
|
baseUrl;
|
|
3439
3446
|
session;
|
|
3440
3447
|
chad;
|
|
3448
|
+
sigmatic;
|
|
3441
3449
|
warden;
|
|
3442
3450
|
vectorflow;
|
|
3443
3451
|
constructor(baseUrl, options = {}) {
|
|
@@ -3445,6 +3453,7 @@ var VeltroClient = class _VeltroClient {
|
|
|
3445
3453
|
this.baseUrl = baseUrl.replace(/\/+$/, "");
|
|
3446
3454
|
this.session = options.session;
|
|
3447
3455
|
const chadAuth = options.chadAuth ?? options.session;
|
|
3456
|
+
const sigmaticAuth = options.sigmaticAuth ?? options.session;
|
|
3448
3457
|
const wardenAuth = options.wardenAuth ?? options.session;
|
|
3449
3458
|
const vectorflowAuth = options.vectorflowAuth ?? (options.vectorflowKey ? new BearerToken(options.vectorflowKey) : void 0);
|
|
3450
3459
|
const shared = {
|
|
@@ -3459,6 +3468,13 @@ var VeltroClient = class _VeltroClient {
|
|
|
3459
3468
|
"chad",
|
|
3460
3469
|
"no credential: pass a suite session (VeltroClient.login) or chadAuth: new BearerToken(<personal access token>)"
|
|
3461
3470
|
);
|
|
3471
|
+
this.sigmatic = sigmaticAuth ? new SigmaticClient(`${this.baseUrl}${SUITE_PREFIXES.sigmatic}`, {
|
|
3472
|
+
auth: sigmaticAuth,
|
|
3473
|
+
...shared
|
|
3474
|
+
}) : unavailable(
|
|
3475
|
+
"sigmatic",
|
|
3476
|
+
"no credential: pass a suite session (VeltroClient.login) or sigmaticAuth: new BearerToken(<personal access token>)"
|
|
3477
|
+
);
|
|
3462
3478
|
this.warden = wardenAuth ? new WardenClient(`${this.baseUrl}${SUITE_PREFIXES.warden}`, {
|
|
3463
3479
|
auth: wardenAuth,
|
|
3464
3480
|
...shared
|
|
@@ -3486,7 +3502,7 @@ var VeltroClient = class _VeltroClient {
|
|
|
3486
3502
|
};
|
|
3487
3503
|
|
|
3488
3504
|
// src/index.ts
|
|
3489
|
-
var VERSION = "0.
|
|
3505
|
+
var VERSION = "0.37.4";
|
|
3490
3506
|
export {
|
|
3491
3507
|
BearerToken,
|
|
3492
3508
|
ChadClient,
|
|
@@ -3499,6 +3515,7 @@ export {
|
|
|
3499
3515
|
Resource,
|
|
3500
3516
|
SESSION_COOKIE_PREFIX,
|
|
3501
3517
|
SUITE_PREFIXES,
|
|
3518
|
+
SigmaticClient,
|
|
3502
3519
|
SuiteSession,
|
|
3503
3520
|
Transport,
|
|
3504
3521
|
VERSION,
|