@oxy-hq/sdk 2.5.0 → 2.6.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/README.md +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +206 -10
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +206 -10
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/dist/{react-CVdWXcu8.mjs → react-5HGW_0oy.mjs} +24 -24
- package/dist/react-5HGW_0oy.mjs.map +1 -0
- package/dist/{react-BeweGSYF.cjs → react-BAiiXftp.cjs} +29 -29
- package/dist/react-BAiiXftp.cjs.map +1 -0
- package/dist/{react-BnpR8VRJ.d.mts → react-DnBdQ8dG.d.cts} +16 -16
- package/dist/react-DnBdQ8dG.d.cts.map +1 -0
- package/dist/{react-BnpR8VRJ.d.cts → react-DnBdQ8dG.d.mts} +16 -16
- package/dist/react-DnBdQ8dG.d.mts.map +1 -0
- package/dist/shell.cjs +3 -3
- package/dist/shell.cjs.map +1 -1
- package/dist/shell.d.cts +3 -3
- package/dist/shell.d.mts +3 -3
- package/dist/shell.mjs +3 -3
- package/dist/shell.mjs.map +1 -1
- package/package.json +8 -8
- package/dist/react-BeweGSYF.cjs.map +0 -1
- package/dist/react-BnpR8VRJ.d.cts.map +0 -1
- package/dist/react-BnpR8VRJ.d.mts.map +0 -1
- package/dist/react-CVdWXcu8.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
//#region src/
|
|
3
|
+
//#region src/custom-app/manifest.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Declaration of a single Oxy Function shipped in the bundle's
|
|
6
6
|
* `functions/` dir. See `internal-docs/2026-06-12-customer-apps-functions-design.md`.
|
|
@@ -136,7 +136,7 @@ interface OxyAppManifest {
|
|
|
136
136
|
* should treat this as the only source of truth for "which org/app
|
|
137
137
|
* does this bundle belong to."
|
|
138
138
|
*/
|
|
139
|
-
interface
|
|
139
|
+
interface ResolvedCustomAppManifest {
|
|
140
140
|
manifest: OxyAppManifest;
|
|
141
141
|
/**
|
|
142
142
|
* Always an empty array for v2 manifests. Kept for API compatibility;
|
|
@@ -179,13 +179,13 @@ interface LoadManifestOptions {
|
|
|
179
179
|
* Load + validate the manifest. Cached after the first call so callers
|
|
180
180
|
* can invoke this from every component without coordinating.
|
|
181
181
|
*/
|
|
182
|
-
declare function
|
|
182
|
+
declare function loadCustomAppManifest(options?: LoadManifestOptions): Promise<ResolvedCustomAppManifest>;
|
|
183
183
|
/** For tests: reset the cache between runs. */
|
|
184
|
-
declare function
|
|
184
|
+
declare function _resetCustomAppManifestCacheForTest(): void;
|
|
185
185
|
//#endregion
|
|
186
|
-
//#region src/
|
|
186
|
+
//#region src/custom-app/errors.d.ts
|
|
187
187
|
/**
|
|
188
|
-
* Error thrown by all
|
|
188
|
+
* Error thrown by all custom-app hooks when an API call returns a
|
|
189
189
|
* non-2xx response. Carries the structured `code` + `hint` the server
|
|
190
190
|
* emits so bundle UIs can render an actionable message instead of
|
|
191
191
|
* "404: { ...json... }".
|
|
@@ -208,23 +208,23 @@ declare class OxyApiError extends Error {
|
|
|
208
208
|
* dominate the bundle UI).
|
|
209
209
|
*/
|
|
210
210
|
declare function apiErrorFromResponse(resp: Response): Promise<OxyApiError>;
|
|
211
|
-
interface
|
|
211
|
+
interface CustomAppErrorReport {
|
|
212
212
|
title: string;
|
|
213
213
|
message: string;
|
|
214
214
|
hint: string;
|
|
215
215
|
docs?: string;
|
|
216
216
|
}
|
|
217
217
|
/** Interpret a thrown error as a structured report for UI display. */
|
|
218
|
-
declare function
|
|
218
|
+
declare function interpretCustomAppError(err: unknown): CustomAppErrorReport;
|
|
219
219
|
//#endregion
|
|
220
|
-
//#region src/
|
|
220
|
+
//#region src/custom-app/function-sse.d.ts
|
|
221
221
|
/** A captured `console.*` / `ctx.log` line from a function run. */
|
|
222
222
|
interface FunctionLog {
|
|
223
223
|
level: string;
|
|
224
224
|
message: string;
|
|
225
225
|
}
|
|
226
226
|
//#endregion
|
|
227
|
-
//#region src/
|
|
227
|
+
//#region src/custom-app/react.d.ts
|
|
228
228
|
/**
|
|
229
229
|
* Credentialed fetch wrapper stored in context so `useQuery` can share
|
|
230
230
|
* the same request mechanism without coupling it to the global `fetch`.
|
|
@@ -237,7 +237,7 @@ interface FunctionLog {
|
|
|
237
237
|
*/
|
|
238
238
|
type AppFetcher = typeof fetch;
|
|
239
239
|
interface OxyAppProviderProps {
|
|
240
|
-
/** Optional manifest load options. Same shape as `
|
|
240
|
+
/** Optional manifest load options. Same shape as `loadCustomAppManifest`. */
|
|
241
241
|
manifestOptions?: LoadManifestOptions;
|
|
242
242
|
/**
|
|
243
243
|
* Rendered while the manifest is loading. Defaults to nothing; pass a
|
|
@@ -249,7 +249,7 @@ interface OxyAppProviderProps {
|
|
|
249
249
|
* report so the bundle can show its own branded error card. Defaults
|
|
250
250
|
* to a minimal text-only fallback (better than a blank page).
|
|
251
251
|
*/
|
|
252
|
-
errorFallback?: (err:
|
|
252
|
+
errorFallback?: (err: CustomAppErrorReport) => React.ReactNode;
|
|
253
253
|
/**
|
|
254
254
|
* Override the fetch implementation used by all hooks (`useQuery`).
|
|
255
255
|
* Useful for test environments or proxy setups. Defaults to a wrapper
|
|
@@ -278,7 +278,7 @@ declare function OxyAppProvider(props: OxyAppProviderProps): React.JSX.Element;
|
|
|
278
278
|
* `<OxyAppProvider>` — that's a programmer error worth surfacing
|
|
279
279
|
* loudly, not silently swallowing.
|
|
280
280
|
*/
|
|
281
|
-
declare function useResolvedManifest():
|
|
281
|
+
declare function useResolvedManifest(): ResolvedCustomAppManifest;
|
|
282
282
|
/**
|
|
283
283
|
* Low-level hook that returns the raw context value (including the
|
|
284
284
|
* fetcher). Prefer `useResolvedManifest` for manifest access; use
|
|
@@ -310,7 +310,7 @@ interface UseQueryResult<Row = Record<string, unknown>> {
|
|
|
310
310
|
}
|
|
311
311
|
/**
|
|
312
312
|
* Execute an ad-hoc SQL query against the project linked to this
|
|
313
|
-
*
|
|
313
|
+
* custom app. The query is specified inline by the caller; no
|
|
314
314
|
* manifest declaration is involved.
|
|
315
315
|
*
|
|
316
316
|
* Re-runs whenever `input` or enabled `params` change. Use the
|
|
@@ -652,5 +652,5 @@ interface OxyChatProps {
|
|
|
652
652
|
*/
|
|
653
653
|
declare function OxyChat(props: OxyChatProps): React.JSX.Element;
|
|
654
654
|
//#endregion
|
|
655
|
-
export { UseSemanticQueryOpts as A,
|
|
656
|
-
//# sourceMappingURL=react-
|
|
655
|
+
export { UseSemanticQueryOpts as A, CustomAppErrorReport as B, UseProcedureRunInput as C, UseQueryOpts as D, UseQueryInput as E, useProcedureRun as F, OxyAppFunctionManifest as G, apiErrorFromResponse as H, useQuery as I, _resetCustomAppManifestCacheForTest as J, OxyAppManifest as K, useResolvedManifest as L, useAgentRun as M, useFunction as N, UseQueryResult as O, useOxyApp as P, useSemanticQuery as R, UseFunctionResult as S, UseProcedureRunResult as T, interpretCustomAppError as U, OxyApiError as V, LoadManifestOptions as W, loadCustomAppManifest as Y, SemanticFilter as _, AppFetcher as a, UseAgentRunInput as b, OxyAppProvider as c, OxyChatProps as d, ProcedureProgress as f, SemanticDateRangeOp as g, SemanticArrayOp as h, AgentSqlArtifact as i, UseSemanticQueryResult as j, UseSemanticQueryInput as k, OxyAppProviderProps as l, ProcedureRunState as m, AgentRunEvent as n, OxyAnswer as o, ProcedureResult as p, ResolvedCustomAppManifest as q, AgentRunState as r, OxyAnswerProps as s, AgentArtifact as t, OxyChat as u, SemanticScalarOp as v, UseProcedureRunOpts as w, UseAgentRunResult as x, SemanticTimeDimension as y, useTrackEvent as z };
|
|
656
|
+
//# sourceMappingURL=react-DnBdQ8dG.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-DnBdQ8dG.d.mts","names":[],"sources":["../src/custom-app/manifest.ts","../src/custom-app/errors.ts","../src/custom-app/function-sse.ts","../src/custom-app/react.tsx"],"mappings":";;;;;;;;;;;UA0BiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;IAAe;IAAkB;;;EAEjC;;;;;;;;;EASA;IAAU;;;;;;;;;;EASV;;;;;;;EAOA;IAAY;;;;;;;;;EAQZ;IAAU;;;;;;;;;;EASV;IAAY;IAAsB;IAAuB;;;;;;;;EAOzD;;;UAIe;;EAEf;;;;;;EAMA;;;;;;;EAOA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA,YAAY,eAAe;;;;;;;EAO3B;IAAQ;IAAgB;;;;;;;;UAUT;EACf,UAAU;;;;;;;EAOV;;EAEA;;EAEA;;;;;;EAMA;;EAEA;;;;;;;;EAQA;;UAGe;;;;;;;EAOf;;;;;;iBASc,sBACd,UAAS,sBACR,QAAQ;;iBAQK;;;;;;;;;cC9KH,oBAAoB;WACtB;WACA;WACA;EACT,YAAY;IACV;IACA;IACA;IACA;;;;;;;;;iBAmBkB,qBAAqB,MAAM,WAAW,QAAQ;UA2BnD;EACf;EACA;EACA;EACA;;;iBAMc,wBAAwB,eAAe;;;;UC7EtC;EACf;EACA;;;;;;;;;;;;;;KC4CU,oBAAoB;UAsCf;;EAEf,kBAAkB;;;;;EAKlB,WAAW,MAAM;;;;;;EAMjB,iBAAiB,KAAK,yBAAyB,MAAM;;;;;;EAMrD,UAAU;;;;;;;;;;EAUV;EACA,UAAU,MAAM;;;;;;iBAOF,eAAe,OAAO,sBAAsB,MAAM,IAAI;;;;;;iBA0GtD,uBAAuB;;;;;;;;iBAqBvB;EACd;EACA;EACA;EACA,SAAS;;UAgBM;EACf;EACA;;UAGe;EACf,SAAS;;EAET;;UAGe,eAAe,MAAM;EACpC,MAAM;EACN;EACA;EACA,OAAO;EACP;;;;;;;;;;;iBAYc,SAAS,MAAM,yBAC7B,OAAO,eACP,OAAM,eACL,eAAe;UAwFD,kBAAkB;;;;;;;;E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Bc,UAAU,OAAO,iBAAiB,MAAM,IAAI;UAgE3C;;EAEf;;EAEA;;EAEA;;EAEA,aAAa,MAAM;;EAEnB;;EAEA;;;;;;;;;;;;;;iBAec,QAAQ,OAAO,eAAe,MAAM,IAAI"}
|
package/dist/shell.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @oxy/sdk - TypeScript SDK for Oxy data platform
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
-
const require_react = require('./react-
|
|
3
|
+
const require_react = require('./react-BAiiXftp.cjs');
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_react.__toESM(react, 1);
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -1784,7 +1784,7 @@ function ShellRail({ top, groups, footerItems, bottom, className }) {
|
|
|
1784
1784
|
//#endregion
|
|
1785
1785
|
//#region src/shell/shellContext.ts
|
|
1786
1786
|
/**
|
|
1787
|
-
* Fetch the shell bootstrap payload for the current
|
|
1787
|
+
* Fetch the shell bootstrap payload for the current custom app. Must be
|
|
1788
1788
|
* called inside `<OxyAppProvider>`. Failure is non-fatal by design: the
|
|
1789
1789
|
* shell degrades to chrome-less rendering (older servers don't have the
|
|
1790
1790
|
* endpoint), so errors are surfaced on the result, never thrown.
|
|
@@ -2051,7 +2051,7 @@ function buildRailGroups(data, currentAppSlug, abs) {
|
|
|
2051
2051
|
return appItems.length ? [[hq, chat], appItems] : [[hq, chat]];
|
|
2052
2052
|
}
|
|
2053
2053
|
/**
|
|
2054
|
-
* The workspace chrome around a
|
|
2054
|
+
* The workspace chrome around a custom app: icon rail + universal top bar
|
|
2055
2055
|
* + content column — visually identical to the main web-app shell.
|
|
2056
2056
|
*/
|
|
2057
2057
|
function OxyShell({ children, pageLabel, topBarLeft, topBarExtra, railBottom, hideTopBar, askHotkey = true, productBaseUrl, className, chromeBackground, chromeForeground }) {
|