@oxy-hq/sdk 2.1.0 → 2.3.0
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/dist/email.cjs +14 -0
- package/dist/email.cjs.map +1 -0
- package/dist/email.d.cts +8 -0
- package/dist/email.d.cts.map +1 -0
- package/dist/email.d.mts +8 -0
- package/dist/email.d.mts.map +1 -0
- package/dist/email.mjs +13 -0
- package/dist/email.mjs.map +1 -0
- package/dist/index.cjs +132 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +176 -25
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +176 -25
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +132 -76
- package/dist/index.mjs.map +1 -1
- package/package.json +30 -8
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
4
3
|
//#region src/config.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Configuration for the Oxy SDK
|
|
@@ -478,6 +477,45 @@ interface OxyAppFunctionManifest {
|
|
|
478
477
|
* source warehouse.
|
|
479
478
|
*/
|
|
480
479
|
destinations?: string[];
|
|
480
|
+
/**
|
|
481
|
+
* Capability to write app-scoped secrets via `ctx.secrets.set` (fail-closed:
|
|
482
|
+
* omit → writes rejected). Only the app's own `apps/<app-id>/` namespace is
|
|
483
|
+
* writable. Declare for a function that persists state — e.g. a scheduled
|
|
484
|
+
* token-refresher that writes the rotated token back to Oxy Secrets.
|
|
485
|
+
*/
|
|
486
|
+
secrets?: {
|
|
487
|
+
write?: boolean;
|
|
488
|
+
};
|
|
489
|
+
/**
|
|
490
|
+
* Capability to send email via `ctx.email.send` (fail-closed: omit → the
|
|
491
|
+
* host rejects `ctx.email.send` before any provider call). Declare for a
|
|
492
|
+
* function that emails the app's users — e.g. a `notify` route that sends a
|
|
493
|
+
* welcome message, or a scheduled digest. The sender mailbox is
|
|
494
|
+
* platform-controlled; a function may set `replyTo` but never `from`.
|
|
495
|
+
*/
|
|
496
|
+
email?: {
|
|
497
|
+
send?: boolean;
|
|
498
|
+
};
|
|
499
|
+
/**
|
|
500
|
+
* Retry policy for **background** runs (a `schedule` fire or a manual job
|
|
501
|
+
* trigger). Omit → a job run is attempted once. Route (HTTP) invocations are
|
|
502
|
+
* request-scoped and never retried. `maxAttempts` counts the first try
|
|
503
|
+
* (`maxAttempts: 3` = up to 2 retries); backoff is exponential (doubling)
|
|
504
|
+
* between `minTimeoutMs` and `maxTimeoutMs`. Maps to the durable queue's
|
|
505
|
+
* retry policy — a transient failure re-runs the whole isolate.
|
|
506
|
+
*/
|
|
507
|
+
retries?: {
|
|
508
|
+
maxAttempts?: number;
|
|
509
|
+
minTimeoutMs?: number;
|
|
510
|
+
maxTimeoutMs?: number;
|
|
511
|
+
};
|
|
512
|
+
/**
|
|
513
|
+
* Example input params for the function — a sample JSON body the admin "Run
|
|
514
|
+
* now" surface prefills so an operator knows what to pass (the function reads
|
|
515
|
+
* it as its `req` body, same as a route invocation). Advisory only; not
|
|
516
|
+
* enforced at runtime.
|
|
517
|
+
*/
|
|
518
|
+
inputExample?: unknown;
|
|
481
519
|
}
|
|
482
520
|
/** Wire shape of `oxy-app.json` (v2 only). */
|
|
483
521
|
interface OxyAppManifest {
|
|
@@ -602,6 +640,30 @@ interface CustomerAppDebugSnapshot {
|
|
|
602
640
|
declare function getCustomerAppDebug(resolved: ResolvedCustomerAppManifest): Promise<CustomerAppDebugSnapshot>;
|
|
603
641
|
//#endregion
|
|
604
642
|
//#region src/customer-app/errors.d.ts
|
|
643
|
+
/**
|
|
644
|
+
* Error thrown by all customer-app hooks when an API call returns a
|
|
645
|
+
* non-2xx response. Carries the structured `code` + `hint` the server
|
|
646
|
+
* emits so bundle UIs can render an actionable message instead of
|
|
647
|
+
* "404: { ...json... }".
|
|
648
|
+
*/
|
|
649
|
+
declare class OxyApiError extends Error {
|
|
650
|
+
readonly status: number;
|
|
651
|
+
readonly code: string | null;
|
|
652
|
+
readonly hint: string | null;
|
|
653
|
+
constructor(opts: {
|
|
654
|
+
status: number;
|
|
655
|
+
message: string;
|
|
656
|
+
code?: string | null;
|
|
657
|
+
hint?: string | null;
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Read a non-2xx response from oxy and return an `OxyApiError`.
|
|
662
|
+
* Parses the JSON envelope when present; falls back to raw text
|
|
663
|
+
* (truncated to 240 chars so a runaway HTML error page doesn't
|
|
664
|
+
* dominate the bundle UI).
|
|
665
|
+
*/
|
|
666
|
+
declare function apiErrorFromResponse(resp: Response): Promise<OxyApiError>;
|
|
605
667
|
interface CustomerAppErrorReport {
|
|
606
668
|
title: string;
|
|
607
669
|
message: string;
|
|
@@ -611,6 +673,118 @@ interface CustomerAppErrorReport {
|
|
|
611
673
|
/** Interpret a thrown error as a structured report for UI display. */
|
|
612
674
|
declare function interpretCustomerAppError(err: unknown): CustomerAppErrorReport;
|
|
613
675
|
//#endregion
|
|
676
|
+
//#region src/customer-app/function-context.d.ts
|
|
677
|
+
/**
|
|
678
|
+
* The request passed as the first argument to a function's default export.
|
|
679
|
+
*
|
|
680
|
+
* The host hands the isolate the raw request body as a string (see
|
|
681
|
+
* `req_json` in `runtime.rs`); parse it yourself, e.g.
|
|
682
|
+
* `JSON.parse(req.body || "{}")`. This is intentionally *not* a full Web
|
|
683
|
+
* `Request` — there is no `.json()` / headers object in v1.
|
|
684
|
+
*/
|
|
685
|
+
interface OxyFunctionRequest {
|
|
686
|
+
/** Raw request body as received (JSON string for a JSON POST). */
|
|
687
|
+
body: string;
|
|
688
|
+
}
|
|
689
|
+
/** A single row from a `ctx.query` / `ctx.queryStream` result. */
|
|
690
|
+
type OxyFunctionRow = Record<string, unknown>;
|
|
691
|
+
/** Identity of the invoking user (route) or the system identity (schedule/airway). */
|
|
692
|
+
interface OxyFunctionUser {
|
|
693
|
+
id: string;
|
|
694
|
+
email: string;
|
|
695
|
+
orgId: string;
|
|
696
|
+
}
|
|
697
|
+
/** Result of a `ctx.fetch` call. */
|
|
698
|
+
interface OxyFetchResult {
|
|
699
|
+
status: number;
|
|
700
|
+
body: string;
|
|
701
|
+
}
|
|
702
|
+
/** `ctx.warehouse.*` — writes to one of the app's configured destination databases. */
|
|
703
|
+
interface OxyWarehouseApi {
|
|
704
|
+
insert(database: string, table: string, rows: OxyFunctionRow[]): Promise<unknown>;
|
|
705
|
+
exec(database: string, sql: string): Promise<unknown>;
|
|
706
|
+
upsert(database: string, table: string, rows: OxyFunctionRow[], conflictColumns: string[]): Promise<unknown>;
|
|
707
|
+
}
|
|
708
|
+
/** `ctx.secrets` — write app-scoped secrets (gated by the `secrets.write` capability). */
|
|
709
|
+
interface OxySecretsApi {
|
|
710
|
+
set(key: string, value: string): Promise<void>;
|
|
711
|
+
}
|
|
712
|
+
/** `ctx.semantic` — airlayer-compiled semantic queries (inherits the pre-agg fast path). */
|
|
713
|
+
interface OxySemanticApi {
|
|
714
|
+
query(spec: Record<string, unknown>): Promise<unknown>;
|
|
715
|
+
}
|
|
716
|
+
/** `ctx.airway` — seed/await an Airway ELT pipeline run. */
|
|
717
|
+
interface OxyAirwayApi {
|
|
718
|
+
run(pipelineRef: string, variables?: Record<string, unknown> | null): Promise<{
|
|
719
|
+
runId: string;
|
|
720
|
+
}>;
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* Input to `ctx.email.send`. Platform-injected: the sender mailbox (`from`) is
|
|
724
|
+
* platform-controlled and **not** an accepted field — passing it is a typed
|
|
725
|
+
* error. Provide `html` and/or `text` as the body (render a template to HTML
|
|
726
|
+
* with `render` from `@oxy-hq/sdk/email`).
|
|
727
|
+
*/
|
|
728
|
+
interface EmailSendInput {
|
|
729
|
+
/** Recipient address(es). Required. */
|
|
730
|
+
to: string | string[];
|
|
731
|
+
/** CC address(es). */
|
|
732
|
+
cc?: string | string[];
|
|
733
|
+
/** BCC address(es). */
|
|
734
|
+
bcc?: string | string[];
|
|
735
|
+
/** Reply-To address — the only sender-identity field an author may set. */
|
|
736
|
+
replyTo?: string;
|
|
737
|
+
/** Subject line. Required. */
|
|
738
|
+
subject: string;
|
|
739
|
+
/** HTML body. Provide at least one of `html` / `text`. */
|
|
740
|
+
html?: string;
|
|
741
|
+
/** Plain-text body. Provide at least one of `html` / `text`. */
|
|
742
|
+
text?: string;
|
|
743
|
+
/**
|
|
744
|
+
* Optional idempotency key (≤256 chars). Accepted and validated in v1 but a
|
|
745
|
+
* no-op until the persisted idempotency table lands — adopt it now so
|
|
746
|
+
* background (retried) sends become exactly-once once it does.
|
|
747
|
+
*/
|
|
748
|
+
idempotencyKey?: string;
|
|
749
|
+
}
|
|
750
|
+
/** Result of a successful `ctx.email.send`. */
|
|
751
|
+
interface EmailSendResult {
|
|
752
|
+
/** Provider (SES) message id of the sent message. */
|
|
753
|
+
messageId: string;
|
|
754
|
+
}
|
|
755
|
+
/** `ctx.email` — send email (gated by the `email.send` capability). */
|
|
756
|
+
interface OxyEmailApi {
|
|
757
|
+
send(input: EmailSendInput): Promise<EmailSendResult>;
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* The data-plane context passed as the second argument to a function's default
|
|
761
|
+
* export. Mirrors the host-assembled `ctx` (`__buildCtx` in `runtime.rs`);
|
|
762
|
+
* every member is a host-provided async function bridged to a Rust backend.
|
|
763
|
+
*/
|
|
764
|
+
interface OxyFunctionContext {
|
|
765
|
+
/** Invoking user (route) or system identity (schedule/airway). */
|
|
766
|
+
user: OxyFunctionUser;
|
|
767
|
+
/** Read-only view of the app's configured secrets (project-scoped). */
|
|
768
|
+
env: Record<string, string>;
|
|
769
|
+
/** Structured per-invocation logging (captured + surfaced with the response). */
|
|
770
|
+
log(...args: unknown[]): void;
|
|
771
|
+
/** Read-only SQL (SELECT/WITH only), function-scoped row cap. Resolves to the rows. */
|
|
772
|
+
query(sql: string): Promise<OxyFunctionRow[]>;
|
|
773
|
+
/** Read-only SQL with a higher row cap, yielded to the caller in batches. */
|
|
774
|
+
queryStream(sql: string, opts?: {
|
|
775
|
+
batchSize?: number;
|
|
776
|
+
}): AsyncGenerator<OxyFunctionRow[], void, unknown>;
|
|
777
|
+
/** SSRF-allowlisted outbound HTTP with a response-size cap. */
|
|
778
|
+
fetch(url: string, init?: RequestInit): Promise<OxyFetchResult>;
|
|
779
|
+
warehouse: OxyWarehouseApi;
|
|
780
|
+
secrets: OxySecretsApi;
|
|
781
|
+
semantic: OxySemanticApi;
|
|
782
|
+
airway: OxyAirwayApi;
|
|
783
|
+
email: OxyEmailApi;
|
|
784
|
+
}
|
|
785
|
+
/** Signature of a function's default export: `export default async (req, ctx) => Response`. */
|
|
786
|
+
type OxyFunctionHandler = (req: OxyFunctionRequest, ctx: OxyFunctionContext) => Promise<Response> | Response;
|
|
787
|
+
//#endregion
|
|
614
788
|
//#region src/customer-app/inject.d.ts
|
|
615
789
|
/**
|
|
616
790
|
* Shape of `window.__OXY_APP__` written by oxy at serve time.
|
|
@@ -696,29 +870,6 @@ interface OxyAppProviderProps {
|
|
|
696
870
|
* render after the manifest is ready (or the error fallback fires).
|
|
697
871
|
*/
|
|
698
872
|
declare function OxyAppProvider(props: OxyAppProviderProps): React.JSX.Element;
|
|
699
|
-
/**
|
|
700
|
-
* Error thrown by all customer-app hooks when an API call returns a
|
|
701
|
-
* non-2xx response. Carries the structured `code` + `hint` the server
|
|
702
|
-
* emits so bundle UIs can render an actionable message instead of
|
|
703
|
-
* "404: { ...json... }".
|
|
704
|
-
*
|
|
705
|
-
* The server contract is documented in
|
|
706
|
-
* `crates/app/src/server/api/projects/agent_ask.rs` and
|
|
707
|
-
* `procedure_run.rs` — both emit `{ message, code?, hint? }` as JSON.
|
|
708
|
-
* Hooks that previously wrapped the raw text in `new Error()` now
|
|
709
|
-
* throw this type instead.
|
|
710
|
-
*/
|
|
711
|
-
declare class OxyApiError extends Error {
|
|
712
|
-
readonly status: number;
|
|
713
|
-
readonly code: string | null;
|
|
714
|
-
readonly hint: string | null;
|
|
715
|
-
constructor(opts: {
|
|
716
|
-
status: number;
|
|
717
|
-
message: string;
|
|
718
|
-
code?: string | null;
|
|
719
|
-
hint?: string | null;
|
|
720
|
-
});
|
|
721
|
-
}
|
|
722
873
|
/**
|
|
723
874
|
* Read the resolved manifest from context. Throws if called outside
|
|
724
875
|
* `<OxyAppProvider>` — that's a programmer error worth surfacing
|
|
@@ -1085,5 +1236,5 @@ interface OxyChatProps {
|
|
|
1085
1236
|
*/
|
|
1086
1237
|
declare function OxyChat(props: OxyChatProps): React.JSX.Element;
|
|
1087
1238
|
//#endregion
|
|
1088
|
-
export { type AgentArtifact, type AgentRunEvent, type AgentRunState, type AgentSqlArtifact, AnomaliesClient, type Anomaly, type AnomalySeverity, type AnomalyStatus, type AppFetcher, type CustomerAppDebugSnapshot, type CustomerAppErrorReport, type DimensionOpportunity, type DriverAttribution, type DriverConfidence, type DriverDirection, type DriverForm, type DriverStrength, type EdgeKind, type ExplainConfigOverride, type ExplainNode, type ExplainRequest, type ExplainResult, type ExplainSibling, type ExplainWarning, type ListAnomaliesOptions, type ListAnomaliesResponse, type LoadManifestOptions, type MetricEdge, type MetricNode, type MetricTree, MetricTreeClient, type OpportunityRequest, type OpportunityResult, OxyAnswer, type OxyAnswerProps, OxyApiError, type OxyAppFunctionManifest, type OxyAppLogLevel, type OxyAppLogger, type OxyAppManifest, OxyAppProvider, type OxyAppProviderProps, OxyChat, type OxyChatProps, type OxyInjectedAppConfig, type PredictChange, type PredictImpact, type PredictResult, type ProcedureProgress, type ProcedureResult, type ProcedureRunState, type ResolvedCustomerAppManifest, type ScanOptions, type ScanResponse, type SegmentOpportunity, type SemanticArrayOp, type SemanticDateRangeOp, type SemanticFilter, type SemanticScalarOp, type SemanticTimeDimension, type SensitivityDriver, type SensitivityResult, type SkippedDimension, type SplitKind, type UseAgentRunInput, type UseAgentRunResult, type UseFunctionResult, type UseProcedureRunInput, type UseProcedureRunOpts, type UseProcedureRunResult, type UseQueryInput, type UseQueryOpts, type UseQueryResult, type UseSemanticQueryInput, type UseSemanticQueryOpts, type UseSemanticQueryResult, _resetCustomerAppManifestCacheForTest, getCustomerAppDebug, getOxyAppLogger, interpretCustomerAppError, loadCustomerAppManifest, readInjectedAppConfig, setOxyAppLogger, useAgentRun, useFunction, useProcedureRun, useQuery, useResolvedManifest, useSemanticQuery, useTrackEvent };
|
|
1239
|
+
export { type AgentArtifact, type AgentRunEvent, type AgentRunState, type AgentSqlArtifact, AnomaliesClient, type Anomaly, type AnomalySeverity, type AnomalyStatus, type AppFetcher, type CustomerAppDebugSnapshot, type CustomerAppErrorReport, type DimensionOpportunity, type DriverAttribution, type DriverConfidence, type DriverDirection, type DriverForm, type DriverStrength, type EdgeKind, type EmailSendInput, type EmailSendResult, type ExplainConfigOverride, type ExplainNode, type ExplainRequest, type ExplainResult, type ExplainSibling, type ExplainWarning, type ListAnomaliesOptions, type ListAnomaliesResponse, type LoadManifestOptions, type MetricEdge, type MetricNode, type MetricTree, MetricTreeClient, type OpportunityRequest, type OpportunityResult, type OxyAirwayApi, OxyAnswer, type OxyAnswerProps, OxyApiError, type OxyAppFunctionManifest, type OxyAppLogLevel, type OxyAppLogger, type OxyAppManifest, OxyAppProvider, type OxyAppProviderProps, OxyChat, type OxyChatProps, type OxyEmailApi, type OxyFetchResult, type OxyFunctionContext, type OxyFunctionHandler, type OxyFunctionRequest, type OxyFunctionRow, type OxyFunctionUser, type OxyInjectedAppConfig, type OxySecretsApi, type OxySemanticApi, type OxyWarehouseApi, type PredictChange, type PredictImpact, type PredictResult, type ProcedureProgress, type ProcedureResult, type ProcedureRunState, type ResolvedCustomerAppManifest, type ScanOptions, type ScanResponse, type SegmentOpportunity, type SemanticArrayOp, type SemanticDateRangeOp, type SemanticFilter, type SemanticScalarOp, type SemanticTimeDimension, type SensitivityDriver, type SensitivityResult, type SkippedDimension, type SplitKind, type UseAgentRunInput, type UseAgentRunResult, type UseFunctionResult, type UseProcedureRunInput, type UseProcedureRunOpts, type UseProcedureRunResult, type UseQueryInput, type UseQueryOpts, type UseQueryResult, type UseSemanticQueryInput, type UseSemanticQueryOpts, type UseSemanticQueryResult, _resetCustomerAppManifestCacheForTest, apiErrorFromResponse, getCustomerAppDebug, getOxyAppLogger, interpretCustomerAppError, loadCustomerAppManifest, readInjectedAppConfig, setOxyAppLogger, useAgentRun, useFunction, useProcedureRun, useQuery, useResolvedManifest, useSemanticQuery, useTrackEvent };
|
|
1089
1240
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/config.ts","../src/metricTree.ts","../src/anomalies.ts","../src/customer-app/manifest.ts","../src/customer-app/debug.ts","../src/customer-app/errors.ts","../src/customer-app/inject.ts","../src/customer-app/logger.ts","../src/customer-app/function-sse.ts","../src/customer-app/react.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/config.ts","../src/metricTree.ts","../src/anomalies.ts","../src/customer-app/manifest.ts","../src/customer-app/debug.ts","../src/customer-app/errors.ts","../src/customer-app/function-context.ts","../src/customer-app/inject.ts","../src/customer-app/logger.ts","../src/customer-app/function-sse.ts","../src/customer-app/react.tsx"],"mappings":";;;;;;UAGiB;;;;EAIf;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;;;;EAQA;;;;;EAMA;;;;KCjCU;KACA;KACA;KACA;KACA;UAEK;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA,MAAM;;EAEN;EACA,WAAW;EACX,UAAU;EACV,YAAY;EACZ;EACA,MAAM;EACN;EACA;EACA;EACA;;UAGe;EACf,OAAO;EACP,OAAO;EACP;;UAKe;EACf;EACA;EACA;EACA;EACA,OAAO;EACP,WAAW;EACX,UAAU;EACV;EACA;;UAGe;EACf;EACA,SAAS;;UAKM;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA,MAAM;EAC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A;;;EAGA;;EAEA;;;;;;;;;;;;;;;;;;;iBAoBc,UAAU,OAAO,iBAAiB,MAAM,IAAI;UA+D3C;;EAEf;;EAEA;;EAEA;;EAEA,aAAa,MAAM;;EAEnB;;EAEA;;;;;;;;;;;;;;iBAec,QAAQ,OAAO,eAAe,MAAM,IAAI"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
4
3
|
//#region src/config.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Configuration for the Oxy SDK
|
|
@@ -478,6 +477,45 @@ interface OxyAppFunctionManifest {
|
|
|
478
477
|
* source warehouse.
|
|
479
478
|
*/
|
|
480
479
|
destinations?: string[];
|
|
480
|
+
/**
|
|
481
|
+
* Capability to write app-scoped secrets via `ctx.secrets.set` (fail-closed:
|
|
482
|
+
* omit → writes rejected). Only the app's own `apps/<app-id>/` namespace is
|
|
483
|
+
* writable. Declare for a function that persists state — e.g. a scheduled
|
|
484
|
+
* token-refresher that writes the rotated token back to Oxy Secrets.
|
|
485
|
+
*/
|
|
486
|
+
secrets?: {
|
|
487
|
+
write?: boolean;
|
|
488
|
+
};
|
|
489
|
+
/**
|
|
490
|
+
* Capability to send email via `ctx.email.send` (fail-closed: omit → the
|
|
491
|
+
* host rejects `ctx.email.send` before any provider call). Declare for a
|
|
492
|
+
* function that emails the app's users — e.g. a `notify` route that sends a
|
|
493
|
+
* welcome message, or a scheduled digest. The sender mailbox is
|
|
494
|
+
* platform-controlled; a function may set `replyTo` but never `from`.
|
|
495
|
+
*/
|
|
496
|
+
email?: {
|
|
497
|
+
send?: boolean;
|
|
498
|
+
};
|
|
499
|
+
/**
|
|
500
|
+
* Retry policy for **background** runs (a `schedule` fire or a manual job
|
|
501
|
+
* trigger). Omit → a job run is attempted once. Route (HTTP) invocations are
|
|
502
|
+
* request-scoped and never retried. `maxAttempts` counts the first try
|
|
503
|
+
* (`maxAttempts: 3` = up to 2 retries); backoff is exponential (doubling)
|
|
504
|
+
* between `minTimeoutMs` and `maxTimeoutMs`. Maps to the durable queue's
|
|
505
|
+
* retry policy — a transient failure re-runs the whole isolate.
|
|
506
|
+
*/
|
|
507
|
+
retries?: {
|
|
508
|
+
maxAttempts?: number;
|
|
509
|
+
minTimeoutMs?: number;
|
|
510
|
+
maxTimeoutMs?: number;
|
|
511
|
+
};
|
|
512
|
+
/**
|
|
513
|
+
* Example input params for the function — a sample JSON body the admin "Run
|
|
514
|
+
* now" surface prefills so an operator knows what to pass (the function reads
|
|
515
|
+
* it as its `req` body, same as a route invocation). Advisory only; not
|
|
516
|
+
* enforced at runtime.
|
|
517
|
+
*/
|
|
518
|
+
inputExample?: unknown;
|
|
481
519
|
}
|
|
482
520
|
/** Wire shape of `oxy-app.json` (v2 only). */
|
|
483
521
|
interface OxyAppManifest {
|
|
@@ -602,6 +640,30 @@ interface CustomerAppDebugSnapshot {
|
|
|
602
640
|
declare function getCustomerAppDebug(resolved: ResolvedCustomerAppManifest): Promise<CustomerAppDebugSnapshot>;
|
|
603
641
|
//#endregion
|
|
604
642
|
//#region src/customer-app/errors.d.ts
|
|
643
|
+
/**
|
|
644
|
+
* Error thrown by all customer-app hooks when an API call returns a
|
|
645
|
+
* non-2xx response. Carries the structured `code` + `hint` the server
|
|
646
|
+
* emits so bundle UIs can render an actionable message instead of
|
|
647
|
+
* "404: { ...json... }".
|
|
648
|
+
*/
|
|
649
|
+
declare class OxyApiError extends Error {
|
|
650
|
+
readonly status: number;
|
|
651
|
+
readonly code: string | null;
|
|
652
|
+
readonly hint: string | null;
|
|
653
|
+
constructor(opts: {
|
|
654
|
+
status: number;
|
|
655
|
+
message: string;
|
|
656
|
+
code?: string | null;
|
|
657
|
+
hint?: string | null;
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Read a non-2xx response from oxy and return an `OxyApiError`.
|
|
662
|
+
* Parses the JSON envelope when present; falls back to raw text
|
|
663
|
+
* (truncated to 240 chars so a runaway HTML error page doesn't
|
|
664
|
+
* dominate the bundle UI).
|
|
665
|
+
*/
|
|
666
|
+
declare function apiErrorFromResponse(resp: Response): Promise<OxyApiError>;
|
|
605
667
|
interface CustomerAppErrorReport {
|
|
606
668
|
title: string;
|
|
607
669
|
message: string;
|
|
@@ -611,6 +673,118 @@ interface CustomerAppErrorReport {
|
|
|
611
673
|
/** Interpret a thrown error as a structured report for UI display. */
|
|
612
674
|
declare function interpretCustomerAppError(err: unknown): CustomerAppErrorReport;
|
|
613
675
|
//#endregion
|
|
676
|
+
//#region src/customer-app/function-context.d.ts
|
|
677
|
+
/**
|
|
678
|
+
* The request passed as the first argument to a function's default export.
|
|
679
|
+
*
|
|
680
|
+
* The host hands the isolate the raw request body as a string (see
|
|
681
|
+
* `req_json` in `runtime.rs`); parse it yourself, e.g.
|
|
682
|
+
* `JSON.parse(req.body || "{}")`. This is intentionally *not* a full Web
|
|
683
|
+
* `Request` — there is no `.json()` / headers object in v1.
|
|
684
|
+
*/
|
|
685
|
+
interface OxyFunctionRequest {
|
|
686
|
+
/** Raw request body as received (JSON string for a JSON POST). */
|
|
687
|
+
body: string;
|
|
688
|
+
}
|
|
689
|
+
/** A single row from a `ctx.query` / `ctx.queryStream` result. */
|
|
690
|
+
type OxyFunctionRow = Record<string, unknown>;
|
|
691
|
+
/** Identity of the invoking user (route) or the system identity (schedule/airway). */
|
|
692
|
+
interface OxyFunctionUser {
|
|
693
|
+
id: string;
|
|
694
|
+
email: string;
|
|
695
|
+
orgId: string;
|
|
696
|
+
}
|
|
697
|
+
/** Result of a `ctx.fetch` call. */
|
|
698
|
+
interface OxyFetchResult {
|
|
699
|
+
status: number;
|
|
700
|
+
body: string;
|
|
701
|
+
}
|
|
702
|
+
/** `ctx.warehouse.*` — writes to one of the app's configured destination databases. */
|
|
703
|
+
interface OxyWarehouseApi {
|
|
704
|
+
insert(database: string, table: string, rows: OxyFunctionRow[]): Promise<unknown>;
|
|
705
|
+
exec(database: string, sql: string): Promise<unknown>;
|
|
706
|
+
upsert(database: string, table: string, rows: OxyFunctionRow[], conflictColumns: string[]): Promise<unknown>;
|
|
707
|
+
}
|
|
708
|
+
/** `ctx.secrets` — write app-scoped secrets (gated by the `secrets.write` capability). */
|
|
709
|
+
interface OxySecretsApi {
|
|
710
|
+
set(key: string, value: string): Promise<void>;
|
|
711
|
+
}
|
|
712
|
+
/** `ctx.semantic` — airlayer-compiled semantic queries (inherits the pre-agg fast path). */
|
|
713
|
+
interface OxySemanticApi {
|
|
714
|
+
query(spec: Record<string, unknown>): Promise<unknown>;
|
|
715
|
+
}
|
|
716
|
+
/** `ctx.airway` — seed/await an Airway ELT pipeline run. */
|
|
717
|
+
interface OxyAirwayApi {
|
|
718
|
+
run(pipelineRef: string, variables?: Record<string, unknown> | null): Promise<{
|
|
719
|
+
runId: string;
|
|
720
|
+
}>;
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* Input to `ctx.email.send`. Platform-injected: the sender mailbox (`from`) is
|
|
724
|
+
* platform-controlled and **not** an accepted field — passing it is a typed
|
|
725
|
+
* error. Provide `html` and/or `text` as the body (render a template to HTML
|
|
726
|
+
* with `render` from `@oxy-hq/sdk/email`).
|
|
727
|
+
*/
|
|
728
|
+
interface EmailSendInput {
|
|
729
|
+
/** Recipient address(es). Required. */
|
|
730
|
+
to: string | string[];
|
|
731
|
+
/** CC address(es). */
|
|
732
|
+
cc?: string | string[];
|
|
733
|
+
/** BCC address(es). */
|
|
734
|
+
bcc?: string | string[];
|
|
735
|
+
/** Reply-To address — the only sender-identity field an author may set. */
|
|
736
|
+
replyTo?: string;
|
|
737
|
+
/** Subject line. Required. */
|
|
738
|
+
subject: string;
|
|
739
|
+
/** HTML body. Provide at least one of `html` / `text`. */
|
|
740
|
+
html?: string;
|
|
741
|
+
/** Plain-text body. Provide at least one of `html` / `text`. */
|
|
742
|
+
text?: string;
|
|
743
|
+
/**
|
|
744
|
+
* Optional idempotency key (≤256 chars). Accepted and validated in v1 but a
|
|
745
|
+
* no-op until the persisted idempotency table lands — adopt it now so
|
|
746
|
+
* background (retried) sends become exactly-once once it does.
|
|
747
|
+
*/
|
|
748
|
+
idempotencyKey?: string;
|
|
749
|
+
}
|
|
750
|
+
/** Result of a successful `ctx.email.send`. */
|
|
751
|
+
interface EmailSendResult {
|
|
752
|
+
/** Provider (SES) message id of the sent message. */
|
|
753
|
+
messageId: string;
|
|
754
|
+
}
|
|
755
|
+
/** `ctx.email` — send email (gated by the `email.send` capability). */
|
|
756
|
+
interface OxyEmailApi {
|
|
757
|
+
send(input: EmailSendInput): Promise<EmailSendResult>;
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* The data-plane context passed as the second argument to a function's default
|
|
761
|
+
* export. Mirrors the host-assembled `ctx` (`__buildCtx` in `runtime.rs`);
|
|
762
|
+
* every member is a host-provided async function bridged to a Rust backend.
|
|
763
|
+
*/
|
|
764
|
+
interface OxyFunctionContext {
|
|
765
|
+
/** Invoking user (route) or system identity (schedule/airway). */
|
|
766
|
+
user: OxyFunctionUser;
|
|
767
|
+
/** Read-only view of the app's configured secrets (project-scoped). */
|
|
768
|
+
env: Record<string, string>;
|
|
769
|
+
/** Structured per-invocation logging (captured + surfaced with the response). */
|
|
770
|
+
log(...args: unknown[]): void;
|
|
771
|
+
/** Read-only SQL (SELECT/WITH only), function-scoped row cap. Resolves to the rows. */
|
|
772
|
+
query(sql: string): Promise<OxyFunctionRow[]>;
|
|
773
|
+
/** Read-only SQL with a higher row cap, yielded to the caller in batches. */
|
|
774
|
+
queryStream(sql: string, opts?: {
|
|
775
|
+
batchSize?: number;
|
|
776
|
+
}): AsyncGenerator<OxyFunctionRow[], void, unknown>;
|
|
777
|
+
/** SSRF-allowlisted outbound HTTP with a response-size cap. */
|
|
778
|
+
fetch(url: string, init?: RequestInit): Promise<OxyFetchResult>;
|
|
779
|
+
warehouse: OxyWarehouseApi;
|
|
780
|
+
secrets: OxySecretsApi;
|
|
781
|
+
semantic: OxySemanticApi;
|
|
782
|
+
airway: OxyAirwayApi;
|
|
783
|
+
email: OxyEmailApi;
|
|
784
|
+
}
|
|
785
|
+
/** Signature of a function's default export: `export default async (req, ctx) => Response`. */
|
|
786
|
+
type OxyFunctionHandler = (req: OxyFunctionRequest, ctx: OxyFunctionContext) => Promise<Response> | Response;
|
|
787
|
+
//#endregion
|
|
614
788
|
//#region src/customer-app/inject.d.ts
|
|
615
789
|
/**
|
|
616
790
|
* Shape of `window.__OXY_APP__` written by oxy at serve time.
|
|
@@ -696,29 +870,6 @@ interface OxyAppProviderProps {
|
|
|
696
870
|
* render after the manifest is ready (or the error fallback fires).
|
|
697
871
|
*/
|
|
698
872
|
declare function OxyAppProvider(props: OxyAppProviderProps): React.JSX.Element;
|
|
699
|
-
/**
|
|
700
|
-
* Error thrown by all customer-app hooks when an API call returns a
|
|
701
|
-
* non-2xx response. Carries the structured `code` + `hint` the server
|
|
702
|
-
* emits so bundle UIs can render an actionable message instead of
|
|
703
|
-
* "404: { ...json... }".
|
|
704
|
-
*
|
|
705
|
-
* The server contract is documented in
|
|
706
|
-
* `crates/app/src/server/api/projects/agent_ask.rs` and
|
|
707
|
-
* `procedure_run.rs` — both emit `{ message, code?, hint? }` as JSON.
|
|
708
|
-
* Hooks that previously wrapped the raw text in `new Error()` now
|
|
709
|
-
* throw this type instead.
|
|
710
|
-
*/
|
|
711
|
-
declare class OxyApiError extends Error {
|
|
712
|
-
readonly status: number;
|
|
713
|
-
readonly code: string | null;
|
|
714
|
-
readonly hint: string | null;
|
|
715
|
-
constructor(opts: {
|
|
716
|
-
status: number;
|
|
717
|
-
message: string;
|
|
718
|
-
code?: string | null;
|
|
719
|
-
hint?: string | null;
|
|
720
|
-
});
|
|
721
|
-
}
|
|
722
873
|
/**
|
|
723
874
|
* Read the resolved manifest from context. Throws if called outside
|
|
724
875
|
* `<OxyAppProvider>` — that's a programmer error worth surfacing
|
|
@@ -1085,5 +1236,5 @@ interface OxyChatProps {
|
|
|
1085
1236
|
*/
|
|
1086
1237
|
declare function OxyChat(props: OxyChatProps): React.JSX.Element;
|
|
1087
1238
|
//#endregion
|
|
1088
|
-
export { type AgentArtifact, type AgentRunEvent, type AgentRunState, type AgentSqlArtifact, AnomaliesClient, type Anomaly, type AnomalySeverity, type AnomalyStatus, type AppFetcher, type CustomerAppDebugSnapshot, type CustomerAppErrorReport, type DimensionOpportunity, type DriverAttribution, type DriverConfidence, type DriverDirection, type DriverForm, type DriverStrength, type EdgeKind, type ExplainConfigOverride, type ExplainNode, type ExplainRequest, type ExplainResult, type ExplainSibling, type ExplainWarning, type ListAnomaliesOptions, type ListAnomaliesResponse, type LoadManifestOptions, type MetricEdge, type MetricNode, type MetricTree, MetricTreeClient, type OpportunityRequest, type OpportunityResult, OxyAnswer, type OxyAnswerProps, OxyApiError, type OxyAppFunctionManifest, type OxyAppLogLevel, type OxyAppLogger, type OxyAppManifest, OxyAppProvider, type OxyAppProviderProps, OxyChat, type OxyChatProps, type OxyInjectedAppConfig, type PredictChange, type PredictImpact, type PredictResult, type ProcedureProgress, type ProcedureResult, type ProcedureRunState, type ResolvedCustomerAppManifest, type ScanOptions, type ScanResponse, type SegmentOpportunity, type SemanticArrayOp, type SemanticDateRangeOp, type SemanticFilter, type SemanticScalarOp, type SemanticTimeDimension, type SensitivityDriver, type SensitivityResult, type SkippedDimension, type SplitKind, type UseAgentRunInput, type UseAgentRunResult, type UseFunctionResult, type UseProcedureRunInput, type UseProcedureRunOpts, type UseProcedureRunResult, type UseQueryInput, type UseQueryOpts, type UseQueryResult, type UseSemanticQueryInput, type UseSemanticQueryOpts, type UseSemanticQueryResult, _resetCustomerAppManifestCacheForTest, getCustomerAppDebug, getOxyAppLogger, interpretCustomerAppError, loadCustomerAppManifest, readInjectedAppConfig, setOxyAppLogger, useAgentRun, useFunction, useProcedureRun, useQuery, useResolvedManifest, useSemanticQuery, useTrackEvent };
|
|
1239
|
+
export { type AgentArtifact, type AgentRunEvent, type AgentRunState, type AgentSqlArtifact, AnomaliesClient, type Anomaly, type AnomalySeverity, type AnomalyStatus, type AppFetcher, type CustomerAppDebugSnapshot, type CustomerAppErrorReport, type DimensionOpportunity, type DriverAttribution, type DriverConfidence, type DriverDirection, type DriverForm, type DriverStrength, type EdgeKind, type EmailSendInput, type EmailSendResult, type ExplainConfigOverride, type ExplainNode, type ExplainRequest, type ExplainResult, type ExplainSibling, type ExplainWarning, type ListAnomaliesOptions, type ListAnomaliesResponse, type LoadManifestOptions, type MetricEdge, type MetricNode, type MetricTree, MetricTreeClient, type OpportunityRequest, type OpportunityResult, type OxyAirwayApi, OxyAnswer, type OxyAnswerProps, OxyApiError, type OxyAppFunctionManifest, type OxyAppLogLevel, type OxyAppLogger, type OxyAppManifest, OxyAppProvider, type OxyAppProviderProps, OxyChat, type OxyChatProps, type OxyEmailApi, type OxyFetchResult, type OxyFunctionContext, type OxyFunctionHandler, type OxyFunctionRequest, type OxyFunctionRow, type OxyFunctionUser, type OxyInjectedAppConfig, type OxySecretsApi, type OxySemanticApi, type OxyWarehouseApi, type PredictChange, type PredictImpact, type PredictResult, type ProcedureProgress, type ProcedureResult, type ProcedureRunState, type ResolvedCustomerAppManifest, type ScanOptions, type ScanResponse, type SegmentOpportunity, type SemanticArrayOp, type SemanticDateRangeOp, type SemanticFilter, type SemanticScalarOp, type SemanticTimeDimension, type SensitivityDriver, type SensitivityResult, type SkippedDimension, type SplitKind, type UseAgentRunInput, type UseAgentRunResult, type UseFunctionResult, type UseProcedureRunInput, type UseProcedureRunOpts, type UseProcedureRunResult, type UseQueryInput, type UseQueryOpts, type UseQueryResult, type UseSemanticQueryInput, type UseSemanticQueryOpts, type UseSemanticQueryResult, _resetCustomerAppManifestCacheForTest, apiErrorFromResponse, getCustomerAppDebug, getOxyAppLogger, interpretCustomerAppError, loadCustomerAppManifest, readInjectedAppConfig, setOxyAppLogger, useAgentRun, useFunction, useProcedureRun, useQuery, useResolvedManifest, useSemanticQuery, useTrackEvent };
|
|
1089
1240
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/config.ts","../src/metricTree.ts","../src/anomalies.ts","../src/customer-app/manifest.ts","../src/customer-app/debug.ts","../src/customer-app/errors.ts","../src/customer-app/inject.ts","../src/customer-app/logger.ts","../src/customer-app/function-sse.ts","../src/customer-app/react.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/config.ts","../src/metricTree.ts","../src/anomalies.ts","../src/customer-app/manifest.ts","../src/customer-app/debug.ts","../src/customer-app/errors.ts","../src/customer-app/function-context.ts","../src/customer-app/inject.ts","../src/customer-app/logger.ts","../src/customer-app/function-sse.ts","../src/customer-app/react.tsx"],"mappings":";;;;;;UAGiB;;;;EAIf;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;;;;EAQA;;;;;EAMA;;;;KCjCU;KACA;KACA;KACA;KACA;UAEK;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA,MAAM;;EAEN;EACA,WAAW;EACX,UAAU;EACV,YAAY;EACZ;EACA,MAAM;EACN;EACA;EACA;EACA;;UAGe;EACf,OAAO;EACP,OAAO;EACP;;UAKe;EACf;EACA;EACA;EACA;EACA,OAAO;EACP,WAAW;EACX,UAAU;EACV;EACA;;UAGe;EACf;EACA,SAAS;;UAKM;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA,MAAM;EACN;;UAGe;EACf,QAAQ;EACR,SAAS;;KAKC;EACN;EAAmB;;EACnB;EAAmB;EAAmB;;EACtC;EAA6B;EAAmB;;EAChD;EAAuB;EAAmB;EAAe;;UAE9C;EACf,OAAO;EACP;EACA;EACA;;UAGe;EACf,OAAO;EACP;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA,WAAW;;UAGI;EACf;EACA;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;;KAG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