@distilled.cloud/axiom 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.
- package/lib/credentials.d.ts +4 -4
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +28 -26
- package/lib/credentials.js.map +1 -1
- package/lib/edge-ingest.d.ts +1 -1
- package/lib/edge-ingest.js +5 -5
- package/lib/edge-query.d.ts +1 -1
- package/lib/edge-query.js +5 -5
- package/lib/errors.d.ts +15 -15
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +16 -16
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +21 -21
- package/lib/index.js.map +1 -1
- package/lib/protocol.d.ts +1 -1
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +40 -43
- package/lib/protocol.js.map +1 -1
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +25 -24
- package/lib/retry.js.map +1 -1
- package/lib/services/edge_ingest.d.ts +7 -11
- package/lib/services/edge_ingest.d.ts.map +1 -1
- package/lib/services/edge_ingest.js +28 -47
- package/lib/services/edge_query.d.ts +0 -9
- package/lib/services/edge_query.d.ts.map +1 -1
- package/lib/services/edge_query.js +19 -71
- package/lib/services/v2.d.ts +18 -475
- package/lib/services/v2.d.ts.map +1 -1
- package/lib/services/v2.js +240 -2224
- package/lib/traits.d.ts +1 -1
- package/lib/traits.js +8 -8
- package/package.json +19 -11
- package/src/credentials.ts +17 -16
- package/src/edge-ingest.ts +1 -1
- package/src/edge-query.ts +1 -1
- package/src/errors.ts +14 -15
- package/src/index.ts +2 -2
- package/src/protocol.ts +10 -13
- package/src/retry.ts +6 -4
- package/src/services/edge_ingest.ts +46 -35
- package/src/services/edge_query.ts +90 -88
- package/src/services/v2.ts +1847 -2856
- package/src/traits.ts +1 -1
- package/lib/services/edge_ingest.js.map +0 -1
- package/lib/services/edge_query.js.map +0 -1
- package/lib/services/v2.js.map +0 -1
package/lib/credentials.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface Config {
|
|
|
15
15
|
readonly orgId?: string;
|
|
16
16
|
}
|
|
17
17
|
declare const Credentials_base: Context.ServiceClass<Credentials, "AxiomCredentials", Effect.Effect<Config, never, never>>;
|
|
18
|
-
export declare class Credentials extends Credentials_base {
|
|
18
|
+
export declare class Credentials extends /*@__PURE__*/ Credentials_base {
|
|
19
19
|
}
|
|
20
20
|
/** Layer from a redacted API token + optional base URL / org ID. */
|
|
21
21
|
export declare const fromApiKey: (config: {
|
|
@@ -26,10 +26,10 @@ export declare const fromApiKey: (config: {
|
|
|
26
26
|
/**
|
|
27
27
|
* Build {@link Credentials} from environment variables.
|
|
28
28
|
*
|
|
29
|
-
* - `AXIOM_TOKEN` or `AXIOM_API_KEY` (required)
|
|
30
|
-
* - `AXIOM_URL` (optional)
|
|
29
|
+
* - `AXIOM_TOKEN` or `AXIOM_API_KEY` (required) -- Axiom API token or PAT.
|
|
30
|
+
* - `AXIOM_URL` (optional) -- override the API base URL (for self-hosted or
|
|
31
31
|
* regional edge deployments). Defaults to `https://api.axiom.co`.
|
|
32
|
-
* - `AXIOM_ORG_ID` (optional)
|
|
32
|
+
* - `AXIOM_ORG_ID` (optional) -- organization ID, required for PATs.
|
|
33
33
|
*/
|
|
34
34
|
export declare const CredentialsFromEnv: Layer.Layer<Credentials>;
|
|
35
35
|
export {};
|
package/lib/credentials.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,sFAAsF;AACtF,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ials.js
CHANGED
|
@@ -1,43 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
import * as EffectConfig from "@distilled.cloud/core/config";
|
|
1
10
|
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
2
|
-
/**
|
|
3
|
-
* Axiom credentials — hand-written.
|
|
4
|
-
*
|
|
5
|
-
* API-compatible port of the distilled v0 axiom credentials module: the
|
|
6
|
-
* `Credentials` service holds an *effect* that resolves the current
|
|
7
|
-
* credentials on every request (the protocol layer resolves it per request
|
|
8
|
-
* on the calling fiber).
|
|
9
|
-
*/
|
|
10
|
-
import * as EffectConfig from "effect/Config";
|
|
11
11
|
import * as Context from "effect/Context";
|
|
12
12
|
import * as Effect from "effect/Effect";
|
|
13
13
|
import * as Layer from "effect/Layer";
|
|
14
14
|
import * as Option from "effect/Option";
|
|
15
15
|
import * as Redacted from "effect/Redacted";
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
export const DEFAULT_API_BASE_URL = "https://api.axiom.co";
|
|
18
|
-
export class Credentials extends Context.Service()("AxiomCredentials") {
|
|
18
|
+
export class Credentials extends /*@__PURE__*/ /*@__PURE__*/ Context.Service()("AxiomCredentials") {
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
export const fromApiKey = (config) => Layer.succeed(Credentials, Effect.succeed({
|
|
22
22
|
apiKey: config.apiKey,
|
|
23
23
|
apiBaseUrl: config.apiBaseUrl ?? DEFAULT_API_BASE_URL,
|
|
24
24
|
orgId: config.orgId,
|
|
25
25
|
}));
|
|
26
|
-
const envConfig = EffectConfig.all({
|
|
27
|
-
apiToken: EffectConfig.option(EffectConfig.String("AXIOM_TOKEN")),
|
|
28
|
-
apiKey: EffectConfig.option(EffectConfig.String("AXIOM_API_KEY")),
|
|
29
|
-
apiBaseUrl: EffectConfig.String("AXIOM_URL").pipe(
|
|
30
|
-
|
|
26
|
+
const envConfig = /*@__PURE__*/ EffectConfig.all({
|
|
27
|
+
apiToken: /*@__PURE__*/ EffectConfig.option(/*@__PURE__*/ EffectConfig.String("AXIOM_TOKEN")),
|
|
28
|
+
apiKey: /*@__PURE__*/ EffectConfig.option(/*@__PURE__*/ EffectConfig.String("AXIOM_API_KEY")),
|
|
29
|
+
apiBaseUrl: /*@__PURE__*/ EffectConfig.String("AXIOM_URL").pipe(
|
|
30
|
+
/*@__PURE__*/ EffectConfig.withDefault(DEFAULT_API_BASE_URL)),
|
|
31
|
+
orgId: /*@__PURE__*/ EffectConfig.option(/*@__PURE__*/ EffectConfig.String("AXIOM_ORG_ID")),
|
|
31
32
|
});
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export const CredentialsFromEnv = Layer.succeed(Credentials,
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
export const CredentialsFromEnv = /*@__PURE__*/ Layer.succeed(Credentials,
|
|
42
|
+
/*@__PURE__*/ Effect.gen(function* () {
|
|
41
43
|
const config = yield* envConfig.pipe(Effect.mapError(() => new ConfigError({
|
|
42
44
|
message: "AXIOM_TOKEN (or AXIOM_API_KEY) environment variable is required",
|
|
43
45
|
})));
|
package/lib/credentials.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,YAAY,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,O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;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA6B,aAAa,CAAC,KAAK,CAAC,OAAO,CACrF,WAAW;AACX,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAChC,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,CAClC,MAAM,CAAC,QAAQ,CACb,GAAG,EAAE,CACH,IAAI,WAAW,CAAC;QACd,OAAO,EAAE,iEAAiE;KAC3E,CAAC,CACL,CACF,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAE9F,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,KAAK,CAAC,CAAC,IAAI,WAAW,CAAC;YAC5B,OAAO,EAAE,iEAAiE;SAC3E,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;QAC7B,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,KAAK,EAAE,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC;KAC3C,CAAC;AACJ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CACtB,CAAC"}
|
package/lib/edge-ingest.d.ts
CHANGED
package/lib/edge-ingest.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
6
|
export * from "./services/edge_ingest.js";
|
|
7
7
|
//# sourceMappingURL=edge-ingest.js.map
|
package/lib/edge-query.d.ts
CHANGED
package/lib/edge-query.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
6
|
export * from "./services/edge_query.js";
|
|
7
7
|
//# sourceMappingURL=edge-query.js.map
|
package/lib/errors.d.ts
CHANGED
|
@@ -3,34 +3,34 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Re-exports the common HTTP errors from core and adds the Axiom fallback
|
|
5
5
|
* errors. Note the generated service modules additionally define their own
|
|
6
|
-
* per-status matcher classes (BadRequest/NotFound
|
|
7
|
-
* operation declares
|
|
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 { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
|
|
11
11
|
export type { DefaultErrors } from "@distilled.cloud/core/errors";
|
|
12
|
-
import * as Schema from "
|
|
13
|
-
declare const UnknownAxiomError_base: Schema.
|
|
14
|
-
readonly code: Schema.optional<Schema.String>;
|
|
15
|
-
readonly message: Schema.optional<Schema.String>;
|
|
16
|
-
readonly body: Schema.Unknown;
|
|
17
|
-
}
|
|
12
|
+
import * as Schema from "@distilled.cloud/core/schema-lite-typed";
|
|
13
|
+
declare const UnknownAxiomError_base: Schema.TaggedErrorClass<"UnknownAxiomError", {
|
|
14
|
+
readonly code: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
15
|
+
readonly message: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
16
|
+
readonly body: import("effect/Schema").Unknown;
|
|
17
|
+
}> & (new (...args: any[]) => {
|
|
18
18
|
"@distilled.cloud/error/categories": {
|
|
19
19
|
ServerError: true;
|
|
20
20
|
};
|
|
21
21
|
});
|
|
22
|
-
/** Unknown Axiom error
|
|
23
|
-
export declare class UnknownAxiomError extends UnknownAxiomError_base {
|
|
22
|
+
/** Unknown Axiom error -- returned when nothing else matches the failure. */
|
|
23
|
+
export declare class UnknownAxiomError extends /*@__PURE__*/ UnknownAxiomError_base {
|
|
24
24
|
}
|
|
25
|
-
declare const AxiomParseError_base: Schema.
|
|
26
|
-
readonly body: Schema.Unknown;
|
|
27
|
-
readonly cause: Schema.Unknown;
|
|
28
|
-
}
|
|
25
|
+
declare const AxiomParseError_base: Schema.TaggedErrorClass<"AxiomParseError", {
|
|
26
|
+
readonly body: import("effect/Schema").Unknown;
|
|
27
|
+
readonly cause: import("effect/Schema").Unknown;
|
|
28
|
+
}> & (new (...args: any[]) => {
|
|
29
29
|
"@distilled.cloud/error/categories": {
|
|
30
30
|
ParseError: true;
|
|
31
31
|
};
|
|
32
32
|
});
|
|
33
33
|
/** Schema parse error wrapper (kept for v0 surface parity). */
|
|
34
|
-
export declare class AxiomParseError extends AxiomParseError_base {
|
|
34
|
+
export declare class AxiomParseError extends /*@__PURE__*/ AxiomParseError_base {
|
|
35
35
|
}
|
|
36
36
|
//# sourceMappingURL=errors.d.ts.map
|
package/lib/errors.d.ts.map
CHANGED
|
@@ -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;AAGlE,OAAO,KAAK,MAAM,MAAM,
|
|
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;AAGlE,OAAO,KAAK,MAAM,MAAM,yCAAyC,CAAC;;;;;;;;;;AAElE,6EAA6E;AAC7E,qBAAa,iBACX,SAAQ,aAAa,CAAC,sBAIW;CAAG;;;;;;;;;AAEtC,+DAA+D;AAC/D,qBAAa,eACX,SAAQ,aAAa,CAAC,oBAGU;CAAG"}
|
package/lib/errors.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
10
|
export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
|
|
11
11
|
import * as Category from "@distilled.cloud/core/category";
|
|
12
|
-
import * as Schema from "
|
|
13
|
-
|
|
14
|
-
export class UnknownAxiomError extends Schema.TaggedError()("UnknownAxiomError", {
|
|
15
|
-
code: Schema.optional(Schema.String),
|
|
16
|
-
message: Schema.optional(Schema.String),
|
|
12
|
+
import * as Schema from "@distilled.cloud/core/schema-lite-typed";
|
|
13
|
+
|
|
14
|
+
export class UnknownAxiomError extends /*@__PURE__*/ /*@__PURE__*/ Schema.TaggedError()("UnknownAxiomError", {
|
|
15
|
+
code: /*@__PURE__*/ Schema.optional(Schema.String),
|
|
16
|
+
message: /*@__PURE__*/ Schema.optional(Schema.String),
|
|
17
17
|
body: Schema.Unknown,
|
|
18
18
|
}).pipe(Category.withServerError) {
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
export class AxiomParseError extends Schema.TaggedError()("AxiomParseError", {
|
|
20
|
+
|
|
21
|
+
export class AxiomParseError extends /*@__PURE__*/ /*@__PURE__*/ Schema.TaggedError()("AxiomParseError", {
|
|
22
22
|
body: Schema.Unknown,
|
|
23
23
|
cause: Schema.Unknown,
|
|
24
24
|
}).pipe(Category.withParseError) {
|
package/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","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;AAGtC,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"errors.js","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;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
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
21
|
export * from "./credentials.js";
|
|
22
22
|
export * from "./errors.js";
|
|
23
23
|
export * as T from "./traits.js";
|
|
@@ -27,7 +27,7 @@ export * from "./services/index.js";
|
|
|
27
27
|
// v0-parity surface: the v2 control-plane operations live on the package
|
|
28
28
|
// root (edge-ingest / edge-query stay behind their subpath exports).
|
|
29
29
|
// The service-local typed error classes shadow the same-named shared ones
|
|
30
|
-
// from ./errors.ts
|
|
30
|
+
// from ./errors.ts -- the ops actually raise the service-local classes.
|
|
31
31
|
export * from "./services/v2.js";
|
|
32
32
|
export { BadRequest, Conflict, Forbidden, NotFound, UnprocessableEntity } from "./services/v2.js";
|
|
33
33
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,UAAU,EAA0C,MAAM,eAAe,CAAC;AAClG,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,yEAAyE;AACzE,qEAAqE;AACrE,0EAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,UAAU,EAA0C,MAAM,eAAe,CAAC;AAClG,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,yEAAyE;AACzE,qEAAqE;AACrE,0EAA0E;AAC1E,wEAAwE;AACxE,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/lib/protocol.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type AxiomOpContext = Credentials | HttpClient.HttpClient;
|
|
|
20
20
|
* (value or absent), so `null` trips decoding. Recursively drop explicit
|
|
21
21
|
* `null` properties before decoding so optional fields are treated as
|
|
22
22
|
* absent. Keys that are genuinely nullable in the API are patched to
|
|
23
|
-
* nullable in the spec
|
|
23
|
+
* nullable in the spec -- this hook exists for the far more common "Go nil
|
|
24
24
|
* slice" case.
|
|
25
25
|
*/
|
|
26
26
|
export declare const stripNulls: (value: unknown) => unknown;
|
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;AAyB5E,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;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,UAAW,OAAO,KAAG,OAW3C,CAAC;AAiBF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,
|
|
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;AAyB5E,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;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,UAAW,OAAO,KAAG,OAW3C,CAAC;AAiBF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAkBlD,CAAC"}
|
package/lib/protocol.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
24
|
import * as Effect from "effect/Effect";
|
|
25
25
|
import * as Redacted from "effect/Redacted";
|
|
26
26
|
import { Credentials } from "./credentials.js";
|
|
27
27
|
import { UnknownAxiomError, AxiomParseError } from "./errors.js";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
37
|
export const stripNulls = (value) => {
|
|
38
38
|
if (Array.isArray(value))
|
|
39
39
|
return value.map(stripNulls);
|
|
@@ -48,12 +48,12 @@ export const stripNulls = (value) => {
|
|
|
48
48
|
}
|
|
49
49
|
return value;
|
|
50
50
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
57
|
const errorEnvelope = (body) => {
|
|
58
58
|
if (body === null || typeof body !== "object")
|
|
59
59
|
return undefined;
|
|
@@ -63,13 +63,10 @@ const errorEnvelope = (body) => {
|
|
|
63
63
|
const message = typeof b.message === "string" ? b.message : error;
|
|
64
64
|
return { code, message };
|
|
65
65
|
};
|
|
66
|
-
export const AxiomProtocol = makeRestProtocol({
|
|
67
|
-
// The Credentials service holds an effect
|
|
66
|
+
export const AxiomProtocol = /*@__PURE__*/ makeRestProtocol({
|
|
67
|
+
// The Credentials service holds an effect -- resolving it here (per
|
|
68
68
|
// request, on the calling fiber) picks up context-provided credentials.
|
|
69
|
-
credentials: Effect.
|
|
70
|
-
const resolve = yield* Credentials;
|
|
71
|
-
return yield* resolve;
|
|
72
|
-
}),
|
|
69
|
+
credentials: /*@__PURE__*/ Effect.flatMap(Credentials, (resolve) => resolve),
|
|
73
70
|
baseUrl: (creds) => creds.apiBaseUrl,
|
|
74
71
|
headers: (creds) => ({
|
|
75
72
|
Authorization: `Bearer ${Redacted.value(creds.apiKey)}`,
|
package/lib/protocol.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAA0B,MAAM,qCAAqC,CAAC;AAC/F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAkBjE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAc,EAAW,EAAE;IACpD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACvD,IAAI,KAAK,IAAI,OAAO,KA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AAC,CAAC"}
|
package/lib/retry.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import * as Effect from "effect/Effect";
|
|
|
19
19
|
export { type Options, type Factory, type Policy, makeDefault, jittered, capped, throttlingOptions, transientOptions, throttlingFactory, transientFactory, } from "@distilled.cloud/core/retry";
|
|
20
20
|
declare const Retry_base: Context.ServiceClass<Retry, "AxiomRetry", Policy>;
|
|
21
21
|
/** Context tag for configuring retry behavior of Axiom API calls. */
|
|
22
|
-
export declare class Retry extends Retry_base {
|
|
22
|
+
export declare class Retry extends /*@__PURE__*/ Retry_base {
|
|
23
23
|
}
|
|
24
24
|
/** Provides a custom retry policy to every Axiom API call below it. */
|
|
25
25
|
export declare const policy: (optionsOrFactory: Policy) => <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Retry>>;
|
package/lib/retry.d.ts.map
CHANGED
|
@@ -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,UAA8C;CAAG;
|
|
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"}
|
package/lib/retry.js
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { throttlingFactory, transientFactory } from "@distilled.cloud/core/retry";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
17
|
import * as Context from "effect/Context";
|
|
18
18
|
import * as Effect from "effect/Effect";
|
|
19
19
|
import * as Layer from "effect/Layer";
|
|
20
20
|
export { makeDefault, jittered, capped, throttlingOptions, transientOptions, throttlingFactory, transientFactory, } from "@distilled.cloud/core/retry";
|
|
21
|
-
|
|
22
|
-
export class Retry extends Context.Service()("AxiomRetry") {
|
|
21
|
+
|
|
22
|
+
export class Retry extends /*@__PURE__*/ /*@__PURE__*/ Context.Service()("AxiomRetry") {
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
export const policy = (optionsOrFactory) => Effect.provide(Layer.succeed(Retry, optionsOrFactory));
|
|
26
|
-
|
|
27
|
-
export const none = Effect.provide(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
|
|
27
|
+
export const none = /*@__PURE__*/ Effect.provide(
|
|
28
|
+
/*@__PURE__*/ Layer.succeed(Retry, { while: () => false }));
|
|
29
|
+
|
|
30
|
+
export const throttling = /*@__PURE__*/ policy(throttlingFactory);
|
|
31
|
+
|
|
32
|
+
export const transient = /*@__PURE__*/ policy(transientFactory);
|
|
32
33
|
//# sourceMappingURL=retry.js.map
|
package/lib/retry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/F;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAIL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,qEAAqE;AACrE,MAAM,OAAO,KAAM,SAAQ,OAAO,CAAC,OAAO,EAAiB,CAAC,YAAY,CAAC;CAAG;
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/F;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAIL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,qEAAqE;AACrE,MAAM,OAAO,KAAM,SAAQ,aAAa,CAAb,aAAa,CAAC,OAAO,CAAC,OAAO,EAAiB,CAAC,YAAY,CAAC;CAAG;AAE1F,uEAAuE;AACvE,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,gBAAwB,EAAE,EAAE,CACjD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzD,sCAAsC;AACtC,MAAM,CAAC,MAAM,IAAI,GAAG,aAAa,CAAC,MAAM,CAAC,OAAO;AAC9C,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAC3D,CAAC;AAEF,kFAAkF;AAClF,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAElE,oFAAoF;AACpF,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import * as API from "@distilled.cloud/core/api";
|
|
2
|
-
import * as S from "@distilled.cloud/core/schema";
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
3
3
|
import { type AxiomOpError, type AxiomOpContext } from "../protocol.ts";
|
|
4
4
|
export type { AxiomOpError, AxiomOpContext };
|
|
5
|
-
declare const BadRequest_base: S.
|
|
5
|
+
declare const BadRequest_base: S.TaggedErrorClass<"BadRequest", {
|
|
6
6
|
readonly code: any;
|
|
7
7
|
readonly message: any;
|
|
8
|
-
}
|
|
8
|
+
}> & (new (...args: any[]) => {
|
|
9
9
|
"@distilled.cloud/error/categories": {
|
|
10
10
|
BadRequestError: true;
|
|
11
11
|
};
|
|
12
12
|
});
|
|
13
13
|
export declare class BadRequest extends /*@__PURE__*/ BadRequest_base {
|
|
14
14
|
}
|
|
15
|
-
declare const NotFound_base: S.
|
|
15
|
+
declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
|
|
16
16
|
readonly code: any;
|
|
17
17
|
readonly message: any;
|
|
18
|
-
}
|
|
18
|
+
}> & (new (...args: any[]) => {
|
|
19
19
|
"@distilled.cloud/error/categories": {
|
|
20
20
|
BadRequestError: true;
|
|
21
21
|
};
|
|
22
22
|
});
|
|
23
23
|
export declare class NotFound extends /*@__PURE__*/ NotFound_base {
|
|
24
24
|
}
|
|
25
|
-
declare const UnprocessableEntity_base: S.
|
|
25
|
+
declare const UnprocessableEntity_base: S.TaggedErrorClass<"UnprocessableEntity", {
|
|
26
26
|
readonly code: any;
|
|
27
27
|
readonly message: any;
|
|
28
|
-
}
|
|
28
|
+
}> & (new (...args: any[]) => {
|
|
29
29
|
"@distilled.cloud/error/categories": {
|
|
30
30
|
BadRequestError: true;
|
|
31
31
|
};
|
|
@@ -42,14 +42,11 @@ export interface IngestToDatasetRequest {
|
|
|
42
42
|
csv_delimiter?: string;
|
|
43
43
|
body: string;
|
|
44
44
|
}
|
|
45
|
-
export declare const IngestToDatasetRequest: S.Schema<IngestToDatasetRequest>;
|
|
46
45
|
export interface IngestFailure {
|
|
47
46
|
error: string;
|
|
48
47
|
timestamp: string;
|
|
49
48
|
}
|
|
50
|
-
export declare const IngestFailure: S.Schema<IngestFailure>;
|
|
51
49
|
export type IngestStatusFailuresList = Array<IngestFailure>;
|
|
52
|
-
export declare const IngestStatusFailuresList: S.Schema<IngestStatusFailuresList>;
|
|
53
50
|
export interface IngestStatus {
|
|
54
51
|
blocksCreated: number;
|
|
55
52
|
failed: number;
|
|
@@ -58,7 +55,6 @@ export interface IngestStatus {
|
|
|
58
55
|
processedBytes: number;
|
|
59
56
|
walLength: number;
|
|
60
57
|
}
|
|
61
|
-
export declare const IngestStatus: S.Schema<IngestStatus>;
|
|
62
58
|
export type IngestToDatasetError = BadRequest | NotFound | UnprocessableEntity | AxiomOpError;
|
|
63
59
|
export declare const ingestToDataset: API.OperationMethod<IngestToDatasetRequest, IngestStatus, IngestToDatasetError, AxiomOpContext>;
|
|
64
60
|
//# sourceMappingURL=edge_ingest.d.ts.map
|